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
If a Chord Ring already exists, an existing node is contacted by the node that wishes to join the network.
ChordNode(String address, int port, String existingAddress, int existingPort) { this.address = address; this.port = port; this.existingAddress = existingAddress; this.existingPort = existingPort; SHA1Hasher sha1Hash = new SHA1Hasher(this.address + ":" + this.port); this.id = sha1Hash.getLong(); this.hex = sha1Hash.getHex(); // Print statements System.out.println("Welcome to the Chord Network!"); System.out.println("You are running on IP: " + this.address + " and port: " + this.port); System.out.println("Your ID: " + this.getId()); // initialize finger table and successor this.initializeFingerTable(); this.initializeSuccessors(); // Launch server thread that will listen to clients new Thread(new ChordServer(this)).start(); this.printFingerTable(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void join(Node chord);", "public void join(NodeInfo info) {\n\t\taddAsPeer(info);\r\n\t\tSystem.out.println(\"Joined : \" + info.getIp() + \" \" + info.getPort());\r\n\t\t// join to obtained node\r\n\t\tString newJoinString = \"0114 JOIN \" + ip + \" \" + port;\r\n\t\tsend(newJoinString, info.getIp(), info.getPort());\r\n\t}", "@Override\n public boolean addConnection(String firstNodeName, String secondNodeName) throws NodeException {\n\n try {\n if (containsNode(getSingleNode(firstNodeName)) && containsNode(getSingleNode(secondNodeName))) {\n getSingleNode(firstNodeName).newNeighbour(getSingleNode(secondNodeName));\n getSingleNode(secondNodeName).newNeighbour(getSingleNode(firstNodeName));\n return true;\n }\n } catch (NodeException e) {\n throw new NodeException(\"Jeden z Vámi zadaných prvků neexistuje!\");\n }\n\n return false;\n }", "private void doJoin(){\n\n final String aggHost = System.getProperty(\"aggregate.host.uri\", \"\");\n if (aggHost.isEmpty()) {\n command(\"/aggregate\", \"addBot\", Record.of()\n .slot(\"node\", nodeUri().toString())\n .slot(\"key\", System.getProperty(\"device.name\", \"\")));\n } else {\n command(aggHost, \"/aggregate\", \"addBot\", Record.of()\n .slot(\"host\", hostUriHack().toString()) // ws://192.168.0.151:9001\n .slot(\"node\", nodeUri().toString()) // /bot/6\n .slot(\"key\", System.getProperty(\"device.name\", \"\")));// RaspiBot6|192.168.0.151:9001\n }\n }", "private void joinParent() {\n System.out.println(\"JOINING parent...\");\n try {\n node.getParent()\n .sendMessage(\n new JoinMessage(node.getName()),\n () -> {\n System.out.println(\"Joined parent!\");\n this.state = State.RUNNING;\n }, () -> {\n node.isRoot = true;\n this.state = State.TERMINATED;\n// node.isRoot = true;\n System.out.println(\"Failed to connect to parent\");\n messageListener.interrupt();\n node.parent.detach();\n }\n );\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "Client join(Participant participant);", "@Override\n\tpublic List<Element> execute(Node thisNode) {\n\n\t\tif (thisNode.getContactTable().size() <= level) {\n\t\t\t// TODO: reactivate next line\n\t\t\t//thisNode.getContactTable().joinLevels();\n\t\t\t// TODO: deactivcate next 2 lines\n\t\t\t//System.out.println(\"#as#dasd#\"+thisNode.getContactTable().size());\n\n\t\t\t// this optimization ensures that no redundant levels are created\n\t\t\tNode lastJoiningNode = thisNode.getContactTable().getLastJoiningNode();\n\t\t\tint newPrefix;\n\t\t\tif (lastJoiningNode != null && lastJoiningNode != joiningNode) {\n\t\t\t\tnewPrefix = Main.skipGraph.generatePrefix();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnewPrefix = (prefix-1)*(-1);\n\t\t\t}\n\n\t\t\t// if prefixes are identical join on level\n\t\t\tif (newPrefix == prefix) {\n\t\t\t\tContact contact = joiningNode.thisContact();\n\t\t\t\tContactLevel newContactLevel = new ContactLevel(contact, contact, newPrefix);\n\t\t\t\tthisNode.getContactTable().addLevel(newContactLevel);\n\t\t\t\t// updates nextNode on joining node\n\t\t\t\tModifyContactsOperation setPrevOnJoining = new SetContactOperation(level, prefix, PREV, thisNode);\n\t\t\t\tModifyContactsOperation setNextOnJoining = new SetContactOperation(level, prefix, NEXT, thisNode);\n\t\t\t\tjoiningNode.execute(setPrevOnJoining);\n\t\t\t\tjoiningNode.execute(setNextOnJoining);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tContact contact = thisNode.thisContact();\n\t\t\t\tContactLevel newContactLevel = new ContactLevel(contact, contact, newPrefix);\n\t\t\t\tthisNode.getContactTable().addLevel(newContactLevel);\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t\t// local variables\n\t\tNode nextNode = thisNode.getContactTable().getLevel(level-1).getNextContact().getNode();\n\n\t\t// node has the same prefix on this level as joining node\n\t\tif (thisNode.getContactTable().getLevel(level).getPrefix() == prefix) {\n\n\t\t\tNode prevNode = thisNode.getContactTable().getLevel(level).getPrevContact().getNode();\n\t\t\t// updates nextNode on previous node\n\t\t\tModifyContactsOperation setNextOnPrev = new SetContactOperation(level, prefix, NEXT, joiningNode);\n\t\t\tprevNode.execute(setNextOnPrev);\n\t\t\t// updates prevNode on joining node\n\t\t\tModifyContactsOperation setPrevOnJoining = new SetContactOperation(level, prefix, PREV, prevNode);\n\t\t\tjoiningNode.execute(setPrevOnJoining);\n\t\t\t// updates nextNode on joining node\n\t\t\tModifyContactsOperation setNextOnJoining = new SetContactOperation(level, prefix, NEXT, thisNode);\n\t\t\tjoiningNode.execute(setNextOnJoining);\n\t\t\t// updates prevNode on this node\n\t\t\tthisNode.getContactTable().getLevel(level).setPrevContact(joiningNode);\n\t\t}\n\t\t// node has a different prefix on this level and forwards request to the next node on this level\n\t\t// (making sure nextNode != joiningNode)\n\t\telse if (nextNode != thisNode && nextNode != joiningNode) {\n\t\t\tnextNode.execute(this);\n\t\t}\n\t\treturn null;\n\t}", "public void connect(ASNode node) {\n\n\t\t/* Create new paths for this node and other node */\n\t\tArrayList<ASNode> newPath1 = new ArrayList<ASNode>();\n\t\tArrayList<ASNode> newPath2 = new ArrayList<ASNode>();\n\t\tnewPath1.add(node);\n\t\tnewPath2.add(this);\n\t\t/* Adds the Node to each others maps to get ready for exchange */\n\t\tMap<Integer, ArrayList<ASNode>> map1 = addNodeToTable(this, paths);\n\t\tMap<Integer, ArrayList<ASNode>> map2 = addNodeToTable(node,\n\t\t\t\tnode.getPaths());\n\n\t\t/* put new path into this node */\n\t\tpaths.put(node.getASNum(), newPath1);\n\t\tmap1.put(this.ASNum, newPath2);\n\t\t/* put new path into other node */\n\t\tnode.setPathsCombine(map1);\n\t\t/* exchange maps and see if any path if shorter, if shorter than adjust */\n\t\tsetPathsCombine(map2);\n\t\t/* Add each other as neighbors */\n\t\tneighbors.add(node);\n\t\tnode.getNeighbors().add(this);\n\t\t\n\t\t/* Announce each other's paths */\n\t\tnode.announce(this);\n\t\tannounce(node);\n\t\t\n\t\t// Exchange IP tables\n\t\tfor (PrefixPair p : IPTable.keySet()) {\n\t\t\tNextPair n = new NextPair(this, IPTable.get(p).length);\n\t\t\tannounceIP(p, n);\n\t\t}\n\t\tfor (PrefixPair p : node.IPTable.keySet()) {\n\t\t\tNextPair n = new NextPair(node, node.IPTable.get(p).length);\n\t\t\tnode.announceIP(p, n);\n\t\t}\n\t\tfor (PrefixPair p : IPTable.keySet()) {\n\t\t\tNextPair n = new NextPair(this, IPTable.get(p).length);\n\t\t\tannounceIP(p, n);\n\t\t}\n\t}", "private static void handleJoin(DatagramPacket packet){\n byte[] packetData = packet.getData();\n InetAddress packetAddr = packet.getAddress();\n if(packetData[0]== (byte)'W') {\n if (!map.containsKey(packetAddr)) {\n byte[] bytes = new byte[8];\n for (int i = 0; i < 8; i++) {\n bytes[i] = packetData[i + 1];\n }\n String name = \"\";\n for (int i = 9; i < packetData.length; i++) {\n name += (char) packetData[i];\n }\n System.out.println(\"Adding \"+name+\":\"+packetAddr.getHostAddress());\n DH dh = new DH(BigInteger.valueOf('&'));\n BigInteger[] bigs = dh.generateRandomKeys(BigInteger.valueOf(77));\n// DH.getSharedSecretKey(bigs[0],BigInteger.valueOf(77),new BigInteger(bytes));\n map.put(packetAddr, new Client(DH.getSharedSecretKey(bigs[0], BigInteger.valueOf(77), new BigInteger(bytes)),name));\n map.get(packetAddr).setB(new BigInteger(bytes));\n map.get(packetAddr).setAddress(packetAddr);\n map.get(packetAddr).lives=5;\n System.out.println(Arrays.toString(bigs) + \":\" + new BigInteger(bytes));\n sendWRQResponse(bigs[1], packet);\n }\n }\n }", "private void joinQuorum() {\n AddQuorumServerRequest request = AddQuorumServerRequest.newBuilder()\n .setServerAddress(NetAddress.newBuilder()\n .setHost(mLocalAddress.getHostString())\n .setRpcPort(mLocalAddress.getPort()))\n .build();\n RaftClient client = createClient();\n client.async().sendReadOnly(Message.valueOf(\n UnsafeByteOperations.unsafeWrap(\n JournalQueryRequest\n .newBuilder()\n .setAddQuorumServerRequest(request)\n .build().toByteArray()\n ))).whenComplete((reply, t) -> {\n if (t != null) {\n LogUtils.warnWithException(LOG, \"Exception occurred while joining quorum\", t);\n }\n if (reply != null && reply.getException() != null) {\n LogUtils.warnWithException(LOG,\n \"Received an error while joining quorum\", reply.getException());\n }\n try {\n client.close();\n } catch (IOException e) {\n LogUtils.warnWithException(LOG, \"Exception occurred closing raft client\", e);\n }\n });\n }", "public void join() throws OperationFailedException\n {\n if (chatRoomSession == null && chatInvitation == null)\n { // the session is not set and we don't have a chatInvitatoin\n // so we try to join the chatRoom again\n ChatRoomManager chatRoomManager =\n provider.getAimConnection().getChatRoomManager();\n chatRoomSession = chatRoomManager.joinRoom(this.getName());\n chatRoomSession.addListener(new AdHocChatRoomSessionListenerImpl(\n this));\n }\n else if (chatInvitation != null)\n {\n chatRoomSession = chatInvitation.accept();\n chatRoomSession.addListener(new AdHocChatRoomSessionListenerImpl(\n this));\n }\n\n // We don't specify a reason.\n opSetMuc.fireLocalUserPresenceEvent(this,\n LocalUserAdHocChatRoomPresenceChangeEvent.LOCAL_USER_JOINED, null);\n }", "private boolean connectTo (Intersection newInter, Direction attachAt) {\n boolean result = false;\n /*\n * Install a reference to the intersection, and install a back\n * reference to the street in the intersection. This can fail if\n * the street is already connected to two intersections, or if the\n * intersection already has a connected street in the specified\n * direction.\n */\n if (attachMe(newInter,attachAt) &&\n newInter.connectTo(this,attachAt.opposite())) result = true;\n /*\n * If this is the final connection, calculate the coordinates of\n * the turn, if any.\n */\n if (result == true && !isOpen()) calculateTurn();\n return (result);\n }", "public void testMissingRouteAfterMerge() throws Exception {\n a=createNode(LON, \"A\", LON_CLUSTER, null);\n b=createNode(LON, \"B\", LON_CLUSTER, null);\n Util.waitUntilAllChannelsHaveSameView(30000, 1000, a, b);\n\n x=createNode(SFO, \"X\", SFO_CLUSTER, null);\n assert x.getView().size() == 1;\n\n RELAY2 ar=a.getProtocolStack().findProtocol(RELAY2.class),\n xr=x.getProtocolStack().findProtocol(RELAY2.class);\n\n assert ar != null && xr != null;\n\n JChannel a_bridge=null, x_bridge=null;\n for(int i=0; i < 20; i++) {\n a_bridge=ar.getBridge(SFO);\n x_bridge=xr.getBridge(LON);\n if(a_bridge != null && x_bridge != null && a_bridge.getView().size() == 2 && x_bridge.getView().size() == 2)\n break;\n Util.sleep(500);\n }\n\n assert a_bridge != null && x_bridge != null;\n\n System.out.println(\"A's bridge channel: \" + a_bridge.getView());\n System.out.println(\"X's bridge channel: \" + x_bridge.getView());\n assert a_bridge.getView().size() == 2 : \"bridge view is \" + a_bridge.getView();\n assert x_bridge.getView().size() == 2 : \"bridge view is \" + x_bridge.getView();\n\n Route route=getRoute(x, LON);\n System.out.println(\"Route at sfo to lon: \" + route);\n assert route != null;\n\n // Now inject a partition into site LON\n System.out.println(\"Creating partition between A and B:\");\n createPartition(a, b);\n\n System.out.println(\"A's view: \" + a.getView() + \"\\nB's view: \" + b.getView());\n assert a.getView().size() == 1 && b.getView().size() == 1;\n\n route=getRoute(x, LON);\n System.out.println(\"Route at sfo to lon: \" + route);\n assert route != null;\n\n View bridge_view=xr.getBridgeView(BRIDGE_CLUSTER);\n System.out.println(\"bridge_view = \" + bridge_view);\n\n // Now make A and B form a cluster again:\n View merge_view=new MergeView(a.getAddress(), 10, Arrays.asList(a.getAddress(), b.getAddress()),\n Arrays.asList(View.create(a.getAddress(), 5, a.getAddress()),\n View.create(b.getAddress(), 5, b.getAddress())));\n GMS gms=a.getProtocolStack().findProtocol(GMS.class);\n gms.installView(merge_view, null);\n gms=b.getProtocolStack().findProtocol(GMS.class);\n gms.installView(merge_view, null);\n\n Util.waitUntilAllChannelsHaveSameView(20000, 500, a, b);\n System.out.println(\"A's view: \" + a.getView() + \"\\nB's view: \" + b.getView());\n\n for(int i=0; i < 20; i++) {\n bridge_view=xr.getBridgeView(BRIDGE_CLUSTER);\n if(bridge_view != null && bridge_view.size() == 2)\n break;\n Util.sleep(500);\n }\n\n route=getRoute(x, LON);\n System.out.println(\"Route at sfo to lon: \" + route);\n assert route != null;\n }", "public boolean addNode(Node node, NodeAdditionResult result) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"{}: start to add node {}\", name, node);\n }\n\n // mark slots that do not belong to this group any more\n Set<Integer> lostSlots =\n ((SlotNodeAdditionResult) result)\n .getLostSlots()\n .getOrDefault(getHeader(), Collections.emptySet());\n for (Integer lostSlot : lostSlots) {\n slotManager.setToSending(lostSlot, false);\n }\n slotManager.save();\n\n synchronized (allNodes) {\n preAddNode(node);\n if (allNodes.contains(node) && allNodes.size() > config.getReplicationNum()) {\n // remove the last node because the group size is fixed to replication number\n Node removedNode = allNodes.remove(allNodes.size() - 1);\n peerMap.remove(removedNode);\n\n if (removedNode.equals(leader.get()) && !removedNode.equals(thisNode)) {\n // if the leader is removed, also start an election immediately\n synchronized (term) {\n setCharacter(NodeCharacter.ELECTOR);\n setLeader(null);\n }\n synchronized (getHeartBeatWaitObject()) {\n getHeartBeatWaitObject().notifyAll();\n }\n }\n return removedNode.equals(thisNode);\n }\n return false;\n }\n }", "@Override\n\tpublic SocketIOSocket join(String room) {\n\t\tString roomName = namespace.getName() + \"/\" + room;\n\t\tthis.manager.onJoin(this.id, roomName);\n//\t\tthis.manager.store.publish('join', this.id, name);\n\t\treturn this;\n\t}", "public final void connectIfNotFound(N n1, E edge, N n2) {\n if (!isConnected(n1, edge, n2)) {\n connect(n1, edge, n2);\n }\n }", "private void joinNewClient() {\r\n\t\t\tString clientName = _clientView.getUserName();\r\n\t\t\tif(clientName == null)\r\n\t\t\t\treturn;\r\n\t\t\t_clientModel.connectToServer();\r\n\t\t\t_clientModel.joinChat(clientName);\r\n\t\t}", "public void addNode() {\r\n \r\n Nod nod = new Nod(capacitate_noduri);\r\n numar_noduri++;\r\n noduri.add(nod);\r\n }", "public Node addNode(Coordinate coordIn){//adds a node to the list\n\t\t//linear search to make sure the node already isnt there\n\t\tint i;\n\t\tfloat inx = coordIn.getX();\n\t\tfloat iny = coordIn.getY();\n\t\tfloat inz = coordIn.getZ();\n\t\tNode n = null;\n\t\tfor(i = 0; i < listOfNodes.size(); i++){\n\t\t\tn = listOfNodes.get(i);\n\t\t\tif(n==null) continue;\n\t\t\tfloat ox = n.getCoordinate().getX();\n\t\t\tfloat oy = n.getCoordinate().getY();\n\t\t\tfloat oz = n.getCoordinate().getZ();\n\t\t\tif(inx <= ox + 0.01f && inx >= ox - 0.01f && iny <= oy + 0.01f && iny >= oy - 0.01f && inz <= oz + 0.01f && inz >= oz - 0.01f)break;\n\t\t}\n\t\tif(i < listOfNodes.size()){ // found duplicate\n\t\t\treturn n;\n\t\t}\n\n\t\tnode_count++;\n\t\tfor(; node_arrayfirstopen < node_arraysize && listOfNodes.get(node_arrayfirstopen) != null; node_arrayfirstopen++);\n\t\tif(node_arrayfirstopen >= node_arraysize){\t//resize\n\t\t\tnode_arraysize = node_arrayfirstopen+1;\n\t\t\tlistOfNodes.ensureCapacity(node_arraysize);\n\t\t\tlistOfNodes.setSize(node_arraysize);\n\t\t}\n\t\tId nid = new Id(node_arrayfirstopen, node_count);\n\t\tn = new Node(coordIn, nid);\n\t\tlistOfNodes.set(node_arrayfirstopen, n);\n\t\tupdateAABBGrow(n.getCoordinate());\n\t\t\n\t\tif(node_arraylasttaken < node_arrayfirstopen) node_arraylasttaken = node_arrayfirstopen; //todo redo\n\t\treturn n;\n\t}", "public static void chooseNeighbour() {\n clique.handler(ConnectReq.class, (i, req) -> {\n int randomIndex = new Random().nextInt(connections.size());\n connections.get(randomIndex).send(req);\n });\n }", "public static WebSocket<JsonNode> join() {\n return new WebSocket<JsonNode>() {\n @Override\n public void onReady(In<JsonNode> in, Out<JsonNode> out) {\n ConnectedPlayer lowerPlayer = new ConnectedPlayer(in, out);\n log.trace(\"Incoming {}.\", lowerPlayer);\n\n // Tell the player that we are trying to find a pair.\n new WaitingForOpponent(lowerPlayer.getId()).write(out);\n\n // Try to pair the incoming player with another player.\n ConnectedPlayer upperPlayer = pendingPlayers.poll();\n if (upperPlayer != null) {\n Game game = new Game(\n upperPlayer, lowerPlayer,\n new Game.ShutdownListener() {\n @Override\n public void onGameShutdown(String gameId) {\n Application.onGameShutdown(gameId);\n }\n });\n game.start();\n games.put(game.getId(), game);\n log.trace(\"Started {} with {} and {}.\", game, upperPlayer, lowerPlayer);\n }\n\n // Else, queue the player into the waiting list.\n else {\n pendingPlayers.add(lowerPlayer);\n log.trace(\"Queued {}.\", lowerPlayer);\n }\n }\n };\n }", "public void connect(Node node) throws RemoteException, UnknownHostException {\n map = new TreeMap();\n this.chord = node;\n this.nodeKey = node.getNodeKey();\n if (chord.getPredecessor() != null) {\n predKey = chord.getPredecessor().getNodeKey();\n }\n bind(this.nodeKey);\n window.setMapper(this);\n manager = new Thread(this);\n manager.start();\n }", "public boolean join(){\n\t\tif (joined) return true;\n\t\t\n StructuredDocument creds = null;\n try {\n AuthenticationCredential authCred = new AuthenticationCredential(peerGroup, null, creds );\n MembershipService membership = peerGroup.getMembershipService();\n Authenticator auth = membership.apply( authCred );\n \n // Check if everything is okay to join the group\n if (auth.isReadyForJoin()){\n Credential myCred = membership.join(auth);\n StructuredTextDocument doc = (StructuredTextDocument)\n myCred.getDocument(new MimeMediaType(\"text/plain\"));\n }\n else\n log.error(\"You cannot join repository\");\n }\n catch (Exception e){\n e.printStackTrace();\n }\n\n log.info(\"Joined to Virtual Repository (low-level)\");\n //change DatabaseDiscovery\n DatabaseDiscovery dd = new DatabaseDiscovery(peerGroup.getParentGroup());\n \n try {\n\t\t\tThread.sleep(2000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n \n //looking for cmu service\n try {\n\t\t\tmanagementModule = dd.obtainManagementServ(peerGroup.getPeerID().toString());\n\t\t} catch (GridException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n \n \n //point to discovery service in joined group\n new DatabaseDiscovery(peerGroup);\n\n this.joined = true; \n \n\t\treturn true;\n\t}", "@Override\n\tpublic boolean insertOneEdge(NodeRelation nodeRelation) {\n\t\treturn false;\n\t}", "private void joinChannel() {\n // Get the User Id for the current user\n final String userId = mUser.getUid();\n // User Id set to 0 for auto handling by Agora\n int uid = 0;\n // Token object\n RtcTokenBuilder token = new RtcTokenBuilder();\n // Time stamp used for length of token\n int timestamp = (int)(System.currentTimeMillis() / 1000 + expirationTimeInSeconds);\n\n String uId = Objects.requireNonNull(mAuth.getCurrentUser()).getUid();\n\n addCallToDb(uId); // Add current user to db for active calls\n\n try {\n // Create a token using Agora Sdk\n agora_token = token.buildTokenWithUid(getString(R.string.agora_app_id), getString(R.string.agora_app_certificate),\n channelName, uid, RtcTokenBuilder.Role.Role_Publisher, timestamp);\n } catch (Exception e) {\n e.printStackTrace();\n }\n // Join the channel with the given token and channel name\n mRtcEngine.joinChannel(agora_token, channelName, \"\", uid);\n }", "public KadNode setNodeWasContacted() {\r\n\t\tlastContactTimestamp.set(System.currentTimeMillis());\r\n\t\treturn this;\r\n\t}", "public boolean joinLobby(Lobby lobby)\n {\n if (lobby.assignSlot(this))\n {\n this.currentLobby = lobby;\n return true;\n }\n return false;\n }", "public boolean canConnectRedstone(ym iba, int i, int j, int k, int dir)\r\n/* 24: */ {\r\n/* 25:31 */ if (dir < 0) {\r\n/* 26:31 */ return false;\r\n/* 27: */ }\r\n/* 28:33 */ IRedPowerConnectable irp = (IRedPowerConnectable)CoreLib.getTileEntity(iba, i, j, k, IRedPowerConnectable.class);\r\n/* 29:36 */ if (irp == null) {\r\n/* 30:36 */ return false;\r\n/* 31: */ }\r\n/* 32:37 */ int s = RedPowerLib.mapLocalToRot(irp.getConnectableMask(), 2);\r\n/* 33:38 */ return (s & 1 << dir) > 0;\r\n/* 34: */ }", "private void connectingPeer() {\n for (int index = 0; index < this.peers.size(); index++) {\n String peerUrl = urlAdderP2PNodeName((String) this.peers.get(index));\n try {\n Node distNode = NodeFactory.getNode(peerUrl);\n P2PService peer = (P2PService) distNode.getActiveObjects(P2PService.class.getName())[0];\n \n if (!peer.equals(this.localP2pService)) {\n // Send a message to the remote peer to record me\n peer.register(this.localP2pService);\n // Add the peer in my group of acquaintances\n this.acqGroup.add(peer);\n }\n } catch (Exception e) {\n logger.debug(\"The peer at \" + peerUrl +\n \" couldn't be contacted\", e);\n }\n }\n }", "private void registerRayoNode(PresenceMessage message) throws Exception {\n\n\t\tElement nodeInfoElement = message.getElement(\n\t\t\t\t\"node-info\", \"urn:xmpp:rayo:cluster:1\");\n\t\t\t\t\n\t\tList<String> platforms = new ArrayList<String>();\n\t\tint weight = RayoNode.DEFAULT_WEIGHT;\n\t\tint priority = RayoNode.DEFAULT_PRIORITY;\n\t\tif (nodeInfoElement != null) {\n\t\t\tNodeList platformElements = nodeInfoElement\n\t\t\t\t\t.getElementsByTagName(\"platform\");\n\t\t\tfor (int i=0;i<platformElements.getLength();i++) {\n\t\t\t\tplatforms.add(platformElements.item(i).getTextContent());\n\t\t\t}\n\t\t\tNodeList weightList = nodeInfoElement.getElementsByTagName(\"weight\");\n\t\t\tif (weightList.getLength() > 0) {\n\t\t\t\ttry {\n\t\t\t\t\tweight = Integer.parseInt(weightList.item(0).getTextContent());\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Unable to parse weight on message [%s]\", message);\n\t\t\t\t}\n\t\t\t}\n\t\t\tNodeList priorityList = nodeInfoElement.getElementsByTagName(\"priority\");\n\t\t\tif (priorityList.getLength() > 0) {\n\t\t\t\ttry {\n\t\t\t\t\tpriority = Integer.parseInt(priorityList.item(0).getTextContent());\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Unable to parse priority on message [%s]\", message);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tRayoNode node = new RayoNode(message.getFrom().toString(), null, new HashSet<String>(platforms));\n\t\tnode.setPriority(priority);\n\t\tnode.setWeight(weight);\n\t\t// if a rayo node sends a chat presence, then lets give it a chance if blacklisted\n\t\tnode.setBlackListed(false); \n\t\tnode.setConsecutiveErrors(0);\n\t\t\n\t\tgatewayStorageService.registerRayoNode(node);\t\t\n\t}", "@Override\n public synchronized Host joinGroup(String groupName, Host newMember) throws RemoteException, MalformedURLException, NotBoundException, java.net.UnknownHostException {\n logger.error(\"joinGroup from \" + newMember + \" for group:\" + groupName);\n Host leader;\n if((leader = databaseHandler.getLeader(groupName)) == null) {\n setLeader(groupName, newMember);\n leader = newMember;\n }\n\n // Use leaders addMember method.\n logger.error(\"before addmember\");\n NameServiceClient nameServiceClient = null;\n try {\n nameServiceClient = (NameServiceClient)Naming.lookup(\"rmi://\" + newMember + \"/\" + NameServiceClient.class.getSimpleName());\n nameServiceClient.setLeader(groupName, leader);\n } catch (NotBoundException | MalformedURLException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n logger.error(\"sending addMember for: \" + newMember + \" to: \" + leader + \" for group: \" + groupName);\n sendAddMember(groupName, leader, newMember);\n } catch(NotBoundException | RemoteException | MalformedURLException | UnknownHostException e) {\n if (nameServiceClient != null) {\n nameServiceClient.setLeader(groupName, newMember);\n databaseHandler.updateMemberConnected(groupName, leader, false);\n setLeader(groupName, newMember);\n logger.error(\"Leader not reachable, new leader - \" + newMember);\n }\n }\n\n logger.error(\"after addMember\");\n\n return leader;\n }", "public static boolean TurnOnRing(Color color, int ring, String idLaumio){\n IMqttClient publisher = Connections.connectPublisher();\n\n JSONObject json = new JSONObject();\n json.put(\"command\", \"set_ring\");\n json.put(\"ring\", ring);\n json.put(\"rgb\",color.getRGB());\n MqttMessage message = new MqttMessage();\n message.setPayload(json.toString().getBytes());\n try {\n publisher.publish(\"laumio/\"+idLaumio+\"/json\",message);\n } catch (MqttException e) {\n e.printStackTrace();\n return false;\n }\n return true;\n }", "public boolean\tconnectTo(Node peer) {\n\t Link link = new Link(this,peer);\n\t if (links.contains(link))\n\t\treturn false;\n\t links.add(link);\n\t peer.links.add(link);\n\t allLinks.add(link);\n\t return true;\n\t}", "public UpdateRing(Node node, String listOfActivePeers) {\n this.node = node;\n this.listOfActivePeers = listOfActivePeers;\n }", "public boolean connectTo (RoadInterface newObj, Direction attachAt)\n throws ClassCastException {\n boolean result = false;\n // Check for compatible type; null newObj will also throw an exception.\n if (!isConnectable(newObj)) {\n ClassCastException oops = new ClassCastException();\n throw oops;\n }\n /*\n * Are we already connected to this object? If so, we're done. If\n * not, and the street still has an open end, make the connection.\n */\n if (isAttached(newObj,attachAt)) {\n result = true;\n } else if (isOpen()) {\n result = connectTo((Intersection) newObj,attachAt);\n }\n return (result);\n }", "public Node searchPred(String id, Node n){\n\n\n try {\n while(!(n.checkCondition(genHash(id),n, largestNode))){\n Socket client = new Socket(InetAddress.getByAddress(new byte[]{10, 0, 2, 2}),\n Integer.parseInt(n.successor)*2);\n\n\n PrintWriter p1 = new PrintWriter(client.getOutputStream(), true);\n\n InputStreamReader is = new InputStreamReader( client.getInputStream());\n BufferedReader b1 = new BufferedReader(is);\n\n\n p1.println(\"get\");\n while (!client.isClosed()) {\n String ack = b1.readLine();\n\n if(ack.contains(\"send\")){\n\n n = new Node();\n String[] rcvNode = ack.split(\":\");\n n.nodeID = rcvNode[1];\n n.predecessor = rcvNode[2];\n n.successor = rcvNode[3];\n\n client.close();\n }\n }\n p1.close();\n b1.close();\n\n\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return n;\n }", "public void join(String ip,int port, int myPort){\r\n\t\ttry{\r\n\t\t\tXmlRpcSender.execute(\"joinRequest\", new Object[] { this.ip, String.valueOf(this.port), this.id }, ip, port);\r\n\t\t\tthis.isJoined = true;\r\n\t\t}catch(Exception e ){e.printStackTrace();}\t\r\n\t}", "void joinRoom(int roomId) throws RoomNotFoundException, RoomPermissionException, IOException;", "private static void connectToNameNode(){\n int nameNodeID = GlobalContext.getNameNodeId();\n ServerConnectMsg msg = new ServerConnectMsg(null);\n\n if(comm_bus.isLocalEntity(nameNodeID)) {\n log.info(\"Connect to local name node\");\n comm_bus.connectTo(nameNodeID, msg.getByteBuffer());\n } else {\n log.info(\"Connect to remote name node\");\n HostInfo nameNodeInfo = GlobalContext.getHostInfo(nameNodeID);\n String nameNodeAddr = nameNodeInfo.ip + \":\" + nameNodeInfo.port;\n log.info(\"name_node_addr = \" + String.valueOf(nameNodeAddr));\n comm_bus.connectTo(nameNodeID, nameNodeAddr, msg.getByteBuffer());\n }\n }", "public void nodeJoined(final ClusterEvent event) {\n }", "public void sendJoiningPlayer() {\r\n Player p = nui.getPlayerOne();\r\n XferJoinPlayer xfer = new XferJoinPlayer(p);\r\n nui.notifyJoinConnected();\r\n networkPlayer.sendOutput(xfer);\r\n }", "@Override\n public boolean peerFound(PeerAddress remotePeer, final PeerAddress referrer, final PeerConnection peerConnection, RTT roundTripTime) {\n LOG.debug(\"Peer {} is online. Reporter was {}.\", remotePeer, referrer);\n boolean firstHand = referrer == null;\n //if we got contacted by this peer, but we did not initiate the connection\n boolean secondHand = remotePeer.equals(referrer);\n //if a peer reported about other peers\n boolean thirdHand = !firstHand && !secondHand;\n // always trust first hand information\n if (firstHand) {\n offlineMap.remove(remotePeer.peerId());\n shutdownMap.remove(remotePeer.peerId());\n }\n \n if (secondHand && !peerVerification) {\n \tofflineMap.remove(remotePeer.peerId());\n shutdownMap.remove(remotePeer.peerId());\n }\n \n // don't add nodes with zero node id, do not add myself and do not add\n // nodes marked as bad\n if (remotePeer.peerId().isZero() || self().equals(remotePeer.peerId()) || reject(remotePeer)) {\n \tLOG.debug(\"peer Id is zero, self address, or simply rejected\");\n return false;\n }\n \n //if we have first hand information, that means we send a message to that peer and we received a reply. \n //So its not firewalled. This happens in the discovery phase\n if (remotePeer.unreachable()) {\n \tif(firstHand) {\n \t\tremotePeer = remotePeer.withUnreachable(false);\n \t} else {\n \t\tLOG.debug(\"peer is unreachable, reject\");\n \t\treturn false;\n \t}\n }\n \n final boolean probablyDead = offlineMap.containsKey(remotePeer.peerId()) || \n \t\tshutdownMap.containsKey(remotePeer.peerId()) || \n \t\texceptionMap.containsKey(remotePeer.peerId());\n \n\t\t// don't include secondHand as if we are contacted by an assumed offline\n\t\t// peer and we see the peer is there, assume the peer is not dead.\n\t\tif(thirdHand && probablyDead) {\n \tLOG.debug(\"Most likely offline, reject\");\n \treturn false;\n }\n \n final int classMember = classMember(remotePeer.peerId());\n\n // Update existing PeerStatistic with RTT info and potential new port\n final Pair<PeerStatistic,Boolean> old = updateExistingVerifiedPeerAddress(\n peerMapVerified.get(classMember), remotePeer, firstHand, roundTripTime);\n if (old != null && old.element1()) {\n // we update the peer, so we can exit here and report that we have\n // updated it.\n notifyUpdate(remotePeer, old.element0());\n LOG.debug(\"Update peer information\");\n return true;\n } else if (old != null && !old.element1()) {\n \tLOG.debug(\"Unreliable information, don't update\");\n \t//don't update, as we have second hand information that is not reliabel, we already have it, don't update\n \treturn false;\n }\n else {\n if (firstHand || (secondHand && !peerVerification)) {\n final Map<Number160, PeerStatistic> map = peerMapVerified.get(classMember);\n boolean inserted = false;\n synchronized (map) {\n // check again, now we are synchronized\n if (map.containsKey(remotePeer.peerId())) {\n return peerFound(remotePeer, referrer, peerConnection, roundTripTime);\n }\n if (map.size() < bagSizesVerified[classMember]) {\n final PeerStatistic peerStatistic = new PeerStatistic(remotePeer);\n peerStatistic.successfullyChecked();\n peerStatistic.addRTT(roundTripTime);\n map.put(remotePeer.peerId(), peerStatistic);\n inserted = true;\n }\n }\n\n if (inserted) {\n // if we inserted into the verified map, remove it from the non-verified map\n final Map<Number160, PeerStatistic> mapOverflow = peerMapOverflow.get(classMember);\n synchronized (mapOverflow) {\n mapOverflow.remove(remotePeer.peerId());\n }\n notifyInsert(remotePeer, true);\n LOG.debug(\"Peer inserted\");\n return true;\n }\n }\n }\n LOG.debug(\"Not rejected or inserted, add to overflow map\");\n // if we are here, we did not have this peer, but our verified map was full\n // check if we have it stored in the non verified map.\n final Map<Number160, PeerStatistic> mapOverflow = peerMapOverflow.get(classMember);\n synchronized (mapOverflow) {\n PeerStatistic peerStatistic = mapOverflow.get(remotePeer.peerId());\n if (peerStatistic == null) {\n peerStatistic = new PeerStatistic(remotePeer);\n }\n if (firstHand) {\n peerStatistic.successfullyChecked();\n peerStatistic.addRTT(roundTripTime);\n }\n if (thirdHand && roundTripTime != null) {\n peerStatistic.addRTT(roundTripTime.setEstimated());\n }\n mapOverflow.put(remotePeer.peerId(), peerStatistic);\n }\n\n notifyInsert(remotePeer, false);\n return true;\n }", "public void joinChannel() {\n String userId = AuthenticationSingleton.getAdaptedInstance().getUid();\n String token1 = generateToken(userId);\n mRtcEngine.setAudioProfile(Constants.AUDIO_SCENARIO_SHOWROOM, Constants.AUDIO_SCENARIO_GAME_STREAMING);\n int joinStatus = mRtcEngine.joinChannelWithUserAccount(token1, appointment.getId(), userId);\n if (joinStatus == SUCCESS_CODE) {\n appointment.addInCallUser(new DatabaseUser(userId));\n }\n }", "public Id addNodeRint(Coordinate coordIn){//adds a node to the list, returns ID instead of node\n\t\tint i;\n\t\tfloat inx = coordIn.getX();\n\t\tfloat iny = coordIn.getY();\n\t\tfloat inz = coordIn.getZ();\n\t\tNode n = null;\n\t\tfor(i = 0; i < listOfNodes.size(); i++){\n\t\t\tn = listOfNodes.get(i);\n\t\t\tif(n==null) continue;\n\t\t\tfloat ox = n.getCoordinate().getX();\n\t\t\tfloat oy = n.getCoordinate().getY();\n\t\t\tfloat oz = n.getCoordinate().getZ();\n\t\t\tif(inx <= ox + 0.01f && inx >= ox - 0.01f && iny <= oy + 0.01f && iny >= oy - 0.01f && inz <= oz + 0.01f && inz >= oz - 0.01f)break;\n\t\t}\n\t\tif(i < listOfNodes.size()){ // found duplicate\n\t\t\treturn n.getId();\n\t\t}\n\t\tnode_count++;\n\t\tfor(; node_arrayfirstopen < node_arraysize && listOfNodes.get(node_arrayfirstopen) != null; node_arrayfirstopen++);\n\t\tif(node_arrayfirstopen >= node_arraysize){\t//resize\n\t\t\tnode_arraysize = node_arrayfirstopen+1;\n\t\t\tlistOfNodes.ensureCapacity(node_arraysize);\n\t\t\tlistOfNodes.setSize(node_arraysize);\n\t\t}\n\t\tId nid = new Id(node_arrayfirstopen, node_count);\n\t\tn = new Node(coordIn, nid);\n\t\tlistOfNodes.set(node_arrayfirstopen, n);\n\t\tupdateAABBGrow(n.getCoordinate());\n\t\t\n\t\tif(node_arraylasttaken < node_arrayfirstopen) node_arraylasttaken = node_arrayfirstopen; //todo redo\n\t\treturn nid;\n\t}", "protected boolean tryToConnectNode(IWeightedGraph<GraphNode, WeightedEdge> graph, GraphNode node,\r\n\t\t\tQueue<GraphNode> nodesToWorkOn) {\r\n\t\tboolean connected = false;\r\n\r\n\t\tfor (GraphNode otherNodeInGraph : graph.getVertices()) {\r\n\t\t\t// End nodes can not have a edge towards another node and the target\r\n\t\t\t// node must not be itself. Also there must not already be an edge\r\n\t\t\t// in the graph.\r\n\t\t\t// && !graph.containsEdge(node, nodeInGraph) has to be added\r\n\t\t\t// or loops occur which lead to a crash. This leads to the case\r\n\t\t\t// where no\r\n\t\t\t// alternative routes are being stored inside the pathsToThisNode\r\n\t\t\t// list. This is because of the use of a Queue, which loses the\r\n\t\t\t// memory of which nodes were already connected.\r\n\t\t\tif (!node.equals(otherNodeInGraph) && !this.startNode.equals(otherNodeInGraph)\r\n\t\t\t\t\t&& !graph.containsEdge(node, otherNodeInGraph)) {\r\n\r\n\t\t\t\t// Every saved path to this node is checked if any of these\r\n\t\t\t\t// produce a suitable effect set regarding the preconditions of\r\n\t\t\t\t// the current node.\r\n\t\t\t\tfor (WeightedPath<GraphNode, WeightedEdge> pathToListNode : node.pathsToThisNode) {\r\n\t\t\t\t\tif (areAllPreconditionsMet(otherNodeInGraph.preconditions, node.getEffectState(pathToListNode))) {\r\n\t\t\t\t\t\tconnected = true;\r\n\r\n\t\t\t\t\t\taddEgdeWithWeigth(graph, node, otherNodeInGraph, new WeightedEdge(),\r\n\t\t\t\t\t\t\t\tnode.action.generateCost(this.goapUnit));\r\n\r\n\t\t\t\t\t\totherNodeInGraph.addGraphPath(pathToListNode,\r\n\t\t\t\t\t\t\t\taddNodeToGraphPath(graph, pathToListNode, otherNodeInGraph));\r\n\r\n\t\t\t\t\t\tnodesToWorkOn.add(otherNodeInGraph);\r\n\r\n\t\t\t\t\t\t// break; // TODO: Possible Change: If enabled then only\r\n\t\t\t\t\t\t// one Path from the currently checked node is\r\n\t\t\t\t\t\t// transferred to another node. All other possible Paths\r\n\t\t\t\t\t\t// will not be considered and not checked.\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn connected;\r\n\t}", "public void testChannelHopping() throws RemoteException {\n List<Channel> channelList = mBinder.getChannelList();\n for(Channel channel : channelList) {\n mBinder.joinChannel(channel.getId());\n }\n try {\n Thread.sleep(TEST_OBSERVATION_DELAY);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "boolean connectedToPower(GamePiece power) {\n if (this.powerStation) {\n return true;\n }\n else {\n GraphUtils u = new GraphUtils();\n HashMap<GamePiece, GamePiece> connections = u.bfs(power);\n return connections.containsKey(this);\n }\n }", "private void phaseOne(){\r\n\r\n\t\twhile (allNodes.size() < endSize){\r\n\r\n\t\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t\t//Pick a random node from allNodes\r\n\t\t\t\tint idx = random.nextInt(allNodes.size());\r\n\t\t\t\tNode node = allNodes.get(idx);\r\n\r\n\t\t\t\t//Get all relationships of node\t\t\t\t\r\n\t\t\t\tIterable<Relationship> ite = node.getRelationships(Direction.BOTH);\r\n\t\t\t\tList<Relationship> tempRels = new ArrayList<Relationship>();\r\n\r\n\t\t\t\t//Pick one of the relationships uniformly at random.\r\n\t\t\t\tfor (Relationship rel : ite){\r\n\t\t\t\t\ttempRels.add(rel);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tidx = random.nextInt(tempRels.size());\r\n\t\t\t\tRelationship rel = tempRels.get(idx);\r\n\t\t\t\tNode neighbour = rel.getOtherNode(node);\r\n\r\n\t\t\t\t//Add the neighbour to allNodes\r\n\t\t\t\tif (!allNodes.contains(neighbour)){\r\n\t\t\t\t\tallNodes.add(neighbour);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.success();\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\t//If reached here, then phase one completed successfully.\r\n\t\treturn;\r\n\t}", "void onJoin(String joinedNick);", "public boolean add(Node n) {\n\t\t\n\t\t//Validate n is not null\n\t\tif (n == null) { \n\t\t\tSystem.out.println(\"Enter a valid node\");\n\t\t\treturn false; \n\t\t} \n\t\t\n\t\t//If the node is present in the network return\n\t\tif (nodes.contains(n)) {\n\t\t\tSystem.out.println(\"Node name already exists\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t//Add the node to the network, with a new array for its neighbors\n\t\tnodes.add(n);\n\t\t\n\t\t//Successfully added\n\t\treturn true;\n\t}", "private void join (Block b) {\n\t\tArrayList<Block> neighbors = getAdj(b); // All of the neighbors.\n\t\tfor (Block neighbor: neighbors) { // Iterates through all of the neighbors.\n\t\t\tif (neighbor.t == ' ') { // Important, checks if the neighbor is a wall or not.\n\t\t\t\tfor (Block member: neighbor.tree) {\n\t\t\t\t\tb.tree.add(member);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (Block member : b.tree) { // Iterates through all of the members of the tree.\n\t\t\tif (member.t == ' ') member.tree = b.tree; // Sets the trees of the members to the shared tree. \n\t\t}\n\t\tb.t = ' ';\n\t}", "@Override\n\t\tpublic Relationship createRelationshipTo(Node otherNode, RelationshipType type) {\n\t\t\treturn null;\n\t\t}", "NodeConnection createNodeConnection();", "public static void createNode(int id, Field field,\r\n\t\t\tRadioInfo.RadioInfoShared radioInfoShared, Mapper protMap,\r\n\t\t\tPacketLoss plIn, PacketLoss plOut, NodeInfo info,\r\n\t\t\tATaGProgram atagPrg) throws NoSuchMethodException {\r\n\r\n\t\t// Create entities\r\n\t\tRadioNoise radio = new RadioNoiseIndep(id, radioInfoShared);\r\n\t\tMacDumb mac = new MacDumb(new MacAddress(id), radio.getRadioInfo());\r\n\t\tNetAddress netAddr = NetAddress.LOCAL;\r\n\t\tNetIp net = new NetIp(netAddr, protMap, plIn, plOut);\r\n\t\tTransUdp udp = new TransUdp();\r\n\r\n\t\t// hookup entities\r\n\t\tLocation location = new Location.Location2D(\r\n\t\t\t\tinfo.getMyLocation().getX(), info.getMyLocation().getY());\r\n\t\tfield.addRadio(radio.getRadioInfo(), radio.getProxy(), location);\r\n\t\tfield.startMobility(radio.getRadioInfo().getUnique().getID());\r\n\r\n\t\t// radio hookup\r\n\t\tradio.setFieldEntity(field.getProxy());\r\n\t\tradio.setMacEntity(mac.getProxy());\r\n\r\n\t\t// mac hookup\r\n\t\tmac.setRadioEntity(radio.getProxy());\r\n\t\tbyte intId = net.addInterface(mac.getProxy());\r\n\t\tmac.setNetEntity(net.getProxy(), intId);\r\n\r\n\t\t// net hookup\r\n\t\tnet.setProtocolHandler(Constants.NET_PROTOCOL_UDP, udp.getProxy());\r\n\r\n\t\t// trans hookup\r\n\t\tudp.setNetEntity(net.getProxy());\r\n\r\n\t\tSimulationReferences.setNodeInfo(id, info);\r\n\r\n\t\tDatagramObjectIO objectIO = new DatagramObjectIO(\r\n\t\t\t\tLogicalNeighborhood.PORT, LogicalNeighborhood.BUFFER_SIZE,\r\n\t\t\t\tLogicalNeighborhood.RECEIVE_TIMEOUT);\r\n\t\tSimulationReferences.setObjectIO(id, objectIO);\r\n\t\tAppJava runObjectIO = new AppJava(DatagramObjectIO.class);\r\n\t\trunObjectIO.setUdpEntity(udp.getProxy());\r\n\t\trunObjectIO.getProxy().run(new String[] { String.valueOf(id) });\r\n\t\tJistAPI.sleep(1);\r\n\r\n\t\tLogicalNeighborhood ln = new LogicalNeighborhood(info, objectIO);\r\n\t\tSimulationReferences.setLN(id, ln);\r\n\t\tAppJava runLNTick = new AppJava(LogicalNeighborhood.class);\r\n\t\trunLNTick.setUdpEntity(udp.getProxy());\r\n\t\trunLNTick.getProxy().run(\r\n\t\t\t\tnew String[] { \"tickStart\", String.valueOf(id) });\r\n\t\tJistAPI.sleep(1);\r\n\t\tAppJava runLNQueue = new AppJava(LogicalNeighborhood.class);\r\n\t\trunLNQueue.setUdpEntity(udp.getProxy());\r\n\t\trunLNQueue.getProxy().run(\r\n\t\t\t\tnew String[] { \"queueStart\", String.valueOf(id) });\r\n\t\tJistAPI.sleep(1);\r\n\r\n\t\t// TODO: Need pre-built ATaG manager!!!\r\n\t\tAtagManager atagManager = new PreBuiltAtagManager();\r\n\t\tatagManager.setAtagProgram(atagPrg);\r\n\t\tatagManager.setNodeInfo(info);\r\n\t\tatagManager.setDataPool(new DataPool(ln, info, atagManager));\r\n\t\tatagManager.setUp();\r\n\t\tSimulationReferences.setAtagManager(id, atagManager);\r\n\r\n\t\tAppJava runAtagManager = new AppJava(AtagManager.class);\r\n\t\trunAtagManager.setUdpEntity(udp.getProxy());\r\n\t\tfor (int i = 0; i < atagPrg.numTasks(); i++) {\r\n\t\t\tJistAPI.sleep(1);\r\n\t\t\trunAtagManager.getProxy().run(\r\n\t\t\t\t\tnew String[] { String.valueOf(id), String.valueOf(i) });\r\n\t\t}\r\n\t}", "@Override\n\tpublic boolean addNode(N node)\n\t{\n\t\tif (node == null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (nodeEdgeMap.containsKey(node))\n\t\t{\n\t\t\t// Node already in this Graph\n\t\t\treturn false;\n\t\t}\n\t\tnodeList.add(node);\n\t\tnodeEdgeMap.put(node, new HashSet<ET>());\n\t\tgcs.fireGraphNodeChangeEvent(node, NodeChangeEvent.NODE_ADDED);\n\t\treturn true;\n\t}", "public void connect(String key){\n\t\tif(peers.containsKey(key) || establishing.contains(key)) return;\n\t\t\n\t\testablishing.add(key);\n\t\tPeerNode newPeer = PeerNode.createPeer(key);\n\t\tif(newPeer == null){\n\t\t\tConsole.message(\"A conexao com o par \" + key + \" nao pode ser estabelecida.\");\n\t\t}else{\n\t\t\t// connected successfully\n\t\t\tpeers.put(newPeer.getKey(), newPeer);\n\t\t\tnew Thread(newPeer).start();\n\t\t\tConsole.logEvent(\"CONNECTED\", key);\n\t\t\tgetMainWindow().updateList();\n\t\t}\n\t\testablishing.remove(key);\n\t}", "void join(User user);", "public void join(Player player) {\n\t\tGamePlayer gamePlayer = new GamePlayer(player);\n\t\tthis.gamePlayers.add(gamePlayer);\n\n\t\tif (getEmptyPad() != null) ß{\n\t\t\tPad pad = getEmptyPad();\n\t\t\tgamePlayer.setPad(pad);\n\t\t\tpad.setFree(false);\n\t\t\tLocation loc = pad.getLocation();\n\n\t\t\tplayer.teleport(new Location(loc.getWorld(), loc.getX(), loc.getY(), loc.getZ()));\n\t\t\tsetupPlayerInventory(player);\n\t\t\tplayer.sendMessage(\"You have joined the game\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Not enough room for \" + player.getName() + \" to join. Kicking...\");\n\t\t\tplayer.kickPlayer(\"Game Full\");\n\t\t}\n\t}", "private boolean createPeer() {\n\t\tIH2HSerialize serializer = new FSTSerializer(false, new SCSecurityClassProvider());\n\t\th2hNode = H2HNode.createNode(FileConfiguration.createDefault(), new SpongyCastleEncryption(serializer), serializer);\n\t\tif (h2hNode.connect(networkConfig)) {\n\t\t\tLOG.debug(\"H2HNode successfully created.\");\n\n\t\t\tFutureBootstrap bootstrap = h2hNode.getPeer().peer().bootstrap().inetAddress(networkConfig.getBootstrapAddress()).ports(networkConfig.getBootstrapPort()).start();\n\t\t\tbootstrap.awaitUninterruptibly();\n\t\t\tboostrapAddresses = bootstrap.bootstrapTo();\n\t\t\treturn true;\n\t\t} else {\n\t\t\tLOG.error(\"H2HNode cannot connect.\");\n\t\t\treturn false;\n\t\t}\n\n\n\t}", "public Node appendNode(Node node);", "CommunicationLink getNodeByName(String name)\n {\n return getNodeById(Objects.hash(name));\n }", "@Override\n\tpublic void establishNeighborConn() throws Exception {\n\t\tList <Thread> tList = new ArrayList<Thread>();\n\t\tList<Integer> neighborPids = neighborMap.get(pid);\n\t\tnNeighbors = neighborPids.size();\n\t\tfor (int neighborPid : neighborPids) {\n\t\t\tThread t = new Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString neighborHostname = pidToHostnameMap.get(neighborPid);\n\t\t\t\t\t\tConnection neighborConn = new ServerConnection();\n\t\t\t\t\t\tint port = 10000 + (100*pid) + neighborPid;\n\t\t\t\t\t\tneighborConn.connectRetry(coordinatorHostname, port);\n\t\t\t\t\t\tneighborPidToHostnameMap.put(neighborPid, neighborHostname);\n\t\t\t\t\t\tneighborPidToConnMap.put(neighborPid, neighborConn);\n\t\t\t\t\t\tsendQueues.put(neighborPid, new LinkedList<String>());\n\t\t\t\t\t\tsayHelloToNeighbor(neighborConn);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\ttList.add(t);\n\t\t\tt.start();\n\t\t}\n\t\tfor (Thread t : tList) {\n\t\t\tt.join();\n\t\t}\n\t\tSystem.out.println(neighborPidToHostnameMap);\n\t\tSystem.out.println(neighborPidToConnMap);\n\t}", "public void testDisconnectAndReconnect() throws Exception {\n a=createNode(LON, \"A\", LON_CLUSTER, null);\n x=createNode(SFO, \"X\", SFO_CLUSTER, null);\n\n System.out.println(\"Started A and X; waiting for bridge view of 2 on A and X\");\n waitForBridgeView(2, 20000, 500, a, x);\n\n System.out.println(\"Disconnecting X; waiting for a bridge view on 1 on A\");\n x.disconnect();\n waitForBridgeView(1, 20000, 500, a);\n\n System.out.println(\"Reconnecting X again; waiting for a bridge view of 2 on A and X\");\n x.connect(SFO_CLUSTER);\n waitForBridgeView(2, 20000, 500, a, x);\n }", "private boolean canJoin() {\n\t\tdouble distanceBetween=0;\n\t\tif (join==null)\n\t\t\treturn true;\n\t\tif (join.cars.get(join.cars.size()-1).getTrain()!=join)\n\t\t\treturn true;\n\t\t//Check if the train to be joined still exists (it could have crashed or reached its destination/dead-end).\n\t\tif(!this.getHead().getObserver().get(0).containsTrain(join))\n\t\t\treturn true;\n\t\t/*Compute the needed space (diameter of the circumscribing circle) between two vehicles to be sure that a train can cross an other train \n\t\t * without crashing.*/\n\t\tdouble distance=Math.sqrt(Math.pow(this.cars.get(0).getImage().getWidth(),2)+Math.pow(this.cars.get(0).getImage().getHeight(),2));\n\t\tif(this.getHead().getIntermediate()==join.getTail().getIntermediate())\n\t\t{\n\t\t\t//If both trains have the same intermediate, test if the minimum distance is respected.\n\t\t\tdistanceBetween = Math.sqrt(Math.pow(this.getHead().xpoints[0]-join.getTail().xpoints[0],2)+Math.pow(this.getHead().ypoints[0]-join.getTail().ypoints[0],2));//-distance;\n\t\t\tfor(int i = 0; i < 4; ++i)\n\t\t\t\tfor(int j = 0; j < 4; ++j)\n\t\t\t\t\t{\n\t\t\t\t\t\tdistanceBetween = Math.min(distanceBetween, Math.sqrt(Math.pow(this.getHead().xpoints[j]-join.getTail().xpoints[i],2)+Math.pow(this.getHead().ypoints[j]-join.getTail().ypoints[i],2)));//-distance;\n\t\t\t\t\t}\n\t\t\tif(distanceBetween>distance)\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}\n\t\tif (this.getHead().getObserver().get(0).newIntermediate(this.getHead().getIntermediate(), this.getHead().getDestination())==join.getTail().getIntermediate())\n\t\t{\n\t\t\t/*If both trains do not have the same intermediate: compute the distance from the current train's head to the next intersection and add it\n\t\t\t * to the distance from the next intersection to the tail of the train to be joined*/\n\t\t\tdistanceBetween=Math.sqrt(Math.pow((this.getHead().xpoints[0]+(this.getHead().xpoints[1]-this.getHead().xpoints[0])/2.f)-join.getTail().getTraversedIntersection().x,2)+\n\t\t\t\t\tMath.pow((this.getHead().ypoints[0]+(this.getHead().ypoints[1]-this.getHead().ypoints[0])/2.f)-join.getTail().getTraversedIntersection().y,2));\n\t\t\tdistanceBetween+=Math.sqrt(Math.pow((join.getTail().ypoints[3]+(join.getTail().ypoints[2]-join.getTail().ypoints[3])/2.f)-join.getTail().getTraversedIntersection().y,2)+\n\t\t\t\t\tMath.pow((join.getTail().xpoints[3]+(join.getTail().xpoints[2]-join.getTail().xpoints[3])/2.f)-join.getTail().getTraversedIntersection().x, 2));\n\t\t\tif (distanceBetween>distance)\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public void joinChannel(String chName) {\n\t\tstdGroup.fireEventStatus(new StatusEvent(this,\"Joining channel \"+ chName + \"..wait...\"));\n\t\tmkChannel(chName, \"\",userName , emailAddress);\n\t}", "public void connectClusters()\n\t{\n//\t\tfor(int i = 0; i<edges.size();i++)\n//\t\t{\n//\t\t\tEdgeElement edge = edges.get(i);\n//\t\t\tString fromNodeID = edge.fromNodeID;\n//\t\t\tNodeElement fromNode = findSubNode(fromNodeID);\n//\t\t\tString toNodeID = edge.toNodeID;\n//\t\t\tNodeElement toNode = findSubNode(toNodeID); \n//\t\t\t\n//\t\t\tif(fromNode != null && toNode != null)\n//\t\t\t{\n//\t\t\t\tPortInfo oport = new PortInfo(edge, fromNode);\n//\t\t\t\tfromNode.addOutgoingPort(oport);\n//\t\t\t\tedge.addIncomingPort(oport);\n//\t\t\t\tPortInfo iport = new PortInfo(edge, toNode);\n//\t\t\t\ttoNode.addIncomingPort(iport);\n//\t\t\t\tedge.addOutgoingPort(iport);\n//\t\t\t}\n//\t\t}\n\t}", "public String join(NodeMeta meta)\n throws IOException, KeeperException, InterruptedException {\n return zk.create(thisPrefix + \"/\" + GROUP,\n serializer.serialize(meta), DEFAULT_ACL, CreateMode.PERSISTENT_SEQUENTIAL);\n }", "void connected(InetAddress address, boolean isMine);", "private boolean initiateConnections(RegistrySendsNodeManifest event)\n\t\t\tthrows UnknownHostException, IOException {\n\t\t// close all getConnections() from previous overlay.\n\t\tfor (Map.Entry<Integer, TCPConnection> entry : this.nodesToSendTo.getConnections()\n\t\t\t\t.entrySet()) {\n\t\t\tTCPConnection connector = entry.getValue();\n\t\t\tconnector.closeSocket();\n\t\t}\n\t\t//Create sockets to peers\n\t\tallNodes = event.getAllNodes();\n\t\tint numConnectionsToMake = event.getRoutingTableSize();\n\t\tnodesToSendTo = new TCPConnectionsCache();\n\t\tfor (int i = 0; i < numConnectionsToMake; i++) {\n\t\t\tString ipAdd = \"\";\n\t\t\tfor (int j = 0; j < event.getIPLen(i); j++) {\n\t\t\t\tint ipPortion = event.getHopIP(i)[j] & 0xFF;\n\t\t\t\tipAdd += ipPortion;\n\t\t\t\tif (j < event.getIPLen(i) - 1)\n\t\t\t\t\tipAdd += \".\";\n\t\t\t}\n\t\t\tSocket hopSocket = new Socket(ipAdd, event.getHopPort(i));\n\t\t\tTCPConnection hop = new TCPConnection(hopSocket, this);\n\t\t\tnodesToSendTo.putConnection(hop, event.getHopID(i));\n\t\t}\n\t\t//Ensure each socket connection was successful\n\t\tboolean connectionsAllGood = true;\n\t\tfor (Map.Entry<Integer, TCPConnection> entry : nodesToSendTo.getConnections()\n\t\t\t\t.entrySet()) {\n\t\t\tTCPConnection value = entry.getValue();\n\t\t\tif (!value.checkSocketStatus())\n\t\t\t\treturn false;\n\t\t}\n\t\treturn connectionsAllGood;\n\t}", "void addFlight(Node toNode);", "private void join(String address)\n\t{\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tif (stdGroup.groupExist() == null)\n\t\t\t\t{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tstdGroup.createPeerGroup(WatchDog.PIPEIDSTR);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\tlog.severe(\"I cannot create standard chat group! Bye...\");\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (StdChatException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tstdGroup.join(address);\n\t\t\t} catch (StdChatException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t} catch (PeerGroupException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"I cannot create standard chat group! Bye...\");\n\t\t\tSystem.exit(0);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "@Override\n\tvoid createNeighbourhood() {\n\t\t\n\t}", "public void addNode(int key)\n{\n Node n1 = new Node(key);\n\t\n\tif(!getNodes().containsKey(n1.getKey())) \n\t{\n\tmc++;\n\tthis.getNodes().put(n1.getKey(),n1);\n\t\t\n\t}\n\telse {\n\t\treturn;\n\t\t//System.out.println(\"Node already in the graph\");\n\t}\n}", "@Override\n\tpublic void joinLobby(int playerID, int sessionID){\n\t\tif(sessionID == NO_LOBBY_ID)\n\t\t\treturn;\n\t\t//check if the player is already in an other lobby\n\t\tint playerSession = getSessionFromClient(playerID);\n\n\t\tif(playerSession == NO_LOBBY_ID){\n\t\t\tlobbyMap.get(sessionID).addPlayer(getPlayerMap().get(playerID));\n\t\t\tDebugOutputHandler.printDebug(\"Player \"+getPlayerMap().get(playerID).getName()+\" now is in lobby \" + getPlayerMap().get(playerID).getSessionID());\n\t\t}\n\t}", "public boolean addConnection(GraphNode nodeA, GraphNode nodeB){\n nodeA.addAdjacent(nodeB);\n nodeB.addAdjacent(nodeA);\n if(nodeA.getAdjacent().contains(nodeB) && nodeB.getAdjacent().contains(nodeA))\n return true;\n else\n return false;\n }", "public Relationship createRelationshipTo( Node otherNode, \n \t\tRelationshipType type );", "public interface IChord extends IDHT {\n\n\t/** API OF A CHORD NODE */\n\tpublic final static int GETPRED = 0;\n\tpublic final static int FINDSUCC = 1;\n\tpublic final static int NOTIF = 2;\n\tpublic final static int JOIN = 3;\n\tpublic final static int PUT = 4;\n\tpublic final static int GET = 5;\n\tpublic final static int SETSUCC = 6;\n\tpublic final static int SETPRED = 7;\n\n\t/**\n\t * Find the node responsible for the id\n\t * \n\t * @param id\n\t */\n\tpublic Node findSuccessor(int id);\n\n\t/**\n\t * Find the closest Preceding Node of the id in the figer table\n\t * \n\t * @param id\n\t */\n\tpublic Node closestPrecedingNode(int id);\n\n\t/**\n\t * Join an other chord\n\t * \n\t * @param chord\n\t * , An entry of the network to join\n\t */\n\tpublic void join(Node chord);\n\n\t/**\n\t * Call the stabilization algorithm\n\t */\n\tpublic void stabilize();\n\n\t/**\n\t * Notify a node to update the predecessor\n\t * \n\t * @param node\n\t */\n\tpublic void notify(Node node);\n\n\t/**\n\t * Join a chord with an entry represented by his the host address and port\n\t * number\n\t * \n\t * @param host\n\t * @param port\n\t */\n\tpublic void join(String host, int port);\n\n\t/**\n\t * \"Fairplay\" kill of the node\n\t */\n\tpublic void kill();\n\n\t/**\n\t * @return a instance of the node\n\t */\n\tpublic Node getThisNode();\n\n\t/**\n\t * @return the predecessor of the node\n\t */\n\tpublic Node getPredecessor();\n}", "public Boolean connect(Integer srcBlockID, Integer dstBlockID){\n //Con new_con = new Con();\n //new_con.src = srcBlockID;\n //new_con.dst = dstBlockID;\n //this.connections.addLast(new_con);\n // check cycles after every new connection\n if (this.checkCycles() == false) {\n //this.connections.removeLast();\n getBlockByID(srcBlockID).getConnections().remove(dstBlockID);// remove information about connection from source port\n return false;\n }\n return true;\n }", "private void addRelationship(String node1, String node2, String relation)\n {\n try (Session session = driver.session())\n {\n // Wrapping Cypher in an explicit transaction provides atomicity\n // and makes handling errors much easier.\n try (Transaction tx = session.beginTransaction())\n {\n tx.run(\"MATCH (j:Node {value: {x}})\\n\" +\n \"MATCH (k:Node {value: {y}})\\n\" +\n \"MERGE (j)-[r:\" + relation + \"]->(k)\", parameters(\"x\", node1, \"y\", node2));\n tx.success(); // Mark this write as successful.\n }\n }\n }", "public boolean build(Edge edge) {\n \t\tif (edge == null || !canBuild(edge))\n \t\t\treturn false;\n \n \t\t// check resources\n \t\tboolean free = board.isSetupPhase() || board.isProgressPhase();\n \t\tif (!free && !affordRoad())\n \t\t\treturn false;\n \n \t\tif (!edge.build(this))\n \t\t\treturn false;\n \n \t\tif (!free) {\n \t\t\tuseResources(Type.BRICK, 1);\n \t\t\tuseResources(Type.LUMBER, 1);\n \t\t}\n \n \t\tappendAction(R.string.player_road);\n \n \t\tboolean hadLongest = (board.getLongestRoadOwner() == this);\n \t\tboard.checkLongestRoad();\n \n \t\tif (!hadLongest && board.getLongestRoadOwner() == this)\n \t\t\tappendAction(R.string.player_longest_road);\n \n \t\troads.add(edge);\n \n \t\tVertex vertex = edge.getVertex1();\n \t\tif (!reaching.contains(vertex))\n \t\t\treaching.add(vertex);\n \n \t\tvertex = edge.getVertex2();\n \t\tif (!reaching.contains(vertex))\n \t\t\treaching.add(vertex);\n \n \t\treturn true;\n \t}", "public void testAddRelay2ToAnAlreadyConnectedChannel() throws Exception {\n // Create and connect a channel.\n a=new JChannel();\n a.connect(SFO_CLUSTER);\n System.out.println(\"Channel \" + a.getName() + \" is connected. View: \" + a.getView());\n\n // Add RELAY2 protocol to the already connected channel.\n RELAY2 relayToInject = createRELAY2(SFO);\n // Util.setField(Util.getField(relayToInject.getClass(), \"local_addr\"), relayToInject, a.getAddress());\n\n a.getProtocolStack().insertProtocolAtTop(relayToInject);\n for(Protocol p=relayToInject; p != null; p=p.getDownProtocol())\n p.setAddress(a.getAddress());\n relayToInject.setProtocolStack(a.getProtocolStack());\n relayToInject.configure();\n relayToInject.handleView(a.getView());\n\n // Check for RELAY2 presence\n RELAY2 ar=a.getProtocolStack().findProtocol(RELAY2.class);\n assert ar != null;\n\n waitUntilRoute(SFO, true, 10000, 500, a);\n\n assert !ar.printRoutes().equals(\"n/a (not site master)\") : \"This member should be site master\";\n\n Route route=getRoute(a, SFO);\n System.out.println(\"Route at sfo to sfo: \" + route);\n assert route != null;\n }", "void tryToFindNextKing()\n {\n if (nodeIds.size() != 0)\n {\n int nextKingId = Collections.max(nodeIds);\n CommunicationLink nextKing = allNodes.get(nextKingId);\n nextKing.sendMessage(new Message(\n Integer.toString(nextKingId), nextKing.getInfo(), myInfo, KING_IS_DEAD));\n }\n }", "private GraphConnection CreateConnection(String source, String destination) {\n\t\tif (nodes.size() == 0) {\r\n\t\t\tthrow new IllegalStateException(\"Nodes needed\");\r\n\t\t}\r\n\r\n\t\telse {\r\n\t\t\tGraphNode src = null;\r\n\t\t\tGraphNode dest = null;\r\n\t\t\tfor (GraphNode node : nodes) {\r\n\t\t\t\tif (node.getText().equals(source)) {\r\n\t\t\t\t\tsrc = node;\r\n\t\t\t\t} else if (node.getText().equals(destination)) {\r\n\t\t\t\t\tdest = node;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (src == null || dest == null) {\r\n\t\t\t\tthrow new IllegalStateException(\r\n\t\t\t\t\t\t\"At least one of the nodes doesn't exist\");\r\n\t\t\t} else {\r\n\t\t\t\treturn new GraphConnection(graph, SWT.None, src, dest);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Block createPath(Block currentBlock){\n\n\t\tint indexOfNeighbouringBlock = (int) (Math.random()*RoomGen.neighbouringBlocks.get(currentBlock).size());\n\t\tint size = RoomGen.neighbouringBlocks.get(currentBlock).size();\n\t\t\n\t\tif(!path.contains(currentBlock)){\n\t\t\tpath.add(currentBlock);\n\t\t}\n\t\t\n\t\t//set the next index to make sure that elements of path are distinct\n\t\tSystem.out.println(\"size of neighbours: \" + RoomGen.neighbouringBlocks.get(currentBlock).size());\n\t\tif(path.contains(RoomGen.neighbouringBlocks.get(currentBlock).get(indexOfNeighbouringBlock))){\n\t\t\tif(indexOfNeighbouringBlock != 0 || indexOfNeighbouringBlock == RoomGen.neighbouringBlocks.get(currentBlock).size() - 1){\n\t\t\t\tindexOfNeighbouringBlock = indexOfNeighbouringBlock-1;\n\t\t\t}else{\n\t\t\t\tindexOfNeighbouringBlock = indexOfNeighbouringBlock+1;\n\t\t\t}\n\t\t}else{\t\t\n\t\t}\n\t\tBlock next = new Block(0,0,0,0);\n\t\t\n\t\t//Initialise next block\n\t\tif(unfinishedDoors.contains(RoomGen.neighbouringBlocks.get(currentBlock).get(indexOfNeighbouringBlock))){\n\t\t\tnext = RoomGen.neighbouringBlocks.get(currentBlock).get(indexOfNeighbouringBlock);\n\t\t}else{\n\t\t\tfor(int i = 0; i<RoomGen.neighbouringBlocks.get(currentBlock).size(); i++){\n\t\t\t\tif(unfinishedDoors.contains(RoomGen.neighbouringBlocks.get(currentBlock).get(i))){\n\t\t\t\t\tnext = RoomGen.neighbouringBlocks.get(currentBlock).get(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(i==RoomGen.neighbouringBlocks.get(currentBlock).size()-1){\n\t\t\t\t\treturn currentBlock;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\taddDoor(currentBlock, next);\n\t\t\n\t\tcurrentBlock.addDoor();\n\t\tnext.addDoor();\n\t\t\n\t\t//if current block reaches full door potential when adding door to next,\n\t\t//add it to the list of finished blocks and remove it from the list of unfinished ones\n\t\tif(currentBlock.getPotentialDoorNum() == currentBlock.getCurrentDoorNum()){\n\t\t\tfinishedDoors.add(currentBlock);\n\t\t\tfor(int i = 0; i< unfinishedDoors.size(); i++){\n\t\t\t\tif(unfinishedDoors.get(i).equals(currentBlock)){\n\t\t\t\t\tunfinishedDoors.remove(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//path ends if next reaches full door potential when adding door from b to next\n\t\t//next is put to finished list and removed from unfinished list\n\t\tif(next.getPotentialDoorNum() == next.getCurrentDoorNum()){\n\t\t\tfinishedDoors.add(next);\n\t\t\tpath.add(next);\n\t\t\t\n\t\t\tfor(int i = 0; i< unfinishedDoors.size(); i++){\n\t\t\t\tif(unfinishedDoors.get(i).equals(next)){\n\t\t\t\t\tunfinishedDoors.remove(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn next;\n\t\t}\n\t\t//otherwise the path continues\n\t\telse{\n\t\t\treturn createPath(next);\n\t\t}\n\t\t}", "@Ignore\n @Test\n public void startReiver() throws IOException, InterruptedException {\n\n final int maxPeers = 10;\n PeerDHT[] peers = createPeers(PORT, maxPeers, \"receiver\");\n for (int i = 1; i < maxPeers; i++) {\n \tPeerDHT peer = peers[i];\n peer.peer().bootstrap().peerAddress(peers[0].peer().peerAddress()).start().awaitUninterruptibly();\n peer.peer().objectDataReply(new ObjectDataReply() {\n @Override\n public Object reply(final PeerAddress sender, final Object request) throws Exception {\n System.out.println(\"got it!\");\n return \"recipient got it\";\n }\n });\n }\n Thread.sleep(Long.MAX_VALUE);\n }", "public void connect(int node1, int node2, double w)\n{\n\tif(getNodes().containsKey(node1) && getNodes().containsKey(node2) && (node1 != node2))\n\t{\n\t \tNode n1 = (Node)getNodes().get(node1);\n\t\t Node n2 = (Node)getNodes().get(node2);\n\t\t\n\t\tif(!n1.hasNi(node2)&&!n2.hasNi(node1))\n\t\t{\n\t\t\tEdge e=new Edge(w,node1,node2);\n\t\t\tn1.addEdge(e);\n\t\t\tn2.addEdge(e);\n\t\t\tmc++;//adding an edge\n\t\t\tedge_size++;\n\t\t}\n\t\telse\n\t\t\t// if the edge already exist in the HashMap of the two nodes\n\t\t\t//we want only update the weight of the edge.\n\t\t{\n\t\t\tn1.getEdgesOf().get(node2).set_weight(w);\n\t\t\tn2.getEdgesOf().get(node1).set_weight(w);\n\t\t}\n\t\t\n\t}\n\telse {\n\t\treturn;\n\t\t//System.out.println(\"src or dst doesnt exist OR src equals to dest\");\n\t}\n}", "private boolean addSuperNode(String sourceOrDestination, String[] sourceOrDestinationArray){\r\n boolean dsNotFound = false;\r\n Node superNode = new Node(sourceOrDestination, 0);\r\n for(int i = 0; i < sourceOrDestinationArray.length; i ++){\r\n //ds = find the node with the source/destination name\r\n Node ds = findNode(sourceOrDestinationArray[i]);\r\n //if destination and exists make edge from destination to \"superSink\"\r\n if(ds != null && sourceOrDestination.equals(\"superSink\")) {\r\n Edge newEdge = new Edge(ds, superNode, Integer.MAX_VALUE, 0);\r\n ds.addEdge(newEdge);\r\n }\r\n //if source and exists make edge from \"superSource\" to source\r\n else if(ds != null && sourceOrDestination.equals(\"superSource\")){\r\n Edge newEdge = new Edge(superNode, ds, Integer.MAX_VALUE, 0);\r\n superNode.addEdge(newEdge);\r\n }\r\n // either source or destination not found\r\n else {\r\n dsNotFound = true;\r\n }\r\n }\r\n //add new nodes at index 0;\r\n nodes.add(0, superNode);\r\n return dsNotFound;\r\n }", "public void findNode(ArrayList<NodeAddress> nodes){\r\n\t\tif ( nodes.size() == 0 )\r\n\t\t\treturn;\r\n\t\t//Add to route table\r\n\t\trouteTable.set(nodes);\r\n\t\t//Send pending messages\r\n\t}", "void nodeCreate( long id );", "public void tunnel() {\r\n\t\tboolean status = true;\r\n\t\tfor (CellStorage i : node) {\r\n\t\t\tif (i.getCell().tunnelTo != null) {\r\n\t\t\t\tCellStorage tunnelTo = null;\r\n\t\t\t\t// Searching for destinated node from the tunnel\r\n\t\t\t\tfor (int k = 0; k < node.size(); k++) {\r\n\t\t\t\t\tif (node.get(k).getCell() == i.getCell().tunnelTo) {\r\n\t\t\t\t\t\ttunnelTo = node.get(k);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ti.setTunnel(tunnelTo);\r\n\r\n\t\t\t\t// Calling validateConnection method to make sure that no duplicated connection\r\n\t\t\t\t// is made.\r\n\t\t\t\t// Create new connection if no duplicate.\r\n\r\n\t\t\t\tstatus = validateConnection(i, tunnelTo);\r\n\t\t\t\tif (status == false) {\r\n\t\t\t\t\tHashMapConnectedNodes tunnelSet = new HashMapConnectedNodes();\r\n\t\t\t\t\ttunnelSet.hmConnectedNodesObj.put(i.getIndex(), i);\r\n\t\t\t\t\ttunnelSet.hmConnectedNodesObj.put(tunnelTo.getIndex(), tunnelTo);\r\n\t\t\t\t\thshMConnectedNodes.add(tunnelSet);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void connect() throws InterruptedException, ClassNotFoundException {\n\ttry {\n\t if (verbose) {\n\t\tSystem.out.println(\" [DN] > Attempting to reach NameNode...\");\n\t }\n\t String NAMENODE_IP = this.read_NN_IP();\n\t sock = new Socket(NAMENODE_IP, UTILS.Constants.NAMENODE_PORT);\n\t oos = new ObjectOutputStream(sock.getOutputStream());\n\t Msg greeting = new Msg();\n\t greeting.set_msg_type(Constants.MESSAGE_TYPE.DATANODE_GREETING);\n\t greeting.set_return_address(my_address);\n\t this.write_to_NN(greeting);\n\t this.listen_to_NN(); \n\t} catch (UnknownHostException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } \n }", "public void sendRequest() {\r\n\t\t\r\n\t\tclient.join(this, isHost, gameCode, playerName, playerNumber);\r\n\t\t\r\n\t}", "protected void onJoin(String channel, String sender, String login, String hostname) {}", "public void addWay(City c1,City c2) throws CityNotFoundException{\r\n\t\ttry {\r\n\t\t\tmap.addEdge(c1, c2);\r\n\t\t} catch (VertexNotExistException e) {\r\n\r\n\t\t\tthrow new CityNotFoundException(\"city not founds\");\r\n\t\t}\r\n\t}", "public boolean isJoining(){\n\t\treturn join!=null;\n\t}", "private void addNode(String name)\n {\n try (Session session = driver.session())\n {\n // Wrapping Cypher in an explicit transaction provides atomicity\n // and makes handling errors much easier.\n try (Transaction tx = session.beginTransaction())\n {\n tx.run(\"MERGE (a:Node {value: {x}})\", parameters(\"x\", name));\n tx.success(); // Mark this write as successful.\n }\n }\n }", "boolean canConnect(IAgriIrrigationNode other, Direction from);", "public Node passAgent(){\n int length = liveNeighbors.size();\n Random rnd = new Random();\n boolean stat = false;\n Node node=null;\n while(!stat) {\n int len = rnd.nextInt(length);\n node = liveNeighbors.get(len);\n stat = node.recieveAgent(agent);\n }\n agent = null;\n updateScreen(\"removeBorder\");\n return node;\n }", "public boolean isJoining(Train train){\n\t\treturn join==train;\n\t}", "public void addSuccessorNode(BaseJoin node, Rete engine, WorkingMemory mem)\n\t\t\tthrows AssertException {\n if (addNode(node)) {\n\t\t\t// first, we get the memory for this node\n\t\t\tMap<?, ?> leftmem = (Map<?, ?>) mem.getBetaLeftMemory(this);\n\t\t\t// now we iterate over the entry set\n\t\t\tIterator<?> itr = leftmem.entrySet().iterator();\n\t\t\twhile (itr.hasNext()) {\n\t\t\t\tBetaMemory bmem = (BetaMemory) itr.next();\n\t\t\t\tIndex left = bmem.getIndex();\n\t\t\t\t// iterate over the matches\n Map<?, ?> rightmem = (Map<?, ?>) mem.getBetaRightMemory(this);\n\t\t\t\tIterator<?> ritr = rightmem.keySet().iterator();\n\t\t\t\twhile (ritr.hasNext()) {\n\t\t\t\t\tFact rfcts = (Fact) ritr.next();\n\t\t\t\t\t// now assert in the new join node\n\t\t\t\t\tnode.assertLeft(left.add(rfcts), engine, mem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.6079665", "0.57467383", "0.54829484", "0.5445104", "0.5330902", "0.5313666", "0.51997405", "0.51923144", "0.5158585", "0.50202376", "0.49926984", "0.49814013", "0.4971289", "0.4961212", "0.4957795", "0.49424428", "0.49307284", "0.49181998", "0.49165636", "0.4914376", "0.4911228", "0.4897826", "0.48920053", "0.48916242", "0.48666245", "0.4840547", "0.48312333", "0.4822724", "0.4821963", "0.4804803", "0.47952467", "0.47895166", "0.47814825", "0.4778404", "0.47723407", "0.4766246", "0.47576323", "0.47460315", "0.4743932", "0.47424975", "0.47152206", "0.471449", "0.47123113", "0.47073773", "0.4702754", "0.4689426", "0.46844813", "0.46842292", "0.46830615", "0.46811613", "0.46733305", "0.4670237", "0.46619582", "0.4661806", "0.46497467", "0.4643727", "0.46346384", "0.46274582", "0.4624022", "0.4622242", "0.4621338", "0.46174777", "0.46146575", "0.46135", "0.4610326", "0.46098667", "0.4603081", "0.46012127", "0.46000323", "0.45920637", "0.458284", "0.4581101", "0.4580858", "0.45491686", "0.4546311", "0.45403382", "0.45332175", "0.45324054", "0.453134", "0.45301846", "0.45200863", "0.451899", "0.45148632", "0.45126593", "0.4508417", "0.45077845", "0.45073006", "0.45003137", "0.4499922", "0.44981548", "0.4497273", "0.44958833", "0.449484", "0.44751728", "0.44713345", "0.44681478", "0.44666407", "0.44640836", "0.4463247", "0.44619423" ]
0.5257813
6
Initialize the finger table for the current node. All finger table entries will point to self if this is the only node in the Chord Ring. Else, an existing node will be contacted and will be used to initialize the fingers.
private void initializeFingerTable() { this.fingerTable = new HashMap<>(); if (this.getExistingAddress() == null) { for (int i = 0; i < 32; i++) { this.fingerTable.put(i, new Finger(this.getAddress(), this.getPort())); } } else { try { // Create a socket that will contact the existing ChordServer for the fingers Socket socket = new Socket(this.getExistingAddress(), this.getExistingPort()); System.out.println("Connection successfully established with: " + this.getExistingAddress() + " " + this.getExistingPort()); //Create writers/readers for the socket streams PrintWriter socketWriter = new PrintWriter(socket.getOutputStream(), true); BufferedReader socketReader = new BufferedReader(new InputStreamReader(socket.getInputStream())); BigInteger bigPow = BigInteger.valueOf(2L); BigInteger bigCurrentNodeId = BigInteger.valueOf(this.getId()); for (int i = 0; i < 32; i++) { // Find successor for Node ID (id + 2^i) BigInteger pow = bigPow.pow(i); BigInteger queryId = bigCurrentNodeId.add(pow); // Send the queryId to the client socketWriter.println(ChordMain.FIND_SUCCESSOR + ":" + queryId.toString()); System.out.println("Sent => " + ChordMain.FIND_SUCCESSOR + ":" + queryId.toString()); // Client response String clientResponse = socketReader.readLine(); String[] response = clientResponse.split(":"); String address = response[1]; int port = Integer.valueOf(response[2]); System.out.println("Received => " + clientResponse); // Put the finger entry into the FingerTable this.getFingerTable().put(i, new Finger(address, port)); } // Close the connections socketWriter.close(); socketReader.close(); socket.close(); } catch (IOException e) { e.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initFingers() {\n this.fingers = new ArrayList<TNode>(Constants.KEY_SPACE);\n for (int i = 0; i < Constants.KEY_SPACE; i++)\n this.fingers.add(tNode);\n }", "private void upsertFingerTable(boolean first) {\n LOGGER.fine(\"Upserting Fingertable\");\n int fingerTableSize = (int) (Math.log(IDSPACE) / Math.log(2));\n for (int i = 0; i < fingerTableSize; i++) {\n int lookupID = (id + (int) (Math.pow(2, i))) % IDSPACE;\n if (first) {\n fingerTable.add(new Finger(lookupID, null));\n } else {\n try {\n performLookup(getSuccessor(), lookupID, address, new JSONProperties(\"linear\", 0, false));\n } catch (NodeOfflineException e) {\n LOGGER.severe(\"upsertFingerTable failed. \" + getSuccessor() + \" is offline\");\n }\n }\n }\n }", "public void initialize() {\n // add direct connections to routing table\n for (Bunker neighbour : neighbours) {\n routing.put(neighbour.getId(), neighbour);\n }\n // add yourself\n routing.put(id, this);\n bunkerIdToCount.put(id, count);\n // kick off the algo\n initiate();\n }", "public void instantiateTable(){\n hashTable = new LLNodeHash[16];\n }", "private void initialise() {\n \thashFamily = new Hash[this.r];\n for(int i= 0; i < this.r;i++)\n {\n \tthis.hashFamily[i] = new Hash(this.s * 2);\n }\n this.net = new OneSparseRec[this.r][this.s *2];\n for(int i = 0 ; i < this.r; i++)\n \tfor(int j =0 ; j< this.s * 2 ; j++)\n \t\tthis.net[i][j] = new OneSparseRec();\n \n }", "HashTable() {\n int trueTableSize = nextPrime(tableSize);\n HT = new FlightDetails[nextPrime(trueTableSize)];\n }", "private void initTables(){\n\tfor (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n if (myID == i) {\n myNeighboursDistTable[i] = costs;\n } else {\n int[] tmp = new int[RouterSimulator.NUM_NODES];\n Arrays.fill(tmp, RouterSimulator.INFINITY);\n myNeighboursDistTable[i] = tmp;\n }\n if (costs[i] == RouterSimulator.INFINITY) {\n neighbours[i] = false;\n route[i] = -1;\n } else if (i != myID) {\n neighbours[i] = true;\n route[i] = i;\n }\n\t}\n }", "public void initialize(Hashtable args) {\r\n addPort(east = new SamplePort2(this));\r\n addPort(west = new SamplePort2(this));\r\n addPort(north = new SamplePort(this));\r\n addPort(south = new SamplePort(this));\r\n System.err.println(\"inicializado nodo SampleNode ;)\");\r\n _number = _NextNumber++;\r\n }", "private void extendTable() {\n\n FreqNode[] freqTable = frequencyTable;//create temp table\n numNodes = 0; //set nodes to 0 \n FreqNode tmpNode; //temp variable\n frequencyTable = new FreqNode[frequencyTable.length * 2];//doubles the size \n\n //for every element in the table \n for (FreqNode node : freqTable) {\n //set the node \n tmpNode = node;\n while (true) {\n //if the node currently has a value \n if (tmpNode == null) {\n break;\n }//else \n else {\n //place the key and value at the current position\n this.put(tmpNode.getKey(), tmpNode.getValue());\n tmpNode = tmpNode.getNext();\n }//end else\n }//end while \n }//end for \n }", "public TrieNode() {\n this.arr = new TrieNode[26];\n }", "public void initialize()\r\n\t{\r\n\t\tdatabaseHandler = DatabaseHandler.getInstance();\r\n\t\tfillPatientsTable();\r\n\t}", "public TrieTree() {\n head = new Node();\n head.pass = 0;\n head.end = 0;\n head.next = new Node[26];\n }", "private void init() {\n myNodeDetails = new NodeDetails();\n try {\n //port will store value of port used for connection\n //eg: port = 5554*2 = 11108\n String port = String.valueOf(Integer.parseInt(getMyNodeId()) * 2);\n //nodeIdHash will store hash of nodeId =>\n // eg: nodeIdHash = hashgen(5554)\n String nodeIdHash = genHash(getMyNodeId());\n myNodeDetails.setPort(port);\n myNodeDetails.setNodeIdHash(nodeIdHash);\n myNodeDetails.setPredecessorPort(port);\n myNodeDetails.setSuccessorPort(port);\n myNodeDetails.setSuccessorNodeIdHash(nodeIdHash);\n myNodeDetails.setPredecessorNodeIdHash(nodeIdHash);\n myNodeDetails.setFirstNode(true);\n\n if (getMyNodeId().equalsIgnoreCase(masterPort)) {\n chordNodeList = new ArrayList<NodeDetails>();\n chordNodeList.add(myNodeDetails);\n }\n\n } catch (Exception e) {\n Log.e(TAG,\"**************************Exception in init()**********************\");\n e.printStackTrace();\n }\n }", "public void init()\n {\n this.tripDict = new HashMap<String, Set<Trip>>();\n this.routeDict = new HashMap<String, Double>();\n this.tripList = new LinkedList<Trip>();\n this.computeAllPaths();\n this.generateDictionaries();\n }", "private void initialize() {\n first = null;\n last = null;\n size = 0;\n dictionary = new Hashtable();\n }", "public Node(TNode tNode) {\n this.tNode = tNode;\n this.predecessor = null;\n initFingers();\n initSuccessorList();\n }", "private void initializeTable()\n {\n mTable = new ListView(mData);\n mTable.setPrefSize(200, 250);\n mTable.setEditable(false);\n }", "public DataNodeTable() {\r\n\t\tnodeMap = new HashMap<String, NodeRef>();\r\n\t}", "private void initTree()\n {\n String currSpell;\n Node tempNode;\n String currString;\n Gestures currGest;\n for(int spellInd = 0; spellInd < SpellLibrary.spellList.length; spellInd++)\n {\n //Start casting a new spell from the root node\n tempNode = root;\n currSpell = SpellLibrary.spellList[spellInd];\n for(int currCharInd =0; currCharInd < currSpell.length(); currCharInd++)\n {\n currString = currSpell.substring(0,currCharInd+1);\n currGest = Gestures.getGestureByChar(currString.charAt(currString.length()-1));\n if(tempNode.getChild(currGest) == null) //Need to add a new node!\n {\n tempNode.addChild(currGest,new Node(currString));\n debug_node_number++;\n }\n //Walk into the existing node\n tempNode = tempNode.getChild(currGest);\n }\n\n }\n }", "public void initialize() {\n for (Location apu : this.locations) {\n Node next = new Node(apu.toString());\n this.cells.add(next);\n }\n \n for (Node helper : this.cells) {\n Location next = (Location)this.locations.searchWithString(helper.toString()).getOlio();\n LinkedList<Target> targets = next.getTargets();\n for (Target finder : targets) {\n Node added = this.path.search(finder.getName());\n added.setCoords(finder.getX(), finder.getY());\n helper.addEdge(new Edge(added, finder.getDistance()));\n }\n }\n \n this.startCell = this.path.search(this.source);\n this.goalCell = this.path.search(this.destination);\n \n /**\n * Kun lähtö ja maali on asetettu, voidaan laskea jokaiselle solmulle arvio etäisyydestä maaliin.\n */\n this.setHeuristics();\n }", "public FingerTable(int numOfEntries, OutsidePeer outsidePeer) {\r\n table = new ArrayList<>();\r\n this.numOfEntries = numOfEntries;\r\n for (int i = 0; i < numOfEntries; i++) {\r\n table.add(outsidePeer);\r\n }\r\n print();\r\n }", "@Override\n protected void initialize() {\n mDrive.resetGyroPosition();\n try {\n Trajectory left_trajectory = PathfinderFRC.getTrajectory(pathName + \".left\");\n Trajectory right_trajectory = PathfinderFRC.getTrajectory(pathName + \".right\");\n\n m_left_follower = new EncoderFollower(left_trajectory);\n m_right_follower = new EncoderFollower(right_trajectory);\n\n if(isBackwards) {\n initBackwards();\n } else {\n initForwards();\n }\n } catch (IOException e) {\n\t\t e.printStackTrace();\n\t }\n }", "private TrieNode() {\n this.arr = new TrieNode[CAPACITY];\n }", "@Override\n public void initialize() {\n time = 0;\n //noinspection ConstantConditions\n this.runningTasks.addAll(getInitialNode().getTasks());\n for (Node node : nodes) {\n node.initialize();\n }\n }", "public void initialize() {\n tableIDColumn.setCellValueFactory(new PropertyValueFactory<Table, String>(\"tableID\"));\n occupiedTableColumn.setCellValueFactory(new PropertyValueFactory<Table, Boolean>(\"isOccupied\"));\n\n notification = new Notification();\n notificationArea.getChildren().setAll(notification);\n\n }", "private void initializeTableNodes(final TableNode tableNode,\n\t\t\tfinal Element schemataElement) {\n\t\tif (tableNode.getColumnNodeList() == null) {\n\t\t\tinitializationProgress++;\n\t\t\ttableNode.addPropertyChangeListener(new PropertyChangeListener() {\n\t\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\n\t\t\t\t\tString property = evt.getPropertyName();\n\t\t\t\t\tif (property.equals(AbstractNode.NODE_CHILDREN_MODIFIED)\n\t\t\t\t\t\t\t&& !(evt.getNewValue() instanceof WaitingNode)) {\n\t\t\t\t\t\tinitializationProgress--;\n\t\t\t\t\t\tif (initializationProgress == 0) {\n\t\t\t\t\t\t\tDisplay.getDefault().asyncExec(new Runnable() {\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\tdoRestore(schemataElement);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\ttableNode.getColumnNodeList(true);\n\t\t}\n\t}", "private void init() {\r\n head = new DLList.Node<T>(null);\r\n head.setNext(tail);\r\n tail = new DLList.Node<T>(null);\r\n tail.setPrevious(head);\r\n size = 0;\r\n }", "public void initialize()\n {\n if (!this.seedInitialized)\n {\n throw new IllegalStateException(\"Seed \" + this.maxHeight + \" not initialized\");\n }\n\n this.heightOfNodes = new Vector();\n this.tailLength = 0;\n this.firstNode = null;\n this.firstNodeHeight = -1;\n this.isInitialized = true;\n System.arraycopy(this.seedNext, 0, this.seedActive, 0, messDigestTree\n .getDigestSize());\n }", "protected void initialize() {\n\t\tright = left = throttle = turn = forward = 0;\n\t}", "public void init() throws InterruptedException {\n tailLeft = hwMap.servo.get(\"left_tail\");\n tailRight = hwMap.servo.get(\"right_tail\");\n }", "private static void createFingerTables(boolean showTables, int bBit, ArrayList<Integer> nodes) {\r\n \tFingerTables.createFingerTables(showTables, bBit, nodes);\r\n\t}", "public RoutingTable() {\n for(int i = 0; i < addressLength; i++) {\n routingTable[i] = new HashTable();\n bloomFilters[i] = new BloomFilter(k, m);\n }\n }", "public Trie() {\n this.root = new Node('0');\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic HashTable()\r\n\t{\r\n\t\ttable = new HashEntry[SIZES[sizeIdx]];\r\n\t}", "private void init() {\n \t\t// Initialise border cells as already visited\n \t\tfor (int x = 0; x < size + 2; x++) {\n \t\t\tvisited[x][0] = true;\n \t\t\tvisited[x][size + 1] = true;\n \t\t}\n \t\tfor (int y = 0; y < size + 2; y++) {\n \t\t\tvisited[0][y] = true;\n \t\t\tvisited[size + 1][y] = true;\n \t\t}\n \t\t\n \t\t\n \t\t// Initialise all walls as present\n \t\tfor (int x = 0; x < size + 2; x++) {\n \t\t\tfor (int y = 0; y < size + 2; y++) {\n \t\t\t\tnorth[x][y] = true;\n \t\t\t\teast[x][y] = true;\n \t\t\t\tsouth[x][y] = true;\n \t\t\t\twest[x][y] = true;\n \t\t\t}\n \t\t}\n \t}", "public Trie() {\n next = new Trie[26];\n }", "public Trie() {\n\t\tnodes = new Trie[26];\n\t}", "void initTable();", "public void initializeNeighbors() {\n\t\tfor (int r = 0; r < getRows(); r++) {\n\t\t\tfor (int c = 0; c < getCols(); c++) {\n\t\t\t\tList<Cell> nbs = new ArrayList<>();\n\t\t\t\tinitializeNF(shapeType, r, c);\n\t\t\t\tmyNF.findNeighbors();\n\t\t\t\tfor (int[] arr : myNF.getNeighborLocations()){\n\t\t\t\t\tif (contains(arr[0], arr[1])){\n\t\t\t\t\t\tnbs.add(get(arr[0], arr[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tget(r, c).setNeighbors(nbs);\n\t\t\t}\n\t\t}\n\t}", "public void setFrequencies() {\n\t\tleafEntries[0] = new HuffmanData(5000, 'a');\n\t\tleafEntries[1] = new HuffmanData(2000, 'b');\n\t\tleafEntries[2] = new HuffmanData(10000, 'c');\n\t\tleafEntries[3] = new HuffmanData(8000, 'd');\n\t\tleafEntries[4] = new HuffmanData(22000, 'e');\n\t\tleafEntries[5] = new HuffmanData(49000, 'f');\n\t\tleafEntries[6] = new HuffmanData(4000, 'g');\n\t}", "private void initializeTable(int capacity) {\n this.table = new Object[capacity << 1];\n this.mask = table.length - 1;\n this.clean = 0;\n this.maximumLoad = capacity * 2 / 3; // 2/3\n }", "public void initialize() {\n for (TableInSchema tableInSchema : initialTables()) {\n addTable(tableInSchema);\n }\n }", "public Trie() {\n head = new Node(false);\n }", "public Table() {\n // <editor-fold desc=\"Initialize Cells\" defaultstate=\"collapsed\">\n for (int row = 0; row < 3; row++) {\n for (int column = 0; column < 3; column++) {\n if (cells[row][column] == null) {\n cells[row][column] = new Cell(row, column);\n }\n }\n }\n // </editor-fold>\n }", "@SuppressWarnings(\"unchecked\")\n public HashtableChain() {\n table = new LinkedList[CAPACITY];\n }", "public void initialize() {\n\t\t// set seed, if defined\n\t\tif (randomSeed > Integer.MIN_VALUE) {\n\t\t\tapp.randomSeed(randomSeed);\n\t\t}\n\n\t\tfor (int x = 0; x < gridX; x++) {\n\t\t\tfor (int y = 0; y < gridY; y++) {\n\t\t\t\tCell c = new Cell(\n\t\t\t\t\tapp,\n\t\t\t\t\tcellSize,\n\t\t\t\t\tcolors[(int)app.random(colors.length)],\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\tc.position = PVector.add(offset, new PVector(x * cellSize, y * cellSize));\n\t\t\t\tcells[x + (y * gridX)] = c;\n\t\t\t\tnewCells[x + (y * gridX)] = c;\n\t\t\t}\n\t\t}\n\t}", "public RouteTable()\n\t{\n\t\t// synchronizedSet makes sure the table is thread safe\n\t\ttable = Collections.synchronizedSet(new TreeSet<RouteTableEntry>());\n\t\t//table = new TreeSet<RouteTableEntry>();\n\t}", "public void init() {\n\t\tfor (Node node : nodes)\n\t\t\tnode.init();\n\t}", "public Trie() {\n root = new TreeNode();\n }", "public void initTable();", "public void initialise() {\n heap = new ArrayList<>(inverseHeap.keySet());\n inverseHeap = null; //null inverse heap to save space\n }", "protected void initialize() {\n\t\tLiquidCrystal lcd = RobotMap.lcd;\n\t\tlcd.clear();\n\n\t\tRobotMap.chassisfrontLeft.set(0);\n\t\tRobotMap.chassisfrontRight.set(0);\n\t\tRobotMap.chassisrearRight.set(0);\n\t\tRobotMap.climberclimbMotor.set(0);\n\t\tRobotMap.floorfloorLift.set(0);\n\t\tRobotMap.acquisitionacquisitionMotor.set(0);\n\n\t\t\n\t\t}", "@SuppressWarnings(\"unchecked\")\n\t\tvoid init() {\n\t\t\tsetNodes(offHeapService.newArray(JudyIntermediateNode[].class, NODE_SIZE, true));\n\t\t}", "@Override\n protected void initialize() {\n rightTarget = this.distanceInches + Robot.driveTrain.getRightEncoderDistanceInches();\n leftTarget = this.distanceInches + Robot.driveTrain.getLeftEncoderDistanceInches();\n Robot.driveTrain.tankDrive(0, 0);\n this.direction = distanceInches > 0;\n turnPID.resetPID();\n }", "public void updateFingerTable(int key, String address) {\n for (int i = 0; i < fingerTable.size(); i++) {\n if (key == fingerTable.get(i).getId()) {\n fingerTable.set(i, new Finger(key, address));\n }\n }\n }", "public Trie() {\n \troot=new TrieNode();\n }", "@FXML\n\tprivate void initialize() {\n\t\t// Initialize the person table with the two columns.\n\t\t\n\t\tloadDataFromDatabase();\n\n\t\tsetCellTable();\n\n\t\tstagiereTable.setItems(oblist);\n\t\tshowPersonDetails(null);\n\n\t\t// Listen for selection changes and show the person details when\n\t\t// changed.\n\t\tstagiereTable\n\t\t\t\t.getSelectionModel()\n\t\t\t\t.selectedItemProperty()\n\t\t\t\t.addListener(\n\t\t\t\t\t\t(observable, oldValue, newValue) -> showPersonDetails(newValue));\n\t}", "Node()\r\n { // constructor for head Node \r\n prev = this;\r\n next = this;\r\n trafficEntry = new TrafficEntry();\r\n }", "public Trie() {\n \troot=new TrieNode();\n }", "@Override\n public void initialize() {\n AppContext.getInstance().set(\"tablero\",this);\n tabl = new CasillaController[8][6]; \n SeleccNivel((int)AppContext.getInstance().get(\"lvl\"));\n LlenarCasillas();\n \n }", "@Override\n public void init() {\n leftDrive = hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = hardwareMap.get(DcMotor.class, \"right_drive\");\n }", "public HashTable() {\n\t\tthis(DEFAULT_TABLE_SIZE);\n\t}", "public PeerTable() {\n super();\n }", "public void initForCup(){\n hdBase = HD_BASED_ON_RANK;\n hdNoHdRankThreshold = -30;\n hdCorrection = 0; \n hdCeiling = 0;\n }", "ChordNode(String address, int port, String existingAddress, int existingPort) {\n this.address = address;\n this.port = port;\n this.existingAddress = existingAddress;\n this.existingPort = existingPort;\n\n SHA1Hasher sha1Hash = new SHA1Hasher(this.address + \":\" + this.port);\n this.id = sha1Hash.getLong();\n this.hex = sha1Hash.getHex();\n\n // Print statements\n System.out.println(\"Welcome to the Chord Network!\");\n System.out.println(\"You are running on IP: \" + this.address + \" and port: \" + this.port);\n System.out.println(\"Your ID: \" + this.getId());\n\n // initialize finger table and successor\n this.initializeFingerTable();\n this.initializeSuccessors();\n\n // Launch server thread that will listen to clients\n new Thread(new ChordServer(this)).start();\n\n this.printFingerTable();\n }", "protected void init() {\n try {\n updateDevice();\n } catch (Exception e) {\n RemoteHomeManager.log.error(42,e);\n }\n }", "public static void initialize()\n {\n\n for(int i = 0; i < cellViewList.size(); i++)\n cellList.add(new Cell(cellViewList.get(i).getId()));\n for (int i = 76; i < 92; i++)\n {\n if (i < 80)\n {\n cellList.get(i).setChess(PlayerController.getPlayer(0).getChess(i-76));\n }\n else if (i < 84)\n {\n cellList.get(i).setChess(PlayerController.getPlayer(1).getChess(i-80));\n }\n else if (i < 88)\n {\n cellList.get(i).setChess(PlayerController.getPlayer(2).getChess(i-84));\n }\n else\n {\n cellList.get(i).setChess(PlayerController.getPlayer(3).getChess(i-88));\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic HashMap() {\r\n\t\tdata = (Node<MapEntry<K, V>>[])new Node[INITIAL_SIZE];\r\n\t\tfor(int i = 0; i < data.length; i++)\t\t\t\t\t\t\t//For every element in data...\r\n\t\t\tdata[i] = new Node<MapEntry<K,V>>(new MapEntry<K,V>(null));\t//Add a head node to it.\r\n\t\t\r\n\t\t//TODO: May have to just default as null and in the put method, if the slot is null, then put a head node in it. The post-ceding code after that is logically correct!\r\n\t\r\n\t\tsize = 0;\t//Redundant but helpful to see that the size is 0\r\n\t}", "protected void createTable() {\n table = (MapEntry<K, V>[]) new MapEntry[capacity]; // safe cast\n }", "public Trie() {\n root = new Node();\n }", "private void init() {\n this.playing = true;\n this.hand.clear();\n this.onTable = 0;\n this.points = 0;\n }", "public ImplementTrie208() {\n\t\troot = new TrieNode();\n\t}", "private void init() {\n\t\thead = -1;\n\t\tnumElements = 0;\n\t}", "public Trie() {\n this.root = new Node(null);\n }", "public void initTable() {\n this.table.setSelectable(true);\n this.table.setImmediate(true);\n this.table.setWidth(\"100%\");\n this.table.addListener(this);\n this.table.setDropHandler(this);\n this.table.addActionHandler(this);\n this.table.setDragMode(TableDragMode.ROW);\n this.table.setSizeFull();\n\n this.table.setColumnCollapsingAllowed(true);\n // table.setColumnReorderingAllowed(true);\n\n // BReiten definieren\n this.table.setColumnExpandRatio(LABEL_ICON, 1);\n this.table.setColumnExpandRatio(LABEL_DATEINAME, 3);\n this.table.setColumnExpandRatio(LABEL_DATUM, 2);\n this.table.setColumnExpandRatio(LABEL_GROESSE, 1);\n this.table.setColumnExpandRatio(LABEL_ACCESS_MODES, 1);\n this.table.setColumnHeader(LABEL_ICON, \"\");\n }", "public Node() {\n neighbors = new ArrayList<>();\n sizeOfSubtree = 0;\n containedPaths = new long[k];\n startingPaths = new long[k];\n }", "public void initializeWallpaper() {\n \t// if database not set\n\t\tSQLiteDatabase db = nodeData.getReadableDatabase();\n\t\t\n\t\tCursor cursor = db.query(EventDataSQLHelper.TABLE, null, null, null, null, null, null);\n\t\tstartManagingCursor(cursor);\n\t\twhile (cursor.moveToNext()) {\n\t\t\twallpapers.add(stringToNode(cursor.getString(1)));\n\t\t\tLog.d(\"Initialize\", \"Loading \" + cursor.getString(1));\n\t\t}\n\t\tcursor.close();\n\t\tdb.close();\n\t\tboolean empty = wallpapers.size() == 0;\n\t\tfillWallpaper();\n\t\tif (empty) {\n\t\t\tshowHelp(resetclick);\n\t\t} else {\n\t\t\tresetImages();\n\t\t}\n }", "ChordNode(String address, int port) {\n this.address = address;\n this.port = port;\n\n // Convert the address and port to SHA1\n SHA1Hasher sha1Hash = new SHA1Hasher(this.address + \":\" + this.port);\n this.id = sha1Hash.getLong();\n this.hex = sha1Hash.getHex();\n\n // Print statements\n System.out.println(\"Welcome to the Chord Network!\");\n System.out.println(\"You are running on IP: \" + this.address + \" and port: \" + this.port);\n System.out.println(\"Your ID: \" + this.getId());\n\n // initialize finger table and successor\n this.initializeFingerTable();\n this.initializeSuccessors();\n\n // Launch server thread that will listen to clients\n new Thread(new ChordServer(this)).start();\n\n // Launch the NodeStabilizer that will stabilize the ChordNode periodically\n new Thread(new ChordNodeStabilizer(this)).start();\n\n // print the finger table\n this.printFingerTable();\n }", "public void makeEmpty() {\r\n for (int i = 0; i < tableSize; i++) {\r\n table[i] = new DList<Entry<K, V>>();\r\n }\r\n }", "public void setFirstNode(byte[] hash)\n {\n if (!this.isInitialized)\n {\n this.initialize();\n }\n this.firstNode = hash;\n this.firstNodeHeight = this.maxHeight;\n this.isFinished = true;\n }", "@SuppressWarnings(\"unchecked\")\n private void createTable() {\n table = (LinkedList<Item<V>>[])new LinkedList[capacity];\n for(int i = 0; i < table.length; i++) {\n table[i] = new LinkedList<>();\n }\n }", "protected abstract void initTable() throws RemoteException, NotBoundException, FileNotFoundException;", "protected void initialize() {\n Robot.m_drivetrain.resetPath();\n Robot.m_drivetrain.addPoint(0, 0);\n Robot.m_drivetrain.addPoint(3, 0);\n Robot.m_drivetrain.generatePath();\n \n\t}", "Node() {\r\n this.k = null;\r\n this.v = null;\r\n this.c = null;\r\n kcount = 0;\r\n }", "private static void initializeTable(Table table, Generator g, int depth) {\n\t\tMap<Type, Vector<Expression>> initialElement = new HashMap<Type, Vector<Expression>>();\n\t\tfor (Type t : g.getAllReceiveTypes()) {\n\t\t\tinitialElement.put(t, new Vector<Expression>());\n\t\t}\n\t\tfor (int i = 0; i < depth; i++) {\n\t\t\ttable.mappingFromTypeToExps.add(initialElement);\n\t\t}\n\n\t}", "public Trie() {\n this.root = new Node('\\0');\n }", "private void myInit() {\n init_key();\n init_tbl_messages();\n\n init_tbl_members();\n data_cols_members();\n tbl_members.addMouseListener(new MouseAdapter() {\n @Override\n public void mouseClicked(MouseEvent e) {\n select_member();\n }\n });\n }", "public HashTable(int initSize, double loadFactor) \r\n {\r\n \tif(initSize <= 0)\r\n \t{\r\n \t\tthrow new IllegalArgumentException();\r\n \t}\r\n \tif(loadFactor <= 0.0)\r\n \t{\r\n \t\tthrow new IllegalArgumentException();\r\n \t}\r\n \t\r\n \tsize = initSize;\r\n \tthis.loadFactor = loadFactor;\r\n \thashTable = (LinkedList<T>[])(new LinkedList[size]);\r\n \tnumItems = 0;\r\n \t\r\n \t// Instantiate the LinkedList buckets\r\n \tfor(int i = 0; i < hashTable.length; i++)\r\n \t{\r\n \t\thashTable[i] = new LinkedList<T>();\r\n \t}\r\n }", "@FXML\r\n\tprivate void initialize() {\r\n\t\ttransactionList = refreshTransactions();\r\n\t\tif (transactionList != null) {\r\n\t\t\tfillTable();\r\n\t\t}\r\n\t}", "public void initialize(Node currentNode) {\n\t\tthis.currentNode = currentNode;\n\t}", "private void initialize()\n\t{\n\t\tfor(int i = 0 ; i < SOM.length; i++)\n\t\t{\n\t\t\tfor(int j=0; j < SOM[0].length; j++)\n\t\t\t{ \n\t\t\t\tSOM[i][j] = new Node(INPUT_DIMENSION,i,j);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSOM_HORIZONTAL_LENGTH = SOM[0].length;\n\t\tSOM_VERTICAL_LENGTH = SOM.length;\n\t}", "private void initDOM() {\n for (int rowIndex = 0; rowIndex < minefield.getRows(); rowIndex++) {\n Element tr = new Element(\"tr\");\n table.appendChild(tr);\n for (int colIndex = 0; colIndex < minefield.getCols(); colIndex++) {\n Element td = new Element(\"td\");\n\n final int thisRow = rowIndex;\n final int thisCol = colIndex;\n\n // Left click reveals cells\n td.addEventListener(\"click\", e -> cellClick(thisRow, thisCol));\n\n // Right-click/ctrl-click marks a mine\n // Here we abuse the event details feature which runs javascript\n // as part of the event handler, to prevent the default\n // behavior, i.e. showing the browser context menu\n td.addEventListener(\"contextmenu\",\n e -> markMine(thisRow, thisCol),\n \"event.preventDefault()\");\n tr.appendChild(td);\n }\n }\n }", "private void initializeSchemaNode(final SchemaNode schemaNode,\n\t\t\tfinal Element schemataElement) {\n\t\t// schemaNode may not be initialized\n\t\tif (schemaNode.getTableNodeList() == null) {\n\t\t\tinitializationProgress++;\n\t\t\tTableGroupNode tableGroupNode = schemaNode.getTableGroupNode();\n\t\t\ttableGroupNode\n\t\t\t\t\t.addPropertyChangeListener(new PropertyChangeListener() {\n\t\t\t\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\n\t\t\t\t\t\t\tString property = evt.getPropertyName();\n\t\t\t\t\t\t\tif (property\n\t\t\t\t\t\t\t\t\t.equals(AbstractNode.NODE_CHILDREN_MODIFIED)\n\t\t\t\t\t\t\t\t\t&& !(evt.getNewValue() instanceof WaitingNode)) {\n\t\t\t\t\t\t\t\tfor (AbstractNode node : schemaNode\n\t\t\t\t\t\t\t\t\t\t.getTableNodeList()) {\n\t\t\t\t\t\t\t\t\tinitializeTableNodes((TableNode) node,\n\t\t\t\t\t\t\t\t\t\t\tschemataElement);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tinitializationProgress--;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\tschemaNode.getTableNodeList(true);\n\t\t} else {\n\t\t\tfor (AbstractNode node : schemaNode.getTableNodeList()) {\n\t\t\t\tinitializeTableNodes((TableNode) node, schemataElement);\n\t\t\t}\n\t\t}\n\t}", "public TrieNode() {\n map = new HashMap<Character, TrieNode>();\n isLeaf = false;\n }", "public void init_cells()\n\t{\n\t\tint i, j;\n\n\t\t// create a maze of cells\n\t\tMaze = new int[ROWS][COLS];\n//\t\tfor (i = 0; i < ROWS; i++)\n//\t\t\tMaze[i] = new Array(COLS);\n\n\t\t// set all walls of each cell in maze by setting bits : N E S W\n\t\tfor (i = 0; i < ROWS; i++)\n\t\t\tfor (j = 0; j < COLS; j++)\n\t\t\t\tMaze[i][j] = (N + E + S + W);\n\t\t\n\t\t// create stack for storing previously visited locations\n\t\tstack = new Vector<int[]>(ROWS*COLS);\n\t\tfor (i = 0; i < ROWS*COLS; i++)\n\t\t\tstack.add(i, new int[2]);\n\n\t\t// initialize stack\n\t\tfor (i = 0; i < ROWS*COLS; i++)\n\t\t\tfor (j = 0; j < 2; j++)\n\t\t\t\tstack.elementAt(i)[j] = 0;\n\t}", "public void robotInit() {\n\t\trightFront = new CANTalon(1);\n\t\tleftFront = new CANTalon(3);\n\t\trightBack = new CANTalon(2);\n\t\tleftBack = new CANTalon(4);\n\t\t\n\t\trightBack.changeControlMode(CANTalon.TalonControlMode.Follower);\n\t\tleftBack.changeControlMode(CANTalon.TalonControlMode.Follower);\n\t\t\n\t\tleftBack.set(leftFront.getDeviceID());\n\t\trightBack.set(rightFront.getDeviceID());\n\t\t\n\t\tturn = new Joystick(0);\n\t\tthrottle = new Joystick(1);\n\t}", "private void createTable() {\n\t\tfreqTable = new TableView<>();\n\n\t\tTableColumn<WordFrequency, Integer> column1 = new TableColumn<WordFrequency, Integer>(\"No.\");\n\t\tcolumn1.setCellValueFactory(new PropertyValueFactory<WordFrequency, Integer>(\"serialNumber\"));\n\n\t\tTableColumn<WordFrequency, String> column2 = new TableColumn<WordFrequency, String>(\"Word\");\n\t\tcolumn2.setCellValueFactory(new PropertyValueFactory<WordFrequency, String>(\"word\"));\n\n\t\tTableColumn<WordFrequency, Integer> column3 = new TableColumn<WordFrequency, Integer>(\"Count\");\n\t\tcolumn3.setCellValueFactory(new PropertyValueFactory<WordFrequency, Integer>(\"count\"));\n\n\t\tList<TableColumn<WordFrequency, ?>> list = new ArrayList<TableColumn<WordFrequency, ?>>();\n\t\tlist.add(column1);\n\t\tlist.add(column2);\n\t\tlist.add(column3);\n\n\t\tfreqTable.getColumns().addAll(list);\n\t}", "protected void initialize() {\n\t\t\n\t\tif (trajectoryToFollow.highGear) {\n\t\t\tRobot.pneumatics.drivetrainShiftUp();\n\t\t}else {\n\t\t\t//Robot.pneumatics.drivetrainShiftDown();\n\t\t\tRobot.pneumatics.drivetrainShiftUp();\n\t\t}\n\n\t\tsetUpTalon(leftTalon);\n\t\tsetUpTalon(rightTalon);\n\n\t\tsetValue = SetValueMotionProfile.Disable;\n\n\t\trightTalon.set(ControlMode.MotionProfileArc, setValue.value);\n\t\tleftTalon.follow(rightTalon, FollowerType.AuxOutput1);\n\n\t\tloadLeftBuffer = new Notifier(\n\t\t\t\tnew BufferLoader(rightTalon, trajectoryToFollow.centerProfile, trajectoryToFollow.flipped,\n\t\t\t\t\t\tRobot.drivetrain.getDistance()));\n\n\t\tloadLeftBuffer.startPeriodic(.005);\n\t}", "public void initDevice() {\r\n\t\t\r\n\t}", "public Trie() {\n root = new TrieNode();\n }" ]
[ "0.7312862", "0.55336356", "0.54868907", "0.5275796", "0.5267892", "0.5153972", "0.51501703", "0.5131809", "0.51270705", "0.51074404", "0.5080832", "0.5059423", "0.50299203", "0.50284743", "0.5024571", "0.5015245", "0.50004715", "0.49820614", "0.49475795", "0.49363557", "0.49227995", "0.4921783", "0.48859692", "0.48660818", "0.4864656", "0.48640442", "0.48583284", "0.48433018", "0.48337328", "0.4822884", "0.48217282", "0.4802303", "0.48002413", "0.4786605", "0.47814277", "0.4779313", "0.47716224", "0.47474527", "0.47377893", "0.4718874", "0.46891627", "0.46876678", "0.46863177", "0.46710062", "0.46693727", "0.466574", "0.46586913", "0.46554604", "0.46416953", "0.4632855", "0.4628928", "0.46215835", "0.46212295", "0.46127865", "0.46118683", "0.4605093", "0.4593839", "0.458907", "0.45816743", "0.45808062", "0.45785442", "0.45741525", "0.45684725", "0.4565628", "0.4563684", "0.45622534", "0.45586357", "0.4547175", "0.4545183", "0.45436704", "0.45418918", "0.45382312", "0.45365068", "0.4527949", "0.45220703", "0.45021453", "0.44999516", "0.44980952", "0.4493261", "0.44905677", "0.4488284", "0.44866115", "0.44836813", "0.4480669", "0.44702718", "0.44629645", "0.4460088", "0.44595298", "0.44563305", "0.4455129", "0.44545537", "0.4453043", "0.44521806", "0.44458205", "0.44458032", "0.44424954", "0.4440604", "0.4438859", "0.44374192", "0.44369227" ]
0.71076775
1
This way the expander cannot be collapsed on click event of group item
@Override public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public boolean onGroupClick(ExpandableListView parent, View v,\r\n int groupPosition, long id) {\n return false;\r\n }", "@Override\n public void onGroupCollapse(int groupPosition) {\n }", "@Override\n public boolean onGroupClick(ExpandableListView parent, View v,\n int groupPosition, long id) {\n return false;\n }", "@Override\n public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {\n if (parent.getExpandableListAdapter().getChildrenCount(groupPosition) == 0) {\n elv.collapseGroup(groupPosition);\n }\n return false;\n }", "@Override\r\n public void onGroupCollapse(int groupPosition) {\n\r\n }", "@Override\n public void onGroupExpand(int groupPosition) {\n }", "@Override\n public boolean onGroupClick(ExpandableListView parent, View v,\n int groupPosition, long id) {\n return false;\n }", "@Override\n public boolean onGroupClick(ExpandableListView parent, View v,\n int groupPosition, long id) {\n return false;\n }", "@Override\n public boolean onGroupClick(ExpandableListView parent, View v,\n int groupPosition, long id) {\n return false;\n }", "@Override\n public boolean onGroupClick(ExpandableListView parent, View v,\n int groupPosition, long id) {\n return false;\n }", "@Override\r\n public void onGroupExpand(int groupPosition) {\n }", "void onGroupCollapsed(int groupPosition);", "void onGroupExpanded(int groupPosition);", "@Override\n public void onGroupExpand(int groupPosition) {\n }", "@Override\n public void onGroupCollapse(int groupPosition) {\n }", "@Override\n public void onGroupCollapse(int groupPosition) {\n\n }", "@Override\n public void onGroupCollapse(int groupPosition) {\n\n }", "@Override\n public void onGroupCollapse(int groupPosition) {\n\n }", "@Override\n public void onGroupCollapse(int groupPosition) {\n\n }", "@Override\n public void onGroupExpanded(int groupPosition) {\n\n }", "@Override\n public void onGroupExpand(int groupPosition) {\n }", "@Override\n public void onGroupExpand(int groupPosition) {\n }", "@Override\n public void onGroupExpand(int groupPosition) {\n\n }", "@Override\n public void onGroupCollapsed(int groupPosition) {\n\n }", "@Override\r\n public boolean onGroupClick(ExpandableListView parent, View v,\r\n int groupPosition, long id) {\n if (sign == -1) {\r\n // 展开被选的group\r\n data_list.expandGroup(groupPosition);\r\n // 设置被选中的group置于顶端\r\n data_list.setSelectedGroup(groupPosition);\r\n sign = groupPosition;\r\n } else if (sign == groupPosition) {\r\n data_list.collapseGroup(sign);\r\n sign = -1;\r\n } else {\r\n data_list.collapseGroup(sign);\r\n // 展开被选的group\r\n data_list.expandGroup(groupPosition);\r\n // 设置被选中的group置于顶端\r\n data_list.setSelectedGroup(groupPosition);\r\n sign = groupPosition;\r\n }\r\n return true;\r\n }", "@Override\n public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {\n if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n return parent.expandGroup(groupPosition, true);\n }else\n\n return true;\n }", "public boolean onGroupClick(ExpandableListView parent, View v,int groupPosition, long id) {\n\t\t\t return false;\r\n\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onGroupExpand(int groupPosition) {\n\t\t\t\t\t\tfor (int i = 0; i < expListAdapter.getGroupCount(); i++) {\r\n\r\n\t\t\t\t\t\t\tif (i != groupPosition) {\r\n\t\t\t\t\t\t\t\texpandablelistView.collapseGroup(i);\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}", "@Override\n\tpublic boolean onGroupClick(ExpandableListView parent, View v,\n\t\t\tint groupPosition, long id) {\n\t\tif (mAnimatedExpandableListView.isGroupExpanded(groupPosition)) {\n\t\t\tmAnimatedExpandableListView\n\t\t\t\t\t.collapseGroupWithAnimation(groupPosition);\n\t\t} else {\n\t\t\tmAnimatedExpandableListView.expandGroupWithAnimation(groupPosition);\n\t\t}\n\t\treturn true;\n\t}", "@JDIAction(\"Collapse '{name}'\")\n public void collapse() {\n if (isExpanded()) {\n expandButton.click();\n }\n }", "@Override\r\n public boolean onChildClick(ExpandableListView parent, View v,\r\n int groupPosition, int childPosition, long id) {\n return false;\r\n }", "@Override\r\n public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {\n LogManager.i(\"=============OnGroupClickListener\");\r\n\r\n setListener();\r\n return true;\r\n }", "@Override\n public boolean onGroupClick(ExpandableListView parent, View v,\n int groupPosition, long id) {\n Log.v(\"popwindow\",\"show the window111\");\n expandlistView.expandGroup(groupPosition);\n return true;\n }", "@Override\n public boolean onChildClick(ExpandableListView parent, View v,\n int groupPosition, int childPosition, long id) {\n return false;\n }", "public void collapse() {\n getSection().setExpanded(false);\n }", "@Override\n\t\t\t\tpublic void treeCollapsed(TreeExpansionEvent arg0) {\n\t\t\t\t}", "@Override public void onClick(View v) {\n Snackbar.make(groupViewHolder.itemView, \"Group was toggled\", Snackbar.LENGTH_SHORT).show();\n }", "public void expand() {\n openItems();\n }", "@JDIAction(\"Expand '{name}'\")\n public void expand() {\n if (isCollapsed()) {\n expandButton.click();\n }\n }", "@Override\n public boolean onChildClick(ExpandableListView parent, View v,\n int groupPosition, int childPosition, long id) {\n return false;\n }", "private void collapseAll()\r\n\t{\r\n\t\tint count = listAdapter.getGroupCount();\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t{\r\n\t\t\tmyList.collapseGroup(i);\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic void onOff() {\n\t\t\t\t((ExpandableListView) parent).collapseGroup(groupPosition);\n\t\t\t\ttextMode.setText(\"OFF\");\n\t\t\t\tgroupLayLeft.setBackgroundResource(R.drawable.list_item_corner);\n\t\t\t\tgroupLayRight.setBackgroundResource(R.drawable.list_item_corner);\n\t\t\t}", "@Override\n public boolean isExpanded() {\n return isExpanded;\n }", "public void treeWillCollapse(TreeExpansionEvent e) throws ExpandVetoException {\n }", "@Override\n public boolean onMenuItemActionExpand(MenuItem item) {\n return true;\n }", "public void treeCollapsed(TreeExpansionEvent e) {\n saySomething(\"Tree-collapsed event detected\", e);\n }", "public void expand(){\n\t\texpanded = true;\n\t\tstartRow = 0;\n\t\tslider.setLimits(0, 0, optGroup.size() - maxRows);\n\t\ttakeFocus();\n\t}", "@Override\n public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {\n GroupHolder groupHolder = null;\n if (convertView == null) {\n convertView = LayoutInflater.from(mContext).inflate(R.layout.mangement_class_activity_elv_group_item, null);\n groupHolder = new GroupHolder();\n groupHolder.groupImg = (ImageView) convertView.findViewById(R.id.mangement_class_activity_elv_group_item_class_icon_iv);\n groupHolder.groupText = (TextView) convertView.findViewById(R.id.mangement_class_activity_elv_group_item_class_name_tv);\n convertView.setTag(groupHolder);\n }else {\n groupHolder = (GroupHolder) convertView.getTag();\n }\n\n if (isExpanded) {\n groupHolder.groupImg.setImageResource(R.mipmap.down_arrow);\n }else {\n groupHolder.groupImg.setImageResource(R.mipmap.right_arraw);\n }\n\n groupHolder.groupText.setText(groupTitle.get(groupPosition));\n\n// groupButton = (Button) convertView.findViewById(R.id.btn_group_function);\n// groupButton.setOnClickListener(this);\n return convertView;\n }", "private void expandAll()\r\n\t{\r\n\t\tint count = listAdapter.getGroupCount();\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t{\r\n\t\t\tmyList.expandGroup(i);\r\n\t\t}\r\n\t}", "public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id)\r\n\t\t{\n\t\t\tFilterGroupInfo headerInfo = filterGroupList.get(groupPosition);\r\n\t\t\t// display it or do something with it\r\n\t\t\tToast.makeText(getActivity().getApplicationContext(), \"Child on Header \" + headerInfo.getName(), Toast.LENGTH_SHORT).show();\r\n\r\n\t\t\treturn false;\r\n\t\t}", "public void collapseItemClicked(ActionEvent e) {\n String value = e.getActionCommand();\n double level = Double.parseDouble(((String)JOptionPane.showInputDialog(\n frame,\n \"Enter percent threshold to collapse by:\\n\"+\n \"Use 100(%) for completely homogeneous\\n\"+\n \"collapsing\",\n \"Collapse by \"+value,\n JOptionPane.PLAIN_MESSAGE,\n null,\n null,\n \"90\")))/100;\n if(level > 0 && level <= 1)\n {\n frame.collapseByValue(value,level);\n }\n else\n JOptionPane.showMessageDialog(frame,\n \"Invalid threshold percentage.\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }", "public void expand() {\n getSection().setExpanded(true);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (gridView.getVisibility() == View.VISIBLE) {\n\t\t\t\t\t\n\t\t\t\t\tgridView.setVisibility(View.GONE);\n\t\t\t\t\tdialPad_collapse_iv.setImageResource(R.drawable.ic_action_collapse);\n\t\t\t\t\t\n }else{\n \t\n \t \tgridView.setVisibility(View.VISIBLE);\n \t \tdialPad_collapse_iv.setImageResource(R.drawable.ic_action_expand);\n }\n\t\t\t\t\n\t\t\t}", "@Test\r\n public void testSetCollapsedChildAtExpanded() {\r\n getView().setShowRoot(true);\r\n TreeItem child = createBranch(\"single-replaced-child\", true);\r\n int index = 3;\r\n setItem(index -1, child);\r\n getSelectionModel().select(index);\r\n TreeItem collapsedChild = createBranch(\"another-single-replaced\");\r\n setItem(index -1, collapsedChild);\r\n assertEquals(index, getSelectedIndex());\r\n assertEquals(collapsedChild, getSelectedItem());\r\n }", "@Override\n\t\t\t\tpublic boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}", "public boolean isCollapsed();", "private boolean getCollapse() {\n return false;\n }", "@Override\n public void onShow() {\n mExpandableLinearLayout.expand();\n }", "public void expandedItem(int index) {\n if (index < 0 || index >= getChildCount() || hasItemExpanded()) {\n return;\n }\n final View releasedChild = getChildAt(index);\n final LayoutParams lp = (LayoutParams) releasedChild.getLayoutParams();\n lp.isOpen = true;\n mDragHelper.smoothSlideViewTo(releasedChild, releasedChild.getLeft(), lp.expandTop);\n int length = getChildCount();\n for (int i = 0; i < length; i++) {\n if (i != index) {\n View child = getChildAt(i);\n playShrinkItemAnimation(child);\n }\n }\n invalidate();\n }", "@Override\n public void onSubItemClick(SubItemViewHolder holder, int groupItemIndex, int subItemIndex) {\n\n }", "public boolean isExpanded();", "public void clickOnGroupListSideBar() {\r\n\t\tsafeClick(groupListSideBar, SHORTWAIT);\r\n\t}", "public void collapse() {\n if (getVisibility() == View.GONE) {\n return;\n }\n mAnimatorCollapse.setDuration(mDuration);\n mAnimatorCollapse.start();\n }", "@Override\n public boolean onMenuItemActionExpand(MenuItem item) {\n return true; // Return true to expand action view\n }", "@Override\n public boolean onMenuItemActionExpand(MenuItem item) {\n return true; // Return true to expand action view\n }", "boolean isCollapsed();", "public void treeWillCollapse(TreeExpansionEvent e) {\n saySomething(\"Tree-will-collapse event detected\", e);\n }", "public void toggle() {\n if (isExpanded()) {\n collapse();\n } else {\n expand();\n }\n }", "@Override\n public void onGroupExpand(int groupPosition) {\n switch (headerList.get(groupPosition).getMenuName()) {\n case (\"About\"):\n fregmentContainer.removeAllViews();\n replaceFragment(new FragmentAbout());\n // getSupportFragmentManager().beginTransaction().add(R.id.fregmentContainer, new FragmentAbout()).addToBackStack(null).commit();\n //Toast.makeText(DrawerActivity.this, \"ABOUT\", Toast.LENGTH_SHORT).show();\n drawer.closeDrawers();\n break;\n case (\"Contact Us\"):\n fregmentContainer.removeAllViews();\n replaceFragment(new FragmentContactUs());\n //().beginTransaction().add(R.id.fregmentContainer, new FragmentContactUs()).addToBackStack(null).commit();\n // Toast.makeText(DrawerActivity.this, \"ABOUT\", Toast.LENGTH_SHORT).show();\n drawer.closeDrawers();\n break;\n case (\"Product Registration\"):\n fregmentContainer.removeAllViews();\n replaceFragment(new ProductRegistrationFragment());\n // getSupportFragmentManager().beginTransaction().add(R.id.fregmentContainer, new ProductRegistrationFragment()).addToBackStack(null).commit();\n //Toast.makeText(DrawerActivity.this, \"ABOUT\", Toast.LENGTH_SHORT).show();\n drawer.closeDrawers();\n break;\n\n }\n\n\n // return true;\n }", "public void expandNoAnim() {\n if (getVisibility() == View.VISIBLE) {\n return;\n }\n setVisibility(View.VISIBLE);\n mAnimatorExpand.setDuration(0);\n mAnimatorExpand.start();\n }", "public void expand() {\n if(!contentLayout.isVisible()) {\n toggle(false);\n }\n }", "public boolean isExpandable();", "public boolean isCollapsed() {\n return !expanded;\n }", "abstract void configureGroupView(RecentTabsGroupView groupView, boolean isExpanded);", "@Override\n public View getGroupView(int groupPosition, boolean isExpanded,\n View convertView, ViewGroup parent) {\n TextView GroupView=getTextParentView();\n GroupView.setText(getGroup(groupPosition).toString());\n return GroupView;\n }", "@Override\n public void onClick(View view) {\n ExpandableListView expandableListView_a = (ExpandableListView) findViewById(R.id.main_leftList);\n expandableListView_a.setBackgroundResource(R.drawable.drawer_admin_list);\n //expandableListView_a.addHeaderView(header_a,null,false);\n ExpandListAdapter adapter_a = new ExpandListAdapter(parentItems_A,childItems_A);\n adapter_a.setInflater((LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE),MainActivity.this);\n expandableListView_a.setAdapter(adapter_a);\n }", "private void collapseExtraViews() {\n mSearchItem.collapseActionView();\n\n // collapse the soft keyboard\n View v = getActivity().getCurrentFocus();\n if (v!=null) {\n InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(v.getWindowToken(),0);\n }\n }", "@Override\n public void onItemExpandCollapse(View view, int position, int type) {\n final int itemType = expandableListAdapter.getItemViewType(position);\n if (itemType == RoomDetailAdapter.TYPE_EXPANDABLE_BACKAUDIO) {\n initViewBackground(view, type);\n view.findViewById(R.id.rl_close_title).setVisibility(type == ExpandableListAdapter.ExpandCollapseAnimation.COLLAPSE ? View.VISIBLE : View.GONE);\n view.findViewById(R.id.tv_music_name_secondary).setVisibility(type == ExpandableListAdapter.ExpandCollapseAnimation.COLLAPSE ? View.GONE : View.VISIBLE);\n } else if (itemType == RoomDetailAdapter.TYPE_EXPANDABLE_CURTAIN || itemType == RoomDetailAdapter.TYPE_EXPANDABLE_Light) {\n initViewBackground(view, type);\n } else {\n initViewBackground(view, ExpandableListAdapter.ExpandCollapseAnimation.COLLAPSE);\n }\n }", "@Override\n public boolean onMenuItemActionExpand(MenuItem item) {\n return true; // Return true to expand action view\n }", "public void collapse() {\n if(contentLayout.isVisible()) {\n toggle(false);\n }\n }", "@Override\n public boolean onMenuItemActionExpand(MenuItem item) {\n return true; // Return true to expand action view\n }", "@Override\n public boolean onMenuItemActionExpand(MenuItem item) {\n return true; // Return true to expand action view\n }", "@Override\n public boolean onMenuItemActionExpand(MenuItem item) {\n return true; // Return true to expand action view\n }", "@Override\n\t\t\tpublic boolean onChildClick(ExpandableListView parent, View v,\n\t\t\t\t\tint groupPosition, int childPosition, long id) {\n\t\t\t\tString title = (String) expandableAdapter.getChild(\n\t\t\t\t\t\tgroupPosition, childPosition);\n\n\t\t\t\tString uri = childUri.get(groupPosition).get(childPosition);\n\n\t\t\t\tif (mExpandableListener != null) {\n\t\t\t\t\tmExpandableListener.onExpandableItemSelected(uri, title);\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}", "@Override\r\n public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) {\n LogManager.i(\"=============OnChildClickListener\");\r\n setListener();\r\n return true;\r\n }", "public void toggleNoAnim() {\n if(isExpanded()) {\n collapseNoAnim();\n }\n else {\n expandNoAnim();\n }\n }", "@Override\n public boolean onMenuItemActionCollapse(MenuItem item) {\n return true; // Return true to collapse action view\n }", "@Override\n public boolean onMenuItemActionCollapse(MenuItem item) {\n return true; // Return true to collapse action view\n }", "public void collapseNoAnim() {\n if (getVisibility() == View.GONE) {\n return;\n }\n mAnimatorCollapse.setDuration(0);\n mAnimatorCollapse.start();\n }", "@Override\r\n\tpublic View getGroupView(int groupPosition, boolean isExpanded,\r\n\t\t\tView convertView, ViewGroup parent) {\n\t\tLocalInfo localInfo = localInfos.get(groupPosition);\r\n\r\n\t\tif (convertView == null) {\r\n\t\t\tconvertView = (View) layoutInflater.inflate(\r\n\t\t\t\t\tR.layout.layout_company_quality, null);\r\n\t\t\tvHolder = new ViewHolder();\r\n\t\t\t// vHolder.tvTitle = (TextView) convertView\r\n\t\t\t// .findViewById(R.id.Tv_Cultural_Title);\r\n\t\t\tvHolder.tvContent = (TextView) convertView\r\n\t\t\t\t\t.findViewById(R.id.Tv_QualityContent);\r\n\t\t\tvHolder.btnClick = (Button) convertView\r\n\t\t\t\t\t.findViewById(R.id.IvBtn_ContentThree);\r\n\t\t\tif (localInfos.size() - 1 == groupPosition) {\r\n\t\t\t\tvHolder.tvContent.setVisibility(View.VISIBLE);\r\n\t\t\t\tvHolder.btnClick.setText(null);\r\n\t\t\t\tvHolder.btnClick.setCompoundDrawables(null, null, draw, null);\r\n\t\t\t} else {\r\n\t\t\t\tvHolder.tvContent.setVisibility(View.GONE);\r\n\t\t\t}\r\n\r\n\t\t\tconvertView.setTag(vHolder);\r\n\t\t}\r\n\t\tViewHolder viewHolder = (ViewHolder) convertView.getTag();\r\n\t\tbindView(localInfo, viewHolder);\r\n\t\treturn convertView;\r\n\t}", "@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\tif(gridView.getVisibility() != View.VISIBLE){\n\t\t\t\t\t\n\t\t\t\t\tgridView.setVisibility(View.VISIBLE);\n \t \tdialPad_collapse_iv.setImageResource(R.drawable.ic_action_expand);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}", "public void mousePressed(MouseEvent me) {\n if (!table.isEnabled())\n return;\n \n // we're going to check if the single click was overtop of the\n // expander button and toggle the expansion of the row if it was\n \n // extract information about the location of the click\n final JTable table = (JTable) me.getSource();\n final Point clickPoint = me.getPoint();\n final int row = table.rowAtPoint(clickPoint);\n final int column = table.columnAtPoint(clickPoint);\n \n // ensure a valid cell has clicked\n if (row == -1 || column == -1)\n return;\n \n // translate the clickPoint to be relative to the rendered component\n final Rectangle cellRect = table.getCellRect(row, column, true);\n clickPoint.translate(-cellRect.x, -cellRect.y);\n \n // if a left-click occurred over the expand/collapse button\n final TreeTableCellPanel renderedPanel = TreeTableUtilities.prepareRenderer(me);\n boolean hitNode = true;\n if (renderedPanel != null) {\n Component hit = renderedPanel.findComponentAt(clickPoint);\n hitNode = hit == renderedPanel.getNodeComponent();\n }\n if (SwingUtilities.isLeftMouseButton(me) && renderedPanel != null && renderedPanel.isPointOverExpanderButton(clickPoint)) {\n treeList.getReadWriteLock().writeLock().lock();\n try {\n // expand/collapse the row if possible\n if (treeList.getAllowsChildren(row))\n TreeTableUtilities.toggleExpansion(table, treeList, row).run();\n } finally {\n treeList.getReadWriteLock().writeLock().unlock();\n }\n \n // return early and don't allow the delegate a chance to react to the mouse click\n return;\n }\n \n if (hitNode) {\n delegate.mousePressed(me);\n }\n }", "void expandChilds() {\n\t\t\tenumAndExpand(this.parentItem);\n\t\t}", "@Override\n public boolean onChildClick(ExpandableListView parent, View v,\n int groupPosition, int childPosition, long id) {\n Toast.makeText(\n getApplicationContext(),\n listDataHeader.get(groupPosition)\n + \" : \"\n + listDataChild.get(\n listDataHeader.get(groupPosition)).get(\n childPosition), Toast.LENGTH_SHORT)\n .show();\n return false;\n }", "@Override\n public boolean onChildClick(ExpandableListView parent, View v,\n int groupPosition, int childPosition, long id) {\n Toast.makeText(\n getApplicationContext(),\n listDataHeader.get(groupPosition)\n + \" : \"\n + listDataChild.get(\n listDataHeader.get(groupPosition)).get(\n childPosition), Toast.LENGTH_SHORT)\n .show();\n return false;\n }", "public ServiceLevelAction getCollapseAction();", "@Override\n public boolean onChildClick(ExpandableListView expandableListView, View view, int i, int i1, long l) {\n\n AlertDialog.Builder builder=new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(listDataHeader.get(i));\n builder.setMessage(listDataChild.get(listDataHeader.get(i)).get(i1));\n builder.setCancelable(true);\n builder.show();\n return false;\n }", "protected void collapseAll() {\n Activity a = getCurrentActivity();\n if (a instanceof SessionsExpandableListActivity) {\n SessionsExpandableListActivity sela = (SessionsExpandableListActivity) a;\n \n sela.collapseAll();\n Log.i(\"collapseAll()\", \"collapsed!\");\n }\n }", "@Override\n public boolean onChildClick(ExpandableListView parent, View v,\n int groupPosition, int childPosition, long id) {\n\n Utilities.SetLog(\"SELECTED ASK\",expandableListDetail.get(\n expandableListTitle.get(groupPosition)).get(\n childPosition).getRespuesta(),WSkeys.log);\n\n AlertDialog.Builder builder = new AlertDialog.Builder(HelpListActivity.this);\n\n builder.setMessage(expandableListDetail.get(\n expandableListTitle.get(groupPosition)).get(\n childPosition).getRespuesta())\n .setTitle(expandableListDetail.get(\n expandableListTitle.get(groupPosition)).get(\n childPosition).getPregunta());\n\n builder.setPositiveButton(R.string.aceptar, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked OK button\n dialog.dismiss();\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n return false;\n }", "@Override\n public void setExpanded(boolean isExpanded) {\n mIsExpanded = isExpanded;\n }" ]
[ "0.74979025", "0.73947006", "0.73375607", "0.73156124", "0.7278892", "0.72360146", "0.72127664", "0.72127664", "0.72127664", "0.72127664", "0.71970224", "0.719349", "0.71640784", "0.71392804", "0.7126017", "0.7119666", "0.7092268", "0.7092268", "0.7092268", "0.70872104", "0.7069643", "0.7069643", "0.7033803", "0.69872355", "0.69089675", "0.68311805", "0.6819587", "0.6810965", "0.67654014", "0.6636255", "0.66358936", "0.6625952", "0.65436125", "0.6476874", "0.64619154", "0.6430721", "0.64272326", "0.6378803", "0.634925", "0.63161856", "0.6294854", "0.61997867", "0.61220825", "0.609452", "0.6080105", "0.6068892", "0.60586435", "0.6041345", "0.60151464", "0.60073847", "0.5994929", "0.5953684", "0.59417146", "0.59188795", "0.58606243", "0.58508277", "0.5846112", "0.583539", "0.5830559", "0.5822161", "0.5821689", "0.5805181", "0.58037204", "0.57888854", "0.57888854", "0.57864946", "0.57629955", "0.57606125", "0.5759798", "0.57123154", "0.57037145", "0.57014585", "0.5700833", "0.56947744", "0.56940734", "0.56892586", "0.5680159", "0.5674864", "0.5667027", "0.56658596", "0.566389", "0.566389", "0.566389", "0.56625056", "0.5660804", "0.5620873", "0.56152415", "0.56152415", "0.5612516", "0.56122357", "0.5604718", "0.56026393", "0.5595104", "0.5590034", "0.5590034", "0.5583354", "0.55721337", "0.55673164", "0.5555964", "0.5552633" ]
0.7221501
6
/UdpPackage test1 = new UdpPackage("name", "data", InetAddress.getByName("127.0.0.1"), InetAddress.getByName("127.0.0.1"), 4000,4000); UdpPackage test2 = new UdpPackage("name", "hello world", InetAddress.getByName("127.0.0.1"), InetAddress.getByName("127.0.0.1"), 4000,4000); loggedPackages.addAll(test1, test2); not the correct address of the ESP of course, but this is where we'll store it
public void initialize() throws UnknownHostException { ESP_IPaddress = "127.0.0.1"; /*tableViewLog.setItems(loggedPackages); //set columns content logTime.setCellValueFactory( new PropertyValueFactory<UdpPackage,String>("formattedDate") ); logFromIP.setCellValueFactory( new PropertyValueFactory<UdpPackage, String>("fromIp") ); logFromPort.setCellValueFactory( new PropertyValueFactory<UdpPackage, Integer>("fromPort") ); logToIP.setCellValueFactory( new PropertyValueFactory<UdpPackage, String>("toIp") ); receiver = new UdpPackageReceiver(loggedPackages, 6000); */ // initializes a new thread with the sole purpose of handling UDP messages on port 6000. receiver = new UdpPackageReceiver(6000); new Thread(receiver).start(); try { sender = new DatagramSocket(); } catch (SocketException e) { e.printStackTrace(); } gc = canvas.getGraphicsContext2D(); bgc = batteryLevel.getGraphicsContext2D(); mgc = mainbackground.getGraphicsContext2D(); mgc.setFill(Color.DARKBLUE); mgc.setGlobalAlpha(0.5); for (int i=0; i<mainbackground.getWidth()/15; i++) { mgc.fillRect(i+(i*15), 0, 1, mainbackground.getHeight()); } for (int i=0; i<mainbackground.getHeight()/15; i++) { mgc.fillRect(0, i+(i*15), mainbackground.getWidth(), 1); } height=canvas.getHeight()-30; latitude=canvas.getWidth()/2-25; drone = new Drone(canvas, gc, latitude, height, 40, 20, receiver); new Thread(drone).start(); information = new Information(this, drone); new Thread(information).start(); takeoff=false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void UDPBroadcastTest() {\n\t\tWifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);\n\n\t\tif (wifi != null) {\n\t\t\tWifiManager.MulticastLock lock = wifi\n\t\t\t\t\t.createMulticastLock(\"Log_Tag\");\n\t\t\tlock.acquire();\n\n\t\t}\n\t\tint DISCOVERY_PORT = 1989;\n\t\tint TIMEOUT_MS = 5000;\n\n\t\ttry {\n\n\t\t\tDatagramSocket socket = new DatagramSocket(DISCOVERY_PORT);\n\t\t\tsocket.setBroadcast(true);\n\t\t\tsocket.setSoTimeout(TIMEOUT_MS);\n\t\t\tbyte[] buf = new byte[1024];\n\t\t\twhile (true) {\n\t\t\t\tDatagramPacket packet = new DatagramPacket(buf, buf.length,\n\t\t\t\t\t\tInetAddress.getByName(\"192.168.1.255\"), DISCOVERY_PORT);\n\t\t\t\tsocket.receive(packet);\n\t\t\t\tLog.e(\"nbc\", packet.getAddress().getHostAddress());\n\t\t\t\tString s = new String(packet.getData(), 0, packet.getLength());\n\t\t\t\tLog.e(\"nbc\", \"Received response \" + s);\n\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\tLog.e(\"nbc\", \"Could not send discovery request\", e);\n\t\t}\n\n\t}", "private static void ipv6() throws IOException {\n\t\t InetAddress src = InetAddress.getByName(\"127.0.0.1\");\n\t\t byte[] ipv4Src = src.getAddress();\n\t\t InetAddress dest = InetAddress.getByName(\"18.221.102.182\");\n\t\t byte[] ipv4Dest = dest.getAddress();\n\t\t \n\t\tbyte[] srcAddr = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (byte)255, (byte)255, ipv4Src[0], ipv4Src[1], ipv4Src[2], ipv4Src[3]};\n\t\tbyte[] destAddr = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (byte)255, (byte)255,ipv4Dest[0],ipv4Dest[1],ipv4Dest[2],ipv4Dest[3]};\n\n\t\tbyte[] packet;\n\t\tint payload = 2;\n\t\tint version = 6;\n\t\t\n\t\t// Send packet 12 times (12 packets)\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tint tLen = (40+payload);\t\t\t// Total_Length's default is 40; will increase each time.\n\t\t\tpacket = new byte[tLen];\n\t\t\t\n\t\t\tpacket[0] = (byte) (version << 4 & 0xFF);\n\t\t\tpacket[1] = 0; // Traffic_Class\n\t\t\tpacket[2] = 0; // Flow_Label;20bits\n\t\t\tpacket[3] = 0; // Flow_Label\n\t\t\tpacket[4] = (byte) (payload >>> 8); // Payload_Length;16bits\n\t\t\tpacket[5] = (byte)payload;\n\t\t\tpacket[6] = (byte)17; // Next_Header\n\t\t\tpacket[7] = (byte)20; // Hopt_Limit\n\n\t\t\t// Source_Address;128bits=16bytes\n\t\t\tfor (int s = 0; s < srcAddr.length; s++) \n\t\t\t\tpacket[s+8] = srcAddr[s];\t// Starts from packet[8]\n\t\t\t\n\t\t\t// Destination_Address;128bits=16bytes\n\t\t\tfor (int d = 0; d < destAddr.length; d++) \n\t\t\t\tpacket[d+24] = destAddr[d];\t// Starts from packet[24]\n\t\t\t\n\t\t\tfor(int k = 40;k<packet.length;k++)\n\t\t\t\tpacket[k] = 0;\n\t\t\t\n\t\t\t// Write to server, listen the 4byte response\n\t\t\tSystem.out.println(\"data length: \"+ payload);\n\t\t\tdos.write(packet);\n\t\t\tdos.flush();\n\t\t\t\n\t\t\tSystem.out.print(\"Response: \");\n\t\t\tfor(int r=0;r<4;r++)\n\t\t\t\tSystem.out.print(Integer.toHexString(dis.readByte()).replace(\"ff\", \"\").toUpperCase());\n\t\t\t\n\t\t\tSystem.out.println(\"\\n\");\n\t\t\tpayload *=2;\n\t\t}\n\t}", "private void readPacketFromDevice(FileInputStream inputStream, byte[] packet) throws VpnNetworkException, SocketException, PcapNativeException, NotOpenException, EOFException, TimeoutException {\n // Read the outgoing packet from the input stream.\n Log.d(\"DEBUG\",\"metodo readPacketFromDevice LocalVpnService\");\n PackageManager pm = this.getPackageManager();\n PackageInfo foregroundAppPackageInfo = null;\n\n String currentApp = \"NULL\";\n if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\n UsageStatsManager usm = (UsageStatsManager)this.getSystemService(Context.USAGE_STATS_SERVICE);\n long time = System.currentTimeMillis();\n List<UsageStats> appList = usm.queryUsageStats(UsageStatsManager.INTERVAL_DAILY, time - 1000*1000, time);\n if (appList != null && appList.size() > 0) {\n SortedMap<Long, UsageStats> mySortedMap = new TreeMap<Long, UsageStats>();\n for (UsageStats usageStats : appList) {\n mySortedMap.put(usageStats.getLastTimeUsed(), usageStats);\n }\n if (mySortedMap != null && !mySortedMap.isEmpty()) {\n currentApp = mySortedMap.get(mySortedMap.lastKey()).getPackageName();\n }\n }\n } else {\n ActivityManager am = (ActivityManager)this.getSystemService(Context.ACTIVITY_SERVICE);\n List<ActivityManager.RunningAppProcessInfo> tasks = am.getRunningAppProcesses();\n currentApp = tasks.get(0).processName;\n }\n\n AppLeak app = new AppLeak();\n try {\n foregroundAppPackageInfo = pm.getPackageInfo(currentApp, 0);\n System.out.println(\"NOME PACKAGEEE\"+foregroundAppPackageInfo.packageName);\n if(!foregroundAppPackageInfo.packageName.contains(\"privacychecker\")) {\n app.setAppName(foregroundAppPackageInfo.applicationInfo.loadLabel(pm).toString());\n app.setIcon(pm.getApplicationIcon(foregroundAppPackageInfo.packageName));\n }\n } catch (PackageManager.NameNotFoundException e) {\n }\n\n Log.e(\"adapter\", \"Current App in foreground is: \" + foregroundAppPackageInfo.applicationInfo.loadLabel(pm).toString());\n\n int length;\n\n try {\n length = inputStream.read(packet); //Lettura dalle lunghezza dell'array dei pacchetti\n } catch (IOException e) {\n throw new VpnNetworkException(\"Cannot read frm device\", e);\n }\n\n\n if (length == 0) {\n // TODO: Possibly change to exception\n Log.w(TAG, \"Got empty packet!\");\n return;\n }\n\n final byte[] readPacket = Arrays.copyOfRange(packet, 0, length);\n\n vpnWatchDog.handlePacket(readPacket); //Chiamata metodo per la lettura del pacchetto\n String hostname = dnsPacketProxy.handleDnsRequest(readPacket); //Chiamata metodo per la lettura del DNS del pacchetto\n\n boolean duplicate;\n\n if(!foregroundAppPackageInfo.packageName.contains(\"privacychecker\") && hostname.contains(\".\")) {\n duplicate = false;\n\n for(AppLeak applicazione: listaAppLeaks){\n String compare = applicazione.getHostname().substring(6);\n\n if(applicazione.getAppName().equals(foregroundAppPackageInfo.applicationInfo.loadLabel(pm).toString())) {\n if (applicazione.getHostname().substring(6).equals(hostname)) {\n duplicate = true;\n break;\n }\n }\n }\n if(!duplicate) {\n if (dnsPacketProxy.getRuleDatabase().isBlocked(hostname.toLowerCase(Locale.ENGLISH))) {\n app.setBlocked(true);\n app.setHostname(\"Host: \" + hostname);\n countBlocked++;\n\n try {\n Drawable drawable = pm.getApplicationIcon(foregroundAppPackageInfo.packageName);\n createNotifications(drawable,app.getAppName(),hostname);\n\n } catch (PackageManager.NameNotFoundException e) {\n }\n }\n\n else {\n app.setHostname(\"Host: \" + hostname);\n countPacket++;\n }\n\n listaAppLeaks.add(app);\n\n }\n\n }\n }", "public void startUDP() {\n try {\n DatagramSocket socket = new DatagramSocket(port);\n byte[] buf = new byte[256];\n while (running) {\n DatagramPacket packet = new DatagramPacket((sbyte[])(object) buf, buf.length);\n socket.receive(packet);\n upd_count++;\n packet = new DatagramPacket(buf, buf.length, packet.getAddress(), packet.getPort());\n String received = new String(packet.getData(), 0, packet.getLength());\n process(received.substring(0, received.indexOf('\\0')));\n buf = new byte[256];\n }\n socket.close();\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }", "public void createSocket() \n { \n try \n { \n socket = new DatagramSocket(); \n } \n catch (Exception ex) \n { \n System.out.println(\"UDPPinger Exception: \" + ex); \n } \n }", "public static void main(String[] args) {\n\t\t\n//\t String url=\"http://123.124.236.149\";\n//\t\tInteger port=8078;\n\t\t\n//\t\tString url=\"http://192.168.1.199\";\n//\t\tInteger port=8078;\n\t\t\n\t\tString url=\"http://gw2.gosmarthome.cn\";\n\t\tInteger port=8079;\n\t\t\n//\t\tString url=\"http://119.40.24.25\";\n//\t\tInteger port=8079;\n\t\t\n//\t\tString url=\"http://10.41.1.29\"; \n//\t\tInteger port=8086;\n\t\t\n//\t\t10.32.2.57 8078\n//\t\tString url=\"http://10.32.2.232\"; \n//\t\tInteger port=8078;\n\n\t\t\n\t\tString factoryId=\"gptest2015\";\n\t UDPClientDemo client=new UDPClientDemo(url,factoryId,port);\n\t try {\n\t\t\tclient.login();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void createThreadUdp(){\n System.out.println(\"dirport: \"+serverDirPort);\n System.out.println(\"udpPort: \"+myUdpPort);\n System.out.println(\"tcpPort: \"+myTcpPort);\n threadHeartbeat=new ThSendHeartBeat(myAddress,serverDirPort,myHeartServer);\n threadHeartbeat.start();\n\n }", "public void get()\n {\n Session session = new Session(\"udp:\"+\"\"+\"/161\", writer);\n\n // creating PDU\n session.getBulk(\"1.3.6.1.2.1.1.1\");\n session.getBulk(\"1.3.6.1.2.1.1.2\");\n\n List<String> oList = new ArrayList<String>();\n oList.add(\"1.3.6.1.2.1.25.3.2.1.3.768\");\n oList.add(\"1.3.6.1.2.1.25.3.2.1.3.770\");\n\n session.get(oList);\n\n\n // creating PDU\n session.walk(\"1.3.6.1.2.1.25.3.2.1.3\");\n\n // wait for all sessions to complete\n while (!session.isComplete())\n {\n session.printStats();\n try {\n Thread.currentThread();\n Thread.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }//sleep for 100 ms\n\n }\n session.printStats();\n writer.close();\n }", "@DSSource({DSSourceKind.NETWORK})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:36:07.243 -0500\", hash_original_method = \"E608923787A6482FF0ABAB03074C01F6\", hash_generated_method = \"7955BA736BD8AD783B98FFDED7E574D5\")\n \npublic LocalSocketAddress getLocalSocketAddress()\n {\n return localAddress;\n }", "protected void setupUpnp() {\n try {\n GatewayDiscover discover = new GatewayDiscover();\n Map<InetAddress, GatewayDevice> devices = discover.discover();\n for (Map.Entry<InetAddress, GatewayDevice> entry : devices.entrySet()) {\n GatewayDevice gw = entry.getValue();\n logger.info(\"Found a gateway device: local address = {}, external address = {}\",\n gw.getLocalAddress().getHostAddress(), gw.getExternalIPAddress());\n\n gw.deletePortMapping(config.p2pListenPort(), \"TCP\");\n gw.addPortMapping(config.p2pListenPort(), config.p2pListenPort(), gw.getLocalAddress().getHostAddress(),\n \"TCP\", \"Semux P2P network\");\n }\n } catch (IOException | SAXException | ParserConfigurationException e) {\n logger.info(\"Failed to add port mapping\", e);\n }\n }", "public UdpEndpoint( UdpKernel kernel, long id, SocketAddress address, DatagramSocket socket )\n {\n this.id = id;\n this.address = address;\n this.socket = socket;\n this.kernel = kernel;\n }", "private static byte[] createPacket(byte[] data, int destinationPort) {\n\n byte[] send = new byte[28];\n\n send[0] = (byte) ((4 << 4) + 5); // Version 4 and 5 words\n send[1] = 0; // TOS (Don't implement)\n send[2] = 0; // Total length\n send[3] = 22; // Total length\n send[4] = 0; // Identification (Don't implement)\n send[5] = 0; // Identification (Don't implement)\n send[6] = (byte) 0b01000000; // Flags and first part of Fragment offset\n send[7] = (byte) 0b00000000; // Fragment offset\n send[8] = 50; // TTL = 50\n send[9] = 0x11; // Protocol (UDP = 17)\n send[10] = 0; // CHECKSUM\n send[11] = 0; // CHECKSUM\n send[12] = (byte) 127; // 127.0.0.1 (source address)\n send[13] = (byte) 0; // 127.0.0.1 (source address)\n send[14] = (byte) 0; // 127.0.0.1 (source address)\n send[15] = (byte) 1; // 127.0.0.1 (source address)\n send[16] = (byte) 0x2d; // (destination address)\n send[17] = (byte) 0x32; // (destination address)\n send[18] = (byte) 0x5; // (destination address)\n send[19] = (byte) 0xee; // (destination address)\n\n short length = (short) (28 + data.length); // Quackulate the total length\n byte right = (byte) (length & 0xff);\n byte left = (byte) ((length >> 8) & 0xff);\n send[2] = left;\n send[3] = right;\n\n short checksum = calculateChecksum(send); // Quackulate the checksum\n\n byte second = (byte) (checksum & 0xff);\n byte first = (byte) ((checksum >> 8) & 0xff);\n send[10] = first;\n send[11] = second;\n\n /*\n * UDP Header\n * */\n short udpLen = (short) (8 + data.length);\n byte rightLen = (byte) (udpLen & 0xff);\n byte leftLen = (byte) ((udpLen >> 8) & 0xff);\n\n send[20] = (byte) 12; // Source Port\n send[21] = (byte) 34; // Source Port\n send[22] = (byte) ((destinationPort >> 8) & 0xff); // Destination Port\n send[23] = (byte) (destinationPort & 0xff); // Destination Port\n send[24] = leftLen; // Length\n send[25] = rightLen; // Length\n send[26] = 0; // Checksum\n send[27] = 0; // Checksum\n\n /*\n * pseudoheader + actual header + data to calculate checksum\n * */\n byte[] checksumArray = new byte[12 + 8]; // 12 = pseudoheader, 8 = UDP Header\n checksumArray[0] = send[12]; // Source ip address\n checksumArray[1] = send[13]; // Source ip address\n checksumArray[2] = send[14]; // Source ip address\n checksumArray[3] = send[15]; // Source ip address\n checksumArray[4] = send[16]; // Destination ip address\n checksumArray[5] = send[17]; // Destination ip address\n checksumArray[6] = send[18]; // Destination ip address\n checksumArray[7] = send[19]; // Destination ip address\n checksumArray[8] = 0; // Zeros for days\n checksumArray[9] = send[9]; // Protocol\n checksumArray[10] = send[24]; // Udp length\n checksumArray[11] = send[25]; // Udp length\n // end pseudoheader\n checksumArray[12] = send[20]; // Source Port\n checksumArray[13] = send[21]; // Source Port\n checksumArray[14] = send[22]; // Destination Port\n checksumArray[15] = send[23]; // Destination Port\n checksumArray[16] = send[24]; // Length\n checksumArray[17] = send[25]; // Length\n checksumArray[18] = send[26]; // Checksum\n checksumArray[19] = send[27]; // Checksum\n // end actual header\n checksumArray = concatenateByteArrays(checksumArray, data); // Append data\n\n short udpChecksum = calculateChecksum(checksumArray);\n byte rightCheck = (byte) (udpChecksum & 0xff);\n byte leftCheck = (byte) ((udpChecksum >> 8) & 0xff);\n\n send[26] = leftCheck; // Save checksum\n send[27] = rightCheck; // Save checksum\n\n send = concatenateByteArrays(send, data);\n\n return send;\n }", "public void sendUdpMessageToESP() {\n\n DatagramPacket packet = null;\n try {\n packet = new DatagramPacket(message.getBytes(), message.length(), InetAddress.getByName(ESP_IPaddress), 6900);\n sender.send(packet);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void savePaketdata(DatagramPacket udpPacket)throws IOException{\n // Get IP address and port.\n InetAddress address = udpPacket.getAddress();\n int port = udpPacket.getPort();\n // Get packet length\n int length = udpPacket.getLength();\n // Get the payload and print.\n ObjectInputStream iStream = new ObjectInputStream(new ByteArrayInputStream(udpPacket.getData()));\n try {\n Product product = (Product)iStream.readObject();\n if(product.getValueOfProduct() < MIN_VALUE_OF_PRODUCT){\n makeOrder(new SensorData(product,port,address,length));\n }\n saveSensorData(address,port,product,length);\n String tmp = \"Client buy: \" + \"0 \" + \"no\" + \" and pay \" + \"no\" + \" euro.\";\n sendAnswer(new SensorData(product,port,address,length),tmp);\n iStream.close();\n //printPacketData(address,port,length,product);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }", "@Test\n public void testReplyToRequestForUsIpv6() {\n Ip6Address theirIp = Ip6Address.valueOf(\"1000::ffff\");\n Ip6Address ourFirstIp = Ip6Address.valueOf(\"1000::1\");\n Ip6Address ourSecondIp = Ip6Address.valueOf(\"2000::2\");\n MacAddress firstMac = MacAddress.valueOf(1L);\n MacAddress secondMac = MacAddress.valueOf(2L);\n\n Host requestor = new DefaultHost(PID, HID2, MAC2, VLAN1, LOC1,\n Collections.singleton(theirIp));\n\n expect(hostService.getHost(HID2)).andReturn(requestor);\n expect(hostService.getHostsByIp(ourFirstIp))\n .andReturn(Collections.singleton(requestor));\n replay(hostService);\n replay(interfaceService);\n\n Ethernet ndpRequest = buildNdp(ICMP6.NEIGHBOR_SOLICITATION,\n MAC2,\n MacAddress.valueOf(\"33:33:ff:00:00:01\"),\n theirIp,\n ourFirstIp);\n\n proxyArp.reply(ndpRequest, LOC1);\n assertEquals(1, packetService.packets.size());\n\n Ethernet ndpReply = buildNdp(ICMP6.NEIGHBOR_ADVERTISEMENT,\n firstMac,\n MAC2,\n ourFirstIp,\n theirIp);\n verifyPacketOut(ndpReply, LOC1, packetService.packets.get(0));\n\n // Test a request for the second address on that port\n packetService.packets.clear();\n ndpRequest = buildNdp(ICMP6.NEIGHBOR_SOLICITATION,\n MAC2,\n MacAddress.valueOf(\"33:33:ff:00:00:01\"),\n theirIp,\n ourSecondIp);\n proxyArp.reply(ndpRequest, LOC1);\n assertEquals(1, packetService.packets.size());\n\n ndpReply = buildNdp(ICMP6.NEIGHBOR_ADVERTISEMENT,\n secondMac,\n MAC2,\n ourSecondIp,\n theirIp);\n verifyPacketOut(ndpReply, LOC1, packetService.packets.get(0));\n }", "public static BLDevice[] discoverDevices(InetAddress sourceIpAddr, int sourcePort, int timeout) throws IOException {\r\n boolean debug = log.isDebugEnabled();\r\n\r\n if (debug)\r\n log.debug(\"Discovering devices\");\r\n\r\n List<BLDevice> devices = new ArrayList<BLDevice>(50);\r\n\r\n if (debug)\r\n log.debug(\"Constructing DiscoveryPacket\");\r\n\r\n DiscoveryPacket dpkt = new DiscoveryPacket(sourceIpAddr, sourcePort);\r\n\r\n DatagramSocket sock = new DatagramSocket(sourcePort, sourceIpAddr);\r\n\r\n sock.setBroadcast(true);\r\n sock.setReuseAddress(true);\r\n\r\n byte[] sendBytes = dpkt.getData();\r\n DatagramPacket sendpack = new DatagramPacket(sendBytes, sendBytes.length,\r\n InetAddress.getByName(\"255.255.255.255\"), DISCOVERY_DEST_PORT);\r\n\r\n if (debug)\r\n log.debug(\"Sending broadcast\");\r\n\r\n sock.send(sendpack);\r\n\r\n byte[] receBytes = new byte[DISCOVERY_RECEIVE_BUFFER_SIZE];\r\n\r\n DatagramPacket recePacket = new DatagramPacket(receBytes, 0, receBytes.length);\r\n if (timeout == 0) {\r\n if (debug)\r\n log.debug(\"No timeout was set. Blocking thread until received\");\r\n log.debug(\"Waiting for datagrams\");\r\n\r\n sock.receive(recePacket);\r\n\r\n if (debug)\r\n log.debug(\"Received. Closing socket\");\r\n\r\n sock.close();\r\n\r\n String host = recePacket.getAddress().getHostAddress();\r\n Mac mac = new Mac(subbytes(receBytes, 0x3a, 0x40));\r\n short deviceType = (short) (receBytes[0x34] | receBytes[0x35] << 8);\r\n\r\n if (debug)\r\n log.debug(\"Info: host=\" + host + \" mac=\" + mac.getMacString() + \" deviceType=0x\"\r\n + Integer.toHexString(deviceType));\r\n log.debug(\"Creating BLDevice instance\");\r\n\r\n BLDevice inst = createInstance(deviceType, host, mac);\r\n\r\n if (inst != null) {\r\n if (debug)\r\n log.debug(\"Adding to found devices list\");\r\n\r\n devices.add(inst);\r\n } else if (debug) {\r\n log.debug(\"Cannot create instance, returned null, not adding to found devices list\");\r\n }\r\n } else {\r\n if (debug)\r\n log.debug(\"A timeout of \" + timeout + \" ms was set. Running loop\");\r\n\r\n long startTime = System.currentTimeMillis();\r\n long elapsed;\r\n while ((elapsed = System.currentTimeMillis() - startTime) < timeout) {\r\n if (debug)\r\n log.debug(\"Elapsed: \" + elapsed + \" ms\");\r\n log.debug(\"Socket timeout: timeout-elapsed=\" + (timeout - elapsed));\r\n\r\n sock.setSoTimeout((int) (timeout - elapsed));\r\n\r\n try {\r\n if (debug)\r\n log.debug(\"Waiting for datagrams\");\r\n\r\n sock.receive(recePacket);\r\n } catch (SocketTimeoutException e) {\r\n if (debug)\r\n log.debug(\"Socket timed out for \" + (timeout - elapsed) + \" ms\", e);\r\n\r\n break;\r\n }\r\n\r\n if (debug)\r\n log.debug(\"Received datagram\");\r\n\r\n String host = recePacket.getAddress().getHostAddress();\r\n Mac mac = new Mac(reverseBytes(subbytes(receBytes, 0x3a, 0x40)));\r\n short deviceType = (short) (receBytes[0x34] | receBytes[0x35] << 8);\r\n\r\n if (debug)\r\n log.debug(\"Info: host=\" + host + \" mac=\" + mac.getMacString() + \" deviceType=0x\"\r\n + Integer.toHexString(deviceType));\r\n log.debug(\"Creating BLDevice instance\");\r\n\r\n BLDevice inst = createInstance(deviceType, host, mac);\r\n\r\n if (inst != null) {\r\n if (debug)\r\n log.debug(\"Adding to found devices list\");\r\n\r\n devices.add(inst);\r\n } else if (debug) {\r\n log.debug(\"Cannot create instance, returned null, not adding to found devices list\");\r\n }\r\n }\r\n }\r\n\r\n if (debug)\r\n log.debug(\"Converting list to array: \" + devices.size());\r\n\r\n BLDevice[] out = new BLDevice[devices.size()];\r\n\r\n for (int i = 0; i < out.length; i++) {\r\n out[i] = devices.get(i);\r\n }\r\n\r\n if (debug)\r\n log.debug(\"End of device discovery: \" + out.length);\r\n \r\n sock.close();\r\n\r\n return out;\r\n }", "interface MyConfig {\n int teamNumber = 5;\n int basePort = 5000;\n int udpPort = teamNumber + basePort;\n String interfaceName = \"wlan0\";\n // String broadcastAddress = \"192.168.24.255\";\n //String broadcastAddress = \"localhost\";\n}", "private static DatagramPacket createPacket(byte[] data, SocketAddress remote) {\r\n\t\tDatagramPacket packet = new DatagramPacket(data, data.length, remote);\r\n\t\treturn packet;\r\n\t}", "public interface IUpnpService {\n /**\n * Discover boolean.\n *\n * @param milliseconds the milliseconds\n * @return the boolean\n * @throws NotDiscoverUpnpGatewayException the not discover upnp gateway exception\n */\n boolean discover(int milliseconds) throws NotDiscoverUpnpGatewayException;\n\n /**\n * Discover boolean.\n *\n * @return the boolean\n * @throws NotDiscoverUpnpGatewayException the not discover upnp gateway exception\n */\n boolean discover() throws NotDiscoverUpnpGatewayException;\n\n /**\n * Is discovered boolean.\n *\n * @return the boolean\n */\n boolean isDiscovered();\n\n /**\n * Gets port mapping info.\n *\n * @param externalPort the external port\n * @param protocol the protocol\n * @return the port mapping info\n * @throws NotDiscoverUpnpGatewayException the not discover upnp gateway exception\n * @throws UpnpException the upnp exception\n */\n PortMappingInfo getPortMappingInfo(int externalPort, ProtocolEnum protocol) throws NotDiscoverUpnpGatewayException, UpnpException;\n\n /**\n * Gets port mapping count.\n *\n * @return the port mapping count\n * @throws NotDiscoverUpnpGatewayException the not discover upnp gateway exception\n * @throws UpnpException the upnp exception\n */\n Integer getPortMappingCount() throws NotDiscoverUpnpGatewayException, UpnpException;\n\n /**\n * Gets port mapping info by index.\n *\n * @param index the index\n * @return the port mapping info by index\n * @throws NotDiscoverUpnpGatewayException the not discover upnp gateway exception\n * @throws UpnpException the upnp exception\n */\n PortMappingInfo getPortMappingInfoByIndex(int index) throws NotDiscoverUpnpGatewayException, UpnpException;\n\n /**\n * Gets all mapping infos.\n *\n * @return the all mapping infos\n * @throws NotDiscoverUpnpGatewayException the not discover upnp gateway exception\n * @throws UpnpException the upnp exception\n */\n List<PortMappingInfo> getAllMappingInfos() throws NotDiscoverUpnpGatewayException, UpnpException;\n\n /**\n * Gets internal host address.\n *\n * @return the internal host address\n * @throws NotDiscoverUpnpGatewayException the not discover upnp gateway exception\n */\n String getInternalHostAddress() throws NotDiscoverUpnpGatewayException;\n\n /**\n * Gets external ip address.\n *\n * @return the external ip address\n * @throws NotDiscoverUpnpGatewayException the not discover upnp gateway exception\n * @throws UpnpException the upnp exception\n */\n String getExternalIPAddress() throws NotDiscoverUpnpGatewayException, UpnpException;\n\n /**\n * Add port mapping boolean.\n *\n * @param portMappingInfo the port mapping info\n * @return the boolean\n * @throws NotDiscoverUpnpGatewayException the not discover upnp gateway exception\n * @throws UpnpException the upnp exception\n */\n boolean addPortMapping(PortMappingInfo portMappingInfo) throws NotDiscoverUpnpGatewayException, UpnpException;\n\n /**\n * Delete port mapping boolean.\n *\n * @param externalPort the external port\n * @param protocol the protocol\n * @return the boolean\n * @throws NotDiscoverUpnpGatewayException the not discover upnp gateway exception\n * @throws UpnpException the upnp exception\n */\n boolean deletePortMapping(int externalPort, ProtocolEnum protocol) throws NotDiscoverUpnpGatewayException, UpnpException;\n}", "@Override\n public void startUp(FloodlightModuleContext context)\n throws FloodlightModuleException {\n floodlightProvider = context\n .getServiceImpl(IFloodlightProviderService.class);\n\n floodlightProvider.addOFMessageListener(OFType.PACKET_IN, this);\n\n BufferedReader reader;\n try\n {\n //read in internal ip addresses\n reader = new BufferedReader(new FileReader(new File(this.insideIPsFile)));\n String temp = null;\n while ((temp = reader.readLine()) != null)\n {\n if( !temp.startsWith(\"//\") ){\n inside_ip.add(IPv4Address.of(temp));\n // System.out.println (IPv4Address.of(temp));\n }\n }\n reader.close();\n\n //read in externally visible ip addresses\n reader = new BufferedReader(new FileReader(new File(this.externalIPFile)));\n temp = null;\n while ((temp = reader.readLine()) != null)\n {\n if( !temp.startsWith(\"//\") ){\n external_ip = IPv4Address.of(temp);\n break;\n }\n }\n reader.close();\n\n //read in NAT switch id, inside ports, outside ports\n reader = new BufferedReader(new FileReader(new File(this.natInfoFile)));\n temp = null;\n while ((temp = reader.readLine()) != null)\n {\n if( !temp.startsWith(\"//\") ){\n String[] nat_info = temp.split( \",\" );\n\n nat_swId = DatapathId.of(Long.valueOf( nat_info[0] ));\n\n for( String internal_port: nat_info[1].trim().split(\" \") ){\n nat_internal_ports.add( TransportPort.of( Integer.parseInt(internal_port)) );\n }\n\n for( String external_port: nat_info[2].trim().split(\" \") ){\n nat_external_ports.add( TransportPort.of( Integer.parseInt(external_port)) );\n }\n break;\n }\n }\n reader.close();\n\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n\n\n }", "public UdpPacketSender() {\r\n\t\ttry {\r\n\t\t\tthis.socket = new DatagramSocket();\r\n\t\t} catch (final SocketException e) {\r\n\t\t\tlog.log(Level.SEVERE, e.getMessage(), e);\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws Exception {\n if (args.length == 0) {\n Log.info(\"UdpTest <listenPort> :start server\");\n Log.info(\"UdpTest <remoteHost> <remotePort> [size]: start client.\");\n return;\n }\n int udpMax = 4096;\n byte value = (byte) 0xA5;\n\n if (args.length == 1) {\n // server\n int listenPort = Integer.parseInt(args[0]);\n DatagramSocket udpSocket = new DatagramSocket(listenPort);\n Log.info(\"start receive. port=\" + listenPort);\n while (true) {\n byte[] buf = new byte[udpMax];\n DatagramPacket recPacket = new DatagramPacket(buf, udpMax);\n udpSocket.receive(recPacket);\n // Log.info(\"received: \" + recPacket); // what will toString be? useless.\n String message = null;\n if (recPacket.getLength() < 50) {\n message = new String(recPacket.getData(), recPacket.getOffset(), recPacket.getLength());\n }\n else {\n for (int i = 0; i < recPacket.getLength(); i++) {\n if (value != recPacket.getData()[recPacket.getOffset() + i]) {\n throw new RuntimeException(\"got wrong byte. pos=\" + i);\n }\n }\n message = recPacket.getLength() + \"bytes\";\n }\n Log.info(\"received: \" + recPacket.getAddress() + \":\" + recPacket.getPort() + \" msg=\" + message);\n }\n // there is no \"close\". server is never \"done\".\n }\n if (args.length >= 2) {\n // client\n String remoteHost = args[0];\n InetAddress remoteAddress = InetAddress.getByName(remoteHost);\n int remotePort = Integer.parseInt(args[1]);\n // int localPort = remotePort;\n DatagramSocket udpSocket = new DatagramSocket(); // \"any\" local port. don't care.\n if (args.length > 2) {\n int size = Integer.parseInt(args[2]);\n byte[] buf = new byte[size];\n for (int i = 0; i < size; i++) { // fill array\n buf[i] = value;\n }\n DatagramPacket sendPacket = new DatagramPacket(buf, buf.length, remoteAddress, remotePort);\n udpSocket.send(sendPacket);\n }\n\n else { // send 5 \"text\" packages\n for (int i = 0; i < 5; i++) {\n if (i > 0) {\n Thread.sleep(1000);\n }\n String msg = \"hello_\" + i;\n byte[] buf = msg.getBytes();\n DatagramPacket sendPacket = new DatagramPacket(buf, buf.length, remoteAddress, remotePort);\n udpSocket.send(sendPacket);\n Log.info(\"sent: \" + msg);\n }\n }\n }\n }", "private DatagramPacket injectSourceAndDestinationData(DatagramPacket packet)\n\t{\n\t\t\n\t\tbyte[] ipxBuffer = Arrays.copyOf(packet.getData(), packet.getLength());\n\t\tint bufferLength = ipxBuffer.length + 9;\n\t\t\n\t\tbyte[] wrappedBuffer = Arrays.copyOf(ipxBuffer, bufferLength);\n\t\twrappedBuffer[bufferLength - 9] = 0x01;\n\t\twrappedBuffer[bufferLength - 8] = (byte) (packet.getAddress().getAddress()[0]);\n\t\twrappedBuffer[bufferLength - 7] = (byte) (packet.getAddress().getAddress()[1]);\n\t\twrappedBuffer[bufferLength - 6] = (byte) (packet.getAddress().getAddress()[2]);\n\t\twrappedBuffer[bufferLength - 5] = (byte) (packet.getAddress().getAddress()[3]);\n\t\twrappedBuffer[bufferLength - 4] = (byte) (packet.getPort() >> 8);\n\t\twrappedBuffer[bufferLength - 3] = (byte) packet.getPort();\n\t\twrappedBuffer[bufferLength - 2] = (byte) (ipxSocket.getLocalPort() >> 8);\n\t\twrappedBuffer[bufferLength - 1] = (byte) ipxSocket.getLocalPort();\n\t\t\n\t\treturn new DatagramPacket(wrappedBuffer, bufferLength);\n\t}", "public TeIpv6() {\n }", "public void dump() {\n System.out.println(\"ID : \"+hostID);\n for (int i=0; i<hostAddresses.size(); i++) System.out.println(\" - addresse : \"+hostAddresses.elementAt(i).getNormalizedAddress());\n System.out.println(\"CPU : \"+cpuLoad);\n System.out.println(\"Memoire : \"+memoryLoad);\n System.out.println(\"Batterie : \"+batteryLevel);\n System.out.println(\"Threads : \"+numberOfThreads);\n System.out.println(\"CMs : \"+numberOfBCs);\n System.out.println(\"connecteurs : \"+numberOfConnectors);\n System.out.println(\"connecteurs entree reseau : \"+numberOfConnectorsNetworkInputs);\n System.out.println(\"connecteurs sortie reseau : \"+numberOfConnectorsNetworkOutputs);\n System.out.println(\"Traffic PF entree : \"+networkPFInputTraffic);\n System.out.println(\"Traffic PF sortie : \"+networkPFOutputTraffic);\n System.out.println(\"Traffic application entree : \"+networkApplicationInputTraffic);\n System.out.println(\"Traffic application sortie : \"+networkApplicationOutputTraffic);\n }", "private void print_addr() {\n try(final DatagramSocket socket = new DatagramSocket()){\n socket.connect(InetAddress.getByName(\"8.8.8.8\"), 10002);\n System.out.println(socket.getLocalAddress().getHostAddress()+\":\"+port);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) throws UnknownHostException, IOException{\n\n \n InetAddress group = InetAddress.getByName(\"224.0.0.100\");\n MulticastSocket s = new MulticastSocket(5000);\ntry {\n \n\n s.joinGroup(group);\n \n //Abrimos a interfaz\n Interfaz interfaz = new Interfaz(s,group); \n interfaz.setVisible(true);\n\n}catch (SocketException e){System.out.println(\"Socket: \" + e.getMessage());\n}catch (IOException e){System.out.println(\"IO: \" + e.getMessage());\n}finally{\n }\n}", "public static void main(String[] args) throws IOException\n {\n DatagramSocket ds=new DatagramSocket(2345);\n String msg;\n byte[] buf=new byte[100];\n\n while(true)\n {\n DatagramPacket rdp=new DatagramPacket(buf,buf.length);\n ds.receive(rdp);\n msg=new String(rdp.getData(),rdp.getOffset(),rdp.getLength());\n\n System.out.println(msg);\n }\n\n }", "private static ImmutableList<TransportInfo> defaultTransports(Universe universe) {\n\t\treturn ImmutableList.of(\n\t\t\tTransportInfo.of(\n\t\t\t\tUDPConstants.UDP_NAME,\n\t\t\t\tDynamicTransportMetadata.of(\n\t\t\t\t\tUDPConstants.METADATA_UDP_HOST, PublicInetAddress.getInstance()::toString,\n\t\t\t\t\tUDPConstants.METADATA_UDP_PORT, () -> Integer.toString(universe.getPort())\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "public interface UdpCallback {\n public void onReceive(int port, byte[] data, int length);\n}", "public MAVLinkPacket pack() {\n MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH);\n packet.sysid = 255;\n packet.compid = 190;\n packet.msgid = MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS;\n\n packet.payload.putUnsignedLong(time_usec);\n\n packet.payload.putUnsignedInt(uptime);\n\n packet.payload.putUnsignedInt(ram_usage);\n\n packet.payload.putUnsignedInt(ram_total);\n\n\n for (int i = 0; i < storage_type.length; i++) {\n packet.payload.putUnsignedInt(storage_type[i]);\n }\n\n\n for (int i = 0; i < storage_usage.length; i++) {\n packet.payload.putUnsignedInt(storage_usage[i]);\n }\n\n\n for (int i = 0; i < storage_total.length; i++) {\n packet.payload.putUnsignedInt(storage_total[i]);\n }\n\n\n for (int i = 0; i < link_type.length; i++) {\n packet.payload.putUnsignedInt(link_type[i]);\n }\n\n\n for (int i = 0; i < link_tx_rate.length; i++) {\n packet.payload.putUnsignedInt(link_tx_rate[i]);\n }\n\n\n for (int i = 0; i < link_rx_rate.length; i++) {\n packet.payload.putUnsignedInt(link_rx_rate[i]);\n }\n\n\n for (int i = 0; i < link_tx_max.length; i++) {\n packet.payload.putUnsignedInt(link_tx_max[i]);\n }\n\n\n for (int i = 0; i < link_rx_max.length; i++) {\n packet.payload.putUnsignedInt(link_rx_max[i]);\n }\n\n\n for (int i = 0; i < fan_speed.length; i++) {\n packet.payload.putShort(fan_speed[i]);\n }\n\n\n packet.payload.putUnsignedByte(type);\n\n\n for (int i = 0; i < cpu_cores.length; i++) {\n packet.payload.putUnsignedByte(cpu_cores[i]);\n }\n\n\n for (int i = 0; i < cpu_combined.length; i++) {\n packet.payload.putUnsignedByte(cpu_combined[i]);\n }\n\n\n for (int i = 0; i < gpu_cores.length; i++) {\n packet.payload.putUnsignedByte(gpu_cores[i]);\n }\n\n\n for (int i = 0; i < gpu_combined.length; i++) {\n packet.payload.putUnsignedByte(gpu_combined[i]);\n }\n\n\n packet.payload.putByte(temperature_board);\n\n\n for (int i = 0; i < temperature_core.length; i++) {\n packet.payload.putByte(temperature_core[i]);\n }\n\n\n return packet;\n }", "public static void main(String[] args) throws Exception {\n sourceAddress = InetAddress.getLocalHost();\n channelAddress = InetAddress.getLocalHost();\n\n // Parse command line arguments\n for(int i = 0; i < args.length; i++)\n {\n if (\"-h\".equals(args[i])) {\n System.out.println(USAGE);\n return;\n } else if (\"-d\".equals(args[i])) {\n // the next string is the destination address\n i++;\n hipsterSendPort = Integer.parseInt(args[i]);\n } else if (\"-p\".equals(args[i])) {\n // the next string is my port\n i++;\n udpListenPort = Integer.parseInt(args[i]);\n } else if (\"-dl\".equals(args[i])) {\n // the test measures also the time of packet reception\n printDl = true;\n } else if (\"-f\".equals(args[i])) {\n // the next string is the filename\n i++;\n filename = args[i];\n }\n }\n\n // Initialize the UDP sockets\n DatagramSocket receiverSocket = new DatagramSocket(udpListenPort);\n DatagramSocket senderSocket = new DatagramSocket();\n\n // Prepare the map that will be used to store the file\n Map<Integer, byte[]> map = new HashMap<Integer, byte[]>();\n\n // This checklist is used to keep track of which packets we have received\n boolean[] checklist = new boolean[10];\n\n // Variables that keep track of the speed at which we receive data\n long startTime = System.currentTimeMillis();\n long dataReceived = 0;\n\n // This will be the last sequence number\n int etxSn = 0;\n\n /*\n * Start executing the algorithm\n */\n boolean waitingForData = true;\n\n while (waitingForData) {\n\n\n // Listen and wait for new data to arrive\n DatagramPacket datagram = listenOnSocket(receiverSocket);\n long recpTime = System.currentTimeMillis();\n packetRec++;\n\n // Analyze the packet\n HipsterPacket hipsterPacket = new HipsterPacket();\n hipsterPacket = hipsterPacket.fromDatagram(datagram);\n int sn = hipsterPacket.getSequenceNumber();\n if(printDl == true) {\n System.out.println(\"sn \" + sn + \" time \" + recpTime);\n }\n\n // Adjust time measurements\n if (dataReceived == 0)\n startTime = System.currentTimeMillis();\n byte[] data = hipsterPacket.getPayload();\n dataReceived += datagram.getLength(); // Counter of the received bytes\n\n // Print sn of the received packet (debugging purposes)\n //System.out.println(\"Received packet of sequence number: \" + sn);\n\n // Mark packet as received in the checklist\n if (sn < checklist.length-1) {\n checklist[sn] = true;\n } else {\n //System.out.println(\"Expanding checklist...\");\n boolean[] newchecklist = new boolean[2*sn];\n System.arraycopy(checklist, 0, newchecklist, 0, checklist.length);\n checklist = newchecklist;\n checklist[sn] = true;\n }\n\n // Check whether the packet has the ETX flag\n if (hipsterPacket.isEtx()) {\n waitingForData = false;\n etxSn = sn;\n }\n else {\n // Add the packet to the map using the SN as key\n map.put(sn, data);\n //System.out.println(\"Added packet of sequence number: \" + sn);\n }\n\n // Craft the ACK\n DatagramPacket ack = craftAck(sn);\n ack.setAddress(channelAddress);\n ack.setPort(udpSendPort);\n\n // Send the ACK\n senderSocket.send(ack);\n }\n\n // Calculate data arrival rate\n /*\n long elapsed = System.currentTimeMillis() - startTime;\n long speed = dataReceived / elapsed;\n\n System.out.println(\"Bytes received: \" + dataReceived);\n System.out.println(\"Elapsed time: \" + elapsed + \"ms (\" + speed +\n \"KBps)\");\n\n // Print some debug info\n System.out.println(\"Etx packet had SN: \" + etxSn);\n int storedMappings = map.size();\n System.out.println(\"Number of mappings stored: \" + storedMappings);\n\n int lostPackets = 0;\n for (int i = 0; i < etxSn; i++)\n if (checklist[i] == false) {\n System.out.println(\"Packet \" + i + \" was not received\");\n lostPackets++;\n }\n\n System.out.println(lostPackets + \" packets lost in total\");\n */\n\n System.out.println(\"received packets \" + packetRec);\n\n /*\n * Reorder and write output file\n */\n\n // Order elements by adding received data in a treemap\n Map<Integer, byte[]> orderedMap = new TreeMap<Integer, byte[]>();\n orderedMap.putAll(map);\n map = null; // Free up memory space\n\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n\n for(Map.Entry<Integer,byte[]> entry : orderedMap.entrySet()) {\n Integer integerKey = entry.getKey();\n byte[] value = entry.getValue();\n\n stream.write(value, 0, value.length);\n }\n\n // Write the stream to a file\n try{\n // Open stream\n FileOutputStream outputStream = new FileOutputStream (filename);\n\n // Write to file\n try{\n stream.writeTo(outputStream);\n }\n catch(Exception e) {\n System.out.println(e.getMessage());\n }\n // Close stream\n finally{\n outputStream.close();\n }\n }\n catch (Exception e) {\n System.out.println(e.getMessage());\n }\n\n return;\n }", "@Subscribe(threadMode = ThreadMode.MAIN)\n public void onNetworkInfoReceived(OnReceiverNetInfoEvent event){\n\n WifiP2pInfo info = event.getInfo();\n\n // InetAddress from WifiP2pInfo struc.\n groupOwnerAddress = info.groupOwnerAddress.getHostAddress();\n // String port = \"8888\";\n\n\n // After the group negotiation, we can determine the group owner\n // (server).\n if(info.groupFormed && info.isGroupOwner){\n Toast.makeText(getContext(), \"Group formed. Host\", Toast.LENGTH_SHORT).show();\n if(peersDialog.isShowing())peersDialog.dismiss();\n\n // starting a data thread with the latest connected device\n Wifip2pService mService = new Wifip2pService(getContext(), mHandler,port, true, groupOwnerAddress);\n // assign the name of the latest connect device to this thread so we keep track\n mService.deviceName = devicesConnected.get(devicesConnected.size() - 1);\n connectionThreads.add(mService);\n\n\n // One common case is creating a group owner thread and accepting\n // incoming connections.\n } else if(info.groupFormed){\n Toast.makeText(getContext(), \"Connected as Peer\", Toast.LENGTH_SHORT).show();\n if(peersDialog.isShowing())peersDialog.dismiss();\n\n // starting a data thread with the owner\n Wifip2pService mService = new Wifip2pService(getContext(), mHandler, port, false, groupOwnerAddress);\n mService.deviceName = devicesConnected.get(devicesConnected.size() - 1);\n connectionThreads.add(mService);\n\n }\n\n }", "public interface CLibrary extends LibCAPI, Library {\n\n int AI_CANONNAME = 2;\n\n int UT_LINESIZE = 32;\n int UT_NAMESIZE = 32;\n int UT_HOSTSIZE = 256;\n int LOGIN_PROCESS = 6; // Session leader of a logged in user.\n int USER_PROCESS = 7; // Normal process.\n\n @FieldOrder({ \"sa_family\", \"sa_data\" })\n class Sockaddr extends Structure {\n public short sa_family;\n public byte[] sa_data = new byte[14];\n\n public static class ByReference extends Sockaddr implements Structure.ByReference {\n }\n }\n\n @FieldOrder({ \"ai_flags\", \"ai_family\", \"ai_socktype\", \"ai_protocol\", \"ai_addrlen\", \"ai_addr\", \"ai_canonname\",\n \"ai_next\" })\n class Addrinfo extends Structure {\n public int ai_flags;\n public int ai_family;\n public int ai_socktype;\n public int ai_protocol;\n public int ai_addrlen;\n public Sockaddr.ByReference ai_addr;\n public String ai_canonname;\n public ByReference ai_next;\n\n public static class ByReference extends Addrinfo implements Structure.ByReference {\n }\n\n public Addrinfo() {\n }\n\n public Addrinfo(Pointer p) {\n super(p);\n read();\n }\n }\n\n /*\n * Between macOS and FreeBSD there are multiple versions of some tcp/udp/ip\n * stats structures. Since we only need a few of the hundreds of fields, we can\n * improve performance by selectively reading the ints from the appropriate\n * offsets, which are consistent across the structure. These classes include the\n * common fields and offsets.\n */\n\n class BsdTcpstat {\n public int tcps_connattempt; // 0\n public int tcps_accepts; // 4\n public int tcps_drops; // 12\n public int tcps_conndrops; // 16\n public int tcps_sndpack; // 64\n public int tcps_sndrexmitpack; // 72\n public int tcps_rcvpack; // 104\n public int tcps_rcvbadsum; // 112\n public int tcps_rcvbadoff; // 116\n public int tcps_rcvmemdrop; // 120\n public int tcps_rcvshort; // 124\n }\n\n class BsdUdpstat {\n public int udps_ipackets; // 0\n public int udps_hdrops; // 4\n public int udps_badsum; // 8\n public int udps_badlen; // 12\n public int udps_opackets; // 36\n public int udps_noportmcast; // 48\n public int udps_rcv6_swcsum; // 64\n public int udps_snd6_swcsum; // 89\n }\n\n class BsdIpstat {\n public int ips_total; // 0\n public int ips_badsum; // 4\n public int ips_tooshort; // 8\n public int ips_toosmall; // 12\n public int ips_badhlen; // 16\n public int ips_badlen; // 20\n public int ips_delivered; // 56\n }\n\n class BsdIp6stat {\n public long ip6s_total; // 0\n public long ip6s_localout; // 88\n }\n\n /**\n * Returns the process ID of the calling process. The ID is guaranteed to be\n * unique and is useful for constructing temporary file names.\n *\n * @return the process ID of the calling process.\n */\n int getpid();\n\n /**\n * Given node and service, which identify an Internet host and a service,\n * getaddrinfo() returns one or more addrinfo structures, each of which contains\n * an Internet address that can be specified in a call to bind(2) or connect(2).\n *\n * @param node\n * a numerical network address or a network hostname, whose network\n * addresses are looked up and resolved.\n * @param service\n * sets the port in each returned address structure.\n * @param hints\n * specifies criteria for selecting the socket address structures\n * returned in the list pointed to by res.\n * @param res\n * returned address structure\n * @return 0 on success; sets errno on failure\n */\n int getaddrinfo(String node, String service, Addrinfo hints, PointerByReference res);\n\n /**\n * Frees the memory that was allocated for the dynamically allocated linked list\n * res.\n *\n * @param res\n * Pointer to linked list returned by getaddrinfo\n */\n void freeaddrinfo(Pointer res);\n\n /**\n * Translates getaddrinfo error codes to a human readable string, suitable for\n * error reporting.\n *\n * @param e\n * Error code from getaddrinfo\n * @return A human-readable version of the error code\n */\n String gai_strerror(int e);\n\n /**\n * Rewinds the file pointer to the beginning of the utmp file. It is generally a\n * good idea to call it before any of the other functions.\n */\n void setutxent();\n\n /**\n * Closes the utmp file. It should be called when the user code is done\n * accessing the file with the other functions.\n */\n void endutxent();\n}", "UDPInstance() {\n this(null, null, null, null);\n }", "public static void main(String[] args) {\n try {\n String servhostname=\"localhost\";\n //String servhostname=\"133.14.44.133\";//ここに隣の人のアドレスを入れる。\n\n InetAddress serverAddress = InetAddress.getByName(servhostname);\n String message=\"abc\";\n byte[] bytesToSend = message.getBytes();\n\n System.out.println(\"sending msg is \"+message);\n //int serverPort = Integer.parseInt(portnumstr);\n int serverPort = 5000;\n DatagramSocket socket = new DatagramSocket();\n DatagramPacket sendPacket = new DatagramPacket(bytesToSend, bytesToSend.length, serverAddress, serverPort);\n socket.send(sendPacket);\n socket.close();\n\n } catch (UnknownHostException e) {\n e.printStackTrace();\n } catch (SocketException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }//try catch end\n\n\n try {\n final int DMAX = 15;\n\n int serverPort = 5001;\n System.out.println(\"UDP client is waiting replay at \" + serverPort);\n DatagramSocket socket = new DatagramSocket(serverPort);\n DatagramPacket receivePacket = new DatagramPacket(\n new byte[DMAX], DMAX);\n\n socket.receive(receivePacket);\n String replaymessage=new String(receivePacket.getData());\n System.out.println(\"Receiced Packet Message is \"\n +replaymessage );\n\n socket.close();\n\n } catch (UnknownHostException e) {\n e.printStackTrace();\n } catch (SocketException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }//try end\n\n\n\n\n\n\n }", "private void initSocket() {\n try {\n rtpSocket = new DatagramSocket(localRtpPort);\n rtcpSocket = new DatagramSocket(localRtcpPort);\n } catch (Exception e) {\n System.out.println(\"RTPSession failed to obtain port\");\n }\n\n rtpSession = new RTPSession(rtpSocket, rtcpSocket);\n rtpSession.RTPSessionRegister(this, null, null);\n\n rtpSession.payloadType(96);//dydnamic rtp payload type for opus\n\n //adding participant, where to send traffic\n Participant p = new Participant(remoteIpAddress, remoteRtpPort, remoteRtcpPort);\n rtpSession.addParticipant(p);\n }", "public void bonjuor() throws IOException {\n\t\tint port = 4445;\n\t\t\n\tDatagramSocket socket = new DatagramSocket(port);\n\t\t\n\n // Create a buffer to read datagrams into. If a\n // packe is larger than this buffer, the\n // excess will simply be discarded!\n byte[] buffer = new byte[10];\n String address = InetAddress.getLocalHost().getHostName();\n byte[] out_buffer = address.getBytes();\n \n \n // Create a packet to receive data into the buffer\n DatagramPacket packet = new DatagramPacket(buffer, buffer.length);\n // Now loop forever, waiting to receive packets and printing them.\n while (true) {\n // Wait to receive a datagram\n \t socket.receive(packet);\n \t InetAddress connected_ip = packet.getAddress();\n \t String in_data = new String(packet.getData(),StandardCharsets.UTF_8);\n \t \n \t System.out.println(\"IP: \" + connected_ip + \" said \"+ in_data);\n \t \n \t if(in_data.equals(\"IP request\")){\n \t DatagramPacket send_packet = new DatagramPacket(out_buffer,out_buffer.length,connected_ip,4446);\n \t\t socket.send(send_packet);\n \t\t break;\n \t } \t \n }\n socket.close();\n\t}", "public DNSUDPTransport() {\r\n\t\tlistHostPort = new ArrayList();\r\n\t\tconnTimeout = 0;\r\n\t}", "public static List<IOTAddress> discoverIOTDevicesSyn() {\n\n\t\tAbsTaskSyn<List<IOTAddress>> udpSocketTask = new UDPSocketTask(\n\t\t\t\t\"connect task\", -1, true, broadcastAddress, data);\n\n\t\tmThreadPool.executeSyn(udpSocketTask, CONSTANTS_DYNAMIC.UDP_BROADCAST_TIMEOUT_DYNAMIC, TimeoutUnit);\n\n\t\tList<IOTAddress>responseList = udpSocketTask.getResult();\n\n\t\treturn responseList;\n\t}", "@Option int getLocalPortForUdpLinkLayer();", "public void receivePackets() throws IOException {\n while (!Thread.interrupted()) {\n// long end = System.nanoTime();\n// System.out.println(\"recp2 \" + received + \" bytes in \" + (end - start)/1000 + \"mks \");\n\n byte[] packet = slip.recvPacket();\n\n if (packet != null && packet.length > 0) {\n// received = packet.length;\n// start = System.nanoTime();\n\n try {\n int ipVer = IP.readIPVersion(packet);\n if (ipVer == 4 && IP.readDestAddress(packet) == localAddress) {//todo check remote addr\n IP ip = new IP(packet);\n if (ip.protocol == 6 && ip.verify()) {\n long remoteAddress = ip.sourceAddress;\n int remotePort = ip.tcp.sourcePort;\n int localPort = ip.tcp.destPort;\n Long key = (remoteAddress << 32) | ((localPort & 0xFFFF) << 16) | (remotePort & 0xFFFF);\n TCPLink link;\n synchronized (links) {\n link = links.get(key);\n if (link != null) {\n// System.out.println(\"process incoming packet from port \" + ip.tcp.sourcePort + \" by \" + link.hashCode());\n } else {\n if ((ip.tcp.flags & TCP.SYN) == TCP.SYN) {\n\n link = TCPLinkFactory.create(ip.sourceAddress,\n remotePort, localPort, key, this);\n links.put(key, link);\n// System.out.println(\"process SYN packet \" + packet + \" by \" + link.hashCode());\n\n } else if (BuildConfig.DEBUG) {\n Log.e(TAG, \"BAD IP PACKET (no such connection exist) \" + key + \" \" + desc(ip) + \" FROM \" + slip.getISDesc() + \" \" + Utils.toHex(packet));\n }\n }\n }\n if (link != null) {\n link.processPacket(ip);\n }\n } else if (BuildConfig.DEBUG) {\n Log.w(TAG, \"BAD IP PACKET \" + desc(ip) + \" FROM \" + slip.getISDesc() + \" \" + Utils.toHex(packet));\n }\n\n } else if (BuildConfig.DEBUG) {\n Log.w(TAG, \"NOT OUR IP PACKET IPv\" + ipVer + \" TO \"\n + (ipVer == 4 ? Integer.toHexString(IP.readDestAddress(packet)) : \"unknown\")\n + \" desc \" + (ipVer == 4 ? desc(new IP(packet)) : \"unkn\") + \" hex \" + Utils.toHex(packet));\n }\n\n } catch (InterruptedException e) {\n readerAlive = false;\n if (BuildConfig.DEBUG) {\n Log.w(TAG, \"interrupted\");\n }\n return;\n } catch (IOException e) {\n if (BuildConfig.DEBUG) {\n Log.w(TAG, \"bad ip packet \" + e);\n }\n }\n }\n }\n readerAlive = false;\n }", "public static void main(String[] args) {\n\n String sentence;\n try\n {\n \n String serverHostname = new String (args[0]);\n int port = Integer.parseInt(args[1]);\n\n \n // resolve the IP address of the host\n InetAddress IPAddress = InetAddress.getByName(serverHostname); \n System.out.println (\"Attemping to connect to \" + IPAddress +\" via UDP port \"+ port); \n \n // no.of packets to send\n int n=Integer.parseInt(args[3]);\n \n \n \n int iterations = Integer.parseInt(args[4]);\n \n // losscount has the no.of lost packets\n int[] losscount= new int[iterations];\n for(int j=0;j<iterations;j++)\n losscount[j]=0;\n \n // stores max RTT of packets\n double[] maxRTT = new double[iterations];\n for(int j=0;j<iterations;j++)\n maxRTT[j]=Double.MIN_VALUE;\n \n // totaltime stores the total RTT time for all packets transmitted\n double[] totaltime= new double[iterations];\n for(int j=0;j<iterations;j++)\n totaltime[j]=0;\n \n // do for k iterations\n for(int k=0;k<iterations;k++)\n {\n // send n packets\n for(int i=1;i<=n;i++)\n {\n // initialize a datagram socket to send and receive to UDP traffic\n DatagramSocket clientSocket = new DatagramSocket();\n\n // construct the packet and send\n String seqno=\"\";\n seqno=seqno+Integer.toBinaryString(i);\n //System.out.println(\"Seqno is: \"+seqno);\n short a = Short.parseShort(seqno, 2);\n ByteBuffer bytes = ByteBuffer.allocate(2).putShort(a);\n // byte array to store sequence number\n byte[] array = new byte[2];\n array=bytes.array();\n // byte array to store message\n sentence = formString(Integer.parseInt(args[2]));\n byte[] array2=sentence.getBytes();\n // combine the two arrays to generate the send/request message \n byte[] sendarray=new byte[array.length+array2.length]; \n System.arraycopy(array, 0, sendarray, 0, array.length);\n System.arraycopy(array2, 0, sendarray, array.length, array2.length);\n\n // export the message into a 1024 byte array for sending\n byte[] sendData = new byte[1024];\n System.arraycopy(sendarray, 0, sendData, 0, sendarray.length);\n\n\n // set start timer\n\n double sendtime=System.currentTimeMillis();\n //System.out.println(sendtime);\n\n // send packet in bytes\n DatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length, IPAddress, port); \n clientSocket.send(sendPacket); \n\n System.out.println(\"Packet Sent..\");\n\n // set up byte array to receive data\n byte[] receiveData = new byte[1024];\n\n // construct datagram packet to receive packet\n DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length); \n\n System.out.println (\"Waiting for return packet\");\n\n // time out for waiting is 3 seconds (fixed)\n clientSocket.setSoTimeout(3000);\n\n\n try\n {\n // receive data from UDP scoket\n clientSocket.receive(receivePacket); \n\n // get data and do processing if required\n //String modifiedSentence = new String(receivePacket.getData()); \n\n // get ip address and port of parent / source \n InetAddress returnIPAddress = receivePacket.getAddress();\n int pport = receivePacket.getPort();\n\n System.out.println (\"From server at: \" + returnIPAddress +\":\" + pport);\n //System.out.println(\"Message: \" + modifiedSentence); \n System.out.println(\"Received File..\");\n\n // note receiving time\n double receivetime=System.currentTimeMillis();\n\n\n // update total ETE time\n totaltime[k]=totaltime[k]+(receivetime-sendtime);\n if(receivetime-sendtime>maxRTT[k])\n {\n maxRTT[k]=receivetime-sendtime;\n }\n\n }\n catch (SocketTimeoutException ste)\n {\n losscount[k]=losscount[k]+1;\n System.out.println (\"Timeout Occurred: Packet assumed lost\"+ste);\n } \n //System.out.println(\"FROM SERVER: \" + response);\n clientSocket.close();\n\n }\n // print necessary values for analysis\n /*\n System.out.println(\"The total time for 1000 packets: \"+totaltime);\n double averageETE = totaltime/((double)2*(double)(n-losscount));\n System.out.println(\"The average ETE is: \"+averageETE);\n System.out.println(\"Loss count is: \"+losscount);\n double maxETE = maxRTT/2;\n System.out.println(\"The max ETE is: \"+maxETE);\n */\n }\n // close the client socket connection\n // avgETE has the average ETE for each iteration\n double[] avgETE = new double[iterations];\n for(int j=0;j<iterations;j++)\n {\n avgETE[j]=(totaltime[j]/(2*(n-losscount[j])));\n }\n // max ETE has the maximum ETE for each iteration\n double[] maxETE = new double[iterations];\n for(int j=0;j<iterations;j++)\n {\n maxETE[j]=maxRTT[j]/2;\n }\n // print necessary values\n for(int j=0;j<iterations;j++)\n {\n System.out.println(\"AvgETE for Iteration \"+(j+1)+\": \"+avgETE[j]);\n System.out.println(\"MaxETE for Iteration \"+(j+1)+\": \"+maxETE[j]);\n System.out.println(\"Loss Count for Iteration \"+(j+1)+\": \"+losscount[j]); \n } \n }\n // all exceptions are caught and reported here\n catch(Exception e)\n {\n System.out.println(e);\n }\n }", "private static int generateLocalUdpPort(int portBase) {\r\n \tint resp = -1;\r\n\t\tint port = portBase;\r\n\t\twhile((resp == -1) && (port < Integer.MAX_VALUE)) {\r\n\t\t\tif (isLocalUdpPortFree(port)) {\r\n\t\t\t\t// Free UDP port found\r\n\t\t\t\tresp = port;\r\n\t\t\t} else {\n // +2 needed for RTCP port\n port += 2;\n\t\t\t}\r\n\t\t}\r\n \treturn resp;\r\n }", "public static void main(String[] args) throws IOException, UnknownHostException, RemoteException, MalformedURLException, NotBoundException {\n System.out.println(\"Enter Group Server IP :\");\n BufferedReader r;\n r = new BufferedReader(new InputStreamReader(System.in));\n String group_server_ip = r.readLine();\n int group_server_registry_port = 5555;\n String group_server_name = \"AmarRaj\";\n new ClientUDPListenThread();\n Registry registry = LocateRegistry.getRegistry(group_server_ip, group_server_registry_port);\n Communicate communicate = (Communicate) registry.lookup(group_server_name);\n String myip = Utility.getIP();\n // Menu for CLIENT\n while(true) {\n System.out.println(\"\\n\\nJoin Group Server - 1\\nSubscribe - 2 \\nUnsubscribe - 3\\nPing - 4\\nPublish - 5\\nLeave - 6\\nEnter Your Choice : \");\n Scanner reader = new Scanner(System.in);\n switch (reader.nextInt()){ \n case 1:\n System.out.println(\"Joining Group..\");\n try {\n boolean succ = communicate.Join(myip, Utility.client_listen_port);\n if(succ == true) {\n System.out.println(\"Successfully Joined Group Server\");\n } else {\n System.out.println(\"Sorry, Client Limit already reached..\");\n }\n } catch (Exception e) {\n System.out.println(\"Join Error !!\");\n }\n break;\n case 2:\n try {\n System.out.println(\"Enter Article : \");\n BufferedReader in=new BufferedReader(new InputStreamReader(System.in));\n String ar = in.readLine();\n boolean b = communicate.Subscribe(myip, Utility.client_listen_port, ar);\n if (b == true) {\n System.out.println(\"Successfully Subscribed\");\n } else {\n System.out.println(\"Unsuccessfull .. \");\n }\n } catch (Exception e) {\n System.out.println(\"Subscribe Error !!\");\n }\n break;\n case 3:\n try {\n System.out.println(\"Enter Article to unsubscribe : \");\n BufferedReader in=new BufferedReader(new InputStreamReader(System.in));\n String ar = in.readLine();\n boolean b = communicate.Unsubscribe(myip, Utility.client_listen_port, ar);\n if (b == true) {\n System.out.println(\"Successfully Unsubscribed\");\n } else {\n System.out.println(\"Unsuccessfull.. \");\n }\n } catch (Exception e) {\n System.out.println(\"Unsubscribe Error !!\");\n }\n break;\n case 4:\n try {\n boolean b = communicate.Ping();\n if (b == true) {\n System.out.println(\"Group Server Alive !!\");\n } else {\n System.out.println(\"Group Server not responding..\");\n }\n } catch (Exception e) {\n System.out.println(\"Ping not responded by group server !!\");\n }\n break;\n case 5:\n try {\n System.out.println(\"Enter Article to Publish : \");\n BufferedReader in=new BufferedReader(new InputStreamReader(System.in));\n String ar = in.readLine();\n boolean b = communicate.Publish(ar, myip, Utility.client_listen_port);\n if (b == true) {\n System.out.println(\"Successfully Published\");\n } else {\n System.out.println(\"Unsuccessfull..\");\n }\n } catch (Exception e) {\n }\n break;\n case 6:\n System.out.println(\"Leaving Group..\");\n try {\n boolean succ = communicate.Leave(myip, Utility.client_listen_port);\n if(succ == true) {\n System.out.println(\"Successfully Left Group Server\");\n } else {\n System.out.println(\"Unsuccessfull\");\n }\n } catch (Exception e) {\n System.out.println(\"Leave Error !!\");\n }\n break;\n case 7:\n boolean b = communicate.Check();\n break;\n }\n } \n}", "public void setPackType() {\n UDP = !(UDP);\n if (UDP){\n try {\n TCPsocket = new Socket(address, port);\n out1 = TCPsocket.getOutputStream();\n in1 = TCPsocket.getInputStream();\n } catch (IOException e) {\n e.printStackTrace();\n return;\n }\n buff = new BufferedOutputStream(out1); //out1 is the socket's outputStream\n dataOutputStreamInstance = new DataOutputStream (buff);\n buff_in = new BufferedInputStream(in1);\n dataInputStreamInstance = new DataInputStream(buff_in);\n startMicTCP();\n startSpeakersTCP();\n }\n else{\n startMic();\n startSpeakersTCP();\n }\n }", "private static String[] getServerAddress(String p_78863_0_) {\n/* */ try {\n/* 87 */ String var1 = \"com.sun.jndi.dns.DnsContextFactory\";\n/* 88 */ Class.forName(\"com.sun.jndi.dns.DnsContextFactory\");\n/* 89 */ Hashtable<Object, Object> var2 = new Hashtable<>();\n/* 90 */ var2.put(\"java.naming.factory.initial\", \"com.sun.jndi.dns.DnsContextFactory\");\n/* 91 */ var2.put(\"java.naming.provider.url\", \"dns:\");\n/* 92 */ var2.put(\"com.sun.jndi.dns.timeout.retries\", \"1\");\n/* 93 */ InitialDirContext var3 = new InitialDirContext(var2);\n/* 94 */ Attributes var4 = var3.getAttributes(\"_minecraft._tcp.\" + p_78863_0_, new String[] { \"SRV\" });\n/* 95 */ String[] var5 = var4.get(\"srv\").get().toString().split(\" \", 4);\n/* 96 */ return new String[] { var5[3], var5[2] };\n/* */ }\n/* 98 */ catch (Throwable var6) {\n/* */ \n/* 100 */ return new String[] { p_78863_0_, Integer.toString(25565) };\n/* */ } \n/* */ }", "public MAVLinkPacket pack(){\n MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH);\n packet.sysid = 255;\n packet.compid = 190;\n packet.msgid = MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION;\n \n packet.payload.putUnsignedInt(time_boot_ms);\n \n packet.payload.putUnsignedInt(firmware_version);\n \n packet.payload.putFloat(tilt_max);\n \n packet.payload.putFloat(tilt_min);\n \n packet.payload.putFloat(tilt_rate_max);\n \n packet.payload.putFloat(pan_max);\n \n packet.payload.putFloat(pan_min);\n \n packet.payload.putFloat(pan_rate_max);\n \n packet.payload.putUnsignedShort(cap_flags);\n \n \n for (int i = 0; i < vendor_name.length; i++) {\n packet.payload.putUnsignedByte(vendor_name[i]);\n }\n \n \n \n for (int i = 0; i < model_name.length; i++) {\n packet.payload.putUnsignedByte(model_name[i]);\n }\n \n \n return packet;\n }", "public int scanUDP() {\r\n try {\r\n byte[] tampon = new byte[128];\r\n DatagramPacket dp = new DatagramPacket(tampon, tampon.length, adresse, port);\r\n ds = new DatagramSocket();\r\n ds.setSoTimeout(100);\r\n ds.connect(adresse, port);\r\n ds.send(dp);\r\n dp = new DatagramPacket(tampon, tampon.length);\r\n\r\n ds.receive(dp);\r\n ds.disconnect();\r\n ds.close();\r\n return 1;\r\n\r\n } catch (PortUnreachableException ex) {\r\n return 0;\r\n\r\n } catch (SocketTimeoutException ex) {\r\n return 2;\r\n\r\n } catch (InterruptedIOException e) {\r\n return 0;\r\n } catch (IOException ex) {\r\n return 0;\r\n\r\n } catch (Exception e) {\r\n return 0;\r\n }\r\n \r\n }", "@Override\n\t\tpublic void run() {\n\t\t\tbyte[] buff = new byte[HFConfigration.macTMsgPacketSize];\n\t\t\twhile (isAppRunning) {\n\t\t\t\ttry {\n\t\t\t\t\tDatagramPacket recv = new DatagramPacket(buff, buff.length);\n//\t\t\t\t\trecv.setPort(HFConfigration.localUDPPort);\n\t\t\t\t\tlocalBeatSocket.receive(recv);\n\t\t\t\t\tbyte[] data = ByteTool.copyOfRange(buff, 0,\n\t\t\t\t\t\t\trecv.getLength());\n\t\t\t\t\tString ip = recv.getAddress().getHostAddress();\n\t\t\t\t\tdecode(data, ip); Log.d(\"HFModuleManager:\", \"ip:\" + ip);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void addPorts(){\n\t\t\n\t}", "public interface NetDev {\n int ONLINE = 1;\n int OFFLINE = 2;\n\n String deviceID = null;\n String ipAddress = null;\n int port = 0;\n String username = null;\n String password = null;\n String passwordPriviledgedMode = null;\n int state = 0;\n ArrayList<Config> configs = null;\n long backupPeriod = 0; // in seconds?\n}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:36:02.868 -0500\", hash_original_method = \"E552E8F41A6230395AD2464B82A88215\", hash_generated_method = \"B474121E171E0C15AB9C9C17C2686C0E\")\n \npublic static android.net.wifi.IWifiManager asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = (android.os.IInterface)obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof android.net.wifi.IWifiManager))) {\nreturn ((android.net.wifi.IWifiManager)iin);\n}\nreturn new android.net.wifi.IWifiManager.Stub.Proxy(obj);\n}", "public static void main(String[] args) {\n\r\n\t\tEnumeration<NetworkInterface> interfaces;\r\n\t\ttry {\r\n\t\t\tinterfaces = NetworkInterface.getNetworkInterfaces();\r\n\t\t\twhile (interfaces.hasMoreElements()) {\r\n\t\t\t\tNetworkInterface sys = interfaces.nextElement();\r\n\t\t\t\t\r\n//\t\t\t\tSystem.out.println(Inet4Address.getLocalHost());\r\n\t\t\t\t\r\n//\t\t\t\tSystem.out.println(sys.getInetAddresses());\r\n\t\t\t\tbyte[] mac = sys.getHardwareAddress();\r\n\t\t\t\t\r\n\t\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t\tif (mac!=null) {\r\n\t\t\t\t\tSystem.out.println(sys.getInetAddresses());\r\n\t\t\t\t\tfor (int i = 0; i < mac.length; i++) {\r\n\t\t\t\t\t\tsb.append(String.format(\"%02X%s\", mac[i], (i < mac.length - 1) ? \"-\" : \"\"));\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(sb.toString());\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t\r\n\r\n\t\t\t}\r\n\t\t} catch (SocketException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n//\t\tcatch (UnknownHostException e) {\r\n//\t\t\t// TODO Auto-generated catch block\r\n//\t\t\te.printStackTrace();\r\n//\t\t}\r\n\t\t\r\n\r\n\r\n\t}", "public interface UdpReceiverService {\n\n public void start() throws IOException, TimeoutException;\n\n public void setCompress(boolean compress);\n}", "@Test\n public void httpGetPacket() throws Exception {\n int[] receivedData = Utils.stringToHexArr(\"600000000018fd3e2001067c2564a170\"\n + \"020423fffede4b2c2001067c2564a125a190bba8525caa5f\"\n + \"1e1e244cf8b92650000000026012384059210000020405a0\");\n Packet receivedPacket = new Packet(receivedData);\n\n packet.setSeqNumber(receivedPacket.getAckNumber());\n packet.setAckNumber(receivedPacket.getSeqNumber());\n packet.setFlag(Flag.ACK);\n String requestURI = String.format(\"http://[%s]:%d/%s\", DEST_ADDR, DEST_PORT, STUDENT_NUMBER);\n int [] getRequestData = createGETrequest(requestURI);\n packet.setData(getRequestData);\n\n assertEquals(Utils.arrayToString(getRequestData),packet.getData());\n assertEquals(60 + getRequestData.length, packet.getSize());\n assertEquals(Flag.ACK.value, packet.getFlags());\n assertEquals(2,packet.getSeqNumber());\n assertEquals(3,packet.getNextSeqNumber());\n assertEquals(4172883536L + 1, packet.getNextAckNumber());\n\n //Build expected packet\n String ipv6Header = \"6\" +\"00\" + Utils.HexToString(0,20/4)\n + Utils.HexToString(20 + getRequestData.length,16/4) + \"fd\" + \"ff\"\n + Utils.parseAddress(SOURCE_ADDR) + Utils.parseAddress(DEST_ADDR);\n String tcpHeader = \"244c\" + \"1e1e\" + Utils.HexToString(2,8) + Utils.HexToString(4172883536L,8) + \"50\"\n + Utils.HexToString(Flag.ACK.value,2) + \"1000\" + \"0000\" + \"0000\";\n String dataAsString = Utils.arrayToString(getRequestData);\n //Same ipv6Header\n assertEquals(ipv6Header , Utils.arrayToString(packet.getPkt()).substring(0,ipv6Header.length()));\n //Same tcp header\n assertEquals(tcpHeader , Utils.arrayToString(packet.getPkt()).substring(ipv6Header.length(),ipv6Header.length() + tcpHeader.length()));\n //Same data\n assertEquals(dataAsString , Utils.arrayToString(packet.getPkt()).substring(ipv6Header.length() + tcpHeader.length(),\n ipv6Header.length() + tcpHeader.length() + dataAsString.length()));\n\n\n }", "@Override\n public void run()\n {\n try\n {\n MulticastSocket multicastSocket = new MulticastSocket(55559);\n //My chosen multicast ip.\n String multicastIP = \"224.0.159.82\";\n multicastSocket.joinGroup(InetAddress.getByName(multicastIP));\n //Receiver on continuous loop.\n while (receiverOn)\n {\n //Check network flag.\n if (frame.getSelectPanel().network())\n {\n DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);\n multicastSocket.receive(receivePacket);\n byte[] b = receivePacket.getData();\n System.out.println(\"Receive: \" + b.length);\n ByteArrayInputStream bis = new ByteArrayInputStream(b);\n ObjectInput in = new ObjectInputStream(bis);\n\n try\n {\n int[] data = (int[]) in.readObject();\n System.out.println(\"This: \" + frame.getId() + \"\\tFrom: \" + data[0]);\n //Exclude messages that originated at this peer.\n if (data[0] != frame.getId())\n {\n //Action based on int at data[1]\n switch (data[1])\n {\n case Draw.CLEAR:\n case Draw.DRAW:\n case Draw.TEXT:\n case Draw.CIRCLE:\n case Draw.IMAGE:\n frame.getDraw().put(data);\n break;\n case REQ_IP:\n int key = data[0];\n String ip = String.format(\"%d.%d.%d.%d\", data[2], data[3], data[4], data[5]);\n frame.getPeerCache().addPeer(new Triple<>(key, ip, data[6]));\n int size = frame.getPeerCache().getSize();\n frame.getPeerCount().setText(String.format(\"Peer count: %d\", size));\n int[] myIp = frame.getMyIp();\n size = frame.getActionCache().getSize();\n int[] ipAns = {frame.getId(), ANS_IP, myIp[0], myIp[1], myIp[2], myIp[3], size};\n frame.getBroadcaster().put(ipAns);\n break;\n case ANS_IP:\n /*\n * 0 = id\n * 1 = data type\n * 2,3,4,6 = IP\n */\n key = data[0];\n ip = String.format(\"%d.%d.%d.%d\", data[2], data[3], data[4], data[5]);\n frame.getPeerCache().addPeer(new Triple<>(key, ip, data[6]));\n frame.getPeerCount().setText(\n String.format(\"Peer count: %d\", frame.getPeerCache().getSize()));\n break;\n case LEAVE_NOTE:\n ip = String.format(\"%d.%d.%d.%d\", data[2], data[3], data[4], data[5]);\n frame.getPeerCache().removePeer(ip);\n frame.getPeerCount().setText(\n String.format(\"Peer count: %d\", frame.getPeerCache().getSize()));\n break;\n case REQ_HISTORY:\n /*\n * 0 = id\n * 1 = data type\n * 2 = tarID\n * 3,4,5,6 = IP\n */\n if (data[2] == frame.getId())\n {\n ip = String.format(\"%d.%d.%d.%d\", data[3], data[4], data[5], data[6]);\n System.out.println(\"History request from \" + ip);\n UdpClient historyClient = new UdpClient(ip, frame.getActionCache());\n Thread historyThread = new Thread(historyClient);\n historyThread.start();\n }\n break;\n case CLEAR_REQ:\n String reqTitle = String.format(\"Peer %d has requested a clear.\", data[1]);\n int dialogResult = JOptionPane.showConfirmDialog(frame, \"Would you like to clear?\",\n reqTitle,\n JOptionPane.YES_NO_OPTION);\n if (dialogResult == JOptionPane.YES_OPTION)\n {\n int[] clear = {frame.getId(), Draw.CLEAR};\n frame.getDraw().put(clear);\n frame.clearAll();\n }\n break;\n case IMAGE_REQ:\n System.out.print(\"IMAGE REQUEST: \");\n System.out.println(data[2] + \" vs \" + frame.getId());\n if (data[2] == frame.getId())\n {\n ip = String.format(\"%d.%d.%d.%d\", data[4], data[5], data[6], data[7]);\n System.out.println(\"Image request from \" + ip);\n BufferedImage image = frame.getImageCache().get(data[3], data[7]);\n\n TcpClient tcpClient = new TcpClient(ip, image);\n Thread tcpThread = new Thread(tcpClient);\n tcpThread.start();\n }\n break;\n default:\n //Rogue packet protection.\n System.out.println(\"Received invalid packet.\");\n System.out.println(Arrays.toString(data));\n }\n }\n } catch (ClassNotFoundException | IndexOutOfBoundsException e)\n {\n //Rogue packet protection.\n //Message given, loop continues.\n System.out.println(\"Exception: Received invalid packet.\");\n e.printStackTrace();\n }\n }\n }\n } catch (IOException | InterruptedException e)\n {\n System.err.println(\"Error in Receiver class.\");\n System.err.println(e.getMessage());\n e.printStackTrace();\n }\n }", "@Override\n\t public void process(PacketContext context) {\n\t InboundPacket pkt = context.inPacket();\n Ethernet ethPkt = pkt.parsed();\n HostId id = HostId.hostId(ethPkt.getDestinationMAC());\n/*\n InboundPacket pkt = context.inPacket();\n Ethernet ethPkt = pkt.parsed();\n\t MacAddress hostId = ethPkt.getSourceMAC();\n HostId id = HostId.hostId(ethPkt.getDestinationMAC());\n\t DeviceId apId = pkt.receivedFrom().deviceId();\n*/\n // Do we know who this is for? If not, flood and bail.\n\t //log.info(\"Host id : {}\",id);\n\n Host dst = hostService.getHost(id);\n\n\t\n if (dst == null) {\n ipv6process(context, pkt);\n\t \n return;\n\t }\n/*\n\t if (pkt.receivedFrom().deviceId().equals(dst.location().deviceId())) {\n if (!context.inPacket().receivedFrom().port().equals(dst.location().port())) {\n\t\t log.info(\"Rule is installed.-1\");\n\t\t log.info(\"DeviceID: dst={}\", pkt.receivedFrom().deviceId(), dst.location().deviceId());\n installRule(context, dst.location().port());\n }\n return;\n }\n\t\t\t\t\n*/\t\n \t if((stPreApId.equals(stNowApId) && stype ==1) || (stPreApId.equals(stNowApId) && stype ==2)){\n\t\t log.info(\"##############test same ap -------------[ok]\\n\");\n\t\t log.info(\"checking preApId ={}, nowApId={} \\n\",stPreApId, stNowApId);\n\t\t //TODO ::\t\t\t\n\t Set<Path> paths = topologyService.getPaths(topologyService.currentTopology(), pkt.receivedFrom().deviceId(), dst.location().deviceId()); \n\t\t if (paths.isEmpty()) {\n\t\t // If there are no paths, flood and bail.\n\t\t //flood(context);\n\t\t return;\n\t\t }\n\t\t \n\t\t Path path = pickForwardPathIfPossible(paths,pkt.receivedFrom().port());\n\t\t if (path == null) {\n\t\t log.warn(\"Don't know where to go from here {} for {} -> {}\",\n\t\t pkt.receivedFrom(), ethPkt.getSourceMAC(), ethPkt.getDestinationMAC());\n\t\t //flood(context);\n\t\t return;\n\t\t }\n\t\t log.info(\"Rule is installed.-2\");\n\t\t log.info(\"port()={}, path()={}\", pkt.receivedFrom().port(), path);\n\t\t mkList(hostId, apId, flowNum, pkt.receivedFrom().port(), ethPkt.getSourceMAC(), ethPkt.getDestinationMAC(), stype);\n\t\t saveFlowInfo(ethPkt.getDestinationMAC(),pkt.receivedFrom().deviceId(), stype);\n\t\t // stype = 0;\n\n\t }\n\n\n\t if(! stPreApId.equals(stNowApId) && stype ==3){\n\t\tif(! stNowApId.equals(\"\")){\n\t\t\tlog.info(\"##############test handover -------------[ok]\\n\");\n\t\t\tlog.info(\"checking preApId ={}, nowApId={} \\n\",stPreApId, stNowApId);\n\t\t\tlog.info(\"test : {}\",destList2.size());\n\n\t\t\t/*for(int i =0; i<destList2.size();i++){\n\t\t\t\tlog.info(\"test type 2 cnt: {}\",i);\n\t\t\t\t//if(((DeviceId)desApList2.get(i)).equals(dst.location().deviceId())){\n\t\t\t\t\t Set<Path> paths = topologyService.getPaths(topologyService.currentTopology(), pkt.receivedFrom().deviceId(), dst.location().deviceId()); \n\t\t\t\t if (paths.isEmpty()){\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t Path path = pickForwardPathIfPossible(paths, pkt.receivedFrom().port());\n\t\t\t\t if (path == null) {\n\t\t\t\t\tlog.warn(\"Don't know where to go from here\");\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t log.info(\"Rule is installed.-3\");\n\t\t\t\t log.info(\"port()={}, path()={}\", pkt.receivedFrom().port(), path);\t\n\t\t\t\t // }\n\t\t\t}*/\n\n\t\t\tfor(int i =0; i<destList1.size();i++){\n\t\t\t\tlog.info(\"test type 1 cnt: {}\",i);\n\t\t\t\t//if(((DeviceId)desApList1.get(i)).equals(dst.location().deviceId())){\n\t\t\t\t\t Set<Path> paths = topologyService.getPaths(topologyService.currentTopology(), pkt.receivedFrom().deviceId(), dst.location().deviceId());\n\t\t\t\t if (paths.isEmpty()){\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t Path path = pickForwardPathIfPossible(paths, pkt.receivedFrom().port());\n\t\t\t\t if (path == null) {\n\t\t\t\t\tlog.warn(\"Don't know where to go from here\");\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t log.info(\"Rule is installed.-4\");\n\t\t\t\t log.info(\"port()={}, path()={}\", pkt.receivedFrom().port(), path);\t\n\t\t\t\t // }\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif (stype ==0) {\n\t\t\tlog.info(\"###-----------what is packet?\\n\");\n\t\t}\n\t\t\n\t }\n\t\tlog.info(\"#############-------------[waitting]\\n\");\n\t\t\n\t}", "private void udpTest() throws Exception {\n\n\t\tint targetPort = 5221;\n\t\tfinal String text = \"some text\";\n\t\tfinal Server server = new UDP.Server(targetPort);\n\t\tserver.receivePackage(new UDP.ReceiveListener() {\n\t\t\t@SuppressWarnings(\"null\")\n\t\t\t@Override\n\t\t\tpublic void onReceive(String message) {\n\t\t\t\tSystem.out.println(\"UDP: recieved \" + message);\n\t\t\t\ttry {\n\t\t\t\t\tassertTrue(message.equals(text));\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.e(\"\", \"UDP test failed: \" + e);\n\t\t\t\t\tObject x = null;\n\t\t\t\t\tx.toString();\n\t\t\t\t}\n\t\t\t\tserver.closeConnection();\n\t\t\t}\n\t\t});\n\n\t\tString targetIp = UDP.getDeviceIp();\n\t\tSystem.out.println(\"UDP ip: \" + targetIp);\n\t\tClient x = new UDP.Client(targetIp, targetPort);\n\t\tx.sendPackage(text);\n\t\tx.closeConnection();\n\n\t}", "@Test\n public void testReplyToRequestFromUsIpv6() {\n Ip6Address ourIp = Ip6Address.valueOf(\"1000::1\");\n MacAddress ourMac = MacAddress.valueOf(1L);\n Ip6Address theirIp = Ip6Address.valueOf(\"1000::100\");\n\n expect(hostService.getHostsByIp(theirIp)).andReturn(Collections.emptySet());\n expect(interfaceService.getInterfacesByIp(ourIp))\n .andReturn(Collections.singleton(new Interface(getLocation(1),\n Collections.singleton(new InterfaceIpAddress(\n ourIp,\n IpPrefix.valueOf(\"1000::1/64\"))),\n ourMac,\n VLAN1)));\n expect(hostService.getHost(HostId.hostId(ourMac, VLAN1))).andReturn(null);\n replay(hostService);\n replay(interfaceService);\n\n // This is a request from something inside our network (like a BGP\n // daemon) to an external host.\n Ethernet ndpRequest = buildNdp(ICMP6.NEIGHBOR_SOLICITATION,\n ourMac,\n MacAddress.valueOf(\"33:33:ff:00:00:01\"),\n ourIp,\n theirIp);\n\n proxyArp.reply(ndpRequest, getLocation(5));\n assertEquals(1, packetService.packets.size());\n verifyPacketOut(ndpRequest, getLocation(1), packetService.packets.get(0));\n\n // The same request from a random external port should fail\n packetService.packets.clear();\n proxyArp.reply(ndpRequest, getLocation(2));\n assertEquals(0, packetService.packets.size());\n }", "public void readPullTrafficSummary() {\n\t\ttry {\n\t\t\tMessage message = new TrafficSummary (node.ipAddr,node.portNum, node.getSendTracker(), node.getSendSummation(),node.getReceiveTracker(),node.getReceiveSummation(),node.getRelayTracker());\n\t\t\tSocket socketReturn = node.getConnections().getSocketWithName(node.getRegistryName());\n\t\t\tnew TCPSender (socketReturn, message);\n\t\t} catch (IOException e) { e.printStackTrace();}\n\t\tnode.resetTrafficStats();\t\t//reset node statistics after sent for ease of testing multiple runs\n\t}", "public static void main(String[] args) throws IOException {\n\t\tDatagramSocket socket=new DatagramSocket(12345);\r\n\t\t\r\n\t\t//El servidor esperara el datagrama\r\n\t\tSystem.out.println(\"Servidor esperando datagrama...\");\r\n\t\tDatagramPacket recibo;\r\n\t\tString mensaje=\"\";\r\n\t\tdo{\r\n\t\t\t//Nos preparamos para recibirlo\r\n\t\t\tbyte[] bufer=new byte[1024];\r\n\t\t\trecibo=new DatagramPacket(bufer, bufer.length);\r\n\t\t\t//Lo recibimos\r\n\t\t\tsocket.receive(recibo);\r\n\t\t\t\r\n\t\t\t//Escribimos el mensaje recibido\r\n\t\t\tmensaje=new String(recibo.getData()).trim();\r\n\t\t\tSystem.out.println(\"Servidor recibe: \"+mensaje);\r\n\t\t\t\r\n\t\t\t//Cogemos el puerto de quien nos lo ha enviado\r\n\t\t\tInetAddress IPOrigen=recibo.getAddress();\r\n\t\t\tint puerto=recibo.getPort();\r\n\t\t\t\r\n\t\t\t//Pasamos el texto recibido a mayusculas\r\n\t\t\tString respuesta=mensaje.toUpperCase();\r\n\t\t\tbyte[] enviados=new byte[1024];\r\n\t\t\tenviados=respuesta.getBytes();\r\n\t\t\t\r\n\t\t\t//Y lo devolvemos de vuelta al cliente\r\n\t\t\tDatagramPacket envio=new DatagramPacket(enviados, enviados.length,IPOrigen,puerto);\r\n\t\t\tsocket.send(envio);\r\n\t\t\t\r\n\t\t\t//Hasta que recibamos un asterisco\r\n\t\t}while(!mensaje.equalsIgnoreCase(\"*\"));\r\n\t\t\r\n\t\t//Tras eso, cerramos conexion\r\n\t\tSystem.out.println(\"Cerrando conexion...\");\r\n\t\tsocket.close();\r\n\t}", "public ByteBuffer buildPacket(int encap, short destUdp, short srcUdp) {\n ByteBuffer result = ByteBuffer.allocate(MAX_LENGTH);\n fillInPacket(encap, INADDR_BROADCAST, INADDR_ANY, destUdp,\n srcUdp, result, DHCP_BOOTREQUEST, mBroadcast);\n result.flip();\n return result;\n }", "public void setupUDP(int port) throws SocketException\n\t{\n\t\tdataSocket = new DatagramSocket(port);\n\t\tUDPRunning = true;\n\t}", "public ARPDatagram(String ll3P){\n HeaderFieldFactory fieldFactory = HeaderFieldFactory.getInstance();\n ll3pAddress = fieldFactory.getItem(Constants.LL3P_DESTINATION_ADDRESS_FIELD_ID, ll3P);\n }", "public void writeUdpMessage(String message) {\n\t\tm_udpSession.write(message);\n\t}", "public static void main(String[] _args) {\n \r\n IPmodel IP = new IPmodel(\"XeonIPcore\", false,true,3,2);\r\n IP.add(new Axi4LiteModule(16, 17,true));\r\n IP.add(new Axi4StreamAdaptModuleIn(0, 1, 2, 3));\r\n IP.add(new Axi4StreamAdaptModuleIn(1, 4, 5, 6));\r\n IP.add(new Axi4StreamAdaptModuleIn(2, 7, 8, 9));\r\n\r\n IP.add(new Axi4StreamAdaptModuleOut(0, 1, 2, 3));\r\n IP.add(new Axi4StreamAdaptModuleOut(1, 4, 5, 6));\r\n \r\n System.out.println(IP);\r\n }", "public void setUDP1(java.lang.String UDP1) {\n this.UDP1 = UDP1;\n }", "public void testIsAltlocPushCapable() throws Exception {\n\t\t\n\t\tIpPort ppi = new IpPortImpl(\"1.2.3.4\",6346);\n\t\tIpPort ppi2 = new IpPortImpl(\"1.2.3.4\",6346);\n\t\tSet proxies = new IpPortSet();\n\t\tSet proxies2 = new IpPortSet();\n\t\tproxies.add(ppi);\n\t\tproxies2.add(ppi);\n\t\tproxies2.add(ppi2);\n\t\t\n\t\tGUID g1 = new GUID(GUID.makeGuid());\n\t\tGUID g2 = new GUID(GUID.makeGuid());\n PushEndpoint pe = new PushEndpoint(g1.bytes(),proxies);\n PushEndpoint pe2 = new PushEndpoint(g2.bytes(),proxies2);\n \n //test an rfd with push proxies\n\t\t RemoteFileDesc fwalled = new RemoteFileDesc(\"127.0.0.1\",6346,10,HTTPConstants.URI_RES_N2R+\n HugeTestUtils.URNS[0].httpStringValue(), 10, \n pe.getClientGUID(), 10, true, 2, true, null, \n HugeTestUtils.URN_SETS[0],\n false,true,\"\",0,proxies,-1);\n\t\t \n\t\t assertTrue(Arrays.equals(pe.getClientGUID(),fwalled.getClientGUID()));\n\t\t \n\t\t RemoteFileDesc nonfwalled = \n\t\t\tnew RemoteFileDesc(\"www.limewire.org\", 6346, 10, HTTPConstants.URI_RES_N2R+\n\t\t\t\t\t\t\t HugeTestUtils.URNS[1].httpStringValue(), 10, \n\t\t\t\t\t\t\t GUID.makeGuid(), 10, true, 2, true, null, \n\t\t\t\t\t\t\t HugeTestUtils.URN_SETS[1],\n false,false,\"\",0,null, -1);\n\t\t \n\t\t RemoteFileDesc differentPE = new RemoteFileDesc(fwalled,pe2);\n\t\t assertTrue(Arrays.equals(pe2.getClientGUID(),differentPE.getClientGUID()));\n\t\t \n\t\t //both rfds should report as being altloc capable, but only\n\t\t //the firewalled rfd should be pushCapable\n\t\t assertTrue(fwalled.isAltLocCapable());\n\t\t assertTrue(fwalled.needsPush());\n\t\t assertTrue(nonfwalled.isAltLocCapable());\n\t\t assertFalse(nonfwalled.needsPush());\n\t\t \n\t\t //now create an rfd which claims to be firewalled but has no push proxies\n\t\t GUID g3 = new GUID(GUID.makeGuid());\n\t\t PushEndpoint noProxies = new PushEndpoint(g3.bytes());\n\n\t\t RemoteFileDesc fwalledNotGood = \n\t\t \tnew RemoteFileDesc(fwalled, noProxies);\n\t\t \n\t\t //it should not be a capable altloc.\n\t\t assertFalse(fwalledNotGood.isAltLocCapable());\n\t\t assertTrue(fwalledNotGood.needsPush());\n\t}", "public void doMain(Set<String> args) throws Exception {\n\n\t\tInetSocketAddress socketAddress = new InetSocketAddress(MULTICAST_ADDRESS, MULTICAST_PORT);\n\t\tMulticastSocket socket = new MulticastSocket(MULTICAST_PORT);\n\t\tEnumeration<NetworkInterface> ifs = NetworkInterface.getNetworkInterfaces();\n\n\t\twhile (ifs.hasMoreElements()) {\n\t\t\tNetworkInterface xface = ifs.nextElement();\n\t\t\tEnumeration<InetAddress> addrs = xface.getInetAddresses();\n\t\t\tString name = xface.getName();\n\t\t\twhile (addrs.hasMoreElements()) {\n\t\t\t\tInetAddress addr = addrs.nextElement();\n\t\t\t\tSystem.out.println(name + \" ... has addr \" + addr);\n\t\t\t}\n\n\t\t\tif (args.contains(name)) {\n\t\t\t\tSystem.out.println(\"Adding \" + name + \" to our interface set\");\n\t\t\t\tsocket.joinGroup(socketAddress, xface);\n\t\t\t}\n\t\t}\n\n\t\tbyte[] buffer = new byte[1500];\n\t\tDatagramPacket packet = new DatagramPacket(buffer, buffer.length);\n\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tpacket.setData(buffer, 0, buffer.length);\n\t\t\t\tsocket.receive(packet);\n\t\t\t\tSystem.out.println(\"Received pkt from \" + packet.getAddress() + \" of length \" + packet.getLength());\n\t\t\t} catch (IOException ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void deserialize(byte[] buf){\n int size = buf.length;\n ByteBuffer buffer = ByteBuffer.wrap(buf);\n msgType = buffer.getShort(0);\n byte[] srcIP_temp = new byte[15];\n System.arraycopy(buf, 2, srcIP_temp, 0, 15);\n String srcIP_str = new String(srcIP_temp);\n srcIP = srcIP_str.trim();\n srcPort = buffer.getInt(17);\n desCost = buffer.getFloat(21);\n byte[] desIP_temp = new byte[15];\n System.arraycopy(buf, 25, desIP_temp, 0, 15);\n String desIP_str = new String(desIP_temp);\n desIP = desIP_str.trim();\n desPort = buffer.getInt(40);\n int pos = 44;\n\n while(pos+45 < size) {\n byte[] des = new byte[21];\n byte[] hop = new byte[21];\n\n System.arraycopy(buf, pos, des, 0, 21);\n String nei = new String(des);\n nei = nei.trim();\n if(!nei.matches(\"[0-9]+\\\\.[0-9]+\\\\.[0-9]+\\\\.[0-9]+:[0-9]+\")){\n return;\n }\n\n float cost = buffer.getFloat(pos+21);\n\n System.arraycopy(buf, pos+25, hop, 0, 21);\n String firstHop = new String(hop);\n firstHop = firstHop.trim();\n if(!firstHop.matches(\"[0-9]+\\\\.[0-9]+\\\\.[0-9]+\\\\.[0-9]+:[0-9]+\")){\n return;\n }\n pos += 46;\n\n DistanceInfo item = new DistanceInfo(cost, firstHop);\n distanceVectors.put(nei, item);\n }\n }", "public InetSocketAddress getDataAddress()\n {\n return rtpTarget;\n }", "public void setUdpSession(IoSession s) {\n\t\tm_udpSession = s;\n\t}", "private byte[] obtainPackets4Source(Packet packet){\n\t\t//filter IPV6\n\t\tif(packet.contains(IpPacket.class)){\n\t\t\t\n\t\t\tIpPacket ipPkt = packet.get(IpPacket.class);\n\t\t\tIpHeader ipHeader = ipPkt.getHeader();\n\t\t\n\t\t\tbyte[] src=ipHeader.getSrcAddr().getAddress();\n\t\t\tbyte[] dest = ipHeader.getDstAddr().getAddress();\n\t\t\t//source\n\t\tif(LogicController.headerChoice==1){\n\t\t\treturn src;\n\t\t\t\n\t\t\t\n\t\t}else if(LogicController.headerChoice==2){\n\t\t//source dest\n\t\t\treturn ByteArrays.concatenate(src, dest);\n\t\t\t\n\t\t}else if(LogicController.headerChoice==3){\n\t\t//3: source source port\n\t\t\tif(packet.contains(TcpPacket.class)){\n\t\t\t\tTcpPacket tcpPkt = packet.get(TcpPacket.class);\n\t\t\t\tTcpHeader theader = tcpPkt.getHeader();\n\t\t\t\tbyte[] port = theader.getSrcPort().valueAsString().getBytes();\n\t\t\t\treturn ByteArrays.concatenate(src,port);\n\t\t\t}else if(packet.contains(UdpPacket.class)){\n\t\t\tUdpPacket udpPacket = packet.get(UdpPacket.class);\n\t\t\t\tUdpHeader uh = udpPacket.getHeader();\n\t\t\t\tbyte[] port = uh.getSrcPort().valueAsString().getBytes();\n\t\t\t\treturn ByteArrays.concatenate(src,port);\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn ByteArrays.concatenate(src, dest);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t}else if(LogicController.headerChoice==4){\n\t\t\t//4: dest dest port\t\n\t\t\tif(packet.contains(TcpPacket.class)){\n\t\t\t\tTcpPacket tcpPkt = packet.get(TcpPacket.class);\n\t\t\t\tTcpHeader theader = tcpPkt.getHeader();\n\t\t\t\tbyte[] port = ByteArrays.toByteArray(theader.getDstPort().valueAsInt());\n\t\t\t\treturn ByteArrays.concatenate(dest,port);\n\t\t\t}else if(packet.contains(UdpPacket.class)){\n\t\t\tUdpPacket udpPacket = packet.get(UdpPacket.class);\n\t\t\t\tUdpHeader uh = udpPacket.getHeader();\n\t\t\t\tbyte[] port = uh.getDstPort().valueAsString().getBytes();\n\t\t\t\treturn ByteArrays.concatenate(dest,port);\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\t\t\t\treturn ByteArrays.concatenate(src, dest);\n\t\t\t}\n\t\t}else if(LogicController.headerChoice==5){\n\t\t\t \n\t\t\tif(packet.contains(TcpPacket.class)){\n\t\t\t\t\t\t\t\n\t\t\t\tTcpPacket tcpPkt = packet.get(TcpPacket.class);\n\t\t\t\tTcpHeader theader = tcpPkt.getHeader();\n\t\t\t\t\n\t\t\t\tbyte[] a = ByteArrays.concatenate(src,dest);\n\t\t\t\t //byte[] ipHeaderBytes = ByteArrays.concatenate(a,new byte[]{ipHeader.getProtocol().value().byteValue()});\n\t\t\t\t \n\t\t\t\t byte[] tVal =ByteArrays.concatenate(theader.getSrcPort().valueAsString().getBytes(),theader.getDstPort().valueAsString().getBytes());\n\t\t\t\t \n\t\t\t\t//src,dst,protocol,\n\t\t\t\t\t//Key key = new Key(ByteArrays.concatenate(ipHeaderBytes,tVal));\n\t\t\t\t\t\n\t\t\t\t\t//source\n\t\t\t\t\t//return new byte[](key,1);\n\t\t\t\t return ByteArrays.concatenate(a,tVal);\n\t\t\t\t \n\t\t\t}else if(packet.contains(UdpPacket.class)){\n\t\t\t\t\n\t\t\t\tUdpPacket tcpPkt = packet.get(UdpPacket.class);\n\t\t\t\tUdpHeader theader = tcpPkt.getHeader();\n\t\n\tbyte[] a = ByteArrays.concatenate(src,dest);\n\t //byte[] ipHeaderBytes = ByteArrays.concatenate(a,new byte[]{ipHeader.getProtocol().value().byteValue()});\n\t \n\t byte[] tVal =ByteArrays.concatenate(theader.getSrcPort().valueAsString().getBytes(),theader.getDstPort().valueAsString().getBytes());\n\t \n\t//src,dst,protocol,\n\t\t//Key key = new Key(ByteArrays.concatenate(ipHeaderBytes,tVal));\n\t\t\n\t\t//source\n\t\t//return new byte[](key,1);\n\t return ByteArrays.concatenate(a,tVal);\t \n}\n\t\t\t\n\t\t\telse{\n\t\t\t\treturn ByteArrays.concatenate(src,dest);\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\treturn ByteArrays.concatenate(src,dest);\n\t\t}\n\t}else{\n\t\treturn null;}\n\t}", "public WifiProtocol(){\r\n// messages = new String[100];\r\n// index = 0;\r\n }", "public StateSenderUDP(String ipAddressString, int port) throws UnknownHostException {\n\t\tthis.ipAddress = InetAddress.getByName(ipAddressString);\n\t\tthis.port = port;\n\t}", "public void remplireListeIp(){\r\n bddIp.add(\"id\");\r\n bddIp.add(\"ip\");\r\n bddIp.add(\"nom\");\r\n bddIp.add(\"latence\");\r\n bddIp.add(\"etat\");\r\n bddIp.add(\"popup\");\r\n bddIp.add(\"mac\");\r\n bddIp.add(\"bdext_perte\");\r\n bddIp.add(\"port\");\r\n }", "private void saveConfigUDP(String fullQualifiedFilePath) {\n\t\ttry {\n\t\t\tlong startTime = new Date().getTime();\n\t\t\tif (this.ultraDuoPlusSetup != null) {\n\t\t\t\tnew UltraDuoPlusSychronizer(this, this.serialPort, this.ultraDuoPlusSetup, SYNC_TYPE.WRITE).run(); //call run() instead of start()and join()\n\n\t\t\t\tthis.ultraDuoPlusSetup.changed = null;\n\t\t\t\t//remove synchronized flag\n\t\t\t\tthis.ultraDuoPlusSetup.getChannelData1().synced = null;\n\t\t\t\tif (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45) {\n\t\t\t\t\tthis.ultraDuoPlusSetup.getChannelData2().synced = null;\n\t\t\t\t}\n\t\t\t\tIterator<MemoryType> iterator = this.ultraDuoPlusSetup.getMemory().iterator();\n\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\tMemoryType cellMemory = iterator.next();\n\t\t\t\t\tcellMemory.synced = null;\n\t\t\t\t\tcellMemory.changed = null;\n\t\t\t\t\tcellMemory.getSetupData().synced = null;\n\t\t\t\t\tcellMemory.getSetupData().changed = null;\n\t\t\t\t\tif (cellMemory.getStepChargeData() != null) {\n\t\t\t\t\t\tcellMemory.getStepChargeData().synced = null;\n\t\t\t\t\t\tcellMemory.getStepChargeData().changed = null;\n\t\t\t\t\t}\n\t\t\t\t\tif (cellMemory.getTraceData() != null) {\n\t\t\t\t\t\tcellMemory.getTraceData().synced = null;\n\t\t\t\t\t\tcellMemory.getTraceData().changed = null;\n\t\t\t\t\t}\n\t\t\t\t\tif (cellMemory.getCycleData() != null) {\n\t\t\t\t\t\tcellMemory.getCycleData().synced = null;\n\t\t\t\t\t\tcellMemory.getCycleData().changed = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tIterator<TireHeaterData> tireIterator = this.ultraDuoPlusSetup.getTireHeaterData().iterator();\n\t\t\t\twhile (tireIterator.hasNext()) {\n\t\t\t\t\tTireHeaterData tireHeater = tireIterator.next();\n\t\t\t\t\ttireHeater.synced = null;\n\t\t\t\t\ttireHeater.changed = null;\n\t\t\t\t}\n\t\t\t\tIterator<MotorRunData> motorIterator = this.ultraDuoPlusSetup.getMotorRunData().iterator();\n\t\t\t\twhile (motorIterator.hasNext()) {\n\t\t\t\t\tMotorRunData motorRunData = motorIterator.next();\n\t\t\t\t\tmotorRunData.synced = null;\n\t\t\t\t\tmotorRunData.changed = null;\n\t\t\t\t}\n\n\t\t\t\t// store back manipulated XML\n\t\t\t\tMarshaller marshaller = this.jc.createMarshaller();\n\t\t\t\tmarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.valueOf(true));\n\t\t\t\tmarshaller.setProperty(Marshaller.JAXB_NO_NAMESPACE_SCHEMA_LOCATION, UltraDuoPlusDialog.ULTRA_DUO_PLUS_XSD);\n\t\t\t\tmarshaller.marshal(this.ultraDuoPlusSetup, new FileOutputStream(fullQualifiedFilePath));\n\t\t\t\tUltraDuoPlusDialog.log.log(Level.TIME, \"write memory setup XML time = \" + StringHelper.getFormatedTime(\"ss:SSS\", (new Date().getTime() - startTime))); //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t}\n\t\t}\n\t\tcatch (Throwable e) {\n\t\t\tUltraDuoPlusDialog.log.log(java.util.logging.Level.SEVERE, e.getMessage(), e);\n\t\t\tthis.application.openMessageDialogAsync(this.dialogShell != null && !this.dialogShell.isDisposed() ? this.dialogShell : null,\n\t\t\t\t\tMessages.getString(gde.messages.MessageIds.GDE_MSGE0007, new String[] { e.getMessage() }));\n\t\t}\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-24 16:07:21.755 -0400\", hash_original_method = \"6CE719C205449F0EA4502B7666A015C0\", hash_generated_method = \"598EFFAE1DD0E9452464135FF7EE1426\")\n \npublic static String p2pConnect(WifiP2pConfig config, boolean joinExistingGroup) {\n if (config == null) return null;\n List<String> args = new ArrayList<String>();\n WpsInfo wps = config.wps;\n args.add(config.deviceAddress);\n\n switch (wps.setup) {\n case WpsInfo.PBC:\n args.add(\"pbc\");\n break;\n case WpsInfo.DISPLAY:\n //TODO: pass the pin back for display\n args.add(\"pin\");\n args.add(\"display\");\n break;\n case WpsInfo.KEYPAD:\n args.add(wps.pin);\n args.add(\"keypad\");\n break;\n case WpsInfo.LABEL:\n args.add(wps.pin);\n args.add(\"label\");\n default:\n break;\n }\n\n //TODO: Add persist behavior once the supplicant interaction is fixed for both\n // group and client scenarios\n /* Persist unless there is an explicit request to not do so*/\n //if (config.persist != WifiP2pConfig.Persist.NO) args.add(\"persistent\");\n\n if (joinExistingGroup) args.add(\"join\");\n\n int groupOwnerIntent = config.groupOwnerIntent;\n if (groupOwnerIntent < 0 || groupOwnerIntent > 15) {\n groupOwnerIntent = 3; //default value\n }\n args.add(\"go_intent=\" + groupOwnerIntent);\n\n String command = \"P2P_CONNECT \";\n for (String s : args) command += s + \" \";\n\n return doStringCommand(command);\n }", "public String getUpdipaddr() {\r\n return updipaddr;\r\n }", "public DHT() throws UnknownHostException, SocketException {\n socket = new DatagramSocket(sendPort);\n recSocket = new DatagramSocket(recPort);\n systemMap = new HashMap<>();\n systemMap.put(0,InetAddress.getByName(\"129.21.22.196\")); //glados\n systemMap.put(1,InetAddress.getByName(\"129.21.30.37\")); //queeg\n systemMap.put(2,InetAddress.getByName(\"129.21.34.80\")); // comet\n systemMap.put(3,InetAddress.getByName(\"129.21.37.49\")); // rhea\n systemMap.put(4,InetAddress.getByName(\"129.21.37.42\")); // domino\n systemMap.put(5,InetAddress.getByName(\"129.21.37.55\")); // gorgon\n systemMap.put(6,InetAddress.getByName(\"129.21.37.30\")); // kinks\n\n\n }", "int getUdpServerPort();", "public interface DNSIPAddress extends DNSObject, Comparable<DNSIPAddress> {\r\n\r\n enum Type { IPv4, IPv6 }\r\n\r\n /**\r\n * Returns the type of this IP address.\r\n *\r\n * @return the type of this IP address\r\n */\r\n Type getType();\r\n\r\n /**\r\n * Returns the value of this IP address (in case of IPv6 the uncompressed version is returned).\r\n *\r\n * @return the (uncompressed) value of this IP address\r\n */\r\n String getAddress();\r\n\r\n /**\r\n * Returns a compressed version of this IP address. If the address cannot be compressed\r\n * the address is returned.\r\n *\r\n * @return the compressed version of this IP address\r\n */\r\n String getCompressedAddress();\r\n\r\n /**\r\n * Returns an array containing the parts of this IP address (uncompressed). Each part of IP address\r\n * is a string.\r\n *\r\n * @return an array of the parts of this IP address.\r\n */\r\n String[] getParts();\r\n\r\n /**\r\n * Returns an array containing the parts of this IP address (uncompressed). Each part of IP address\r\n * is an integer.\r\n *\r\n * @return an array of the parts of this IP address.\r\n */\r\n int[] getInts();\r\n\r\n /**\r\n * Determines whether this IP address has been allocated or assigned\r\n * for special use according to RFC 3330.\r\n *\r\n * @return true if this IP address has been allocated or assigned\r\n * for special use according to RFC 3330; false otherwise.\r\n */\r\n boolean isReserved();\r\n}", "public void sendAdverts() {\n\t\tfor (int pfx = 0; pfx < pfxList.size(); pfx++){\n\t\t\tfor(int lnk = 0; lnk < nborList.size(); ++lnk){\n\t\t\t\tif(lnkVec.get(lnk).helloState == 0){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tPacket p = new Packet();\n\t\t\t\tp.protocol = 2; p.ttl = 100;\n\t\t\t\tp.srcAdr = myIp;\n\t\t\t\tp.destAdr = lnkVec.get(lnk).peerIp;\n\t\t\t\tp.payload = String.format(\"RPv0\\ntype: advert\\n\" \n\t\t\t\t\t\t+ \"pathvec: %s %.3f %d %s\\n\",\n\t\t\t\t\t\tpfxList.get(pfx).toString(), now, 0, myIpString); //potential problems\n\t\t\t\tfwdr.sendPkt(p,lnk);\n\t\t\t}\n\t\t}\n\t}", "public java.lang.String getIp(){\r\n return localIp;\r\n }", "public java.lang.String getIp(){\r\n return localIp;\r\n }", "private String createPackageList( final String eePackages,\n final String userPackages,\n final String platformPackages )\n {\n final StringBuilder packages = new StringBuilder();\n packages.append( eePackages );\n \n // append used defined packages\n if( userPackages != null && userPackages.trim().length() > 0 )\n {\n if( packages.length() > 0 )\n {\n packages.append( \",\" );\n }\n packages.append( userPackages );\n }\n // append platform specific packages\n if( platformPackages != null && platformPackages.trim().length() > 0 )\n {\n if( packages.length() > 0 )\n {\n packages.append( \",\" );\n }\n packages.append( platformPackages );\n }\n return packages.toString();\n }", "void sendUnicast(InetAddress hostname, String message);", "public static RemoteObject _process_globals() throws Exception{\nrequests3._device = RemoteObject.createNew (\"anywheresoftware.b4a.phone.Phone\");\n //BA.debugLineNum = 13;BA.debugLine=\"Private TileSource As String\";\nrequests3._tilesource = RemoteObject.createImmutable(\"\");\n //BA.debugLineNum = 14;BA.debugLine=\"Private ZoomLevel As Int\";\nrequests3._zoomlevel = RemoteObject.createImmutable(0);\n //BA.debugLineNum = 15;BA.debugLine=\"Private Markers As List\";\nrequests3._markers = RemoteObject.createNew (\"anywheresoftware.b4a.objects.collections.List\");\n //BA.debugLineNum = 16;BA.debugLine=\"Private MapFirstTime As Boolean\";\nrequests3._mapfirsttime = RemoteObject.createImmutable(false);\n //BA.debugLineNum = 18;BA.debugLine=\"Private MyPositionLat, MyPositionLon As String\";\nrequests3._mypositionlat = RemoteObject.createImmutable(\"\");\nrequests3._mypositionlon = RemoteObject.createImmutable(\"\");\n //BA.debugLineNum = 19;BA.debugLine=\"Private CurrentTabPage As Int = 0\";\nrequests3._currenttabpage = BA.numberCast(int.class, 0);\n //BA.debugLineNum = 20;BA.debugLine=\"Private InfoDataWindows As Boolean = False\";\nrequests3._infodatawindows = requests3.mostCurrent.__c.getField(true,\"False\");\n //BA.debugLineNum = 21;BA.debugLine=\"End Sub\";\nreturn RemoteObject.createImmutable(\"\");\n}", "public void multicast() throws IOException {\n try {\n InetAddress multicastAddress = InetAddress.getByName(\"239.255.255.250\");\n // multicast address for SSDP\n final int port = 1900; // standard port for SSDP\n MulticastSocket socket = new MulticastSocket(port);\n socket.setReuseAddress(true);\n socket.setSoTimeout(15000);\n socket.joinGroup(multicastAddress);\n\n // send discover\n byte[] txbuf = DISCOVER_MESSAGE.getBytes(\"UTF-8\");\n DatagramPacket hi = new DatagramPacket(txbuf, txbuf.length,\n multicastAddress, port);\n socket.send(hi);\n System.out.println(\"SSDP discover sent\");\n\n do {\n byte[] rxbuf = new byte[8192];\n DatagramPacket packet = new DatagramPacket(rxbuf, rxbuf.length);\n socket.receive(packet);\n dumpPacket(packet);\n } while (true); // should leave loop by SocketTimeoutException\n } catch (SocketTimeoutException e) {\n System.out.println(\"Timeout\");\n }\n }", "static void test4 () throws Exception {\n server = new ServerSocket (0);\n int port = server.getLocalPort();\n\n /* create an IPv4 mapped address corresponding to local host */\n\n byte[] b = {0,0,0,0,0,0,0,0,0,0,(byte)0xff,(byte)0xff,0,0,0,0};\n byte[] ia4 = ia4addr.getAddress();\n b[12] = ia4[0];\n b[13] = ia4[1];\n b[14] = ia4[2];\n b[15] = ia4[3];\n\n InetAddress dest = InetAddress.getByAddress (b);\n c1 = new Socket (dest, port);\n s1 = server.accept ();\n simpleDataExchange (c1,s1);\n c1.close ();\n s1.close ();\n server.close ();\n System.out.println (\"Test4: OK\");\n }", "public static int hdhomerun_local_ip_info(hdhomerun_local_ip_info_t ip_info_list[], int max_count)\r\n\t{\r\n\t\tint count = 0;\r\n\t\t\r\n \ttry {\r\n \t\tfor(Enumeration<NetworkInterface> list = NetworkInterface.getNetworkInterfaces(); list.hasMoreElements();)\r\n\t\t\t{\r\n\t\t\t \tNetworkInterface i = list.nextElement();\r\n\t\t\t \tfor(Enumeration<InetAddress> adds = i.getInetAddresses(); adds.hasMoreElements(); ) {\r\n\t\t\t \tInetAddress a = adds.nextElement(); \r\n\t\t\t \t\r\n\t\t\t \tint subnet = ShiftSubnetBitsInt(24);\r\n\t\t\t \tif(a.isLoopbackAddress() || a.getHostAddress().equals(\"255.255.255.255\") || a.getHostAddress().equals(\"0.0.0.0\"))\r\n\t\t\t \t\tcontinue;\r\n\t\t\t \t\r\n\t\t\t \t// only ipv4\r\n\t\t\t \tif(a.getAddress().length > 4)\r\n\t\t\t \t\tcontinue;\r\n\t\t\t \t\r\n\t\t\t \tip_info_list[count] = new hdhomerun_local_ip_info_t();\r\n\t\t\t \tip_info_list[count].ip_addr = IPAddr_BytesToInt(a.getAddress());\r\n\t\t\t \tip_info_list[count++].subnet_mask = subnet;\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t} catch (SocketException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t return count;\r\n\t}", "public String getUdpAddress() {\n\t\tfinal String key = ConfigNames.UDP_ADDRESS.toString();\n\n\t\tif (getJson().isNull(key)) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn getJson().getString(key);\n\t}", "public Pdp(Pdp source) {\n this.instanceId = source.instanceId;\n this.pdpState = source.pdpState;\n this.healthy = source.healthy;\n this.message = source.message;\n this.lastUpdate = source.lastUpdate;\n }", "@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-02-25 10:38:11.973 -0500\", hash_original_method = \"1269355D60D7190EAE617D5C71982259\", hash_generated_method = \"5E1FC5222F1D24E03DD02D8882E1411F\")\n \npublic CharGenUDPClient()\n {\n // CharGen return packets have a maximum length of 512\n __receiveData = new byte[512];\n __receivePacket = new DatagramPacket(__receiveData, 512);\n __sendPacket = new DatagramPacket(new byte[0], 0);\n }", "public void setDeviceIP(String argIp){\n\t deviceIP=argIp;\n }", "public Network() {\n\t\tnodes.put(\"192.168.0.0\", new NetNode(\"192.168.0.0\"));\n\t\tnodes.put(\"192.168.0.1\", new NetNode(\"192.168.0.1\"));\n\t\tnodes.put(\"192.168.0.2\", new NetNode(\"192.168.0.2\"));\n\t\tnodes.put(\"192.168.0.3\", new NetNode(\"192.168.0.3\"));\n\t\tnodes.put(\"192.168.0.4\", new NetNode(\"192.168.0.4\"));\n\t\t//manually entering ports\n\t\t//0 to 1 and 2\n\t\tnodes.get(\"192.168.0.0\").addPort(nodes.get(\"192.168.0.1\"));\n\t\tnodes.get(\"192.168.0.0\").addPort(nodes.get(\"192.168.0.2\"));\n\t\t//1 to 0 and 3\n\t\tnodes.get(\"192.168.0.1\").addPort(nodes.get(\"192.168.0.0\"));\n\t\tnodes.get(\"192.168.0.1\").addPort(nodes.get(\"192.168.0.3\"));\n\t\t//2 to 0 and 3 and 4\n\t\tnodes.get(\"192.168.0.2\").addPort(nodes.get(\"192.168.0.0\"));\n\t\tnodes.get(\"192.168.0.2\").addPort(nodes.get(\"192.168.0.3\"));\n\t\tnodes.get(\"192.168.0.2\").addPort(nodes.get(\"192.168.0.4\"));\n\t\t//3 to 1 and 2 and 4\n\t\tnodes.get(\"192.168.0.3\").addPort(nodes.get(\"192.168.0.1\"));\n\t\tnodes.get(\"192.168.0.3\").addPort(nodes.get(\"192.168.0.2\"));\n\t\tnodes.get(\"192.168.0.3\").addPort(nodes.get(\"192.168.0.4\"));\n\t\t//4 to 2 and 3\n\t\tnodes.get(\"192.168.0.4\").addPort(nodes.get(\"192.168.0.2\"));\n\t\tnodes.get(\"192.168.0.4\").addPort(nodes.get(\"192.168.0.3\"));\n\t}", "public void setAudioMulticastAddr(String ip);", "private void prepareData() {\n devices.clear();\n\n Set<String> s = Blue.getInstance().devices.keySet();\n Iterator<String> it = s.iterator();\n String address;\n while (it.hasNext()) {\n address = it.next();\n devices.add(new Device(address, Blue.getInstance().devices.get(address)));\n }\n }", "public void testGetSimppHosts() throws Exception{\n String[] hosts = new String[] {\n \"1.0.0.0.3:100\",\"2.0.0.0.3:200\",\"3.0.0.0.3:300\"};\n \n DHTSettings.DHT_BOOTSTRAP_HOSTS.setValue(hosts);\n \n //only first hex counts\n KUID id = KUID.createWithHexString(\"03ED9650238A6C576C987793C01440A0EA91A1FB\");\n Contact localNode = ContactFactory.createLocalContact(Vendor.UNKNOWN, Version.ZERO, id, 0, false);\n PrivilegedAccessor.setValue(dhtContext.getRouteTable(), \"localNode\", localNode);\n \n bootstrapper.bootstrap();\n InetSocketAddress addr = (InetSocketAddress) bootstrapper.getSimppHost();\n String address = addr.getHostName();\n int port = addr.getPort();\n assertEquals(address+\":\"+port, hosts[0]);\n \n //change first hex. Should point to last elem of the list\n id = KUID.createWithHexString(\"F3ED9650238A6C576C987793C01440A0EA91A1FB\");\n localNode = ContactFactory.createLocalContact(Vendor.UNKNOWN, Version.ZERO, id, 0, false);\n PrivilegedAccessor.setValue(dhtContext.getRouteTable(), \"localNode\", localNode);\n addr = (InetSocketAddress) bootstrapper.getSimppHost();\n address = addr.getHostName();\n port = addr.getPort();\n assertEquals(address+\":\"+port, hosts[2]);\n }" ]
[ "0.56751764", "0.5518222", "0.5421059", "0.5369068", "0.532765", "0.5291746", "0.52890795", "0.52876556", "0.52381134", "0.52281797", "0.5195166", "0.51892734", "0.515888", "0.5105194", "0.50881153", "0.5077375", "0.5074442", "0.50182503", "0.5011857", "0.50012547", "0.49992317", "0.4990449", "0.49885648", "0.49875793", "0.49605617", "0.49504128", "0.49495885", "0.4942795", "0.49220875", "0.48944005", "0.48925778", "0.48902676", "0.48849255", "0.48675707", "0.48665032", "0.4857738", "0.48538932", "0.48486647", "0.48481563", "0.48265925", "0.4825212", "0.48242483", "0.48062128", "0.48048005", "0.48008338", "0.47893724", "0.47791478", "0.4769995", "0.47673148", "0.47652373", "0.4760038", "0.47599858", "0.47562355", "0.47508702", "0.47498822", "0.47432244", "0.47240075", "0.4723435", "0.47195458", "0.47135997", "0.47132888", "0.47015694", "0.46989465", "0.46978158", "0.46966368", "0.46948397", "0.46905732", "0.46767148", "0.46698856", "0.46655482", "0.46629494", "0.46558955", "0.4654957", "0.46520168", "0.46512473", "0.46489382", "0.46478498", "0.46404397", "0.46397793", "0.46371388", "0.46319497", "0.46303686", "0.4629728", "0.46278468", "0.46265233", "0.46265233", "0.46208984", "0.4617956", "0.46111426", "0.4610958", "0.4603916", "0.45997944", "0.45989504", "0.45986357", "0.45963633", "0.45944178", "0.45900032", "0.45867255", "0.4583045", "0.4579003" ]
0.5652608
1
this method is called when you press the button in the top right will send a USP message from the emulator to the drone (from itself to itself)
public void sendUdpMessageToDrone(ActionEvent actionEvent) { String message = testmessagebox.getText(); DatagramPacket packet = null; try { packet = new DatagramPacket(message.getBytes(), message.length(), InetAddress.getByName("127.0.0.1"), 6000); sender.send(packet); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tLog.d(\"VoMPCall\", \"Picking up\");\n \t\t\t\tServalBatPhoneApplication.context.servaldMonitor\n \t\t\t\t\t\t.sendMessage(\"pickup \"\n \t\t\t\t\t\t+ Integer.toHexString(local_id));\n \t\t\t}", "public void sendClick(View view) {\n String message = input.getText().toString();\n uart.send(message);\n }", "private void sendSignal(){\n\t\tSystem.out.println(inputLine + \"test\");\n\t\tMessageContent messageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_RANDOM);\n\t\tif(inputLine.equals(Constants.BUTTON_1_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_BEDROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_1_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_BEDROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_2_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_KITCHEN, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_2_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_KITCHEN, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_3_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_LIVINGROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_3_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_LIVINGROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_4_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_RANDOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_4_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_RANDOM, \"0\");\n\t\t\tSystem.out.println(\"oh yeah\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_5_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.SHUTTER, Constants.PLACE_LIVINGROOM);\n\t\t}else if(inputLine.equals(Constants.BUTTON_5_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.SHUTTER, Constants.PLACE_LIVINGROOM);\n\t\t}\n\t\t\t\t\n\t\tString json = messageContent.toJSON();\n\t\tDFAgentDescription template = new DFAgentDescription();\n ServiceDescription sd = new ServiceDescription();\n if (inputLine.equals(Constants.BUTTON_5_ON) || inputLine.equals(Constants.BUTTON_5_OFF)) {\n\t\tsd.setType(Constants.SHUTTER);\n\t\tsd.setName(Constants.PLACE_LIVINGROOM);\n } else {\n\t\tsd.setType(Constants.AUTO_SWITCH);\n\t\tsd.setName(Constants.AUTO_SWITCH_AGENT);\n }\n template.addServices(sd);\n try {\n DFAgentDescription[] result = DFService.search(myAgent, template);\n if (result.length > 0) {\n ACLMessage request = new ACLMessage(ACLMessage.REQUEST);\n if (inputLine.equals(Constants.BUTTON_5_ON) || inputLine.equals(Constants.BUTTON_5_OFF)) {\n\t\t\t\trequest.setPerformative(ACLMessage.INFORM);\n }\n for (DFAgentDescription receiver : result) {\n if (!receiver.getName().equals(myAgent.getAID())) {\n request.addReceiver(receiver.getName());\n \n }\n }\n request.setContent(json);\n myAgent.send(request);\n }\n } catch(FIPAException fe) {\n fe.printStackTrace();\n }\n\n\n\t}", "public void onClickSend(View view) {\n //String string = editText.getText().toString();\n //serialPort.write(string.getBytes());\n //tvAppend(txtResponse, \"\\nData Sent : \" + string + \"\\n\");\n }", "@Override\r\n public void onClick(View v)\r\n {\n if (\"\" != mSendOnBoardEdit.getText().toString()){\r\n DJIDrone.getDjiMainController().sendDataToExternalDevice(mSendOnBoardEdit.getText().toString().getBytes(),new DJIExecuteResultCallback(){\r\n\r\n @Override\r\n public void onResult(DJIError result)\r\n {\r\n // TODO Auto-generated method stub\r\n \r\n }\r\n \r\n });\r\n }\r\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()){\n case R.id.buttonUp :\n usbBroadcastReceiver.sendToAccessory(\"Up\");\n break;\n\n case R.id.buttonTleft :\n usbBroadcastReceiver.sendToAccessory(\"TurnLeft\");\n break;\n\n case R.id.buttonTright :\n usbBroadcastReceiver.sendToAccessory(\"TurnRight\");\n break;\n\n case R.id.buttonFwd :\n usbBroadcastReceiver.sendToAccessory(\"Forward\");\n break;\n\n case R.id.buttonMvleft :\n usbBroadcastReceiver.sendToAccessory(\"MovLeft\");\n break;\n\n case R.id.buttonMvRight :\n usbBroadcastReceiver.sendToAccessory(\"MovRight\");\n break;\n\n case R.id.buttonHover :\n usbBroadcastReceiver.sendToAccessory(\"Hover\");\n break;\n\n case R.id.buttonBwd :\n usbBroadcastReceiver.sendToAccessory(\"Backward\");\n break;\n\n case R.id.buttonDown :\n usbBroadcastReceiver.sendToAccessory(\"Down\");\n break;\n\n case R.id.buttonTakeoff :\n usbBroadcastReceiver.sendToAccessory(\"takeOff\");\n break;\n\n case R.id.buttonAdjust :\n usbBroadcastReceiver.sendToAccessory(\"Adjust\");\n break;\n\n case R.id.buttonLand:\n usbBroadcastReceiver.sendToAccessory(\"Land\");\n break;\n\n case R.id.buttonEnd :\n usbBroadcastReceiver.sendToAccessory(\"End\");\n break;\n\n case R.id.buttonEmergency :\n usbBroadcastReceiver.sendToAccessory(\"Emergency\");\n break;\n default:\n\n }\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tmsgText.setText(null);\n\t\t\tsendEdit.setText(null);\n\t\t\tif(sppConnected || devAddr == null)\n\t\t\t\treturn;\n\t\t\ttry{\n\t\t\t btSocket = btAdapt.getRemoteDevice(devAddr).createRfcommSocketToServiceRecord(uuid);\n\t\t\t btSocket.connect();\n\t\t\t Log.d(tag,\"BT_Socket connect\");\n\t\t\t synchronized (MainActivity.this) {\n\t\t\t\tif(sppConnected)\n\t\t\t\t\treturn;\n\t\t\t\tbtServerSocket.close();\n\t\t\t\tbtIn = btSocket.getInputStream();\n\t\t\t\tbtOut = btSocket.getOutputStream();\n\t\t\t\tconected();\n\t\t\t}\n\t\t\t Toast.makeText(MainActivity.this,\"藍牙裝置已開啟:\" + devAddr, Toast.LENGTH_LONG).show();\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t\tsppConnected =false;\n\t\t\t\ttry{\n\t\t\t\t\tbtSocket.close();\n\t\t\t\t}catch(IOException e1){\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tbtSocket = null;\n\t\t\t\tToast.makeText(MainActivity.this, \"連接異常\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tSendToServer(ph);\n\t\t\t\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void ipcallButtonPressed() {\n\t\tdialButtonPressed(true) ;\n\t}", "public void onClick(View v) {\n setBottonSingleTest();\n viewPager.setCurrentItem(0);\n\n\n try{\n DatagramSocket socket = new DatagramSocket();\n byte[] buf = \"hello world\".getBytes();\n\n DatagramPacket packet = new DatagramPacket(buf,\n buf.length,\n InetAddress.getByName(\"255.255.255.255\"),\n 666);\n //给服务端发送数据\n socket.send(packet);\n socket.close();\n }catch (IOException e){\n System.out.println(e);\n }\n }", "public void goToSendCommand(View view){\n Log.i(tag, \"About to launch SendCommand\");\n Intent i = new Intent(this, SendCommand.class);\n startActivity(i);\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\r\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = USER;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tmConnectedThread.write(\"send\");\n\t\t\t\t\tmConnectedThread.writeFile();\n\t\t\t\t}", "public void OnclickHandler(View view) throws Exception {\n \t\tint server_port = 9761;\n \t\tString server_ip = \"192.168.1.1\";\n \t\tswitch (view.getId()) {\n \t\t\tcase R.id.buttonForward:\n \t\t\t\t\n \t\t\t\tcommande[0] = 0x1;\n\t\t\t\tbreak;\n \t\t\tcase R.id.buttonBackward:\n \t\t\t\tcommande[0] = 0x2;\n \t\t\t\tbreak;\n \t\t\tcase R.id.buttonLeft:\n \t\t\t\tcommande[1] = 0x0;\n \t\t\t\tcommande[2] = 0x0;\n \t\t\t\tcommande[3] = 0x1;\n \t\t\t\tcommande[4] = 0x0;\n \t\t\t\tbreak;\n \t\t\tcase R.id.buttonStop:\n \t\t\t\tcommande[0] = 0x0;\n \t\t commande[1] = 0x0;\n \t\t commande[2] = 0x0;\n \t\t commande[3] = 0x0;\n \t\t commande[4] = 0x0;\n \t\t\t\tbreak;\n \t\t\tcase R.id.buttonRight:\n \t\t\t\tcommande[1] = 0x0;\n \t\t\t\tcommande[2] = 0x0;\n \t\t\t\tcommande[3] = 0x0;\n \t\t\t\tcommande[4] = 0x1;\n \t\t\t\tbreak;\n \t\t\tcase R.id.buttonUp:\n \t\t\t\tcommande[1] = 0x1;\n \t\t\t\tcommande[2] = 0x0;\n \t\t\t\tcommande[3] = 0x0;\n \t\t commande[4] = 0x0;\n \t\t\t\tbreak;\n \t\t\tcase R.id.buttonDown:\n \t\t\t\tcommande[1] = 0x0;\n \t\t\t\tcommande[2] = 0x1;\n \t\t\t\tcommande[3] = 0x0;\n \t\t commande[4] = 0x0;\n \t\t\t\tbreak;\n \t\t }\n \t\tsendUDPMessage(new String(commande),server_ip,server_port);\n \t\t \n \t}", "@Override\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tLog.d(\"VoMPCall\", \"Hanging up\");\n \t\t\t\tServalBatPhoneApplication.context.servaldMonitor\n \t\t\t\t\t\t.sendMessage(\"hangup \"\n \t\t\t\t\t\t+ Integer.toHexString(local_id));\n \t\t\t}", "public void goSendOrderButton(View view) { //is called by onClick function of Button in activity_main.xml\n if(WifiAvaible()) {\n try {\n fab.getProtocol().sendOrder(surface.getSeedbox().toString());\n OrderStatus.setText(\"Waiting for \\n\"+\"confirmation.\");\n } catch (Exception e) {\n //ErrorWindow\n }\n\n SendButton.setEnabled(false);\n }\n\n\n/*\n if(ClickCnt == 0) {\n mp.start();\n ClickCnt = 1;\n } else {\n ClickCnt = 0;\n mp.stop();\n try {\n mp.prepare();\n }\n catch (java.lang.Exception e)\n {\n // Do nothing\n }\n\n mp.seekTo(0);\n }*/\n }", "@Override\n\tpublic void callButton(TrafficSignal TS) {\n\t\t\n\t}", "public void onClickSend(View view) {\n String string = editText.getText().toString();\n serialPort.write(string.getBytes());\n tvAppend(textView, \"\\nData Sent : \" + string + \"\\n\");\n\n }", "public void btnHelpClick(){\n try {\n String Tag = TAG + \"-BtnHelp\";\n // Get number\n String number = getMyPhoneNO();\n ReceiveMessageThread receiveMessageThread;\n // Mount the message to be sent\n String msg = \"*SOS*;Number:\" + number + \";\";\n Log.i(Tag, msg);\n // Show message to user\n showProgressDialog(\"Sending distress message...\");\n // Disable Help Button\n btn_help.setEnabled(false);\n // Start thread to send message\n receiveMessageThread = new ReceiveMessageThread(msgHandler, msg);\n receiveMessageThread.start();\n }\n catch (Exception e){\n Log.i(TAG , \"Caught this exception: \" + e.getMessage());\n }\n }", "@Override\n public void onClick(View view) {\n\n runOnUiThread(\n new Runnable() {\n @Override\n public void run() {\n MainActivity\n .this\n .connectionManager.getTo().println(\n MainActivity\n .this\n .send_text.getText().toString()\n );\n }\n }\n );\n\n }", "@Override\n public void onClick(View v) {\n sendMessage(phone_from_intent);\n }", "public void sendToWard(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tUri uri = Uri.parse(\"smsto://08000000123\");\n\t\t\tIntent intent = new Intent(Intent.ACTION_SENDTO, uri);\n\t\t\tintent.putExtra(\"sms_body\", \"SMS message\");\n\t\t\tstartActivity(intent);\n\t\t}", "@Override\r\n public void onClick(View v) {\n String msg = ed_msg.getText().toString();\r\n try {\r\n\t\t\t\t\tsend(HOST, PORT, msg.getBytes());\r\n\t\t\t\t\t\r\n\t \tmHandler.sendMessage(mHandler.obtainMessage()); \r\n\t \tcontent =HOST +\":\"+ msg +\"\\n\";\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n }", "void userPressConnectButton();", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = BALLON;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = OTHERBEACH;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}", "@Override\r\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\r\n case R.id.sendd:\r\n buffer = new byte[]{'d'};\r\n if (sendMessage(buffer) == -1) {\r\n Toast.makeText(getActivity(), \"失败,请检查连接!\", Toast.LENGTH_SHORT).show();\r\n } else {\r\n Toast.makeText(getActivity(), \"正在关闭,请稍后...\", Toast.LENGTH_SHORT).show();\r\n }\r\n break;\r\n case R.id.sendz:\r\n buffer = new byte[]{'z'};\r\n if (sendMessage(buffer) == -1) {\r\n Toast.makeText(getActivity(), \"失败,请检查连接!\", Toast.LENGTH_SHORT).show();\r\n } else {\r\n Toast.makeText(getActivity(), \"正在关闭,请稍后...\", Toast.LENGTH_SHORT).show();\r\n }\r\n break;\r\n case R.id.sendrclear:\r\n byte[] a = new byte[]{60,0,0};\r\n sendR(a);\r\n break;\r\n case R.id.sendrcloud:\r\n byte[] b = new byte[]{0,2,0};\r\n sendR(b);\r\n break;\r\n\r\n case R.id.sendrcloud2:\r\n byte[] c = new byte[]{127,2,0};\r\n sendR(c);\r\n break;\r\n\r\n case R.id.sendrrain:\r\n byte[] d = new byte[]{60,1,1};\r\n sendR(d);\r\n break;\r\n\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = PROPER;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n byte[] bytes = command.getBytes();\n\n if (sPort != null) {\n\n try {\n sPort.write(bytes, 100000);\n Log.e(LOG_TAG, \"inside write\");\n// mExecutor.submit(mSerialIoManager);\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(LOG_TAG, \"Exception \" + e);\n }\n } else {\n Log.e(LOG_TAG, \"UsbSerialPort is null\");\n }\n }", "@Override\n\t\t\tpublic boolean onTouch(View v, final MotionEvent event) {\n\t\t\t\t\n\t\t\t\t\t\tif((event.getAction() == MotionEvent.ACTION_UP))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsendString(\"SS\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse if((event.getAction() == MotionEvent.ACTION_DOWN))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsendString(\"SS\");\t\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t \n\t\t\t\treturn true;\n\t\t\t}", "public void sendMessage(View view) {\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n String message = \"You pressed the button!\";\n intent.putExtra(EXTRA_MESSAGE, message);\n startActivity(intent);\n\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.send:\n StringBuilder sb = new StringBuilder();\n\n // sb.append(config_preferences.getString(\"phoneID\",\n // \"xxxxxxxx\")+\",\"); //手机编号\n sb.append(Util.phoneID + \",\"); // 手机编号\n sb.append(datetime + \",\"); // 日期、时间\n sb.append(kindslist_Number.get(pestsKinds\n .getSelectedItemPosition()) + \",\"); // 每个数字对应的种类\n sb.append(stagelist_Number.get(pestsStage\n .getSelectedItemPosition()) + \",\"); // 生长阶段对应数字\n sb.append(amountlist_Number.get(pestsAmount\n .getSelectedItemPosition()) + \",\"); // 受害数量对应数字\n sb.append(levellist_Number.get(pestsLevel\n .getSelectedItemPosition()) + \",\"); // 危害程度对应数字\n sb.append(adviselist_Number.get(pestsAdvise\n .getSelectedItemPosition())); // 处理建议对应数字\n\n final Util util = new Util(PestsDetail.this);\n final String msg = sb.toString();\n\n Thread detail_Thread = new Thread() {\n @Override\n public void run() {\n util.sendPestsDetail(msg);\n }\n };\n if (Forest.isNetConnect(PestsDetail.this)) {\n detail_Thread.start();\n }\n Intent i = new Intent(PestsDetail.this, Main.class);\n i.setFlags(i.FLAG_ACTIVITY_NO_USER_ACTION);\n startActivity(i);\n i = null;\n break;\n default:\n break;\n }\n }", "@Override\n\t\t\tpublic boolean onTouch(View v, final MotionEvent event) {\n\t\t\t\t\n\t\t\t\t\t\tif((event.getAction() == MotionEvent.ACTION_UP))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsendString(\"SS\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse if((event.getAction() == MotionEvent.ACTION_DOWN))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsendString(\"RR\");\t\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t \n\t\t\t\treturn true;\n\t\t\t}", "@Override\n\t\t\tpublic boolean onTouch(View v, final MotionEvent event) {\n\t\t\t\t\n\t\t\t\t\t\tif((event.getAction() == MotionEvent.ACTION_UP))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsendString(\"SS\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse if((event.getAction() == MotionEvent.ACTION_DOWN))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsendString(\"UU\");\t\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t \n\t\t\t\treturn true;\n\t\t\t}", "private void sendToMyself(ProxyEvent event) throws AppiaEventException {\n \t\ttry {\n \t\t\tProxyEvent clone = (ProxyEvent) event.cloneEvent();\n \t\t\tclone.storeMessage();\n \t\t\tclone.setDir(Direction.DOWN);\n \t\t\tclone.setChannel(vsChannel);\n \t\t\tclone.setSourceSession(this);\n \t\t\tclone.init();\n \n \t\t\tEchoEvent echo = new EchoEvent(clone, this.vsChannel, Direction.UP, this);\n \t\t\techo.init();\n \t\t\techo.go();\n \t\t} catch (CloneNotSupportedException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}", "@Override\n\t public void onClick(View v) {\n\t \t SendReqToPebble();\n\t }", "public void message1Pressed() {\n // display\n TextLCD.print(MESSAGE1);\n // current sensor state?\n boolean sensorState = fSensorState[0];\n // activate/passivate sensor\n if(sensorState)\n Sensor.S1.passivate();\n else\n Sensor.S1.activate();\n // change sensor state\n fSensorState[0] = !sensorState;\n }", "private void execHandlerDevice( Message msg ) {\n\t\t // get the connected device's name\n\t\tString name = msg.getData().getString( BUNDLE_DEVICE_NAME );\n\t\tlog_d( \"EventDevice \" + name );\n\t\thideButtonConnect();\t\n\t\tString str = getTitleConnected( name );\n\t\tshowTitle( str );\n\t\ttoast_short( str );\n\t}", "public void sendMessage()\r\n {\r\n MessageScreen messageScreen = new MessageScreen(_lastMessageSent);\r\n pushScreen(messageScreen);\r\n }", "public void mo1611c() {\r\n Message.obtain(this.f4603a.f4598n, 6, null).sendToTarget();\r\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = OK;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}", "public void sendMessage(View view) {\n\t\t// Do something in response to button click\n\t\tFile rebootFile = SaveHelper.getFile(SaveHelper.CATEGORY_DMSGFILE);\n\t\tif (rebootFile.exists()){\n\t\t\t//rebootFile.delete();\n\t\t\tDmsgTool fileWrite = new DmsgTool();\n\t\t\tfileWrite.rebootWrite(0);\n\t\t\t\n\n\t\t\trebootScanner();\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\ttry {\n\t\t\t\trebootFile.createNewFile();\n\t\t\t\t\n\t\t\t\tDmsgTool fileWrite = new DmsgTool();\n\t\t\t\tfileWrite.rebootWrite(0);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\trebootScanner();\n\t\t\t\n\t\t}\n\n\t}", "@Override\n public void onClick(View v) {\n if(handler!=null){\n Message msg = new Message();\n Bundle bundle = new Bundle();\n bundle.putInt(\"data\", loc);\n msg.what = CHOICE_CONTROL_TAIL;\n msg.setData(bundle);\n handler.sendMessage(msg);\n }\n }", "@Override\n\tpublic void onClick(View arg0) {\n\t\tswitch (arg0.getId()) {\n\t\tcase R.id.start_speaking:\n\t\t\tLog.e(\"AudioSession\", \"AudioSession is Going to start\");\n\t\t\t\n\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tqueuePos.setVisibility(View.VISIBLE);\n\t\t\t\t\tqueuePos.setText(\"AUDIO streaming...\");\n\t\t\t\t\tstartsp.setVisibility(View.GONE);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tas = new AudioSession();\t//THIS OBJECT HANDLES ALL ASPECTS OF COMMUNICATION\n\t\t\tas.onRequestPress();\n\n\t\t\tLog.e(\" AudioSession\", \"AudioSession Started\");//START AUDIO MESSAGE\n\t\t\tbreak;\n\t\t\n\t\t\t\n\t\t}\n\t}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tC2DMessaging.register(getBaseContext(), \"[email protected]\");\t\t\t\n\t\t}", "public void action() {\n MessageTemplate template = MessageTemplate.MatchPerformative(CommunicationHelper.GUI_MESSAGE);\n ACLMessage msg = myAgent.receive(template);\n\n if (msg != null) {\n\n /*-------- DISPLAYING MESSAGE -------*/\n try {\n\n String message = (String) msg.getContentObject();\n\n // TODO temporary\n if (message.equals(\"DistributorAgent - NEXT_SIMSTEP\")) {\n \tguiAgent.nextAutoSimStep();\n // wykorzystywane do sim GOD\n // startuje timer, zeby ten zrobil nextSimstep i statystyki\n // zaraz potem timer trzeba zatrzymac\n }\n\n guiAgent.displayMessage(message);\n\n } catch (UnreadableException e) {\n logger.error(this.guiAgent.getLocalName() + \" - UnreadableException \" + e.getMessage());\n }\n } else {\n\n block();\n }\n }", "@Override\n public void show() {\n mHandler.obtainMessage(0).sendToTarget();\n }", "public void sendMessage(View buttonView)\n {\n state = 0;\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n EditText editText = (EditText) findViewById(R.id.Message);\n EditText editTextPhoneNumber = (EditText) findViewById(R.id.Phone);\n String message = editText.getText().toString();\n String phoneNumberMessage = editTextPhoneNumber.getText().toString();\n intent.putExtra(EXTRA_MESSAGE, message);\n intent.putExtra(EXTRA_PHONEMESSAGE, phoneNumberMessage);\n startActivity(intent);\n }", "public void onClick(DialogInterface dialog, int whichButton) {\n userNameEditTextValue = edittext.getText().toString() + \"\\n\";\n\n byte[] bytes = userNameEditTextValue.getBytes();\n\n if (sPort != null) {\n\n try {\n sPort.write(bytes, 1000);\n Log.e(LOG_TAG, \"inside write\");\n// mExecutor.submit(mSerialIoManager);\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(LOG_TAG, \"Exception \" + e);\n }\n } else {\n Log.e(LOG_TAG, \"UsbSerialPort is null\");\n }\n\n }", "public void onClick(View view) {\n\t\t\tsendSMSMessage(profile_silent,phoneNo);\n\t\t\tGoHome();\n }", "@Override\r\n public void onMouseUp(Mouse.ButtonEvent event){\n HomeScreen.settingSound(false);\r\n ss.push(new HomeScreen(ss));\r\n }", "public void sendMessage(View view) {\n\t\t// Do something in response to button\n\t\tIntent intent = new Intent(this, DisplayMessageActivity.class);\n\t\tstartActivity(intent);\n\n\t}", "public void clickButton(View v) {\n\n // Get the text we want to send.\n EditText et = (EditText) findViewById(R.id.editText);\n String msg = et.getText().toString();\n\n // Then, we start the call.\n PostMessageSpec myCallSpec = new PostMessageSpec();\n\n\n myCallSpec.url = SERVER_URL_PREFIX + \"post_msg.json\";\n myCallSpec.context = ChatActivity.this;\n // Let's add the parameters.\n HashMap<String,String> m = new HashMap<String,String>();\n m.put(\"app_id\", MY_APP_ID);\n m.put(\"msg\", msg);\n myCallSpec.setParams(m);\n\n startSpinner();\n\n // Actual server call.\n if (uploader != null) {\n // There was already an upload in progress.\n uploader.cancel(true);\n }\n uploader = new ServerCall();\n //startSpinner();\n uploader.execute(myCallSpec);\n }", "public void handleSendBtn(ActionEvent actionEvent) throws IOException {\n Socket socket = ConnSocket.getInstance();\n InputStream inputStream = socket.getInputStream();\n OutputStream outputStream = socket.getOutputStream();\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream, true);\n //String [] userInfo = {textField.getText(), nameLabel.getText()};\n out.println(textField.getText());\n\n }", "@Override\n\t\t\tpublic boolean onTouch(View v, final MotionEvent event) {\n\t\t\t\t\n\t\t\t\t\t\tif((event.getAction() == MotionEvent.ACTION_UP))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsendString(\"SS\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse if((event.getAction() == MotionEvent.ACTION_DOWN))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsendString(\"LL\");\t\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t \n\t\t\t\treturn true;\n\t\t\t}", "@Override\n public void onClick(View v) {\n if(handler!=null){\n Message msg = new Message();\n Bundle bundle = new Bundle();\n bundle.putInt(\"data\", loc);\n msg.what = CHOICE_CONTROL_HEAD;\n msg.setData(bundle);\n handler.sendMessage(msg);\n }\n }", "@Override\n public void onClick(View v) {\n if(handler!=null){\n Message msg = new Message();\n Bundle bundle = new Bundle();\n bundle.putInt(\"data\", loc);\n msg.what = CHOICE_CONTROL_1;\n msg.setData(bundle);\n handler.sendMessage(msg);\n }\n }", "public void buttonPressed()\n {\n userInput.setOnClickListener( new View.OnClickListener()\n {\n\n public void onClick( View view )\n {\n Intent in = new Intent( FromServer1.this, UserInput.class );\n startActivity( in );\n }\n } );\n }", "public void onClick(DialogInterface dialog, int which) {\n BluetoothDevice device = bleDevicesList.get(which);\n //we have the device\n startRightShoeService(device.getAddress());\n }", "public void onClickStart(View view) {\n\n HashMap<String, UsbDevice> usbDevices = usbManager.getDeviceList();\n if (!usbDevices.isEmpty()) {\n boolean keep = true;\n for (Map.Entry<String, UsbDevice> entry : usbDevices.entrySet()) {\n device = entry.getValue();\n int deviceVID = device.getVendorId();\n if (deviceVID == 0x2341)//Arduino Vendor ID\n {\n PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0);\n usbManager.requestPermission(device, pi);\n keep = false;\n } else {\n connection = null;\n device = null;\n }\n\n if (!keep)\n break;\n }\n }\n\n\n }", "public void sendMessage(View v) {\n // retrieve the text typed in by the user in the EditText\n String message = ((EditText)(findViewById(R.id.editText_message))).getText().toString();\n // create an implicit intent to any app with SENDTO capability\n // set the destination (5556 is the phone number of the second emulator instance)\n Uri destination = Uri.parse(\"smsto:5556\");\n Intent smsIntent = new Intent(Intent.ACTION_SENDTO, destination);\n // pass the composed message to the messaging activity\n smsIntent.putExtra(\"sms_body\", message);\n // launch the intent\n startActivity(smsIntent);\n }", "public void transmit()\n { \n try\n {\n JSch jsch=new JSch(); //object that allows for making ssh connections\n //Log into the pi\n Session session=jsch.getSession(USERNAME, HOSTNAME, 22); //pi defaults to using port 22 \n session.setPassword(PASSWORD);\n session.setConfig(\"StrictHostKeyChecking\", \"no\"); //necessary to access the command line easily\n \n session.connect(1000);//connect to the pi\n \n Channel channel = session.openChannel(\"exec\");//set session to be a command line \n ((ChannelExec)channel).setCommand(this.command); //send command to the pi\n \n channel.setInputStream(System.in); \n channel.setOutputStream(System.out);\n //connect to the pi so the command can go through\n channel.connect(1000);\n }\n catch(Exception e)\n {\n JOptionPane.showMessageDialog(frame, \"Error connecting to infrared light\", \"Error Message\", JOptionPane.ERROR_MESSAGE);\n }\n }", "@Override\n public void userRequestedAction()\n {\n inComm = true;\n view.disableAction();\n\n // switch to loading ui\n view.setActionText(\"Loading...\");\n view.setStatusText(loadingMessages[rand.nextInt(loadingMessages.length)]);\n view.setStatusColor(COLOR_WAITING);\n view.loadingAnimation();\n\n // switch the status of the system\n if (isArmed) disarmSystem();\n else armSystem();\n isArmed = !isArmed;\n\n // notify PubNub\n }", "@Override\n public void onClick(View view) {\n send();\n }", "public void askForPowerUpAsAmmo() {\n mainPage.setRemoteController(senderRemoteController);\n mainPage.setMatch(match);\n if (!mainPage.isPowerUpAsAmmoActive()) { //check if there is a PowerUpAsAmmo already active\n Platform.runLater(\n () -> {\n try {\n mainPage.askForPowerUpAsAmmo();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n );\n }\n\n }", "public void onClick(View view) {\n sendSMSMessage(profile_general,phoneNo);\n GoHome();\n }", "@Override\n public void onClick(View v) {\n Intent returnToPressHelp = new Intent(getApplicationContext(), PressHelp.class);\n startActivity(returnToPressHelp);\n\n\n //Tell the phone that the medication was taken.\n\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tspeakOut(src,dest);\r\n\t\t\t}", "public void sendText(View view)\n {\n String toSay = editText.getText().toString();\n editText.getText().clear();\n findViewById(R.id.main_layout).requestFocus();\n InputMethodManager imm = (InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n logicController.ConnectToServer(toSay, false);\n //ttsCont.speakThis(toSay);\n //toastWithTimer(toSay, true);\n }", "@Override\r\n\tpublic void mesage() {\n\t\tSystem.out.println(\"通过语音发短信\");\r\n\t}", "public void openPromotion() {\n myActivity.setContentView(R.layout.promotion);\n Button promotionButtonToGame = myActivity.findViewById(R.id.button6);\n\n promotionButtonToGame.setOnClickListener(\n new View.OnClickListener() {\n\n public void onClick(View v) {\n ShogiHumanPlayer.this.setAsGui(myActivity);\n usingRulesScreen = false;\n if (state != null) {\n receiveInfo(state);\n }\n }\n }\n\n\n );\n\n\n }", "public void onClick(View arg0)\n\t\t{\n serverIntent = new Intent(BloothPrinterActivity.this, DeviceListActivity.class);\n startActivityForResult(serverIntent, REQUEST_CONNECT_DEVICE);\n\t\t}", "private void sendGameCommand(){\n\n }", "@Override\n\t\t\tpublic boolean onTouch(View v, final MotionEvent event) {\n\t\t\t\t\n\t\t\t\t\t\tif((event.getAction() == MotionEvent.ACTION_UP))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsendString(\"SS\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse if((event.getAction() == MotionEvent.ACTION_DOWN))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsendString(\"DD\");\t\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t \n\t\t\t\treturn true;\n\t\t\t}", "void leftClickPressedOnDelivery();", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == bt1) {\n\t\t\ttry {\n\t\t\t\tString s = tfnhap.getText();\n\t\t\t\tsenddata = new byte[s.length()];\n\t\t\t\treceivedata = new byte[1024];\n\t\t\t\tsenddata = s.getBytes();\n\t\t\t\tDatagramPacket send = new DatagramPacket(senddata, senddata.length, inet, 8892);\n\t\t\t\tmoi.send(send);\n\t\t\t\tDatagramPacket receive = new DatagramPacket(receivedata, receivedata.length);\n\t\t\t\tmoi.receive(receive);\n\t\t\t\tString kq = new String(receive.getData());\n\t\t\t\ttfkq.setText(kq);\n\n\t\t\t} catch (UnknownHostException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t} catch (IOException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t\tif (e.getSource() == bt2)\n\t\t\tSystem.exit(0);\n\t}", "@Override\r\n\t public void onClick(View arg0) {\n\t screenDialog.dismiss();\r\n\t String sms = messageText.getText().toString();\r\n\t \ttry {\r\n\t\t\t\tSmsManager smsManager = SmsManager.getDefault();\r\n\t\t\t\tsmsManager.sendTextMessage(phone, null, sms, null, null);\r\n\t\t\t\tToast.makeText(getApplicationContext(), \"SMS Sent!\",\r\n\t\t\t\t\t\tToast.LENGTH_LONG).show();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\t\"SMS faild, please try again later!\",\r\n\t\t\t\t\t\tToast.LENGTH_LONG).show();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t }", "public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}", "@Override\r\n\t\t\t\t\t\t\t\tpublic void setPositiveButton() {\n\t\t\t\t\t\t\t\t\tif (SystemConfig.loginResponse.getDutyFlag().equals(\"on\")) {\r\n\t\t\t\t\t\t\t\t\t\tsendForService(\"1\", str);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\thandler.sendEmptyMessage(ConstantValue.PROGRESS_CLOSE);\r\n\t\t\t\t\t\t\t\t\t\tMessage message = Message.obtain();\r\n\t\t\t\t\t\t\t\t\t\tmessage.obj = \"下班状态不可以改派任务!\";\r\n\t\t\t\t\t\t\t\t\t\tmessage.what = ConstantValue.ERROE;\r\n\t\t\t\t\t\t\t\t\t\thandler.sendMessage(message);\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t// for update by haoyun\r\n\t\t\t\t\t\t\t\t\t// 20130401 end\r\n\t\t\t\t\t\t\t\t}", "public void onClick(View v) {\n mConnectedThread.write(\"1\"); // Send \"1\" via Bluetooth\n Toast.makeText(getBaseContext(), \"Turn on LED\", Toast.LENGTH_SHORT).show();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(isSpeaker) {\n\t\t\t\t\t//当前是扬声器模式,需切换为听筒模式\n\t\t\t\t\talert.dismiss();\n\t\t\t\t\taudioManager.setMode(AudioManager.MODE_IN_CALL);\n\t\t\t\t\tisSpeaker = false;\n\t\t\t\t\teditor.putInt(\"mode\", AudioManager.MODE_IN_CALL);\n\t\t\t\t\teditor.commit();\n\n\t\t\t\t}else {\n\t\t\t\t\talert.dismiss();\n\t\t\t\t\taudioManager.setMode(AudioManager.MODE_NORMAL);\n\t\t\t\t\tisSpeaker = true;\n\t\t\t\t\teditor.putInt(\"mode\", AudioManager.MODE_NORMAL);\n\t\t\t\t\teditor.commit();\n\n\t\t\t\t}\n\t\t\t\thandler.sendEmptyMessage(0x777);\n\n\t\t\t}", "@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\t\tcase R.id.btn_switch_dhcp:\n\t\t\t\tif (devIpInfo != null) {\n\t\t\t\t\tshowProgressDialog(\"\");\n\t\t\t\t\tisSwitch = true;\n\t\t\t\t\ttempdevIpInfo = devIpInfo;\n\t\t\t\t\tdevIpInfo.Net_DHCP = devIpInfo.Net_DHCP == 1 ? 0 : 1;\n\t\t\t\t\t// new SetIpConfigThread(appMain.getPlayerclient(),\n\t\t\t\t\t// Constants.UMID, Constants.user, Constants.password,\n\t\t\t\t\t// devIpInfo, handler).start();\n\t\t\t\t\tsendData(0);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase R.id.back_btn:\n\t\t\t\t// startActivity(new Intent(this, AcRegister.class));\n\t\t\t\tfinish();\n\t\t\t\tbreak;\n\t\t\tcase R.id.menu_btn1:\n\t\t\t\tif (devIpInfo != null) {\n\t\t\t\t\tshowProgressDialog(\"\");\n\t\t\t\t\ttempdevIpInfo = devIpInfo;\n\t\t\t\t\tdevIpInfo.Net_IPAddr = etIp.getText().toString().trim();\n\t\t\t\t\tdevIpInfo.Net_Gateway = etGateway.getText().toString().trim();\n\t\t\t\t\tdevIpInfo.Net_Netmask = etNetMask.getText().toString().trim();\n\n\t\t\t\t\tsendData(0);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase R.id.btn_async_cancel:\n\t\t\t\tif (asyncDialog != null)\n\t\t\t\t\tasyncDialog.dismiss();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t}", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.button_scan: {\n Intent serverIntent = new Intent(Main_Activity.this, DeviceListActivity.class);\n startActivityForResult(serverIntent, REQUEST_CONNECT_DEVICE);\n break;\n }\n case R.id.btn_close: {\n mService.stop();\n editText.setEnabled(false);\n imageViewPicture.setEnabled(false);\n width_58mm.setEnabled(false);\n width_80.setEnabled(false);\n hexBox.setEnabled(false);\n sendButton.setEnabled(false);\n\n testButton.setEnabled(false);\n printbmpButton.setEnabled(false);\n btnClose.setEnabled(false);\n btn_BMP.setEnabled(false);\n btn_ChoseCommand.setEnabled(false);\n btn_prtcodeButton.setEnabled(false);\n btn_prtsma.setEnabled(false);\n btn_prttableButton.setEnabled(false);\n btn_camer.setEnabled(false);\n btn_scqrcode.setEnabled(false);\n btnScanButton.setEnabled(true);\n Simplified.setEnabled(false);\n Korean.setEnabled(false);\n big5.setEnabled(false);\n thai.setEnabled(false);\n btnScanButton.setText(getText(R.string.connect));\n break;\n }\n case R.id.btn_test: {\n BluetoothPrintTest();\n ;\n break;\n }\n case R.id.Send_Button: {\n if (menuIdTextView.getText().equals(\"\") || menuIdTextView.getText() == null || menuIdTextView.getText().equals(\"0\")) {\n Toast.makeText(getBaseContext(), \"لاتوجد قائمة\", Toast.LENGTH_LONG).show();\n return;\n }\n\n if (btnScanButton.getText().equals(\"تم الاتصال\")) {\n\n } else {\n Toast.makeText(getBaseContext(), \"يرجى الاتصال بالطابعة\", Toast.LENGTH_LONG).show();\n return;\n }\n// printmenu\n sendToDB();\n String msg = msgPrintFormat();\n if (msg.length() > 0) {\n try {\n SharedPreferences sharedPreferences =\n PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n String hello = sharedPreferences.getString(\"hello\", \"\");\n SendDataByte(PrinterCommand.POS_Print_Text(\" \", ARBIC, 22, 0, 0, 0));\n SendDataByte(Command.ESC_Align);\n byte[] code = PrinterCommand.getCodeBarCommand(sellMenuId, 73, 3, 140, 1, 2);\n Command.ESC_Align[2] = 0x01;\n SendDataByte(Command.ESC_Align);\n SendDataByte(code);\n\n SendDataByte(PrinterCommand.POS_Print_Text(hello + \"\\n\", ARBIC, 22, 0, 0, 0));\n\n SendDataByte(Command.ESC_Align);\n SendDataByte(PrinterCommand.POS_Print_Text(msg, ARBIC, 22, 0, 0, 0));\n SendDataByte(Command.ESC_Align);\n\n SendDataByte(PrinterCommand.POS_Print_Text(\"\\n\\n\\n\\n\\n\", ARBIC, 22, 0, 0, 0));\n\n\n String copys = sharedPreferences.getString(\"copys\", \"1\");\n if (copys.equals(\"2\")) {\n SendDataByte(PrinterCommand.POS_Print_Text(\"----------\", ARBIC, 22, 2, 2, 0));\n\n SendDataByte(PrinterCommand.POS_Print_Text(\"\\n\\n\\n\\n\\n\", ARBIC, 22, 0, 0, 0));\n SendDataByte(Command.ESC_Align);\n\n byte[] code3 = PrinterCommand.getCodeBarCommand(sellMenuId, 73, 3, 140, 1, 2);\n Command.ESC_Align[2] = 0x01;\n SendDataByte(Command.ESC_Align);\n SendDataByte(code3);\n SendDataByte(PrinterCommand.POS_Print_Text(hello + \"\\n\", ARBIC, 22, 1, 1, 3));\n\n SendDataByte(Command.ESC_Align);\n SendDataByte(PrinterCommand.POS_Print_Text(msg, ARBIC, 22, 0, 0, 0));\n SendDataByte(Command.ESC_Align);\n SendDataByte(PrinterCommand.POS_Print_Text(\"\\n\\n\\n\\n\\n\", ARBIC, 22, 0, 0, 0));\n SendDataByte(Command.ESC_Align);\n }\n\n } catch (Exception ex) {\n\n }\n\n\n }\n clearItemData();\n break;\n }\n case R.id.save_Button: {\n if (menuIdTextView.getText().equals(\"\") || menuIdTextView.getText() == null || menuIdTextView.getText().equals(\"0\")) {\n Toast.makeText(getBaseContext(), \"لاتوجد قائمة\", Toast.LENGTH_LONG).show();\n return;\n }\n\n\n// printmenu\n try {\n sendToDB();\n\n clearItemData();\n } catch (Exception ex) {\n Toast.makeText(getBaseContext(), \"لم يتم الحفظ\" + ex.getMessage(), Toast.LENGTH_LONG).show();\n }\n\n break;\n }\n case R.id.width_58mm:\n case R.id.width_80mm: {\n is58mm = v == width_58mm;\n width_58mm.setChecked(is58mm);\n width_80.setChecked(!is58mm);\n break;\n }\n case R.id.btn_printpicture: {\n GraphicalPrint();\n break;\n }\n case R.id.imageViewPictureUSB: {\n Intent loadpicture = new Intent(\n Intent.ACTION_PICK,\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(loadpicture, REQUEST_CHOSE_BMP);\n break;\n }\n case R.id.btn_prtbmp: {\n Print_BMP();\n break;\n }\n case R.id.btn_prtcommand: {\n CommandTest();\n break;\n }\n case R.id.btn_prtsma: {\n SendDataByte(Command.ESC_Init);\n SendDataByte(Command.LF);\n Print_Ex();\n break;\n }\n case R.id.btn_prttable: {\n SendDataByte(Command.ESC_Init);\n SendDataByte(Command.LF);\n PrintTable();\n break;\n }\n case R.id.btn_prtbarcode: {\n printBarCode();\n break;\n }\n case R.id.btn_scqr: {\n createImage();\n break;\n }\n case R.id.btn_dyca: {\n dispatchTakePictureIntent(REQUEST_CAMER);\n break;\n }\n default:\n break;\n }\n }", "@Override\r\n public void onClick(View v)\r\n {\n DJIDrone.getDjiMainController().getAircraftSn(new DJIExecuteStringResultCallback(){\r\n\r\n @Override\r\n public void onResult(String result)\r\n {\r\n // TODO Auto-generated method stub\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"SN = \"+result));\r\n }\r\n \r\n });\r\n }", "protected void processButton1(Robot robot ){\n robot.getIntake().intakeSuckIn(1);\n\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsendSmsNew(phoneNum);\r\n\t\t\t\tsetTextSend();\r\n\t\t\t}", "@Override\n public void send() {\n System.out.println(\"send message by SMS\");\n }", "@Override\r\n\tpublic void call() {\n\t\tSystem.out.println(\"通过语音打电话\");\r\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String message = mCtx.getResources().getString(R.string.usb_audio_plug_in_message);\n toastPlugInNotification(message, AUDIO_OUT_NOTIFY);\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg=handler.obtainMessage();\r\n\t\t\t\tmsg.arg1=position;\r\n\t\t\t\tmsg.what=1;\r\n\t\t\t\tmsg.sendToTarget();\r\n\t\t\t}", "@Override\n public void run()\n {\n // Open call tab\n ////////////////////////////////////////////////////////////////////////////////\n List <String> keyPrepareList = new ArrayList<String>();\n keyPrepareList.add(\"[KEY_LGUI][KEY_C]\"); // Open contect\n keyPrepareList.add(\"[KEY_TAB]\"); // Move phone call tab\n keyPrepareList.add(\"[KEY_ENTER]\"); // Select Menu\n\n SendKeysInArray(keyPrepareList);\n\n if (mStopTest == true)\n {\n return ;\n }\n\n ////////////////////////////////////////////////////////////////////////////////\n // Send hidden menu command\n ////////////////////////////////////////////////////////////////////////////////\n List <String> keyInputList = new ArrayList<String>();\n keyInputList.add(\"*#*#4636#*#*\"); // Android common command for hidden menu\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"##7764726\"); // Motoloa command for hidden menu\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"*#*#1234#*#*\"); // HTC command for hidden menu\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"3845#*855#\"); // LG command for hidden menu\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"5689#*990#\"); // LG command for hidden menu\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"319712358\"); // Samsung command for hidden menu (2 Step)\n keyInputList.add(\"774632\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"319712358\"); // Samsung command for hidden menu (2 Step)\n keyInputList.add(\"0821\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"[KEY_ESC]\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"319712358\"); // Samsung command for hidden menu (2 Step)\n keyInputList.add(\"996412\");\n keyInputList.add(\"[KEY_ENTER]\");\n keyInputList.add(\"[KEY_ESC]\");\n\n SendKeysInArray(keyInputList);\n if (mStopTest == true)\n {\n return ;\n }\n\n ////////////////////////////////////////////////////////////////////////////////\n // Send email to me\n ////////////////////////////////////////////////////////////////////////////////\n List <String> keyEmailList = new ArrayList<String>();\n keyEmailList.add(\"[KEY_LGUI][KEY_E]\"); // Open email\n keyEmailList.add(\"[KEY_TAB]\"); // Move new email tab\n keyEmailList.add(\"[KEY_TAB]\"); // Move new email tab\n keyEmailList.add(\"[KEY_ENTER]\"); // Select Menu\n keyEmailList.add(\"[email protected]\"); // To\n keyEmailList.add(\"[KEY_ENTER]\");\n keyEmailList.add(\"[KEY_TAB]\");\n keyEmailList.add(\"Automatic test is ended\"); // Title\n keyEmailList.add(\"[KEY_ENTER]\");\n keyEmailList.add(\"This email is sent from PowerShock (a.k.a IRON-HID)\"); // Content\n keyEmailList.add(\"[KEY_TAB]\"); // Move to send button\n keyEmailList.add(\"[KEY_TAB]\");\n keyEmailList.add(\"[KEY_ENTER]\");\n keyEmailList.add(\"[KEY_TAB]\"); // Move to OK\n keyEmailList.add(\"[KEY_ENTER]\");\n\n SendKeysInArray(keyEmailList);\n\n AddMsgToKeyView(VIEW_ID_KEY, \"remote> auto test is ended\\n\");\n if (mStopTest == true)\n {\n return ;\n }\n }", "private void sendToBtAct(String msg) {\n Intent intent = new Intent(\"getTextToSend\");\n // You can also include some extra data.\n intent.putExtra(\"tts\", msg);\n LocalBroadcastManager.getInstance(this).sendBroadcast(intent);\n }", "public void onClick(DialogInterface dialog, int which) {\n mCallBack.onChangeText(utils.BUTTON_NEXT, true);\n utils.showToast(ctx, getResources().getString(R.string.txtManualPass));\n TestController testController = TestController.getInstance(getActivity());\n testController.onServiceResponse(true,\"TouchScreen\", ConstantTestIDs.MIC_ID);\n testController.onServiceResponse(true,\"Speaker\", ConstantTestIDs.SPEAKER_ID);\n mStartRecording = true;\n mImgViewMicPlay.setImageDrawable(getResources().getDrawable(R.drawable.ic_speaker_blue_svg_128));\n nextButtonHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n nextButtonHandler.removeCallbacksAndMessages(null);\n onNextPress();\n }\n }, 2000);\n }", "@Override\n public void onClick(View v) {\n try {\n message = etMessage.getText().toString();\n if(mService != null){\n if (ouserStat){\n //dout.writeUTF(wUser + \"SendTo@*@~\" + message);\n mService.writeMessage(wUser + \"SendTo@*@~\" + message);\n etMessage.setText(\"\");\n talk.insert(\"I said : \" + message, 0);\n //talk.add(\"I said : \" + message);\n }\n else{\n mService.writeMessage(wUser + \"OfMsg@*@~\" + message);\n etMessage.setText(\"\");\n talk.insert(\"I said : \" + message + \" \\n(\" + wUser + \" is offline for now.\\n He'll receive ur message when he comes online.)\\n\", 0);\n //dout.writeUTF(to + \"OfMsg@*@~\"+message);\n }\n }\n else{\n talk.insert(\"Connection Problem.. Wait\", 0);\n //talk.add(\"Connection Problem.. Wait\");\n }\n } catch (IOException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n System.out.println(\"Ezio Problem Found in writing in Chat Fragment\");\n updateStatus(false);\n }\n }", "public void message2Pressed() {\n // display\n TextLCD.print(MESSAGE2);\n // current sensor state?\n boolean sensorState = fSensorState[1];\n // activate/passivate sensor\n if(sensorState)\n Sensor.S2.passivate();\n else\n Sensor.S2.activate();\n // change sensor state\n fSensorState[1] = !sensorState;\n }", "public synchronized void send() {\n if (AudioUtil.getIs()) {\n LogUtil.d(Tag, \"VR stop\");\n this.mPCMPackageHead.m4053c(CommonParams.bB);\n this.mPCMPackageHead.m4047a(0);\n writeVR(this.mPCMPackageHead.m4048a(), this.mPCMPackageHead.m4049b());\n }\n }", "public void onClick(View view) {\n\t\t\tinitScreenStuff();\n\t\t\tif (viewDevice!=null) {\n\t\t\t\t// attempt to toggle!\n\t\t\t\tSharedPreferences sharedPrefs = getSharedPreferences(AlertMeConstants.PREFERENCE_NAME, AlertMeConstants.PREFERENCE_MODE);\n\t\t\t\tSensorListStarter listloader = new SensorListStarter(alertMe, handler, getIntent(), null, sharedPrefs);\n\t\t\t\tString relay = viewDevice.getAttribute(AlertMeConstants.STR_RELAYSTATE);\n\t\t\t\tif (relay!=null) {\n\t\t\t\t\tif (relay.equalsIgnoreCase(AlertMeConstants.STR_TRUE)) {\n\t\t\t\t\t\tlistloader.instruction = AlertMeConstants.INVOKE_SENSOR_CLAMP_OFF;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlistloader.instruction = AlertMeConstants.INVOKE_SENSOR_CLAMP_ON;\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tscreenStuff.setBusy(AlertMeConstants.UPDATE_SENSORS);\n\t\t\t\t\tlistloader.start();\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t// now dismiss\n\t\t\t//if (screenStuff!=null) {\n\t\t\t//\tscreenStuff.dismissActiveDialog(AMViewItems.DEVICE_DIALOG);\n\t\t\t//}\n\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tCommandResult commandResult = ShellUtil.execCommand(cmds, true, true);\n\t\t\t\ttv_result.setText(\"adb connect \" + getIp() + \":5555\");\n\t\t\t\t// System.out.println(commandResult.responseMsg);\n\t\t\t}", "@Override\n\tpublic void onClick(View view) {\n\t\tswitch (view.getId()) {\n\t\t\tcase R.id.titlebar_leftbutton : // WiFi模式 退出时,需要close掉 TCP连接\n\t\t\t\tdisconnectSocket();\n\t\t\t\tfinish();\n\t\t\t\tbreak;\n\t\t\tcase R.id.titlebar_rightbutton :\n\t\t\t\tButton btn_TitleRight = (Button) findViewById(R.id.titlebar_rightbutton);\n\t\t\t\t// Internet模式:“详情”界面\n\t\t\t\tif (btn_TitleRight.getText().equals(\n\t\t\t\t\t\tgetString(R.string.smartplug_title_plug_detail))) {\n\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\tintent.putExtra(\"PLUGID\", mPlugId);\n\t\t\t\t\tintent.setClass(DetailSmartSteelyardActivity.this,\n\t\t\t\t\t\t\tPlugDetailInfoActivity.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t} else {\n\t\t\t\t\t// WiFi直连:“重选”界面\n\t\t\t\t\t// PubDefine.disconnect();\n\t\t\t\t\tdisconnectSocket();\n\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\tintent.setClass(DetailSmartSteelyardActivity.this,\n\t\t\t\t\t\t\tAddSocketActivity2.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\tif (PubDefine.SmartPlug_Connect_Mode.WiFi != PubDefine.g_Connect_Mode) {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase R.id.btn_query :\n\t\t\t\tQuery_Gravity();\n\t\t\t\tbreak;\n\t\t\tcase R.id.btn_qupi :\n\t\t\t\tQupi_Gravity();\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tbreak;\n\t\t}\n\t}" ]
[ "0.6943773", "0.6825715", "0.66902494", "0.6648034", "0.6634807", "0.6593491", "0.6494322", "0.6473795", "0.6440873", "0.64264655", "0.6419059", "0.6418413", "0.64043415", "0.6402707", "0.63968813", "0.6374023", "0.6332552", "0.63265634", "0.63219357", "0.6310988", "0.6296247", "0.6295992", "0.6289294", "0.6281299", "0.6261412", "0.62611765", "0.6257502", "0.6249037", "0.62469715", "0.6227966", "0.62024367", "0.6193282", "0.61833495", "0.6165999", "0.61578196", "0.614993", "0.61403024", "0.61186635", "0.6116461", "0.6102005", "0.6100068", "0.6098237", "0.6090626", "0.60867083", "0.60857093", "0.60853034", "0.60766745", "0.60631204", "0.6062497", "0.6057707", "0.6050767", "0.6048038", "0.6045669", "0.60412973", "0.60360295", "0.60334134", "0.60224724", "0.60157275", "0.6006703", "0.6006498", "0.59951824", "0.59803563", "0.5965548", "0.59518063", "0.5947856", "0.59389734", "0.59375453", "0.59372985", "0.5917707", "0.59094363", "0.5905898", "0.59036165", "0.5895799", "0.5892932", "0.58810365", "0.58806664", "0.58744395", "0.5868573", "0.58608", "0.5858146", "0.5857104", "0.5855514", "0.5845453", "0.5844581", "0.5841586", "0.5833975", "0.5823013", "0.5817845", "0.5815409", "0.5812398", "0.5811296", "0.5807323", "0.58018076", "0.57971895", "0.5793546", "0.5793073", "0.579106", "0.5783824", "0.5781371", "0.5777638" ]
0.6433206
9
essentially the same method as the one above, but this can be called without pushing a button
public void sendUdpMessageToDrone() { DatagramPacket packet = null; try { packet = new DatagramPacket(message.getBytes(), message.length(), InetAddress.getByName("127.0.0.1"), 6000); sender.send(packet); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void popButton() {\n \tifNotEntered();\n \tstackEmptyButton();\n \tif (!stack.empty()) {\n \t\tcurrent = stack.peek();\n \t}\n \tshow(current);\n }", "void onUpOrBackClick();", "protected void stackEmptyButton() {\n \tif (stack.empty()) {\n \t\tenter();\n \t}\n \telse {\n \t\tstack.pop();\n \t\tif (stack.empty()) {\n \t\t\tenter();\n \t}\n \t}\n }", "@Override\n protected void negativeClick() {\n\n }", "@Override\n\tprotected void OnClick() {\n\t\t\n\t}", "@Override\n\tprotected void on_button_pressed(String button_name) {\n\n\t}", "@Override\n\t\tpublic void onClick(Widget sender) {\n\t\t\t\n\t\t}", "void mainButtonPressed();", "@Override\n public void onClick(View v) {\n set();\n }", "private void setUpThisPageForReturn() {\n ImageButton returnButton = findViewById(R.id.return_icon);\n returnButton.setVisibility(View.INVISIBLE);\n }", "public void activateButton() {\n\t\tif (isBrowser) this.bringToBack();\r\n\t\tMainActivity.resetXY();\r\n\t}", "@Override\n\tpublic void LeftButtonClick() {\n\t\t\n\t}", "public void buttonClicked();", "@SuppressWarnings(\"EmptyMethod\")\n\t@Override\n public boolean performClick() {\n return super.performClick();\n }", "@Override\r\n\tpublic String press() {\n\t\treturn null;\r\n\t}", "@Override\n public void onClick(View theView) {\n setUp();\n\n\n }", "@Override\n\tprotected void buildButton() {\n\t\t\n\t}", "@Override\n public boolean performClick() {\n return super.performClick();\n }", "@Override\n public void onClick() {\n }", "public void ActionSmitteOversigt(ActionEvent actionEvent) { Main.setGridPane(0); }", "private void innerFunction(Button btn, Class cls){\n\t\tsolo.clickOnView(btn);\n\t\tsolo.sleep(500);\n\t\tsolo.assertCurrentActivity(\"ERR - Could not jump to children list.\", cls);\n\t\tsolo.hideSoftKeyboard();\n\t\tsolo.goBack();\n\t\tsolo.goBack();\n\t\tsolo.assertCurrentActivity(\"ERR - Could not jump back from children list.\", researcher.class);\n\t}", "@Override\n protected void actionPerformed(GuiButton button)\n {\n super.actionPerformed(button);\n }", "private void backButton() {\n navigate.goPrev(this.getClass(), stage);\n }", "void JButtonPush_actionPerformed(java.awt.event.ActionEvent event) {\n\t\tpushstring = \"\";\n\t\tPushDialog dialog = new PushDialog(this); // ask the user what to push\n\t\tdialog.setVisible(true);\n\n\t\tif (!pushstring.equals(\"\")) { // after the dialog is closed,\n\t\t\tpushCommand = new PushCommand(stack, pushstring);\n\t\t\tinvoker.executeCommand(pushCommand);\n\t\t}else {\n\t\t\tJOptionPane.showMessageDialog(null, \"Please enter the data\");\n\t\t\tdialog.setVisible(true);\n\t\t}\n\t\tJList1.setListData(stack.getStackVector()); // refresh the JList\n\t\tthis.repaint();\n\n\t}", "public void ipcallButtonPressed() {\n\t\tdialButtonPressed(true) ;\n\t}", "void buttonGo_actionPerformed(ActionEvent e) {\n\n\n }", "@Override\n public void onEditHat() {\n\n moveToFragment(0);\n }", "@Override\r\n\tprotected ActionListener insertBtnAction() {\n\t\treturn null;\r\n\t}", "protected void execute() { \t\n// \tboolean toggle=true;\n// \tboolean grab = false;\n// \tif(toggle&&button.get()) {//execute once per button push\n// \t\ttoggle=false;//prevents code from being called again until button is released and pressed again\n// \t\tif(grab){\n// \t\t\tgrab=false;\n// \t\t\tclaw.open();\n// \t\t}else {\n// \t\t\tgrab=true;\n// \t\t\tclaw.close();\n// \t\t}\n// \t}else if(!button.get()) {\n// \t\ttoggle=true;//button has been released\n// \t}\n \tclaw.open();\n }", "public void goBack() {\n goBackBtn();\n }", "@Override\n\tpublic void onClick() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\treturn;\n\t\t\t}", "@Override\n public void onBoomButtonClick(int index) {\n }", "@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tIntent intent = new Intent();\n\t\t\tintent.setClass(MainPage.this, AddPage.class);\n\t\t\tstartActivityForResult(intent,0);\n\t\t\toverridePendingTransition(R.anim.push_up_in, R.anim.push_up_out);\n\t\t}", "@Override\n public void onClick(View v) {\n buttonAddClicked();\n }", "private StepInButton() {\r\n\t\t\tsetToolTipText(\"Step into the current method\");\r\n\t\t\ttry {\r\n\t\t\t\tsetIcon(new ImageIcon(ImageIO.read(ClassLoader.getSystemResource(\"images/stepIn.png\")).getScaledInstance(FlowClient.BUTTON_ICON_SIZE, FlowClient.BUTTON_ICON_SIZE, Image.SCALE_SMOOTH)));\r\n\t\t\t} catch (IOException e1) {\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t\tsetBorder(FlowClient.EMPTY_BORDER);\r\n\t\t\taddActionListener(new ActionListener() {\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * We'll see how this'll work with a debugger later\r\n\t\t\t\t */\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\t// TODO step in using debugger\r\n\t\t\t\t\tSystem.out.println(\"Step in button pressed\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}", "public void pushState();", "@Override\r\n\tpublic void backButton() {\n\t\t\r\n\t}", "public abstract void buttonPressed();", "public void onButtonBPressed();", "@Override\n public void onClick(View v)\n {\n \n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t}", "protected abstract void pressedOKButton( );", "@Override\r\n\t\t\t\tpublic void onClick() {\n\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onClick() {\n\r\n\t\t\t\t}", "@Override\r\n\tprotected ActionListener updateBtnAction() {\n\t\treturn null;\r\n\t}", "void onTopQDMPasteClicked();", "@FXML\n\tprivate void MainEnterBt() throws IOException {\n\n\t\tmain.showSelectionPage(); // #1\n\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "public void onButtonAPressed();", "public void trigger() {\n button.release(true);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public void clickedPresentationNew() {\n\t\t\n\t}", "@Override\n public void onClick(View v) {\n }", "@Override\n public void actionPerformed(ActionEvent e)\n {\n \n }", "@Override\n public void onClick(View v) {\n\n }", "private void clickOn() {\n\t\tll_returnbtn.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t}", "public void sButton() {\n\n\n\n }", "@Override\n public void onClick() {\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void backButton() {\n\n\t}", "private StepOverButton() {\r\n\t\t\tsetToolTipText(\"Step over the highlighted method\");\r\n\t\t\ttry {\r\n\t\t\t\tsetIcon(new ImageIcon(ImageIO.read(ClassLoader.getSystemResource(\"images/stepOver.png\")).getScaledInstance(FlowClient.BUTTON_ICON_SIZE, FlowClient.BUTTON_ICON_SIZE, Image.SCALE_SMOOTH)));\r\n\t\t\t} catch (IOException e1) {\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t\tsetBorder(FlowClient.EMPTY_BORDER);\r\n\t\t\taddActionListener(new ActionListener() {\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * We'll see how this'll work with a debugger later\r\n\t\t\t\t */\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\t// TODO step over using debugger\r\n\t\t\t\t\tSystem.out.println(\"Step over button pressed\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}", "@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "private void packupbtn() {\n\t\tif (symbel_int == -1) {\r\n\t\t\tLog.d(\"play_menu\", \"play_menu\");\r\n\t\t\ttran_sur.setVisibility(View.VISIBLE);\r\n\t\t\tplay_menu_arrow1.setImageResource(R.drawable.arrow_up);\r\n\t\t\tsymbel_int = symbel_int * -1;\r\n\t\t\tslowdown();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tupdateHistoryButtonText(\"\"); \n\t}", "protected boolean hasPositiveButton() {\n return false;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tCursurIndex = 5;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t\tClickOK();\n\t\t\t}", "void onBottomQDMPasteClicked();", "@Override\n public void onClick(View view) {\n resetEverything();\n }", "@Override\r\n\t\t\t\tpublic void onClick(View v)\r\n\t\t\t\t{\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onClick(View v)\r\n\t\t\t\t{\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void onClick(View arg0) {\n\t\t\n\t}", "@Override\n\tpublic void onClick(View arg0) {\n\t\t\n\t}", "@Override\n\tpublic void onClick(View arg0) {\n\t\t\n\t}", "@Override\n public boolean performClick() {\n throwEvents = true;\n return super.performClick();\n }", "@Override\n public void onClick(View v) {\n }" ]
[ "0.6509551", "0.62420887", "0.6210809", "0.6181715", "0.61303896", "0.6104856", "0.6090661", "0.60723495", "0.60700107", "0.6052514", "0.60446215", "0.60279214", "0.60275775", "0.60272545", "0.60248077", "0.60105866", "0.6003431", "0.60030425", "0.5974488", "0.5966741", "0.5953402", "0.5949935", "0.59339005", "0.59308445", "0.59252936", "0.5919179", "0.59142953", "0.59142375", "0.5914172", "0.5901223", "0.5889882", "0.58792084", "0.5857687", "0.58408886", "0.583809", "0.5827089", "0.5825717", "0.5819869", "0.5800026", "0.57952124", "0.57934886", "0.5793103", "0.5793103", "0.5793103", "0.578713", "0.57854545", "0.5785068", "0.5785068", "0.578222", "0.5772386", "0.57707584", "0.5769266", "0.5761728", "0.57581556", "0.57576734", "0.57562196", "0.5748595", "0.5743301", "0.5739554", "0.5737409", "0.57326174", "0.57318974", "0.57249767", "0.5722892", "0.57204145", "0.5716325", "0.571449", "0.57044786", "0.5704421", "0.5702869", "0.56948316", "0.5690645", "0.56880677", "0.56843185", "0.56843185", "0.5682508", "0.5682508", "0.5682508", "0.5682508", "0.5682508", "0.5682508", "0.5682508", "0.5682508", "0.5682508", "0.5682508", "0.5682508", "0.5682508", "0.5682508", "0.5682508", "0.5682508", "0.5682508", "0.5682508", "0.5682508", "0.5682508", "0.5682508", "0.5682508", "0.56822973", "0.56822973", "0.56822973", "0.5676203", "0.56714" ]
0.0
-1
sends a UDP message to the controller
public void sendUdpMessageToESP() { DatagramPacket packet = null; try { packet = new DatagramPacket(message.getBytes(), message.length(), InetAddress.getByName(ESP_IPaddress), 6900); sender.send(packet); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendUdpMessageToDrone() {\n\n DatagramPacket packet = null;\n try {\n packet = new DatagramPacket(message.getBytes(), message.length(), InetAddress.getByName(\"127.0.0.1\"), 6000);\n sender.send(packet);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void sendUdpMessageToDrone(ActionEvent actionEvent) {\n\n String message = testmessagebox.getText();\n DatagramPacket packet = null;\n try {\n packet = new DatagramPacket(message.getBytes(), message.length(), InetAddress.getByName(\"127.0.0.1\"), 6000);\n sender.send(packet);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "protected void sendUDP(String udpMessage, InetAddress address) {\n\t\tthis.udpClient.sendUDP(udpMessage,address);\n\t}", "public void sendDatagramPacket(String message){\r\n\t\ttry {\r\n\t\t\tInetAddress serverHost = InetAddress.getByName(this.serverIP);\t\r\n\t\t\tbyte[] byteMsg = message.getBytes();\r\n\t\t\tDatagramPacket request = new DatagramPacket(byteMsg, byteMsg.length, serverHost, this.serverPort);\r\n\t\t\tudpSocket.send(request);\r\n\t\t} catch (SocketException e) {\r\n\t\t\tSystem.err.println(\"# UDPClient Socket error: \" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(\"# UDPClient IO error: \" + e.getMessage());\r\n\t\t}\r\n\t}", "public void writeUdpMessage(String message) {\n\t\tm_udpSession.write(message);\n\t}", "public void send(String msg){\r\n\t\ttry{\r\n\t\t\tbyte[] buf = msg.getBytes();\r\n \tInetAddress address = InetAddress.getByName(server);\r\n \tDatagramPacket packet = new DatagramPacket(buf, buf.length, address, PORT);\r\n \tsocket.send(packet);\r\n }catch(Exception e){}\r\n\t\t\r\n\t}", "public void run(){\n\t\t\t\tDatagramPacket packet = new DatagramPacket(data,data.length, ip, port);\n\t\t\t\ttry {\n\t\t\t\t\tsocket.send(packet);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "public void run() {\n\t\t\t\tDatagramPacket packet = new DatagramPacket(data,data.length,ip,port);\n\t\t\t\ttry {\n\t\t\t\t\tsocket.send(packet);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "public void sendPacket(String message) {\n try {\r\n Thread.sleep(1000);\r\n } catch (InterruptedException ie) {\r\n }\r\n\r\n if (ipAddress == null) {\r\n MessageEvent e = new MessageEvent(MessageType.SendWarning);\r\n e.description = \"cannot send message to unreported device\";\r\n e.HWid = HWid;\r\n RGPIO.message(e);\r\n } else if (status == PDeviceStatus.ACTIVE) {\r\n UDPSender.send(message, ipAddress, this, RGPIO.devicePort);\r\n }\r\n }", "private void send (String messageToSend) throws IOException {\n byte[] ba = messageToSend.getBytes();\n \n packetToSend = new DatagramPacket (ba, ba.length, serverIPAddress, PORT);\n \n //Envia el paquete por el socket.\n clientSocket.send(packetToSend);\n }", "public void sendMessage(String message) {\n final String msg = message;\n new Thread() {\n @Override\n public void run() {\n DatagramPacket packet = new DatagramPacket(msg.getBytes(), msg.length(), host, port);\n try {\n datagramSocket.send(packet);\n Log.d(DEBUG_TAG, \"sent packet\");\n Log.d(DEBUG_TAG, \"host: \" + host);\n Log.d(DEBUG_TAG, \"port: \" + port);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }.start();\n }", "public void send(String msg) throws IOException {\n\t\tbyte[] data = msg.getBytes() ;\n DatagramPacket packet = new DatagramPacket(data, data.length, host, port);\n s.send(packet);\n\t}", "public void sendMsgToClient() {\n\n try {\n\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())), true);\n\n Log.d(TAG, \"The transmitted data:\" + msg);\n\n writer.println(msg);\n\n } catch (Exception e) {\n\n e.printStackTrace();\n\n }\n\n }", "public void sendDiscovery() {\n\t\tCharset charSet = Charset.forName(\"US-ASCII\");\n\t\t\n\t\tbyte[] b = BROADCAST.getBytes(charSet);\n\t\tDatagramPacket dgram = null;\n\t\t\n\t\ttry {\n\t\t\tdgram = new DatagramPacket(b, b.length, InetAddress.getByName(MCAST_ADDR), DEST_PORT);\n\t\t} catch (UnknownHostException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tsocket.send(dgram);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void sendUdpPacket(String text, InetAddress address, int port, DatagramSocket socket) throws IOException {\n var buf = text.getBytes();\n\n // Step 2 : Create the datagramPacket for sending the data\n var DpSend = new DatagramPacket(buf, buf.length, address, port);\n\n // Step 3 : invoke the send call to actually send the data\n socket.send(DpSend);\n }", "public void send(Address from, String message);", "public void send(String message, InetAddress targetAddress, int targetPort ) throws Exception {\r\n if (datagramSocket==null) return;\r\n\r\n if (message==null)\r\n throw new Exception(\"Cannot send an empty message\");\r\n\r\n if (targetAddress ==null)\r\n throw new Exception(\"Invalid target address\");\r\n\r\n if (targetPort <= 0)\r\n throw new Exception(\"Invalid target port\");\r\n\r\n byte[] sendData = message.getBytes(UTF_16BE);\r\n DatagramPacket packet = new DatagramPacket(sendData, sendData.length, targetAddress, targetPort);\r\n datagramSocket.send(packet);\r\n }", "@Override\n\tpublic void run() \n\t{\n\t\tSystem.err.println(\"UDP broadcaster started\");\n\n\t\tInetAddress host = null;\t\t\n\t\tSettingsLoader settingsLoader = Simulator.getDrivingTask().getSettingsLoader();\n\t\t\n\t\tint port = settingsLoader.getSetting(Setting.UDPInterface_port, SimulationDefaults.UDPInterface_port);\n\t\tint broadcastsPerSecond = settingsLoader.getSetting(Setting.UDPInterface_updateRate, SimulationDefaults.UDPInterface_updateRate);\n\t\t\n\t\ttry {\n\t\t\tString hostname = settingsLoader.getSetting(Setting.UDPInterface_host, SimulationDefaults.UDPInterface_host);\n\t\t\thost = InetAddress.getByName(hostname);\n\t\t\tsocket = new DatagramSocket();\n\t\t\tsocket.setSoTimeout(10);\n\t\t\t\n\t\t\tSystem.out.println(\"UDP broadcasting to \" + host + \":\" + port);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.err.println(\"UDP connection failed at \" + host + \":\" + port);\n\t\t\terrorOccurred = true;\n\t\t}\n\t\t\n\t\t\n\t\twhile(!stoprequested && !errorOccurred)\n\t\t{\n\t\t\ttry {\n\t\t\t ByteBuffer buffer = ByteBuffer.allocate(1 + Long.BYTES);\n\t \t\t buffer.put((byte) 0x01);\n\t\t\t buffer.putLong(System.currentTimeMillis());\n\t\t\t \n\t\t\t byte[] data = buffer.array();\n\t\t\t \n\t\t\t DatagramPacket timestampPacket = new DatagramPacket(data, data.length, host, port);\n\t\t\t socket.send(timestampPacket);\n\t\t\t \t\n\t\t\t \tThread.sleep(1000 / broadcastsPerSecond);\n\t\t\t} catch (InterruptedException exc) {\n\t\t\t\t// NOP\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(\"UDP error: \" + e.toString());\n\t\t\t\terrorOccurred = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// close TCP connection to CAN-Interface if connected at all\n\t\ttry {\n\t\t\tif (socket != null)\n\t\t\t{\n\t\t\t\ttry {Thread.sleep(100);} \n\t\t\t\tcatch (InterruptedException e){}\n\n\t\t\t\tsocket.close();\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Connection to UDP-Interface closed\");\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tSystem.err.println(\"Could not close connection to UDP-Interface\");\n\t\t}\n\t}", "public void run (){ //el metodo run pertenece a extend Thread\n //Recibimos los mensajes por el puerto 5000\n try {\n socket = new DatagramSocket(7000);\n while (true){ //que siempre lo haga\n byte[] buffer = new byte[100];\n //empaquetamos el datagrama\n DatagramPacket packet = new DatagramPacket( buffer, buffer.length);\n socket.receive(packet);\n String mensajeEntrante = new String(packet.getData()).trim(); //trim parte el packet.get data\n \n // Reenvio de mensaje version Cristian:\n // Obtener el ip automaticamente\n //dividimos el string por : y obtenemos e[0] la ip y [1] el puerto\n SocketAddress iport= packet.getSocketAddress();\n String i = iport.toString();\n String red = i.replace(\"/\", \"\");\n String[] portip = red.split(\":\");\n String ip = portip[0];\n String port = portip[1];\n System.out.println(mensajeEntrante);\n observer.recibirMensaje(mensajeEntrante, ip, port);\n \n }\n } catch (SocketException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n}", "private static void unicast_send(int id, String msg) throws IOException {\n\n \tSocket socket = new Socket(IPs.get(id), Ports.get(id));\n\n try(PrintWriter out = new PrintWriter(socket.getOutputStream(), true)){\n \tout.println(serverId + \" \" + msg);\n \tSystem.out.println(\"Sent \"+ msg +\" to process \"+ id +\", system time is ­­­­­­­­­­­­­\"+ new Timestamp(System.currentTimeMillis()).toString());\n }\n socket.close();\n }", "public void startUDP() {\n try {\n DatagramSocket socket = new DatagramSocket(port);\n byte[] buf = new byte[256];\n while (running) {\n DatagramPacket packet = new DatagramPacket((sbyte[])(object) buf, buf.length);\n socket.receive(packet);\n upd_count++;\n packet = new DatagramPacket(buf, buf.length, packet.getAddress(), packet.getPort());\n String received = new String(packet.getData(), 0, packet.getLength());\n process(received.substring(0, received.indexOf('\\0')));\n buf = new byte[256];\n }\n socket.close();\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }", "private void sendRequest( String msg ){ \r\n\r\n\t\tRequest message = new Request(); // construction of Request object\r\n\t\tmessage.c = c_id;\r\n\t\tmessage.s = seq_number;\r\n\t\tmessage.op = msg;\r\n\t\t\r\n\t\tString str_msg = message.toString(); //generate string message\r\n\t\tdisplayArea.append( \"\\nCLI\"+c_id+\" Sending packet containing: \" + str_msg + \"\\n\" );\r\n\t\t\t\t\r\n\t\tbyte data[] = str_msg.getBytes(); // convert to bytes\r\n\t\t \r\n\t\ttry{\t\t\t\t\t\t\t\t\t\r\n\t\t\tDatagramPacket sendPacket = new DatagramPacket( data, data.length, InetAddress.getLocalHost(), serverPort );\r\n\t\t\tsocket.send( sendPacket ); // send packet\r\n\t\t\tdisplayArea.append( \"Packet sent\\n\" );\r\n\t\t\tdisplayArea.setCaretPosition(\r\n\t\t\tdisplayArea.getText().length() );\r\n\t\t\tseq_number++; //increment seq_number\r\n\t\t}\r\n\t\tcatch ( IOException ioException )\r\n\t\t{\r\n\t\t\tdisplayMessage( ioException.toString() + \"\\n\" );\r\n\t\t\tioException.printStackTrace();\r\n\t\t} // end catch\r\n\t\t\r\n\t}", "@Override\n public void send(byte[] data) throws SocketException {\n DatagramPacket sendPacket = new DatagramPacket(\n data,\n data.length,\n this.lastClientIPAddress,\n this.lastClientPort);\n try {\n serverSocket.send(sendPacket);\n } catch (IOException ex) {\n Logger.getLogger(UDPServer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "void sendMulticast(String message);", "private static void sendDataMessage() {\r\n\t\tSystem.out.println(\"CLIENT: \" + \" \" + \"DataMessage sent.\");\r\n\t\t\r\n\t\tbyte[] blockNumberAsByteArray = helper.intToByteArray(blockNumberSending);\r\n\t\tsplitUserInput = helper.divideArray(userInputByteArray);\r\n\r\n\t\tsendData = message.dataMessage(blockNumberAsByteArray, splitUserInput[sendingPackageNumber]);\r\n\t\tsendingPackageNumber++;\r\n\t\tblockNumberSending++; // blocknumber that is given to the next message to be transmitted\r\n\r\n\t\t// trims the message (removes empty bytes), so the last message can be detected\r\n\t\ttrimmedSendData = helper.trim(sendData);\r\n\r\n\t\tsendDataMessage = new DatagramPacket(trimmedSendData, trimmedSendData.length, ipAddress, SERVER_PORT);\r\n\t\ttry {\r\n\t\t\tclientSocket.send(sendDataMessage);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tackNeeded = true;\r\n\r\n\t\tif (trimmedSendData.length < 516) {\r\n\t\t\tlastPackage = true;\r\n\t\t}\r\n\t}", "@Override\n public void run() {\n MulticastSocket multiSocket = null;\n try {\n MLog.i(TAG, \"[udpBroadCast] before send udp\");\n mProgress.onProgress(LanTransportHelper.TOKEN_PROGRESS, R.string.before_send_udp, null);\n\n// udpSocket = new DatagramSocket(Constant.UDP_SEND_PORT);\n multiSocket = new MulticastSocket();\n\n InetAddress address = InetAddress.getByName(Constant.UDP_MULTI_BROADCAST_ADDRESS);\n DatagramPacket dp = new DatagramPacket(data, data.length, address, Constant.UDP_MULTI_BROADCAST_PORT);\n multiSocket.send(dp);\n\n\n MLog.i(TAG, \"[udpBroadCast] after send udp\");\n mProgress.onProgress(LanTransportHelper.TOKEN_PROGRESS, R.string.after_send_udp, null);\n } catch (Exception e) {\n MLog.i(TAG, e.toString());\n mProgress.onProgress(LanTransportHelper.TOKEN_PROGRESS, R.string.exception, e.toString());\n } finally {\n if (multiSocket != null) {\n multiSocket.close();\n }\n MLog.i(TAG, \"[udpBroadCast] finally\");\n mProgress.onProgress(LanTransportHelper.TOKEN_UPD_SENDER_CLOSE, R.string.close_send_udp, null);\n }\n\n }", "void Send (int boardID, short addr, ByteBuffer databuf, long datacnt, int eotMode);", "void sendMessage(Message m) throws IOException {\n String msg = m.toString();\n\n buffer = msg.getBytes(\"Windows-1256\");\n toServer = new DatagramPacket(buffer, buffer.length,\n InetAddress.getByName(sendGroup), port);\n if (m.getType() == Message.DATA) {\n manager.mManager.addMessage(m);\n }\n\n System.out.println(getName() + \"-->\" + m);\n serverSocket.send(toServer);\n }", "public int sendPacket(DatagramPacket p){\r\n\t\t\r\n\t\tpacket = p;\r\n\t\ttry{\r\n\t\t\tsock.send(packet);\r\n\t\t}\r\n\t\tcatch(Exception ex){\r\n\t\t\tLogger.write(\"Errore invio pacchetto: \"+ex.getMessage());\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 0;\r\n\t\t\r\n\t}", "private void sendBroadcast(String messageStr) {\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n StrictMode.setThreadPolicy(policy);\n byte[] sendData = messageStr.getBytes();\n try {\n DatagramSocket sendSocket = new DatagramSocket(null);\n sendSocket.setReuseAddress(true);\n sendSocket.bind(new InetSocketAddress(9876));\n sendSocket.setBroadcast(true);\n\n //Broadcast to all IP addresses on subnet\n try {\n DatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length, InetAddress.getByName(\"255.255.255.255\"), 9876);\n sendSocket.send(sendPacket);\n Log.i(getClass().getName(), \"Request packet sent to: 255.255.255.255 (DEFAULT)\");\n } catch (Exception e) {\n Log.e(\"sendBroadcast\", \"IOException: \" + e.getMessage());\n }\n } catch (IOException e) {\n Log.e(\"sendBroadcast\", \"IOException: \" + e.getMessage());\n }\n }", "public void send(Message msg);", "static public void startSending(String add,int port,byte[] data,int mode){\n }", "public final void send(MidiMessage msg) {\n device.send(msg);\n }", "private void UDPBroadcastTest() {\n\t\tWifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);\n\n\t\tif (wifi != null) {\n\t\t\tWifiManager.MulticastLock lock = wifi\n\t\t\t\t\t.createMulticastLock(\"Log_Tag\");\n\t\t\tlock.acquire();\n\n\t\t}\n\t\tint DISCOVERY_PORT = 1989;\n\t\tint TIMEOUT_MS = 5000;\n\n\t\ttry {\n\n\t\t\tDatagramSocket socket = new DatagramSocket(DISCOVERY_PORT);\n\t\t\tsocket.setBroadcast(true);\n\t\t\tsocket.setSoTimeout(TIMEOUT_MS);\n\t\t\tbyte[] buf = new byte[1024];\n\t\t\twhile (true) {\n\t\t\t\tDatagramPacket packet = new DatagramPacket(buf, buf.length,\n\t\t\t\t\t\tInetAddress.getByName(\"192.168.1.255\"), DISCOVERY_PORT);\n\t\t\t\tsocket.receive(packet);\n\t\t\t\tLog.e(\"nbc\", packet.getAddress().getHostAddress());\n\t\t\t\tString s = new String(packet.getData(), 0, packet.getLength());\n\t\t\t\tLog.e(\"nbc\", \"Received response \" + s);\n\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\tLog.e(\"nbc\", \"Could not send discovery request\", e);\n\t\t}\n\n\t}", "public abstract void send(String data, String toAddress);", "void send();", "private void udpTest() throws Exception {\n\n\t\tint targetPort = 5221;\n\t\tfinal String text = \"some text\";\n\t\tfinal Server server = new UDP.Server(targetPort);\n\t\tserver.receivePackage(new UDP.ReceiveListener() {\n\t\t\t@SuppressWarnings(\"null\")\n\t\t\t@Override\n\t\t\tpublic void onReceive(String message) {\n\t\t\t\tSystem.out.println(\"UDP: recieved \" + message);\n\t\t\t\ttry {\n\t\t\t\t\tassertTrue(message.equals(text));\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.e(\"\", \"UDP test failed: \" + e);\n\t\t\t\t\tObject x = null;\n\t\t\t\t\tx.toString();\n\t\t\t\t}\n\t\t\t\tserver.closeConnection();\n\t\t\t}\n\t\t});\n\n\t\tString targetIp = UDP.getDeviceIp();\n\t\tSystem.out.println(\"UDP ip: \" + targetIp);\n\t\tClient x = new UDP.Client(targetIp, targetPort);\n\t\tx.sendPackage(text);\n\t\tx.closeConnection();\n\n\t}", "void sendUnicast(InetAddress hostname, String message);", "@Override\n\tpublic void send(String msg) {\n\t\t\n\t\t\n\t\n\t}", "void send(String message);", "public void onSend(View v){\n Socket msocket;\n try {\n msocket = IO.socket(\"http://10.0.2.2:9080/\");\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n //msocket=cApp.getSocket();\n msocket.connect();\n msocket.emit(\"sendTest\",\"fkg\");\n msocket.on(\"sendTest\",onSendTest);\n }", "public void sendData(String message) {\n if (asyncClient != null) {\n asyncClient.write(new ByteBufferList(message.getBytes()));\n Timber.d(\"Data sent: %s\", message);\n } else {\n Timber.e(\"cannot send data - socket not yet ready\");\n }\n }", "void generateControlMessage(UDPAddress sender, int missingNum, int type) {\n DatagramPacket outPacket = null;\n byte[] outData = new byte[UDPTransportLayer.PACKET_SIZE];\n\n // Write out message header\n writeByte(outData, 0, type);\n writeInt (outData, 1, missingNum);\n\n // Create new packet\n outPacket = new DatagramPacket(outData, UDPTransportLayer.PACKET_SIZE, sender.hostAddr, sender.hostPort);\n try {\n socket.send(outPacket);\n } catch (IOException e) {\n Debug.exit(e.toString());\n }\n// toResend.enqueue(outPacket);\n\n // Now wake up the sending thread if it isn't already\n// synchronized (msgsToSend) {\n// msgsToSend.notifyAll();\n// }\n }", "public void sendRequest(Pdu packet);", "public void sendMessage(String message) {\n\t\tsocketTextOut.println(message);\n\t\tsocketTextOut.flush();\n\t}", "public void sendData(byte[] data){\n try {\n if (mDatagramSocket == null){\n Log.d(Constants.LOG_TAG, \"datagram socket not initialized yet\");\n return;\n }\n\n if (mDatagramSocket.isClosed())\n {\n Log.d(Constants.LOG_TAG, \"datagram socket closed\");\n return;\n }\n\n DatagramPacket datagramPacket = new DatagramPacket(data, data.length, mClientAddress, mPort);\n mDatagramSocket.send(datagramPacket);\n\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "public boolean Send(String message) {\r\n\t\t\r\n\t\t//Add a new line so it gets entered into the robot console \r\n\t\tmessage = message.concat(\"\\n\");\r\n\t\t\r\n\t\t//Construct ip address of Robot by team number \r\n\t\taddress = this.numberToAddress(NetConsole.window.getTeam());\r\n\t\t\r\n\t\t//deconstruct String into byte array \r\n\t\tbyte[] sendData = message.getBytes();\r\n\t\t\r\n\t\t//deconstruct packet for cleansing\r\n\t\tDatagramPacket packet = null;\r\n\t\t\r\n\t\t//reconstruct packet with default port \r\n\t\tpacket = new DatagramPacket(sendData, sendData.length, address, 6668);\r\n\t\ttry {\r\n\t\t\t//Send all the Packets!\r\n\t\t\tserverSocket.send(packet);\r\n\t\t} catch (IOException e) {\r\n\t\t\tNetConsole.window.error(\"Error Sending Packets\");\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t\t//Just in case we want to know if the proccess was successful\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t\r\n\t}", "public void send() {\n\t}", "public void sendPing(PingMessage ping)\n {\n InetAddress host = ping.getIP();\n int port = ping.getPort();\n String msg = ping.getPayload();\n try\n {\n DatagramPacket packet = \n new DatagramPacket(msg.getBytes(), msg.length(), host, port);\n socket.send(packet);\n } \n catch (Exception ex)\n {\n System.out.println(\"UDPPinger Exception: \" + ex);\n }\n }", "public static void main(String[] args) {\n try {\n String servhostname=\"localhost\";\n //String servhostname=\"133.14.44.133\";//ここに隣の人のアドレスを入れる。\n\n InetAddress serverAddress = InetAddress.getByName(servhostname);\n String message=\"abc\";\n byte[] bytesToSend = message.getBytes();\n\n System.out.println(\"sending msg is \"+message);\n //int serverPort = Integer.parseInt(portnumstr);\n int serverPort = 5000;\n DatagramSocket socket = new DatagramSocket();\n DatagramPacket sendPacket = new DatagramPacket(bytesToSend, bytesToSend.length, serverAddress, serverPort);\n socket.send(sendPacket);\n socket.close();\n\n } catch (UnknownHostException e) {\n e.printStackTrace();\n } catch (SocketException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }//try catch end\n\n\n try {\n final int DMAX = 15;\n\n int serverPort = 5001;\n System.out.println(\"UDP client is waiting replay at \" + serverPort);\n DatagramSocket socket = new DatagramSocket(serverPort);\n DatagramPacket receivePacket = new DatagramPacket(\n new byte[DMAX], DMAX);\n\n socket.receive(receivePacket);\n String replaymessage=new String(receivePacket.getData());\n System.out.println(\"Receiced Packet Message is \"\n +replaymessage );\n\n socket.close();\n\n } catch (UnknownHostException e) {\n e.printStackTrace();\n } catch (SocketException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }//try end\n\n\n\n\n\n\n }", "public void send(){ \n\t\tserverAddress=tfTxtIpServer.getText();\n\t\tserverPort=\"3232\";\n\t\ttext=tfTxtMsg.getText();\n try{\n\t\t\t// get the \"registry\"\n registry=LocateRegistry.getRegistry(\n serverAddress,\n (new Integer(serverPort)).intValue()\n );\n\t\t // look up the remote object\n rmiServer=(ReceiveMessageInterface)(registry.lookup(\"rmiServer\"));\n\t\t\t// call the remote method\n rmiServer.receiveMessage(text);\n }\n catch(RemoteException e){\n e.printStackTrace();\n }\n catch(NotBoundException e){\n e.printStackTrace();\n } \n }", "void sendData(String msg) throws IOException\n {\n if ( msg.length() == 0 ) return;\n//\n msg += \"\\n\";\n// Log.d(msg, msg);\n if (outputStream != null)\n outputStream.write(msg.getBytes());\n// myLabel.setText(\"Data Sent\");\n// myTextbox.setText(\" \");\n }", "public void sendMessage(common.messages.KVMessage msg) throws IOException {\r\n\t\tbyte[] msgBytes = msg.getMsgBytes();\r\n\t\toutput.write(msgBytes, 0, msgBytes.length);\r\n\t\toutput.flush();\r\n\t\tlogger.debug(\"SEND \\t<\" \r\n\t\t\t\t+ clientSocket.getInetAddress().getHostAddress() + \":\" \r\n\t\t\t\t+ clientSocket.getPort() + \">: '\" \r\n\t\t\t\t+ msg.getMsg() +\"'\");\r\n }", "void sendPacket(Packet p){\n InetAddress address=p.getDestination().getAddress();\n if (this.socket.isClosed()){\n return;\n }\n if (chatRooms.containsKey(address)){\n chatRooms.get(address).sendMessage(p);\n }else{\n Socket distant;\n Discussion discussion;\n try {\n distant = new Socket(address, NetworkManager.UNICAST_PORT);\n discussion = new Discussion(distant);\n discussion.addObserver(this);\n chatRooms.put(distant.getInetAddress(), discussion);\n new Thread(discussion).start();\n discussion.sendMessage(p);\n } catch (IOException e) {\n System.out.println(\"Erreur à l'envois d'un nouveau message\");\n }\n }\n }", "public void sendData(byte[] data) {\n\t\tDatagramPacket packet = new DatagramPacket(data, data.length, ipAddress, serverPort);\n\n\t\ttry {\n\t\t\tsocket.send(packet);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public boolean sendMessage(UdpPacket packet) throws IOException {\n PacketConverter packetConverter = new PacketConverter();\n byteArray = packetConverter.serialize(packet);\n UdpSender udpSender = new UdpSender();\n return udpSender.sendMessage(byteArray);\n }", "public synchronized void writeToSocket(String msg) {\n try {\n bluetoothSocket.getOutputStream().println(msg);\n } catch (Exception e) {\n Log.e(TAG, General.OnWriteToSocketFailed, e);\n }\n }", "public void send(String message) throws IOException {\r\n OutputStream stream = socket.getOutputStream();\r\n PrintWriter writer = new PrintWriter(stream);\r\n writer.println(message);\r\n writer.flush();\r\n }", "public void bonjuor() throws IOException {\n\t\tint port = 4445;\n\t\t\n\tDatagramSocket socket = new DatagramSocket(port);\n\t\t\n\n // Create a buffer to read datagrams into. If a\n // packe is larger than this buffer, the\n // excess will simply be discarded!\n byte[] buffer = new byte[10];\n String address = InetAddress.getLocalHost().getHostName();\n byte[] out_buffer = address.getBytes();\n \n \n // Create a packet to receive data into the buffer\n DatagramPacket packet = new DatagramPacket(buffer, buffer.length);\n // Now loop forever, waiting to receive packets and printing them.\n while (true) {\n // Wait to receive a datagram\n \t socket.receive(packet);\n \t InetAddress connected_ip = packet.getAddress();\n \t String in_data = new String(packet.getData(),StandardCharsets.UTF_8);\n \t \n \t System.out.println(\"IP: \" + connected_ip + \" said \"+ in_data);\n \t \n \t if(in_data.equals(\"IP request\")){\n \t DatagramPacket send_packet = new DatagramPacket(out_buffer,out_buffer.length,connected_ip,4446);\n \t\t socket.send(send_packet);\n \t\t break;\n \t } \t \n }\n socket.close();\n\t}", "public void sendDatagram(int outPort, DatagramSocket socket)\n\t{\n\t\t//prep packet to send\n\t\tconsole.print(\"Sending packet...\");\n\t\tsentPacket = receivedPacket;\n\t\tsentPacket.setPort(outPort );\n\t\t\n\t\t//print contents\n\t\tprintDatagram(sentPacket);\n\t\t\n\t\t//send packet\n\t\ttry\n\t\t{\n\t\t\tsocket.send(sentPacket);\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tconsole.print(\"Packet successfully sent\");\n\t\t\n\t}", "private void bluetoothSendMsg(String s) {\n byte [] msgOnBuf;\n msgOnBuf = s.getBytes();\n try {\n outStream.write(msgOnBuf);\n } catch (IOException e) {\n Log.d(TAG,\"send message fail!\");\n }\n }", "public void send(Packet packet);", "@Override\n public void run() {\n if (this.clientInterfaceTCP.getConnected())\n this.clientInterfaceTCP.sendString(this.messageToSend);\n }", "public void sendPacket() throws IOException {\n\t\tbyte[] buf = playerList.toString().getBytes();\n\n\t\t// send the message to the client to the given address and port\n\t\tInetAddress address = packet.getAddress();\n\t\tint port = packet.getPort();\n\t\tpacket = new DatagramPacket(buf, buf.length, address, port);\n\t\tsocket.send(packet);\n\t}", "public void sendPacket(String data) throws IOException {\n\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));\n out.write(data + \"\\0\");\n out.flush();\n }", "@Override\n\tpublic void send(String msg) {\n\t}", "public void send() {\n try {\n String message = _gson.toJson(this);\n byte[] bytes = message.getBytes(\"UTF-8\");\n int length = bytes.length;\n\n _out.writeInt(length);\n _out.write(bytes);\n \n } catch (IOException ex) {\n Logger.getLogger(ResponseMessage.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void send(DataPacket packet){\n if(deviceDestination != null){\n deviceDestination.receive(packet, portDestination);\n }\n }", "@Override\n\tpublic void sendMessage(String destinationUID, byte[] message) {\n\t\tbyte[] temp = new byte[ICD.UID_LENGTH + message.length];\n\t\tUtils.hexStringToBytes(destinationUID, temp, 0);\n\t\tSystem.arraycopy(message, 0, temp, ICD.UID_LENGTH, message.length);\n\t\tmessage = temp;\n\t\t\n // Create temporary object\n UdpConnectionThread thread;\n // Synchronize a copy of the ConnectedThread\n synchronized (this) {\n if (getState() != STATE_CONNECTED) return;\n thread = mUdpConnectionThread;\n } \n // Perform the write unsynchronized\n thread.sendMessage(message);\n\t}", "private void sendUpdate(String gameString, int sequenceNo) throws IOException\n\t{\n\t\tfor (Client client : clients)\n\t\t{\n\t\t\t//System.out.println(\"Sending packet to \" + client.toString()); \n\t\t\tUDPSender sender;\n\t\t\ttry {\n\t\t\t\tsender = new UDPSender(client, client.port, gameString, sequenceNo);\n\t\t\t\tThread worker = new Thread(sender);\n\t\t\t\tworker.start();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void run() {\n\n while (true/* && Game.connection.setting == false*/) {\n try {\n this.sleep(Game.ENEMY_DELAY);\n connect();\n createPosition();\n sendData = sendString.getBytes();\n\n for (Entry<Integer, InetAddress> entry : portMap.entrySet()) {\n\n clientPort = entry.getKey();\n clientIP = entry.getValue();\n\n DatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length, clientIP, clientPort);\n udpServerSocket.send(sendPacket);\n }\n\n } catch (InterruptedException e) {\n System.out.println(\"Server Error sleep()\");\n } catch (IOException e) {\n System.out.println(\"Server Error sending new enemy position\");\n }\n }\n }", "public void broadcast(Object msg);", "public void sendMsg(String message, InetAddress IP, int port){\n\t\tif(port < 0) {\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(\"Sending message from server: \" + message + \"to: \" + IP + \":\" + port);\n\t\tbyte[] msg = message.getBytes();\n\n\t\tDatagramPacket packet = new DatagramPacket(msg, msg.length, IP, port);\n\t\ttry {\n\t\t\tserverSocket.send(packet);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error broadcasting message: \" + e.toString());\n\t\t\treturn;\n\t\t}\n\t}", "public static void Send(Message message)\n\t{\n\t\ttry\n\t\t{\n\t\t\t_sendBuf = toByteArray(message);\n\n\t\t\t//dc message\n\t\t\tif (message.getRecipient().equalsIgnoreCase(\"\") &&\n\t\t\t\tmessage.getMessage().equalsIgnoreCase(\"%BYE%\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent BYE\");\n\t\t\t\t_socket.getOutputStream().write(Message.BYE);\n\t\t\t}\n\t\t\t//lobby message\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent LOBBY\");\n\t\t\t\t_socket.getOutputStream().write(Message.LOBBY);\n\t\t\t}\n\t\t\t//search request\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"all\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent SEARCH\");\n\t\t\t\t_socket.getOutputStream().write(Message.SEARCH);\n\t\t\t}\n\t\t\t//answer request\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"server\") &&\n\t\t\t\t\t message.getOrigin().equalsIgnoreCase(\"none\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent CHOICE\");\n\t\t\t\t_socket.getOutputStream().write(Message.CHOICE);\n\t\t\t}\n\t\t\t//whisper message\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent WHISPER\");\n\t\t\t\t_socket.getOutputStream().write(Message.WHISPER);\n\t\t\t}\n\t\t\t_socket.getOutputStream().write(_sendBuf);\n\t\t\t_socket.getOutputStream().flush();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void send(ByteBuffer data, Address addr) throws CCommException, IllegalStateException;", "@Override\r\n public void onClick(View v) {\n String msg = ed_msg.getText().toString();\r\n try {\r\n\t\t\t\t\tsend(HOST, PORT, msg.getBytes());\r\n\t\t\t\t\t\r\n\t \tmHandler.sendMessage(mHandler.obtainMessage()); \r\n\t \tcontent =HOST +\":\"+ msg +\"\\n\";\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n }", "public synchronized void send(byte[] data, int length) throws IOException {\r\n\t\tsocket.send(new DatagramPacket(data, length, remoteAddress));\r\n\t}", "public void onClickSend(View view) {\n //String string = editText.getText().toString();\n //serialPort.write(string.getBytes());\n //tvAppend(txtResponse, \"\\nData Sent : \" + string + \"\\n\");\n }", "void send(SftpDatagram head,byte[] data){\r\n\t\tdata_send = data;\r\n\t\t//first send the first one\r\n\t\ttotal_datagrams = 1;\r\n\t\tcovered_datagrams++;\r\n\t\thead.send_datagram();\r\n\t\tput_and_set_timer(head);\r\n\t\t//sending\r\n\t\tif(data_send != null){\r\n\t\t\tlong size = data_send.length;\r\n\t\t\tif(size != 0)\r\n\t\t\t\ttotal_datagrams = (int)((size+BLOCK_SIZE-1) / BLOCK_SIZE);\r\n\t\t}\r\n\t\t//check sendings(if not small mode)\r\n\t\tcheck_and_send();\r\n\t}", "public void send(final byte[] data) {\n\t\tsend = new Thread(\"Send\") {\n\t\t\t// anaonymous class prevents us from making new class that implemtents Runnable\n\t\t\tpublic void run(){\n\t\t\t\tDatagramPacket packet = new DatagramPacket(data,data.length, ip, port);\n\t\t\t\ttry {\n\t\t\t\t\tsocket.send(packet);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t};\n\t\tsend.start();\n\t}", "public static void sendMessage(String message) {\r\n\t\tbtService.write(message.getBytes());\r\n\t}", "private void createThreadUdp(){\n System.out.println(\"dirport: \"+serverDirPort);\n System.out.println(\"udpPort: \"+myUdpPort);\n System.out.println(\"tcpPort: \"+myTcpPort);\n threadHeartbeat=new ThSendHeartBeat(myAddress,serverDirPort,myHeartServer);\n threadHeartbeat.start();\n\n }", "public void sendMessage(NetMessage message) {\n ClientDirector.getDataManager().sendMessage(message);\n }", "public void sendMessage(String message) {\n\t\ttry {\n\t\t\tout.writeUTF(message);\n\t\t\tserver.CommunicationLog.info(\"Sent:\" + message + \" to \" + clientSocket.getInetAddress().toString());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-02-25 10:38:11.976 -0500\", hash_original_method = \"24A3E423DE78176900F1058E127BC8B2\", hash_generated_method = \"5B5F51BF25DAE30DEF4DFB5C781A6B4A\")\n \npublic void send(InetAddress host, int port) throws IOException\n {\n __sendPacket.setAddress(host);\n __sendPacket.setPort(port);\n _socket_.send(__sendPacket);\n }", "public void transportSend(PhysicalAddress dest, TransportMessage msg) throws TransportException {\n\n try {\n UDPAddress destAddr = (UDPAddress) dest;\n byte[][] outPackets;\n\n // Construct a set of packets to send by segmenting the user's\n // data into UDPTransportLayer.PACKET_SIZE byte blocks\n synchronized (destSeqNum) {\n\tInteger temp = (Integer) destSeqNum.get(destAddr);\n\tint nextSeq;\n\tif (temp == null)\n\t nextSeq = 0;\n\telse\n\t nextSeq = temp.intValue();\n\n\toutPackets = buildDataPackets(nextSeq, msg.contents);\n\tdestSeqNum.put(destAddr, new Integer(nextSeq + outPackets.length));\n\n\t// Now blast the packets out. Before sending each one out,\n\t// save it in the toResend hashtable in case it needs to be\n\t// resent.\n\tHashtable<Integer, DatagramPacket> sentMsgs = (Hashtable<Integer, DatagramPacket>) notGCd.get(destAddr);\n\tif (sentMsgs == null) {\n\t sentMsgs = new Hashtable<Integer, DatagramPacket>();\n\t notGCd.put(destAddr, sentMsgs);\n\t}\n\n\tfor(int i=0; i<outPackets.length; i++) {\n\t DatagramPacket outPacket = new DatagramPacket(outPackets[i], UDPTransportLayer.PACKET_SIZE, \n\t\t\t\t\t\t\tdestAddr.hostAddr, destAddr.hostPort);\n\t sentMsgs.put(new Integer(nextSeq + i), outPacket);\n\t socket.send(outPacket);\n\t}\n }\n\n // Anytime we dump messages into the sent messages table, set\n // needGC to true so we can generate ALIVE messages if\n // necessary.\n needGC = true;\n\n synchronized (msgsToSend) {\n\tmsgsToSend.notify();\n }\n } catch (Exception e) {\n throw new TransportException(\"error sending message\", e);\n }\n }", "protected void sendMessage() throws IOException {\r\n\t\tif (smscListener != null) {\r\n\t\t\tint procCount = processors.count();\r\n\t\t\tif (procCount > 0) {\r\n\t\t\t\tString client;\r\n\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\tlistClients();\r\n\t\t\t\tif (procCount > 1) {\r\n\t\t\t\t\tSystem.out.print(\"Type name of the destination> \");\r\n\t\t\t\t\tclient = keyboard.readLine();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(0);\r\n\t\t\t\t\tclient = proc.getSystemId();\r\n\t\t\t\t}\r\n\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\tif (proc.getSystemId().equals(client)) {\r\n\t\t\t\t\t\tif (proc.isActive()) {\r\n\t\t\t\t\t\t\tSystem.out.print(\"Type the message> \");\r\n\t\t\t\t\t\t\tString message = keyboard.readLine();\r\n\t\t\t\t\t\t\tDeliverSM request = new DeliverSM();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trequest.setShortMessage(message);\r\n\t\t\t\t\t\t\t\tproc.serverRequest(request);\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Message sent.\");\r\n\t\t\t\t\t\t\t} catch (WrongLengthOfStringException e) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Message sending failed\");\r\n\t\t\t\t\t\t\t\tevent.write(e, \"\");\r\n\t\t\t\t\t\t\t} catch (IOException ioe) {\r\n\t\t\t\t\t\t\t} catch (PDUException pe) {\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tSystem.out.println(\"This session is inactive.\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"No client connected.\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"You must start listener first.\");\r\n\t\t}\r\n\t}", "public void run()\r\n\t{\r\n\t\t\r\n\t\tint i,tam;\r\n\r\n\t\tfinal int puerto = 6250;\r\n\t\tbyte[] buffer;\r\n\t\tSystem.out.println(\"--- Servidor iniciado ---\\n\");\t\r\n\r\n\r\n\t\ttry\r\n\t\t{\t\r\n\t\t\tDatagramSocket socket = new DatagramSocket(puerto);\r\n\t\t\tDatagramPacket peticion;\r\n\t\t\tDatagramPacket respuesta;\r\n\t\t\tInetAddress direccion;\r\n\t\t\tint puertoCliente;\r\n\r\n\t\t\tString[] tiempo;\r\n\t\t\tString mensaje,envio = \"\";\r\n\r\n\t\t\twhile(true)\r\n\t\t\t{\r\n\t\t\t\t//System.out.println(\"Nueva iteracion, puerto: \" + puerto);\r\n\t\t\t\t//System.out.println(\"Nueva iteracion, puerto: \" + puertoCliente);\r\n\t\t\t\ttam = 0;\r\n\t\t\t\ttiempo = new String[4];\r\n\t\t\t\ttiempo = this.reloj.getFormatTime();\r\n\r\n\t\t\t\t// Recibe un mensaje de algun cliente, este puede estar solicitando la hora de algun reloj o la modificacion\r\n\t\t\t\tbuffer = new byte[100];\r\n\t\t\t\tpeticion = new DatagramPacket(buffer,buffer.length);\r\n\t\t\t\tsocket.receive(peticion);\r\n\t\t\t\tmensaje = new String(peticion.getData());\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(peticion.getAddress());\r\n\t\t\t\tSystem.out.println(mensaje);\r\n\t\t\t\tif(mensaje.charAt(1) == '$')\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\ttam = 12;\r\n\t\t\t\t\tSystem.out.println(\"Mensaje para pedir la hora\");\r\n\t\t\t\t\tenvio = tiempo[3] + \":\" + tiempo[2] + \":\" + tiempo[1] + \":\" + tiempo[0];\r\n\t\t\t\t}\r\n\t\t\t\telse if (mensaje.charAt(1) == '%')\r\n\t\t\t\t{\r\n\t\t\t\t\ttam = 26;\r\n\t\t\t\t\tSystem.out.println(\"Libro recibido.\");\r\n\t\t\t\t\tString[] tiempo_recibido = {mensaje.split(\":\")[1],mensaje.split(\":\")[2],mensaje.split(\":\")[3],mensaje.split(\":\")[4]};\r\n\t\t\t\t\tenvio = \"Gracias, vuelva pronto :).\";\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthis.st = this.Conect.conn.createStatement();\r\n\t\t\t\t\t\tthis.rs = this.st.executeQuery(\"SELECT idUsuario FROM usuario WHERE IP = INET6_ATON('\"+ peticion.getAddress().getHostAddress() +\"')\");\r\n\t\t\t\t\t\twhile(this.rs.next())\r\n\t\t {\r\n\t\t \tthis.Conect.terminar_pedidos(this.rs.getInt(1),tiempo_recibido);\r\n\t\t }\r\n\t\t\t\t\t}catch(Exception ex) {\r\n\t\t System.out.println(\"Error: \" + ex);\r\n\t\t }\r\n\t\t\t\t}else if(mensaje.charAt(1) == '#')\r\n\t\t\t\t{\r\n\t\t\t\t\tint confirmado = JOptionPane.showConfirmDialog(null, \"Se solicito un reinicio de pedidos\", \"Sin libros\", JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\tif (JOptionPane.OK_OPTION == confirmado)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthis.Reiniciar();\r\n\t\t\t\t\t\tenvio = \"Oki\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tenvio = \"Nop\";\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\ttam = 100;\r\n\t\t\t\t\ttry\r\n\t\t {\r\n\t\t this.st = this.Conect.conn.createStatement();\r\n\t\t int opcion = this.Conect.asignar_libro(mensaje,peticion.getAddress().getHostAddress());\r\n\t\t if(opcion != -1)\r\n\t\t {\r\n\t\t \tthis.rs = this.st.executeQuery(\"SELECT * FROM libro where idLibro = \" + opcion);\r\n\t\t\t while(this.rs.next())\r\n\t\t\t {\r\n\r\n\t\t\t java.sql.Blob blob = rs.getBlob(\"Portada\");\r\n\t\t\t System.out.println(this.rs.getString(\"Nombre\"));\r\n\t\t\t envio = this.rs.getString(\"Nombre\") + \"&\" + this.rs.getString(\"Autor\") + \"&\" + this.rs.getFloat(\"Precio\") + \"&\";\r\n\t\t\t this.Ventana.setTitle(this.rs.getString(\"Nombre\"));\r\n\t\t\t InputStream in = blob.getBinaryStream(); \r\n\t\t\t BufferedImage image = ImageIO.read(in);\r\n\t\t\t ImageIcon imageIcon = new ImageIcon(image.getScaledInstance(240, 330, Image.SCALE_SMOOTH));\r\n\r\n\t\t\t this.Ventana.setTitle(this.rs.getString(\"Nombre\"));\r\n\t\t\t this.Ventana.texto[0].setText(\"Autor: \" + this.rs.getString(\"Autor\"));\r\n\t\t\t this.Ventana.texto[1].setIcon(imageIcon);\r\n\t\t\t }\r\n\t\t }\r\n\t\t else\r\n\t\t \tenvio = \"Todos los libros estan apartados\";\r\n\t\t \r\n\r\n\t\t }catch(Exception ex) {\r\n\t\t System.out.println(\"Error: \" + ex);\r\n\t\t }\r\n\t\t\t\t}\r\n\t\t\t\tif(mensaje.charAt(2) == ':' && mensaje.charAt(1) != '%' && peticion.getPort() == 6969)\r\n\t\t\t\t{\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Ajuste automatico UTC\");\r\n\t\t\t\t\t\tString[] tiempo_recibido = {mensaje.split(\":\")[0],mensaje.split(\":\")[1],mensaje.split(\":\")[2]};\r\n\t\t\t\t\t\tSystem.out.println(\"Hora: \"+tiempo_recibido[2]);\r\n\t\t\t\t\t\tSystem.out.println(\"min: \"+tiempo_recibido[1]);\r\n\t\t\t\t\t\tSystem.out.println(\"sec: \"+tiempo_recibido[0]);\r\n\t\t\t\t\t\treloj.setTime(Integer.parseInt(tiempo_recibido[2]),Integer.parseInt(tiempo_recibido[1]),Integer.parseInt(tiempo_recibido[0]),0);\r\n\t\t\t\t\t}catch(Exception ex) {\r\n\t\t System.out.println(\"Error: \" + ex);\r\n\t\t }\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tbuffer = new byte[tam];\r\n\t\t\t\t\tbuffer = envio.getBytes();\r\n\t\t\t\t\tpuertoCliente = peticion.getPort();\r\n\t\t\t\t\tdireccion = peticion.getAddress();\r\n\r\n\t\t\t\t\tmensaje = tiempo[3] + \":\" + tiempo[2] + \":\" + tiempo[1] + \":\" + tiempo[0];\r\n\t\t\t\t\tthis.Enviar_mensaje(mensaje,new byte[8],direccion);\r\n\r\n\t\t\t\t\tSystem.out.println(\"Mensaje enviado: \" + envio);\r\n\t\t\t\t\trespuesta = new DatagramPacket(buffer,buffer.length,direccion,puertoCliente);\r\n\t\t\t\t\tsocket.send(respuesta);\r\n\t\t\t\t\tbuffer = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}catch (Exception e) {\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}", "void sendMessage(String msg);", "public void sendMessage(final SendenDevice device, MessageWrapper message) {\n // Set the actual device to the message\n message.setSendenDevice(wiFiP2PInstance.getThisDevice());\n\n new AsyncTask<MessageWrapper, Void, Void>() {\n @Override\n protected Void doInBackground(MessageWrapper... params) {\n if (device != null && device.getDeviceServerSocketIP() != null) {\n try {\n Socket socket = new Socket();\n socket.bind(null);\n\n InetSocketAddress hostAddres = new InetSocketAddress(device.getDeviceServerSocketIP(), device.getDeviceServerSocketPort());\n socket.connect(hostAddres, 2000);\n\n Gson gson = new Gson();\n String messageJson = gson.toJson(params[0]);\n\n OutputStream outputStream = socket.getOutputStream();\n outputStream.write(messageJson.getBytes(), 0, messageJson.getBytes().length);\n\n Log.d(TAG, \"Sending data: \" + params[0]);\n\n socket.close();\n outputStream.close();\n } catch (IOException e) {\n Log.e(TAG, \"Error creating client socket: \" + e.getMessage());\n }\n }\n\n return null;\n }\n }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, message);\n }", "@Override\n protected void encode(ChannelHandlerContext ctx, FoscamTextByteBufDTO msg, List<Object> out) {\n final ByteBuf buf = FoscamTextByteBufDTOEncoder.allocateBuf(ctx, msg);\n new FoscamTextByteBufDTOEncoder().encode(ctx, msg, buf);\n final DatagramPacket datagramPacket = new DatagramPacket(buf, new InetSocketAddress(BROADCAST_ADDRESS, BROADCAST_PORT));\n out.add(datagramPacket);\n }", "public static void SendAndReceive() throws IOException {\n\t\t\tbyte[]buffer = new byte[BUFFER_SIZE];\n\n\t\t\t/* Create remote endpoint */\n\t\t\tSocketAddress remoteBindPoint = new InetSocketAddress(IP, PORT);\n\n\t\t\t/* Create datagram packet for sending message */\n\t\t\tDatagramPacket sendPacket = new DatagramPacket(MSG.getBytes(), MSG.length(), remoteBindPoint);\n\n\t\t\t/* Create datagram packet for receiving echoed message */\n\t\t\tDatagramPacket receivePacket = new DatagramPacket(buffer, buffer.length);\n\n\t\t\t/* Send and receive message*/\n\t\t\tsocket.send(sendPacket);\n\t\t\t//System.out.println(\"SAR\");\n\t\t\tsocket.receive(receivePacket);\n\n\t\t\t/* Compare sent and received message */\n\t\t\tString receivedString = new String(receivePacket.getData(), receivePacket.getOffset(), receivePacket.getLength());\n\t\t\tif (receivedString.compareTo(MSG) == 0)\n\t\t\t\tSystem.out.printf(\"%d bytes sent and received\\n\", receivePacket.getLength());\n\t\t\telse\n\t\t\t\tSystem.out.printf(\"Sent and received msg not equal!\\n\");\n\n\n\t\t}", "public void sendmsg(Message msg){\n try {\n oos.writeObject(new Datapacket(1, null, msg,null, null));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void sendBroadcast(byte[] bytesToSend)\n {\n if (m_name != null)\n {\n m_socket.write(bytesToSend);\n }\n\n }", "protected void sendBroadcast(String broadcastMessage) {\n\t\tthis.udpClient.sendBroadcast(broadcastMessage);\n\t}", "void send(TransportPacket pkt, Address addr) throws CCommException, IllegalStateException;", "@Override\n\tpublic void send(DuDuMessage message, Object sessionToken) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(!chatEditText.getText().toString().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tString sendData = chatEditText.getText().toString();\n\t\t\t\t\tSendPacketTask task = new SendPacketTask (UDP_SERVER_PORT, wifi);\n\t\t\t\t\ttask.execute(sendData);\n\t\t\t\t\tchatEditText.setText(\"\");\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tswitch (msg.what) {\n\t\t\t\tcase UDPHelper.HANDLER_MESSAGE_BIND_ERROR:\n\t\t\t\t\tLog.e(\"my\", \"HANDLER_MESSAGE_BIND_ERROR\");\n\t\t\t\t\tT.showShort(mContext, R.string.port_is_occupied);\n\t\t\t\t\tbreak;\n\t\t\t\tcase UDPHelper.HANDLER_MESSAGE_RECEIVE_MSG:\n\t\t\t\t\tisReceive = true;\n\t\t\t\t\tLog.e(\"my\", \"HANDLER_MESSAGE_RECEIVE_MSG\");\n\t\t\t\t\t// NormalDialog successdialog=new NormalDialog(mContext);\n\t\t\t\t\t// successdialog.successDialog();\n\t\t\t\t\tT.showShort(mContext, R.string.set_wifi_success);\n\t\t\t\t\tmHelper.StopListen();\n\t\t\t\t\tBundle bundle = msg.getData();\n\t\t\t\t\t\n\t\t\t\t\tIntent it = new Intent();\n\t\t\t\t\tit.setAction(Constants.Action.RADAR_SET_WIFI_SUCCESS);\n\t\t\t\t\tsendBroadcast(it);\n\t\t\t\t\tFList flist = FList.getInstance();\n\t\t\t\t\tflist.updateOnlineState();\n\t\t\t\t\tflist.searchLocalDevice();\n\n\t\t\t\t\tString contactId = bundle.getString(\"contactId\");\n\t\t\t\t\tString frag = bundle.getString(\"frag\");\n\t\t\t\t\tString ipFlag = bundle.getString(\"ipFlag\");\n\t\t\t\t\tContact saveContact = new Contact();\n\t\t\t\t\tsaveContact.contactId = contactId;\n\t\t\t\t\tsaveContact.activeUser = NpcCommon.mThreeNum;\n\t\t\t\t\tIntent add_device = new Intent(mContext,\n\t\t\t\t\t\t\tAddContactNextActivity.class);\n\t\t\t\t\tadd_device.putExtra(\"contact\", saveContact);\n\t\t\t\t\tif (Integer.parseInt(frag) == Constants.DeviceFlag.UNSET_PASSWORD) {\n\t\t\t\t\t\tadd_device.putExtra(\"isCreatePassword\", true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tadd_device.putExtra(\"isCreatePassword\", false);\n\t\t\t\t\t}\n\t\t\t\t\tadd_device.putExtra(\"isfactory\", true);\n\t\t\t\t\tadd_device.putExtra(\"ipFlag\", ipFlag);\n\t\t\t\t\tstartActivity(add_device);\n\t\t\t\t\t// Intent modify = new Intent();\n\t\t\t\t\t// modify.setClass(mContext, LocalDeviceListActivity.class);\n\t\t\t\t\t// mContext.startActivity(modify);\n\t\t\t\t\tfinish();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcancleTimer();\n\t\t\t}", "private void send(final byte[] data, final InetAddress address, final int port) {\n send = new Thread(\"Send\") {\n public void run() {\n DatagramPacket packet = new DatagramPacket(data, data.length, address, port);\n try {\n socket.send(packet);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n };\n send.start();\n }" ]
[ "0.79229486", "0.73554265", "0.7018877", "0.69855124", "0.66930044", "0.65872276", "0.65146935", "0.637695", "0.6359708", "0.6351711", "0.62891006", "0.6212689", "0.61929286", "0.6182399", "0.61332154", "0.61068904", "0.6104795", "0.6103672", "0.6099215", "0.6091398", "0.60672075", "0.606051", "0.6038815", "0.6029019", "0.60189867", "0.6012862", "0.6001081", "0.5987025", "0.5976024", "0.5962176", "0.5955306", "0.5945142", "0.5939201", "0.5938868", "0.5925045", "0.5920149", "0.59068465", "0.5894051", "0.5892946", "0.58896714", "0.58783287", "0.5877264", "0.58762074", "0.5865229", "0.58586186", "0.58557326", "0.5849792", "0.5843513", "0.584339", "0.5821237", "0.5818492", "0.58120793", "0.5811084", "0.5801396", "0.57953316", "0.5795035", "0.57932013", "0.5782389", "0.57814014", "0.57722455", "0.57668245", "0.57632047", "0.57547355", "0.57536376", "0.5748617", "0.57245827", "0.5715789", "0.5708068", "0.5705433", "0.5692568", "0.5692057", "0.56905156", "0.56858987", "0.5679058", "0.5667175", "0.56640273", "0.56560695", "0.56558645", "0.5653874", "0.56520474", "0.56504816", "0.5647926", "0.5643859", "0.56412894", "0.56394976", "0.563684", "0.56271625", "0.5627154", "0.561943", "0.5617987", "0.56141925", "0.56127036", "0.5610897", "0.56080467", "0.5606669", "0.5604086", "0.5591818", "0.55847555", "0.5584273", "0.55825835" ]
0.77095515
1
state parameter to validate response from Authorization server and nonce parameter to validate idToken
static void storeStateAndNonceInSession(HttpSession session, String state, String nonce) { if (session.getAttribute(STATES) == null) { session.setAttribute(STATES, new HashMap<String, StateData>()); } ((Map<String, StateData>) session.getAttribute(STATES)).put(state, new StateData(nonce, new Date())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean validateAccessToken(String clientId, String clientSecret) {\n log.info(\"Client Id:{} Client Secret:{}\", clientId, clientSecret);\n\n // Enable the Below code when the Introspection URL is ready to test\n /**\n * String auth = clientId + clientSecret; RestTemplate restTemplate = new RestTemplate();\n * HttpHeaders headers = new HttpHeaders(); headers.add(\"Content-Type\",\n * MediaType.APPLICATION_JSON_VALUE); headers.add(\"Authorization\", \"Basic \" +\n * Base64.getEncoder().encodeToString(auth.getBytes())); HttpEntity<String> request = new\n * HttpEntity<String>(headers);\n *\n * <p>log.info(\"Sending Token Intropsection request to Endpoint::::: {}\",\n * tokenIntrospectionURL); ResponseEntity<String> response =\n * restTemplate.exchange(tokenIntrospectionURL, HttpMethod.POST, request, String.class); *\n */\n return true;\n }", "private void requestValidationToken(final Context context, final ThreePid pid, final ThreePidRequestListener listener) {\n Uri identityServerUri = mHsConfig.getIdentityServerUri();\n new LoginRestClient(mHsConfig)\n .doesServerRequireIdentityServerParam(new ApiCallback<Boolean>() {\n @Override\n public void onNetworkError(Exception e) {\n listener.onThreePidRequestFailed(e.getLocalizedMessage());\n }\n\n @Override\n public void onMatrixError(MatrixError e) {\n listener.onThreePidRequestFailed(e.getLocalizedMessage());\n }\n\n @Override\n public void onUnexpectedError(Exception e) {\n listener.onThreePidRequestFailed(e.getLocalizedMessage());\n }\n\n @Override\n public void onSuccess(Boolean info) {\n if (info) {\n if (identityServerUri == null) {\n listener.onIdentityServerMissing();\n } else {\n doRequestValidationToken(context, pid, identityServerUri.toString(), listener);\n }\n\n } else {\n // Ok, not mandatory\n doRequestValidationToken(context, pid, null, listener);\n }\n }\n });\n\n }", "public static void processOIDCresp(HttpServletRequest req,HttpServletResponse resp) throws IOException, InterruptedException, NoSuchAlgorithmException, InvalidKeySpecException, ClassNotFoundException, SQLException\n\t{\n\t\tHttpSession session=req.getSession();\n\t\t//check the state parameters from the response with state parameter in the session,saved during authorization request\n\t\tString state=(String)req.getParameter(\"state\");\n\t\t\n\t\tif(state!=null)\n\t\t{\n\t\t //Pick up the response type associated with the state parameters\n\t\t String response_type=(String)session.getAttribute(state);\n\t\t if(response_type!=null)\n\t\t {\n\t\t\t if(response_type.contains(\"id_token\"))\n\t\t\t {\n\t\t\t\t//If the response type contains id_token(validate the ID Token create one cookie for authenticated users and send to user agent(browser)\n\t\t\t\t//If the response type contains id_token token(validate the ID Token create one cookie for authenticated users and send to user agent(browser) \n\t\t\t\t//and when users needs to access more profile info using access token we can get it.\n\t\t\t\t \n\t\t\t\t //Decode the ID Token(headers and payload)\n\t\t\t\tArrayList<String>decodeParams=decodeIDTokeheadPay(req.getParameter(\"id_token\"));\n\t\t\t\t//Convert the JSON into key value pairs\n\t\t\t Map<String,Object> headers=processJSON(decodeParams.get(0));\n\t\t\t\tMap<String,Object> payloads=processJSON(decodeParams.get(1));\n\t\t\t\t\n\t\t\t\t//Validate the public key by sending request to issuer(URL) by passing clientid and kid as header parameters\n\t\t\t\tif(ValidateIDissuerKey((String) payloads.get(\"iss\"),(String) headers.get(\"kid\"),resp))\n\t\t\t\t {\n\t\t\t\t\t //Decoded the public key from the encoded kid for signature verifications \n\t\t\t\t\t PublicKey pubkeys=pubkeyEncoder(Base64.getDecoder().decode((String) headers.get(\"kid\")));\n\t\t\t\t\t if(ValidateTokenSignature(req.getParameter(\"id_token\"),pubkeys))\n\t\t\t\t\t {\n\t\t\t\t\t\t responseFormat(payloads,resp);\n\t\t\t\t\t\t \n\t\t\t\t\t\t //another flow of implicit(id_token token)\n\t\t\t\t\t\t if(response_type.contains(\"token\"))\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t//save the token in cookie\n\t\t\t\t\t\t\t//Create one session for that authenticated users and redirected to Home Page\n\t\t\t\t\t\t\t Cookie auth_uesr = new Cookie(\"access_token\",req.getParameter(\"access_token\"));\n\t\t\t\t\t\t\t resp.addCookie(auth_uesr);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t //Redirected to Home Page\n\t\t\t\t\t\t //if(!response_type.contains(\"code\"))\n\t\t\t\t\t\t\t//resp.sendRedirect(\"http://localhost:8080/OPENID/phoneBookHome.jsp\");\n\t\t\t\t\t }\n\t\t\t\t\t else\n\t\t\t\t\t {\n\t\t\t\t\t\t //Signature Invalid and Token become Invalid and reauthenticate again\n\t\t\t\t\t\t resp.sendRedirect(\"http://localhost:8080/OPENID/PhoneBookLogin.jsp\");\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\t //issuer invalid\n\t\t\t\t\t resp.sendRedirect(\"http://localhost:8080/OPENID/PhoneBookLogin.jsp\");\n\t\t\t\t }\n\t\t\t }\n\t\t\t //Token Endpoint request for authorization code Flow\n\t\t /* if(response_type.contains(\"code\"))\n\t\t {\n\t\t \t authCodeProcessModel authModel=new authCodeProcessModel();\n\t\t \t authModel.setClientid(\"mano.lmfsktkmyj\");\n\t\t \t authModel.setClientsecret(\"mano.tpeoeothyc\");\n\t\t \t authModel.setCode((String)req.getParameter(\"code\"));\n\t\t \t authModel.setRedirecturi(\"http://localhost:8080/OPENID/msPhoneBook/response1\");\n\t\t \t \n\t\t \t //Get response from the token endpoint\n\t\t \t Map<String,Object> tokenResp=authCodeProcess(authModel,resp);\n\t\t \t //Check if the response returned any error\n\t\t \t if(tokenResp.containsKey(\"error\"))\n\t\t \t {\n\t\t \t //Token response made error redirected to signin with mano page again\n\t\t \t\t resp.sendRedirect(\"http://localhost:8080/OPENID/PhoneBookLogin.jsp\");\n\t\t \t }\n\t\t \t else\n\t\t \t {\n\t\t \t\t responseFormat(tokenResp,resp);\n\t\t \t\t //Validate ID Token\n\t\t \t\t ArrayList<String>decodeParams=decodeIDTokeheadPay((String) tokenResp.get(\"id_token\"));\n\t\t\t\t\t\t//Convert the JSON into key value pairs\n\t\t\t\t\t Map<String,Object> headers=processJSON(decodeParams.get(0));\n\t\t\t\t\t Map<String,Object> payloads=processJSON(decodeParams.get(1));\n\t\t\t\t\t \n\t\t\t\t\t//Validate the public key by sending request to issuer(URL) by passing clientid and kid as header parameters\n\t\t\t\t\t if(ValidateIDissuerKey((String) payloads.get(\"iss\"),(String) headers.get(\"kid\"),resp))\n\t\t\t\t\t {\n\t\t\t\t\t\t //true check signature\n\t\t\t\t\t\t PublicKey pubkeys=pubkeyEncoder(Base64.getDecoder().decode((String) headers.get(\"kid\")));\n\t\t\t\t\t\t //Validate the signature using public key\n\t\t\t\t\t\t if(ValidateTokenSignature((String) tokenResp.get(\"id_token\"),pubkeys))\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t //Valid the access token with the at_hash values in the ID Token\n\t\t\t\t\t\t\t //First hash the access token and compared with at_hash value in the ID Token\n\t\t\t\t\t\t\t if(payloads.get(\"at_hash\").equals(hashPass((String)tokenResp.get(\"access_token\"))))\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t //save access token along with refresh token to client database used when acces token get expired\n\t\t\t\t\t\t\t\t PhoneBookDAO.saveTokens((String)tokenResp.get(\"access_token\"),(String)tokenResp.get(\"refresh_token\"));\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t//Create one cookie for that authenticated users and redirected to Home Page and send cookie to browser\n\t\t\t\t\t\t\t\t session.setAttribute(\"enduser_name\",payloads.get(\"sub\"));\n\t\t\t\t\t\t\t\t Cookie auth_uesr = new Cookie(\"access_token\",(String) tokenResp.get(\"access_token\"));\n\t\t\t\t\t\t\t\t resp.addCookie(auth_uesr);\n\t\t\t\t\t\t\t\t //Redirected to Home Page\n\t\t\t\t\t\t\t resp.sendRedirect(\"http://localhost:8080/OPENID/phoneBookHome.jsp\");\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t //Invalid Access Token(Reauthenticate again)\n\t\t\t\t\t\t\t\t resp.sendRedirect(\"http://localhost:8080/OPENID/PhoneBookLogin.jsp\");\n\t\t\t\t\t\t\t } \n\t\t\t\t\t\t }\n\t\t\t\t\t\t else\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t //Signature invalid\n\t\t\t\t\t\t\t resp.sendRedirect(\"http://localhost:8080/OPENID/PhoneBookLogin.jsp\");\n\t\t\t\t\t\t }\n\t\t \t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t //Invalid issuers or public key(reauthenticate again)\n\t\t\t\t resp.sendRedirect(\"http://localhost:8080/OPENID/PhoneBookLogin.jsp\");\n\t\t\t }\n\t\t }\n\t\t }*/\n\t\t }\n\t\t else\n\t\t {\n\t\t\t//If the state value is not matched with the state value generated during authorization request CSRF attack\n\t\t\t//sign up again\n\t\t\t resp.sendRedirect(\"http://localhost:8080/OPENID/PhoneBookLogin.jsp\");\n\t\t }\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//state missing from server,response may be from unknown server,so sign up again\n\t\t\tresp.sendRedirect(\"http://localhost:8080/OPENID/PhoneBookLogin.jsp\");\n\t\t}\n\t}", "boolean isValid(String candidateOid);", "protected abstract boolean isResponseValid(SatelMessage response);", "public boolean validateReponse(Response response, int id,int which)\n {\n return response.isSuccessful();\n }", "public abstract boolean validateAuthToken(String username , String authToken);", "ResponseState getState();", "boolean isSetIdVerificationResponseData();", "public abstract boolean verifyIdAnswers(String firstName, String lastName, String address, String city, String state, String zip, String ssn, String yob);", "public abstract boolean validate(Request request, Response response);", "private void generateStateToken() {\n\t\tSecureRandom sr1 = new SecureRandom();\n\t\tstateToken = \"google;\" + sr1.nextInt();\n\t}", "protected void validateToken() {\n\n authToken = preferences.getString(getString(R.string.auth_token), \"\");\n saplynService = new SaplynService(preferences.getInt(debugLvl, -1), authToken);\n\n // Check if user already authenticated\n if (authToken.equals(\"\")) {\n Intent intent = new Intent(HomeActivity.this, AuthenticationActivity.class);\n startActivityForResult(intent, 0);\n }\n else {\n populateUser();\n }\n }", "private void generateStateToken() {\n\t\tSecureRandom sr1 = new SecureRandom();\n\n\t\tstateToken = \"google;\" + sr1.nextInt();\n\t}", "public String validateToken(HttpServletRequest request, HttpServletResponse response) {\n String[] cookieTokens = extractAndDecodeCookie(request, response);\n return validateToken(cookieTokens, request, response);\n }", "ValidationResponse validate();", "@Test(expected = InvalidSAMLRequestException.class)\n\tpublic void testValidate2d() throws InvalidSAMLRequestException\n\t{\n\t\tIdentifierCache cache = createMock(IdentifierCache.class);\n\t\treplay(cache);\n\t\tSAMLRequestValidatorImpl validator = new SAMLRequestValidatorImpl(cache, 100);\n\t\t\n\t\tRequestAbstractType request = new AuthnRequest();\n\t\trequest.setID(\"1234\");\n\t\t\n\t\t/* GMT timezone */\n\t\tSimpleTimeZone gmt = new SimpleTimeZone(0, \"UTC\");\n\n\t\t/* GregorianCalendar with the GMT time zone */\n\t\tGregorianCalendar calendar = new GregorianCalendar(gmt);\n\t\tXMLGregorianCalendar xmlCalendar = new XMLGregorianCalendarImpl(calendar);\n\t\t\n\t\trequest.setIssueInstant(xmlCalendar);\n\t\t\n\t\tNameIDType issuer = new NameIDType();\n\t\tissuer.setValue(\"testcase\");\n\t\trequest.setIssuer(issuer);\n\t\trequest.setVersion(\"SAML-TC\");\n\t\t\n\t\tvalidator.validate(request);\n\t\tverify(cache);\n\t}", "public Action<PaymentState, PaymentEvent> preAuthAction(){\n\n// this is where you will implement business logic, like API call, check value in DB ect ...\n return context -> {\n System.out.println(\"preAuth was called !!\");\n\n if(new Random().nextInt(10) < 8){\n System.out.println(\"Approved\");\n\n // Send an event to the state machine to APPROVED the auth request\n context.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.PRE_AUTH_APPROVED)\n .setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, context.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER))\n .build());\n } else {\n System.out.println(\"Declined No Credit !!\");\n\n // Send an event to the state machine to DECLINED the auth request, and add the\n context.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.PRE_AUTH_DECLINED)\n .setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, context.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER))\n .build());\n }\n };\n }", "@Test(expected = InvalidSAMLRequestException.class)\n\tpublic void testValidate2() throws InvalidSAMLRequestException\n\t{\n\t\tIdentifierCache cache = createMock(IdentifierCache.class);\n\t\treplay(cache);\n\t\tSAMLRequestValidatorImpl validator = new SAMLRequestValidatorImpl(cache, 100);\n\t\t\n\t\tRequestAbstractType request = new AuthnRequest();\n\t\trequest.setID(null);\n\t\t\n\t\tvalidator.validate(request);\n\t\tverify(cache);\n\t}", "@Test\n\tpublic void testValidate3() throws InvalidSAMLRequestException\n\t{\n\t\tIdentifierCache cache = createMock(IdentifierCache.class);\n\t\ttry\n\t\t{\n\t\t\tcache.registerIdentifier(\"1234\");\n\t\t}\n\t\tcatch (IdentifierCollisionException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tfail(\"IdentifierCollisionException not expected in this test\");\n\t\t}\n\t\treplay(cache);\n\t\tSAMLRequestValidatorImpl validator = new SAMLRequestValidatorImpl(cache, 100);\n\t\t\n\t\tRequestAbstractType request = new AuthnRequest();\n\t\trequest.setID(\"1234\");\n\t\t\n\t\t/* GMT timezone */\n\t\tSimpleTimeZone gmt = new SimpleTimeZone(0, \"UTC\");\n\n\t\t/* GregorianCalendar with the GMT time zone */\n\t\tGregorianCalendar calendar = new GregorianCalendar(gmt);\n\t\tXMLGregorianCalendar xmlCalendar = new XMLGregorianCalendarImpl(calendar);\n\t\t\n\t\trequest.setIssueInstant(xmlCalendar);\n\t\t\n\t\tNameIDType issuer = new NameIDType();\n\t\tissuer.setValue(\"testcase\");\n\t\trequest.setIssuer(issuer);\n\t\trequest.setVersion(VersionConstants.saml20);\n\t\t\n\t\tStatus status = new Status();\n\t\tStatusCode code = new StatusCode();\n\t\tcode.setValue(\"success\");\n\t\tstatus.setStatusCode(code);\n\t\t\n\t\tvalidator.validate(request);\n\t\tverify(cache);\n\t}", "public void validateWsFederationAuthenticationRequest(final RequestContext context) {\n val service = wsFederationCookieManager.retrieve(context);\n LOGGER.debug(\"Retrieved service [{}] from the session cookie\", service);\n\n val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(context);\n val wResult = request.getParameter(WRESULT);\n LOGGER.debug(\"Parameter [{}] received: [{}]\", WRESULT, wResult);\n if (StringUtils.isBlank(wResult)) {\n LOGGER.error(\"No [{}] parameter is found\", WRESULT);\n throw new IllegalArgumentException(\"Missing parameter \" + WRESULT);\n }\n LOGGER.debug(\"Attempting to create an assertion from the token parameter\");\n val rsToken = wsFederationHelper.getRequestSecurityTokenFromResult(wResult);\n val assertion = wsFederationHelper.buildAndVerifyAssertion(rsToken, configurations, service);\n if (assertion == null) {\n LOGGER.error(\"Could not validate assertion via parsing the token from [{}]\", WRESULT);\n throw new IllegalArgumentException(\"Could not validate assertion via the provided token\");\n }\n LOGGER.debug(\"Attempting to validate the signature on the assertion\");\n if (!wsFederationHelper.validateSignature(assertion)) {\n val msg = \"WS Requested Security Token is blank or the signature is not valid.\";\n LOGGER.error(msg);\n throw new IllegalArgumentException(msg);\n }\n buildCredentialsFromAssertion(context, assertion, service);\n }", "private static boolean handle_nextnonce(AuthorizationInfo authorizationInfo, RoRequest roRequest, HttpHeaderElement httpHeaderElement) {\n AuthorizationInfo authorizationInfo2;\n if (authorizationInfo == null || httpHeaderElement == null || httpHeaderElement.getValue() == null) {\n return false;\n }\n try {\n authorizationInfo2 = AuthorizationInfo.getAuthorization(authorizationInfo, roRequest, null, false, false);\n }\n catch (AuthSchemeNotImplException authSchemeNotImplException) {\n authorizationInfo2 = authorizationInfo;\n }\n AuthorizationInfo authorizationInfo3 = authorizationInfo2;\n synchronized (authorizationInfo3) {\n NVPair[] arrnVPair = authorizationInfo2.getParams();\n arrnVPair = Util.setValue(arrnVPair, \"nonce\", httpHeaderElement.getValue());\n arrnVPair = Util.setValue(arrnVPair, \"nc\", \"00000000\", false);\n authorizationInfo2.setParams(arrnVPair);\n }\n return true;\n }", "@Override\n\t\tpublic boolean isRequestedSessionIdValid() {\n\t\t\treturn false;\n\t\t}", "@Test\n public void testTokenEndPointNoParams() throws Exception {\n refreshRequestAndResponse();\n request.setRequestURI(\"/v2/token\");\n request.setMethod(\"POST\");\n handlerAdapter.handle(request, response, controller);\n logger.info(\"testTokenEndPointNoParams() => \" + response.getContentAsString());\n \n assertTrue(response.getContentAsString().contains(ERR_RESPONSE));\n assertTrue( response.getStatus() == HttpServletResponse.SC_BAD_REQUEST ||\n response.getStatus() == HttpServletResponse.SC_UNAUTHORIZED );\n }", "boolean isSecretValid();", "protected void performGenericAuthorizationEndpointErrorResponseValidation() {\n\t\tcallAndContinueOnFailure(CheckStateInAuthorizationResponse.class, ConditionResult.FAILURE);\n\t\t// as https://tools.ietf.org/html/draft-ietf-oauth-iss-auth-resp is still a draft we only warn if the value is wrong,\n\t\t// and do not require it to be present.\n\t\tcallAndContinueOnFailure(ValidateIssInAuthorizationResponse.class, ConditionResult.WARNING, \"OAuth2-iss-2\");\n\t\tcallAndContinueOnFailure(EnsureErrorFromAuthorizationEndpointResponse.class, ConditionResult.FAILURE, \"OIDCC-3.1.2.6\");\n\t\tcallAndContinueOnFailure(RejectAuthCodeInAuthorizationEndpointResponse.class, ConditionResult.FAILURE, \"OIDCC-3.1.2.6\");\n\t\tcallAndContinueOnFailure(CheckForUnexpectedParametersInErrorResponseFromAuthorizationEndpoint.class, ConditionResult.WARNING, \"OIDCC-3.1.2.6\");\n\t\tcallAndContinueOnFailure(CheckErrorDescriptionFromAuthorizationEndpointResponseErrorContainsCRLFTAB.class, ConditionResult.WARNING, \"RFC6749-4.1.2.1\");\n\t\tcallAndContinueOnFailure(ValidateErrorDescriptionFromAuthorizationEndpointResponseError.class, ConditionResult.FAILURE,\"RFC6749-4.1.2.1\");\n\t\tcallAndContinueOnFailure(ValidateErrorUriFromAuthorizationEndpointResponseError.class, ConditionResult.FAILURE,\"RFC6749-4.1.2.1\");\n\t}", "private boolean checkNonce(BasicOCSPResp basicResponse) throws OCSPException\n {\n Extension nonceExt = basicResponse.getExtension(OCSPObjectIdentifiers.id_pkix_ocsp_nonce);\n if (nonceExt != null)\n {\n DEROctetString responseNonceString = (DEROctetString) nonceExt.getExtnValue();\n if (!responseNonceString.equals(encodedNonce))\n {\n throw new OCSPException(\"Different nonce found in response!\");\n }\n else\n {\n LOG.info(\"Nonce is good\");\n return true;\n }\n }\n // https://tools.ietf.org/html/rfc5019\n // Clients that opt to include a nonce in the\n // request SHOULD NOT reject a corresponding OCSPResponse solely on the\n // basis of the nonexistent expected nonce, but MUST fall back to\n // validating the OCSPResponse based on time.\n return false;\n }", "boolean isValid(String jwt);", "@RequestMapping(value = \"\", method = RequestMethod.GET)\n\tpublic void validateToken(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tString signature = request.getParameter(\"signature\");\n\t\tSystem.out.println(\"signature: \" + signature);\n\t\tString timestamp = request.getParameter(\"timestamp\");\n\t\tSystem.out.println(\"timestamp: \" + timestamp);\n\t\tString nonce = request.getParameter(\"nonce\");\n\t\tSystem.out.println(\"nonce: \" + nonce);\n\t\tString echostr = request.getParameter(\"echostr\");\n\t\tSystem.out.println(\"echostr: \" + echostr);\n\t\tList<String> params = new ArrayList<String>();\n\t\tparams.add(TOKEN);\n\t\tparams.add(timestamp);\n\t\tparams.add(nonce);\n\n\t\tCollections.sort(params, new Comparator<String>() {\n\t\t\tpublic int compare(String o1, String o2) {\n\t\t\t\treturn o1.compareTo(o2);\n\t\t\t}\n\t\t});\n\t\tString temp = SHA1.encode(params.get(0) + params.get(1) + params.get(2));\n\t\tif (temp.equals(signature)) {\n\t\t\tresponse.getWriter().write(echostr);\n\t\t}\n\t}", "@Test\n public void testValidToken() {\n try {\n int coachId = authBO.getUserIdAndValidateToken(\"thisisaworkingtoken\");\n Assert.assertTrue(coachId == 1);\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }", "public static boolean validateRequest(BaseReq req, String fnAddr, String action, BaseRes output) {\r\n String token = req.getToken();\r\n Date now = new Date();\r\n boolean authorized = false;\r\n if (output == null) {\r\n output = new BaseRes();\r\n output.setResponseDateTime(toXmlGregorianCalendar(now));\r\n }\r\n output.setOriginalClientReq(extractHeader(req));\r\n try {\r\n if ((token == null) || (token.isEmpty())) {\r\n throw new PCMException(\"Token is require for this request\", Constant.STATUS_CODE.ERR_USER_TOKEN_REQUIRED);\r\n }\r\n List<User> t = GenericHql.INSTANCE.query(\"from User where token=:token\", \"token\", token);\r\n if (t.isEmpty()) {\r\n throw new PCMException(\"Token is not valid\", Constant.STATUS_CODE.ERR_USER_TOKEN_INVALID);\r\n }\r\n User ut = (User) t.get(0);\r\n if (now.getTime() - ut.getLastactive().getTime() > Configuration.getInt(Constant.CONFIG_KEY.PCM_TOKEN_TTL) * 60000) {\r\n throw new PCMException(\"Token for this request is expired\", Constant.STATUS_CODE.ERR_USER_TOKEN_EXPIRE);\r\n }\r\n ut.setLastactive(now);\r\n\r\n HibernateUtil.beginTransaction();\r\n HibernateUtil.currentSession().save(ut);\r\n HibernateUtil.commit();\r\n\r\n List<VUserpermission> fl = GenericHql.INSTANCE.query(\"from VUserpermission WHERE userid=:userid\", \"userid\", ut.getUserid());\r\n if (!fl.isEmpty()) {\r\n for (VUserpermission f : fl) {\r\n if ((f.getId().getAddress().equalsIgnoreCase(fnAddr)) && (f.getId().getOperation().equalsIgnoreCase(action))) {\r\n authorized = true;\r\n }\r\n }\r\n }\r\n if (!authorized) {\r\n throw new PCMException(\"Unauthorized action\", Constant.STATUS_CODE.ERR_UNAUTHORIZED_ACTION);\r\n }\r\n } catch (PCMException pe) {\r\n handleException(pe, output);\r\n return false;\r\n } catch (Exception e) {\r\n HibernateUtil.rollback();\r\n handleException(e, output);\r\n return false;\r\n }\r\n output.setStatus(Constant.STATUS_CODE.OK);\r\n return true;\r\n }", "@POST\n\t @Produces(\"application/json\")\n\t @Path(\"/validateToken\")\n\t public Response validateToken(@HeaderParam(\"Authorization\") String token){\n\t\t String result=\"\";\n\t\t String Role=\"Visitor\";\n\t\t boolean isValid=false;\n\t\t TokenFactory tokens= listBook.tokens;\n\t\t JSONObject jsonObject= new JSONObject(); \n\t\t System.out.println(token);\n\t\t JSONObject verifyToken =tokens.tokenConsume(token);\n\t\t if(verifyToken.length()>1){\n\t\t\t\t try {\n\t\t\t\t\tif(verifyToken.getInt(\"ID\")>0){\n\t\t\t\t\t\tisValid=true;\n\t\t\t\t\t\tHashMap<String,String> memberData = new HashMap<String,String>();\n\t\t\t\t\t\tmemberData.put(\"ID_Member\", verifyToken.getInt(\"ID\")+\"\");\n\t\t\t\t\t\tmemberData.put(\"Role\", verifyToken.getString(\"Role\")); \n\t\t\t\t\t\tif(retrieveMember(memberData).length()>0){\n\t\t\t\t\t\t\tRole=verifyToken.getString(\"Role\");\n\t\t\t\t\t\t}\n\t\t\t\t\t }\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t }\n\t\t\t \t\t\t \n\t\t\ttry {\n\t\t\t\tjsonObject.put(\"isValid\", isValid);\n\t\t\t\tjsonObject.put(\"Role\", Role);\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tresult=jsonObject+\"\";\n\t\t\treturn listBook.makeCORS(Response.status(200), result);\t\n \t }", "public Action<PaymentState, PaymentEvent> authAction(){\n return context -> {\n System.out.println(\"preAuth was called !!\");\n\n if(new Random().nextInt(10) < 5){\n System.out.println(\"Approved\");\n\n // Send an event to the state machine to APPROVED the auth request\n context.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.AUTH_APPROVED)\n .setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, context.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER))\n .build());\n } else {\n System.out.println(\"Declined No Credit !!\");\n\n // Send an event to the state machine to DECLINED the auth request, and add the\n context.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.AUTH_DECLINED)\n .setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, context.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER))\n .build());\n }\n };\n }", "ResponseEntity<?> verifyOtp(HttpServletRequest request, HttpServletResponse response);", "public interface IdValidation {\n\n /**\n * Method return validity of citizen id\n * @return true if algorithm checksum is equal to checksum of citizen id\n */\n boolean isValid();\n}", "@Test(expected = InvalidSAMLRequestException.class)\n\tpublic void testValidate2b() throws InvalidSAMLRequestException\n\t{\n\t\tIdentifierCache cache = createMock(IdentifierCache.class);\n\t\treplay(cache);\n\t\tSAMLRequestValidatorImpl validator = new SAMLRequestValidatorImpl(cache, 100);\n\t\t\n\t\tRequestAbstractType request = new AuthnRequest();\n\t\trequest.setID(\"1234\");\n\t\t\n\t\t/* GMT timezone */\n\t\tSimpleTimeZone gmt = new SimpleTimeZone(0, \"UTC\");\n\n\t\t/* GregorianCalendar with the GMT time zone */\n\t\tGregorianCalendar calendar = new GregorianCalendar(gmt);\n\t\tcalendar.add(GregorianCalendar.MINUTE, 10);\n\t\tXMLGregorianCalendar xmlCalendar = new XMLGregorianCalendarImpl(calendar);\n\t\t\n\t\trequest.setIssueInstant(xmlCalendar);\n\t\t\n\t\tvalidator.validate(request);\n\t\tverify(cache);\n\t}", "@Test\n public void identifierTest() {\n assertEquals(\"ident1\", authResponse.getIdentifier());\n }", "int validResponsableAuthentification(Responsable r, String password) throws NoSuchAlgorithmException;", "@Then(\"^Validate that response contains correct information$\")\n public void validateThatResponseContainsCorrectInformation() {\n id = myResponse.then().extract().path(\"id\").toString();\n System.out.println(\"Wishlist ID is: \" + id);\n }", "private static String getStateInput() {\n\t\treturn getQuery(\"Valid State\");\n\t}", "@Test(expected = InvalidSAMLRequestException.class)\n\tpublic void testValidate2a() throws InvalidSAMLRequestException\n\t{\n\t\tIdentifierCache cache = createMock(IdentifierCache.class);\n\t\treplay(cache);\n\t\tSAMLRequestValidatorImpl validator = new SAMLRequestValidatorImpl(cache, 100);\n\t\t\n\t\tRequestAbstractType request = new AuthnRequest();\n\t\trequest.setID(\"1234\");\n\t\trequest.setIssueInstant(null);\n\t\t\n\t\tvalidator.validate(request);\n\t\tverify(cache);\n\t}", "@Given(\"^an invalid or missing token and making a POST request to account_ID_preferences then it should return a (\\\\d+) and an empty body$\")\n\tpublic void an_invalid_or_missing_token_and_making_a_POST_request_to_account_ID_preferences_then_it_should_return_a_and_an_empty_body(int arg1) throws Throwable {\n\t PostPref.Post_account_id_preferences_Unauthorised();\n\t}", "private void validateSecurityContextTokenId(String expectedSctId, Packet packet) throws RmSecurityException {\n String actualSctId = validator.getSecurityContextTokenId(packet);\n boolean isValid = Objects.equals(expectedSctId, actualSctId);\n\n if (!isValid) {\n throw new RmSecurityException(LocalizationMessages.WSRM_1131_SECURITY_TOKEN_AUTHORIZATION_ERROR(actualSctId, expectedSctId));\n }\n }", "public boolean isAuthorizationStale(String paramString) {\n/* 275 */ HeaderParser headerParser = new HeaderParser(paramString);\n/* 276 */ String str1 = headerParser.findValue(\"stale\");\n/* 277 */ if (str1 == null || !str1.equals(\"true\"))\n/* 278 */ return false; \n/* 279 */ String str2 = headerParser.findValue(\"nonce\");\n/* 280 */ if (str2 == null || \"\".equals(str2)) {\n/* 281 */ return false;\n/* */ }\n/* 283 */ this.params.setNonce(str2);\n/* 284 */ return true;\n/* */ }", "@Override\r\n\tpublic void testInvalidId() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.testInvalidId();\r\n\t\t}\r\n\t}", "public static boolean ValidateIDissuerKey(String issuer,String kid,HttpServletResponse resp) throws IOException, InterruptedException\n\t{\n\t\tString IDTokURL=issuer;\n\t\tString publickey=kid;\n\t\t\n\t\t//First Validate the issuer and verifed the kid(public key) in that issuer URL\n\t\tHttpRequest IDTokKeyVerified = HttpRequest.newBuilder()\n .uri(URI.create(IDTokURL))\n .POST(BodyPublishers.ofString(\"\"))\n .header(\"client_id\",\"mano.lmfsktkmyj\")\n .header(\"public_key\",publickey)\n .header(\"Content-Type\", \"application/json\")\n .build();\n\t\tHttpClient client = HttpClient.newHttpClient();\n // Send HTTP request\n\t\t\tHttpResponse<String> tokenResponse;\n\t\t\t\ttokenResponse = client.send(IDTokKeyVerified,\n\t\t\t\t HttpResponse.BodyHandlers.ofString());\n\t\t\t\t\n\t\t//Enclosed the response in map datastructure ,it is easy to parse the response\n\t\tMap<String,Object> validateissuer_resp=processJSON(tokenResponse.body().replace(\"{\", \"\").replace(\"}\",\"\"));\n\t\tif(validateissuer_resp.get(\"verified\").equals(\"true\"))\n\t\treturn true;\n\t\telse\n\t\treturn false;\n\t}", "public void validate(String id, String pw) throws RemoteException;", "@Test\n public void testFailureNotParByParRequiredCilent() throws Exception {\n // create client dynamically\n String clientId = createClientDynamically(generateSuffixedName(CLIENT_NAME), (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.TRUE);\n });\n OIDCClientRepresentation oidcCRep = getClientDynamically(clientId);\n String clientSecret = oidcCRep.getClientSecret();\n assertEquals(Boolean.TRUE, oidcCRep.getRequirePushedAuthorizationRequests());\n\n oauth.clientId(clientId);\n oauth.openLoginForm();\n assertEquals(OAuthErrorException.INVALID_REQUEST, oauth.getCurrentQuery().get(OAuth2Constants.ERROR));\n assertEquals(\"Pushed Authorization Request is only allowed.\", oauth.getCurrentQuery().get(OAuth2Constants.ERROR_DESCRIPTION));\n\n updateClientDynamically(clientId, (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.FALSE);\n });\n\n OAuthClient.AuthorizationEndpointResponse loginResponse = oauth.doLogin(TEST_USER_NAME, TEST_USER_PASSWORD);\n String code = loginResponse.getCode();\n\n // Token Request\n OAuthClient.AccessTokenResponse res = oauth.doAccessTokenRequest(code, clientSecret);\n assertEquals(200, res.getStatusCode());\n }", "abstract public boolean checkAuth(String userId) throws IOException;", "@Override\n protected void validateResponseTypeParameter(String responseType, AuthorizationEndpointRequest request) {\n }", "@Test\n public void testTokenEndPointAnonymousTokenRequestWithInvalidScope() throws Exception {\n String callback = \"Backplane.callback\";\n \n refreshRequestAndResponse();\n \n request.setRequestURI(\"/v2/token\");\n request.setMethod(\"GET\");\n request.setParameter(\"grant_type\", \"client_credentials\");\n setOAuthBasicAuthentication(request, \"anonymous\", \"\");\n request.setParameter(\"scope\",\"channel:notmychannel\");\n request.setParameter(\"callback\", callback);\n \n handlerAdapter.handle(request, response, controller);\n logger.info(\"testTokenEndPointAnonymousTokenRequestWithInvalidScope() => \" + response.getContentAsString());\n assertTrue(response.getContentAsString().contains(ERR_RESPONSE));\n \n refreshRequestAndResponse();\n \n request.setRequestURI(\"/v2/token\");\n request.setMethod(\"GET\");\n request.setParameter(\"grant_type\", \"client_credentials\");\n setOAuthBasicAuthentication(request, \"anonymous\", \"\");\n request.setParameter(\"scope\",\"bus:notmybus\");\n request.setParameter(\"callback\", callback);\n \n handlerAdapter.handle(request, response, controller);\n logger.info(\"testTokenEndPointAnonymousTokenRequestWithInvalidScope() => \" + response.getContentAsString());\n assertTrue(response.getContentAsString().contains(ERR_RESPONSE));\n }", "private void validaciónDeRespuesta()\n\t{\n\t\ttry {\n\n\t\t\tString valorCifrado = in.readLine();\n\t\t\tString hmacCifrado = in.readLine();\n\t\t\tbyte[] valorDecifrado = decriptadoSimetrico(parseBase64Binary(valorCifrado), llaveSecreta, algSimetrica);\n\t\t\tString elString = printBase64Binary(valorDecifrado);\n\t\t\tbyte[] elByte = parseBase64Binary(elString);\n\n\t\t\tSystem.out.println( \"Valor decifrado: \"+elString + \"$\");\n\n\t\t\tbyte[] hmacDescifrado = decriptarAsimetrico(parseBase64Binary(hmacCifrado), llavePublica, algAsimetrica);\n\n\t\t\tString hmacRecibido =printBase64Binary(hmacDescifrado);\n\t\t\tbyte[] hmac = hash(elByte, llaveSecreta, HMACSHA512);\n\t\t\tString hmacGenerado = printBase64Binary(hmac);\n\n\n\n\n\t\t\tboolean x= hmacRecibido.equals(hmacGenerado);\n\t\t\tif(x!=true)\n\t\t\t{\n\t\t\t\tout.println(ERROR);\n\t\t\t\tSystem.out.println(\"Error, no es el mismo HMAC\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Se confirmo que el mensaje recibido proviene del servidor mediante el HMAC\");\n\t\t\t\tout.println(OK);\n\t\t\t}\n\n\n\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error con el hash\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void checkAuthSessionId() {\n val auth = config.getString(\"authSessionId\");\n\n checkArgument(auth.length() > 10, \"auth string (sessionId) length is less than or equal to 10!\");\n }", "@ApiOperation(\n value = \"${swagger.operations.password-validate-token.description}\",\n response = String.class\n )\n @ApiResponses({\n @ApiResponse(code = 500, message = \"Internal Server Error / No message available\"),\n @ApiResponse(code = 400, message = \"Token is invalid or expired or missing correlation ID\"),\n @ApiResponse(code = 204, message = \"Token is valid\")\n })\n @ApiImplicitParams({\n @ApiImplicitParam(name = X_CORRELATION_ID_HEADER,\n required = true,\n value = \"UUID formatted string to track the request through the enquiries stack\",\n paramType = \"header\"),\n })\n @PostMapping(PasswordController.VALIDATE_TOKEN_PATH)\n ResponseEntity<Void> validateToken(@RequestBody ValidateTokenRequest validateTokenRequest);", "private void getAUTH_REQUEST() throws Exception {\n\t\t\n\t\tboolean status = true;\n\t\tboolean status2 = false;\n\t\tString msg = \"\";\n\t\t\n\t\t//File filePK = new File(\"identity\");\n\t\n\t\ttry {\n\t\t\t\n\t\t\tmsg = br.readLine();\n\t\t\tGetTimestamp(\"Received Authorization Request from Client: \" + msg);\n\t\t\t\n\t\t\tJSONObject REQUEST = (JSONObject) parser.parse(msg);\n\t String identity = REQUEST.get(\"identity\").toString();\n\t\t\t\n\t\t\t\n\t if((identity.contains(\"aaron@krusty\"))) {\n\n\t \tGetTimestamp(\"Authorization Request from Client is approved: \");\n\n\t \tGetTimestamp(\"Client Publickey is stored: \" ) ;\n\n\t \tString tosend = encrypt1(getSharedKey(), getClientPublicKey());\n\n\t \tGetTimestamp(\"Server sharedkey is being encrypted with Client's publickey to be sent: \") ;\n\n\t \tJSONObject RESPONSE = new JSONObject();\n\t \tRESPONSE.put(\"command\",\"AUTH_RESPONSE\");\n\t \tRESPONSE.put(\"AES128\", tosend);\n\t \tRESPONSE.put(\"status\", status);\n\t \tRESPONSE.put(\"message\", \"public key found\");\n\n\t \tStringWriter out = new StringWriter();\n\t \tRESPONSE.writeJSONString(out);\n\n\t \tString AUTH_RESPONSE = out.toString();\n\t \tSystem.out.println(AUTH_RESPONSE);\n\n\t \tGetTimestamp(\"Sending Authorization Response to Client: \");\n\n\t \tpw.println(AUTH_RESPONSE);\n\t \tpw.flush();\n\n\n\n\t }\n\t else {\n\n\t \tSystem.out.println(\"Client \" + REQUEST.get(\"identity\") + \" has been rejected\");\n\n\t \tJSONObject RESPONSE = new JSONObject();\n\t \tRESPONSE.put(\"command\",\"AUTH_RESPONSE\");\n\t \tRESPONSE.put(\"status\", status2);\n\t \tRESPONSE.put(\"message\", \"public key not found\");\n\n\t \tStringWriter out = new StringWriter();\n\t \tRESPONSE.writeJSONString(out);\n\n\t \tString AUTH_RESPONSE = out.toString();\n\t \tSystem.out.println(AUTH_RESPONSE);\n\n\t \tpw.println(AUTH_RESPONSE);\n\t \tpw.flush();\n\n\t \tcloseConnection();\n\t }\n\t\t\t\t\n\t\t\t\n\t\t} catch (IOException ex) {\n\t\t\tLogger.getLogger(ServerTCP.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\t\tif (msg.equalsIgnoreCase(\"bye\")) {\n\t\t\tSystem.out.println(\"Client has signed out!\");\n\t\t\tcloseConnection();\n\n\t\t} else {\t\n\t\t\tgetMessage();\n\t\t}\n\t}", "private AuthenticatorFlowStatus initiateAuthRequest(HttpServletResponse response, AuthenticationContext context,\n String errorMessage)\n throws AuthenticationFailedException {\n\n // Find the authenticated user.\n AuthenticatedUser authenticatedUser = getUser(context);\n\n if (authenticatedUser == null) {\n throw new AuthenticationFailedException(\"Authentication failed!. \" +\n \"Cannot proceed further without identifying the user\");\n }\n\n String tenantDomain = authenticatedUser.getTenantDomain();\n String username = authenticatedUser.getAuthenticatedSubjectIdentifier();\n String tenantAwareUsername = MultitenantUtils.getTenantAwareUsername(username);\n\n /*\n In here we do the redirection to the termsAndConditionForm.jsp page.\n If you need to do any api calls and pass any information to the custom page you can do it here and pass\n them as query parameters or else best way is to do the api call using a javascript function within the\n custom page.\n */\n\n try {\n String loginPage = ConfigurationFacade.getInstance().getAuthenticationEndpointURL().\n replace(\"login.do\", \"termsAndConditionForm.jsp\");\n String queryParams = FrameworkUtils.getQueryStringWithFrameworkContextId(context.getQueryParams(),\n context.getCallerSessionKey(), context.getContextIdentifier());\n String retryParam = \"\";\n if (context.isRetrying()) {\n retryParam = \"&authFailure=true\" +\n \"&authFailureMsg=\" + URLEncoder.encode(errorMessage, StandardCharsets.UTF_8.name());\n }\n String fullyQualifiedUsername = UserCoreUtil.addTenantDomainToEntry(tenantAwareUsername,\n tenantDomain);\n String encodedUrl =\n (loginPage + (\"?\" + queryParams\n + \"&username=\" + URLEncoder.encode(fullyQualifiedUsername, StandardCharsets.UTF_8.name())))\n + \"&authenticators=\" + getName() + \":\" + AUTHENTICATOR_TYPE\n + retryParam;\n response.sendRedirect(encodedUrl);\n } catch (IOException e) {\n throw new AuthenticationFailedException(e.getMessage(), e);\n }\n context.setCurrentAuthenticator(getName());\n context.setRetrying(false);\n return AuthenticatorFlowStatus.INCOMPLETE;\n\n }", "private OAuth2ClientValidationResponseDTO validateClient(String clientId, String callbackURL)\r\n/* */ {\r\n/* 548 */ return EndpointUtil.getOAuth2Service().validateClientInfo(clientId, callbackURL);\r\n/* */ }", "@Override\n protected void processAuthenticationResponse(HttpServletRequest request, HttpServletResponse response,\n AuthenticationContext context) throws AuthenticationFailedException {\n Map<String, String> authenticatorProperties = context.getAuthenticatorProperties();\n String apiKey = authenticatorProperties.get(Token2Constants.APIKEY);\n String userToken = request.getParameter(Token2Constants.CODE);\n String id = getUserId(context);\n String json = validateToken(Token2Constants.TOKEN2_VALIDATE_ENDPOINT, apiKey, id, Token2Constants.JSON_FORMAT,\n userToken);\n Map<String, Object> userClaims;\n userClaims = JSONUtils.parseJSON(json);\n if (userClaims != null) {\n String validation = String.valueOf(userClaims.get(Token2Constants.VALIDATION));\n if (validation.equals(\"true\")) {\n context.setSubject(AuthenticatedUser\n .createLocalAuthenticatedUserFromSubjectIdentifier(\"an authorised user\"));\n } else {\n throw new AuthenticationFailedException(\"Given hardware token has been expired or is not a valid token\");\n }\n } else {\n throw new AuthenticationFailedException(\"UserClaim object is null\");\n }\n }", "boolean hasPassCardsResponse();", "@GET\n @Path(\"validate\")\n @Produces({MediaType.APPLICATION_JSON + \";charset=utf-8\"})\n public Response validateToken() {\n CONSOLE.log(Level.INFO, \"Token validado con exito. \");\n return Response.ok(new ResponseDTO(0, \"Token validado con éxito\")).build();\n }", "public boolean validate(String securityToken, RequestMetadata requestMetadata);", "public CredentialValidationResult validate(UsernamePasswordCredential unpc){\r\n \r\n \r\n return null;\r\n}", "void unsetIdVerificationResponseData();", "@Then(\"^Validate customer id is created$\")\r\n\tpublic void validate_customer_id_is_created() throws Throwable {\n\t\tAssert.assertTrue(response.jsonPath().get(\"id\").equals(new PropertFileReader().getTempData(\"custId\")));\r\n\t\t\r\n\t}", "@Test\n public void stateFromInitWithAuthFailToError() {\n // given a newly created ticket in initial state\n CreateTicketVO createTicketVO = CreateTicketVO.newBuilder()\n .ticketIssuingType(TicketIssuingType.ONE_TICKET_FOR_ALL_PRODUCTS)\n .products(this.products)\n .paymentType(PaymentType.NO_PAYMENT)\n .account(this.account).build();\n TicketOrder ticketOrder = this.ticketFactory.createTickets(createTicketVO);\n Ticket ticket = ticketOrder.getBillingTicket();\n assertTicketInState(ticket, TicketStateType.TICKET_ORDER_REQUEST_RECEIVED, TransactionStateType.TRANSACTION_NULL, 1);\n\n // when/then ticket moves from state [1,0] -> [8,0] -> [8,1] -> [8,16] -> [16,16]\n // [1,0] -> [8,0]\n ticket.nextStateOk();\n assertTicketInState(ticket, TicketStateType.TICKET_ORDERED, TransactionStateType.TRANSACTION_NULL, 2);\n\n // [8,0] -> [8,1]\n ticket.nextStateOk();\n assertTicketInState(ticket, TicketStateType.TICKET_ORDERED, TransactionStateType.TRANSACTION_INITIALIZED, 3);\n\n // [8,1] -> [8,16]\n ticket.nextStateTransactionError(100);\n assertTicketInState(ticket, TicketStateType.TICKET_ORDERED, TransactionStateType.TRANSACTION_ERROR, 4);\n\n // [8,16] -> [16,16]\n ticket.nextStateTransactionError(200);\n assertTicketInState(ticket, TicketStateType.TICKET_ERROR, TransactionStateType.TRANSACTION_ERROR, 5);\n }", "public AuthenticationResult getToken(String authorizationUrl)\n throws IOException, AuthenticationException {\n\n if (StringExtensions.isNullOrBlank(authorizationUrl)) {\n throw new IllegalArgumentException(\"authorizationUrl\");\n }\n\n // Success\n HashMap<String, String> parameters = StringExtensions.getUrlParameters(authorizationUrl);\n String encodedState = parameters.get(\"state\");\n String state = decodeProtocolState(encodedState);\n\n if (!StringExtensions.isNullOrBlank(state)) {\n\n // We have encoded state at the end of the url\n Uri stateUri = Uri.parse(\"http://state/path?\" + state);\n String authorizationUri = stateUri.getQueryParameter(\"a\");\n String resource = stateUri.getQueryParameter(\"r\");\n\n if (!StringExtensions.isNullOrBlank(authorizationUri)\n && !StringExtensions.isNullOrBlank(resource)\n && resource.equalsIgnoreCase(mRequest.getResource())) {\n\n AuthenticationResult result = processUIResponseParams(parameters);\n\n // Check if we have code\n if (result != null && result.getCode() != null && !result.getCode().isEmpty()) {\n\n // Get token and use external callback to set result\n final AuthenticationResult tokenResult = getTokenForCode(result.getCode());\n if (!StringExtensions.isNullOrBlank(result.getAuthority())) {\n tokenResult.setAuthority(result.getAuthority());\n } else {\n tokenResult.setAuthority(mRequest.getAuthority());\n }\n return tokenResult;\n }\n\n return result;\n } else {\n throw new AuthenticationException(ADALError.AUTH_FAILED_BAD_STATE);\n }\n } else {\n // The response from the server had no state\n throw new AuthenticationException(ADALError.AUTH_FAILED_NO_STATE);\n }\n }", "public boolean validateResponse(Response response) {\n return response.isSuccessful();\n }", "boolean hasLoginResponse();", "@Test\n public void destiny2AwaGetActionTokenTest() {\n String correlationId = null;\n InlineResponse20059 response = api.destiny2AwaGetActionToken(correlationId);\n\n // TODO: test validations\n }", "@Test\n public void destiny2AwaProvideAuthorizationResultTest() {\n InlineResponse20019 response = api.destiny2AwaProvideAuthorizationResult();\n\n // TODO: test validations\n }", "boolean isValid()\n {\n return isRequest() && isResponse();\n }", "GetToken.Req getGetTokenReq();", "@Test(expected = InvalidSAMLRequestException.class)\n\tpublic void testValidate2c() throws InvalidSAMLRequestException\n\t{\n\t\tIdentifierCache cache = createMock(IdentifierCache.class);\n\t\treplay(cache);\n\t\tSAMLRequestValidatorImpl validator = new SAMLRequestValidatorImpl(cache, 100);\n\t\t\n\t\tRequestAbstractType request = new AuthnRequest();\n\t\trequest.setID(\"1234\");\n\t\t\n\t\t/* GMT timezone */\n\t\tSimpleTimeZone gmt = new SimpleTimeZone(0, \"UTC\");\n\n\t\t/* GregorianCalendar with the GMT time zone */\n\t\tGregorianCalendar calendar = new GregorianCalendar(gmt);\n\t\tXMLGregorianCalendar xmlCalendar = new XMLGregorianCalendarImpl(calendar);\n\t\t\n\t\trequest.setIssueInstant(xmlCalendar);\n\t\t\n\t\tNameIDType issuer = new NameIDType();\n\t\tissuer.setValue(\"\");\n\t\trequest.setIssuer(issuer);\n\t\t\n\t\tvalidator.validate(request);\n\t\tverify(cache);\n\t}", "public SimpleResponse NOT_AUTHORIZED() {\n this.state = NOT_AUTHORIZED;\n return ERROR_CUSTOM();\n }", "@UpnpAction(out = {@UpnpOutputArgument(name = \"Result\", stateVariable = \"A_ARG_TYPE_Result\")})\n/* */ public int isValidated(@UpnpInputArgument(name = \"DeviceID\", stateVariable = \"A_ARG_TYPE_DeviceID\") String deviceID) {\n/* 128 */ return 1;\n/* */ }", "@Override\n\tpublic Response validateToken(\n\t\t\tString user,\n\t\t\tString token,\n\t\t\tString client_id,//client_id from the app calling the API\n\t\t\tString url,\n\t\t\tString method){\n\n\t\ttry{\t\t\t\n\t\t\tOA2Response result = sessionHandler.validateSession(client_id, user, token, url, method);\n\t\t\treturn Response.ok(result).build();\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\toa2logger.logError(httpRequest, Level.SEVERE, e.getLocalizedMessage());\n\t\t\treturn Response.status(Status.INTERNAL_SERVER_ERROR).\n\t\t\t\t\tentity(new OA2Response(500, \"Internal server Error.\"))\n\t\t\t\t\t.build();\n\t\t}\n\t}", "boolean isSetRequestID();", "@Test\n public void testIncorrectId(){\n UserRegisterKYC idTooLong = new UserRegisterKYC(\"hello\",\"S12345678B\",\"26/02/1995\",\"738583\");\n int requestResponse = idTooLong.sendRegisterRequest();\n assertEquals(400, requestResponse);\n\n UserRegisterKYC nonAlphanumId = new UserRegisterKYC(\"hello\",\"S12345!8B\",\"26/02/1995\",\"738583\");\n requestResponse = nonAlphanumId.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC invalidPrefixId = new UserRegisterKYC(\"hello\",\"A\"+validId3.substring(1),\"26/02/1995\",\"738583\");\n requestResponse = invalidPrefixId.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC alphaInMiddleId = new UserRegisterKYC(\"hello\",\"S1234A68B\",\"26/02/1995\",\"738583\");\n requestResponse = alphaInMiddleId.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC idTooShort = new UserRegisterKYC(\"hello\",\"S123678B\",\"26/02/1995\",\"738583\");\n requestResponse = idTooShort.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC invalidChecksum = new UserRegisterKYC(\"hello\",\"S1234578B\",\"26/02/1995\",\"738583\");\n requestResponse = invalidChecksum.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n }", "@Test\n\tpublic void testValidatePrivacyState() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validatePrivacyState(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validatePrivacyState(\"Invalid value.\");\n\t\t\t\tfail(\"The privacy state was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\tfor(SurveyResponse.PrivacyState privacyState: SurveyResponse.PrivacyState.values()) {\n\t\t\t\tAssert.assertEquals(privacyState, SurveyResponseValidators.validatePrivacyState(privacyState.toString()));\n\t\t\t}\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "public static void buildAuthorizeURI(HttpServletRequest req,HttpServletResponse resp) throws IOException\n\t{\n\t\tHttpSession session=req.getSession();\n\t\t//generate random string for the state param in authorize query\n\t String state=randomStringGenerator(6);\n\t \n\t //generate random string for the nonce parameters in authorize query(Implicit flow/Hybrid flow)\n\t String nonce=randomStringGenerator(6);\n\t String response_type=authPickFlow(5);\n\t //store the state value as key and response_type as value in session and cross verified the state value in response to avoid CSRF attack\n\t //parallely process the future request based on response_type by passing the state parameter from the response and get the required response_type\n\t session.setAttribute(state, response_type);\n\t //It is on the session to verified the ID Token(Implict flow,Hybrid Flow)\n\t session.setAttribute(nonce,nonce);\n\t // System.out.println(state+\":\"+(String) session.getAttribute(state));\n\t //Build the URI with clientID,scope,state,redirectURI,response type\n\t\tString url=\"http://localhost:8080/OPENID/msOIDC/authorize?client_id=mano.lmfsktkmyj&scope=openid profile&state=\"+state+\"&redirect_uri=http://localhost:8080/OPENID/msPhoneBook/response1&response_type=\"+response_type+\"&nonce=\"+nonce;\n\t\t//Redirect the browser to msOIDC authorization endpoint\n\t\tresp.sendRedirect(url);\n\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.IdVerificationResponseData getIdVerificationResponseData();", "@Test\n public void smartIdInvalidFormat() throws Exception {\n String errorMessage = authenticateWithSmartIdInvalidInputPollError(\"12akl2\", 2000);\n assertEquals(\"Isikukood on ebakorrektses formaadis.Intsidendi number:\", errorMessage);\n }", "protected boolean statusIs(String state)\n { return call_state.equals(state); \n }", "void setIdVerificationResponseData(ch.crif_online.www.webservices.crifsoapservice.v1_00.IdVerificationResponseData idVerificationResponseData);", "@Test\n public void insertNonParsableRequestId() throws ServletException, IOException {\n final String finalDate = \"2017-12-03\";\n final String requestId = \"a\";\n initialize(finalDate, requestId);\n servlet.doPost(request, response);\n assertEquals(\"Invalid request id!\",\n ((Map<String, Object>) request.getAttribute(\"viewModel\")).get(\"errorMessage\"));\n }", "@Test\n public void authorisedTest() {\n assertTrue(authResponse.isAuthorised());\n }", "@Test\r\n\tpublic void TestvalidateTokenWithuserId() {\r\n\t\tlog.info(env.getProperty(\"log.start\"));\r\n\t\tudetails = new User(\"admin\", \"admin\", new ArrayList<>());\r\n\t\tString generateToken = jwtutil.generateToken(udetails);\r\n\t\tBoolean validateToken = jwtutil.validateToken(generateToken, udetails);\r\n\t\tassertEquals(true, validateToken);\r\n\t\tlog.info(env.getProperty(\"log.end\"));\r\n\r\n\t}", "public void receiveResultcheckRateIdPnrValid(\n com.speed.esalDemo.generation.OrderServiceImplServiceStub.CheckRateIdPnrValidResponseE result\n ) {\n }", "Binder getToken(Binder data) {\n byte[] signedAnswer = data.getBinaryOrThrow(\"data\");\n try {\n if (publicKey.verify(signedAnswer, data.getBinaryOrThrow(\"signature\"), HashType.SHA512)) {\n Binder params = Boss.unpack(signedAnswer);\n // now we can check the results\n if (!Arrays.equals(params.getBinaryOrThrow(\"server_nonce\"), serverNonce))\n addError(Errors.BAD_VALUE, \"server_nonce\", \"does not match\");\n else {\n // Nonce is ok, we can return session token\n createSessionKey();\n Binder result = Binder.fromKeysValues(\n \"client_nonce\", params.getBinaryOrThrow(\"client_nonce\"),\n \"encrypted_token\", encryptedAnswer\n );\n\n version = Math.min(SERVER_VERSION, params.getInt(\"client_version\", 1));\n\n byte[] packed = Boss.pack(result);\n return Binder.fromKeysValues(\n \"data\", packed,\n \"signature\", myKey.sign(packed, HashType.SHA512)\n );\n }\n }\n } catch (Exception e) {\n addError(Errors.BAD_VALUE, \"signed_data\", \"wrong or tampered data block:\" + e.getMessage());\n }\n return null;\n }", "private static void verify(String code) throws IOException {\n URL obj = new URL(TOKEN_URL);\n HttpsURLConnection con = (HttpsURLConnection) obj.openConnection();\n\n String urlParameters = \"grant_type=authorization_code&code=\" + code;\n\n //add request header\n con.setRequestMethod(\"POST\");\n con.setRequestProperty(\"Authorization\", \"Basic \" + new String(Base64.getEncoder().encode((CLIENT_KEY + \":\" + CLIENT_SECRET).getBytes())));\n con.setRequestProperty(\"Content-Length\", String.valueOf(urlParameters.length()));\n con.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\n con.setDoOutput(true);\n con.setDoInput(true);\n\n DataOutputStream output = new DataOutputStream(con.getOutputStream());\n output.writeBytes(urlParameters);\n output.close();\n DataInputStream input = new DataInputStream(con.getInputStream());\n\n generateAuthObject(input);\n }", "public boolean hasCredentials(){\r\n return state;\r\n }", "@Override\n public boolean validateGrant(OAuthTokenReqMessageContext tokReqMsgCtx) throws IdentityOAuth2Exception {\n boolean isValid = false;\n\n try {\n // Logging the SAML token\n if (log.isDebugEnabled()) {\n log.debug(\"Received SAML assertion : \" +\n new String(Base64.decodeBase64(tokReqMsgCtx.getOauth2AccessTokenReqDTO().getAssertion()))\n );\n }\n\n XMLObject samlObject = Util.unmarshall(\n new String(Base64.decodeBase64(tokReqMsgCtx.getOauth2AccessTokenReqDTO().getAssertion()))\n );\n Assertion assertion = (Assertion) samlObject;\n // List<Assertion> assertions = assertion.getAssertions();\n\n// Assertion assertion = null;\n// if (assertions != null && assertions.size() > 0) {\n// assertion = assertions.get(0);\n// }\n\n if (assertion == null) {\n log.error(\"Assertion is null, cannot continue\");\n // throw new SAML2SSOAuthenticatorException(\"SAMLResponse does not contain Assertions.\");\n throw new Exception(\"Assertion is null, cannot continue\");\n }\n\n /**\n * Validating SAML request according to criteria specified in \"SAML 2.0 Bearer Assertion Profiles for\n * OAuth 2.0 - http://tools.ietf.org/html/draft-ietf-oauth-saml2-bearer-14\n */\n\n /**\n * The Assertion's <Issuer> element MUST contain a unique identifier for the entity that issued\n * the Assertion.\n */\n if ( (assertion.getIssuer() != null) && assertion.getIssuer().getValue().equals(\"\")) {\n log.error(\"Issuer is empty in the SAML assertion\");\n throw new Exception(\"Issuer is empty in the SAML assertion\");\n }\n\n /**\n * The Assertion MUST contain <Conditions> element with an <AudienceRestriction> element with an <Audience>\n * element containing a URI reference that identifies the authorization server, or the service provider\n * SAML entity of its controlling domain, as an intended audience. The token endpoint URL of the\n * authorization server MAY be used as an acceptable value for an <Audience> element. The authorization\n * server MUST verify that it is an intended audience for the Assertion.\n */\n Conditions conditions = assertion.getConditions();\n if (conditions != null) {\n List<AudienceRestriction> restrictions = conditions.getAudienceRestrictions();\n if (restrictions != null && restrictions.size() > 0) {\n AudienceRestriction ar = restrictions.get(0);\n\n // Where to get what SPs are configured for this IdP?\n for (Audience a : ar.getAudiences()) {\n String audienceURI = a.getAudienceURI();\n // TODO: figure out how to get the mapping there's an audience URI that matches IdP URI\n }\n } else {\n log.error(\"Cannot find any AudienceRestrictions in the Assertion\");\n throw new Exception(\"Cannot find any AudienceRestrictions in the Assertion\");\n }\n } else {\n log.error(\"Cannot find any Conditions in the Assertion\");\n throw new Exception(\"Cannot find any Conditions in the Assertion\");\n }\n\n /**\n * The Assertion MUST contain a <Subject> element. The subject MAY identify the resource owner for whom\n * the access token is being requested. For client authentication, the Subject MUST be the \"client_id\"\n * of the OAuth client. When using an Assertion as an authorization grant, the Subject SHOULD identify\n * an authorized accessor for whom the access token is being requested (typically the resource owner, or\n * an authorized delegate). Additional information identifying the subject/principal of the transaction\n * MAY be included in an <AttributeStatement>.\n */\n if (assertion.getSubject() != null) {\n // Get user the client_id belongs to\n String token_user = OAuth2Util.getAuthenticatedUsername(\n tokReqMsgCtx.getOauth2AccessTokenReqDTO().getClientId(),\n tokReqMsgCtx.getOauth2AccessTokenReqDTO().getClientSecret()\n );\n // User of client id should match user in subject\n if (!assertion.getSubject().getNameID().getValue().equals(token_user)) {\n log.error(\"NameID in Assertion doesn't match username the client id belongs to\");\n throw new Exception(\"NameID in Assertion doesn't match username the client id belongs to\");\n }\n } else {\n log.error(\"Cannot find a Subject in the Assertion\");\n throw new Exception(\"Cannot find a Subject in the Assertion\");\n }\n\n /**\n * The Assertion MUST have an expiry that limits the time window during which it can be used. The expiry\n * can be expressed either as the NotOnOrAfter attribute of the <Conditions> element or as the NotOnOrAfter\n * attribute of a suitable <SubjectConfirmationData> element.\n */\n boolean isNotOnOrAfterFound = false;\n DateTime notOnOrAfter = null;\n if (assertion.getSubject().getSubjectConfirmations() != null) {\n List<SubjectConfirmation> sc = assertion.getSubject().getSubjectConfirmations();\n for (SubjectConfirmation s : sc) {\n notOnOrAfter = s.getSubjectConfirmationData().getNotOnOrAfter();\n isNotOnOrAfterFound = true;\n }\n }\n if (!isNotOnOrAfterFound) {\n // We didn't find any NotOnOrAfter attributes in SubjectConfirmationData. Let's look at attributes in\n // the Conditions element\n if (assertion.getConditions() != null) {\n notOnOrAfter = assertion.getConditions().getNotOnOrAfter();\n isNotOnOrAfterFound = true;\n } else {\n // At this point there can be no NotOnOrAfter attributes, according to the spec description above\n // we can safely throw the error\n log.error(\"Didn't find any NotOnOrAfter attribute, must have an expiry time\");\n throw new Exception(\"Didn't find any NotOnOrAfter attribute, must have an expiry time\");\n }\n }\n\n /**\n * The <Subject> element MUST contain at least one <SubjectConfirmation> element that allows the\n * authorization server to confirm it as a Bearer Assertion. Such a <SubjectConfirmation> element MUST\n * have a Method attribute with a value of \"urn:oasis:names:tc:SAML:2.0:cm:bearer\". The\n * <SubjectConfirmation> element MUST contain a <SubjectConfirmationData> element, unless the Assertion\n * has a suitable NotOnOrAfter attribute on the <Conditions> element, in which case the\n * <SubjectConfirmationData> element MAY be omitted. When present, the <SubjectConfirmationData> element\n * MUST have a Recipient attribute with a value indicating the token endpoint URL of the authorization\n * server (or an acceptable alias). The authorization server MUST verify that the value of the Recipient\n * attribute matches the token endpoint URL (or an acceptable alias) to which the Assertion was delivered.\n * The <SubjectConfirmationData> element MUST have a NotOnOrAfter attribute that limits the window during\n * which the Assertion can be confirmed. The <SubjectConfirmationData> element MAY also contain an Address\n * attribute limiting the client address from which the Assertion can be delivered. Verification of the\n * Address is at the discretion of the authorization server.\n */\n if ((assertion.getSubject().getSubjectConfirmations() != null) &&\n (assertion.getSubject().getSubjectConfirmations().size() > 0)) {\n List<SubjectConfirmation> confirmations = assertion.getSubject().getSubjectConfirmations();\n boolean bearerFound = false;\n ArrayList<String> recipientURLS = new ArrayList<String>();\n for (SubjectConfirmation c : confirmations) {\n if (c.getSubjectConfirmationData() != null) {\n recipientURLS.add(c.getSubjectConfirmationData().getRecipient());\n }\n if (c.getMethod().equals(OAuth2Constants.OAUTH_SAML2_BEARER_METHOD)) {\n bearerFound = true;\n }\n }\n if (!bearerFound) {\n log.error(\"Failed to find a SubjectConfirmation with a Method attribute having : \" +\n OAuth2Constants.OAUTH_SAML2_BEARER_METHOD);\n throw new Exception(\"Failed to find a SubjectConfirmation with a Method attribute having : \" +\n OAuth2Constants.OAUTH_SAML2_BEARER_METHOD);\n }\n // TODO: Verify at least one recipientURLS matches token endpoint URL\n } else {\n log.error(\"No SubjectConfirmation exist in Assertion\");\n throw new Exception(\"No SubjectConfirmation exist in Assertion\");\n }\n\n /**\n * The authorization server MUST verify that the NotOnOrAfter instant has not passed, subject to allowable\n * clock skew between systems. An invalid NotOnOrAfter instant on the <Conditions> element invalidates\n * the entire Assertion. An invalid NotOnOrAfter instant on a <SubjectConfirmationData> element only\n * invalidates the individual <SubjectConfirmation>. The authorization server MAY reject Assertions with\n * a NotOnOrAfter instant that is unreasonably far in the future. The authorization server MAY ensure\n * that Bearer Assertions are not replayed, by maintaining the set of used ID values for the length of\n * time for which the Assertion would be considered valid based on the applicable NotOnOrAfter instant.\n */\n if (notOnOrAfter.compareTo(new DateTime()) != 1) {\n // notOnOrAfter is an expired timestamp\n log.error(\"NotOnOrAfter is having an expired timestamp\");\n throw new Exception(\"NotOnOrAfter is having an expired timestamp\");\n }\n\n /**\n * The Assertion MUST be digitally signed by the issuer and the authorization server MUST verify the\n * signature.\n */\n X509CredentialImpl credImpl;\n\n // Use primary keystore specified in carbon.xml\n ServerConfiguration sc = ServerConfiguration.getInstance();\n KeyStore ks = KeyStore.getInstance(sc.getFirstProperty(\"Security.KeyStore.Type\"));\n FileInputStream ksFile = new FileInputStream(sc.getFirstProperty(\"Security.KeyStore.Location\"));\n ks.load(\n ksFile,\n sc.getFirstProperty(\"Security.KeyStore.Password\").toCharArray()\n );\n ksFile.close();\n\n String alias = sc.getFirstProperty(\"Security.KeyStore.KeyAlias\");\n X509Certificate cert = null;\n if (alias != null) {\n cert = (X509Certificate) ks.getCertificate(alias);\n if (cert == null) {\n log.error(\"Cannot find certificate with the alias - \" + alias);\n }\n }\n credImpl = new X509CredentialImpl(cert);\n SignatureValidator validator = new SignatureValidator(credImpl);\n validator.validate(assertion.getSignature());\n\n /**\n * The authorization server MUST verify that the Assertion is valid in all other respects per\n * [OASIS.saml-core-2.0-os], such as (but not limited to) evaluating all content within the Conditions\n * element including the NotOnOrAfter and NotBefore attributes, rejecting unknown condition types, etc.\n *\n * [OASIS.saml-core-2.0-os] - http://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf\n */\n // TODO: Throw the SAML request through the general SAML2 validation routines\n\n isValid = true;\n } catch (Exception e) {\n /**\n * Ideally we should handle a SAML2SSOAuthenticatorException here? Seems to be the right\n * way to go as there's no other exception class specified. Need a clear exception hierarchy here for\n * handling SAML messages.*/\n log.error(e.getMessage(), e);\n }\n return isValid;\n }", "TransactionResponseDTO authorizeTransaction(TransactionRequestDTO transactionRequestDTO);", "@Test\n public void testTokenEndPointAnonymousTokenRequest() throws Exception {\n String callback = \"Backplane.call_back\";\n \n // should return the form:\n // callback({\n // \"access_token\": \"l5feG0KjdXTpgDAfOvN6pU6YWxNb7qyn\",\n // \"expires_in\":3600,\n // \"token_type\": \"Bearer\",\n // \"backplane_channel\": \"Tm5FUzstWmUOdp0xU5UW83r2q9OXrrxt\"\n // })\n \n refreshRequestAndResponse();\n \n request.setRequestURI(\"/v2/token\");\n request.setMethod(\"GET\");\n request.setParameter(\"grant_type\", \"client_credentials\");\n setOAuthBasicAuthentication(request, \"anonymous\", \"\");\n request.setParameter(\"callback\", callback);\n \n handlerAdapter.handle(request, response, controller);\n logger.info(\"testTokenEndPointAnonymousTokenRequest() => \" + response.getContentAsString());\n \n assertTrue(\"Invalid response: \" + response.getContentAsString(), response.getContentAsString().\n matches(callback + \"[(][{]\\\\s*\\\"access_token\\\":\\\\s*\\\".{22}+\\\",\\\\s*\" +\n \"\\\"expires_in\\\":\\\\s*3600,\\\\s*\" +\n \"\\\"token_type\\\":\\\\s*\\\"Bearer\\\",\\\\s*\" +\n \"\\\"backplane_channel\\\":\\\\s*\\\".{32}+\\\"\\\\s*[}][)]\"));\n \n // cleanup test token\n String result = response.getContentAsString().substring(response.getContentAsString().indexOf(\"{\"), response.getContentAsString().indexOf(\")\"));\n Map<String,Object> returnedBody = new ObjectMapper().readValue(result, new TypeReference<Map<String,Object>>() {});\n daoFactory.getTokenDao().delete((String)returnedBody.get(\"access_token\"));\n \n }", "public boolean validate(String id, String password);", "protected abstract int getErrorTokenId();", "private boolean correctState(AuthCallbackDto callbackDto, HttpServletRequest request) {\n final String state = callbackDto.getState();\n return WebUtils.validateState(request, state);\n }", "public TafResp validate(LifeForm reading, HttpServletRequest req, final HttpServletResponse resp) {\n\t\tString attessec = null;\n\t\tString atteshr = null;\n\t\tString authHeader = req.getHeader(\"Authorization\");\n\t\tString requestURL = req.getRequestURL().toString();\n\t\tif(authHeader!=null && authHeader.startsWith(\"CSP \")) {\n\t\t\tattessec = authHeader.substring(4);\n\t\t} else {\n\t\t\tCookie[] cookies = req.getCookies();\n\t\t\tif(cookies!=null) {\n\t\t\t\tfor(Cookie cookie : cookies) {\n\t\t\t\t\tString cookieName = cookie.getName();\n\t\t\t\t\tif(\"attESSec\".equalsIgnoreCase(cookieName)) {\n\t\t\t\t\t\tattessec = cookie.getValue();\n\t\t\t\t\t} else if(\"attESHr\".equalsIgnoreCase(cookieName)) {\n\t\t\t\t\t\tatteshr = cookie.getValue();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(attessec != null) { // atteshr can be null\n\t\t\treturn validate(\n\t\t\t\t\tnew Creator() {\n//\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic TafResp create(Access access, Principal principal, String desc, String remdialURL) {\n\t\t\t\t\t\t\treturn new CSPHttpTafResp(access,principal,desc, resp, remdialURL);\n\t\t\t\t\t\t}},\n\t\t\t\t\tattessec,\n\t\t\t\t\trequestURL, // Note: since we are taking the URL from the Request, we assume encoded correctly\n\t\t\t\t\tatteshr // this can be null\n\t\t\t\t\t);\n\t\t} else {\n\t\t\t//access.log(\"Cookie not found\");\n\t\t\t// If no cookie, and it's a Silicon Based Lifeform, punt now, because we can't do webpage redirects...\n\t\t\tif(reading == LifeForm.SBLF)return PuntTafResp.singleton();\n\t\t\t\t// Normally, we don't accept incoming Localhost Web Pages, because CSP loops (infinite?)\n\t\t\t\t// However, we must allow Developers to utilize creating an entry in \n\t\t\t\t// /etc/hosts file: 127.0.0.1 <mymachine>.att.com\n\t\t\t\t// So we'll allow something that resolves to 127... if they have it there, but they must use that\n\t\t\t\t// name or CSP will loop\n\t\t\tif(acceptLocalhost) {\n\t\t\t\tif(requestURL.contains(\"localhost\") || requestURL.contains(\"127.0.0.1\") || requestURL.contains(\"::1\")) \n\t\t\t\t\treturn PuntTafResp.singleton();\n\t\t\t} else if(LocalhostTaf.isLocalAddress(req.getRemoteAddr()))\t// normal mode... punt any incoming localhost\n\t\t\t\treturn PuntTafResp.singleton();\n\n\t\t\t// Need full URI for CSP... However, ServletRequest doesn't expose, so we'll have to rebuild it... sigh.\n\t\t\tString remedialURL = requestURL;\n\t\t\tString qs;\n\t\t\tif((qs = req.getQueryString())!=null) {\n\t\t\t\ttry {\n\t\t\t\t\tremedialURL = URLEncoder.encode(requestURL+'?'+qs,Config.UTF_8);\n\t\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t\t// Not a real possibility after initial Development... not worth trying to log\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t\treturn new CSPHttpTafResp(\n\t\t\t\t\taccess,\n\t\t\t\t\tnull, // no principal\n\t\t\t\t\t\"attESSec cookie does not exist\",\n\t\t\t\t\tresp,\n\t\t\t\t\tcspurl + \"/?retURL=\" + remedialURL + \"&sysName=\" + hostname);\n\t\t}\n\n\t}", "public abstract boolean verifyInput();", "public boolean validateState(SupplierOrderCacheState state) {\n\t\treturn true;\n\t}", "private void handleStateRsp(StateHeader hdr, byte[] state) {\r\n Digest tmp_digest=hdr.my_digest;\r\n boolean digest_needed=isDigestNeeded();\r\n\r\n waiting_for_state_response=false;\r\n if(digest_needed && tmp_digest != null) {\r\n down_prot.down(new Event(Event.OVERWRITE_DIGEST, tmp_digest)); // set the digest (e.g. in NAKACK)\r\n }\r\n stop=System.currentTimeMillis();\r\n\r\n // resume sending and handling of message garbage collection gossip messages, fixes bugs #943480 and #938584).\r\n // Wakes up a previously suspended message garbage collection protocol (e.g. STABLE)\r\n if(log.isDebugEnabled())\r\n log.debug(\"passing down a RESUME_STABLE event\");\r\n down_prot.down(new Event(Event.RESUME_STABLE));\r\n\r\n log.debug(\"received state, size=\" + (state == null? \"0\" : state.length) + \" bytes. Time=\" + (stop - start) + \" milliseconds\");\r\n StateTransferInfo info=new StateTransferInfo(hdr.sender, hdr.state_id, 0L, state);\r\n up_prot.up(new Event(Event.GET_STATE_OK, info));\r\n }" ]
[ "0.585625", "0.57628626", "0.5651563", "0.5619236", "0.55963475", "0.5585119", "0.5582123", "0.5567162", "0.5535766", "0.54911685", "0.54282624", "0.54118186", "0.53773856", "0.53476095", "0.5337261", "0.5315249", "0.5253751", "0.5252894", "0.5247503", "0.5232738", "0.521867", "0.5217617", "0.52092856", "0.51966655", "0.5185435", "0.5182466", "0.5151946", "0.5145142", "0.5130448", "0.512148", "0.5109735", "0.5105908", "0.507742", "0.5063615", "0.5054927", "0.50463724", "0.5036684", "0.5029538", "0.5028738", "0.50208163", "0.5020307", "0.5019613", "0.50118756", "0.5009533", "0.5004119", "0.49900347", "0.4988408", "0.49742717", "0.4969171", "0.4958428", "0.49533278", "0.49487352", "0.4948589", "0.49332464", "0.4924009", "0.49167392", "0.49096265", "0.49087468", "0.4906539", "0.49026462", "0.48922744", "0.48894277", "0.48736697", "0.486572", "0.4862382", "0.4858263", "0.4854936", "0.4854767", "0.48464456", "0.48362872", "0.48234317", "0.4820858", "0.48151848", "0.4814408", "0.4813003", "0.48110095", "0.48091683", "0.4808592", "0.48067012", "0.48041958", "0.47972313", "0.4790417", "0.47881508", "0.47790095", "0.4772431", "0.4771787", "0.47708338", "0.47686815", "0.47670162", "0.47571418", "0.47554615", "0.47546718", "0.4746908", "0.47468814", "0.4743183", "0.47427976", "0.47386995", "0.4737693", "0.47320557", "0.47313574", "0.47214666" ]
0.0
-1
Create an entity for this test. This is a static method, as tests for other entities might also need it, if they test an entity which requires the current entity.
public static Allegato createEntity(EntityManager em) { Allegato allegato = new Allegato() .nomeAttachment(DEFAULT_NOME_ATTACHMENT) .algoritmoCompressione(DEFAULT_ALGORITMO_COMPRESSIONE) .formatoAttachment(DEFAULT_FORMATO_ATTACHMENT) .descrizioneAttachment(DEFAULT_DESCRIZIONE_ATTACHMENT) .attachment(DEFAULT_ATTACHMENT); return allegato; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Entity createEntity();", "T createEntity();", "protected abstract ENTITY createEntity();", "void create(E entity);", "void create(T entity);", "E create(E entity);", "E create(E entity);", "protected abstract EntityBase createEntity() throws Exception;", "TestEntity buildEntity () {\n TestEntity testEntity = new TestEntity();\n testEntity.setName(\"Test name\");\n testEntity.setCheck(true);\n testEntity.setDateCreated(new Date(System.currentTimeMillis()));\n testEntity.setDescription(\"description\");\n\n Specialization specialization = new Specialization();\n specialization.setName(\"Frontend\");\n specialization.setLevel(\"Senior\");\n specialization.setYears(10);\n\n testEntity.setSpecialization(specialization);\n\n return testEntity;\n }", "public static TestEntity createEntity(EntityManager em) {\n TestEntity testEntity = new TestEntity();\n // Add required entity\n User user = UserResourceIntTest.createEntity(em);\n em.persist(user);\n em.flush();\n testEntity.setUserOneToMany(user);\n return testEntity;\n }", "void create(T entity) throws Exception;", "@Override\n protected void createEntity() {\n ProjectStatus status = createProjectStatus(5);\n setEntity(status);\n }", "protected T createSimulatedExistingEntity() {\n final T entity = createNewEntity();\n entity.setId(IDUtil.randomPositiveLong());\n\n when(getDAO().findOne(entity.getId())).thenReturn(entity);\n return entity;\n }", "public Entity newEntity() { return newMyEntity(); }", "public Entity newEntity() { return newMyEntity(); }", "public static TranshipTube createEntity(EntityManager em) {\n TranshipTube transhipTube = new TranshipTube()\n .status(DEFAULT_STATUS)\n .memo(DEFAULT_MEMO)\n .columnsInTube(DEFAULT_COLUMNS_IN_TUBE)\n .rowsInTube(DEFAULT_ROWS_IN_TUBE);\n // Add required entity\n TranshipBox transhipBox = TranshipBoxResourceIntTest.createEntity(em);\n em.persist(transhipBox);\n em.flush();\n transhipTube.setTranshipBox(transhipBox);\n // Add required entity\n FrozenTube frozenTube = FrozenTubeResourceIntTest.createEntity(em);\n em.persist(frozenTube);\n em.flush();\n transhipTube.setFrozenTube(frozenTube);\n return transhipTube;\n }", "public static Student createEntity(EntityManager em) {\n Student student = new Student()\n .firstName(DEFAULT_FIRST_NAME)\n .middleName(DEFAULT_MIDDLE_NAME)\n .lastName(DEFAULT_LAST_NAME)\n .studentRegNumber(DEFAULT_STUDENT_REG_NUMBER)\n .dateOfBirth(DEFAULT_DATE_OF_BIRTH)\n .regDocType(DEFAULT_REG_DOC_TYPE)\n .registrationDocumentNumber(DEFAULT_REGISTRATION_DOCUMENT_NUMBER)\n .gender(DEFAULT_GENDER)\n .nationality(DEFAULT_NATIONALITY)\n .dateJoined(DEFAULT_DATE_JOINED)\n .deleted(DEFAULT_DELETED)\n .wxtJwtPq55wd(DEFAULT_WXT_JWT_PQ_55_WD);\n // Add required entity\n NextOfKin nextOfKin;\n if (TestUtil.findAll(em, NextOfKin.class).isEmpty()) {\n nextOfKin = NextOfKinResourceIT.createEntity(em);\n em.persist(nextOfKin);\n em.flush();\n } else {\n nextOfKin = TestUtil.findAll(em, NextOfKin.class).get(0);\n }\n student.getRelatives().add(nextOfKin);\n return student;\n }", "@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }", "public static Emprunt createEntity(EntityManager em) {\n Emprunt emprunt = new Emprunt()\n .dateEmprunt(DEFAULT_DATE_EMPRUNT)\n .dateRetour(DEFAULT_DATE_RETOUR);\n // Add required entity\n Usager usager = UsagerResourceIntTest.createEntity(em);\n em.persist(usager);\n em.flush();\n emprunt.setUsager(usager);\n // Add required entity\n Exemplaire exemplaire = ExemplaireResourceIntTest.createEntity(em);\n em.persist(exemplaire);\n em.flush();\n emprunt.setExemplaire(exemplaire);\n return emprunt;\n }", "public ClientEntity newEntity() {\r\n if (entityType == null) {\r\n entityType = getEntityType(entitySet);\r\n }\r\n return odataClient.getObjectFactory().newEntity(new FullQualifiedName(NAMESPAVE, entityType));\r\n }", "@Override\n public EntityResponse createEntity(String entitySetName, OEntity entity) {\n return super.createEntity(entitySetName, entity);\n }", "ID create(T entity);", "public static MotherBed createEntity(EntityManager em) {\n MotherBed motherBed = new MotherBed()\n .value(DEFAULT_VALUE)\n .status(DEFAULT_STATUS);\n // Add required entity\n Nursery nursery = NurseryResourceIntTest.createEntity(em);\n em.persist(nursery);\n em.flush();\n motherBed.setNursery(nursery);\n return motherBed;\n }", "private FailingEntity createFailingEntity() {\n FailingEntity entity = app.createAndManageChild(EntitySpec.create(FailingEntity.class)\n .configure(FailingEntity.FAIL_ON_START, true));\n return entity;\n }", "@Override\n public EntityResponse createEntity(String entitySetName, OEntityKey entityKey, String navProp, OEntity entity) {\n return super.createEntity(entitySetName, entityKey, navProp, entity);\n }", "public <T extends Entity> T createEntity(EntitySpec<T> spec) {\n Map<String,Entity> entitiesByEntityId = MutableMap.of();\n Map<String,EntitySpec<?>> specsByEntityId = MutableMap.of();\n \n T entity = createEntityAndDescendantsUninitialized(spec, entitiesByEntityId, specsByEntityId);\n initEntityAndDescendants(entity.getId(), entitiesByEntityId, specsByEntityId);\n return entity;\n }", "public static Prestamo createEntity(EntityManager em) {\n Prestamo prestamo = new Prestamo().observaciones(DEFAULT_OBSERVACIONES).fechaFin(DEFAULT_FECHA_FIN);\n // Add required entity\n Libro libro;\n if (TestUtil.findAll(em, Libro.class).isEmpty()) {\n libro = LibroResourceIT.createEntity(em);\n em.persist(libro);\n em.flush();\n } else {\n libro = TestUtil.findAll(em, Libro.class).get(0);\n }\n prestamo.setLibro(libro);\n // Add required entity\n Persona persona;\n if (TestUtil.findAll(em, Persona.class).isEmpty()) {\n persona = PersonaResourceIT.createEntity(em);\n em.persist(persona);\n em.flush();\n } else {\n persona = TestUtil.findAll(em, Persona.class).get(0);\n }\n prestamo.setPersona(persona);\n // Add required entity\n User user = UserResourceIT.createEntity(em);\n em.persist(user);\n em.flush();\n prestamo.setUser(user);\n return prestamo;\n }", "default E create(E entity)\n throws TechnicalException, ConflictException {\n return create(entity, null);\n }", "public static Rentee createEntity(EntityManager em) {\n Rentee rentee = new Rentee();\n rentee = new Rentee()\n .firstName(DEFAULT_FIRST_NAME)\n .lastName(DEFAULT_LAST_NAME)\n .email(DEFAULT_EMAIL)\n .phoneNumber(DEFAULT_PHONE_NUMBER)\n .password(DEFAULT_PASSWORD);\n return rentee;\n }", "public static Pocket createEntity(EntityManager em) {\n Pocket pocket = new Pocket()\n .key(DEFAULT_KEY)\n .label(DEFAULT_LABEL)\n .startDateTime(DEFAULT_START_DATE_TIME)\n .endDateTime(DEFAULT_END_DATE_TIME)\n .amount(DEFAULT_AMOUNT)\n .reserved(DEFAULT_RESERVED);\n // Add required entity\n Balance balance = BalanceResourceIntTest.createEntity(em);\n em.persist(balance);\n em.flush();\n pocket.setBalance(balance);\n return pocket;\n }", "public static ItemSubstitution createEntity(EntityManager em) {\n ItemSubstitution itemSubstitution = new ItemSubstitution()\n .timestamp(DEFAULT_TIMESTAMP)\n .type(DEFAULT_TYPE)\n .substituteType(DEFAULT_SUBSTITUTE_TYPE)\n .substituteNo(DEFAULT_SUBSTITUTE_NO)\n .description(DEFAULT_DESCRIPTION)\n .isInterchangeable(DEFAULT_IS_INTERCHANGEABLE)\n .relationsLevel(DEFAULT_RELATIONS_LEVEL)\n .isCheckedToOriginal(DEFAULT_IS_CHECKED_TO_ORIGINAL)\n .origCheckDate(DEFAULT_ORIG_CHECK_DATE);\n // Add required entity\n Item item;\n if (TestUtil.findAll(em, Item.class).isEmpty()) {\n item = ItemResourceIT.createEntity(em);\n em.persist(item);\n em.flush();\n } else {\n item = TestUtil.findAll(em, Item.class).get(0);\n }\n itemSubstitution.getItems().add(item);\n return itemSubstitution;\n }", "E create(E entity, RequestContext context)\n throws TechnicalException, ConflictException;", "public static A createEntity(EntityManager em) {\n A a = new A();\n return a;\n }", "public static Edge createEntity(EntityManager em) {\n Edge edge = new Edge()\n .description(DEFAULT_DESCRIPTION);\n // Add required entity\n Stone from = StoneResourceIntTest.createEntity(em);\n em.persist(from);\n em.flush();\n edge.setFrom(from);\n // Add required entity\n Stone to = StoneResourceIntTest.createEntity(em);\n em.persist(to);\n em.flush();\n edge.setTo(to);\n return edge;\n }", "public static QuizQuestion createEntity(EntityManager em) {\n QuizQuestion quizQuestion = new QuizQuestion()\n .text(DEFAULT_TEXT)\n .description(DEFAULT_DESCRIPTION);\n // Add required entity\n Quiz quiz;\n if (TestUtil.findAll(em, Quiz.class).isEmpty()) {\n quiz = QuizResourceIT.createEntity(em);\n em.persist(quiz);\n em.flush();\n } else {\n quiz = TestUtil.findAll(em, Quiz.class).get(0);\n }\n quizQuestion.setQuiz(quiz);\n return quizQuestion;\n }", "public static Partida createEntity(EntityManager em) {\n Partida partida = new Partida()\n .dataPartida(DEFAULT_DATA_PARTIDA);\n return partida;\n }", "public T create(T entity) {\n\t \tgetEntityManager().getTransaction().begin();\n\t getEntityManager().persist(entity);\n\t getEntityManager().getTransaction().commit();\n\t getEntityManager().close();\n\t return entity;\n\t }", "public static Emprunt createEntity(EntityManager em) {\n Emprunt emprunt = new Emprunt()\n .dateEmprunt(DEFAULT_DATE_EMPRUNT);\n return emprunt;\n }", "public static SitAndGo createEntity(EntityManager em) {\n SitAndGo sitAndGo = new SitAndGo()\n .format(DEFAULT_FORMAT)\n .buyIn(DEFAULT_BUY_IN)\n .ranking(DEFAULT_RANKING)\n .profit(DEFAULT_PROFIT)\n .bounty(DEFAULT_BOUNTY);\n return sitAndGo;\n }", "public static Exercise createEntity(EntityManager em) {\n Exercise exercise = new Exercise()\n .minutes(DEFAULT_MINUTES);\n return exercise;\n }", "@Override\n\tpublic Entity createEntity() {\n\t\tEntity entity = new Entity(LINKS_ENTITY_KIND);\n\t\tentity.setProperty(id_property, ID);\n\t\tentity.setProperty(url_property, url);\n\t\tentity.setProperty(CategoryID_property, CategoryID);\n\t\tentity.setProperty(note_property, note);\n\t\tentity.setProperty(createdOn_property, createdOn);\n\t\tentity.setProperty(updatedOn_property, updatedOn);\t\t\t\n\t\treturn entity;\n\t}", "public static House createEntity(EntityManager em) {\n House house = new House()\n .houseName(DEFAULT_HOUSE_NAME)\n .houseNo(DEFAULT_HOUSE_NO)\n .address(DEFAULT_ADDRESS)\n .houseToFloorNo(DEFAULT_HOUSE_TO_FLOOR_NO)\n .ownToFloorNo(DEFAULT_OWN_TO_FLOOR_NO)\n .lat(DEFAULT_LAT)\n .lon(DEFAULT_LON)\n .createdate(DEFAULT_CREATEDATE)\n .createBy(DEFAULT_CREATE_BY)\n .updateDate(DEFAULT_UPDATE_DATE)\n .updateBy(DEFAULT_UPDATE_BY)\n .image(DEFAULT_IMAGE)\n .imageContentType(DEFAULT_IMAGE_CONTENT_TYPE);\n // Add required entity\n Country country = CountryResourceIntTest.createEntity(em);\n em.persist(country);\n em.flush();\n house.setCountry(country);\n // Add required entity\n State state = StateResourceIntTest.createEntity(em);\n em.persist(state);\n em.flush();\n house.setState(state);\n // Add required entity\n City city = CityResourceIntTest.createEntity(em);\n em.persist(city);\n em.flush();\n house.setCity(city);\n // Add required entity\n Profile profile = ProfileResourceIntTest.createEntity(em);\n em.persist(profile);\n em.flush();\n house.setProfile(profile);\n // Add required entity\n User user = UserResourceIntTest.createEntity(em);\n em.persist(user);\n em.flush();\n house.setUser(user);\n return house;\n }", "public static CourtType createEntity(EntityManager em) {\n CourtType courtType = new CourtType()\n .type(DEFAULT_TYPE);\n return courtType;\n }", "public static Ailment createEntity(EntityManager em) {\n Ailment ailment = new Ailment()\n .name(DEFAULT_NAME)\n .symptoms(DEFAULT_SYMPTOMS)\n .treatments(DEFAULT_TREATMENTS);\n return ailment;\n }", "@Override\r\n public void createNewEntity(String entityName) {\n\r\n }", "public static Articulo createEntity(EntityManager em) {\n Articulo articulo = new Articulo()\n .titulo(DEFAULT_TITULO)\n .contenido(DEFAULT_CONTENIDO)\n .fechaCreacion(DEFAULT_FECHA_CREACION);\n return articulo;\n }", "void create(Student entity);", "public static TipoLocal createEntity(EntityManager em) {\n TipoLocal tipoLocal = new TipoLocal()\n .tipo(DEFAULT_TIPO);\n return tipoLocal;\n }", "public static Testtable2 createEntity(EntityManager em) {\n Testtable2 testtable2 = new Testtable2();\n testtable2.setColumn2(DEFAULT_COLUMN_2);\n return testtable2;\n }", "@Override\n\tprotected CoreEntity createNewEntity() {\n\t\treturn null;\n\t}", "public static OrderItem createEntity(EntityManager em) {\n OrderItem orderItem = new OrderItem().quantity(DEFAULT_QUANTITY).totalPrice(DEFAULT_TOTAL_PRICE).status(DEFAULT_STATUS);\n return orderItem;\n }", "public static Arrete createEntity(EntityManager em) {\n Arrete arrete = new Arrete()\n .intituleArrete(DEFAULT_INTITULE_ARRETE)\n .numeroArrete(DEFAULT_NUMERO_ARRETE)\n .dateSignature(DEFAULT_DATE_SIGNATURE)\n .nombreAgrement(DEFAULT_NOMBRE_AGREMENT);\n return arrete;\n }", "public static Tenant createEntity() {\n return new Tenant();\n }", "public static MyOrders createEntity(EntityManager em) {\n MyOrders myOrders = new MyOrders();\n return myOrders;\n }", "public static Enseigner createEntity(EntityManager em) {\n Enseigner enseigner = new Enseigner().dateDebut(DEFAULT_DATE_DEBUT).dateFin(DEFAULT_DATE_FIN);\n return enseigner;\n }", "@Test\n public void eventEntityConstructionTest() {\n\n Event event = new EventEntity();\n\n assertThat(event).isNotNull();\n\n }", "public static EnteteVente createEntity(EntityManager em) {\n EnteteVente enteteVente = new EnteteVente()\n .enteteVenteType(DEFAULT_ENTETE_VENTE_TYPE)\n .enteteVenteTotalHT(DEFAULT_ENTETE_VENTE_TOTAL_HT)\n .enteteVenteTotalTTC(DEFAULT_ENTETE_VENTE_TOTAL_TTC)\n .enteteVenteDateCreation(DEFAULT_ENTETE_VENTE_DATE_CREATION);\n return enteteVente;\n }", "public void createNewObject(Representation entity) throws ResourceException {\r\n\t\tT entry = createObjectFromHeaders(null, entity);\r\n\t\texecuteUpdate(entity, entry, createUpdateObject(entry));\r\n\r\n\t}", "public static Organizer createEntity(EntityManager em) {\n Organizer organizer = new Organizer()\n .name(DEFAULT_NAME)\n .description(DEFAULT_DESCRIPTION)\n .facebook(DEFAULT_FACEBOOK)\n .twitter(DEFAULT_TWITTER);\n // Add required entity\n User user = UserResourceIntTest.createEntity(em);\n em.persist(user);\n em.flush();\n organizer.setUser(user);\n return organizer;\n }", "public static Note createEntity(EntityManager em) {\n Note note = new Note().content(DEFAULT_CONTENT).title(DEFAULT_TITLE).xpos(DEFAULT_XPOS).ypos(DEFAULT_YPOS);\n return note;\n }", "public static FillingGapsTestItem createEntity(EntityManager em) {\n FillingGapsTestItem fillingGapsTestItem = new FillingGapsTestItem()\n .question(DEFAULT_QUESTION);\n return fillingGapsTestItem;\n }", "public Entity build();", "@Test\n public void createQuejaEntityTest() {\n PodamFactory factory = new PodamFactoryImpl();\n QuejaEntity newEntity = factory.manufacturePojo(QuejaEntity.class);\n QuejaEntity result = quejaPersistence.create(newEntity);\n\n Assert.assertNotNull(result);\n QuejaEntity entity = em.find(QuejaEntity.class, result.getId());\n Assert.assertNotNull(entity);\n Assert.assertEquals(newEntity.getName(), entity.getName());\n}", "public abstract boolean create(T entity) throws ServiceException;", "public static Acheteur createEntity(EntityManager em) {\n Acheteur acheteur = new Acheteur()\n .typeClient(DEFAULT_TYPE_CLIENT)\n .nom(DEFAULT_NOM)\n .prenom(DEFAULT_PRENOM)\n .tel(DEFAULT_TEL)\n .cnib(DEFAULT_CNIB)\n .email(DEFAULT_EMAIL)\n .adresse(DEFAULT_ADRESSE)\n .numroBanquaire(DEFAULT_NUMRO_BANQUAIRE)\n .deleted(DEFAULT_DELETED);\n return acheteur;\n }", "public static RoomGenericProduct createEntity(EntityManager em) {\n RoomGenericProduct roomGenericProduct = new RoomGenericProduct()\n .quantity(DEFAULT_QUANTITY)\n .quantityUnit(DEFAULT_QUANTITY_UNIT);\n return roomGenericProduct;\n }", "public static TypeOeuvre createEntity(EntityManager em) {\n TypeOeuvre typeOeuvre = new TypeOeuvre()\n .intitule(DEFAULT_INTITULE);\n return typeOeuvre;\n }", "public static Reservation createEntity(EntityManager em) {\n Reservation reservation = ReservationTest.buildReservationTest(1L);\n //reservation.setUser(User.builder().email(\"adfad\").name(\"\").build());\n return reservation;\n }", "@Test\n public void testNewEntity() throws Exception {\n\n }", "public static Model createEntity(EntityManager em) {\n\t\tModel model = new Model().name(DEFAULT_NAME).type(DEFAULT_TYPE).algorithm(DEFAULT_ALGORITHM)\n\t\t\t\t.status(DEFAULT_STATUS).owner(DEFAULT_OWNER).performanceMetrics(DEFAULT_PERFORMANCE_METRICS)\n\t\t\t\t.modelLocation(DEFAULT_MODEL_LOCATION).featureSignificance(DEFAULT_FEATURE_SIGNIFICANCE)\n\t\t\t\t.builderConfig(DEFAULT_BUILDER_CONFIG).createdDate(DEFAULT_CREATED_DATE)\n\t\t\t\t.deployedDate(DEFAULT_DEPLOYED_DATE).trainingDataset(DEFAULT_TRAINING_DATASET)\n .library(DEFAULT_LIBRARY).project(DEFAULT_PROJECT).version(DEFAULT_VERSION);\n\t\treturn model;\n\t}", "public static ProcessExecution createEntity(EntityManager em) {\n ProcessExecution processExecution = new ProcessExecution()\n .execution(DEFAULT_EXECUTION);\n return processExecution;\n }", "public static Paiement createEntity(EntityManager em) {\n Paiement paiement = new Paiement()\n .dateTransation(DEFAULT_DATE_TRANSATION)\n .montantTTC(DEFAULT_MONTANT_TTC);\n return paiement;\n }", "public static Article createEntity(EntityManager em) {\n Article article = new Article()\n .name(DEFAULT_NAME)\n .content(DEFAULT_CONTENT)\n .creationDate(DEFAULT_CREATION_DATE)\n .modificationDate(DEFAULT_MODIFICATION_DATE);\n return article;\n }", "T makePersistent(T entity);", "void buildFromEntity(E entity);", "public static XepLoai createEntity(EntityManager em) {\n XepLoai xepLoai = new XepLoai()\n .tenXepLoai(DEFAULT_TEN_XEP_LOAI);\n return xepLoai;\n }", "public static Lot createEntity(EntityManager em) {\n Lot lot = new Lot()\n .createdAt(DEFAULT_CREATED_AT)\n .updatedAt(DEFAULT_UPDATED_AT)\n .qte(DEFAULT_QTE)\n .qtUg(DEFAULT_QT_UG)\n .num(DEFAULT_NUM)\n .dateFabrication(DEFAULT_DATE_FABRICATION)\n .peremption(DEFAULT_PEREMPTION)\n .peremptionstatus(DEFAULT_PEREMPTIONSTATUS);\n return lot;\n }", "private MetaEntityImpl createMetaEntity(Class<?> entityType) {\n String className = entityType.getSimpleName();\n MetaEntityImpl managedEntity = new MetaEntityImpl();\n managedEntity.setEntityType(entityType);\n managedEntity.setName(className);\n ((MetaTableImpl) managedEntity.getTable()).setName(className);\n ((MetaTableImpl) managedEntity.getTable()).setKeySpace(environment.getConfiguration().getKeySpace());\n return managedEntity;\n }", "public TransporteTerrestreEntity createTransporte(TransporteTerrestreEntity transporteEntity) throws BusinessLogicException {\n LOGGER.log(Level.INFO, \"Inicia proceso de creación del transporte\");\n super.createTransporte(transporteEntity);\n\n \n persistence.create(transporteEntity);\n LOGGER.log(Level.INFO, \"Termina proceso de creación del transporte\");\n return transporteEntity;\n }", "public static EmployeeCars createEntity(EntityManager em) {\n EmployeeCars employeeCars = new EmployeeCars()\n .previousReading(DEFAULT_PREVIOUS_READING)\n .currentReading(DEFAULT_CURRENT_READING)\n .workingDays(DEFAULT_WORKING_DAYS)\n .updateDate(DEFAULT_UPDATE_DATE);\n // Add required entity\n Employee employee = EmployeeResourceIT.createEntity(em);\n em.persist(employee);\n em.flush();\n employeeCars.setEmployee(employee);\n // Add required entity\n Car car = CarResourceIT.createEntity(em);\n em.persist(car);\n em.flush();\n employeeCars.setCar(car);\n return employeeCars;\n }", "public static TaskComment createEntity(EntityManager em) {\n TaskComment taskComment = new TaskComment()\n .value(DEFAULT_VALUE);\n // Add required entity\n Task newTask = TaskResourceIT.createEntity(em);\n Task task = TestUtil.findAll(em, Task.class).stream()\n .filter(x -> x.getId().equals(newTask.getId()))\n .findAny().orElse(null);\n if (task == null) {\n task = newTask;\n em.persist(task);\n em.flush();\n }\n taskComment.setTask(task);\n return taskComment;\n }", "public static Personel createEntity(EntityManager em) {\n Personel personel = new Personel()\n .fistname(DEFAULT_FISTNAME)\n .lastname(DEFAULT_LASTNAME)\n .sexe(DEFAULT_SEXE);\n return personel;\n }", "public static Territorio createEntity(EntityManager em) {\n Territorio territorio = new Territorio().nome(DEFAULT_NOME);\n return territorio;\n }", "public static Ordre createEntity(EntityManager em) {\n Ordre ordre = new Ordre()\n .name(DEFAULT_NAME)\n .status(DEFAULT_STATUS)\n .price(DEFAULT_PRICE)\n .creationDate(DEFAULT_CREATION_DATE);\n return ordre;\n }", "@Override\n @LogMethod\n public T create(T entity) throws InventoryException {\n \tInventoryHelper.checkNull(entity, \"entity\");\n repository.persist(entity);\n return repository.getByKey(entity.getId());\n }", "public static Poen createEntity(EntityManager em) {\n Poen poen = new Poen()\n .tip(DEFAULT_TIP);\n return poen;\n }", "public static Expediente createEntity(EntityManager em) {\n Expediente expediente = new Expediente()\n .horarioEntrada(DEFAULT_HORARIO_ENTRADA)\n .horarioSaida(DEFAULT_HORARIO_SAIDA)\n .diaSemana(DEFAULT_DIA_SEMANA);\n return expediente;\n }", "public static Unidade createEntity(EntityManager em) {\n Unidade unidade = new Unidade()\n .descricao(DEFAULT_DESCRICAO)\n .sigla(DEFAULT_SIGLA)\n .situacao(DEFAULT_SITUACAO)\n .controleDeEstoque(DEFAULT_CONTROLE_DE_ESTOQUE)\n .idAlmoxarifado(DEFAULT_ID_ALMOXARIFADO)\n .andar(DEFAULT_ANDAR)\n .capacidade(DEFAULT_CAPACIDADE)\n .horarioInicio(DEFAULT_HORARIO_INICIO)\n .horarioFim(DEFAULT_HORARIO_FIM)\n .localExame(DEFAULT_LOCAL_EXAME)\n .rotinaDeFuncionamento(DEFAULT_ROTINA_DE_FUNCIONAMENTO)\n .anexoDocumento(DEFAULT_ANEXO_DOCUMENTO)\n .setor(DEFAULT_SETOR)\n .idCentroDeAtividade(DEFAULT_ID_CENTRO_DE_ATIVIDADE)\n .idChefia(DEFAULT_ID_CHEFIA);\n // Add required entity\n TipoUnidade tipoUnidade;\n if (TestUtil.findAll(em, TipoUnidade.class).isEmpty()) {\n tipoUnidade = TipoUnidadeResourceIT.createEntity(em);\n em.persist(tipoUnidade);\n em.flush();\n } else {\n tipoUnidade = TestUtil.findAll(em, TipoUnidade.class).get(0);\n }\n unidade.setTipoUnidade(tipoUnidade);\n return unidade;\n }", "public void spawnEntity(AEntityB_Existing entity){\r\n\t\tBuilderEntityExisting builder = new BuilderEntityExisting(entity.world.world);\r\n\t\tbuilder.loadedFromSavedNBT = true;\r\n\t\tbuilder.setPositionAndRotation(entity.position.x, entity.position.y, entity.position.z, (float) -entity.angles.y, (float) entity.angles.x);\r\n\t\tbuilder.entity = entity;\r\n\t\tworld.spawnEntity(builder);\r\n }", "public static Book createEntity() {\n Book book = new Book()\n .idBook(DEFAULT_ID_BOOK)\n .isbn(DEFAULT_ISBN)\n .title(DEFAULT_TITLE)\n .author(DEFAULT_AUTHOR)\n .year(DEFAULT_YEAR)\n .publisher(DEFAULT_PUBLISHER)\n .url_s(DEFAULT_URL_S)\n .url_m(DEFAULT_URL_M)\n .url_l(DEFAULT_URL_L);\n return book;\n }", "private void createTestData() {\n StoreEntity store = new StoreEntity();\n store.setStoreName(DEFAULT_STORE_NAME);\n store.setPecEmail(DEFAULT_PEC);\n store.setPhone(DEFAULT_PHONE);\n store.setImagePath(DEFAULT_IMAGE_PATH);\n store.setDefaultPassCode(STORE_DEFAULT_PASS_CODE);\n store.setStoreCap(DEFAULT_STORE_CAP);\n store.setCustomersInside(DEFAULT_CUSTOMERS_INSIDE);\n store.setAddress(new AddressEntity());\n\n // Create users for store.\n UserEntity manager = new UserEntity();\n manager.setUsercode(USER_CODE_MANAGER);\n manager.setRole(UserRole.MANAGER);\n\n UserEntity employee = new UserEntity();\n employee.setUsercode(USER_CODE_EMPLOYEE);\n employee.setRole(UserRole.EMPLOYEE);\n\n store.addUser(manager);\n store.addUser(employee);\n\n // Create a new ticket.\n TicketEntity ticket = new TicketEntity();\n ticket.setPassCode(INIT_PASS_CODE);\n ticket.setCustomerId(INIT_CUSTOMER_ID);\n ticket.setDate(new Date(new java.util.Date().getTime()));\n\n ticket.setArrivalTime(new Time(new java.util.Date().getTime()));\n ticket.setPassStatus(PassStatus.VALID);\n ticket.setQueueNumber(INIT_TICKET_QUEUE_NUMBER);\n store.addTicket(ticket);\n\n // Persist data.\n em.getTransaction().begin();\n\n em.persist(store);\n em.flush();\n\n // Saving ID generated from SQL after the persist.\n LAST_TICKET_ID = ticket.getTicketId();\n LAST_STORE_ID = store.getStoreId();\n LAST_MANAGER_ID = manager.getUserId();\n LAST_EMPLOYEE_ID = employee.getUserId();\n\n em.getTransaction().commit();\n }", "@Test\n public void testNewEntity_0args() {\n // newEntity() is not implemented!\n }", "public static NoteMaster createEntity(EntityManager em) {\n NoteMaster noteMaster = new NoteMaster()\n .semestre(DEFAULT_SEMESTRE)\n .noteCC1(DEFAULT_NOTE_CC_1)\n .noteCC2(DEFAULT_NOTE_CC_2)\n .noteFinal(DEFAULT_NOTE_FINAL)\n .date(DEFAULT_DATE);\n return noteMaster;\n }", "public Camp newEntity() { return new Camp(); }", "T create() throws PersistException;", "private EntityDef createEntityDef(Class<?> entityClass)\n {\n\t\tif (entityClass.isAnnotationPresent(InheritanceSingleTable.class)) {\n return new SingleTableSubclass.SingleTableSuperclass(entityClass);\n } else if (entityClass.getSuperclass().isAnnotationPresent(InheritanceSingleTable.class)) {\n return new SingleTableSubclass(entityClass);\n } else {\n return new EntityDef(entityClass);\n }\n\t}", "public static Restaurant createEntity(EntityManager em) {\n Restaurant restaurant = new Restaurant()\n .restaurantName(DEFAULT_RESTAURANT_NAME)\n .deliveryPrice(DEFAULT_DELIVERY_PRICE)\n .restaurantAddress(DEFAULT_RESTAURANT_ADDRESS)\n .restaurantCity(DEFAULT_RESTAURANT_CITY);\n return restaurant;\n }", "@Override\n\tpublic EmploieType creer(EmploieType entity) throws InvalideTogetException {\n\t\treturn emploieTypeRepository.save(entity);\n\t}", "public static Team createEntity(EntityManager em) {\n Team team = new Team().name(DEFAULT_NAME).description(DEFAULT_DESCRIPTION)\n .level(DEFAULT_LEVEL).totalMember(DEFAULT_TOTAL_MEMBER)\n .extraGroupName(DEFAULT_EXTRA_GROUP_NAME)\n .extraGroupDescription(DEFAULT_EXTRA_GROUP_DESCRIPTION)\n .extraGroupTotalMember(DEFAULT_EXTRA_GROUP_TOTAL_MEMBER);\n return team;\n }", "public void constructEntity (EntityBuilder entityBuilder, Position position){\n entityBuilder.createEntity();\n entityBuilder.buildPosition(position);\n entityBuilder.buildName();\n entityBuilder.buildPosition();\n entityBuilder.buildContComp();\n entityBuilder.buildPhysComp(length, width);\n entityBuilder.buildGraphComp(length, width);\n }", "public static Produit createEntity(EntityManager em) {\n Produit produit = new Produit()\n .designation(DEFAULT_DESIGNATION)\n .soldeInit(DEFAULT_SOLDE_INIT)\n .prixAchat(DEFAULT_PRIX_ACHAT)\n .prixVente(DEFAULT_PRIX_VENTE)\n .quantiteDispo(DEFAULT_QUANTITE_DISPO)\n .quantiteInit(DEFAULT_QUANTITE_INIT)\n .seuilReaprov(DEFAULT_SEUIL_REAPROV)\n .reference(DEFAULT_REFERENCE);\n return produit;\n }" ]
[ "0.7722865", "0.75046515", "0.74877393", "0.7361822", "0.7314417", "0.715623", "0.715623", "0.7150437", "0.7148942", "0.70781815", "0.7016245", "0.6803062", "0.6752023", "0.67399955", "0.67399955", "0.6712131", "0.6681996", "0.666649", "0.66406924", "0.66251004", "0.6624745", "0.66063696", "0.6588537", "0.6574247", "0.65736383", "0.656736", "0.65528405", "0.6531176", "0.652994", "0.6481684", "0.642032", "0.63870007", "0.63762575", "0.63687414", "0.6313521", "0.62982124", "0.62942463", "0.62588686", "0.6246452", "0.62427616", "0.623943", "0.6219469", "0.62091583", "0.6182159", "0.6181606", "0.61755615", "0.61696696", "0.6165239", "0.61607313", "0.61589456", "0.6154509", "0.6150869", "0.6142925", "0.6137096", "0.6135383", "0.61287326", "0.61248213", "0.6121201", "0.61074597", "0.61061865", "0.6101934", "0.609237", "0.60900897", "0.6081172", "0.60742337", "0.60697246", "0.60677755", "0.6066084", "0.606191", "0.60586566", "0.60517305", "0.60415095", "0.6038247", "0.60334224", "0.60283566", "0.60226434", "0.60216755", "0.60207134", "0.6015938", "0.6015417", "0.6014205", "0.60031706", "0.60025996", "0.6002286", "0.6000472", "0.59956545", "0.59945965", "0.59823614", "0.59779876", "0.5973843", "0.5971823", "0.5965482", "0.59633005", "0.59631854", "0.5952273", "0.594632", "0.59439117", "0.59430534", "0.5937932", "0.5930517", "0.5930485" ]
0.0
-1
Create an updated entity for this test. This is a static method, as tests for other entities might also need it, if they test an entity which requires the current entity.
public static Allegato createUpdatedEntity(EntityManager em) { Allegato allegato = new Allegato() .nomeAttachment(UPDATED_NOME_ATTACHMENT) .algoritmoCompressione(UPDATED_ALGORITMO_COMPRESSIONE) .formatoAttachment(UPDATED_FORMATO_ATTACHMENT) .descrizioneAttachment(UPDATED_DESCRIZIONE_ATTACHMENT) .attachment(UPDATED_ATTACHMENT); return allegato; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Student createUpdatedEntity(EntityManager em) {\n Student student = new Student()\n .firstName(UPDATED_FIRST_NAME)\n .middleName(UPDATED_MIDDLE_NAME)\n .lastName(UPDATED_LAST_NAME)\n .studentRegNumber(UPDATED_STUDENT_REG_NUMBER)\n .dateOfBirth(UPDATED_DATE_OF_BIRTH)\n .regDocType(UPDATED_REG_DOC_TYPE)\n .registrationDocumentNumber(UPDATED_REGISTRATION_DOCUMENT_NUMBER)\n .gender(UPDATED_GENDER)\n .nationality(UPDATED_NATIONALITY)\n .dateJoined(UPDATED_DATE_JOINED)\n .deleted(UPDATED_DELETED)\n .wxtJwtPq55wd(UPDATED_WXT_JWT_PQ_55_WD);\n // Add required entity\n NextOfKin nextOfKin;\n if (TestUtil.findAll(em, NextOfKin.class).isEmpty()) {\n nextOfKin = NextOfKinResourceIT.createUpdatedEntity(em);\n em.persist(nextOfKin);\n em.flush();\n } else {\n nextOfKin = TestUtil.findAll(em, NextOfKin.class).get(0);\n }\n student.getRelatives().add(nextOfKin);\n return student;\n }", "public static Prestamo createUpdatedEntity(EntityManager em) {\n Prestamo prestamo = new Prestamo().observaciones(UPDATED_OBSERVACIONES).fechaFin(UPDATED_FECHA_FIN);\n // Add required entity\n Libro libro;\n if (TestUtil.findAll(em, Libro.class).isEmpty()) {\n libro = LibroResourceIT.createUpdatedEntity(em);\n em.persist(libro);\n em.flush();\n } else {\n libro = TestUtil.findAll(em, Libro.class).get(0);\n }\n prestamo.setLibro(libro);\n // Add required entity\n Persona persona;\n if (TestUtil.findAll(em, Persona.class).isEmpty()) {\n persona = PersonaResourceIT.createUpdatedEntity(em);\n em.persist(persona);\n em.flush();\n } else {\n persona = TestUtil.findAll(em, Persona.class).get(0);\n }\n prestamo.setPersona(persona);\n // Add required entity\n User user = UserResourceIT.createEntity(em);\n em.persist(user);\n em.flush();\n prestamo.setUser(user);\n return prestamo;\n }", "protected T createSimulatedExistingEntity() {\n final T entity = createNewEntity();\n entity.setId(IDUtil.randomPositiveLong());\n\n when(getDAO().findOne(entity.getId())).thenReturn(entity);\n return entity;\n }", "public static SitAndGo createUpdatedEntity(EntityManager em) {\n SitAndGo sitAndGo = new SitAndGo()\n .format(UPDATED_FORMAT)\n .buyIn(UPDATED_BUY_IN)\n .ranking(UPDATED_RANKING)\n .profit(UPDATED_PROFIT)\n .bounty(UPDATED_BOUNTY);\n return sitAndGo;\n }", "public static ItemSubstitution createUpdatedEntity(EntityManager em) {\n ItemSubstitution itemSubstitution = new ItemSubstitution()\n .timestamp(UPDATED_TIMESTAMP)\n .type(UPDATED_TYPE)\n .substituteType(UPDATED_SUBSTITUTE_TYPE)\n .substituteNo(UPDATED_SUBSTITUTE_NO)\n .description(UPDATED_DESCRIPTION)\n .isInterchangeable(UPDATED_IS_INTERCHANGEABLE)\n .relationsLevel(UPDATED_RELATIONS_LEVEL)\n .isCheckedToOriginal(UPDATED_IS_CHECKED_TO_ORIGINAL)\n .origCheckDate(UPDATED_ORIG_CHECK_DATE);\n // Add required entity\n Item item;\n if (TestUtil.findAll(em, Item.class).isEmpty()) {\n item = ItemResourceIT.createUpdatedEntity(em);\n em.persist(item);\n em.flush();\n } else {\n item = TestUtil.findAll(em, Item.class).get(0);\n }\n itemSubstitution.getItems().add(item);\n return itemSubstitution;\n }", "Entity createEntity();", "@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }", "public static A createUpdatedEntity(EntityManager em) {\n A a = new A();\n return a;\n }", "public static Testtable2 createUpdatedEntity(EntityManager em) {\n Testtable2 testtable2 = new Testtable2();\n testtable2.setColumn2(UPDATED_COLUMN_2);\n return testtable2;\n }", "public static XepLoai createUpdatedEntity(EntityManager em) {\n XepLoai xepLoai = new XepLoai()\n .tenXepLoai(UPDATED_TEN_XEP_LOAI);\n return xepLoai;\n }", "public static QuizQuestion createUpdatedEntity(EntityManager em) {\n QuizQuestion quizQuestion = new QuizQuestion()\n .text(UPDATED_TEXT)\n .description(UPDATED_DESCRIPTION);\n // Add required entity\n Quiz quiz;\n if (TestUtil.findAll(em, Quiz.class).isEmpty()) {\n quiz = QuizResourceIT.createUpdatedEntity(em);\n em.persist(quiz);\n em.flush();\n } else {\n quiz = TestUtil.findAll(em, Quiz.class).get(0);\n }\n quizQuestion.setQuiz(quiz);\n return quizQuestion;\n }", "public static OrderItem createUpdatedEntity(EntityManager em) {\n OrderItem orderItem = new OrderItem().quantity(UPDATED_QUANTITY).totalPrice(UPDATED_TOTAL_PRICE).status(UPDATED_STATUS);\n return orderItem;\n }", "public static Arrete createUpdatedEntity(EntityManager em) {\n Arrete arrete = new Arrete()\n .intituleArrete(UPDATED_INTITULE_ARRETE)\n .numeroArrete(UPDATED_NUMERO_ARRETE)\n .dateSignature(UPDATED_DATE_SIGNATURE)\n .nombreAgrement(UPDATED_NOMBRE_AGREMENT);\n return arrete;\n }", "public static Unidade createUpdatedEntity(EntityManager em) {\n Unidade unidade = new Unidade()\n .descricao(UPDATED_DESCRICAO)\n .sigla(UPDATED_SIGLA)\n .situacao(UPDATED_SITUACAO)\n .controleDeEstoque(UPDATED_CONTROLE_DE_ESTOQUE)\n .idAlmoxarifado(UPDATED_ID_ALMOXARIFADO)\n .andar(UPDATED_ANDAR)\n .capacidade(UPDATED_CAPACIDADE)\n .horarioInicio(UPDATED_HORARIO_INICIO)\n .horarioFim(UPDATED_HORARIO_FIM)\n .localExame(UPDATED_LOCAL_EXAME)\n .rotinaDeFuncionamento(UPDATED_ROTINA_DE_FUNCIONAMENTO)\n .anexoDocumento(UPDATED_ANEXO_DOCUMENTO)\n .setor(UPDATED_SETOR)\n .idCentroDeAtividade(UPDATED_ID_CENTRO_DE_ATIVIDADE)\n .idChefia(UPDATED_ID_CHEFIA);\n // Add required entity\n TipoUnidade tipoUnidade;\n if (TestUtil.findAll(em, TipoUnidade.class).isEmpty()) {\n tipoUnidade = TipoUnidadeResourceIT.createUpdatedEntity(em);\n em.persist(tipoUnidade);\n em.flush();\n } else {\n tipoUnidade = TestUtil.findAll(em, TipoUnidade.class).get(0);\n }\n unidade.setTipoUnidade(tipoUnidade);\n return unidade;\n }", "public static Note createUpdatedEntity(EntityManager em) {\n Note note = new Note().content(UPDATED_CONTENT).title(UPDATED_TITLE).xpos(UPDATED_XPOS).ypos(UPDATED_YPOS);\n return note;\n }", "@Test\r\n public void testUpdate() throws Exception {\r\n MonitoriaEntity entity = data.get(0);\r\n PodamFactory pf = new PodamFactoryImpl();\r\n MonitoriaEntity nuevaEntity = pf.manufacturePojo(MonitoriaEntity.class);\r\n nuevaEntity.setId(entity.getId());\r\n persistence.update(nuevaEntity);\r\n// Assert.assertEquals(nuevaEntity.getName(), resp.getName());\r\n }", "@Override\n protected void createEntity() {\n ProjectStatus status = createProjectStatus(5);\n setEntity(status);\n }", "public static Restaurant createUpdatedEntity(EntityManager em) {\n Restaurant restaurant = new Restaurant()\n .restaurantName(UPDATED_RESTAURANT_NAME)\n .deliveryPrice(UPDATED_DELIVERY_PRICE)\n .restaurantAddress(UPDATED_RESTAURANT_ADDRESS)\n .restaurantCity(UPDATED_RESTAURANT_CITY);\n return restaurant;\n }", "public static Enseigner createUpdatedEntity(EntityManager em) {\n Enseigner enseigner = new Enseigner().dateDebut(UPDATED_DATE_DEBUT).dateFin(UPDATED_DATE_FIN);\n return enseigner;\n }", "public static Lot createUpdatedEntity(EntityManager em) {\n Lot lot = new Lot()\n .createdAt(UPDATED_CREATED_AT)\n .updatedAt(UPDATED_UPDATED_AT)\n .qte(UPDATED_QTE)\n .qtUg(UPDATED_QT_UG)\n .num(UPDATED_NUM)\n .dateFabrication(UPDATED_DATE_FABRICATION)\n .peremption(UPDATED_PEREMPTION)\n .peremptionstatus(UPDATED_PEREMPTIONSTATUS);\n return lot;\n }", "void createOrUpdate(T entity);", "public static EnteteVente createUpdatedEntity(EntityManager em) {\n EnteteVente enteteVente = new EnteteVente()\n .enteteVenteType(UPDATED_ENTETE_VENTE_TYPE)\n .enteteVenteTotalHT(UPDATED_ENTETE_VENTE_TOTAL_HT)\n .enteteVenteTotalTTC(UPDATED_ENTETE_VENTE_TOTAL_TTC)\n .enteteVenteDateCreation(UPDATED_ENTETE_VENTE_DATE_CREATION);\n return enteteVente;\n }", "public static TaskComment createUpdatedEntity(EntityManager em) {\n TaskComment taskComment = new TaskComment()\n .value(UPDATED_VALUE);\n // Add required entity\n Task newTask = TaskResourceIT.createUpdatedEntity(em);\n Task task = TestUtil.findAll(em, Task.class).stream()\n .filter(x -> x.getId().equals(newTask.getId()))\n .findAny().orElse(null);\n if (task == null) {\n task = newTask;\n em.persist(task);\n em.flush();\n }\n taskComment.setTask(task);\n return taskComment;\n }", "protected abstract ENTITY createEntity();", "public static Articulo createUpdatedEntity(EntityManager em) {\n Articulo articulo = new Articulo()\n .titulo(UPDATED_TITULO)\n .contenido(UPDATED_CONTENIDO)\n .fechaCreacion(UPDATED_FECHA_CREACION);\n return articulo;\n }", "public static Bounty createUpdatedEntity() {\n Bounty bounty = new Bounty()\n// .status(UPDATED_STATUS)\n// .issueUrl(UPDATED_URL)\n .amount(UPDATED_AMOUNT)\n// .experience(UPDATED_EXPERIENCE)\n// .commitment(UPDATED_COMMITMENT)\n// .type(UPDATED_TYPE)\n// .category(UPDATED_CATEGORY)\n// .keywords(UPDATED_KEYWORDS)\n .permission(UPDATED_PERMISSION)\n .expiryDate(UPDATED_EXPIRES);\n return bounty;\n }", "TestEntity buildEntity () {\n TestEntity testEntity = new TestEntity();\n testEntity.setName(\"Test name\");\n testEntity.setCheck(true);\n testEntity.setDateCreated(new Date(System.currentTimeMillis()));\n testEntity.setDescription(\"description\");\n\n Specialization specialization = new Specialization();\n specialization.setName(\"Frontend\");\n specialization.setLevel(\"Senior\");\n specialization.setYears(10);\n\n testEntity.setSpecialization(specialization);\n\n return testEntity;\n }", "public static GoodsReceiptDetails createUpdatedEntity(EntityManager em) {\n GoodsReceiptDetails goodsReceiptDetails = new GoodsReceiptDetails()\n .grnQty(UPDATED_GRN_QTY);\n return goodsReceiptDetails;\n }", "public static Emprunt createUpdatedEntity(EntityManager em) {\n Emprunt emprunt = new Emprunt()\n .dateEmprunt(UPDATED_DATE_EMPRUNT);\n return emprunt;\n }", "public static AnnotationType createUpdatedEntity() {\n return new AnnotationType()\n .name(UPDATED_NAME)\n .label(UPDATED_LABEL)\n .description(UPDATED_DESCRIPTION)\n .emotional(UPDATED_EMOTIONAL)\n .weight(UPDATED_WEIGHT)\n .color(UPDATED_COLOR)\n .projectId(DEFAULT_PROJECT_ID);\n }", "public static Invoice createUpdatedEntity(EntityManager em) {\n Invoice invoice = new Invoice()\n .companyName(UPDATED_COMPANY_NAME)\n .userName(UPDATED_USER_NAME)\n .userLastName(UPDATED_USER_LAST_NAME)\n .userEmail(UPDATED_USER_EMAIL)\n .dateCreated(UPDATED_DATE_CREATED)\n .total(UPDATED_TOTAL)\n .subTotal(UPDATED_SUB_TOTAL)\n .tax(UPDATED_TAX)\n .purchaseDescription(UPDATED_PURCHASE_DESCRIPTION)\n .itemQuantity(UPDATED_ITEM_QUANTITY)\n .itemPrice(UPDATED_ITEM_PRICE);\n return invoice;\n }", "public static TypeOeuvre createUpdatedEntity(EntityManager em) {\n TypeOeuvre typeOeuvre = new TypeOeuvre()\n .intitule(UPDATED_INTITULE);\n return typeOeuvre;\n }", "public static Demand createUpdatedEntity(EntityManager em) {\n Demand demand = new Demand()\n .name(UPDATED_NAME)\n .value(UPDATED_VALUE);\n return demand;\n }", "public static Acheteur createUpdatedEntity(EntityManager em) {\n Acheteur acheteur = new Acheteur()\n .typeClient(UPDATED_TYPE_CLIENT)\n .nom(UPDATED_NOM)\n .prenom(UPDATED_PRENOM)\n .tel(UPDATED_TEL)\n .cnib(UPDATED_CNIB)\n .email(UPDATED_EMAIL)\n .adresse(UPDATED_ADRESSE)\n .numroBanquaire(UPDATED_NUMRO_BANQUAIRE)\n .deleted(UPDATED_DELETED);\n return acheteur;\n }", "T createEntity();", "public static MGachaRendition createUpdatedEntity(EntityManager em) {\n MGachaRendition mGachaRendition = new MGachaRendition()\n .mainPrefabName(UPDATED_MAIN_PREFAB_NAME)\n .resultExpectedUpPrefabName(UPDATED_RESULT_EXPECTED_UP_PREFAB_NAME)\n .resultQuestionPrefabName(UPDATED_RESULT_QUESTION_PREFAB_NAME)\n .soundSwitchEventName(UPDATED_SOUND_SWITCH_EVENT_NAME);\n return mGachaRendition;\n }", "E create(E entity);", "E create(E entity);", "public static BII createUpdatedEntity() {\n BII bII = new BII()\n .name(UPDATED_NAME)\n .type(UPDATED_TYPE)\n .biiId(UPDATED_BII_ID)\n .detectionTimestamp(UPDATED_DETECTION_TIMESTAMP)\n .sourceId(UPDATED_SOURCE_ID)\n .detectionSystemName(UPDATED_DETECTION_SYSTEM_NAME)\n .detectedValue(UPDATED_DETECTED_VALUE)\n .detectionContext(UPDATED_DETECTION_CONTEXT)\n .etc(UPDATED_ETC)\n .etcetc(UPDATED_ETCETC);\n return bII;\n }", "public static EnrollmentDate createUpdatedEntity(EntityManager em) {\n EnrollmentDate enrollmentDate = new EnrollmentDate()\n .name(UPDATED_NAME)\n .isPreEnrollment(UPDATED_IS_PRE_ENROLLMENT)\n .startDate(UPDATED_START_DATE)\n .endDate(UPDATED_END_DATE);\n // Add required entity\n Semester semester;\n if (TestUtil.findAll(em, Semester.class).isEmpty()) {\n semester = SemesterResourceIT.createUpdatedEntity(em);\n em.persist(semester);\n em.flush();\n } else {\n semester = TestUtil.findAll(em, Semester.class).get(0);\n }\n enrollmentDate.setSemester(semester);\n return enrollmentDate;\n }", "public static Posicion createUpdatedEntity(EntityManager em) {\n Posicion posicion = new Posicion()\n .titulo(UPDATED_TITULO)\n .descripcion(UPDATED_DESCRIPCION)\n .numeroPuestos(UPDATED_NUMERO_PUESTOS)\n .salarioMinimo(UPDATED_SALARIO_MINIMO)\n .salarioMaximo(UPDATED_SALARIO_MAXIMO)\n .fechaAlta(UPDATED_FECHA_ALTA)\n .fechaNecesidad(UPDATED_FECHA_NECESIDAD);\n return posicion;\n }", "@Test\n void updateSuccess () {\n TestEntity testEntity = buildEntity();\n Api2 instance = new Api2();\n Long result = instance.save(testEntity);\n\n String name = \"Edited name\";\n boolean check = false;\n String description = \"edited description\";\n\n if (result != null) {\n testEntity.setName(name);\n testEntity.setCheck(check);\n testEntity.setDescription(description);\n instance.update(testEntity);\n\n Optional<TestEntity> optionalTestEntity = instance.getById(TestEntity.class, testEntity.getId());\n assertTrue(optionalTestEntity.isPresent());\n\n if (optionalTestEntity.isPresent()) {\n TestEntity entity = optionalTestEntity.get();\n\n assertEquals(entity.getName(), name);\n assertEquals(entity.getDescription(), description);\n assertEquals(entity.isCheck(), check);\n } else {\n fail();\n }\n } else {\n fail();\n }\n }", "public static Poen createUpdatedEntity(EntityManager em) {\n Poen poen = new Poen()\n .tip(UPDATED_TIP);\n return poen;\n }", "public static OrderDetailInfo createUpdatedEntity(EntityManager em) {\n OrderDetailInfo orderDetailInfo = new OrderDetailInfo()\n .productName(UPDATED_PRODUCT_NAME)\n .priceProduct(UPDATED_PRICE_PRODUCT)\n .quantityOrder(UPDATED_QUANTITY_ORDER)\n .amount(UPDATED_AMOUNT)\n .orderDate(UPDATED_ORDER_DATE);\n return orderDetailInfo;\n }", "public static ProcessExecution createUpdatedEntity(EntityManager em) {\n ProcessExecution processExecution = new ProcessExecution()\n .execution(UPDATED_EXECUTION);\n return processExecution;\n }", "public static Incident createUpdatedEntity(EntityManager em) {\n Incident incident = new Incident()\n .title(UPDATED_TITLE)\n .risk(UPDATED_RISK)\n .notes(UPDATED_NOTES);\n return incident;\n }", "public static Territorio createUpdatedEntity(EntityManager em) {\n Territorio territorio = new Territorio().nome(UPDATED_NOME);\n return territorio;\n }", "public static Invite createUpdatedEntity(EntityManager em) {\n Invite invite = new Invite()\n .nom(UPDATED_NOM)\n .prenom(UPDATED_PRENOM)\n .mail(UPDATED_MAIL)\n .mdp(UPDATED_MDP)\n .login(UPDATED_LOGIN)\n .points(UPDATED_POINTS);\n return invite;\n }", "public static DataModel createUpdatedEntity(EntityManager em) {\n DataModel dataModel = new DataModel()\n .key(UPDATED_KEY)\n .label(UPDATED_LABEL)\n .dataFormat(UPDATED_DATA_FORMAT)\n .maxLength(UPDATED_MAX_LENGTH)\n .precision(UPDATED_PRECISION)\n .modelValues(UPDATED_MODEL_VALUES);\n return dataModel;\n }", "void create(T entity);", "public static Horaire createUpdatedEntity(EntityManager em) {\n Horaire horaire = new Horaire()\n .heureDepart(UPDATED_HEURE_DEPART)\n .heureFin(UPDATED_HEURE_FIN)\n .dateJour(UPDATED_DATE_JOUR);\n return horaire;\n }", "public static Empleado createUpdatedEntity(EntityManager em) {\n Empleado empleado = new Empleado()\n .nombre(UPDATED_NOMBRE)\n .primerApellido(UPDATED_PRIMER_APELLIDO)\n .segundoApellido(UPDATED_SEGUNDO_APELLIDO)\n .sexo(UPDATED_SEXO)\n .fechaNacimiento(UPDATED_FECHA_NACIMIENTO)\n .fechaIngreso(UPDATED_FECHA_INGRESO)\n .salario(UPDATED_SALARIO)\n .puesto(UPDATED_PUESTO)\n .estado(UPDATED_ESTADO);\n return empleado;\n }", "public static NoteMaster createUpdatedEntity(EntityManager em) {\n NoteMaster noteMaster = new NoteMaster()\n .semestre(UPDATED_SEMESTRE)\n .noteCC1(UPDATED_NOTE_CC_1)\n .noteCC2(UPDATED_NOTE_CC_2)\n .noteFinal(UPDATED_NOTE_FINAL)\n .date(UPDATED_DATE);\n return noteMaster;\n }", "public static TaskExecution createUpdatedEntity(EntityManager em) {\n TaskExecution taskExecution = new TaskExecution()\n .jobOrderTimestamp(UPDATED_JOB_ORDER_TIMESTAMP)\n .taskExecutionStatus(UPDATED_TASK_EXECUTION_STATUS)\n .taskExecutionStartTimestamp(UPDATED_TASK_EXECUTION_START_TIMESTAMP)\n .taskExecutionEndTimestamp(UPDATED_TASK_EXECUTION_END_TIMESTAMP);\n return taskExecution;\n }", "void create(E entity);", "public static WorkPlace createUpdatedEntity(EntityManager em) {\n WorkPlace workPlace = new WorkPlace()\n .doctorIdpCode(UPDATED_DOCTOR_IDP_CODE)\n .name(UPDATED_NAME)\n .locationName(UPDATED_LOCATION_NAME)\n .location(UPDATED_LOCATION);\n return workPlace;\n }", "public static EventAttendance createUpdatedEntity(EntityManager em) {\n EventAttendance eventAttendance = new EventAttendance()\n .attendanceDate(UPDATED_ATTENDANCE_DATE);\n return eventAttendance;\n }", "public static Fornecedor createUpdatedEntity(EntityManager em) {\n Fornecedor fornecedor = new Fornecedor()\n .tipo(UPDATED_TIPO)\n .cpf(UPDATED_CPF)\n .cnpj(UPDATED_CNPJ)\n .primeiroNome(UPDATED_PRIMEIRO_NOME)\n .nomeMeio(UPDATED_NOME_MEIO)\n .sobreNome(UPDATED_SOBRE_NOME)\n .saudacao(UPDATED_SAUDACAO)\n .titulo(UPDATED_TITULO)\n .cep(UPDATED_CEP)\n .tipoLogradouro(UPDATED_TIPO_LOGRADOURO)\n .nomeLogradouro(UPDATED_NOME_LOGRADOURO)\n .complemento(UPDATED_COMPLEMENTO);\n return fornecedor;\n }", "public Entity newEntity() { return newMyEntity(); }", "public Entity newEntity() { return newMyEntity(); }", "public static Transaction createUpdatedEntity(EntityManager em) {\n Transaction transaction = new Transaction()\n .date(UPDATED_DATE);\n return transaction;\n }", "public static Author createUpdatedEntity(EntityManager em) {\n Author author = new Author()\n .firstName(UPDATED_FIRST_NAME)\n .lastName(UPDATED_LAST_NAME);\n return author;\n }", "public static IndActivation createUpdatedEntity(EntityManager em) {\n IndActivation indActivation = new IndActivation()\n .name(UPDATED_NAME)\n .activity(UPDATED_ACTIVITY)\n .customerId(UPDATED_CUSTOMER_ID)\n .individualId(UPDATED_INDIVIDUAL_ID);\n return indActivation;\n }", "public void updateEntity();", "public EntityType initUpdateEntity(DtoType dto) throws ClassNotFoundException, IllegalArgumentException, IllegalAccessException;", "public static MQuestSpecialReward createUpdatedEntity(EntityManager em) {\n MQuestSpecialReward mQuestSpecialReward = new MQuestSpecialReward()\n .groupId(UPDATED_GROUP_ID)\n .weight(UPDATED_WEIGHT)\n .rank(UPDATED_RANK)\n .contentType(UPDATED_CONTENT_TYPE)\n .contentId(UPDATED_CONTENT_ID)\n .contentAmount(UPDATED_CONTENT_AMOUNT);\n return mQuestSpecialReward;\n }", "protected abstract EntityBase createEntity() throws Exception;", "public static Sectie createUpdatedEntity(EntityManager em) {\n Sectie sectie = new Sectie()\n .sectieId(UPDATED_SECTIE_ID)\n .nume(UPDATED_NUME)\n .sefId(UPDATED_SEF_ID)\n .tag(UPDATED_TAG)\n .nrPaturi(UPDATED_NR_PATURI);\n return sectie;\n }", "public static RolEmpleado createUpdatedEntity(EntityManager em) {\n RolEmpleado rolEmpleado = new RolEmpleado();\n return rolEmpleado;\n }", "public static ExUser createUpdatedEntity(EntityManager em) {\n ExUser exUser = new ExUser()\n .userKey(UPDATED_USER_KEY);\n return exUser;\n }", "public static ConceptDataType createUpdatedEntity(EntityManager em) {\n ConceptDataType conceptDataType = new ConceptDataType()\n .uuid(UPDATED_UUID)\n .name(UPDATED_NAME)\n .hl7Abbreviation(UPDATED_HL_7_ABBREVIATION)\n .description(UPDATED_DESCRIPTION);\n return conceptDataType;\n }", "public static Info createUpdatedEntity(EntityManager em) {\n Info info = new Info()\n .nom(UPDATED_NOM)\n .prenom(UPDATED_PRENOM)\n .etablissement(UPDATED_ETABLISSEMENT);\n return info;\n }", "public static Dishestype createUpdatedEntity(EntityManager em) {\n Dishestype dishestype = new Dishestype()\n .name(UPDATED_NAME)\n .state(UPDATED_STATE)\n .creator(UPDATED_CREATOR)\n .createdate(UPDATED_CREATEDATE)\n .modifier(UPDATED_MODIFIER)\n .modifierdate(UPDATED_MODIFIERDATE)\n .modifiernum(UPDATED_MODIFIERNUM)\n .logicdelete(UPDATED_LOGICDELETE)\n .other(UPDATED_OTHER);\n return dishestype;\n }", "public static UserDetails createUpdatedEntity(EntityManager em) {\n UserDetails userDetails = new UserDetails()\n .studentCardNumber(UPDATED_STUDENT_CARD_NUMBER)\n .name(UPDATED_NAME)\n .surname(UPDATED_SURNAME)\n .telephoneNumber(UPDATED_TELEPHONE_NUMBER)\n .studyYear(UPDATED_STUDY_YEAR)\n .faculty(UPDATED_FACULTY)\n .fieldOfStudy(UPDATED_FIELD_OF_STUDY);\n return userDetails;\n }", "public static QueryData createUpdatedEntity(EntityManager em) {\n QueryData queryData = new QueryData()\n .dataValue(UPDATED_DATA_VALUE);\n return queryData;\n }", "E update(E entity);", "E update(E entity);", "public static Pessoa createUpdatedEntity(EntityManager em) {\n Pessoa pessoa = new Pessoa()\n .nome(UPDATED_NOME)\n .email(UPDATED_EMAIL)\n .telefone(UPDATED_TELEFONE)\n .dataNascimento(UPDATED_DATA_NASCIMENTO)\n .cadastro(UPDATED_CADASTRO);\n return pessoa;\n }", "public static Source createUpdatedEntity(EntityManager em) {\n Source source = new Source()\n .idGloden(UPDATED_ID_GLODEN)\n .name(UPDATED_NAME)\n .description(UPDATED_DESCRIPTION)\n .updateDate(UPDATED_UPDATE_DATE)\n .creationDate(UPDATED_CREATION_DATE);\n return source;\n }", "public static InventoryProvider createUpdatedEntity(EntityManager em) {\n InventoryProvider inventoryProvider = new InventoryProvider()\n .idInventoryProvider(UPDATED_ID_INVENTORY_PROVIDER)\n .code(UPDATED_CODE)\n .name(UPDATED_NAME)\n .price(UPDATED_PRICE)\n .cuantity(UPDATED_CUANTITY);\n return inventoryProvider;\n }", "public static Userextra createUpdatedEntity(EntityManager em) {\n Userextra userextra = new Userextra().accountype(UPDATED_ACCOUNTYPE);\n // Add required entity\n User user = UserResourceIT.createEntity(em);\n em.persist(user);\n em.flush();\n userextra.setUser(user);\n return userextra;\n }", "void create(T entity) throws Exception;", "public static ListWrkStatus createUpdatedEntity(EntityManager em) {\n ListWrkStatus listWrkStatus = new ListWrkStatus()\n .code(UPDATED_CODE)\n .name(UPDATED_NAME)\n .fullName(UPDATED_FULL_NAME)\n .isCurrentFlag(UPDATED_IS_CURRENT_FLAG)\n .description(UPDATED_DESCRIPTION)\n .dateCreate(UPDATED_DATE_CREATE)\n .dateEdit(UPDATED_DATE_EDIT)\n .creator(UPDATED_CREATOR)\n .editor(UPDATED_EDITOR);\n // Add required entity\n ListWrkKind listWrkKind;\n if (TestUtil.findAll(em, ListWrkKind.class).isEmpty()) {\n listWrkKind = ListWrkKindResourceIT.createUpdatedEntity(em);\n em.persist(listWrkKind);\n em.flush();\n } else {\n listWrkKind = TestUtil.findAll(em, ListWrkKind.class).get(0);\n }\n listWrkStatus.setIdWrkKind(listWrkKind);\n return listWrkStatus;\n }", "public static DoctorAssistant createUpdatedEntity(EntityManager em) {\n DoctorAssistant doctorAssistant = new DoctorAssistant()\n .canPrescribe(UPDATED_CAN_PRESCRIBE);\n return doctorAssistant;\n }", "public static Kpi createUpdatedEntity(EntityManager em) {\n Kpi kpi = new Kpi()\n .title(UPDATED_TITLE)\n .reward(UPDATED_REWARD)\n .rewardDistribution(UPDATED_REWARD_DISTRIBUTION)\n .gradingProcess(UPDATED_GRADING_PROCESS)\n .active(UPDATED_ACTIVE)\n .purpose(UPDATED_PURPOSE)\n .scopeOfWork(UPDATED_SCOPE_OF_WORK)\n .rewardDistributionInfo(UPDATED_REWARD_DISTRIBUTION_INFO)\n .reporting(UPDATED_REPORTING)\n .fiatPoolFactor(UPDATED_FIAT_POOL_FACTOR)\n .grading(UPDATED_GRADING);\n return kpi;\n }", "private FailingEntity createFailingEntity() {\n FailingEntity entity = app.createAndManageChild(EntitySpec.create(FailingEntity.class)\n .configure(FailingEntity.FAIL_ON_START, true));\n return entity;\n }", "public static Location createUpdatedEntity(EntityManager em) {\n Location location = new Location()\n .name(UPDATED_NAME)\n .latitude(UPDATED_LATITUDE)\n .longitude(UPDATED_LONGITUDE)\n .details(UPDATED_DETAILS)\n .activated(UPDATED_ACTIVATED);\n return location;\n }", "public static ModePassation createUpdatedEntity(EntityManager em) {\n ModePassation modePassation = new ModePassation()\n .libelle(UPDATED_LIBELLE)\n .code(UPDATED_CODE)\n .description(UPDATED_DESCRIPTION);\n return modePassation;\n }", "public static Favorite createUpdatedEntity(EntityManager em) {\n Favorite favorite = new Favorite();\n return favorite;\n }", "public static TipoObra createUpdatedEntity(EntityManager em) {\n TipoObra tipoObra = new TipoObra().descripcion(UPDATED_DESCRIPCION);\n return tipoObra;\n }", "public static LifeConstantUnit createUpdatedEntity(EntityManager em) {\n LifeConstantUnit lifeConstantUnit = new LifeConstantUnit()\n .name(UPDATED_NAME)\n .description(UPDATED_DESCRIPTION);\n return lifeConstantUnit;\n }", "public static Timbre createUpdatedEntity(EntityManager em) {\n Timbre timbre = new Timbre().timbre(UPDATED_TIMBRE);\n return timbre;\n }", "public static UserExtra createUpdatedEntity(EntityManager em) {\n UserExtra userExtra = new UserExtra().currentParkingSpot(UPDATED_CURRENT_PARKING_SPOT).timeOfParking(UPDATED_TIME_OF_PARKING);\n return userExtra;\n }", "public static MChallengeQuestWorld createUpdatedEntity(EntityManager em) {\n MChallengeQuestWorld mChallengeQuestWorld = new MChallengeQuestWorld()\n .setId(UPDATED_SET_ID)\n .number(UPDATED_NUMBER)\n .name(UPDATED_NAME)\n .imagePath(UPDATED_IMAGE_PATH)\n .backgroundImagePath(UPDATED_BACKGROUND_IMAGE_PATH)\n .description(UPDATED_DESCRIPTION)\n .stageUnlockPattern(UPDATED_STAGE_UNLOCK_PATTERN)\n .arousalBanner(UPDATED_AROUSAL_BANNER)\n .specialRewardContentType(UPDATED_SPECIAL_REWARD_CONTENT_TYPE)\n .specialRewardContentId(UPDATED_SPECIAL_REWARD_CONTENT_ID)\n .isEnableCoop(UPDATED_IS_ENABLE_COOP);\n return mChallengeQuestWorld;\n }", "public static TypeIntervention createUpdatedEntity(EntityManager em) {\n TypeIntervention typeIntervention = new TypeIntervention()\n .libelle(UPDATED_LIBELLE);\n return typeIntervention;\n }", "public static ItemSubstitution createEntity(EntityManager em) {\n ItemSubstitution itemSubstitution = new ItemSubstitution()\n .timestamp(DEFAULT_TIMESTAMP)\n .type(DEFAULT_TYPE)\n .substituteType(DEFAULT_SUBSTITUTE_TYPE)\n .substituteNo(DEFAULT_SUBSTITUTE_NO)\n .description(DEFAULT_DESCRIPTION)\n .isInterchangeable(DEFAULT_IS_INTERCHANGEABLE)\n .relationsLevel(DEFAULT_RELATIONS_LEVEL)\n .isCheckedToOriginal(DEFAULT_IS_CHECKED_TO_ORIGINAL)\n .origCheckDate(DEFAULT_ORIG_CHECK_DATE);\n // Add required entity\n Item item;\n if (TestUtil.findAll(em, Item.class).isEmpty()) {\n item = ItemResourceIT.createEntity(em);\n em.persist(item);\n em.flush();\n } else {\n item = TestUtil.findAll(em, Item.class).get(0);\n }\n itemSubstitution.getItems().add(item);\n return itemSubstitution;\n }", "public void createNewObject(Representation entity) throws ResourceException {\r\n\t\tT entry = createObjectFromHeaders(null, entity);\r\n\t\texecuteUpdate(entity, entry, createUpdateObject(entry));\r\n\r\n\t}", "public static Category createUpdatedEntity(EntityManager em) {\n Category category = new Category()\n .label(UPDATED_LABEL)\n .primaryColor(UPDATED_PRIMARY_COLOR)\n .secondaryColor(UPDATED_SECONDARY_COLOR);\n // Add required entity\n User user = UserResourceIT.createEntity(em);\n em.persist(user);\n em.flush();\n category.setOwner(user);\n return category;\n }", "public static Course createUpdatedEntity(EntityManager em) {\n Course course = new Course()\n .title(UPDATED_TITLE)\n .description(UPDATED_DESCRIPTION)\n .courseStartDate(UPDATED_COURSE_START_DATE)\n .courseEndDate(UPDATED_COURSE_END_DATE)\n .registerStartDate(UPDATED_REGISTER_START_DATE)\n .registerEndDate(UPDATED_REGISTER_END_DATE)\n .duration(UPDATED_DURATION)\n .maximumNumberOfParticipants(UPDATED_MAXIMUM_NUMBER_OF_PARTICIPANTS)\n .minimalNumberOfParticipants(UPDATED_MINIMAL_NUMBER_OF_PARTICIPANTS)\n .lecturerName(UPDATED_LECTURER_NAME)\n .lecturerSurname(UPDATED_LECTURER_SURNAME)\n .pointPerCourse(UPDATED_POINT_PER_COURSE)\n .isVisibleInApp(UPDATED_IS_VISIBLE_IN_APP);\n return course;\n }", "public static TestEntity createEntity(EntityManager em) {\n TestEntity testEntity = new TestEntity();\n // Add required entity\n User user = UserResourceIntTest.createEntity(em);\n em.persist(user);\n em.flush();\n testEntity.setUserOneToMany(user);\n return testEntity;\n }" ]
[ "0.6945333", "0.67885923", "0.67884284", "0.67190146", "0.66947293", "0.6693256", "0.6664715", "0.6637128", "0.66206217", "0.6516117", "0.65103185", "0.64481264", "0.64244235", "0.64216477", "0.6421002", "0.6416659", "0.64125335", "0.6410089", "0.6404945", "0.63945645", "0.63905084", "0.63892305", "0.63808584", "0.6362638", "0.6342646", "0.63421017", "0.63290113", "0.632421", "0.631868", "0.6312816", "0.6301153", "0.6276384", "0.62712795", "0.6270281", "0.62642306", "0.6262486", "0.6256512", "0.6256512", "0.6256436", "0.62383926", "0.62279737", "0.6183122", "0.61775243", "0.6174206", "0.6167336", "0.6164095", "0.615667", "0.6137543", "0.61350155", "0.6128556", "0.61257243", "0.61187416", "0.6116823", "0.6116148", "0.6114643", "0.6102823", "0.6101914", "0.6091472", "0.6086136", "0.6086136", "0.60738945", "0.6068376", "0.60646856", "0.6062977", "0.6054965", "0.6050235", "0.6047614", "0.6047325", "0.6033038", "0.602994", "0.60257095", "0.602432", "0.60155606", "0.60120225", "0.6007069", "0.6005039", "0.6005039", "0.5997111", "0.59883964", "0.59828323", "0.59785664", "0.59696305", "0.59668034", "0.59660715", "0.5963211", "0.5952646", "0.59486413", "0.5945522", "0.594501", "0.594262", "0.5938391", "0.5936684", "0.5935503", "0.593424", "0.5925601", "0.5920101", "0.59142405", "0.5911454", "0.5911378", "0.5909297" ]
0.61179155
52
TODO move logic to .deb? or prompt before doing, this can be a security risk
private static void installFlashLinux(File xulInstallPath) { File pluginsDir = new File(xulInstallPath, "/xulrunner/plugins"); if (OSUtils.isLinux()) { for (File file : pluginsDir.listFiles()) { if (file.isFile() && file.getName().contains("flash")) { return;// flash already installed } } File[] possibleFlashLocations = new File[] { new File("/usr/lib/flash-plugin/"), new File("/usr/lib/firefox/plugins"), new File("/usr/lib/mozilla/plugins"), new File("/usr/lib/iceweasle"), new File("/usr/lib/xulrunner"), new File(CommonUtils.getUserHomeDir(), "/.mozilla/plugins") }; for (File flashLocation : possibleFlashLocations) { if (flashLocation.exists() && flashLocation.isDirectory()) { boolean foundFlash = false; for (File flashFile : flashLocation.listFiles()) { if (flashFile.getName().contains("flash")) { // TODO make sure we are not using a file we cannot // support, ie 64 bit running in 32 bit jvm File linkTarget = new File(pluginsDir, "/" + flashFile.getName()); // using a symlink instead of copying, debian had // issues with copying the library. try { FileUtils.createSymbolicLink(flashFile, linkTarget); foundFlash = true; } catch (IOException e) { LOG.debug(e.getMessage(), e); } catch (InterruptedException e) { LOG.debug(e.getMessage(), e); } // continue looping because there might be more than // 1 file at this location for flash to work } } if (foundFlash) { // flash was found at another location and copied break; } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void askDefaultProduction();", "final private static void usage () {\n\t\t usage_print () ;\n\t\t System.exit (0) ;\n }", "private static void inputInstallerCommand() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString commandLine = scanner.nextLine();\n\t\t//Case-sensitive ans should be always Upper case\n\t\tif (!commandLine.equals(\"END\")) {\n\t\t\tcallIstallerCommand(commandLine);\n\t\t\tinputInstallerCommand();\n\t\t}\n\t}", "private static void printUsageAndExit() {\n\t\t printUsageAndExit(null);\n\t\t }", "private static void doUsage() {\r\n\t\tSystem.out.println(\"Usage: SpellChecker [-i] <dictionary> <document>\\n\"\r\n\t\t\t\t+ \" -d <dictionary>\\n\" + \" -h\");\r\n\t}", "private static void help(){\r\n System.out.println(\"\\n\\t Something Went Wrong\\nType\\t java -jar nipunpassgen.jar -h\\t for mor info\");\r\n System.exit(0);\r\n }", "private boolean promptCommand() {}", "void askDevCardProduction();", "protected static void printUsage() {\n\t}", "public static void main(String[] args) {\n\t\tuserDecide();\n\t\n\t}", "public void toolAccepted()\n {\n printOut(cliToolsManager.simpleQuestionsMaker(\"Strumento accettato\", 40, true));\n }", "private static void prompt(boolean isTestRun) {\n if (!isTestRun)\n System.out.print(\"> \");\n }", "void printUsage(){\n\t\tSystem.out.println(\"Usage: RefactorCalculator [prettyPrint.tsv] [tokenfile.ccfxprep] [cloneM.tsv] [lineM.tsv]\");\n\t\tSystem.out.println(\"Type -h for help.\");\n\t\tSystem.exit(1); //error\n\t}", "private static void printUsage() {\n\t\tSystem.out.println(\"[0] apk files directory\");\n\t\tSystem.out.println(\"[1] android-jar directory\");\n\t}", "@DSComment(\"Package priviledge\")\n @DSBan(DSCat.DEFAULT_MODIFIER)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:56:28.347 -0500\", hash_original_method = \"72EE977944BFE2711990DF062DD76748\", hash_generated_method = \"C135F20F4FD32489ABF297ACDC7DAB20\")\n \n void interrupt(){\n }", "final private static void usage_print () {\n\t\tSystem.out.println (NAME + ' ' + VERSION + ' ' + COPYRIGHT) ;\n\t\tSystem.out.println () ;\n\n\t\tSystem.out.println (\n\t\t \"Usage: java bcmixin.Main [<options>] <modelname> <equationname>\"\n\t\t) ;\n\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\"where [<options>] include any of the following:\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\" -help\") ;\n\t\tSystem.out.println (\" Prints this helpful message, then exits.\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\" where <modelname> means the model name that you want to work on.\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\"where <equationname> provides the equation name, which must end with .equation.\") ;\n\t\tSystem.out.println () ;\n }", "public void disass(){\n\t\tString temp = \"apktool d \" + f;\n\t\t\n\t\t//put it in the cmd\n\t\tProcessBuilder builder = new ProcessBuilder(\"cmd.exe\",\"/c\",temp);\n\t\tbuilder.redirectErrorStream(true);\n\t\t\n\t\ttry{\n\t\t\tProcess p = builder.start();\n\t\t}catch(IOException e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\t\n\t}", "public static void main(String[] args) {\n \n new Scanner (System.in); \n System.out.println(\"Estoy probando GIT y GIT HUB\");\n System.out.println(\"Ahora estoy probando a crear una segunda versión.\");\n System.out.println(\"Estoy probando GIT y GIT HUB\");\n \n }", "public static void prompt() {\n\t\tSystem.out.printf(\"\\n입력 > \");\n\t}", "public void printPackagePowerUsage() {\n }", "public static void checkFromUser() {\n\t\tif (askUser(\"Please type y to execute program and any other key to stop\").contentEquals(\"y\")) {\n\t\t\tSystem.out.println(\"Continuing\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Terminating program\");\n\t\t\tSystem.exit(0); \n\t\t}\n\t\tSystem.out.println(\"Calculating the greatest house income, the greatest income after expenditure and greatest savings from the given 3 families\");\n\t}", "private static void printUsageAndExit() {\n printUsageAndExit(null);\n }", "private void promptForSomething() {\n userInputValue = prompt(\"Please enter something: \", true);\n System.out.println(\"Thank you. You can see your input by choosing the Display Something menu\");\n }", "private void instruct() {\n\t\tif (vsComputer) {\n\t\t\tSystem.out.println(\"\"\"\n 1. Stone\n 2. Paper\n 3. Scissors\n You have to enter your choice\n \"\"\");\n\t\t}\n\t}", "public String getSuggestPackage() {\n/* 63 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private static void printEmptyMessage() {\r\n\t\tSystem.out.println(\"usage: bfck [-p <filename>] [-i <filename>] [-o <filename>]\\n\"\r\n\t\t\t\t+ \" [--rewrite] [--translate] [--check] [--cgen]\\n\"\r\n\t\t\t\t+ \"BRAINFUCK [M\\u00fcl93] is a programming language created in 1993 by Urban M\\u00fcller,\"\r\n\t\t\t\t+ \" and notable for its extreme minimalism.\\nThis is the BrainFuck interpreter made by the group PolyStirN,\"\r\n\t\t\t\t+ \" composed of Jo\\u00ebl CANCELA VAZ, Pierre RAINERO, Aghiles DZIRI and Tanguy INVERNIZZI.\");\r\n\t}", "private static void printUsage() \r\n\t{\r\n\t\tSystem.err.println(\"Usage: java GeneBankSearch \"\r\n\t\t\t\t+ \"<0/1(no/with Cache)> <btree file> <query file> \"\r\n\t\t\t\t+ \"[<cache size>] [<debug level>]\\n\");\r\n\t\tSystem.exit(1); \r\n\t}", "private static void usage()\n {\n System.err.println( \"Usage: java at.ac.tuwien.dbai.pdfwrap.ProcessFile [OPTIONS] <PDF file> [Text File]\\n\" +\n \" -password <password> Password to decrypt document\\n\" +\n \" -encoding <output encoding> (ISO-8859-1,UTF-16BE,UTF-16LE,...)\\n\" +\n \" -xmillum output XMIllum XML (instead of XHTML)\\n\" +\n \" -norulinglines do not process ruling lines\\n\" +\n \" -spaces split low-level segments according to spaces\\n\" +\n \" -console Send text to console instead of file\\n\" +\n \" -startPage <number> The first page to start extraction(1 based)\\n\" +\n \" -endPage <number> The last page to extract(inclusive)\\n\" +\n \" <PDF file> The PDF document to use\\n\" +\n \" [Text File] The file to write the text to\\n\"\n );\n System.exit( 1 );\n }", "public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner (System.in);\n\t\t\n\t\tSystem.out.println(\"Welcome to DMV\");\n\t\tSystem.out.println(\"How old are you?\");\n\t\t\n\t\tint age = scan.nextInt();\n\t\t\n\t\tif (age >= 18)\n\t\t{ System.out.println(\" You are old enough for Driver's License\"); }\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(\"You are too young, but you can have a permit\");\n\t\t}\n\t\t\n\t}", "abstract void mainPrompt();", "private static String promptFileContent(String prompt) {\n\t\tSystem.out.println(prompt);\n\t\tString line = null;\n\t\tString content = \"\";\n\t\twhile (!(line = scnr.nextLine()).equals(\"q\")) {\n\t\t\tcontent += line + \"\\n\";\n\t\t}\n\t\treturn content;\n\t}", "private static void askForContinue() {\n\t\t\t\n\t\t}", "private static void writeShortManual() {\n System.out.println(\"\\nPromethean CLI v1.0.0\");\n System.out.println(\"Commands:\");\n System.out.println(\"\\tplan - create (and optionally execute) a plan given input json\");\n System.out.println(\"\\ttestgen - generate a test input file given initial and goal states\");\n System.out.println(\"Run <command> --help to see all options\\n\");\n }", "public static void main(String[] args) {\n String answer;\n do {\n answer = getWishItem();\n if (!answer.equals(\"exit\")) {\n System.out.println(\"You said: \" + answer);\n }\n } while (!answer.equals(\"exit\"));\n }", "private static void printUsage() {\r\n\t\t//TODO: print out clear usage instructions when there are problems with\r\n\t\t// any command line args\r\n\t\tSystem.out.println(\"This program expects three command-line arguments, in the following order:\"\r\n\t\t\t\t+ \"\\n -q for storing as a queue, -c for console output, and the input file name.\");\r\n\t}", "public static void main(String[] args) {\n\n\t\tScanner driversLicense=new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"How old are you?\");\n\t\tint num1=driversLicense.nextInt();\n\t\t\n\t\tif (num1>=18) {\n\t\t\tSystem.out.println(\"Drivers license issued\");\n\t\t}else {\n\t\t\tSystem.out.println(\"You can only get a learners permit\");\n\t\t}\n\t\t\n\t}", "public static void main(String args[]) throws IOException {\n Scanner sc= new Scanner(System.in);\r\n String s= sc.next();\r\n char ch= s.charAt(0);\r\n switch (ch)\r\n {\r\n case 'P':\r\n case 'p': \r\n System.out.println(\"PrepBytes\");\r\n break;\r\n case 'Z':\r\n case 'z':\r\n System.out.println(\"Zenith\");\r\n break;\r\n case 'E':\r\n case 'e':\r\n System.out.println(\"Expert Coder\");\r\n break;\r\n case 'D':\r\n case 'd':\r\n System.out.println(\"Data Structure\");\r\n break;\r\n }\r\n }", "public static void mainText(){\n\t\tSystem.out.println(\"Enter: 1.'EXIT' 2.'STU' 3.'FAC' 4.SQL query 5.'MORE' -for more detail about options\");\n\t}", "protected boolean processBSetupMode(boolean entered){return false;}", "private void prompt() {\n System.out.print(Strings.MAIN_PROMPT);\n System.out.flush();\n }", "private void showHelp() {\n\t\tJOptionPane.showMessageDialog(this, \"Created by Mario Bobić\", \"About File Encryptor\", JOptionPane.INFORMATION_MESSAGE);\n\t}", "private static void DisplayHelp() {\r\n System.out.println();\r\n System.out.println(\"Usage: Consumes messages from a topic/queue\");\r\n System.out.println();\r\n System.out.println(\" SampleConsumerJava [ < response_file ]\");\r\n System.out.println();\r\n return;\r\n }", "public static void main(String[] args) {\n\n\t\tString cont;\n\t\tdo {\n\n\t\t\tMarketsProducts m = new MarketsProducts();\n\n\t\t\tSystem.out.println(\"\\n\" + \"\\n\" + \"Would you like continue adding Products, press [yes] or [no]\");\n\t\t\tcont = input.next();\n\t\t} while (cont.equalsIgnoreCase(\"yes\"));\n\n\t\tSystem.out.println(\"Thanks for choosing us!\");\n\n\t}", "private static void displayPrompt() {\n System.out.println(\"This program converts a temperature in degrees Celsius into\");\n System.out.println(\"a temperature in degrees Fahrenheit. Enter a temperature in\");\n System.out.print(\"degrees Celsius: \");\n }", "public static void f_menu(){\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n System.out.println(\"_/_/_/_/_/_/softvectorwhith/_/_/_/_/_/_/\");\n System.out.println(\"/_/_/_/version 1.0 2020-oct-29_/_/_/_/_/\");\n System.out.println(\"/_/maked by Andres Felipe Torres Lopez_/\");\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n }", "private static void promptName() {\n\t\tSystem.out.print(\"Please enter a name: \");\n\t}", "private static void driver() {\n Scanner scnr = new Scanner(System.in);\n String promptCommandLine = \"\\nENTER COMMAND: \";\n\n System.out.print(MENU);\n System.out.print(promptCommandLine);\n String line = scnr.nextLine().trim();\n char c = line.charAt(0);\n\n while (Character.toUpperCase(c) != 'Q') {\n processUserCommandLine(line);\n System.out.println(promptCommandLine);\n line = scnr.nextLine().trim();\n c = line.charAt(0);\n }\n scnr.close();\n }", "protected void prepareUninstallation() {\n\t\t//\n\t}", "public static void main(String[] args) {\n\t\tString response=JOptionPane.showInputDialog(null,\"Do you know how to write code?\");\n\t\t// 2. If they say \"yes\", tell them they will rule the world.\n\t\tif(response.equalsIgnoreCase(\"yes\") || response.equalsIgnoreCase(\"sure\"))\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null,\"Than you will rule the world!\");\n\t\t}\n\t\t// 3. Otherwise, wish them good luck washing dishes.\n\t\telse {\n\t\t\tJOptionPane.showMessageDialog(null,\"Good luck on your career!\");\n\t\t}\n\t}", "public static void main(String[] args) {\nsyso \n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n \n mDistribution.setFirst(MENU_DISTRIBUTION_START, DIALOG_DISTRIBUTION_START);\n \n // Check whether EULA has been accepted\n // or information about new version can be presented.\n if (mDistribution.showEulaOrNewVersion()) {\n return;\n }\n }", "public void desc(CommandSender sender, CDisable main)\n {\n sender.sendMessage(color(\"&2========== \" + getPrefix().replace(\":\",\"\") + \"&2==========\"));\n sender.sendMessage(color(\"&7[&9\" + main.pdfFile.getName() + \"&7] &6Created by, &b&l\" +main.pdfFile.getAuthors()+\"&6.\"));\n sender.sendMessage(color(\"&2\" + main.pdfFile.getDescription() + \"&2.\"));\n sender.sendMessage(color(\"&bWebsite: &e&l\" + main.pdfFile.getWebsite()));\n sender.sendMessage(color(\"\"));\n sender.sendMessage(color(\"\"));\n sender.sendMessage(color(\" &6&l>>>&2&l===============&6&l<<<\\t\"));\n }", "public void generalPrompt() {\n System.out.println(\"What would you like to do?\");\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"20162891 ¹Ú¼º¹Î\");\r\n\t\tSystem.out.println(\"hotfix + \");\r\n\t}", "public static void setup() {\n/* 78 */ s_envCurrentJRE = getProperty(\"jnlpx.jpda.env\");\n/* 79 */ o_envCurrentJRE = decodeJpdaEnv(s_envCurrentJRE);\n/* */ \n/* */ \n/* */ \n/* 83 */ if (getProperty(\"jpda.notification\") != null) {\n/* 84 */ showJpdaNotificationWindow(o_envCurrentJRE);\n/* 85 */ Main.systemExit(0);\n/* */ } \n/* */ }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString inputString;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.print(\">\");\n\t\t\tinputString = sc.nextLine();\n\t\t\tSystem.out.println(inputString);\n\t\t}while(!inputString.equals(\"q\"));\n\t\t\n\t\tSystem.out.println(\"end\");\n\t}", "private static void usage()\n {\n System.out.println(\"usage:\");\n System.out.println(\" ??? clock [-bg color] [-f fontsize] [-fg color]\");\n System.out.println(\" ??? formats\");\n System.out.println(\" ??? print [-f fmt] time\");\n System.out.println(\" ??? now [-r] [-f fmt]\");\n System.exit(1);\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Enter the Software Key\");\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tString softwareKey = input.nextLine();\r\n\t\tSystem.out.println(\"Enter the length of key\");\r\n\t\tint lengthOfKey = input.nextInt();\r\n\t\tString refinedSoftwareKey = refiningSoftwareKey(softwareKey,lengthOfKey);\r\n\t\tSystem.out.println(\"Software Key=: \" + refinedSoftwareKey);\r\n\t\tinput.close();\r\n\t}", "private static void dealwithelp() {\r\n\t\tSystem.out.println(\"1 ) myip - to see your ip address.\");\r\n\t\tSystem.out.println(\"2 ) myport - to see your port number.\");\r\n\t\tSystem.out.println(\"3 ) connect <ip> <port> - connect to peer.\");\r\n\t\tSystem.out.println(\"4 ) list Command - list all the connected peer/peers.\");\r\n\t\tSystem.out.println(\"5 ) send <id> - to send message to peer.\");\r\n\t\tSystem.out.println(\"6 ) terminate <id> - terminate the connection\");\r\n\t\tSystem.out.println(\"7 ) exit - exit the program.\");\r\n\t}", "private static void usage() {\n System.err.println(\"usage: Binomial degree(1..10)\");\n System.exit(-1);\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tString answer = JOptionPane.showInputDialog(\"Can you write code?(Do not use capitals)\");\t\n\t\t// 2. If they say \"yes\", tell them they will rule the world.\n\t\tif(answer.equals(\"yes\")){\n\t\tJOptionPane.showMessageDialog(null,\" Of course you do, you're in a programming class.\");\t\n\t\t}else if(answer.equals(\"no\")){\n\t\t\tJOptionPane.showMessageDialog(null,\" Are you serios?! You're in a coding class!\");\t\n\t\t}else{\n\t\t\tJOptionPane.showMessageDialog(null,\" What?\");\n\t\t}\n\t\t// 3. Otherwise, wish them good luck washing dishes.\n\n\t}", "private static void printUsage() {\n System.err.println(\"\\n\\nUsage:\\n\\tAnalyzeRandomizedDB [-p] [-v] [--enzyme <enzymeName> [--mc <number_of_missed_cleavages>]] <original_DB> <randomized_DB>\");\n System.err.println(\"\\n\\tFlag significance:\\n\\t - p : print all redundant sequences\\n\\t - v : verbose output (application flow and basic statistics)\\n\");\n System.exit(1);\n }", "private void helpService() {\n output.println(\"Help command\");\n output.println(\"-calc <number> \\t Calculates the value of pi based on <number> points; quit \\t Exit from program \");\n }", "private void askConfirm(String question) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString confirm = \"y\";\n\t\twhile (!confirm.equals(\"y\") && !confirm.equals(\"n\")) {\n\t\t\tSystem.out.println(question);\n\t\t\tconfirm = scanner.nextLine();\n\t\t\tif (confirm.equals(\"y\")) {\n\t\t\t\tSystem.out.println(\"Thank you.\");\n\t\t\t} else if (confirm.equals(\"n\")) {\n\t\t\t\tSystem.out.println(\"You can edit the config settings in src/main/config\");\n\t\t\t\tSystem.exit(1);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Really funny. Try again.\");\n\t\t\t}\n\n\t\t}\n\t\tscanner.close();\n\t}", "private void askUser()\n { \n System.out.println(\"What is your command?\");\n\n String command = scanner.nextLine();\n commandPrompt(command);\n }", "private static void displayUsage() {\n System.out.println(\"\\n MEKeyTool argument combinations:\\n\\n\" +\n \" -help\\n\" +\n \" -import [-MEkeystore <filename>] \" +\n \"[-keystore <filename>]\\n\" +\n \" [-storepass <password>] -alias <key alias> \" +\n \"[-domain <domain>]\\n\" +\n \" -list [-MEkeystore <filename>]\\n\" +\n \" -delete [-MEkeystore <filename>]\\n\" +\n \" (-owner <owner name> | -number <key number>)\\n\" +\n \"\\n\" +\n \" The default for -MEkeystore is \\\"\" + \n System.getProperty(DEFAULT_MEKEYSTORE_PROPERTY, \"appdb/_main.ks\") +\n \"\\\".\\n\" +\n \" The default for -keystore is \\\"\" + \n System.getProperty(DEFAULT_KEYSTORE_PROPERTY, \"$HOME/.keystore\") + \n \"\\\".\\n\");\n }", "private static void help() {\n System.out.println(USAGE); \n System.exit(0);\n }", "private void prompt() {\n System.out.print(\"> \");\n System.out.flush();\n }", "public void promptDBCreds()\n\t{\n\t\ttse.startDatabase();\n\t\t\n\t}", "public void use() {//Sample use for book- reading, use command 'use book' to use it\n\t\tSystem.out.println(\"Here is a book for you: Quiddich through the ages; hope you enjoy!\");\n\t}", "public static void main (String[] args) \n\t{\n\t\n\ttry {\n\t\tScanner File1 = new Scanner(new File(\"//Users//teresaoreilly//Desktop//packages.txt\")).useDelimiter(\",\\\\s*\");\n\t} catch (FileNotFoundException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\tScanner input = new Scanner(System.in);\n\t System.out.print(\"Enter package name followed by ->\");\n\t\t// get their input as a String\n\t String userinput = input.next();\n\t \n\t \n\t \n\t\n\tString [] names = {\"gui->\",\"swingui->\",\"textui->\",\"awtui->\",\"runner->\",\"extensions->\"};\n\tString[] depend = {\"awtui\",\"swingui\",\"textui\",\"runner\",\"extensions\"};\n\t\n\tArrays.sort(names);\n\tint i;\n\tfor(i=0; i < names.length; i++){\n\t\tSystem.out.println(\"number: \" + names[i]);\n\t} \n\t//To access a specific element in an array list, use the get method \n\t//and specify the index value (beginning with zero) of the element that you want to retrieve:\n\t}", "private static String promptString(String descricao) {\n System.out.print(\"\\t>>> \" + descricao + \": \");\n return scan.nextLine();\n }", "static void printHelp(String processname)\r\n\t{\n\t\tHelpFormatter formatter = new HelpFormatter();\r\n\t\tformatter.printHelp(processname, options);\r\n\r\n\t\tSystem.exit(0);\r\n\t}", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "public static void main(String[] args) {\n System.out.print(\"-======================================================================-\");\n System.out.println(\" \");\n System.out.println(\" \");\n System.out.println(\" \");\n System.out.println(\" CAL'S DINER \");\n System.out.println(\" \");\n System.out.println(\" \");\n System.out.print(\"-======================================================================-\");\n \n \n //Display 3 special on menu\n System.out.println(\"\");\n System.out.println(\"\");\n System.out.println(\"\");\n System.out.println(\" Today's Special\");\n System.out.println(\" $26.00.......... 8oz Steak\");\n System.out.println(\" $16.00...........Spaghetti and Meatballs\");\n System.out.println(\" $17.00..........Homestyle Chicken Sandwich\");\n \n }", "public static void main(String[] args) {\n\t\t\r\n\t\tString password = \"Magento123\";\r\n\t\tif (password.equals(\"Magento123\")) {\r\n\t\t\tSystem.out.println(\"The doors are open. \");\r\n\t\t}else {\r\n\t\t\tSystem.out.println(\"Incorrect password. Doors cannot be opened. Please try again later!\");\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tboolean flag = true;\r\n\r\n\t\tProductMgrImpl pdmgr = ProductMgrImpl.getInstance();\r\n\r\n\t\twhile (flag) {\r\n\r\n\t\t\tSystem.out.println(\"============================\");\r\n\t\t\tSystem.out.println(\"1. 상품 정보 입력\");\r\n\t\t\tSystem.out.println(\"2. 상품 정보 전체검색\");\r\n\t\t\tSystem.out.println(\"3. 상품 번호로 검색\");\r\n\t\t\tSystem.out.println(\"4. 상품명으로 검색 (상품명 부분검색가능)\");\r\n\t\t\tSystem.out.println(\"5. TV정보만 검색\");\r\n\t\t\tSystem.out.println(\"6. 냉장고만 검색\");\r\n\t\t\tSystem.out.println(\"7. 전체 재고 상품 금액을 구하기\");\r\n\t\t\tSystem.out.println(\"8. 상품번호로 삭제\");\r\n\t\t\tSystem.out.println(\"9. 상품 가격 변경하기\");\r\n\t\t\tSystem.out.println(\"10. ~이상의 TV 또는 냉장고 검색\");\r\n\t\t\tSystem.out.println(\"11. 저장하기\");\r\n\t\t\tSystem.out.println(\"0. 종료\");\r\n\t\t\tSystem.out.println(\"==============원하는 번호를 입력하시오:\");\r\n\t\t\tint n = sc.nextInt();\r\n\r\n\t\t\tswitch (n) {\r\n\t\t\tcase 0: {\r\n\t\t\t\tSystem.out.println(\"종료합니다.\");\r\n\t\t\t\tflag = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase 1: { // 상품 정보 입력\r\n\t\t\t\tSystem.out.println(\" TV or 냉장고 인지 선택하시오.\");\r\n\t\t\t\tString info = sc.next();\r\n\t\t\t\tSystem.out.println(\"상품 번호를 입력하세요.\");\r\n\t\t\t\tint p_num = sc.nextInt();\r\n\t\t\t\tSystem.out.println(\"상품명을 입력하세요.\");\r\n\t\t\t\tString p_Name = sc.next();\r\n\t\t\t\tSystem.out.println(\"상품 가격을 입력하세요\");\r\n\t\t\t\tint price = sc.nextInt();\r\n\t\t\t\tSystem.out.println(\"상품 수량을 입력하세요.\");\r\n\t\t\t\tint amount = sc.nextInt();\r\n\t\t\t\tSystem.out.println(\"상품 용량을 입력하세요.\");\r\n\r\n\t\t\t\tint capacity = sc.nextInt();\r\n\t\t\t\tif (info.equals(\"TV\")) {\r\n\t\t\t\t\tTV tv = new TV(p_num, p_Name, price, info, amount, capacity);\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tpdmgr.add(tv);\r\n\t\t\t\t\t\t//저장하자\r\n\t\t\t\t\t\t//pdmgr.save();\r\n\t\t\t\t\t} catch (DuplicateException e) {\r\n\t\t\t\t\t\tSystem.out.println(\"상품 번호가 같으며 이미 존재하는 상품입니다.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (info.equals(\"냉장고\")) {\r\n\t\t\t\t\tRefrigerator re = new Refrigerator(p_num, p_Name, price, info, amount, capacity);\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tpdmgr.add(re);\r\n\t\t\t\t\t\t//pdmgr.save();\r\n\t\t\t\t\t} catch (DuplicateException e) {\r\n\t\t\t\t\t\tSystem.out.println(\"상품 번호가 같으며 이미 존재하는 상품입니다.\");\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase 2: {// 상품 정보 전체 검색\r\n\t\t\t\tArrayList<Product> list = new ArrayList<>();\r\n\t\t\t\tlist = pdmgr.serch();\r\n\t\t\t\tfor (int i = 0; i < pdmgr.getSize(); i++)\r\n\t\t\t\t\tSystem.out.println(list.get(i));\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase 3: {// 상품 번호검색\r\n\t\t\t\tSystem.out.println(\"상품 번호를 입력해주세요:\");\r\n\t\t\t\tint number = sc.nextInt();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfor (Product x : pdmgr.serch_Num(number)) {\r\n\t\t\t\t\t\tif (x != null) {\r\n\t\t\t\t\t\t\tSystem.out.println(x);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (CodeNotFoundException e) {\r\n\t\t\t\t\tSystem.out.println(\"상품번호가 존재하지 않습니다\");\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase 4: {// 상품명으로 검색\r\n\t\t\t\tSystem.out.println(\"상품 이름을 입력해주세요:\");\r\n\t\t\t\tString name = sc.next();\r\n\t\t\t\tfor (Product x : pdmgr.serch_Name(name)) {\r\n\t\t\t\t\tif (x != null) {\r\n\t\t\t\t\t\tSystem.out.println(x);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase 5: {// TV정보만 검색\r\n\t\t\t\tfor (Product x : pdmgr.serch_Info(\"TV\")) {\r\n\t\t\t\t\tif (x != null) {\r\n\t\t\t\t\t\tSystem.out.println(x);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase 6: { // 냉장고 정보만검색\r\n\t\t\t\tfor (Product x : pdmgr.serch_Info(\"냉장고\")) {\r\n\t\t\t\t\tif (x != null) {\r\n\t\t\t\t\t\tSystem.out.println(x);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 7: {// 전체재고상품금액 구하기\r\n\t\t\t\tSystem.out.println(pdmgr.sum_price() + \"원 입니다.\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 8: { // 상품번호로 삭제\r\n\t\t\t\tSystem.out.println(\"삭제할 상품 번호를 입력하세요:\");\r\n\t\t\t\tint num = sc.nextInt();\r\n\t\t\t\tboolean b = pdmgr.delete(num);\r\n\t\t\t\tif (b)\r\n\t\t\t\t\tSystem.out.println(\"삭제되었습니다.\");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.println(\"삭제할 상품이 없습니다.\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase 9: {// 상품가격 변경\r\n\t\t\t\tSystem.out.println(\"상품 번호를 입력하세요:\");\r\n\t\t\t\tint num = sc.nextInt();\r\n\t\t\t\tSystem.out.println(\"변경할 가격을 입력하세요:\");\r\n\t\t\t\tint price = sc.nextInt();\r\n\t\t\t\tpdmgr.price_change(num, price);\r\n\t\t\t\tSystem.out.println(\"변경되었습니다.\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase 10: {\r\n\t\t\t\tSystem.out.println(\"무엇을 검색하시겠습니까? TV or 냉장고 \");\r\n\t\t\t\tString s = sc.next();\r\n\t\t\t\tSystem.out.println(\"용량 크기를 숫자로만 입력하세요.\");\r\n\t\t\t\tint size = sc.nextInt();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfor (Product x : pdmgr.serch_Info2(s, size)) {\r\n\t\t\t\t\t\tif (x != null) {\r\n\t\t\t\t\t\t\tSystem.out.println(x);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (ProductNotFoundException e) {\r\n\t\t\t\t\tSystem.out.println(\"그런 상품은 존재하지 않습니다.\");\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase 11: {\r\n\t\t\t\tpdmgr.save();\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void formatSystem() {}", "int promptOption(IMenu menu);", "public static void main(String[] args) {\n\r\n\t\tString text = JOptionPane.showInputDialog(null, \"Wie alt bist du ?\");\r\n\t\ttry {\r\n\t\t\tString input = null;\r\n\t\t\tint alter = Integer.parseInt(input);\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Du bist \" + alter + \" Jahre alt\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Du Depp diese is nix Zahl\");\r\n\t\t}\r\n\t}", "public static void showSynopsis() {\n System.out\n .println(\"Usage: findbugs [general options] -textui [command line options...] [jar/zip/class files, directories...]\");\n }", "public static void main(String[] args)\r\t{", "private static void printUsage() {\n\t\tSystem.out.println(\"Usage: java UniqueUniqueChromosomeReconstructor [-h] input_file\");\n\t\tSystem.out.println(\" -h: Print usage information\");\n\t\tSystem.out.println(\" input_file: File containing input sequence data\");\n\t}", "private static void printUsage(){\n\t\tprintLine(USAGE_STRING);\n\t}", "public static void main(String[] args) {\n \n int result=JOptionPane.showConfirmDialog(null,\"Are you sure to Exit?\",\n \"My Question\",JOptionPane.YES_NO_OPTION);\n \n switch(result){\n case JOptionPane.YES_OPTION :\n JOptionPane.showMessageDialog(null,\"OK we do..\");\n break;\n \n case JOptionPane.NO_OPTION :\n JOptionPane.showMessageDialog(null,\"OK we do not..\");\n break;\n \n case JOptionPane.CANCEL_OPTION :\n JOptionPane.showMessageDialog(null,\"OK we cancel it..\");\n }\n }", "public static void showPrompt() {\r\n \r\n System.out.print(\"> \");\r\n \r\n }", "static void take_the_input() throws IOException{\n\t\tSystem.out.print(\"ENTER THE ADDRESS : \");\n\n\t\taddress = hexa_to_deci(scan.readLine());\n\t\tSystem.out.println();\n\n\t\twhile(true){\n\t\t\tprint_the_address(address);\n\t\t\tString instruction = scan.readLine();\n\t\t\tint label_size = check_for_label(instruction);\n\t\t\tinstruction = instruction.substring(label_size);\n\t\t\tmemory.put(address, instruction);\n\t\t\tif(stop_instruction(instruction))\n\t\t\t\tbreak;\n\t\t\taddress+=size_of_code(instruction);\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"DO YOU WANT TO ENTER ANY FURTHUR CODE (Y/N) : \");\n\t\tString choice = scan.readLine();\n\t\tSystem.out.println();\n\t\tif(choice.equals(\"Y\"))\n\t\t\ttake_the_input();\n\t}", "public static void main(String[] args) {\nString answer= JOptionPane.showInputDialog(\"do you like dogs\");\n\tJOptionPane.showMessageDialog(null,(answer));\n\t}", "@Override\n protected void processRun() {\n try {\n if (helpOnly) helpOnly();\n else {\n if (hasPipedInput()) pipeVersion();\n else stdinVersion();\n }\n } catch (IOException e) {\n return; // Killed process\n }\n }", "void doPWD()\n {\n out(System.getProperty(\"user.dir\")); //$NON-NLS-1$\n }", "public void fix1() {\n\t\tBufferedReader br;\n\t\tString filename;\n\t\tString newbp;\n\t\t\n\t\ttry {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tSystem.out.println(\"Enter the file name to fix:\\n\");\n\t\t\tfilename = br.readLine();\n\t\t\tSystem.out.println(\"Enter the baseprice:\\n\");\n\t\t\tnewbp = br.readLine();\n\t\t\treplacebp(filename, newbp);\n\t\t} catch (Exception e) {\n\t return;\n\t }\n\t}", "public static void main(String[] args) {\n System.out.println(\"Bibiana Fleck de Bem\");\n \n }", "static boolean promptForComfirmation(String prompt) {\n String line;\n\n line = promptWithOptions(Arrays.asList(\"y\", \"n\"), prompt);\n\n return (line.compareTo(\"y\") == 0);\n }", "private static String getUserInput(String prompt){ \r\n Scanner in = new Scanner(System.in);\r\n System.out.print(prompt);\r\n return in.nextLine();\r\n }", "private static void usage() {\n System.err.println(\"Usage: java org.apache.pdfbox.examples.pdmodel.PrintTextLocations <input-pdf>\");\n }", "private void bidMenu() {\r\n String command;\r\n input = new Scanner(System.in);\r\n\r\n command = input.next();\r\n\r\n if (command.equals(\"N\")) {\r\n System.out.println(\"You are now returning to the main menu\");\r\n }\r\n if (command.equals(\"Y\")) {\r\n setBid();\r\n }\r\n }", "public static void main(String... args) throws Exception {\n //ScanUtils.getPrivateFields(PkgMain.class);\n// byte[] testPkg = new byte[]{\n// 0x1c,0x2d,0x3e,0x4f,\n// 0x13,0x00,0x00,0x00,\n// 0x06,0x00,0x00,0x00,\n// 0x01,0x00,0x00,0x00,\n// (byte) 0xE1,0x07,0x7,0x0f,\n// 0x16,0x35,0x0b,\n// 0x6e,0x01\n// };\n//\n// PkgTime tmpTestTime = new PkgTime(new Date());\n// PkgMain tmpTestMain = new PkgMain();\n// tmpTestMain.setInfo(tmpTestTime);\n// tmpTestMain.setSerialsNo(6);\n// tmpTestMain.setPyType(1);\n// tmpTestMain.setHeader(0x4f3e2d1c);\n// tmpTestMain.getPackageLength();\n// byte[] tmpbuffer = tmpTestMain.getThisBytes();\n//\n// PkgMain pkgMain = new PkgMain();\n// pkgMain.checkPackageIsReady(testPkg);\n// pkgMain.resolvePackage(testPkg,0);\n// byte[] testPk = new byte[100];\n// ByteBuffer byteBuffer = ByteBuffer.wrap(testPkg,0,testPkg.length);\n// byteBuffer.order(ByteOrder.LITTLE_ENDIAN);\n// byteBuffer.getInt(12);\n// byteBuffer = ByteBuffer.wrap(testPk);\n// byteBuffer.putInt(10);\n// byteBuffer.putInt(16);\n//\n// PackageUtil.resolvePackage(testPkg,0,pkgMain);\n// ScanUtils.setFieldValue(pkgMain,\"header\",0x6c7d8e9f);\n// PkgTime pkgTime = (PkgTime)ScanUtils.makeFieldInst(PkgTime.class);\n// PkgTD pkgTD =new PkgTD();\n// //pkgTD.setTest(pkgTime);\n// pkgMain.setInfo(pkgTD);\n// System.out.println(ScanUtils.getObjectSize(pkgMain));\n// return;\n if(args == null || args.length==0){\n System.out.println(\"arg = s or arg = c\");\n }else{\n if(args[0].equals(\"s\")){\n LabServer labServer = new LabServer();\n labServer.startTest();\n }\n if(args[0].equals(\"c\")){\n LabClient labClient = new LabClient();\n labClient.sendTest();\n }\n }\n }", "public static void main(String[]args) {\n\t\n\t\t\n\n}", "public static void help() {\n\n\t\tSystem.out.println(\"--help--Input format should be as below\" + \n\t\t \"\\njava -jar passgen.jar -l\" + \n\t\t\t\t \"\\n\" +\n\t\t\t\t \"\\njava -jar passgen.jar -l\" + \"\\n(where l= length of password)\" + \n\t\t\t\t \"\\n\");\n\n\t}", "public static void showAboutDialog(final AppD app) {\n\n\t\tfinal LocalizationD loc = app.getLocalization();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"<html><b>\");\n\t\tappendVersion(sb, app);\n\t\tsb.append(\"</b> (\");\n\t\tsb.append(\"Java \");\n\t\tAppD.appendJavaVersion(sb);\n\t\tsb.append(\", \");\n\n\t\tsb.append(app.getHeapSize() / 1024 / 1024);\n\t\tsb.append(\"MB, \");\n\t\tsb.append(App.getCASVersionString());\n\n\t\tsb.append(\")<br>\");\n\n\t\tsb.append(GeoGebraConstants.BUILD_DATE);\n\n\t\t// license\n\t\tString text = app.loadTextFile(AppD.LICENSE_FILE);\n\t\t// We may want to modify the window size when the license file changes:\n\t\tJTextArea textArea = new JTextArea(26, 72); // window size fine tuning\n\t\t\t\t\t\t\t\t\t\t\t\t\t// (rows, cols)\n\t\ttextArea.setEditable(false);\n\t\t// not sure if Monospaced is installed everywhere:\n\t\ttextArea.setFont(new Font(\"Monospaced\", Font.PLAIN, 12));\n\t\ttextArea.setText(text);\n\t\ttextArea.setCaretPosition(0);\n\n\t\tJPanel systemInfoPanel = new JPanel(new BorderLayout(5, 5));\n\t\tsystemInfoPanel.add(new JLabel(sb.toString()), BorderLayout.CENTER);\n\n\t\t// copy system information to clipboard\n\n\t\tsystemInfoPanel.add(new JButton(\n\t\t\t\tnew AbstractAction(loc.getMenu(\"SystemInformation\")) {\n\n\t\t\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t\t\t\tcopyDebugInfoToClipboard(app);\n\n\t\t\t\t\t\tapp.showMessage(\n\t\t\t\t\t\t\t\tloc.getMenu(\"SystemInformationMessage\"));\n\t\t\t\t\t}\n\t\t\t\t}), loc.borderEast());\n\n\t\tJScrollPane scrollPane = new JScrollPane(textArea,\n\t\t\t\tScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,\n\t\t\t\tScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n\t\tJPanel panel = new JPanel(new BorderLayout(5, 5));\n\t\tpanel.add(systemInfoPanel, BorderLayout.NORTH);\n\t\tpanel.add(scrollPane, BorderLayout.SOUTH);\n\n\t\tJOptionPane infoPane = new JOptionPane(panel, JOptionPane.PLAIN_MESSAGE,\n\t\t\t\tJOptionPane.DEFAULT_OPTION);\n\n\t\tfinal JDialog dialog = infoPane.createDialog(app.getMainComponent(),\n\t\t\t\tloc.getMenu(\"AboutLicense\"));\n\n\t\tdialog.setVisible(true);\n\t}" ]
[ "0.58197457", "0.57999516", "0.5656801", "0.5627179", "0.5601552", "0.5554234", "0.5542924", "0.5501533", "0.5485514", "0.5473985", "0.5447871", "0.5412579", "0.5399164", "0.53964317", "0.5367677", "0.53527504", "0.53506386", "0.53351843", "0.5330936", "0.5309069", "0.5306931", "0.5306669", "0.53046477", "0.5285283", "0.52705765", "0.5270267", "0.52675974", "0.52605605", "0.52355844", "0.5232525", "0.5225333", "0.5218706", "0.5216933", "0.52161735", "0.5214362", "0.52046025", "0.52002543", "0.5195042", "0.5192813", "0.5191513", "0.5190821", "0.5189244", "0.5182335", "0.5176844", "0.5167995", "0.51625484", "0.5158678", "0.51584536", "0.5155317", "0.51528937", "0.5144211", "0.5140451", "0.51366127", "0.5133199", "0.5125877", "0.5123547", "0.512041", "0.5114259", "0.51077306", "0.5106186", "0.51045096", "0.5101956", "0.51005626", "0.5099044", "0.5086916", "0.50829554", "0.50814474", "0.5079159", "0.50783783", "0.5073098", "0.5072054", "0.5071474", "0.5066838", "0.506079", "0.5044159", "0.50398874", "0.50375825", "0.50353056", "0.50272", "0.5024038", "0.5023027", "0.5020164", "0.50200975", "0.5018428", "0.5017598", "0.5015318", "0.50139654", "0.5011766", "0.50067395", "0.49953258", "0.499394", "0.4990495", "0.49889782", "0.49859267", "0.4985468", "0.4985167", "0.4985147", "0.49828812", "0.49819297", "0.49790648", "0.49788064" ]
0.0
-1
String p = "D:/Project/shixi/graylogin/grayrest/src/main/resources/lua/gray_config.json"; String p = RestGetAllConfigJson.class.getClassLoader().getResource("/lua/gray_config.json").getPath(); String p = Thread.currentThread().getContextClassLoader().getResource("lua/gray_config.json").getFile(); String p = RestGetAllConfigJson.class.getResource("/").getFile()+"lua/gray_config.json";
public static void main(String[] args) { System.out.println(readAllStringInFile("lua/gray_config.json")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getResourcePath();", "String getResource();", "protected abstract String getResourcePath();", "static String readResource(String name) throws IOException {\n InputStream is = Server.class.getResourceAsStream(name);\n String value = new Scanner(is).useDelimiter(\"\\\\A\").next();\n is.close();\n return value;\n }", "private PcePath getPcePath(String resourceName) throws IOException {\n InputStream jsonStream = PcePathCodecTest.class\n .getResourceAsStream(resourceName);\n ObjectMapper mapper = new ObjectMapper();\n JsonNode json = mapper.readTree(jsonStream);\n assertThat(json, notNullValue());\n PcePath pcePath = pcePathCodec.decode((ObjectNode) json, context);\n assertThat(pcePath, notNullValue());\n return pcePath;\n }", "private static String getResourcePath(String resPath) {\n URL resource = XmlReaderUtils.class.getClassLoader().getResource(resPath);\n Assert.assertNotNull(\"Could not open the resource \" + resPath, resource);\n return resource.getFile();\n }", "static byte[] readResource(String name) throws IOException {\n byte[] buf = new byte[1024];\n\n InputStream in = Main.class.getResourceAsStream(name);\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n int n;\n while ((n = in.read(buf)) > 0) {\n bout.write(buf, 0, n);\n }\n try { in.close(); } catch (Exception ignored) { } \n\n return bout.toByteArray();\n }", "Resource getResource();", "static JsonResource forClasspath( ClassLoader classLoader, String name ) {\n final ClassLoader loader = classLoader == null ? Thread.currentThread().getContextClassLoader() : classLoader;\n return new JsonResource() {\n @Override\n public <T> T readFrom( ReadMethod<T> consumer ) throws IOException {\n InputStream stream = loader.getResourceAsStream(name);\n if ( stream == null )\n throw new FileNotFoundException(\"Resource \" + name + \" not found\");\n try {\n return consumer.read( stream );\n } finally {\n stream.close();\n }\n }\n };\n }", "public URL getResourceFile(String path){\n\n ClassLoader classLoader = getClass().getClassLoader();\n return classLoader.getResource(path);\n }", "private String getDataFromClassResourceFile(String file) {\n\n StringBuffer sb = new StringBuffer();\n String str = \"\";\n\n InputStream is = this.getClass().getClassLoader().getResourceAsStream(file);\n try {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n if (is != null) {\n while ((str = reader.readLine()) != null) {\n sb.append(str + \"\\n\");\n }\n }\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (Throwable ignore) {\n }\n }\n return sb.toString();\n\n }", "private static String readJsonFile (String fileName) {\n if (!fileName.endsWith(\".json\")){\n throw new IllegalArgumentException(\"Invalid file name\");\n }\n String jsonStr = \"\";\n try{\n isFileExistOrCreatIt(fileName);\n File jsonFile = new File(\"src//main//resources\"+\"//\"+fileName);\n Reader reader = new InputStreamReader(new FileInputStream(jsonFile),\"utf-8\");\n int ch = 0;\n StringBuffer sb = new StringBuffer();\n while((ch = reader.read())!=-1){\n sb.append((char) ch);\n }\n reader.close();\n jsonStr = sb.toString();\n return jsonStr;\n\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "public abstract String getResourcePath(Method method);", "public String loadJSONFromAsset() {\n String json;\n String file = \"assets/words.json\";\n\n try {\n InputStream is = this.getClass().getClassLoader().getResourceAsStream(file);\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "protected String getResourceScript(Resource resource, LocalContainer container)\n {\n ConfigurationBuilderFactory configurationBuilderFactory =\n new DefaultConfigurationBuilderFactory();\n ConfigurationBuilder builder =\n configurationBuilderFactory.createConfigurationBuilder(container, resource);\n String configurationEntry = builder.toConfigurationEntry(resource);\n return configurationEntry;\n }", "private static String p_readFromResource(String path) {\n StringBuffer content = new StringBuffer();\n\n InputStream istream = NamedTemplate.class.getResourceAsStream(path);\n\n if (istream != null) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(istream));\n\n try {\n String line = reader.readLine();\n while (line != null) {\n content.append(line).append(\"\\n\");\n\n line = reader.readLine();\n }\n } catch (IOException e) {\n logger.error(\"NamedTemplate: unable to read template from \" + path, e);\n }\n } else {\n return null;\n }\n\n return content.toString();\n }", "public URL getResourceLocation( String name );", "File getLoadLocation();", "public static String getResourcePath(String resource) {\n String path = getBaseResourcePath() + resource;\n return path;\n }", "abstract File getResourceDirectory();", "private String getStringFromResource(String resourcePath) {\n String str = \"\";\n ClassLoader classloader = getClass().getClassLoader();\n if (classloader == null) {\n return str;\n }\n if (logger.isTraceEnabled()) {\n URL resourceurl = classloader.getResource(resourcePath);\n logger.trace(\"URL=\" + resourceurl.toString());\n }\n InputStream instream = classloader.getResourceAsStream(resourcePath);\n if (instream == null) {\n logger.warn(\"Could not read resource from path \" + resourcePath);\n return null;\n }\n try {\n str = stringFromInputStream(instream);\n } catch (IOException ioe) {\n logger.warn(\"Could not create string from stream: \", ioe);\n return null;\n }\n return str;\n }", "private static String getJarFilePath() throws URISyntaxException, UnsupportedEncodingException {\n\n\t\tFile jarFile;\n\n\t\t// if (codeSource.getLocation() != null) {\n\t\t// jarFile = new File(codeSource.getLocation().toURI());\n\t\t// } else {\n\t\tString path = ConfigurationLocator.class.getResource(ConfigurationLocator.class.getSimpleName() + \".class\")\n\t\t\t\t.getPath();\n\t\tString jarFilePath = path.substring(path.indexOf(\":\") + 1, path.indexOf(\"!\"));\n\t\tjarFilePath = URLDecoder.decode(jarFilePath, \"UTF-8\");\n\t\tjarFile = new File(jarFilePath);\n\t\t// }\n\t\treturn jarFile.getParentFile().getAbsolutePath();\n\t}", "private String getResourcePath() {\n\t\tString reqResource = getRequest().getResourceRef().getPath();\n\t\treqResource = actualPath(reqResource, 1);\n\t\tLOGGERS.info(\"reqResourcePath---->\" + reqResource);\n\t\treturn reqResource;\n\t}", "private static URL getResource(String resource)\r\n {\r\n String full = String.format(\"%s/%s\", RESOURCES_DIR, resource);\r\n return KuBatschTheme.class.getResource(full);\r\n }", "public static void main(String[] args) { \n\t\t \n\t\t String path =ResourceHelper.getResourcePath(\"src/main/resources/configfile/log4j.properties\"); \n\t\t System.out.println(path);\n\t }", "public String ReadFile_FromClassPath(String sFileName) {\n String stemp = null;\n\n try {\n InputStream is = getClass().getClassLoader().getResourceAsStream(sFileName);\n stemp = getStringFromInputStream(is);\n\n } catch (Exception e) {\n stemp = null;\n throw new Exception(\"ReadFile_FromClassPath : \" + e.toString());\n } finally {\n return stemp;\n }\n }", "public String getResource(String path){\r\n\t\tClientConfig config = new DefaultClientConfig();\r\n\t\tClient client = Client.create(config);\r\n\t\tWebResource resource = client.resource(BASE_URI);\r\n\t\tWebResource nameResource = resource.path(path);\r\n\t\tSystem.out.println(\"Client Response \\n\"+ getClientResponse(nameResource));\r\n\t\tSystem.out.println(\"Response \\n\" + getResponse(nameResource) + \"\\n\\n\");\r\n\t\treturn getResponse(nameResource);\r\n\t}", "@Override\n public InputStream findResource(String filename)\n {\n InputStream resource = null;\n try\n {\n Path scriptRootPath = Files.createDirectories(getScriptRootPath(side));\n Path scriptPath = scriptRootPath.resolve(filename).toAbsolutePath();\n resource = Files.newInputStream(scriptPath, StandardOpenOption.READ);\n } catch (IOException e)\n {\n resource = super.findResource(filename);\n }\n return resource;\n }", "private String readResource(String name) throws IOException {\n ClassLoader cl = Thread.currentThread().getContextClassLoader();\n try (InputStream in = cl.getResourceAsStream(name)) {\n return new String(EncodingUtils.readAll(in), StandardCharsets.US_ASCII);\n }\n }", "ResourceType getResource();", "public ResourcePath() {\n //_externalFolder = \"file:///C:/Program%20Files/ESRI/GPT9/gpt/\";\n //_localFolder = \"gpt/\";\n}", "private void LoadConfigFromClasspath() throws IOException \n {\n InputStream is = this.getClass().getClassLoader().getResourceAsStream(\"lrs.properties\");\n config.load(is);\n is.close();\n\t}", "private URL getResourceAsUrl(final String path) throws IOException {\n\t\treturn appContext.getResource(path).getURL();\n\t}", "java.lang.String getResourceUri();", "abstract public String getDataResourcesDir();", "private static Path copyFileFromJar(String path) {\n try {\n Path file = Files.createTempFile(\"configme-\", \"-democonfig.yml\");\n Files.copy(TestUtils.class.getResourceAsStream(path), file, REPLACE_EXISTING);\n return file;\n } catch (IOException e) {\n throw new IllegalStateException(e);\n }\n }", "public static String setConfigPath(String propertFileName ) {\n String propFilePath;\n\n propFilePath = \"src\" + File.separator + \"main\" + File.separator\n + \"resources\" + File.separator + propertFileName;\n return propFilePath;\n }", "public String getResourcePath () {\n return resourcePath;\n }", "private List<String> readSrc(){\n //daclarations\n InputStream stream;\n List<String> lines;\n String input;\n BufferedReader reader;\n StringBuilder buf;\n\n //Inlezen van bestand\n stream = this.getClass().getResourceAsStream(RESOURCE);\n lines = new LinkedList<>();\n\n // laad de tekst in \n reader = new BufferedReader(new InputStreamReader(stream));\n buf = new StringBuilder();\n\n if(stream != null){\n try{\n while((input = reader.readLine()) != null){\n buf.append(input);\n System.out.println(input);\n lines.add(input);\n }\n } catch(IOException ex){\n System.out.println(ex);// anders schreeuwt hij in mijn gezicht:\n }\n }\n return lines;\n }", "public static String getResourcePath( String resource ) throws IllegalArgumentException, IllegalStateException {\n\t\ttry {\n\t\t\t// get all resources by given resource name\n\t\t\tEnumeration<URL> resources = LocalTestsFileSystem.class.getClassLoader().getResources(resource);\n\t\t\t\n\t\t\t// gets first (and only) result\n\t\t\tif (resources.hasMoreElements()) {\n\t\t\t\t// cut first / from /-separated path to convert it to Path object\n\t\t\t\treturn resources.nextElement().getPath().substring(1);\n\t\t\t}\n\t\t\n\t\t\t// if cannot load URLs throws an IllegalStateException of wrong resource\n\t\t} catch (IOException e) { throw new IllegalStateException(e); }\n\t\t\n\t\t// if nothing found throws a IllegalArgumentException\n\t\tthrow new IllegalArgumentException(\"no resources found\");\n\t}", "String path(Configuration configuration);", "public IResource getResource();", "public static URL loadFile(String path) throws FileNotFoundException\n\t{\n\t\tFile f;\n\t\tURL u;\n\t\ttry {\n\t\t\tString jarPath = \"\";\n\t\t\tjarPath = Util.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath();\n\t\t\tpath = new File(jarPath).getParent() + \"/resource\" +path;\n\t\t\tf = new File(path);\n\t\t\tu = f.toURI().toURL();\n\t\t} catch (MalformedURLException | URISyntaxException e) { throw new FileNotFoundException(\"failed to find resource at \\\"\" +path +\"\\\"\"); }\n\n\t\tif(u == null || !f.exists())\n\t\t\tthrow new FileNotFoundException(\"failed to find resource at \\\"\" +path +\"\\\"\");\n\n\t\treturn u; // in a jar, the URL code sometimes gets confused when things aren't found. Only return a valid URL if we are sure nothing is amiss\n\n\t}", "java.lang.String getSrcPath();", "public Resource load(String filename) throws MalformedURLException;", "private static InputStream getResourceAsStream(String resource)\r\n {\r\n return KuBatschTheme.class.getResourceAsStream(String.format(\"%s/%s\",\r\n RESOURCES_DIR, resource));\r\n }", "public String getClassPath();", "public String readConfiguration(String path);", "private FileInputStream loadFile(String file)\n\t{\n\t\tlogger.info(\"Fetching File : \"+System.getProperty(\"user.dir\")+\"\\\\src\\\\main\\\\resources\\\\\"+file);\n\t\ttry \n\t\t{\n\t\t\treturn(new FileInputStream(System.getProperty(\"user.dir\")+\"\\\\src\\\\main\\\\resources\\\\\"+file));\n\t\t} catch (FileNotFoundException e) {\t\t\t\t\n\t\t\tAssert.assertTrue(file+\" file is missing\", false);\n\t\t\treturn null;\n\t\t}\n\t}", "public String getResourcePath () {\n return resourcePath;\n }", "public static String readFromFile(String filename) {\n InputStream is = ResourceUtils.class.getClassLoader().getResourceAsStream(filename);\n return convertStreamToString(is);\n\n }", "public String readResource(String resourcePath) throws IOException {\n InputStream resourceStream = this.getClass().getResourceAsStream(resourcePath);\n StringBuilder builder = new StringBuilder();\n int ch;\n while ((ch = resourceStream.read()) != -1) {\n builder.append((char) ch);\n }\n return builder.toString();\n }", "private static InputStream readFile(String path)\n\t{\n\t\tInputStream input = NativeLibraryLoader.class.getResourceAsStream(\"/\" + path);\n\t\tif (input == null)\n\t\t{\n\t\t\tthrow new RuntimeException(\"Unable to find file: \" + path);\n\t\t}\n\t\treturn input;\n\t}", "String getConfigFileName();", "File getBundle();", "public String getResourceLocation() {\n return resourceLocation;\n }", "@SuppressWarnings(\"deprecation\")\r\n\tpublic static URL findResourceInClassPath(String resourceName) {\r\n\r\n\t\tURL url;\r\n\r\n\t\t// Tries to locate the resource with the class loader\r\n\t\turl = ClassLoader.getSystemResource(resourceName);\r\n\t\tif (url != null)\r\n\t\t\treturn url;\r\n\r\n\t\t// Tries to locate the resource in the main directory\r\n\t\turl = FileLoader.class.getResource(resourceName);\r\n\t\tif (url != null)\r\n\t\t\treturn url;\r\n\r\n\t\t// Tries to locate the resource in the class list\r\n\t\tString path = FileLoader.class.getResource(FileLoader.class.getSimpleName() + \".class\").getPath();\r\n\t\tif( path != null ) {\r\n\t\t\tString pathParts[] = path.split(\"!\");\r\n\t\t\tpath = pathParts[0];\r\n\t\t\tpathParts = path.split(\"file:\");\r\n\t\t\tif( pathParts.length > 1 ) {\r\n\t\t\t\tpath = pathParts[1];\r\n\t\t\t} else {\r\n\t\t\t\tpath = pathParts[0];\r\n\t\t\t}\r\n\t\t\tif( path.contains(\"/lib/\")) {\r\n\t\t\t\tFile f = new File(path);\r\n\t\t\t\tf = f.getParentFile().getParentFile();\r\n\t\t\t\tf = new File(f.getPath() + File.separator + \"classes\" + File.separator + resourceName);\r\n\t\t\t\tif( f.exists()) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\treturn f.toURL();\r\n\t\t\t\t\t} catch( Exception e) {}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tFile f = new File(path);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tf = f.getParentFile().getParentFile().getParentFile();\r\n\t\t\t\t\tf = new File(f.getPath() + File.separator + resourceName);\r\n\t\t\t\t\tif( f.exists()) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\treturn f.toURL();\r\n\t\t\t\t\t\t} catch(Exception e) {}\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch(NullPointerException npe) {}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "abstract public String getRingResourcesDir();", "private static InputStream getStream(String inResName) {\n\n ClassLoader loader = Thread.currentThread().getContextClassLoader();\n InputStream is = loader.getResourceAsStream(inResName);\n if (is == null) {\n log.error(\"Resource '\" + inResName + \"' not found in classpath\");\n }\n return is;\n\n }", "public byte[] getResource(String name) {\r\n /*\r\n * if (classNameReplacementChar == '\\u0000') { // '/' is used to map the\r\n * package to the path name= name.replace('.', '/') ; } else {\r\n * Replace '.' with custom char, such as '_' name= name.replace('.',\r\n * classNameReplacementChar) ; }\r\n */\r\n if (htJarContents.get(name) == null) {\r\n return null;\r\n }\r\n System.out.println(\">> Cached jar resource name \" + name + \" size is \"\r\n + ((byte[]) htJarContents.get(name)).length + \" bytes\");\r\n\r\n return (byte[]) htJarContents.get(name);\r\n }", "@Override\n\tpublic String getResource() {\n\t\ttry {\n\t\t\treturn (new File(\"./resources/images/mageTowerCard.png\")).getCanonicalPath();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\treturn \"\";\n\t\t}\n\t}", "private static String open(@NonNull String path) throws Exception {\n ClassLoader loader = ClassLoader.getSystemClassLoader();\n InputStream stream = loader.getResourceAsStream(path);\n final StringBuilder stringBuilder = new StringBuilder();\n int i;\n byte[] b = new byte[4096];\n while ((i = stream.read(b)) != -1) {\n stringBuilder.append(new String(b, 0, i));\n }\n return stringBuilder.toString();\n }", "public String getResourcePath() {\n\t\treturn resourcePath;\n\t}", "public abstract String getFullPath(final String resourcePath);", "private static InputStream getResourceAsStream(final String filename) throws IOException {\n\t\t// Try to load resource from jar\n\t\tInputStream stream = TextureLoader.class.getResourceAsStream(filename);\n\t\t// If not found in jar, then load from disk\n\t\tif (stream == null) {\n\t\t\treturn new BufferedInputStream( new FileInputStream(filename) );\n\t\t} else {\n\t\t\treturn stream;\n\t\t}\n\t}", "public String getRuntimePolicyFile(IPath configPath);", "public static void main(String[] args) throws ClassNotFoundException, IOException {\n InputStream n = Class.forName(\"com.ezzra.Main\").getClassLoader().getResourceAsStream(\"config.properties\");\n// System.out.println(path);\n InputStream rin = Main.class.getClassLoader().getResourceAsStream(\"config.properties\");\n// InputStream in = new FileInputStream(path);\n Reader reader = new InputStreamReader(n,\"GBK\");\n Properties prop = new Properties();\n prop.load(reader);\n System.out.println(prop);\n }", "public String resolvePath();", "public static Path getFile(final String path) throws URISyntaxException {\n final URL resource = classLoader.getResource(path);\n checkIfFound(resource, path);\n final URI uri = resource.toURI();\n checkIfFound(uri, path);\n File file = new File(uri);\n checkIfFound(file, path);\n return file.toPath();\n }", "public String getPathToJarFolder(){\n Class cls = ReadWriteFiles.class;\r\n ProtectionDomain domain = cls.getProtectionDomain();\r\n CodeSource source = domain.getCodeSource();\r\n URL url = source.getLocation();\r\n try {\r\n URI uri = url.toURI();\r\n path = uri.getPath();\r\n \r\n // get path without the jar\r\n String[] pathSplitArray = path.split(\"/\");\r\n path = \"\";\r\n for(int i = 0; i < pathSplitArray.length-1;i++){\r\n path += pathSplitArray[i] + \"/\";\r\n }\r\n \r\n return path;\r\n \r\n } catch (URISyntaxException ex) {\r\n LoggingAspect.afterThrown(ex);\r\n return null;\r\n }\r\n }", "public static URL getResource(String resourceName) {\n return Utils.class.getClassLoader().getResource(resourceName);\n }", "abstract public String getImageResourcesDir();", "public void classLoader(){\n \t\n URL xmlpath = this.getClass().getClassLoader().getResource(\"\");\n System.out.println(xmlpath.getPath());\n }", "protected Resource getResource(HttpServletRequest request) {\n String path = request.getPathInfo();\n /*\n * we want to extract everything after /spa/spaServlet from the path info.\n * This should cater for sub-directories\n */\n return getResourceLoaderBean().getResource(constructRemoteUrl(path));\n }", "private final static void getProp() {\n try(InputStream fis = ConnectionBDD.class.getClassLoader().getResourceAsStream(\"conf.properties\")){\n \n props.load(fis);\n \n Class.forName(props.getProperty(\"jdbc.driver.class\"));\n \n url = props.getProperty(\"jdbc.url\");\n login = props.getProperty(\"jdbc.login\");\n password = props.getProperty(\"jdbc.password\");\n \n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (FileNotFoundException e1) {\n e1.printStackTrace();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }", "String getFilepath();", "public String getSharedLoader(IPath baseDir);", "public String getConfigProperties(String key) {\n String value = null;\n try {\n FileReader fileReader=new FileReader(System.getProperty(\"user.dir\")+\"/src/main/resources/config.properties\");\n Properties properties=new Properties();\n properties.load(fileReader);\n value= properties.getProperty(key);\n }catch (Exception e){\n e.printStackTrace();\n }\n return value;\n }", "private String loadJSONFromAsset() {\n String json = null;\n try {\n //AssetManager assetManager = getAssets();\n InputStream is = getAssets().open(\"sa.json\");\n //InputStream is = getResources().openRawResource(\"sa.json\");\n int size = is.available();\n\n byte[] buffer = new byte[size];\n\n is.read(buffer);\n\n is.close();\n\n json = new String(buffer, \"UTF-8\");\n Log.i(\"Json\",json);\n\n\n } catch (Exception ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n\n }", "@Test\n public void in() throws IOException {\n InputStream in = getResourceAstream(\"peizhi.xml\");\n\n //InputStream in = new FileInputStream(\"G:\\\\IDEA\\\\Java_test\\\\src\\\\main\\\\resources\\\\peizhi.xml\");\n //定义一个数组相当于缓存\n byte by[]=new byte[1024];\n int n=0;\n while((n=in.read(by))!=-1)\n {\n String s=new String(by,0,n);\n System.out.println(s);\n }\n }", "private static String readPropertiesFile() {\n Properties prop = new Properties();\n\n try (InputStream inputStream = MembershipService.class.getClassLoader().getResourceAsStream(\"config.properties\")) {\n\n if (inputStream != null) {\n prop.load(inputStream);\n } else {\n throw new FileNotFoundException(\"property file 'config.properties' not found in the classpath\");\n }\n } catch (Exception e) {\n return \"\";\n }\n return prop.getProperty(\"introducer\");\n }", "ResourceLocation resolve(String path);", "private BufferedImage loadImage(String path) {\n try {\n return ImageIO.read(getClass().getClassLoader().getResource(path));\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(1);\n }\n\n return null;\n }", "public byte[] getBytesFromResource(Class<?> clazz, String resourcePath) throws IOException, URISyntaxException {\n\n InputStream in = clazz.getResourceAsStream(\"/\" + resourcePath);\n if (in == null) {\n throw new IllegalArgumentException(\"Resource not found! \" + resourcePath);\n } else {\n return IOUtils.toByteArray(in);\n }\n }", "public String getPropertyPath();", "public String getPropertyPath();", "public static String readFileFromClasspath(final String filePath) throws IOException\n\t{\n\t\treturn readFileFromInputStream(FileUtil.class.getResourceAsStream(filePath));\n\t}", "public static String getImageResoucesPath() {\n\t\t//return \"d:\\\\PBC\\\\GitHub\\\\Theia\\\\portal\\\\WebContent\\\\images\";\n\t\treturn \"/Users/anaswhb/Documents/Eclipse/Workspace/portal/WebContent/images\";\n\t\t\n\t}", "public static URL getResourceFromClassPath(Class clazz,String path) {\n\t\treturn clazz.getClassLoader().getResource(path);\n\t}", "@Cacheable(CacheConfig.CACHE_TWO)\n public File getFile() {\n ClassLoader classLoader = Utility.class.getClassLoader();\n File file = new File(classLoader.getResource(path1).getFile());\n logger.info(\"Cache is not used .... \");\n return file;\n }", "private URL getURL(String filename) {\n\t\tURL url = null;\r\n\t\ttry { \r\n\t\t\turl = this.getClass().getResource(filename);\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn url;\r\n\t}", "private void loadData() {\n\n \tInputStream inputStream = this.getClass().getResourceAsStream(propertyFilePath);\n \n //Read configuration.properties file\n try {\n //prop.load(new FileInputStream(propertyFilePath));\n \tprop.load(inputStream);\n //prop.load(this.getClass().getClassLoader().getResourceAsStream(\"configuration.properties\"));\n } catch (IOException e) {\n System.out.println(\"Configuration properties file cannot be found\");\n }\n \n //Get properties from configuration.properties\n browser = prop.getProperty(\"browser\");\n testsiteurl = prop.getProperty(\"testsiteurl\");\n defaultUserName = prop.getProperty(\"defaultUserName\");\n defaultPassword = prop.getProperty(\"defaultPassword\");\n }", "Path getMainCatalogueFilePath();", "@Test\n void findSourceJar() {\n Class<?> klass = org.apache.commons.io.FileUtils.class;\n var codeSource = klass.getProtectionDomain().getCodeSource();\n if (codeSource != null) {\n System.out.println(codeSource.getLocation());\n }\n }", "public interface IPathConstant {\n\tString PROPERTY_FILEPATH=\"./src/main/resources/CommonData.properties\";\n\tString EXCELPATH=\"./src/test/resources/testdata.xlsx\";\n\tString JSONFILEPATH=\"\";\n\tString htmlPath=\"./extentReport\"+JavaUtility.getCurrentSystemDate()+\".html\";\n}", "public static String get(String file) throws IOException {\n\n\t\tClassLoader classLoader = FileIO.class.getClassLoader();\n\t\tInputStream inputStream = new FileInputStream(classLoader.getResource(\n\t\t\t\tfile).getFile());\n\t\treturn IOUtils.toString(inputStream);\n\n\t}", "private JSONObject loadTemplate(Path extensionResourcePath) throws ExtensionManagementException {\n\n Path templatePath = extensionResourcePath.resolve(TEMPLATE_FILE_NAME);\n if (Files.exists(templatePath) && Files.isRegularFile(templatePath)) {\n return readJSONFile(templatePath);\n }\n return null;\n }", "public String getResourcePath() {\n return BARDConstants.API_BASE + \"/biology/\" + serial;\n }", "public URL getResource(String resource) {\n\t\tif (resource.equals(\"/\" + PLUGIN_NAME) || resource.equals(\"/\" + PLUGIN_NAME + \"/\"))\n\t\t\treturn null;\n\n\t\tresource = resource.replaceAll(PLUGIN_NAME + \"/\", \"\");\n\t\tif (resource.startsWith(\"/\"))\n\t\t\tresource = resource.substring(1);\n\n\t\tURL url = getClass().getResource(resource);\n\t\treturn url;\n\t}", "public URL getResource(String name) {\n List<GraphClassLoader> loaders = this.classLoaders;\n for (int i = loaders.size()-1; i >=0; i--) {\n final GraphClassLoader classLoader = loaders.get(i);\n final URL localResource = classLoader.getLocalResource(name);\n if (localResource != null) return localResource;\n }\n return null;\n }", "private void initiate(){try{\n\t//String dataIni = run.class.getResource(\"../util/DataBase.ini\").getFile();\n //FileInputStream fin=new FileInputStream(dataIni); // 打开文件,从根目录开始寻找\n//\tFileInputStream fin=new FileInputStream(\"src/util/DataBase.ini\"); // 打开文件,从根目录开始寻找\n//\tProperties props=new Properties(); // 建立属性类,读取ini文件\n//\tprops.load(fin); \n//\tdriver=props.getProperty(\"driver\"); //根据键读取值\n//\turl=props.getProperty(\"url\");\n//\tusername=props.getProperty(\"username\");\n//\tuserpassword=props.getProperty(\"userpassword\");\n\t}\n\tcatch(Exception e){e.printStackTrace();}\n\t}" ]
[ "0.678419", "0.66876704", "0.6474418", "0.6438041", "0.6393724", "0.63733715", "0.6279968", "0.61685497", "0.6158937", "0.6140995", "0.60653096", "0.59866834", "0.5910497", "0.5879451", "0.5872339", "0.5863412", "0.5859095", "0.5842655", "0.5812413", "0.5807865", "0.5800617", "0.5766989", "0.5755756", "0.5713461", "0.5707391", "0.56977576", "0.5678896", "0.5666838", "0.5644287", "0.56420493", "0.56400687", "0.5591744", "0.55753344", "0.5570671", "0.5562491", "0.5547595", "0.55240387", "0.5509295", "0.55045336", "0.55012673", "0.54822576", "0.5477236", "0.5416687", "0.54116184", "0.5407633", "0.54023874", "0.53966266", "0.5394747", "0.538266", "0.5381851", "0.5379736", "0.5377351", "0.5364206", "0.5358947", "0.5354536", "0.5350205", "0.53391874", "0.53338814", "0.53289", "0.53170854", "0.5308477", "0.53084445", "0.53078145", "0.53072053", "0.5301609", "0.52714366", "0.5250433", "0.5243209", "0.52328867", "0.5231273", "0.52299684", "0.5224695", "0.5216876", "0.5215992", "0.5205151", "0.5184305", "0.51823753", "0.51780397", "0.5177436", "0.51733685", "0.5168185", "0.5162941", "0.51623076", "0.51590216", "0.5154638", "0.5154638", "0.51538616", "0.5153465", "0.5153182", "0.5147876", "0.51392585", "0.5124847", "0.51217604", "0.51207906", "0.5102619", "0.50999224", "0.50956094", "0.50945836", "0.50919765", "0.5084302", "0.50838614" ]
0.0
-1
Constructor initializes the Google Authorization Code Flow with CLIENT ID, SECRET, and SCOPE
public GoogleAuthHelper() { LoadType<ClientCredentials> credentials = ofy().load().type(ClientCredentials.class); for(ClientCredentials credential : credentials) { // static ClientCredentials credentials = new ClientCredentials(); CALLBACK_URI = credential.getCallBackUri(); CLIENT_ID = credential.getclientId(); CLIENT_SECRET = credential.getClientSecret(); } flow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT, JSON_FACTORY, CLIENT_ID, CLIENT_SECRET, SCOPE).setAccessType( "offline").build(); generateStateToken(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AuthorizationCodeRequest() {\n setGrantType(ClientConfig.AUTHORIZATION_CODE);\n Map<String, Object> tokenConfig = ClientConfig.get().getTokenConfig();\n if(tokenConfig != null) {\n setServerUrl((String)tokenConfig.get(ClientConfig.SERVER_URL));\n setProxyHost((String)tokenConfig.get(ClientConfig.PROXY_HOST));\n int port = tokenConfig.get(ClientConfig.PROXY_PORT) == null ? 443 : (Integer)tokenConfig.get(ClientConfig.PROXY_PORT);\n setProxyPort(port);\n setServiceId((String)tokenConfig.get(ClientConfig.SERVICE_ID));\n Object object = tokenConfig.get(ClientConfig.ENABLE_HTTP2);\n setEnableHttp2(object != null && (Boolean) object);\n Map<String, Object> acConfig = (Map<String, Object>) tokenConfig.get(ClientConfig.AUTHORIZATION_CODE);\n if(acConfig != null) {\n setClientId((String)acConfig.get(ClientConfig.CLIENT_ID));\n if(acConfig.get(ClientConfig.CLIENT_SECRET) != null) {\n setClientSecret((String)acConfig.get(ClientConfig.CLIENT_SECRET));\n } else {\n logger.error(new Status(CONFIG_PROPERTY_MISSING, \"authorization_code client_secret\", \"client.yml\").toString());\n }\n setUri((String)acConfig.get(ClientConfig.URI));\n setScope((List<String>)acConfig.get(ClientConfig.SCOPE));\n setRedirectUri((String)acConfig.get(ClientConfig.REDIRECT_URI));\n }\n }\n }", "public GoogleAuthenticatorAccount() {\n }", "GoogleAuthenticatorKey createCredentials();", "private void initGoogleClient() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n\n // [START initialize_auth]\n // Initialize Firebase Auth\n // [END initialize_auth]\n }", "public static Credential authorize() throws IOException {\n // Load client secrets.\n InputStream in =\n Quickstart2.class.getResourceAsStream(\"/client_secret.json\");\n GoogleClientSecrets clientSecrets =\n GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow =\n new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(DATA_STORE_FACTORY)\n .setAccessType(\"offline\")\n .build();\n \n Credential credential = new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize(\"user\");\n \n System.out.println(\"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n return credential;\n }", "private GoogleIntegration() {\n }", "private static Credential authorize(List<String> scopes) throws Exception {\r\n\r\n\t // Load client secrets.\r\n\t GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(\r\n\t JSON_FACTORY, UploadVideo.class.getResourceAsStream(\"/client_secrets.json\"));\r\n\r\n\t // Checks that the defaults have been replaced (Default = \"Enter X here\").\r\n\t if (clientSecrets.getDetails().getClientId().startsWith(\"Enter\")\r\n\t || clientSecrets.getDetails().getClientSecret().startsWith(\"Enter \")) {\r\n\t System.out.println(\r\n\t \"Enter Client ID and Secret from https://code.google.com/apis/console/?api=youtube\"\r\n\t + \"into youtube-cmdline-uploadvideo-sample/src/main/resources/client_secrets.json\");\r\n\t System.exit(1);\r\n\t }\r\n\r\n\t // Set up file credential store.\r\n\t FileCredentialStore credentialStore = new FileCredentialStore(\r\n\t new File(System.getProperty(\"user.home\"), \".credentials/youtube-api-uploadvideo.json\"),\r\n\t JSON_FACTORY);\r\n\r\n\t // Set up authorization code flow.\r\n\t GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\r\n\t HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, scopes).setCredentialStore(credentialStore)\r\n\t .build();\r\n\r\n\t // Build the local server and bind it to port 9000\r\n\t LocalServerReceiver localReceiver = new LocalServerReceiver.Builder().setPort(8080).build();\r\n\r\n\t // Authorize.\r\n\t return new AuthorizationCodeInstalledApp(flow, localReceiver).authorize(\"user\");\r\n\t }", "public static Credential authorize() throws IOException \n\t {\n\t // Load client secrets.\n\t InputStream in = YouTubeDownloader.class.getResourceAsStream(\"/youtube/downloader/resources/clients_secrets.json\");\n\t GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader( in ));\n\n\t // Build flow and trigger user authorization request.\n\t GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n\t HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n\t .setDataStoreFactory(DATA_STORE_FACTORY)\n\t .setAccessType(\"offline\")\n\t .build();\n\t Credential credential = new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize(\"user\");\n\t System.out.println(\"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n\t return credential;\n\t }", "boolean authorize(\n String secret,\n int verificationCode,\n int window)\n throws GoogleAuthenticatorException;", "public static Credential authorize() throws IOException, GeneralSecurityException {\n // Load client secrets.\n InputStream in = GoogleIntegration.class.getResourceAsStream(\"/client_secret.json\");\n GoogleClientSecrets clientSecrets =\n GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n FileDataStoreFactory DATA_FACTORY = new FileDataStoreFactory(DATA_STORE_DIR);\n HttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow =\n new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(DATA_FACTORY)\n .setAccessType(\"offline\")\n .build();\n Credential credential = new AuthorizationCodeInstalledApp(\n flow, new LocalServerReceiver()).authorize(\"user\");\n System.out.println(\n \"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n return credential;\n }", "public static Credential authorize() throws IOException {\n\t\t// Load client secrets.\n\t\tInputStream in = GmailDownloader.class.getResourceAsStream(\"/client_secret.json\");\n\t\tGoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n\t\t// Build flow and trigger user authorization request.\n\t\tGoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT, JSON_FACTORY,\n\t\t\t\tclientSecrets, SCOPES).setDataStoreFactory(DATA_STORE_FACTORY).setAccessType(\"offline\").build();\n\t\tCredential credential = new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize(\"user\");\n\t\tSystem.out.println(\"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n\t\treturn credential;\n\t}", "boolean authorize(String secret, int verificationCode)\n throws GoogleAuthenticatorException;", "public ClipsManager()\n {\n setClientAuth( m_clientId, m_clientSecret );\n setAuthToken( m_authToken );\n }", "public GoogleAuth(String apiKey, String apiSecret, String scope){\n\t\tthis.apiKey = apiKey;\n\t\tthis.apiSecret = apiSecret;\n\t\tthis.scope = scope;\n\t\tthis.service = new ServiceBuilder().provider(Google2Api.class)\n\t\t\t\t.apiKey(this.apiKey).apiSecret(this.apiSecret).callback(this.callbackUrl)\n\t\t\t\t.scope(this.scope).build();\n\n\t\ttry {\n\t\t\tHTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public GoogleApiA() {}", "public GoogleAuthenticatorAccount(final String secretKey, final int validationCode, final List<Integer> scratchCodes) {\n this.secretKey = secretKey;\n this.validationCode = validationCode;\n this.scratchCodes = scratchCodes;\n }", "public GoogleAPI() {\n try {\n ytService = getService();\n } catch (GeneralSecurityException | IOException e) {\n e.printStackTrace();\n }\n DEVELOPER_KEY = DEVELOPER_KEY_Junwei;\n }", "public ClientSecretCredential() {\n this(new IdentityClientOptions());\n }", "GoogleAuthClient(ManagedChannel channel, CallCredentials callCredentials) {\n this.channel = channel;\n blockingStub = PublisherGrpc.newBlockingStub(channel).withCallCredentials(callCredentials);\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tgetAccessTokenFromGoogle(code);\n\t\t\t\t\t}", "GoogleAuthenticatorKey createCredentials(String userName);", "private void configureGoogleClient() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n // for the requestIdToken, this is in the values.xml file that\n // is generated from your google-services.json\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n // Build a GoogleSignInClient with the options specified by gso.\n googleSignInClient = GoogleSignIn.getClient(this, gso);\n // Initialize Firebase Auth\n firebaseAuth = FirebaseAuth.getInstance();\n }", "private void buildGoogleApiClient() {\n if (googleApiClient == null) {\n googleApiClient = new GoogleApiClient.Builder(this)\n .addApi(Drive.API)\n .addScope(Drive.SCOPE_FILE)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .build();\n }\n }", "@Override\n public void onCreate(){\n super.onCreate();\n createGoogleAPIClient();\n Log.i(TAG, \"On Create\");\n }", "private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n // Load client secrets.\n InputStream in = GoogleAuthorizeUtil.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "private ClientAuthorizeRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public OperatorGoogleAuthenticationController(final T androidComponent,\n final int requestCodeBase) {\n if (androidComponent == null) {\n throw new IllegalArgumentException(\"Android component can not be null.\");\n }\n\n if (!(androidComponent instanceof GoogleAuthenticationListener)) {\n throw new IllegalArgumentException(androidComponent.getClass() + \" must implement \"\n + GoogleAuthenticationListener.class.getName());\n }\n mAndroidComponent = androidComponent;\n REQUEST_CODE_RECOVER_FROM_PLAY_SERVICES_ERROR = requestCodeBase + 1;\n }", "void authorizeApplication(@Nullable String scope, @Nullable ResponseCallback<ApplicationAccessToken> callback);", "private static Analyticsreporting initializeAnalyticsReporting() throws GeneralSecurityException, IOException {\n\n httpTransport = GoogleNetHttpTransport.newTrustedTransport();\n dataStoreFactory = new FileDataStoreFactory(DATA_STORE_DIR);\n\n // Load client secrets.\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY,\n new InputStreamReader(HelloAnalytics.class\n .getResourceAsStream(CLIENT_SECRET_JSON_RESOURCE)));\n\n // Set up authorization code flow for all authorization scopes.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow\n .Builder(httpTransport, JSON_FACTORY, clientSecrets,\n AnalyticsreportingScopes.all()).setDataStoreFactory(dataStoreFactory)\n .build();\n\n // Authorize.\n Credential credential = new AuthorizationCodeInstalledApp(flow,\n new LocalServerReceiver()).authorize(\"user\");\n // Construct the Analytics Reporting service object.\n return new Analyticsreporting.Builder(httpTransport, JSON_FACTORY, credential)\n .setApplicationName(APPLICATION_NAME).build();\n }", "private static Credential getCredentials(HttpTransport HTTP_TRANSPORT) throws IOException {\r\n // Load client secrets.\r\n InputStream in = SheetsQuickstart.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\r\n if (in == null) {\r\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\r\n }\r\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\r\n\r\n // Build flow and trigger user authorization request.\r\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\r\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\r\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\r\n .setAccessType(\"offline\")\r\n .build();\r\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\r\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\r\n }", "public AuthorizationRequest() { }", "public ClientCredentials() {\n }", "private void createRequest() {\n // Configure Google Sign In\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n }", "private void setupGoogleSignin() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n // Build a GoogleApiClient with access to the Google Sign-In API and the\n // options specified by gso.\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n }", "public static Credential authorize(final NetHttpTransport httpTransport) throws Exception {\n\t\t /*** Load client secrets. ***/\n//\t\tInputStream in = UploadYoutubeCaption.class.getResourceAsStream(CLIENT_SECRETS);\n\t\tInputStream in = new FileInputStream(\"/home/chanwit/Documents/UploadSubtitleYoutube/booming-bonito-309508-5408dbc89eef.json\");\n\t\t GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\t\t \n\t\t /*** Build flow and trigger user authorization request. ***/\n\t\t GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(httpTransport, JSON_FACTORY, clientSecrets, SCOPES).build();\n\t\t Credential credential = new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize(\"user\");\n\t\t \n\t\t return credential;\n\t}", "private void initFBGoogleSignIn() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(WEB_CLIENT_ID)\n .requestEmail()\n .build();\n\n Context context = getContext();\n mGoogleApiClient = new GoogleApiClient.Builder(context)\n .enableAutoManage(getActivity(), new GoogleApiClient.OnConnectionFailedListener() {\n @Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n mGoogleSignInTextView.setText(connectionResult.getErrorMessage());\n }\n }).addApi(Auth.GOOGLE_SIGN_IN_API, gso).build();\n }", "private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT)\n throws IOException {\n // Load client secrets.\n InputStream in = GoogleCalendar.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY,\n new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT,\n JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(\n new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\").build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "@Override\n protected void onStart(){\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n super.onStart();\n }", "private AppAuth() {\n }", "private Drive authentication() throws IOException {\n\t\t// Request a new access token using the refresh token.\n\t\tGoogleCredential credential = new GoogleCredential.Builder()\n\t\t\t\t.setTransport(HTTP_TRANSPORT)\n\t\t\t\t.setJsonFactory(JSON_FACTORY)\n\t\t\t\t.setClientSecrets(CLIENT_ID, CLIENT_SECRET).build()\n\t\t\t\t.setFromTokenResponse(new TokenResponse().setRefreshToken(REFRESH_TOKEN));\n\t\tcredential.refreshToken();\n\t\treturn new Drive.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential)\n\t\t\t\t.setApplicationName(\"tp3\").build();\n\t}", "@SuppressWarnings(\"unused\")\n private static String getRefreshToken() throws IOException {\n String client_id = System.getenv(\"PICASSA_CLIENT_ID\");\n String client_secret = System.getenv(\"PICASSA_CLIENT_SECRET\");\n \n // Adapted from http://stackoverflow.com/a/14499390/1447621\n String redirect_uri = \"http://localhost\";\n String scope = \"http://picasaweb.google.com/data/\";\n List<String> scopes;\n HttpTransport transport = new NetHttpTransport();\n JsonFactory jsonFactory = new JacksonFactory();\n\n scopes = new LinkedList<String>();\n scopes.add(scope);\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, client_id, client_secret, scopes).build();\n GoogleAuthorizationCodeRequestUrl url = flow.newAuthorizationUrl();\n url.setRedirectUri(redirect_uri);\n url.setApprovalPrompt(\"force\");\n url.setAccessType(\"offline\");\n String authorize_url = url.build();\n \n // paste into browser to get code\n System.out.println(\"Put this url into your browser and paste in the access token:\");\n System.out.println(authorize_url);\n \n Scanner scanner = new Scanner(System.in);\n String code = scanner.nextLine();\n scanner.close();\n\n flow = new GoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, client_id, client_secret, scopes).build();\n GoogleTokenResponse res = flow.newTokenRequest(code).setRedirectUri(redirect_uri).execute();\n String refreshToken = res.getRefreshToken();\n String accessToken = res.getAccessToken();\n\n System.out.println(\"refresh:\");\n System.out.println(refreshToken);\n System.out.println(\"access:\");\n System.out.println(accessToken);\n return refreshToken;\n }", "private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n InputStream in = SheetsRead.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "public CalendarService() throws IOException, GeneralSecurityException {\n InputStream in = CalendarService.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n \n NetHttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n service = new Calendar.Builder(HTTP_TRANSPORT, JSON_FACTORY, getCredentials(HTTP_TRANSPORT))\n .setApplicationName(APPLICATION_NAME)\n .build();\n }", "public String buildLoginUrl() {\n\t\tfinal GoogleAuthorizationCodeRequestUrl url = flow\n\t\t\t\t.newAuthorizationUrl();\n\t\treturn url.setRedirectUri(CALLBACK_URI).setState(stateToken).build();\n\t}", "protected synchronized void buildGoogleApiClient() {\n try {\n System.out.println(\"In GOOGLE API CLIENT\");\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API).build();\n mGoogleApiClient.connect();\n createLocationRequest();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void createRequest() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(default_web_client_id))\n .requestEmail()\n .build();\n\n mGoogleSignInClient = GoogleSignIn.getClient(Signup.this, gso);\n\n\n }", "AWSCodeCommitClient(AwsSyncClientParams clientParams) {\n super(clientParams);\n this.awsCredentialsProvider = clientParams.getCredentialsProvider();\n init();\n }", "private Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n // Load client secrets.\n InputStream in = EventoUtils.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "protected synchronized void createGoogleAPIClient() {\n googleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }", "void initCognito() {\n Auth.Builder builder = new Auth.Builder().setAppClientId(getString(R.string.cognito_client_id))\n .setAppClientSecret(getString(R.string.cognito_client_secret))\n .setAppCognitoWebDomain(getString(R.string.cognito_web_domain))\n .setApplicationContext(getApplicationContext())\n .setAuthHandler(new callback())\n .setSignInRedirect(getString(R.string.app_redirect))\n .setSignOutRedirect(getString(R.string.app_redirect));\n this.auth = builder.build();\n appRedirect = Uri.parse(getString(R.string.app_redirect));\n }", "public static void initialize() {\n Security.addProvider(new OAuth2Provider());\n }", "public AuthValueGeneratorImpl(\n ValueGenerator clientIdGenerator,\n ValueGenerator clientSecretGenerator,\n ValueGenerator authCodeGenerator,\n ValueGenerator accessTokenGenerator) {\n this.clientIdGenerator = clientIdGenerator;\n this.clientSecretGenerator = clientSecretGenerator;\n this.authCodeGenerator = authCodeGenerator;\n this.accessTokenGenerator = accessTokenGenerator;\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n FacebookSdk.sdkInitialize(context);\n callbackManager = CallbackManager.Factory.create();\n\n try {\n\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n\n/* GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestScopes(new Scope(Scopes.EMAIL))\n .requestIdToken(getString(R.string.server_client_id))\n .requestEmail()\n .build();*/\n\n /* GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(this.getResources().getString(R.string.server_client_id))\n .requestEmail().build();*/\n\n mGoogleApiClient = new GoogleApiClient.Builder(context)\n .enableAutoManage(getActivity(), this)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "public AuthorizationJson() {\n }", "public Credentials()\n {\n this(null, null, null, null);\n }", "public interface GmailClientFactory {\n /**\n * Creates a GmailClient instance\n *\n * @param credential a valid Google credential object\n * @return a GmailClient instance that contains the user's credentials\n */\n GmailClient getGmailClient(Credential credential);\n}", "protected synchronized void buildGoogleApiClient() {\n\t\tmGoogleApiClient = new GoogleApiClient.Builder(context)\n\t\t\t\t.addConnectionCallbacks(this)\n\t\t\t\t.addOnConnectionFailedListener(this)\n\t\t\t\t.addApi(LocationServices.API).build();\n\t}", "void makeAuthorizationRequest(OnAuthCompleteListener onAuthCompleteListener);", "public Facebook() {\n scopeBuilder = new ScopeBuilder();\n facebookClient = new DefaultFacebookClient(Version.VERSION_2_9);\n }", "public OAuthServlet() {\r\n\t\tsuper();\r\n\t}", "private HttpClient() {\n\t}", "public void setOAuthAccessCode(String code, String clientId, String clientSecret, String redirectURI) throws OnshapeException {\n WebTarget target = client.target(\"https://oauth.onshape.com/oauth/token\");\n MultivaluedMap<String, String> formData = new MultivaluedHashMap<>();\n formData.add(\"grant_type\", \"authorization_code\");\n formData.add(\"code\", code);\n formData.add(\"client_id\", clientId);\n formData.add(\"client_secret\", clientSecret);\n formData.add(\"redirect_uri\", redirectURI);\n Response response = target.request().post(Entity.form(formData));\n switch (response.getStatusInfo().getFamily()) {\n case SUCCESSFUL:\n setOAuthTokenResponse(response.readEntity(OAuthTokenResponse.class), new Date(), clientId, clientSecret);\n return;\n default:\n throw new OnshapeException(response.getStatusInfo().getReasonPhrase());\n }\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n loadMainActivity = (ProgressBar) findViewById(R.id.load_mainactivity);\n recyclerView = (RecyclerView)findViewById(R.id.recyclerview_for_main_activity);\n toolbar_main_activity = (Toolbar) findViewById(R.id.activity_main_toolbar);\n setSupportActionBar(toolbar_main_activity);\n AuthenticationRequest.Builder builder = new AuthenticationRequest.Builder\n (clientId, AuthenticationResponse.Type.TOKEN, redirectUri);\n AuthenticationRequest request = builder.build();\n AuthenticationClient.openLoginActivity(this, request_Code, request);\n }", "public AccountKeyDatastoreSecrets() {\n }", "public void setAuthorizationCode(int authorizationCode);", "private static GoogleApiClient getClient(@NonNull Context context) {\n final String serverClientId = context.getString(R.string.server_client_id);\n final GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(serverClientId)\n .requestEmail()\n .build();\n\n // Build a GoogleApiClient with access to the Google Sign-In API\n return new GoogleApiClient.Builder(context)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n }", "protected synchronized void buildGoogleApiClient() {\r\n mGoogleApiClient = new GoogleApiClient.Builder(getActivity())\r\n .addConnectionCallbacks(this)\r\n .addOnConnectionFailedListener(this)\r\n .addApi(LocationServices.API)\r\n .build();\r\n createLocationRequest();\r\n }", "private void initializeAuthorizationData() {\n\t\tOAuthDesktopMobileAuthCodeGrant oAuthDesktopMobileAuthCodeGrant = new OAuthDesktopMobileAuthCodeGrant(adsProperties.getProperty(\"api.bing.clientId\", ClientId));\r\n\t\toAuthDesktopMobileAuthCodeGrant.requestAccessAndRefreshTokens(adsProperties.getProperty(\"api.bing.refreshToken\"));\r\n\t\tauthorizationData = new AuthorizationData();\r\n\t\tauthorizationData.setDeveloperToken(adsProperties.getProperty(\"api.bing.developerToken\", DeveloperToken));\r\n\t\tauthorizationData.setAuthentication(oAuthDesktopMobileAuthCodeGrant);\r\n\t\tString customerId = adsProperties.getProperty(\"api.bing.customerId\", CustomerId);\r\n\t\tauthorizationData.setCustomerId(Long.parseLong(customerId));\r\n\t\tString accountId = adsProperties.getProperty(\"api.bing.accountId\", AccountId);\r\n\t\tauthorizationData.setAccountId(Long.parseLong(accountId));\r\n\t}", "protected synchronized void buildGoogleApiClient() {\n\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n mGoogleApiClient.connect();\n }", "protected synchronized void buildGoogleApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(getActivity())\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }", "protected synchronized void buildGoogleApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n mGoogleApiClient.connect();\n }", "public void setAuthorizationCode(String ac) throws IOException {\n setAuthorizationCode(ac, redirectURI);\n }", "private synchronized void buildGoogleApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(ActivityRecognition.API)\n .build();\n }", "public ClientCredentials(String organisation, String location, String equipment, String clientId, String clientSecret) {\n this.setOrganisation(organisation);\n this.setLocation(location);\n this.setEquipment(equipment);\n this.setClientId(clientId);\n this.setClientSecret(clientSecret);\n }", "protected synchronized void buildGoogleApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(getContext())\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API).build();\n }", "public synchronized void buildGoogleApiClient() {\r\n mGoogleApiClient = new GoogleApiClient.Builder(this)\r\n .addConnectionCallbacks(this)\r\n .addOnConnectionFailedListener(this)\r\n .addApi(LocationServices.API)\r\n .build();\r\n }", "protected abstract void requestAuth(@NonNull Activity activity, int requestCode);", "public AuthCodeGrantServiceImpl(\n Database database,\n AuthValueGenerator authValueGenerator) {\n this.database = database;\n this.authValueGenerator = authValueGenerator;\n }", "public OAuth2AuthenticationService(OAuth2TokenEndpointClient authorizationClient, OAuth2CookieHelper cookieHelper) {\n this.authorizationClient = authorizationClient;\n this.cookieHelper = cookieHelper;\n// recentlyRefreshed = new PersistentTokenCache<>(REFRESH_TOKEN_VALIDITY_MILLIS);\n }", "private CorrelationClient() { }", "public SalesforceAccessGrant(final String accessToken, final String scope, final String refreshToken, final String instanceUrl, final String id) {\n super(accessToken, scope, refreshToken, null);\n this.instanceUrl = instanceUrl;\n this.id = id;\n this.signature = null;\n this.issuedAt = null;\n }", "public GoogleApiRecord() {\n super(GoogleApi.GOOGLE_API);\n }", "protected synchronized void buildGoogleApiClient() {\r\n googleApiClient = new GoogleApiClient.Builder(this)\r\n .addConnectionCallbacks(this)\r\n .addOnConnectionFailedListener(this)\r\n .addApi(LocationServices.API)\r\n .build();\r\n }", "public AuthorizationInfo() {\n }", "protected synchronized void buildGoogleApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API).build();\n }", "protected synchronized void buildGoogleApiClient() {\n //Confirms no instance of GoogleApiClient has been instantiated\n if (mGoogleApiClient == null) {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }\n }", "protected synchronized void buildGoogleApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API).build();\n if (mGoogleApiClient != null) {\n mGoogleApiClient.connect();\n customProgressDialog = CustomProgressDialog.show(LocationChooser.this);\n }\n }", "protected synchronized void buildGoogleApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }", "private void creatRequest() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id)) //R.string.default_web_client_id需要將系統執行一次,讓他產生\n .requestEmail()\n .build();\n\n mGoogleSignInClient = GoogleSignIn.getClient(this,gso);\n }", "public void buildGoogleApiClient() {\n googleApiClient = new GoogleApiClient.Builder(getActivity())\n .addConnectionCallbacks(this).addOnConnectionFailedListener(this).\n addApi(LocationServices.API).build();\n googleApiClient.connect();\n }", "public void getGoogleToken() {\n String googleEmail = sharedpreferences.getString(\"GoogleEmail\", \"\");\n String scopes = sharedpreferences.getString(\"GoogleScopes\", \"\");\n if (!\"\".equals(googleEmail)) {\n MyAsyncTask asyncTask = new MyAsyncTask(googleEmail, scopes, this.getBaseContext());\n asyncTask.delegate = this;\n asyncTask.execute();\n }\n }", "private void initializeGoogleApiClient() {\n\n if (mGoogleApiClient == null) {\n mGoogleApiClient = new GoogleApiClient.Builder(getContext())\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }\n\n }", "void init() {\n CometUtils.printCometSdkVersion();\n validateInitialParams();\n this.connection = ConnectionInitializer.initConnection(\n this.apiKey, this.baseUrl, this.maxAuthRetries, this.getLogger());\n this.restApiClient = new RestApiClient(this.connection);\n // mark as initialized\n this.alive = true;\n }", "private void configureGoogleSignIn() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n googleApiClient = new GoogleApiClient.Builder(getApplicationContext()).enableAutoManage(this, new GoogleApiClient.OnConnectionFailedListener() {\n @Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Toast.makeText(LoginActivity.this, \"Error\", Toast.LENGTH_LONG).show();\n }\n }).addApi(Auth.GOOGLE_SIGN_IN_API, gso).build();\n }", "private void createRequest() {\n GoogleSignInOptions gso = new GoogleSignInOptions\n .Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n googleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this, this)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n\n signInButton = (SignInButton) findViewById(R.id.sign_in_button);\n signInButton.setSize(SignInButton.SIZE_WIDE);\n signInButton.setColorScheme(signInButton.COLOR_DARK);\n signInButton.setOnClickListener((v) -> {\n Intent intent = Auth.GoogleSignInApi.getSignInIntent(googleApiClient);\n startActivityForResult(intent, SIGN_IN_CODE);\n });\n }", "@SuppressWarnings(\"UnusedDeclaration\")\n boolean authorizeUser(\n String userName,\n int verificationCode,\n int window)\n throws GoogleAuthenticatorException;", "public OAuthMessage() {\n\t\t_parameters = new ParameterList();\n\n\t\tif (DEBUG)\n\t\t\t_log.debug(\"Created empty OAuthMessage.\");\n\t}", "private void buildGoogleApiClient() {\n Log.d(TAG, \"buildGoogleApiClient\");\n mGoogleApiClient = new GoogleApiClient.Builder(getContext())\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }", "public ClientImpl(String clientId, String redirectUri) {\n this(clientId, null, redirectUri, null);\n // this.clientId = clientId;\n // this.redirectUri = redirectUri;\n }" ]
[ "0.65219533", "0.6353456", "0.6197275", "0.6168764", "0.61563176", "0.6028695", "0.59251416", "0.5898581", "0.58804816", "0.58582485", "0.58570683", "0.5747023", "0.5727118", "0.5681224", "0.56499094", "0.56134933", "0.5603147", "0.55756325", "0.5552599", "0.5512159", "0.5480152", "0.5459694", "0.5395779", "0.53850675", "0.5384364", "0.53755283", "0.53564596", "0.53524023", "0.5348552", "0.5330672", "0.53182805", "0.5292931", "0.52780926", "0.52560437", "0.52381235", "0.52320904", "0.5207732", "0.52063245", "0.5196642", "0.51892656", "0.51840854", "0.5139651", "0.51071167", "0.5100923", "0.50997025", "0.50955", "0.5094317", "0.5076118", "0.50748706", "0.50745296", "0.5058368", "0.50561357", "0.5050296", "0.50406724", "0.50388575", "0.5035392", "0.50263315", "0.5010484", "0.50058746", "0.50007147", "0.49823833", "0.49797603", "0.49796918", "0.49784338", "0.49775034", "0.49747542", "0.49739334", "0.49662113", "0.49496508", "0.49474317", "0.49439427", "0.49439", "0.49426174", "0.4931446", "0.49202526", "0.4910054", "0.49039972", "0.48999965", "0.4894686", "0.48922077", "0.48894477", "0.48886493", "0.48760122", "0.48754212", "0.4874931", "0.48734534", "0.48730084", "0.4868701", "0.48678836", "0.48647848", "0.48560295", "0.48483947", "0.48456928", "0.48444822", "0.48433873", "0.48422414", "0.48254457", "0.48139966", "0.4811488", "0.48102862" ]
0.77973455
0
adds users google profile to the data store
public void addUser(Profile profile) throws JSONException { ofy().save().entity(profile).now(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void registerWithGoogle(UserInfo ui, String googleid) {\n\t\t_uim.insertWithGoogleId(ui, googleid);\n\t}", "public void saveProfileCreateData() {\r\n\r\n }", "public void saveOrUpdateProfile(){\n try {\n \n if(PersonalDataController.getInstance().existRegistry(username)){\n PersonalDataController.getInstance().update(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender), birthdate);\n }else{\n PersonalDataController.getInstance().create(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender));\n }\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putMessage(GBEnvironment.getInstance().getError(32), null);\n }\n GBMessage.putMessage(GBEnvironment.getInstance().getError(33), null);\n }", "private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi.getCurrentPerson(mGoogleApiClient);\n String personId = currentPerson.getId();\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n\n String personBirthday = currentPerson.getBirthday();\n int personGender = currentPerson.getGender();\n String personNickname = currentPerson.getNickname();\n\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.i(TAG, \"Id: \" + personId + \", Name: \" + personName + \", plusProfile: \" + personGooglePlusProfile + \", email: \" + email + \", Image: \" + personPhotoUrl + \", Birthday: \" + personBirthday + \", Gender: \" + personGender + \", Nickname: \" + personNickname);\n\n // by default the profile url gives\n // 50x50 px\n // image only\n // we can replace the value with\n // whatever\n // dimension we want by\n // replacing sz=X\n personPhotoUrl = personPhotoUrl.substring(0, personPhotoUrl.length() - 2) + PROFILE_PIC_SIZE;\n\n Log.e(TAG, \"PhotoUrl : \" + personPhotoUrl);\n\n Log.i(TAG, \"Finally Set UserData\");\n Log.i(TAG, \"account : \" + email + \", Social_Id : \" + personId);\n\n StringBuffer sb = new StringBuffer();\n sb.append(\"Id : \").append(personId).append(\"\\n\");\n sb.append(\"Name : \").append(personName).append(\"\\n\");\n sb.append(\"plusProfile : \").append(personGooglePlusProfile).append(\"\\n\");\n sb.append(\"Email : \").append(email).append(\"\\n\");\n sb.append(\"PhotoUrl : \").append(personPhotoUrl).append(\"\\n\");\n sb.append(\"Birthday : \").append(personBirthday).append(\"\\n\");\n sb.append(\"Gender : \").append(personGender).append(\"\\n\");\n sb.append(\"Nickname : \").append(personNickname).append(\"\\n\");\n\n tv_info.setText(sb.toString());\n\n signOutFromGplus();\n\n /** set Google User Data **/\n RegisterData.name = personName;\n RegisterData.email = email;\n RegisterData.password = \"\";\n RegisterData.source = \"google\";\n RegisterData.image = personPhotoUrl;\n\n new UserLoginAsyncTask().execute();\n } else {\n Toast.makeText(mContext, \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void addProfile(String profileName, String username, String server, int port)\r\n\t{\r\n\t\tps.setValue(count + PROFILE, profileName + \",\" + username + \",\" + server + \",\" + port);\r\n\t}", "private void addToRealDB(String GoogleId){\n this.newUser.setGOOGLE_ID(GoogleId);\n dbRootRef.child(USERS).child(this.newUser.getGOOGLE_ID()).setValue(this.newUser);\n dbRootRef.child(USERS_NOTES).child(this.newUser.getGOOGLE_ID()).child(\"numOfNotesInAllTime\").setValue(\"0\");\n }", "public void registerNewUser(final FirebaseFirestore db, final User user) {\n FirebaseUser FbUser = FirebaseAuth.getInstance().getCurrentUser();\n if (FbUser != null) {\n UserProfileChangeRequest request = new UserProfileChangeRequest.Builder()\n .setDisplayName(user.getName())\n .build();\n FbUser.updateProfile(request);\n }\n\n final DatabaseHelper localDB = new DatabaseHelper(getApplicationContext());\n db.collection(collection)\n .document(user.getEmail())\n .set(user)\n .addOnSuccessListener(avoid -> {\n Toast.makeText(getApplicationContext(), \"Registered\", Toast.LENGTH_SHORT).show();\n\n // Send to cache (local db)\n addToCache(user, localDB);\n\n // Send intent to dashboard\n Intent goToDashboard = new Intent(SignupActivity.this, Dashboard.class);\n Bundle myBundle = new Bundle();\n myBundle.putString(\"email\", user.getEmail());\n// myBundle.putString(\"name\", user.getName());\n// myBundle.putString(\"maxIncome\", String.valueOf(user.getMaxIncome()));\n myBundle.putBoolean(\"coming_from_login_signup\", true);\n goToDashboard.putExtras(myBundle);\n startActivity(goToDashboard);\n })\n .addOnFailureListener(e -> snackbar.showStatus(\"Not Registered\"));\n }", "private void sendUserData() {\n FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();\n DatabaseReference myref = firebaseDatabase.getReference(Objects.requireNonNull(firebaseAuth.getUid()));\n UserProfile userProfile = new UserProfile(name, email, post, 0);\n myref.setValue(userProfile);\n }", "private void googleSignInResult(GoogleSignInResult result) {\n if (result.isSuccess()) {\n // add to shared preferences\n GoogleSignInAccount account = result.getSignInAccount();\n userName = account.getDisplayName();\n userEmail = account.getEmail();\n userGoogleId = account.getId();\n userPhotoUrl = account.getPhotoUrl();\n\n editor.putString(getString(R.string.shared_prefs_key_username), userName);\n editor.putString(getString(R.string.shared_prefs_key_email), userEmail);\n editor.putString(getString(R.string.shared_prefs_key_google_id), userGoogleId);\n editor.putString(getString(R.string.shared_prefs_key_user_photo_url), userPhotoUrl.toString());\n\n editor.apply();\n\n // add to firebase users\n member = new Member();\n member.setUsername(userName);\n member.setEmail(userEmail);\n member.setId(userGoogleId);\n member.setPhotoUrl(userPhotoUrl.toString());\n member.setLoginType(getString(R.string.login_type_google));\n\n rref.orderByChild(getString(R.string.firebase_key_email)).equalTo(member.getEmail()).addListenerForSingleValueEvent(\n new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n String key;\n if (dataSnapshot.exists()) {\n key = dataSnapshot.getChildren().iterator().next().getKey();\n firebaseKey = key;\n getUserDetailsFromFirebase();\n } else {\n // new user\n key = rref.push().getKey();\n }\n editor.putString(getString(R.string.shared_prefs_key_firebasekey), key);\n editor.apply();\n\n Map<String, Object> userUpdates = new HashMap<>();\n\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_username), userName);\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_google_id), userGoogleId);\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_photo_url), userPhotoUrl.toString());\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_login_type), getString(R.string.login_type_google));\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_email), userEmail);\n\n rref.updateChildren(userUpdates);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n }\n );\n\n } else {\n gotoMainActivity();\n }\n }", "public long registerUserProfile(User user);", "@Override\r\n public int addProfile(Profile newProfile) {\r\n return profileDAO.addProfile(newProfile);\r\n }", "public void addProfile(Profile profile) {\n\t\tprofiles.put(profile.getProfileOwner(), profile.getProfileText());\n\t\tpersistentStorageAgent.writeThrough(profile);\n\t}", "private void saveUserData() {\n\t\ttry {\n\t\t\t// if the user did not change default profile\n\t\t\t// picture, mProfilePictureArray will be null.\n\t\t\tif (bytePhoto != null) {\n\t\t\t\tFileOutputStream fos = openFileOutput(\n\t\t\t\t\t\tgetString(R.string.profile_photo_file_name),\n\t\t\t\t\t\tMODE_PRIVATE);\n\t\t\t\tfos.write(bytePhoto);\n\t\t\t\tfos.flush();\n\t\t\t\tfos.close();\n\t\t\t}\n\t\t} catch (Exception ioe) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t\tdb = new PersonalEventDbHelper(this);\n\t\t// Getting the shared preferences editor\n\t\tString mKey = getString(R.string.preference_name);\n\t\tSharedPreferences mPrefs = getSharedPreferences(mKey, MODE_PRIVATE);\n\n\t\tSharedPreferences.Editor mEditor = mPrefs.edit();\n\t\tmEditor.clear();\n\n\t\tFriend user = new Friend();\n\t\tArrayList<Event> list = new ArrayList<Event>();\n\n\t\t// Save name information\n\t\tmKey = getString(R.string.name_field);\n\t\tString mValue = (String) ((EditText) findViewById(R.id.editName))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\t\tname = mValue;\n\t\tuser.setName(mValue);\n\n\t\t// PARSE\n\t\tGlobals.USER = name;\n\n\t\t// Save class information\n\t\tmKey = getString(R.string.class_field);\n\t\tmValue = (String) ((EditText) findViewById(R.id.editClass)).getText()\n\t\t\t\t.toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\tuser.setClassYear(mValue);\n\n\t\t// Save major information\n\t\tmKey = getString(R.string.major_field);\n\t\tmValue = (String) ((EditText) findViewById(R.id.editMajor)).getText()\n\t\t\t\t.toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Save course information\n\t\t// Course 1\n\t\t// Course name\n\t\tmKey = \"Course #1 Name\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse1name))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\tEvent event1 = new Event();\n\t\tevent1.setEventName(mValue);\n\t\tevent1.setColor(Globals.USER_COLOR);\n\t\t// Course time period\n\t\tmKey = \"Course #1 Time\";\n\t\tSpinner mSpinnerSelection = (Spinner) findViewById(R.id.course1TimeSpinner);\n\t\tint selectedCourse = mSpinnerSelection.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse);\n\n\t\tevent1.setClassPeriod(selectedCourse);\n\n\t\t// Course location\n\t\tmKey = \"Course #1 Location\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse1loc))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course 2\n\t\tevent1.setEventLocation(mValue);\n\t\tevent1.setOwnerName(name);\n\t\t// if (!Globals.classList.contains(event1.getString(\"objectId\"))){\n\t\t// Globals.classList.add(event1.getString(\"objectId\"));\n\t\t// System.out.println(event1.getString(\"objectId\"));\n\t\tevent1.saveInBackground();\n\t\t// mEditor.putString(Globals.CLASS_KEY1, event1.getString(\"objectId\"));\n\t\t// }\n\t\t// else{\n\t\t// ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n\t\t// query.whereEqualTo(\"objectId\", Globals.classList.get(0));\n\t\t// try {\n\t\t// Event event = query.getFirst();\n\t\t// event.setClassPeriod(event1.getClassPeriod());\n\t\t// event.setEventLocation(event1.getEventLocation());\n\t\t// event.setEventName(event1.getEventName());\n\t\t// event.saveInBackground();\n\t\t// } catch (ParseException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\t\t// }\n\n\t\tdb.insertEntry(event1);\n\t\tlist.add(event1);\n\n\t\t// Course 2\n\n\t\t// Save course information\n\t\t// Course name\n\t\tmKey = \"Course #2 Name\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse2name))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course time period\n\t\tmKey = \"Course #2 Time\";\n\t\tmSpinnerSelection = (Spinner) findViewById(R.id.course2TimeSpinner);\n\t\tselectedCourse = mSpinnerSelection.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse);\n\t\tEvent event2 = new Event();\n\t\tevent2.setEventName(mValue);\n\t\tevent2.setColor(Globals.USER_COLOR);\n\n\t\t// Course time period\n\t\tmKey = \"Course #2 Time\";\n\t\tSpinner mSpinnerSelection2 = (Spinner) findViewById(R.id.course2TimeSpinner);\n\t\tint selectedCourse2 = mSpinnerSelection2.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse2);\n\n\t\tevent2.setClassPeriod(selectedCourse2);\n\n\t\t// Course location\n\t\tmKey = \"Course #2 Location\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse2loc))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course 3\n\t\tevent2.setEventLocation(mValue);\n\t\tevent2.setOwnerName(name);\n\t\t// System.out.println(event2.getString(\"objectId\"));\n\t\t// if (!Globals.classList.contains(event2.getString(\"objectId\"))){\n\t\t// Globals.classList.add(event2.getString(\"objectId\"));\n\t\tevent2.saveInBackground();\n\t\t// mEditor.putString(Globals.CLASS_KEY2, event2.getString(\"objectId\"));\n\t\t// }\n\t\t// else{\n\t\t// ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n\t\t// query.whereEqualTo(\"objectId\", Globals.classList.get(1));\n\t\t// try {\n\t\t// Event event = query.getFirst();\n\t\t// event.setClassPeriod(event2.getClassPeriod());\n\t\t// event.setEventLocation(event2.getEventLocation());\n\t\t// event.setEventName(event2.getEventName());\n\t\t// event.saveInBackground();\n\t\t// } catch (ParseException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\t\t// }\n\t\tdb.insertEntry(event2);\n\t\tlist.add(event2);\n\n\t\t// Course 3\n\n\t\t// Save course information\n\t\t// Course name\n\t\tmKey = \"Course #3 Name\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse3name))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course time period\n\t\tmKey = \"Course #3 Time\";\n\t\tmSpinnerSelection = (Spinner) findViewById(R.id.course3TimeSpinner);\n\t\tselectedCourse = mSpinnerSelection.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse);\n\n\t\tEvent event3 = new Event();\n\t\tevent3.setEventName(mValue);\n\t\tevent3.setColor(Globals.USER_COLOR);\n\n\t\t// Course time period\n\t\tmKey = \"Course #3 Time\";\n\t\tSpinner mSpinnerSelection3 = (Spinner) findViewById(R.id.course3TimeSpinner);\n\t\tint selectedCourse3 = mSpinnerSelection3.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse3);\n\n\t\tevent3.setClassPeriod(selectedCourse3);\n\n\t\t// Course location\n\t\tmKey = \"Course #3 Location\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse3loc))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course 4\n\t\tevent3.setEventLocation(mValue);\n\t\tevent3.setOwnerName(name);\n\t\t// if (!Globals.classList.contains(event3.getString(\"objectId\"))){\n\t\t// Globals.classList.add(event3.getString(\"objectId\"));\n\t\tevent3.saveInBackground();\n\t\t// mEditor.putString(Globals.CLASS_KEY3, event3.getString(\"objectId\"));\n\t\t// }\n\t\t// else{\n\t\t// ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n\t\t// query.whereEqualTo(\"objectId\", Globals.classList.get(2));\n\t\t// try {\n\t\t// Event event = query.getFirst();\n\t\t// event.setClassPeriod(event3.getClassPeriod());\n\t\t// event.setEventLocation(event3.getEventLocation());\n\t\t// event.setEventName(event3.getEventName());\n\t\t// event.saveInBackground();\n\t\t// } catch (ParseException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\t\t// }\n\t\tdb.insertEntry(event3);\n\t\tlist.add(event3);\n\t\t// Course 4\n\n\t\t// Save course information\n\t\t// Course name\n\t\tmKey = \"Course #4 Name\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse4name))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course time period\n\t\tmKey = \"Course #4 Time\";\n\t\tmSpinnerSelection = (Spinner) findViewById(R.id.course4TimeSpinner);\n\t\tselectedCourse = mSpinnerSelection.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse);\n\t\tEvent event4 = new Event();\n\t\tevent4.setEventName(mValue);\n\t\tevent4.setColor(Globals.USER_COLOR);\n\n\t\t// Course time period\n\t\tmKey = \"Course #4 Time\";\n\t\tSpinner mSpinnerSelection4 = (Spinner) findViewById(R.id.course4TimeSpinner);\n\t\tint selectedCourse4 = mSpinnerSelection4.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse4);\n\n\t\tevent4.setClassPeriod(selectedCourse4);\n\n\t\t// Course location\n\t\tmKey = \"Course #4 Location\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse4loc))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\tevent4.setEventLocation(mValue);\n\n\t\tlist.add(event4);\n\t\tevent4.setOwnerName(name);\n\t\t// if (!Globals.classList.contains(event4.getString(\"objectId\"))){\n\t\t// Globals.classList.add(event4.getString(\"objectId\"));\n\t\tevent4.saveInBackground();\n\t\t// mEditor.putString(Globals.CLASS_KEY4, event4.getString(\"objectId\"));\n\t\t// }\n\t\t// else{\n\t\t// ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n\t\t// query.whereEqualTo(\"objectId\", Globals.classList.get(3));\n\t\t// try {\n\t\t// Event event = query.getFirst();\n\t\t// event.setClassPeriod(event4.getClassPeriod());\n\t\t// event.setEventLocation(event4.getEventLocation());\n\t\t// event.setEventName(event4.getEventName());\n\t\t// event.saveInBackground();\n\t\t// } catch (ParseException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\t\t// }\n\t\tdb.insertEntry(event4);\n\t\tuser.setSchedule(list);\n\n\t\t// Call method to get all entries from the datastore!!!\n\n\t\t// EventDbHelper db = new EventDbHelper(this);\n\t\t// try {\n\t\t// db.insertEntry(user);\n\t\t// } catch (IOException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\n\t\t// Commit all the changes into the shared preference\n\t\tmEditor.commit();\n\t\tGlobals.isProfileSet = true;\n\t}", "public void addProfile(SQLDatabase database, Profile profile)\n\t{\n\t\tprofiles.put(profile.getName(), profile);\n\t\tsave(database);\n\t}", "private void saveProfile()\n {\n mFirebaseUser = mFirebaseAuth.getCurrentUser();\n mDatabase = FirebaseDatabase.getInstance().getReference();\n mUserId = mFirebaseUser.getUid();\n\n StorageReference filePath = mStorage.child(\"UserPic\").child(mImageUri.getLastPathSegment());\n //UserProfile userProfile = new UserProfile();\n filePath.putFile(mImageUri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n mDatabase.child(\"users\").child(mUserId).child(\"userName\").setValue(fname);\n mDatabase.child(\"users\").child(mUserId).child(\"userImage\").setValue(downloadUrl.toString());\n }\n });\n\n }", "public void saveProfileEditData() {\r\n\r\n }", "public void addUserToFirestore() {\n if (isSignedIn()) {\n getUserTask().addOnCompleteListener(\n new OnCompleteListener<DocumentSnapshot>()\n {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if (task.isSuccessful() && !task.getResult().exists()) {\n setUser(userMap(false));\n setAnalysis(analysisMap(new ArrayList<String>()));\n setSlouches(slouchMap(new ArrayList<Date>(), new ArrayList<Double>()));\n }\n }\n });\n }\n }", "public void addNewUser(String email) {\n String userName = email.split(\"@\")[0];\n mUsersRef.child(userName).setValue(userName);\n userRef = db.getReference(\"users/\" + getUsername());\n userRef.child(\"email\").setValue(email);\n userSigns = new HashMap<String, UserSign>();\n }", "public void addUserInfo(HashMap<String,Object> map){\n fStore.collection(\"user_profiles\").document(fUser.getUid()).set(map).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n return;\n }\n });\n }", "private void addProfile(String inputName) {\n \tif (! inputName.equals(\"\")) {\n\t\t\t///Creates a new profile and adds it to the database if the inputName is not found in the database\n \t\tif (database.containsProfile(inputName)) {\n \t\t\tlookUp(inputName);\n \t\t\tcanvas.showMessage(\"Profile with name \" + inputName + \" already exist.\");\n \t\t\treturn;\n \t\t}\n\t\t\tprofile = new FacePamphletProfile (inputName);\n\t\t\tdatabase.addProfile(profile);\n\t\t\tcurrentProfile = database.getProfile(inputName);\n \t\tcanvas.displayProfile(currentProfile);\n\t\t\tcanvas.showMessage(\"New profile created.\");\n\t\t\t\n \t}\n\t\t\n\t}", "private void RegisterGoogleSignup() {\n\n\t\ttry {\n\t\t\tLocalData data = new LocalData(SplashActivity.this);\n\n\t\t\tArrayList<String> asName = new ArrayList<String>();\n\t\t\tArrayList<String> asValue = new ArrayList<String>();\n\n\t\t\tasName.add(\"email\");\n\t\t\tasName.add(\"firstname\");\n\t\t\tasName.add(\"gender\");\n\t\t\tasName.add(\"id\");\n\t\t\tasName.add(\"lastname\");\n\t\t\tasName.add(\"name\");\n\t\t\t// asName.add(\"link\");\n\n\t\t\tasName.add(\"device_type\");\n\t\t\tasName.add(\"device_id\");\n\t\t\tasName.add(\"gcm_id\");\n\t\t\tasName.add(\"timezone\");\n\n\t\t\tasValue.add(data.GetS(LocalData.EMAIL));\n\t\t\tasValue.add(data.GetS(LocalData.FIRST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.GENDER));\n\t\t\tasValue.add(data.GetS(LocalData.ID));\n\t\t\tasValue.add(data.GetS(LocalData.LAST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.NAME));\n\t\t\t// asValue.add(data.GetS(LocalData.LINK));\n\n\t\t\tasValue.add(\"A\");\n\n\t\t\tString android_id = Secure\n\t\t\t\t\t.getString(SplashActivity.this.getContentResolver(),\n\t\t\t\t\t\t\tSecure.ANDROID_ID);\n\n\t\t\tasValue.add(android_id);\n\n\t\t\tLocalData data1 = new LocalData(SplashActivity.this);\n\t\t\tasValue.add(data1.GetS(\"gcmId\"));\n\t\t\tasValue.add(Main.GetTimeZone());\n\t\t\tString sURL = StringURLs.getQuery(StringURLs.GOOGLE_LOGIN, asName,\n\t\t\t\t\tasValue);\n\n\t\t\tConnectServer connectServer = new ConnectServer();\n\t\t\tconnectServer.setMode(ConnectServer.MODE_POST);\n\t\t\tconnectServer.setContext(SplashActivity.this);\n\t\t\tconnectServer.setListener(new ConnectServerListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onServerResponse(String sJSON, JSONObject jsonObject) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\tLog.d(\"JSON DATA\", sJSON);\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tif (sJSON.length() != 0) {\n\t\t\t\t\t\t\tJSONObject object = new JSONObject(sJSON);\n\t\t\t\t\t\t\tJSONObject response = object\n\t\t\t\t\t\t\t\t\t.getJSONObject(JSONStrings.JSON_RESPONSE);\n\t\t\t\t\t\t\tString sResult = response\n\t\t\t\t\t\t\t\t\t.getString(JSONStrings.JSON_SUCCESS);\n\n\t\t\t\t\t\t\tif (sResult.equalsIgnoreCase(\"1\") == true) {\n\n\t\t\t\t\t\t\t\tString user_id = response.getString(\"userid\");\n\n\t\t\t\t\t\t\t\tLocalData data = new LocalData(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this);\n\t\t\t\t\t\t\t\tdata.Update(\"userid\", user_id);\n\t\t\t\t\t\t\t\tdata.Update(\"name\", response.getString(\"name\"));\n\n\t\t\t\t\t\t\t\tGetNotificationCount();\n\n\t\t\t\t\t\t\t} else if (sResult.equalsIgnoreCase(\"0\") == true) {\n\n\t\t\t\t\t\t\t\tString msgcode = jsonObject.getJSONObject(\n\t\t\t\t\t\t\t\t\t\t\"response\").getString(\"msgcode\");\n\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, msgcode),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception exp) {\n\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconnectServer.execute(sURL);\n\n\t\t} catch (Exception exp) {\n\n\t\t\tToast.makeText(SplashActivity.this,\n\t\t\t\t\tMain.getStringResourceByName(SplashActivity.this, \"c100\"),\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t}\n\t}", "@Override\n\tpublic void createUserProfile(User user) throws Exception {\n\n\t}", "public void setUserProfile(UserProfile userProfile) {this.userProfile = userProfile;}", "void saveUserData(User user);", "public void addFavorite(String google_id, String store_name, Integer account_id){\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"google_id\", google_id);\r\n params.put(\"name\", store_name);\r\n params.put(\"account_id\", String.valueOf(account_id));\r\n String url = API_DOMAIN + STORE_EXT + ADD_FAVORITE_ACTION;\r\n this.makeVolleyRequest( url, params );\r\n }", "void setUserProfile(Map<String, Object> profile);", "private void createProfile(ParseUser parseUser){\n final Profile profile = new Profile();\n\n profile.setShortBio(\"\");\n profile.setLongBio(\"\");\n profile.setUser(parseUser);\n\n //default image taken from existing default user\n ParseQuery<ParseObject> query = ParseQuery.getQuery(\"Profile\");\n query.getInBackground(\"wa6q24VD5V\", new GetCallback<ParseObject>() {\n public void done(ParseObject searchProfile, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"Couldn't retrieve default image\");\n e.printStackTrace();\n return;\n }\n else {\n defaultImage = searchProfile.getParseFile(\"profileImage\");\n\n if (defaultImage != null)\n profile.setProfileImage(defaultImage);\n else\n Log.d(TAG, \"Default image is null\");\n }\n }\n });\n\n profile.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if (e != null) {\n Log.e(TAG, \"Error while saving\");\n e.printStackTrace();\n return;\n }\n\n Log.d(TAG, \"Created and saved profile\");\n }\n });\n }", "@Override\n public void onSuccess(AuthResult authResult) {\n Log.d(\"Test\",\"Facebook to firebase success\");\n User userToAdd = new User();\n userToAdd.setEmailAddress(email);\n String[] splited = fullName.split(\"\\\\s+\");\n userToAdd.setFirstName(splited[0]);\n userToAdd.setLastName(splited[1]);\n userToAdd.setPictureUrl(pictureUrl);\n usersTable.child(FirebaseAuth.getInstance().getCurrentUser().getUid()).setValue(userToAdd).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"Failure\",e.getMessage());\n }\n });\n Toast.makeText(activity, \"added to database \", Toast.LENGTH_LONG).show();\n }", "private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n String id = currentPerson.getId();\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.e(TAG, \"Id: \"+id+\", Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n signInTask = new AsyncTask(mBaseActivity);\n signInTask.execute(id, email, personName);\n// SharedPreferences preferences = mBaseActivity.getSharedPreferences(\"com.yathams.loginsystem\", MODE_PRIVATE);\n// preferences.edit().putString(\"email\", email).putString(\"userName\", personName).commit();\n\n } else {\n Toast.makeText(getApplicationContext(),\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void pushToHibernate(){\n DATA_API.saveUser(USER);\n }", "public void Register(String email, String password, String username)\n {\n try\n {\n ObservableList<String> stats = FXCollections.observableArrayList();\n stats.add(\"search:0\");\n stats.add(\"add:0\");\n stats.add(\"remove:0\");\n ObservableList<String> history = FXCollections.observableArrayList();\n ObservableList<String> favorite = FXCollections.observableArrayList();\n\n userProfiles.add(new Profile(email,password,username,stats,history,favorite));\n }\n catch (Exception e)\n {\n System.out.println(\"Something goofed up : \" + e);\n }\n }", "void addAspirantProfile(String email, AspirantProfile aspirantProfile)\n throws IllegalArgumentException, ServiceException;", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n fbAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n //Log.d(TAG, \"signInWithCredential:success\");\n FirebaseUser user = fbAuth.getCurrentUser();\n UserModel userModel=new UserModel();\n userModel.setEmail(user.getEmail());\n userModel.setDisplayName(user.getDisplayName());\n userModel.setPhotoUrl(user.getPhotoUrl().toString());\n userModel.setUid(user.getUid());\n UserFBDB userFBDB = new UserFBDB();\n userFBDB.save(userModel);\n updateUI(user);\n } else {\n // If sign in fails, display a message to the user.\n //Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n Exception ex=task.getException();\n signupWithGoogleBtn.setVisibility(View.VISIBLE);\n mProgress.setVisibility(View.INVISIBLE);\n Toast.makeText(SignupActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n //updateUI(null);\n }\n\n // ...\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"singn\", e.getMessage());\n }\n });\n }", "public UserProfile createUserProfile(String username, UserProfile newProfile);", "public void createEditProfileSession(Profile profile) {\n editor.putString(KEY_EMAIL, profile.getMail());\n editor.putString(KEY_NAME, profile.getName());\n editor.putString(KEY_NUMBER,profile.getMobile());\n editor.commit();\n }", "public static Task<Void> addNewUser(String id, Map<String, Object> data) {\n // add a new document to the users collection\n return FirebaseFirestore.getInstance()\n .collection(Const.USERS_COLLECTION)\n .document(id)\n .set(data);\n }", "public void storeUser(User user) {\n User doublecheck = getUser(user.getEmail());\n if(doublecheck != null){\n if(user.getAboutMe() == null && doublecheck.getAboutMe() != null){\n user.setAboutMe(doublecheck.getAboutMe());\n }\n if(user.getFirstName() == null && doublecheck.getFirstName() != null){\n user.setFirstName(doublecheck.getFirstName());\n }\n if(user.getLastName() == null && doublecheck.getLastName() != null){\n user.setLastName(doublecheck.getLastName());\n }\n /*if(user.getAdvisees() == null && doublecheck.getAdvisees() != null){\n user.setAdvisees(doublecheck.getAdvisees());\n }\n if(user.getAdvisors() == null && doublecheck.getAdvisors() != null){\n user.setAdvisors(doublecheck.getAdvisors());\n }\n */\n }\n Entity userEntity = new Entity(\"User\", user.getEmail());\n userEntity.setProperty(\"email\", user.getEmail());\n userEntity.setProperty(\"aboutMe\", user.getAboutMe());\n userEntity.setProperty(\"firstName\", user.getFirstName());\n userEntity.setProperty(\"lastName\", user.getLastName());\n //userEntity.setProperty(\"advisees\", user.getAdviseesToString());\n //userEntity.setProperty(\"advisors\", user.getAdvisorsToString());\n datastore.put(userEntity);\n\n }", "private void addUserAsMarker() {\n firestoreService.findUserById(new OnUserDocumentReady() {\n @Override\n public void onReady(UserDocument userDocument) {\n if(userDocument != null && userDocument.getUserid().equals(preferences.get(\"user_id\",0L))) {\n String id = preferences.get(DOCUMENT_ID, \"\");\n //Add current user to ListInBounds\n userDocumentAll.setDocumentid(id);\n userDocumentAll.setUsername(userDocument.getUsername());\n userDocumentAll.setPicture(userDocument.getPicture());\n userDocumentAll.setLocation(userDocument.getLocation());\n userDocumentAll.setFollowers(userDocument.getFollowers());\n userDocumentAll.setIsvisible(userDocument.getIsvisible());\n userDocumentAll.setIsprivate(userDocument.getIsprivate());\n userDocumentAll.setIsverified(userDocument.getIsverified());\n userDocumentAll.setUserid(userDocument.getUserid());\n userDocumentAll.setToken(userDocument.getToken());\n oneTimeAddableList.add(userDocumentAll);\n }\n }\n\n @Override\n public void onFail() {\n\n }\n\n @Override\n public void onFail(Throwable cause) {\n\n }\n });\n\n }", "public void write(StructuredTableContext context, CredentialProfileId id,\n CredentialProfile profile) throws IOException {\n StructuredTable table = context.getTable(CredentialProviderStore.CREDENTIAL_PROFILES);\n Collection<Field<?>> row = Arrays.asList(\n Fields.stringField(CredentialProviderStore.NAMESPACE_FIELD,\n id.getNamespace()),\n Fields.stringField(CredentialProviderStore.PROFILE_NAME_FIELD,\n id.getName()),\n Fields.stringField(CredentialProviderStore.PROFILE_DATA_FIELD,\n GSON.toJson(profile)));\n table.upsert(row);\n }", "private void createGooglePlusProfileTable(){\n cellTableOfGooglePlusProfile.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);\n\n // Add a text columns to show the details.\n TextColumn<GooglePlusIdentity> columnFirstLine = new TextColumn<GooglePlusIdentity>() {\n @Override\n public String getValue(GooglePlusIdentity object) {\n return object.getId();\n }\n };\n cellTableOfGooglePlusProfile.addColumn(columnFirstLine, \"ID\");\n\n TextColumn<GooglePlusIdentity> columnSecondLine = new TextColumn<GooglePlusIdentity>() {\n @Override\n public String getValue(GooglePlusIdentity object) {\n return object.getGivenName();\n }\n };\n cellTableOfGooglePlusProfile.addColumn(columnSecondLine, \"Given Name\");\n\n TextColumn<GooglePlusIdentity> townColumn = new TextColumn<GooglePlusIdentity>() {\n @Override\n public String getValue(GooglePlusIdentity object) {\n return object.getFamilyName();\n }\n };\n cellTableOfGooglePlusProfile.addColumn(townColumn, \"Family Name\");\n\n TextColumn<GooglePlusIdentity> countryColumn = new TextColumn<GooglePlusIdentity>() {\n @Override\n public String getValue(GooglePlusIdentity object) {\n return object.getUrl();\n }\n };\n cellTableOfGooglePlusProfile.addColumn(countryColumn, \"URL\");\n\n TextColumn<GooglePlusIdentity> imageURL = new TextColumn<GooglePlusIdentity>() {\n @Override\n public String getValue(GooglePlusIdentity object) {\n return object.getImageUrl();\n }\n };\n cellTableOfGooglePlusProfile.addColumn(imageURL, \"ImageURL\");\n\n TextColumn<GooglePlusIdentity> kind = new TextColumn<GooglePlusIdentity>() {\n @Override\n public String getValue(GooglePlusIdentity object) {\n return object.getImageUrl();\n }\n };\n cellTableOfGooglePlusProfile.addColumn(kind, \"Kind\");\n\n final SingleSelectionModel<GooglePlusIdentity> selectionModel = new SingleSelectionModel<>();\n cellTableOfGooglePlusProfile.setSelectionModel(selectionModel);\n }", "public static boolean add(Context context, User user){\n SharedPreferences.Editor editor= getSharedPreferences(context)\n .edit();\n if(user !=null){\n editor.putString(USERNAME,user.getUsername());\n editor.putString(PASSWORD,user.getPassword());\n editor.putString(GENDER,user.getGender());\n editor.putString(ADDRESS,user.getAddress());\n editor.commit();\n return true;\n }\n return false;\n }", "private void saveUserData() {\n mSharedPreferences.clearProfile();\n mSharedPreferences.setName(mName);\n mSharedPreferences.setEmail(mEmail);\n mSharedPreferences.setGender(mGender);\n mSharedPreferences.setPassWord(mPassword);\n mSharedPreferences.setYearGroup(mYearGroup);\n mSharedPreferences.setPhone(mPhone);\n mSharedPreferences.setMajor(mMajor);\n\n mImageView.buildDrawingCache();\n Bitmap bmap = mImageView.getDrawingCache();\n try {\n FileOutputStream fos = openFileOutput(getString(R.string.profile_photo_file_name), MODE_PRIVATE);\n bmap.compress(Bitmap.CompressFormat.PNG, 100, fos);\n fos.flush();\n fos.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n\n if (entryPoint.getStringExtra(SOURCE).equals(MainActivity.ACTIVITY_NAME)) {\n Toast.makeText(RegisterActivity.this,\n R.string.edit_success, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(RegisterActivity.this,\n R.string.register_success, Toast.LENGTH_SHORT).show();\n }\n\n }", "private void addUserToFireBase() {\n Storage storage = new Storage(activity);\n RetrofitInterface retrofitInterface = RetrofitClient.getRetrofit().create(RetrofitInterface.class);\n Call<String> tokenCall = retrofitInterface.addUserToFreebase(RetrofitClient.FIREBASE_ENDPOINT + \"/\" + storage.getUserId() + \"/\" + storage.getFirebaseToken(), storage.getAccessToken());\n tokenCall.enqueue(new Callback<String>() {\n @Override\n public void onResponse(Call<String> call, Response<String> response) {\n if (response.isSuccessful()) {\n\n Toast.makeText(activity, \"Firebase success!\", Toast.LENGTH_SHORT).show();\n\n } else {\n Toast.makeText(activity, \"Failed to add you in Firebase!\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<String> call, Throwable t) {\n\n /*handle network error and notify the user*/\n if (t instanceof SocketTimeoutException) {\n Toast.makeText(activity, R.string.connection_timeout, Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n }", "@Override\n\tpublic void saveUserSettingProfile(UserProfile userProfile)\n\t\t\tthrows Exception {\n\n\t}", "public void storeUser(User user) {\n Entity userEntity = new Entity(\"User\", user.getEmail());\n userEntity.setProperty(\"email\", user.getEmail());\n userEntity.setProperty(\"aboutMe\", user.getAboutMe());\n datastore.put(userEntity);\n }", "Accessprofile save(Accessprofile accessprofile);", "private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = null;\n if(currentPerson.getImage().getUrl() != null){\n \tpersonPhotoUrl = currentPerson.getImage().getUrl();\n }else{\n \tpersonPhotoUrl = \"\";\n }\n String personGooglePlusProfile = currentPerson.getUrl();\n String gplusemail = Plus.AccountApi.getAccountName(mGoogleApiClient);\n \n Log.e(TAG, \"Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n \n user_id = currentPerson.getId();\n profile_image = personPhotoUrl;\n profile_url = personGooglePlusProfile;\n name = personName;\n this.email = gplusemail;\n \n /* txtName.setText(personName);\n txtEmail.setText(email);*/\n \n // by default the profile url gives 50x50 px image only\n // we can replace the value with whatever dimension we want by\n // replacing sz=X\n personPhotoUrl = personPhotoUrl.substring(0,\n personPhotoUrl.length() - 2)\n + PROFILE_PIC_SIZE;\n \n // new LoadProfileImage(imgProfilePic).execute(personPhotoUrl);\n \n Thread t = new Thread()\n\t\t\t\t{\n\t\t\t\t\tpublic void run()\n\t\t\t\t\t{\n\t\t\t\t\t\tJSONObject obj = new JSONObject();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tobj.put(\"uid\", user_id);\n\t\t\t\t\t\t\tobj.put(\"email\", email);\n\t\t\t\t\t\t\tobj.put(\"profile_url\", profile_url);\n\t\t\t\t\t\t\tobj.put(\"name\", name);\n\t\t\t\t\t\t\tobj.put(\"profile_image\", profile_image);\n\t\t\t\t\t\t\tobj.put(\"type\", \"google\");\n\t\t\t\t\t\t\tobj.put(\"device_id\", app.getDeviceInfo().device_id);\n\t\t\t\t\t\t\tobj.put(\"device_type\", \"android\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString response = HttpClient.getInstance(getApplicationContext()).SendHttpPost(Constant.SOCIAL_LOGIN, obj.toString());\n\t\t\t\t\t\t\tif(response != null){\n\t\t\t\t\t\t\t\tJSONObject ob = new JSONObject(response);\n\t\t\t\t\t\t\t\tif(ob.getBoolean(\"status\")){\n\t\t\t\t\t\t\t\t\tString first_name = ob.getString(\"first_name\");\n\t\t\t\t\t\t\t\t\tString last_name = ob.getString(\"last_name\");\n\t\t\t\t\t\t\t\t\tString user_id = ob.getString(\"user_id\");\n\t\t\t\t\t\t\t\t\tString reservation_type = ob.getString(\"reservation_type\");\n\t\t\t\t\t\t\t\t\tboolean checkin_status = ob.getBoolean(\"checkin_status\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tString rev_id = null,reservation_code = null;\n\t\t\t\t\t\t\t\t\tJSONArray object = ob.getJSONArray(\"reservation_detail\");\n\t\t\t\t\t\t\t\t\tfor(int i = 0;i<object.length();i++){\n\t\t\t\t\t\t\t\t\t\trev_id = object.getJSONObject(i).getString(\"reservation_id\");\n\t\t\t\t\t\t\t\t\t\treservation_code = object.getJSONObject(i).getString(\"reservation_code\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tapp.getUserInfo().SetUserInfo(first_name,\n\t\t\t\t\t\t\t\t\t\t\tlast_name,\n\t\t\t\t\t\t\t\t\t\t\tuser_id,\n\t\t\t\t\t\t\t\t\t\t\trev_id,\n\t\t\t\t\t\t\t\t\t\t\treservation_code,\n\t\t\t\t\t\t\t\t\t\t\treservation_type,\n\t\t\t\t\t\t\t\t\t\t\tcheckin_status);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tapp.getLogininfo().setLoginInfo(true);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tUpdateUiResult(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\tt.start();\n \n } else {\n Toast.makeText(getApplicationContext(),\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n\t\tpublic void onUserProfileUpdate(User arg0) {\n\t\t\t\n\t\t}", "public void addUserSign(String category, String url, String title){\n UserSign newSign = new UserSign(category, url, title);\n mUsersRef.child(getUsername()).child(\"myDeck\").child(url).setValue(newSign);\n userSigns.put(url, newSign);\n System.out.println(\"ADDED SIGN \" +url+ \" TO MY DECK size of deck is \" + userSigns.size());\n }", "private void editProfile() {\n Log.d(TAG, \"Starting volley request to API\");\n try {\n String authority = String.format(Constants.AUTHORITY,\n Constants.TENANT,\n Constants.EDIT_PROFILE_POLICY);\n\n User currentUser = Helpers.getUserByPolicy(\n sampleApp.getUsers(),\n Constants.EDIT_PROFILE_POLICY);\n\n sampleApp.acquireToken(\n this,\n Constants.SCOPES.split(\"\\\\s+\"),\n currentUser,\n UiBehavior.SELECT_ACCOUNT,\n null,\n null,\n authority,\n getEditPolicyCallback());\n } catch(MsalClientException e) {\n /* No User */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n }\n\n }", "private void addUser(People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureUserIsMutable();\n user_.add(value);\n }", "@Override\n public void onSuccess(Uri uri) {\n UserProfileChangeRequest profileUpdate = new UserProfileChangeRequest.Builder().setDisplayName(lname).setPhotoUri(uri).build();\n currentUser.updateProfile(profileUpdate).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n //user info updated succssfully\n saveInformation();\n showMessage(\"Register Complete\");\n updateUI();\n }\n }\n });\n }", "public void uploadUserDetailsToDatabase(String email, String password){\n User user = new User(email, password);\n FirebaseDatabase.getInstance().getReference(\"Users\").push()\n .setValue(user).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n Log.i(\"details\", \"uploaded\");\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.i(\"details\", \"upload failed\");\n }\n });\n }", "private void addProfile(ProfileInfo profileInfo)\r\n\t{\r\n\t\taddProfile(profileInfo.getProfileName(), \r\n\t\t\t\tprofileInfo.getUsername(), \r\n\t\t\t\tprofileInfo.getServer(),\r\n\t\t\t\tprofileInfo.getPort());\r\n\t}", "private void callUpdateProfile() {\n String userStr = CustomSharedPreferences.getPreferences(Constants.PREF_USER_LOGGED_OBJECT, \"\");\n Gson gson = new Gson();\n User user = gson.fromJson(userStr, User.class);\n LogUtil.d(\"QuyNT3\", \"Stored profile:\" + userStr +\"|\" + (user != null));\n //mNameEdt.setText(user.getName());\n String id = user.getId();\n String oldPassword = mOldPassEdt.getText().toString();\n String newPassword = mNewPassEdt.getText().toString();\n String confirmPassword = mConfirmPassEdt.getText().toString();\n String fullName = mNameEdt.getText().toString();\n String profileImage = user.getProfile_image();\n UpdateUserProfileRequest request = new UpdateUserProfileRequest(id, fullName, profileImage,\n oldPassword, newPassword, confirmPassword);\n request.setListener(callBackEvent);\n new Thread(request).start();\n }", "@Override\n\tpublic void addItem(User entity) {\n\t\tuserRepository.save(entity);\n\t\t\n\t}", "@Override\n\tpublic void addMember(String login, String password, String profile)\n\t\t\tthrows BadEntryException, MemberAlreadyExistsException {\n\n\t}", "@Override\n\tpublic void addMember(User user, UserProfile profileTemplate)\n\t\t\tthrows Exception {\n\n\t}", "private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.e(TAG, \"Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n\n Toast.makeText(context, personName + \"\\n\" + email, Toast.LENGTH_SHORT).show();\n\n /*txtName.setText(personName);\n txtEmail.setText(email);*/\n\n // by default the profile url gives 50x50 px image only\n // we can replace the value with whatever dimension we want by\n // replacing sz=X\n /*personPhotoUrl = personPhotoUrl.substring(0,\n personPhotoUrl.length() - 2)\n + PROFILE_PIC_SIZE;\n\n new LoadProfileImage(imgProfilePic).execute(personPhotoUrl);*/\n\n } else {\n Toast.makeText(context,\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public User saveuser(User newUser){\n Optional<User> user = userRepo.findById(newUser.getGoogleId());\n if(!user.isPresent()){\n userRepo.save(newUser);\n return newUser;\n }\n else{\n throw new UserNotFoundException(\" \");\n }\n }", "@Override\n\tpublic void insertUserAndShopData() {\n\t\t\n\t}", "public void addNewProfile(int clientID, int serverID, String login, String password, String playerName) {\n\n this.currentProfileConfig = new ProfileConfig();\n\n // Set profile data\n this.currentProfileConfig.setPlayerName(playerName);\n this.currentProfileConfig.setLogin(login);\n this.currentProfileConfig.setPassword(password);\n this.currentProfileConfig.setLocalClientID(clientID);\n this.currentProfileConfig.setOriginalServerID(serverID);\n // FIXME must be current server id in config files ???\n // ??? int serverCurrentId = this.serverConfigManager.getServerConfig(serverID).getServerID();\n this.currentProfileConfig.setServerID(serverID); //serverCurrentId);\n\n // Save profile informations\n this.profileConfigList.addProfile(this.currentProfileConfig);\n this.profileConfigList.save();\n\n // Set Data Manager ready\n ClientDirector.getDataManager().setCurrentProfileConfig(this.currentProfileConfig);\n }", "@Override\n\tpublic void updateArtikUserProfile(HashMap<String, Object> map) {\n\t\tsqlSession.insert(PATH + \"updateArtikUserProfile\", map);\n\t}", "private void onSucessGoogleLogin(GoogleSignInResult result) {\n\n GoogleSignInAccount account = result.getSignInAccount();\n\n mUser = new UserModel();\n mUser.createUser(Objects.requireNonNull(account).getIdToken(), account.getDisplayName(), account.getEmail(), Objects.requireNonNull(account.getPhotoUrl()).toString(), account.getPhotoUrl());\n// SessionManager.getInstance().createUser(mUser);\n if (mUser.getIdToken() != null) {\n AuthCredential credential = GoogleAuthProvider.getCredential(mUser.getIdToken(), null);\n firebaseAuthWithGoogle(credential);\n }\n\n\n }", "void addUser(String uid, String firstname, String lastname, String pseudo);", "private void registerUserToFirebaseAuth() {\n Utils.showProgressDialog(this);\n Task<AuthResult> task = mAuth.createUserWithEmailAndPassword(etEmail.getText().toString().trim(), etPassword.getText().toString().trim());\n task.addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Utils.dismissProgressDialog();\n if (task.isSuccessful()) {\n String firebaseId = task.getResult().getUser().getUid();\n\n // Storage Image to Firebase Storage.\n addProfileImageToFirebaseStorage(firebaseId);\n\n } else {\n Utils.toast(context, \"Some Error Occurs\");\n }\n }\n });\n }", "@Override\n\tpublic void updateUserProfileInfo(String name) throws Exception {\n\n\t}", "public com.eviware.soapui.config.OAuth1ProfileConfig addNewOAuth1Profile()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.eviware.soapui.config.OAuth1ProfileConfig target = null;\n target = (com.eviware.soapui.config.OAuth1ProfileConfig)get_store().add_element_user(OAUTH1PROFILE$0);\n return target;\n }\n }", "public boolean saveUser() {\n\t\tDatastoreService datastore = DatastoreServiceFactory\n\t\t\t\t.getDatastoreService();\n\t\tTransaction txn = datastore.beginTransaction();\n\t\tQuery gaeQuery = new Query(\"users\");\n\t\tPreparedQuery pq = datastore.prepare(gaeQuery);\n\t\tList<Entity> list = pq.asList(FetchOptions.Builder.withDefaults());\n\t\tSystem.out.println(\"Size = \" + list.size());\n\t\t\n\t\ttry {\n\t\tEntity employee = new Entity(\"users\", list.size() + 2);\n\n\t\temployee.setProperty(\"name\", this.name);\n\t\temployee.setProperty(\"email\", this.email);\n\t\temployee.setProperty(\"password\", this.password);\n\t\t\n\t\tdatastore.put(employee);\n\t\ttxn.commit();\n\t\treturn true;\n\t\t}catch(Exception e)\n\t\t{\n\t\t\treturn false;\t\t\n\t\t}\n\t\t\n\t\tfinally{\t\t\t\n\t\t\t if (txn.isActive()) {\n\t\t txn.rollback();\n\t\t }\n\t\t\t\n\t\t}\n\t\t\n\n\t}", "private void CreateUser(){\n String uid = currUser.getUid();\n Map<String, Object> userMap = new HashMap<>();\n\n //add the user details to the userMap\n userMap.put(\"car-make\", \"\");\n userMap.put(\"firstname\", \"firstname\");\n userMap.put(\"lastname\", \"lastname\");\n userMap.put(\"registration-no\", \"\");\n userMap.put(\"seats-no\", 0);\n userMap.put(\"user-email\", currUser.getEmail());\n userMap.put(\"user-id\", currUser.getUid());\n userMap.put(\"p-ride\", null);\n userMap.put(\"d-ride\", null);\n userMap.put(\"latitude\", null);\n userMap.put(\"longitude\", null);\n userMap.put(\"rating\", -1);\n userMap.put(\"amountOfRatings\", 0);\n userMap.put(\"ride-price\", null);\n\n //set the details into the database\n dataStore.collection(\"users\").document(uid)\n .set(userMap)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void v) {\n Log.d(TAG, \"User was added to the db\");\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(TAG, \"Exception: \", e);\n }\n });\n }", "public void addStore( String name, String google_id ){\r\n\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"name\", name);\r\n params.put(\"google_id\", google_id);\r\n String url = API_DOMAIN + STORE_EXT + ADD_ACTION;\r\n this.makeVolleyRequest( url, params );\r\n }", "public static void signUp(final String email, String password, final String fullName, final String pictureUrl, final Activity activity) {\n Statics.auth.createUserWithEmailAndPassword(email, password)\n .addOnSuccessListener(new OnSuccessListener<AuthResult>() {\n @Override\n public void onSuccess(AuthResult authResult) {\n // add user to database\n Log.d(\"Test\",\"Facebook to firebase success\");\n User userToAdd = new User();\n userToAdd.setEmailAddress(email);\n String[] splited = fullName.split(\"\\\\s+\");\n userToAdd.setFirstName(splited[0]);\n userToAdd.setLastName(splited[1]);\n userToAdd.setPictureUrl(pictureUrl);\n usersTable.child(FirebaseAuth.getInstance().getCurrentUser().getUid()).setValue(userToAdd).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"Failure\",e.getMessage());\n }\n });\n Toast.makeText(activity, \"added to database \", Toast.LENGTH_LONG).show();\n }\n }).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(\"Test\",\"Facebook ato firebase success\");\n\n }\n });\n }", "private void addToCache(User user, DatabaseHelper db) {\n if (db.insertUser(user)) {\n Log.d(\"Signup Activity\", \"Added to cache\");\n }\n }", "@Override\n public void loadProfileUserData() {\n mProfilePresenter.loadProfileUserData();\n }", "@Override\n\tpublic void onUserProfileUpdate(User updatedUser) {\n\n\t}", "public void createUserAccount(String email, String password, final String userId, final SignUpInterface listner) {\n collectionReference = db.collection(\"Users\");\n firebaseAuth = FirebaseAuth.getInstance();\n firebaseAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if(task.isSuccessful()){\n currentUser = FirebaseAuth.getInstance().getCurrentUser();\n assert currentUser!= null;\n final String currentUserId = currentUser.getUid();\n\n Map<String, String> userMap = new HashMap<>();\n userMap.put(\"UserIdInDB\", currentUserId);\n userMap.put(\"UserName\", userId);\n\n collectionReference.add(userMap)\n .addOnSuccessListener(new OnSuccessListener<DocumentReference>() {\n @Override\n public void onSuccess(DocumentReference documentReference) {\n documentReference.get()\n .addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if(task.getResult().exists()) {\n\n String name = task.getResult().getString(\"UserName\");\n\n EntityClass entityObj = EntityClass.getInstance();\n entityObj.setUserName(name);\n entityObj.setUserIdInDb(currentUserId);\n listner.signUpStatus(true);\n }\n }\n });\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(TAG, \"onFailure: \" + e.getMessage());\n listner.signUpStatus(false);\n listner.onFailure(e.getMessage());\n }\n });\n }\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(TAG, \"onFailure: \" + e.getMessage());\n listner.signUpStatus(false);\n listner.onFailure(e.getMessage());\n }\n });\n }", "@Override\n public void onSuccess(Uri uri) {\n\n\n UserProfileChangeRequest profleUpdate = new UserProfileChangeRequest.Builder()\n .setDisplayName(name)\n .setPhotoUri(uri)\n .build();\n\n\n currentUser.updateProfile(profleUpdate)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if (task.isSuccessful()) {\n // user info updated successfully\n showMessage(\"Register Complete\");\n updateUI();\n }\n\n }\n });\n\n }", "@Override\n public void onSuccess(Uri uri) {\n\n\n UserProfileChangeRequest profleUpdate = new UserProfileChangeRequest.Builder()\n .setDisplayName(name)\n .setPhotoUri(uri)\n .build();\n\n\n currentUser.updateProfile(profleUpdate)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if (task.isSuccessful()) {\n // user info updated successfully\n showMessage(\"Register Complete\");\n updateUI();\n }\n\n }\n });\n\n }", "public void addUser(User user);", "void addUser(User user);", "void addUser(User user);", "public void addSecondaryProfile(final SecondaryProfile profile,\n final ServiceClientCompletion<ResponseResult> completion)\n {\n final HashMap<String, String> headers =\n getHeaderWithAccessToken(mSharecareToken.accessToken);\n\n // Create request body.\n final HashMap<String, Object> body = new HashMap<String, Object>(6);\n body.put(NAME, profile.getName());\n body.put(GENDER, profile.gender);\n if (!StringHelper.isNullOrEmpty(profile.identifier))\n {\n body.put(ID, profile.identifier);\n }\n body.put(HEIGHT, profile.heightInMeters);\n body.put(WEIGHT, profile.weightInKg);\n if (!StringHelper.isNullOrEmpty(profile.avatarURI))\n {\n final HashMap<String, String> image =\n new HashMap<String, String>(3);\n image.put(TYPE, IMAGE);\n image.put(URL, profile.avatarURI);\n image.put(DESCRIPTION, PROFILE_AVATAR);\n body.put(IMAGE, image);\n }\n\n final Gson gson = new GsonBuilder().create();\n final String bodyJson = gson.toJson(body);\n\n // Create endpoint.\n final String endPoint =\n String.format(ADD_FAMILY_ENDPOINT, mSharecareToken.accountID);\n\n this.beginRequest(endPoint, ServiceMethod.PUT, headers, null, bodyJson,\n ServiceResponseFormat.GSON,\n new ServiceResponseTransform<JsonElement, ResponseResult>()\n {\n @Override\n public ResponseResult transformResponseData(\n final JsonElement json)\n throws ServiceResponseTransformException\n {\n final ResponseResult result =\n checkResultFromAuthService(json);\n if (result.success)\n {\n final JsonElement response = getResponseFromJson(json);\n if (response != null)\n {\n try\n {\n final String idString = response.getAsString();\n final HashMap<String, Object> parameters =\n new HashMap<String, Object>(1);\n parameters.put(ID, idString);\n result.parameters = parameters;\n }\n catch (final ClassCastException e)\n {\n// Crashlytics.logException(e);\n }\n }\n }\n else\n {\n result.errorMessage =\n \"We're sorry. Something went wrong adding a family member. Please try again.\";\n }\n LogError(\"addSecondaryProfile\", result);\n return result;\n }\n }, completion);\n }", "boolean addUserActivityToDB(UserActivity userActivity);", "TasteProfile.UserProfile getUserProfile (String user_id);", "private void saveUserLocation(final GeoPoint geo , Boolean av){\n try{\n if (av) {\n userInfoDoc.update(\"Location\", geo).addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n Log.d(TAG, \"onComplete: \\ninserted user location into database.\" +\n \"\\n latitude: \" + geo.getLatitude() +\n \"\\n longitude: \" + geo.getLongitude());\n }\n });\n } else stopSelf();\n }catch (NullPointerException e){\n Log.e(TAG, \"saveUserLocation: User instance is null, stopping location service.\");\n Log.e(TAG, \"saveUserLocation: NullPointerException: \" + e.getMessage() );\n stopSelf();\n }\n }", "@Override\r\n\tpublic void add(User user) {\n\r\n\t}", "@Override\n\tpublic void insert(User entity) {\n\t\tuserlist.put(String.valueOf(entity.getDni()), entity);\n\t}", "public void storeUsrGrpsNDetails(String usrName) {\n List mainUsrL = db.getUserDetails(usrName);\n HashMap<String, String> h1 = new HashMap<String, String>();\n List g1 = (List) mainUsrL.get(0);\n List g2 = (List) mainUsrL.get(1);\n h1.put(\"Name\", (String) g1.get(0));\n h1.put(\"Address\", (String) g1.get(1));\n h1.put(\"Email\", (String) g1.get(2));\n h1.put(\"Detail\", (String) g1.get(3));\n usrD.put(usrName, h1);\n usrGrps.put(usrName, g2);\n\n\n }", "private void saveSettings(){\n // get current user from shared preferences\n currentUser = getUserFromSharedPreferences();\n\n final User newUser = currentUser;\n Log.i(\"currentUser name\",currentUser.getUsername());\n String username = ((EditText)findViewById(R.id.usernameET)).getText().toString();\n\n if(\"\".equals(username)||username==null){\n Toast.makeText(getApplicationContext(),\"Failed to save, user name cannot be empty\",Toast.LENGTH_LONG).show();\n return;\n }\n\n newUser.setUsername(username);\n\n // update user data in firebase\n Firebase.setAndroidContext(this);\n Firebase myFirebaseRef = new Firebase(Config.FIREBASE_URL);\n\n // set value and add completion listener\n myFirebaseRef.child(\"users\").child(newUser.getFireUserNodeId()).setValue(newUser,new Firebase.CompletionListener() {\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n\n Toast.makeText(getApplicationContext(),\"Data could not be saved. \" + firebaseError.getMessage(),Toast.LENGTH_SHORT).show();\n } else {\n // if user info saved successfully, then save user image\n uploadPhoto();\n Toast.makeText(getApplicationContext(),\"User data saved successfully.\",Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n }", "private void putPersonalInformation() throws SQLException, FileNotFoundException, IOException {\n AdUserPersonalData personal;\n try {\n personal = PersonalDataController.getInstance().getPersonalData(username);\n staff_name = personal.getGbStaffName();\n staff_surname = personal.getGbStaffSurname();\n id_type = \"\"+personal.getGbIdType();\n id_number = personal.getGbIdNumber();\n putProfPic(personal.getGbPhoto());\n phone_number = personal.getGbPhoneNumber();\n mobile_number = personal.getGbMobileNumber();\n email = personal.getGbEmail();\n birthdate = personal.getGbBirthdate();\n gender = \"\"+personal.getGbGender();\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putException(ex);\n }\n }", "public static void createNewUserPreference(Context context) {\r\n\t\tString newUserId = generateNewUserId();\r\n\t\tString userConfigKey = getUserConfigFileNameKey(newUserId);\r\n\t\tString userDbKey = getUserDatabaseFileNameKey(newUserId);\r\n\t\tString userConfigFileName = getUserConfigFileName(context, newUserId);\r\n\t\tString userDbFileName = getUserDatabaseFileName(context, newUserId);\r\n\r\n\t\tSharedPreferences prefs = PreferenceManager\r\n\t\t\t\t.getDefaultSharedPreferences(context);\r\n\t\tif (prefs != null) {\r\n\t\t\tEditor editor = prefs.edit();\r\n\t\t\tif (editor != null) {\r\n\t\t\t\teditor.putString(\"user-\" + newUserId, newUserId);\r\n\t\t\t\teditor.putString(userConfigKey, userConfigFileName);\r\n\t\t\t\teditor.putString(userDbKey, userDbFileName);\r\n\t\t\t}\r\n\r\n\t\t\teditor.commit();\r\n\t\t}\r\n\t}", "public void getProfile() {\n\n String mKey = getString(R.string.preference_name);\n SharedPreferences mPrefs = getSharedPreferences(mKey, MODE_PRIVATE);\n\n // Load the user email\n\n /*userEmail = getString(R.string.preference_key_profile_email);\n userPassword = getString(R.string.preference_key_profile_password);*/\n\n // Load the user email\n\n mKey = getString(R.string.preference_key_profile_email);\n userEmail = mPrefs.getString(mKey, \"\");\n\n // Load the user password\n\n mKey = getString(R.string.preference_key_profile_password);\n userPassword = mPrefs.getString(mKey, \"\");\n\n\n //userEmail = getString(R.string.register_email);\n //userPassword = getString(R.string.register_password);\n\n }", "@Override\n\tpublic void addUser(String email, String type) {\n\t\tif (type.equals(AbstractUser.BASIC))\n\t\t\tusers[counter++] = new BasicUser(email);\n\t\telse if (type.equals(AbstractUser.PREMIUM))\n\t\t\tusers[counter++] = new PremiumUser(email);\t\n\t}", "public void addFriend(Profile p)\n {\n\n friendslist.add(p);\n }", "private void populateProfile() {\n mPassword_input_layout.getEditText().setText(mSharedPreferences.getPassWord());\n mEmail_input_layout.getEditText().setText(mSharedPreferences.getEmail());\n mEdit_name_layout.getEditText().setText(mSharedPreferences.getName());\n ((RadioButton) mRadioGender.getChildAt(mSharedPreferences.getGender())).setChecked(true);\n mPhone_input_layout.getEditText().setText(mSharedPreferences.getPhone());\n mMajor_input_layout.getEditText().setText(mSharedPreferences.getMajor());\n mClass_input_layout.getEditText().setText(mSharedPreferences.getYearGroup());\n\n // Load profile photo from internal storage\n try {\n FileInputStream fis = openFileInput(getString(R.string.profile_photo_file_name));\n Bitmap bmap = BitmapFactory.decodeStream(fis);\n mImageView.setImageBitmap(bmap);\n fis.close();\n } catch (IOException e) {\n // Default profile\n }\n }", "public void addUser() {\r\n PutItemRequest request = new PutItemRequest().withTableName(\"IST440Users\").withReturnConsumedCapacity(\"TOTAL\");\r\n PutItemResult response = client.putItem(request);\r\n }", "@Override\n\tpublic void saveUserProfile(UserProfile userProfile, boolean isOption,\n\t\t\tboolean isBan) throws Exception {\n\n\t}", "public void writeUserInro(String name,String key){\n SharedPreferences user = context.getSharedPreferences(\"user_info\",0);\n SharedPreferences.Editor mydata = user.edit();\n mydata.putString(\"uName\" ,name);\n mydata.putString(\"uKey\",key);\n mydata.commit();\n }", "public boolean addUserData (UserData userData) //ADD\n\t{\n\t\tContentValues contentValues = new ContentValues();\n\t\tcontentValues.put(COLUMN_USER_NAME, userData.getUserName());\n\t\tcontentValues.put(COLUMN_WORKING_HOURS, userData.getWorkingHours());\n\t\tcontentValues.put(COLUMN_WEEKEND, userData.getWeekendType());\n\n\t\tlong result = db.insert(TABLE_USER, null, contentValues);\n\t\tdb.close();\n\n\t\t//Notifying if transaction was successful \n\t\tif(result == -1)return false;\n\t\telse return true;\n\n\t}", "@Override\n\tpublic void updateUserProfile(User user) throws Exception {\n\n\t}" ]
[ "0.6592279", "0.658662", "0.646471", "0.6353959", "0.62847316", "0.6220087", "0.6188373", "0.61795527", "0.61487347", "0.6128492", "0.6114862", "0.60853136", "0.60848767", "0.60506415", "0.6044456", "0.5981356", "0.59488475", "0.59485734", "0.59275985", "0.5896187", "0.58960587", "0.5881265", "0.5878973", "0.5877491", "0.58640903", "0.58620167", "0.5852866", "0.5850458", "0.58441174", "0.58359206", "0.58115387", "0.5806756", "0.57968724", "0.57878876", "0.5770111", "0.5767406", "0.57596576", "0.5755911", "0.5749777", "0.57255644", "0.572031", "0.5718784", "0.5699074", "0.5696274", "0.56861055", "0.5684875", "0.56724125", "0.56456786", "0.5643083", "0.5638585", "0.5632334", "0.563005", "0.56182593", "0.5616555", "0.560247", "0.5600786", "0.5597032", "0.5594988", "0.5593613", "0.55930305", "0.5587065", "0.5582845", "0.55812407", "0.558105", "0.5580341", "0.557234", "0.55692774", "0.5554031", "0.5548903", "0.5547416", "0.554689", "0.55431056", "0.5539901", "0.553637", "0.5535854", "0.553555", "0.55312145", "0.55312145", "0.55269456", "0.5524947", "0.5524947", "0.551953", "0.55142903", "0.55116135", "0.5510324", "0.5503555", "0.5501522", "0.5496775", "0.54957783", "0.5493397", "0.54837966", "0.5483313", "0.54774296", "0.5476839", "0.54752994", "0.54740137", "0.547074", "0.54616845", "0.54572105", "0.5456308" ]
0.695232
0
Builds a login URL based on client ID, secret, callback URI, and scope
public String buildLoginUrl() { final GoogleAuthorizationCodeRequestUrl url = flow .newAuthorizationUrl(); return url.setRedirectUri(CALLBACK_URI).setState(stateToken).build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getLoginUrl(OpenIdProvider provider) {\n if (env.isRunningInDevMode()) {\n return \"http://\" + env.getHost() + \"/_ah/login?continue=/?gwt.codesvr=\"\n + env.getUrlParameter(\"gwt.codesvr\");\n } else {\n return \"http://\" + env.getHost() + \"/_ah/login_redir?claimid=\" \n + provider.getProviderId() + \"&continue=http://\" + env.getHost() + \"/\";\n }\n }", "String buildAuthorizeUrl(LastFmAuthParameters parameters);", "public static URL getUrlForLogin()\r\n {\r\n String strUrl = getBaseURL() + \"account_services/api/1.0/account/login\";\r\n return str2url( strUrl );\r\n }", "protected String constructLoginURL(HttpServletRequest request) {\n String delimiter = \"?\";\n if (authenticationProviderUrl.contains(\"?\")) {\n delimiter = \"&\";\n }\n String loginURL = authenticationProviderUrl + delimiter\n + originalUrlQueryParam + \"=\"\n + request.getRequestURL().toString();\n return loginURL;\n }", "public static void buildAuthorizeURI(HttpServletRequest req,HttpServletResponse resp) throws IOException\n\t{\n\t\tHttpSession session=req.getSession();\n\t\t//generate random string for the state param in authorize query\n\t String state=randomStringGenerator(6);\n\t \n\t //generate random string for the nonce parameters in authorize query(Implicit flow/Hybrid flow)\n\t String nonce=randomStringGenerator(6);\n\t String response_type=authPickFlow(5);\n\t //store the state value as key and response_type as value in session and cross verified the state value in response to avoid CSRF attack\n\t //parallely process the future request based on response_type by passing the state parameter from the response and get the required response_type\n\t session.setAttribute(state, response_type);\n\t //It is on the session to verified the ID Token(Implict flow,Hybrid Flow)\n\t session.setAttribute(nonce,nonce);\n\t // System.out.println(state+\":\"+(String) session.getAttribute(state));\n\t //Build the URI with clientID,scope,state,redirectURI,response type\n\t\tString url=\"http://localhost:8080/OPENID/msOIDC/authorize?client_id=mano.lmfsktkmyj&scope=openid profile&state=\"+state+\"&redirect_uri=http://localhost:8080/OPENID/msPhoneBook/response1&response_type=\"+response_type+\"&nonce=\"+nonce;\n\t\t//Redirect the browser to msOIDC authorization endpoint\n\t\tresp.sendRedirect(url);\n\t}", "public static String getAuthrUrl(String redirectUri, String scope) throws Exception {\r\n\t\tString getCodeUrl = MessageFormat.format(GET_OAUTH_USER_AGREE_URL, SOCIAL_LOGIN_CLIENT_ID, java.net.URLEncoder.encode(redirectUri, \"utf-8\"), scope);\r\n\t\treturn getCodeUrl;\r\n\t}", "public AuthRedirect buildAuthRedirectUrl(String redirectUrl) {\n try {\n List<String> happyClientIds = listClientIdsWithRefreshTokens();\n\n for (String clientId : oauthApplicationByClientId.get().keySet()) {\n if (happyClientIds.contains(clientId)) {\n continue;\n }\n\n AuthRedirect result = new AuthRedirect();\n\n result.url = AUTH_URL + String.format(\"?response_type=code&client_id=%s&redirect_uri=%s&scope=%s\",\n clientId,\n URLEncoder.encode(redirectUrl, \"UTF-8\"),\n URLEncoder.encode(SCOPE, \"UTF-8\"));\n result.clientId = clientId;\n\n return result;\n }\n\n return null;\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public static URL getUrlForGetAppLoginUrl( long appId )\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/application/login-url/appId/\"+appId;\r\n return str2url( strUrl );\r\n }", "protected abstract void calculateOauth2RedirectUrl(UriComponentsBuilder uriComponentsBuilder);", "protected abstract void calculateOauth2RedirectUrl(UriComponentsBuilder uriComponentsBuilder);", "static\n @NonNull\n String getLoginUrlForApplicationIdentifier(@NonNull String appId, @NonNull Meli.AuthUrls authUrl) {\n String login_url = authUrl.getValue();\n login_url = login_url.concat(\"/authorization?response_type=token&client_id=\");\n return login_url.concat(appId);\n }", "abstract public String buildAuthRequest(String userId, String authCallback) throws IOException;", "public String getAuthorizationUrl(final TrueNTHOAuthConfig config) {\n\n\tfinal String baseURL = config.getBaseAuthorizationURL();\n\n\tfinal String callback = OAuthEncoder.encode(config.getCallback());\n\n\tif (config.hasScope()) {\n\t return baseURL + String.format(SCOPED_AUTHORIZE_URL, config.getApiKey(), callback, OAuthEncoder.encode(config.getScope()));\n\t} else {\n\t return baseURL + String.format(AUTHORIZE_URL, config.getApiKey(), callback);\n\t}\n\n }", "private String getAccessTokenUrl(String identityServer) {\n\t\treturn \"https://accounts.google.com/o/oauth2/token\";\n\t}", "@Override\n protected String getAccessTokenUrl(final JsonNode inputOAuthConfiguration) {\n return TOKEN_URL;\n }", "public static String getAuthorizationURL(String clientId, String redirectURL, String sppBaseUrl) throws SPPClientException {\n\n try {\n return OAuthClientRequest\n .authorizationLocation(sppBaseUrl + \"/oauth/authorize\")\n .setClientId(clientId)\n .setRedirectURI(redirectURL)\n .setParameter(\"response_type\", \"code\")\n .buildQueryMessage()\n .getLocationUri();\n } catch (OAuthSystemException e) {\n log.error(\"Exception when getting authorization url for \"+ clientId +\" using redirect url: \" +redirectURL +\" and base url: \" +sppBaseUrl );\n throw new SPPClientException(e);\n }\n }", "private String getSpringLoginUrl() {\n if (this.springLoginUrl == null) {\n this.springLoginUrl = GWT.getHostPageBaseURL() + DEFAULT_SPRING_LOGIN_URL;\n }\n return springLoginUrl;\n }", "public static String buildOauthBody(String redirectUrl, String accessCode, String clientId, String clientPass)\n {\n\n URLCodec encoder = new URLCodec();\n\n try\n {\n // valid grant_types are refresh_token and authorization_code\n\n return \"grant_type=authorization_code&redirect_uri=\" + encoder.encode(redirectUrl) + \"&code=\" + accessCode\n + \"&grant_type=\" + GrantType.AUTHORIZATION_CODE + \"&client_id=\" + clientId + \"&&client_secret=\"\n + clientPass;\n }\n catch (EncoderException e)\n {\n LOG.severe(e.getMessage());\n }\n\n return null;\n }", "public static String buildPrevalidateURL() {\n\t\treturn NISUtils.getURL() + \"/nis/nwapi/v2/customer/credentials/prevalidate\";\n\t}", "private void sendUserAuthorization(String authUrl, String clientID, String redirectUrl, String scopes){\n\t\ttry {\n\t\t\tthis.user.sendGlobal(\"JWWFOauth-go\", \"{\\\"url\\\":\"+Json.escapeString(authUrl + \"?client_id=\" + clientID + \n\t\t\t\t\t\"&redirect_uri=\" + URLEncoder.encode(redirectUrl, \"UTF-8\") + \"&scope=\" + URLEncoder.encode(scopes, \"UTF-8\"))+\"}\");\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Configuration.Builder getClientIdAndClientSecretBuilder() {\n String clientId = \"0993a005480472a69fab10c2f9b8ad0d6bee7acf\";//getString(R.string.client_id);\n String clientSecret=\"oVsWjoQ2RHeHvZ8xK3yrtdHrG7YiN+rnHh4qqBfmscDbCwplTFzytAoVIVrXMnAQShuBYuA6fZftYL+AIvX5zRP8JXOs06dQcej1yeL/ACJSGuiKoQJbqdC6CELuP+Pl\";\n\n String codeGrantRedirectUri = \"deva://robokart\";\n Configuration.Builder configBuilder =\n new Configuration.Builder(clientId, clientSecret, SCOPE, null,\n null);\n configBuilder.setCacheDirectory(this.getCacheDir())\n .setUserAgentString(getUserAgentString(this))\n // Used for oauth flow\n .setCodeGrantRedirectUri(codeGrantRedirectUri);\n\n return configBuilder;\n }", "private static String buildGetUserInfodUrl(String userId){\n Uri.Builder uriBuilder = END_POINT.buildUpon()\n .appendQueryParameter(\"method\", GETUSERINFO_METHOD)\n .appendQueryParameter(\"api_key \", API_KEY)\n .appendQueryParameter(\"user_id\", userId);\n return uriBuilder.build().toString();\n }", "private GenericUrl generateFitbitVitalConnectUrl(Vital vitalToSync, OAuth oAuth) {\n final String user_id = oAuth.getUser_id();\n String additionalPart = vitalToSync.getType().getFitbitURL();\n return new GenericUrl(fitBitBaseURL + \"/\" + user_id + additionalPart);\n }", "Observable<Session> initSession(RelyingParty relyingParty, Map<String, Object> userInfo, Set<String> scopes, AcrValues acrValues, String redirectUrl);", "private String handleOAuthAuthorizationRequest(String clientId, HttpServletRequest req, SessionDataCacheEntry sessionDataCacheEntry)\r\n/* */ throws OAuthSystemException, OAuthProblemException\r\n/* */ {\r\n/* 410 */ OAuth2ClientValidationResponseDTO clientDTO = null;\r\n/* 411 */ String redirect_uri = EndpointUtil.getSafeText(req.getParameter(\"redirect_uri\"));\r\n/* 412 */ if ((clientId == null) || (clientId.equals(\"\"))) {\r\n/* 413 */ String msg = \"Client Id is not present in the authorization request\";\r\n/* 414 */ log.debug(msg);\r\n/* 415 */ return EndpointUtil.getErrorPageURL(\"invalid_request\", msg, null, null); }\r\n/* 416 */ if ((redirect_uri == null) || (redirect_uri.equals(\"\"))) {\r\n/* 417 */ String msg = \"Redirect URI is not present in the authorization request\";\r\n/* 418 */ log.debug(msg);\r\n/* 419 */ return EndpointUtil.getErrorPageURL(\"invalid_request\", msg, null, null);\r\n/* */ }\r\n/* 421 */ clientDTO = validateClient(clientId, redirect_uri);\r\n/* */ \r\n/* */ \r\n/* 424 */ if (!clientDTO.isValidClient()) {\r\n/* 425 */ return EndpointUtil.getErrorPageURL(clientDTO.getErrorCode(), clientDTO.getErrorMsg(), null, null);\r\n/* */ }\r\n/* */ \r\n/* */ \r\n/* 429 */ OAuthAuthzRequest oauthRequest = new OAuthAuthzRequest(req);\r\n/* */ \r\n/* 431 */ OAuth2Parameters params = new OAuth2Parameters();\r\n/* 432 */ params.setClientId(clientId);\r\n/* 433 */ params.setRedirectURI(clientDTO.getCallbackURL());\r\n/* 434 */ params.setResponseType(oauthRequest.getResponseType());\r\n/* 435 */ params.setScopes(oauthRequest.getScopes());\r\n/* 436 */ if (params.getScopes() == null) {\r\n/* 437 */ Set<String> scopeSet = new HashSet();\r\n/* 438 */ scopeSet.add(\"\");\r\n/* 439 */ params.setScopes(scopeSet);\r\n/* */ }\r\n/* 441 */ params.setState(oauthRequest.getState());\r\n/* 442 */ params.setApplicationName(clientDTO.getApplicationName());\r\n/* */ \r\n/* */ \r\n/* 445 */ params.setNonce(oauthRequest.getParam(\"nonce\"));\r\n/* 446 */ params.setDisplay(oauthRequest.getParam(\"display\"));\r\n/* 447 */ params.setIDTokenHint(oauthRequest.getParam(\"id_token_hint\"));\r\n/* 448 */ params.setLoginHint(oauthRequest.getParam(\"login_hint\"));\r\n/* 449 */ if ((oauthRequest.getParam(\"acr_values\") != null) && (!oauthRequest.getParam(\"acr_values\").equals(\"null\")) && (!oauthRequest.getParam(\"acr_values\").equals(\"\")))\r\n/* */ {\r\n/* 451 */ String[] acrValues = oauthRequest.getParam(\"acr_values\").split(\" \");\r\n/* 452 */ LinkedHashSet list = new LinkedHashSet();\r\n/* 453 */ for (String acrValue : acrValues) {\r\n/* 454 */ list.add(acrValue);\r\n/* */ }\r\n/* 456 */ params.setACRValues(list);\r\n/* */ }\r\n/* 458 */ String prompt = oauthRequest.getParam(\"prompt\");\r\n/* 459 */ if (prompt == null) {\r\n/* 460 */ prompt = \"consent\";\r\n/* */ }\r\n/* 462 */ params.setPrompt(prompt);\r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* 494 */ boolean forceAuthenticate = false;\r\n/* 495 */ boolean checkAuthentication = false;\r\n/* */ \r\n/* 497 */ if (prompt != null)\r\n/* */ {\r\n/* 499 */ String[] prompts = prompt.trim().split(\"\\\\s\");\r\n/* 500 */ boolean contains_none = prompt.contains(\"none\");\r\n/* 501 */ if ((prompts.length > 1) && (contains_none)) {\r\n/* 502 */ String error = \"Invalid prompt variable combination. The value 'none' cannot be used with others prompts.\";\r\n/* 503 */ log.debug(error + \" \" + \"Prompt: \" + prompt);\r\n/* 504 */ return OAuthASResponse.errorResponse(302).setError(\"invalid_request\").setErrorDescription(error).location(params.getRedirectURI()).setState(params.getState()).buildQueryMessage().getLocationUri();\r\n/* */ }\r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ \r\n/* 510 */ if (prompt.contains(\"login\")) {\r\n/* 511 */ checkAuthentication = false;\r\n/* 512 */ forceAuthenticate = true;\r\n/* */ }\r\n/* 514 */ else if ((contains_none) || (prompt.contains(\"consent\"))) {\r\n/* 515 */ checkAuthentication = false;\r\n/* 516 */ forceAuthenticate = false;\r\n/* */ }\r\n/* */ }\r\n/* */ \r\n/* 520 */ String sessionDataKey = UUIDGenerator.generateUUID();\r\n/* 521 */ CacheKey cacheKey = new SessionDataCacheKey(sessionDataKey);\r\n/* 522 */ sessionDataCacheEntry = new SessionDataCacheEntry();\r\n/* 523 */ sessionDataCacheEntry.setoAuth2Parameters(params);\r\n/* 524 */ sessionDataCacheEntry.setQueryString(req.getQueryString());\r\n/* */ \r\n/* 526 */ if (req.getParameterMap() != null) {\r\n/* 527 */ sessionDataCacheEntry.setParamMap(new ConcurrentHashMap(req.getParameterMap()));\r\n/* */ }\r\n/* 529 */ SessionDataCache.getInstance().addToCache(cacheKey, sessionDataCacheEntry);\r\n/* */ try\r\n/* */ {\r\n/* 532 */ return EndpointUtil.getLoginPageURL(clientId, sessionDataKey, forceAuthenticate, checkAuthentication, oauthRequest.getScopes(), req.getParameterMap());\r\n/* */ }\r\n/* */ catch (UnsupportedEncodingException e) {\r\n/* 535 */ log.debug(e.getMessage(), e);\r\n/* 536 */ throw new OAuthSystemException(\"Error when encoding login page URL\");\r\n/* */ }\r\n/* */ }", "private GenericUrl generateAPIURL(Vital vitalToSync, OAuth oAuth) {\n GenericUrl url = null;\n switch (vitalToSync.getWearableType()) {\n case FITBIT:\n url = generateFitbitVitalConnectUrl(vitalToSync, oAuth);\n break;\n case WITHINGS:\n //TODO: Create withings URL\n url = new GenericUrl(withingsBaseURL);\n logger.warn(\"WITHINGS CONNECTION NOT IMPLEMENTED\");\n break;\n }\n return url;\n }", "private static URL buildURL(List<String> args) throws MalformedURLException {\n\n\t\tfinal String IDList = args.stream().map(id -> id.toString() + \",\").reduce(\"\", String::concat);\n\n\t\treturn new URL(String.format(BASE_URL, IDList));\n\t}", "public String getAuthorizationUrl(final TrueNTHOAuthConfig config, final int numberEncodings, final ParameterList callbackParameters,\n\t final ParameterList parameters) {\n\n\tString baseURL = config.getBaseAuthorizationURL();\n\n\tString callback = config.getCallback();\n\n\tif (callbackParameters != null) {\n\t callback = callbackParameters.appendTo(callback);\n\t}\n\n\tfor (int i = 0; i < numberEncodings; i++) {\n\t callback = OAuthEncoder.encode(callback);\n\t}\n\n\tif (config.hasScope()) {\n\t baseURL += String.format(SCOPED_AUTHORIZE_URL, config.getApiKey(), callback, OAuthEncoder.encode(config.getScope()));\n\t} else {\n\t baseURL += String.format(AUTHORIZE_URL, config.getApiKey(), callback);\n\t}\n\n\treturn (parameters == null) ? baseURL : parameters.appendTo(baseURL);\n }", "private static String getQuery() {\n String scope = \"\";\n generateState();\n\n for (String s : SCOPES) {\n scope += \"+\" + s;\n }\n\n return \"?response_type=code&redirect_uri=\" + REDIRECT_URL +\n \"&client_id=\" + CLIENT_KEY +\n \"&scope=\" + scope +\n \"&STATE=\" + STATE;\n }", "public static String getAuthenticationURL() {\n\n\t\treturn baseURL + \"/authentication-point/authenticate\";\n\t}", "Observable<Session> createSession(RelyingParty relyingParty, Map<String, Object> userInfo, Set<String> scopes, AcrValues acrValues, String redirectUrl);", "@RequestMapping(value = \"/oauth/authorize\", method = RequestMethod.GET)\n public String authorize(Model model) {\n UriComponentsBuilder urlBuilder = UriComponentsBuilder.fromHttpUrl(this.urlAuthorize)\n .queryParam(\"response_type\", \"code\")\n .queryParam(\"state\")\n .queryParam(\"client_id\", this.clientId)\n .queryParam(\"scope\");\n model.addAttribute(\"urlAuthorize\", urlBuilder.toUriString());\n return \"authorize\";\n }", "private String getOriginUrl() {\n Uri.Builder builder = url.buildUpon();\n for (Param p : queryParams) {\n builder.appendQueryParameter(p.key, p.value);\n }\n return builder.build().toString();\n }", "private String buildUriFromId(String baseUri, String id){\n\t\treturn baseUri + \"/\" + id;\n\t}", "@GET\n Call<String> getLogin(@Url String URL);", "String getServerBaseURL();", "private String composeUri(String mode, String botName, String kind,\n String fileName) throws URISyntaxException {\n String uri = \"https://\" + host;\n uri += sep(mode);\n uri += sep(appId);\n uri += sep(botName);\n uri += sep(kind);\n uri += sep(fileName);\n return uri;\n }", "@Override\n public void resolveUrls(KeycloakUriBuilder authUrlBuilder) {\n }", "private String initUrlParameter() {\n StringBuffer url = new StringBuffer();\n url.append(URL).append(initPathParameter());\n return url.toString();\n }", "String getJoinUrl();", "public static String getAccessTokenURL(String authCode) {\n\t\treturn FB.oauthURL + \"client_id=\" + FB.client_id + \"&redirect_uri=\"\n\t\t\t\t+ FB.redirect_uri + \"&client_secret=\" + FB.secret + \"&code=\"\n\t\t\t\t+ authCode;\n\t}", "public String getLogonURL()\n {\n return getUnsecuredRootLocation() + configfile.logon_url;\n }", "private String genFeedURL(String startDate, String endDate) {\n\t\treturn String.format(\"%sfeed?start_date=%s&end_date=%s&detailed=false&api_key=%s\", \n\t\t\t\tconfig.getApiBaseURL(), startDate, endDate, config.getAPIKey());\n\t}", "private static String getBaseUrl() {\n StringBuilder url = new StringBuilder();\n url.append(getProtocol());\n url.append(getHost());\n url.append(getPort());\n url.append(getVersion());\n url.append(getService());\n Log.d(TAG, \"url_base: \" + url.toString());\n return url.toString();\n }", "private String makeServerUrl(){\n\t\tURL url = null;\n\t\t\n\t\t//Make sure we have a valid url\n\t\tString complete = this.preferences.getString(\"server\", \"\");\n\t\ttry {\n\t\t\turl = new URL( complete );\n\t\t} catch( Exception e ) {\n\t\t\tonCreateDialog(DIALOG_INVALID_URL).show();\n\t\t\treturn null;\n\t\t}\n\t\treturn url.toExternalForm();\n\t}", "public void doLoginWithFacebook() {\n System.out.println(\"Fetching the Authorization URL...\");\n String authorizationUrl = service.getAuthorizationUrl(EMPTY_TOKEN);\n System.out.println(\"Got the Authorization URL!\");\n System.out.println(\"Now go and authorize Scribe here:\");\n this.authorizationUrl = authorizationUrl;\n }", "public void setURL() {\n\t\tURL = Constant.HOST_KALTURA+\"/api_v3/?service=\"+Constant.SERVICE_KALTURA_LOGIN+\"&action=\"\n\t\t\t\t\t\t+Constant.ACTION_KALTURA_LOGIN+\"&loginId=\"+Constant.USER_KALTURA+\"&password=\"+Constant.PASSWORD_KALTURA+\"&format=\"+Constant.FORMAT_KALTURA;\n\t}", "@Override\n\tpublic void setup(Context context) {\n\t\tlog.debug(\"XXX: try callback to enable authentication\");\n\n final URI uri = context.getPropertyAsURI(\"loginURL\");\n if (uri == null) {\n\t\t\tthrow new IllegalArgumentException(\"loginURL property not defined\");\n }\n\n String loginEmail = context.getString(\"loginEmail\");\n String loginPassword = context.getString(\"loginPassword\");\n if (StringUtils.isBlank(loginEmail) || StringUtils.isBlank(loginPassword)) {\n\t\t\tthrow new IllegalArgumentException(\"loginEmail and loginPassword properties are empty or missing\");\n }\n\n\t\tlog.debug(\"POST auth URL: {}\", uri);\n\t\tHttpPost httppost = new HttpPost(uri);\n\t\thttppost.setHeader(\"Cache-Control\", \"no-cache\");\n\t\tList<NameValuePair> formParams = new ArrayList<NameValuePair>(2);\n\t\tformParams.add(new BasicNameValuePair(\"email\", loginEmail));\n\t\tformParams.add(new BasicNameValuePair(\"id\", loginPassword));\n\t\tfinal HttpResponse response;\n\t\tHttpClient client = null;\n\t\tHttpContext httpContext = localContext;\n\t\ttry {\n\t\t\thttppost.setEntity(new UrlEncodedFormEntity(formParams));\n\t\t\tclient = context.getHttpClient();\n\t\t\tif (httpContext == null) {\n\t\t\t\t// Create a local instance of cookie store\n\t\t\t\tCookieStore cookieStore = new BasicCookieStore();\n\t\t\t\t// Create local HTTP context\n\t\t\t\thttpContext = new BasicHttpContext();\n\t\t\t\t// Bind custom cookie store to the local context\n\t\t\t\thttpContext.setAttribute(ClientContext.COOKIE_STORE, cookieStore);\n\t\t\t}\n\t\t\tresponse = client.execute(httppost, httpContext);\n\t\t\t/*\n\t\t\t <form method='post' action='/auth/developer/callback' noValidate='noValidate'>\n\t\t\t <label for='name'>Name:</label>\n\t\t\t <input type='text' id='name' name='name'/>\n\t\t\t <label for='email'>Email:</label>\n\t\t\t <input type='text' id='email' name='email'/>\n\t\t\t <button type='submit'>Sign In</button> </form>\n\t\t\t */\n\t\t\tif (log.isDebugEnabled() || !checkAuth(response)) {\n ClientHelper.dumpResponse(httppost, response, true);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tlog.error(\"\", e);\n\t\t\treturn;\n\t\t} finally {\n\t\t\tif (client != null)\n\t\t\t\tclient.getConnectionManager().shutdown();\n\t\t}\n\n\t\tfinal StatusLine statusLine = response.getStatusLine();\n\t\tif (statusLine != null && statusLine.getStatusCode() == 302) {\n\t\t\t// HTTP/1.1 302 Moved Temporarily\n\t\t\tHeader cookie = response.getFirstHeader(\"Set-Cookie\");\n\t\t\tif (cookie != null) {\n\t\t\t\tlog.debug(\"XXX: set local context\");\n\t\t\t\tthis.localContext = httpContext;\n\t\t\t}\n\t\t\telse log.error(\"Expected Set-Cookie header in response\");\n\t\t\tif (log.isDebugEnabled()) {\n\t\t\t\tHeader location = response.getFirstHeader(\"Location\");\n\t\t\t\tif (location != null) {\n\t\t\t\t\tcheckAuthentication(context, location.getValue());\n\t\t\t\t\t//log.debug(\"XXX: set local context\");\n\t\t\t\t\t//this.localContext = httpContext;\n\t\t\t\t}\n\t\t\t\telse log.error(\"Expected Location header in response\");\n\t\t\t}\n\t\t} else {\n\t\t\tlog.error(\"Expected 302 status code in response\");\n\t\t}\n\t}", "public Saml2AuthHelper(String baseOAuthUrl)\n {\n if (baseOAuthUrl != null && !baseOAuthUrl.isEmpty())\n {\n this.baseUrl = Uri.parse(baseOAuthUrl);\n }\n }", "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 }", "public String getAccessTokenEndpoint(final TrueNTHOAuthConfig config) {\n\n\treturn config.getAccessTokenEndpoint();\n }", "@RequestMapping(value = \"/openId\", method = RequestMethod.GET)\n public @ResponseBody void openId( HttpServletRequest request, HttpServletResponse response) {\n try {\n String code = request.getParameter(\"code\");\n String state = request.getParameter(\"state\");\n\n log.info(\"code: \" + code + \" state = \" + state);\n\n // verify input parameters\n if (state != null && code != null) {\n\n // verify incoming call\n String stateSession = request.getSession().getAttribute(\"state\").toString();\n if (stateSession == null || stateSession.equals(state) == false) {\n throw new Exception(\"Invalid state found.\");\n }\n\n // Send request to Google oauth to verify login\n CloseableHttpClient client = HttpClientBuilder.create().build();\n HttpPost post = new HttpPost(GOOGLE_OAUTH);\n post.setHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n List<NameValuePair> urlParameters = new ArrayList<>();\n urlParameters.add(new BasicNameValuePair(\"code\", code));\n urlParameters.add(new BasicNameValuePair(\"client_id\", \"105248247635-270o2p37be66bbmhd7dt7nhshqu6ug2l.apps.googleusercontent.com\"));\n urlParameters.add(new BasicNameValuePair(\"client_secret\", \"FmYfHYybJ7YP6fQLNny6XKjp\"));\n urlParameters.add(new BasicNameValuePair(\"grant_type\", \"authorization_code\"));\n urlParameters.add(new BasicNameValuePair(\"redirect_uri\", \"https://openid-testgoogleopenid.wedeploy.io/openId\"));\n post.setEntity(new UrlEncodedFormEntity(urlParameters));\n CloseableHttpResponse res = client.execute(post);\n log.info(\"Response Code from Google oauth: \" + res.getStatusLine());\n HttpEntity entity = res.getEntity();\n String responseString = EntityUtils.toString(entity);\n log.info(\"Response body from Google oauth: \" + responseString);\n\n // read user email address in the response\n JSONObject json = new JSONObject(responseString);\n String idToken = json.getString(\"id_token\");\n log.info(\"id_token: \" + idToken);\n DecodedJWT jwt = JWT.decode(idToken);\n String email = jwt.getClaim(\"email\").asString();\n response.getWriter().println(\"Logged!!! your email address is: \" + email);\n request.getSession().setAttribute(\"email\", email);\n }\n } catch (Exception x) {\n log.log(Level.SEVERE, \"Error: \", x);\n }\n }", "public GoogleAuthHelper() {\n\t\t\n\t\tLoadType<ClientCredentials> credentials = ofy().load().type(ClientCredentials.class);\n\t\t\n\t\tfor(ClientCredentials credential : credentials) {\n\t\t\t// static ClientCredentials credentials = new ClientCredentials();\n\t\t\tCALLBACK_URI = credential.getCallBackUri();\n\t\t\tCLIENT_ID = credential.getclientId();\n\t\t\tCLIENT_SECRET = credential.getClientSecret();\n\t\t}\n\t\t\n\t\tflow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT,\n\t\t\t\tJSON_FACTORY, CLIENT_ID, CLIENT_SECRET, SCOPE).setAccessType(\n\t\t\t\t\"offline\").build();\n\t\tgenerateStateToken();\n\t}", "private static String buildUrlString(String base, Map<String, String> params) {\n if (params == null || params.isEmpty()) return API_URL + base;\n //construct get parameters list\n StringBuilder get = new StringBuilder();\n boolean first = true;\n for (String param : params.keySet()) {\n if (!first) get.append('&'); else first = false;\n //add the parameter\n get.append(param);\n String value = params.get(param);\n if (value != null) {\n get.append('=');\n get.append(value);\n }\n }\n //return the full string\n if (get.length() == 0) return API_URL + base;\n return API_URL + base + \"?\" + get.toString();\n }", "public String getContextUrl() {\n String currentURL = driver.getCurrentUrl();\n return currentURL.substring(0, currentURL.lastIndexOf(\"/login\"));\n }", "public static String buildUsernameForgotURL() {\n return NISUtils.getURL() + \"/nis/nwapi/v2/customer/username/forgot\";\n\t}", "private String getTokenizedUrl() {\n SharedPreferences sharedPreferences = getSharedPreferences();\n String tokenKey = MainActivity.sharedPrefKeys.TOKENIZED_URL.toString();\n\n if (sharedPreferences.contains(tokenKey)) {\n return sharedPreferences.getString(tokenKey, \"\");\n }\n return \"\";\n }", "java.lang.String getProfileURL();", "public static String buildCreateCustomerURL() {\n return NISUtils.getURL() + \"/nis/nwapi/v2/customer\";\n\t}", "@Override\n String getOAuthUrl() {\n return null;\n }", "@Override\n public String createEndpointUri() {\n \n Properties scProps = utils.obtainServerConfig();\n String baseUri = scProps.getProperty(TARGET_SERVER_PROPERTY_NAME);\n String accessToken = scProps.getProperty(AUTH_TOKEN_PROPERTY_NAME);\n String sourceName = scProps.getProperty(SOURCES_PROPERTY_NAME);\n String sendPings = scProps.getProperty(SEND_PING_PROPERTY_NAME);\n if (StringUtils.isEmpty(baseUri) || StringUtils.isEmpty(accessToken)) {\n throw new IllegalArgumentException(\"source.config file is missing or does not contain sufficient \" +\n \"information from which to construct an endpoint URI.\");\n }\n if (StringUtils.isEmpty(sourceName) || sourceName.contains(\",\")) {\n throw new IllegalArgumentException(\"Default vantiq: endpoints require a source.config file with a single\" +\n \" source name. Found: '\" + sourceName + \"'.\");\n }\n \n try {\n URI vantiqURI = new URI(baseUri);\n this.setEndpointUri(baseUri);\n String origScheme = vantiqURI.getScheme();\n \n StringBuilder epString = new StringBuilder(vantiqURI.toString());\n epString.append(\"?sourceName=\").append(sourceName);\n this.sourceName = sourceName;\n epString.append(\"&accessToken=\").append(accessToken);\n this.accessToken = accessToken;\n if (sendPings != null) {\n epString.append(\"&sendPings=\").append(sendPings);\n this.sendPings = Boolean.parseBoolean(sendPings);\n }\n if (origScheme.equals(\"http\") || origScheme.equals(\"ws\")) {\n epString.append(\"&noSsl=\").append(\"true\");\n noSsl = true;\n }\n epString.replace(0, origScheme.length(), \"vantiq\");\n URI endpointUri = URI.create(String.valueOf(epString));\n return endpointUri.toString();\n } catch (URISyntaxException mue) {\n throw new IllegalArgumentException(TARGET_SERVER_PROPERTY_NAME + \" from server config file is invalid\",\n mue);\n }\n }", "@Override\n public void onClick(View v) {\n String scopeParams=\"rw_nus+r_basicprofile\";\n oAuthService = LinkedInOAuthServiceFactory.getInstance()\n .createLinkedInOAuthService(Constants.CONSUMER_KEY,\n Constants.CONSUMER_SECRET);\n\n\n Log.e(\"oAuthService : \", \"*\" + oAuthService);\n\n factory = LinkedInApiClientFactory.newInstance(\n Constants.CONSUMER_KEY, Constants.CONSUMER_SECRET);\n\n liToken = oAuthService\n .getOAuthRequestToken(Constants.OAUTH_CALLBACK_URL);\n Log.e(\"liToken : \", \"*\" + liToken.getAuthorizationUrl());\n Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(liToken\n .getAuthorizationUrl()));\n startActivity(i);\n\n }", "String getServerUrl();", "public interface AppConstant {\n\n String BASE_URL = \"https://www.wanandroid.com\";\n\n\n String WEB_SITE_LOGIN = \"user/login\";\n String WEB_SITE_REGISTER = \"user/register\";\n String WEB_SITE_COLLECTIONS = \"lg/collect\";\n String WEB_SITE_UNCOLLECTIONS = \"lg/uncollect\";\n String WEB_SITE_ARTICLE = \"article\";\n\n\n public interface LoginParamsKey {\n String SET_COOKIE_KEY = \"set-cookie\";\n String SET_COOKIE_NAME = \"Cookie\";\n String USER_NAME = \"username\";\n String PASSWORD = \"password\";\n String REPASSWORD = \"repassword\";\n }\n}", "void createExposedOAuthCredential(IntegrationClientCredentialsDetailsModel integrationCCD);", "private String getURL() {\n String url = profileLocation.getText().toString();\n if (url == null || url.length() == 0) {\n return url;\n }\n // if it's not the last (which should be \"Raw\") choice, we'll use the prefix\n if (!url.contains(\"://\")) { // if there is no (http|jr):// prefix, we'll assume it's a http://bit.ly/ URL\n url = \"http://bit.ly/\" + url;\n }\n return url;\n }", "protected static URI getAuthServiceUri() {\n if (authServiceUrl == null || authServiceUrl.toString().isEmpty() || authServiceUrl.toString()\n .equals(\"?\")) {\n Console console = System.console();\n if (console != null) {\n try {\n authServiceUrl = new URI(console.readLine(\"Anaplan Auth-Service URL:\"));\n } catch (URISyntaxException e) {\n throw new AnaplanAPIException(\"Unable to parse Auth-Service URI: \", e);\n }\n } else {\n throw new UnsupportedOperationException(\"Auth-Service URL must be specified!\");\n }\n }\n return authServiceUrl;\n }", "String getToken(String username, String password, String grant_type) throws IllegalAccessException{\n\n String URI = serviceUrl + \"/oauth/token\" + \"?\" +\n String.format(\"%s=%s&%s=%s&%s=%s\", \"grant_type\", grant_type, \"username\", username, \"password\", password);\n// String CONTENT_TYPE = \"application/x-www-form-urlencoded\";\n // TODO clientId and clientSecret !!!\n String ENCODING = \"Basic \" +\n Base64.getEncoder().encodeToString(String.format(\"%s:%s\", \"clientId\", \"clientSecret\").getBytes());\n\n// AtomicReference<String> token = null;\n// authorization.subscribe(map -> {\n// token.set((String) map.get(ACCESS_TOKEN));\n// });\n\n String token = null;\n try {\n token = (String)WebClient.create().post()\n .uri(URI)\n .accept(MediaType.APPLICATION_FORM_URLENCODED)\n .contentType(MediaType.APPLICATION_FORM_URLENCODED)\n .header(\"Authorization\", ENCODING)\n .retrieve()\n .bodyToMono(Map.class)\n .block().get(ACCESS_TOKEN);\n } catch (Exception e){\n throw new IllegalAccessException(\"Can't reach access token\");\n }\n\n return token;\n }", "public Authenticator(String authUrl, String clientId, String clientSecret)\r\n { \r\n RestTemplate rt = new RestTemplate();\r\n \r\n Map<String, String> vars = new HashMap<String, String>();\r\n\r\n vars.put(\"username\", clientId);\r\n vars.put(\"password\", clientSecret);\r\n this.user = rt.postForObject(authUrl, vars, UserInfo.class);\r\n \r\n }", "public UrlBuilder compileBaseUrl(HttpServletRequest request, String repositoryId) {\n String baseUrl = (String) request.getAttribute(Dispatcher.BASE_URL_ATTRIBUTE);\n if (baseUrl != null) {\n int repIdPos = baseUrl.indexOf(REPOSITORY_PLACEHOLDER);\n if (repIdPos < 0) {\n return new UrlBuilder(baseUrl);\n } else {\n return new UrlBuilder(baseUrl.substring(0, repIdPos) + repositoryId\n + baseUrl.substring(repIdPos + REPOSITORY_PLACEHOLDER.length()));\n }\n }\n\n UrlBuilder url = new UrlBuilder(request.getScheme(), request.getServerName(), request.getServerPort(), null);\n\n url.addPath(request.getContextPath());\n url.addPath(request.getServletPath());\n\n if (repositoryId != null) {\n url.addPathSegment(repositoryId);\n }\n\n return url;\n }", "@RequestMapping(value = \"login\", method = RequestMethod.GET)\r\n public void requestAccessCode(HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n try {\r\n response.sendRedirect(DIALOG_OAUTH + \"?client_id=\" + CLIENT_ID\r\n + \"&redirect_uri=\" + REDIRECT_URI + \"&scope=\" + SCOPE);\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "private void doNormalAuthzProcess(String requestUri, String redirectUrl, String clientId, String clientSecret) {\n oauth.redirectUri(null);\n oauth.scope(null);\n oauth.responseType(null);\n oauth.requestUri(requestUri);\n String state = oauth.stateParamRandom().getState();\n oauth.stateParamHardcoded(state);\n OAuthClient.AuthorizationEndpointResponse loginResponse = oauth.doLogin(TEST_USER_NAME, TEST_USER_PASSWORD);\n assertEquals(state, loginResponse.getState());\n String code = loginResponse.getCode();\n String sessionId =loginResponse.getSessionState();\n\n // Token Request\n oauth.redirectUri(redirectUrl); // get tokens, it needed. https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.3\n OAuthClient.AccessTokenResponse res = oauth.doAccessTokenRequest(code, clientSecret);\n assertEquals(200, res.getStatusCode());\n\n AccessToken token = oauth.verifyToken(res.getAccessToken());\n String userId = findUserByUsername(adminClient.realm(REALM_NAME), TEST_USER_NAME).getId();\n assertEquals(userId, token.getSubject());\n assertEquals(sessionId, token.getSessionState());\n // The following check is not valid anymore since file store does have the same ID, and is redundant due to the previous line\n // Assert.assertNotEquals(TEST_USER_NAME, token.getSubject());\n assertEquals(clientId, token.getIssuedFor());\n\n // Token Refresh\n String refreshTokenString = res.getRefreshToken();\n RefreshToken refreshToken = oauth.parseRefreshToken(refreshTokenString);\n assertEquals(sessionId, refreshToken.getSessionState());\n assertEquals(clientId, refreshToken.getIssuedFor());\n\n OAuthClient.AccessTokenResponse refreshResponse = oauth.doRefreshTokenRequest(refreshTokenString, clientSecret);\n assertEquals(200, refreshResponse.getStatusCode());\n\n AccessToken refreshedToken = oauth.verifyToken(refreshResponse.getAccessToken());\n RefreshToken refreshedRefreshToken = oauth.parseRefreshToken(refreshResponse.getRefreshToken());\n assertEquals(sessionId, refreshedToken.getSessionState());\n assertEquals(sessionId, refreshedRefreshToken.getSessionState());\n assertEquals(findUserByUsername(adminClient.realm(REALM_NAME), TEST_USER_NAME).getId(), refreshedToken.getSubject());\n\n // Logout\n oauth.doLogout(refreshResponse.getRefreshToken(), clientSecret);\n refreshResponse = oauth.doRefreshTokenRequest(refreshResponse.getRefreshToken(), clientSecret);\n assertEquals(400, refreshResponse.getStatusCode());\n }", "public static String encodeUrl(String base, String parentCode, String code, String targetCode, String token) {\n\t\t/**\n\t\t * A Function for Base64 encoding urls\n\t\t **/\n\n\t\t// Encode Parent and Code\n\t\tString encodedParentCode = new String(Base64.getEncoder().encode(parentCode.getBytes()));\n\t\tString encodedCode = new String(Base64.getEncoder().encode(code.getBytes()));\n\t\tString url = base + \"/\" + encodedParentCode + \"/\" + encodedCode;\n\n\t\t// Add encoded targetCode if not null\n\t\tif (targetCode != null) {\n\t\t\tString encodedTargetCode = new String(Base64.getEncoder().encode(targetCode.getBytes()));\n\t\t\turl = url + \"/\" + encodedTargetCode;\n\t\t}\n\n\t\t// Add access token if not null\n\t\tif (token != null) {\n\t\t\turl = url +\"?token=\" + token;\n\t\t}\n\t\treturn url;\n\t}", "@FormUrlEncoded\n @POST(\"oauth/request_token\")\n Flowable<ResponseBody> requestToken(@Field(\"oauth_callback\") String oauthCallback);", "public URL makeBase(URL startingURL);", "private static Credential authorize(List<String> scopes) throws Exception {\r\n\r\n\t // Load client secrets.\r\n\t GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(\r\n\t JSON_FACTORY, UploadVideo.class.getResourceAsStream(\"/client_secrets.json\"));\r\n\r\n\t // Checks that the defaults have been replaced (Default = \"Enter X here\").\r\n\t if (clientSecrets.getDetails().getClientId().startsWith(\"Enter\")\r\n\t || clientSecrets.getDetails().getClientSecret().startsWith(\"Enter \")) {\r\n\t System.out.println(\r\n\t \"Enter Client ID and Secret from https://code.google.com/apis/console/?api=youtube\"\r\n\t + \"into youtube-cmdline-uploadvideo-sample/src/main/resources/client_secrets.json\");\r\n\t System.exit(1);\r\n\t }\r\n\r\n\t // Set up file credential store.\r\n\t FileCredentialStore credentialStore = new FileCredentialStore(\r\n\t new File(System.getProperty(\"user.home\"), \".credentials/youtube-api-uploadvideo.json\"),\r\n\t JSON_FACTORY);\r\n\r\n\t // Set up authorization code flow.\r\n\t GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\r\n\t HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, scopes).setCredentialStore(credentialStore)\r\n\t .build();\r\n\r\n\t // Build the local server and bind it to port 9000\r\n\t LocalServerReceiver localReceiver = new LocalServerReceiver.Builder().setPort(8080).build();\r\n\r\n\t // Authorize.\r\n\t return new AuthorizationCodeInstalledApp(flow, localReceiver).authorize(\"user\");\r\n\t }", "public static URL getUrlForDemoMode()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/connected_account_services/demo\";\r\n return str2url( strUrl );\r\n }", "private String buildResponseString(String code) {\r\n StringBuilder responseString = new StringBuilder();\r\n\r\n responseString.append(ACCESS_TOKEN);\r\n responseString.append(\"?client_id=\" + CLIENT_ID);\r\n responseString.append(\"&redirect_uri=\" + REDIRECT_URI);\r\n responseString.append(\"&code=\" + code);\r\n responseString.append(\"&client_secret=\" + APP_SECRET);\r\n return responseString.toString();\r\n }", "private String buildRedirectionDetailsBaseUrl( )\n {\n UrlItem urlRedirectionDetails = new UrlItem( MultiviewFormResponseDetailsJspBean.getMultiviewRecordDetailsBaseUrl( ) );\n\n if ( !CollectionUtils.isEmpty( _listFormFilterDisplay ) )\n {\n for ( IFormFilterDisplay formFilterDisplay : _listFormFilterDisplay )\n {\n // Add all the filters values\n String strFilterValue = formFilterDisplay.getValue( );\n if ( !StringUtils.isEmpty( strFilterValue ) )\n {\n String strFilterFullName = FormsConstants.PARAMETER_URL_FILTER_PREFIX + formFilterDisplay.getParameterName( );\n urlRedirectionDetails.addParameter( strFilterFullName, strFilterValue );\n }\n }\n }\n\n // Add the selected panel technical code\n urlRedirectionDetails.addParameter( FormsConstants.PARAMETER_SELECTED_PANEL, _strSelectedPanelTechnicalCode );\n\n // Add sort filter data to the url\n addFilterSortConfigToUrl( urlRedirectionDetails );\n\n return urlRedirectionDetails.getUrl( );\n }", "public static String getBaseURL()\r\n {\r\n String savedUrl = P.getChoreoServicesUrl();\r\n return savedUrl.length() > 0 ? savedUrl : Config.DEFAULT_SERVER_URL;\r\n }", "@ZAttr(id=506)\n public String getWebClientLoginURL() {\n return getAttr(Provisioning.A_zimbraWebClientLoginURL, null);\n }", "public static URL buildUrl() {\n Uri builtUri = Uri.parse(CONTENT_JSON_URL).buildUpon()\n .build();\n\n URL url = null;\n try {\n url = new URL(builtUri.toString());\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n return url;\n }", "@Override\n\tpublic String buildRequest(String timestamp) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\");\n\t\tsParaTemp.put(\"ptime\",timestamp);\n\t\tsParaTemp.put(\"isadult\",isAdult+\"\");\n\t\tString prestr = MapToParam.createRequestParams(sParaTemp,\"&\"+KEY);\n\t\treturn LOGIN_PATH+\"&\"+prestr;\n\t}", "public String getTypeUri() {\n\t\treturn OPENID_NS_OAUTH;\n\t}", "FullUriTemplateString baseUri();", "public String getServerUri(String namespace);", "public static void saveClientUrl(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.KEY_CLIENT_API_URL, type);\n editor.apply();\n }", "private String buildSearchURL(String companyTicker) {\n Uri.Builder builder = new Uri.Builder();\n builder.scheme(\"https\")\n .authority(\"finance.google.com\")\n .appendPath(\"finance\")\n .appendPath(\"info\")\n .appendQueryParameter(\"client\", \"iq\")\n .appendQueryParameter(\"q\", companyTicker);\n String myUrl = builder.build().toString();\n return myUrl; // return a url\n }", "String constructUrl() {\n StringBuilder builder = new StringBuilder(256);\n builder.append(parts[DB_PREFIX]);\n \n if(notEmpty(parts[DB_ALT_DBNAME])) {\n builder.append(parts[DB_ALT_DBNAME]);\n builder.append('@');\n } else if(\"jdbc:oracle:thin:\".equals(parts[DB_PREFIX])) {\n builder.append('@');\n } else {\n // most formats\n builder.append(\"//\"); // NOI18N\n }\n \n builder.append(parts[DB_HOST]);\n\n if(notEmpty(parts[DB_INSTANCE_NAME])) {\n builder.append('\\\\');\n builder.append(parts[DB_INSTANCE_NAME]);\n }\n \n if(notEmpty(parts[DB_PORT])) {\n builder.append(':'); // NOI18N\n builder.append(parts[DB_PORT]);\n }\n\n if(notEmpty(parts[DB_PRIMARY_DBNAME])) {\n if(\"jdbc:oracle:thin:\".equals(parts[DB_PREFIX])) {\n builder.append(':'); // NOI18N\n } else {\n builder.append('/'); // NOI18N\n }\n builder.append(parts[DB_PRIMARY_DBNAME]);\n }\n\n char propertyInitialSeparator = ';';\n char propertySeparator = ';';\n if(\"jdbc:mysql:\".equals(parts[DB_PREFIX])) {\n propertyInitialSeparator = '?';\n propertySeparator = '&';\n } else if(\"jdbc:informix-sqli:\".equals(parts[DB_PREFIX])) {\n propertyInitialSeparator = ':';\n }\n \n Set<Map.Entry<String, String>> entries = props.entrySet();\n Iterator<Map.Entry<String, String>> entryIterator = entries.iterator();\n if(entryIterator.hasNext()) {\n builder.append(propertyInitialSeparator);\n Map.Entry<String, String> entry = entryIterator.next();\n builder.append(entry.getKey());\n String value = entry.getValue();\n if(notEmpty(value)) {\n builder.append('=');\n builder.append(value);\n }\n }\n \n while(entryIterator.hasNext()) {\n builder.append(propertySeparator);\n Map.Entry<String, String> entry = entryIterator.next();\n builder.append(entry.getKey());\n String value = entry.getValue();\n if(notEmpty(value)) {\n builder.append('=');\n builder.append(value);\n }\n }\n \n return builder.toString();\n }", "public void setOAuthAccessCode(String code, String clientId, String clientSecret, String redirectURI) throws OnshapeException {\n WebTarget target = client.target(\"https://oauth.onshape.com/oauth/token\");\n MultivaluedMap<String, String> formData = new MultivaluedHashMap<>();\n formData.add(\"grant_type\", \"authorization_code\");\n formData.add(\"code\", code);\n formData.add(\"client_id\", clientId);\n formData.add(\"client_secret\", clientSecret);\n formData.add(\"redirect_uri\", redirectURI);\n Response response = target.request().post(Entity.form(formData));\n switch (response.getStatusInfo().getFamily()) {\n case SUCCESSFUL:\n setOAuthTokenResponse(response.readEntity(OAuthTokenResponse.class), new Date(), clientId, clientSecret);\n return;\n default:\n throw new OnshapeException(response.getStatusInfo().getReasonPhrase());\n }\n\n }", "@RequestMapping(value = \"/login\")\n\tpublic String loginSckcloud(ModelMap model) throws Exception {\n\t\t\n\t\tString redirectUri = URLEncoder.encode(\"http://localhost:8081/login/callback\",\"UTF-8\");\n\t\t\n\t\t//String URI26 = \"https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=84b96132-780a-4948-b8fb-db6fb660dd87&response_type=code&redirect_uri=http://localhost:8081/login/sckcorp/callback&scope=https://api.partnercenter.microsoft.com/user_impersonation https://management.azure.com/user_impersonation\";\n\t\t\n\t\t//String URI1 = \"https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=65b68f11-2c9b-4ede-b2c6-baf367e51a3e&response_type=code&redirect_uri=http://localhost:8081/login/sckcloud/callback&scope=https://api.partnercenter.microsoft.com/user_impersonation https://management.azure.com/user_impersonation\";\n\t\t\n\t\t//sptek테스트\n\t\tString URI1 = \"https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=6741dc05-403f-4e86-a70e-abb7497c3ebc&response_type=code&redirect_uri=\"+redirectUri+\"&scope=https://api.partnercenter.microsoft.com/user_impersonation https://management.azure.com/user_impersonation\";\n\t\t\n\t\t//model.addAttribute(\"URI26\", URI26);\n\t\tmodel.addAttribute(\"URI1\", URI1);\n\t\t\n\n\t\treturn \"logintest\";\n\t}", "private String buildDn(final String login, final String companyDn) {\n\t\treturn \"uid=\" + login + \",\" + companyDn;\n\t}", "public void setLoginUrl(String loginUrl) {\n this.loginUrl = loginUrl;\n }", "public static Uri buildProfileUri(long id){\n return ContentUris.withAppendedId(CONTENT_URI, id);\n }", "public interface Constants {\n public static final String APP_KEY = \"2870170017\";\n public static final String APP_SECRET =\"a1ba9b85a74e3e15b2d6f80106ea42f1\";\n public static final String REDIRECT_URL = \"https://api.weibo.com/oauth2/default.html\";\n public static final String SCOPE =null;\n}", "public static URI toPublicURI(URI uri) {\r\n if (getPassword(uri) != null) {\r\n final String username = getUsername(uri);\r\n final String scheme = uri.getScheme();\r\n final String host = uri.getHost();\r\n final int port = uri.getPort();\r\n final String path = uri.getPath();\r\n final String query = uri.getQuery();\r\n final String fragment = uri.getFragment();\r\n final String userInfo = username == null ? null : username + \":***\";\r\n try {\r\n return new URI(scheme, userInfo, host, port, path, query, fragment);\r\n } catch (URISyntaxException e) {\r\n // Should never happen\r\n }\r\n }\r\n return uri;\r\n }", "public String makeURL(String destlat, String destlog) {\n return \"https://maps.googleapis.com/maps/api/directions/json\" + \"?origin=\" + String.valueOf(mLastLocation.getLatitude()) + \",\" + String.valueOf(mLastLocation.getLongitude()) + \"&destination=\" + destlat + \",\" + destlog + \"&sensor=false&mode=walking&alternatives=true&key=\" + getResources().getString(R.string.google_map_key_for_server);\n }", "@FormUrlEncoded\n @POST(\"/oauth/access_token\")\n Flowable<ResponseBody> getAccessToken(@Field(\"oauth_verifier\") String oauthVerifier);", "public static final String appendId(String url){\n\t\treturn url+\"&APPID=\"+appId;\n\t}", "private String getURL(int rad) {\n \t\tLocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n \n \t\t// Define a listener that responds to location updates\n \t\tLocationListener locationListener = new LocationListener() {\n \t\t\tpublic void onLocationChanged(Location location) {\n \t\t\t\t// Called when a new location is found by the network location provider.\n \t\t\t\tcurrentLocation = String.valueOf(location.getLatitude()) + \"+\" + String.valueOf(location.getLongitude());\n \t\t\t}\n \n \t\t\tpublic void onStatusChanged(String provider, int status, Bundle extras) {}\n \n \t\t\tpublic void onProviderEnabled(String provider) {}\n \n \t\t\tpublic void onProviderDisabled(String provider) {}\n \t\t};\n \n \t\t// Register the listener with the Location Manager to receive location updates\n \t\tlocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);\n \n \t\tfinal String android_id = Secure.getString(getBaseContext().getContentResolver(),\n \t\t\t\tSecure.ANDROID_ID);\n \t\t//final String user = \"aaa\"; //idk how to deal with making users unique right now\n \t\tString url = \"http://18.238.2.68/cuisinestream/phonedata.cgi?user=\"+android_id+\"&location=\"+currentLocation+\"&radius=\"+rad;\n \t\treturn url;\n \t}" ]
[ "0.6637256", "0.650449", "0.6226163", "0.598194", "0.5667437", "0.5660877", "0.55988574", "0.5559096", "0.5537384", "0.5537384", "0.55027544", "0.54257864", "0.5388501", "0.5376726", "0.5142448", "0.50304466", "0.5018782", "0.49709377", "0.49507383", "0.49370718", "0.49124357", "0.4889393", "0.48436582", "0.4810785", "0.48094916", "0.47771615", "0.47739074", "0.4771887", "0.4764901", "0.47517747", "0.4728376", "0.47069538", "0.47067866", "0.47017333", "0.4690928", "0.4686132", "0.46817395", "0.46701694", "0.46636134", "0.46619734", "0.46524057", "0.46416727", "0.46229884", "0.46002752", "0.45980555", "0.45901418", "0.45772308", "0.45741457", "0.45674872", "0.45599768", "0.45591307", "0.45534983", "0.4545453", "0.4534375", "0.45119673", "0.4500428", "0.44750524", "0.4465765", "0.44640976", "0.4458999", "0.44504985", "0.445032", "0.44489548", "0.4447161", "0.4412107", "0.43870828", "0.43869787", "0.43831915", "0.4379388", "0.43693128", "0.43532285", "0.43350384", "0.433301", "0.43252057", "0.43211728", "0.4320092", "0.43127906", "0.4306884", "0.4301439", "0.43005612", "0.43001682", "0.42996335", "0.4299541", "0.4298585", "0.4298215", "0.4291574", "0.42903545", "0.42881063", "0.42718723", "0.4267309", "0.42520645", "0.42510572", "0.4250263", "0.4241995", "0.42232573", "0.42127252", "0.42007577", "0.42000902", "0.41973102", "0.4187511" ]
0.7483766
0
Generates a secure state token
private void generateStateToken() { SecureRandom sr1 = new SecureRandom(); stateToken = "google;" + sr1.nextInt(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void generateStateToken() {\n\t\tSecureRandom sr1 = new SecureRandom();\n\n\t\tstateToken = \"google;\" + sr1.nextInt();\n\t}", "protected static String generateToken()\n\t{\n\t\treturn UUID.randomUUID().toString();\n\t}", "private String generateToken () {\n SecureRandom secureRandom = new SecureRandom();\n long longToken;\n String token = \"\";\n for ( int i = 0; i < 3; i++ ) {\n longToken = Math.abs( secureRandom.nextLong() );\n token = token.concat( Long.toString( longToken, 34 + i ) );//max value of radix is 36\n }\n return token;\n }", "private String generateToken(Map<String, Object> claims) {\n return Jwts.builder()\n .setClaims(claims)\n .setExpiration(new Date(System.currentTimeMillis() + 700000000))\n .signWith(SignatureAlgorithm.HS512, SECRET)\n .compact();\n }", "protected String generateStateId() {\n\t\treturn ServiceBus.crypto.getRandomString();\n\t}", "private String getToken() {\n\t\tString numbers = \"0123456789\";\n\t\tRandom rndm_method = new Random();\n String OTP = \"\";\n for (int i = 0; i < 4; i++)\n {\n \tOTP = OTP+numbers.charAt(rndm_method.nextInt(numbers.length()));\n \n }\n return OTP;\n\t}", "public static String urlSafeRandomToken() {\n SecureRandom random = new SecureRandom();\n byte bytes[] = new byte[20];\n random.nextBytes(bytes);\n Base64.Encoder encoder = Base64.getUrlEncoder().withoutPadding();\n String token = encoder.encodeToString(bytes);\n return token;\n }", "private String prepareSecurityToken() {\r\n\t\tint time = ((int) System.currentTimeMillis() % SECURITY_TOKEN_TIMESTAMP_RANGE);\r\n\t\treturn String.valueOf(time + (new Random().nextLong() - SECURITY_TOKEN_TIMESTAMP_RANGE));\r\n\t}", "public String genUserToken()\n\t{\n\t\tString token = \"\";\n\t\tfor (int i = 0; i < 16; i++)\n\t\t{\n\t\t\ttoken = token + tokenGenerator.nextInt(10);\n\t\t}\n\t\treturn token;\n\t}", "private static void generateState() {\n byte[] array = new byte[7]; // length is bounded by 7\n new Random().nextBytes(array);\n STATE = new String(array, Charset.forName(\"UTF-8\"));\n }", "public static String generateToken() {\n return new Generex(PatternValidator.TOKEN_PATTERN).random();\n }", "public static String generateDeviceToken() throws EndlosException {\n\t\treturn hash(Utility.generateUuid() + DateUtility.getCurrentEpoch());\n\t}", "private static String generateToken(Accessor accessor) {\n return generateHash(accessor.getConsumerId() + System.nanoTime());\n }", "public static String generateAuthToken() throws EndlosException {\n\t\treturn hash(Utility.generateToken(6) + DateUtility.getCurrentEpoch() + Utility.generateToken(8));\n\t}", "private byte[] getTokenKey() throws InternalSkiException {\n return sysKey(TOKEN_KEY);\n }", "public static String generateToken(HttpServletResponse response) {\n String token = cage.getTokenGenerator().next();\n String token0 = DigestUtils.shaHex(token);\n SessionCookieHolder.setCookie(response, \"c\", token0);\n return token;\n }", "public String generateToken(String username) {\n\t\tString token = username;\n\t\tLong l = Math.round(Math.random()*9);\n\t\ttoken = token + l.toString();\n\t\treturn token;\n\t}", "public String createToken(String identity) throws InternalSkiException {\n byte[] tokenKey = getTokenKey();\n byte[] newKey = SkiKeyGen.generateKey(SkiKeyGen.DEFAULT_KEY_SIZE_BITS);\n\n Token tkn = new Token();\n tkn.setIdentity(identity);\n tkn.setKey(newKey);\n // log.info(\"New token key: \" + tkn.getKey());\n\n String tknValue = th.encodeToken(tkn, tokenKey);\n if (tknValue==null) {\n log.warning(\"Failed to encode token during token creation!\");\n }\n if (log.isLoggable(Level.FINE)) {\n log.fine(\"Created token with value: \" + tknValue);\n }\n return tknValue;\n }", "public static String getToken() {\n String token = \"96179ce8939c4cdfacba65baab1d5ff8\";\n return token;\n }", "String generateUnitRenewalToken(Unit unit, Instant expiration);", "public String generateToken() {\n Authentication authentication = getAuthentication();\n if(authentication == null) {\n throw new AuthenticationCredentialsNotFoundException(\"No user is currently logged in.\");\n }\n return jwtUtil.generateJwtToken(authentication);\n }", "public Token() {\n token = new Random().nextLong();\n }", "String createToken(User user);", "String generateUserRenewalToken(String username);", "private String generateSecretKey(){\n SecureRandom random = new SecureRandom();\n byte[] bytes = new byte[20];\n\n random.nextBytes(bytes);\n Base32 base32 = new Base32();\n return base32.encodeToString(bytes);\n }", "private String createState(AbstractOAuth2AuthenticationProvider idp, Optional<String> redirectPage) {\n if (idp == null) {\n throw new IllegalArgumentException(\"idp cannot be null\");\n }\n SecureRandom rand = new SecureRandom();\n\n String base = idp.getId() + \"~\" + this.clock.millis()\n + \"~\" + rand.nextInt(1000)\n + redirectPage.map(page -> \"~\" + page).orElse(\"\");\n\n String encrypted = StringUtil.encrypt(base, idp.getClientSecret());\n final String state = idp.getId() + \"~\" + encrypted;\n return state;\n }", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "private String generateBase32Token() throws CryptoProviderException {\n byte[] randomBytes = keyGenerator.generateRandomBytes(BASE32_KEY_LENGTH);\n return BaseEncoding.base32().omitPadding().encode(randomBytes).substring(0, BASE32_KEY_LENGTH);\n }", "private String doGenerateToken(Map<String, Object> claims, String subject) {\n\t\treturn Jwts.builder()\n\t\t\t\t .setClaims(claims)\n\t\t\t\t .setSubject(subject)\n\t\t\t\t .setIssuedAt(new Date(System.currentTimeMillis()))\n\t\t\t\t .setExpiration(new Date(System.currentTimeMillis() + JWT_TOKEN_VALIDITY * 1000))\n\t\t\t\t .signWith(SignatureAlgorithm.HS512, secret)\n\t\t\t\t .compact();\n\t}", "public String getToken();", "public String generateAccessToken() {\n return accessTokenGenerator.generate().toString();\n }", "private String doGenerateToken(Map<String, Object> claims, String subject) {\n\n\t\treturn Jwts.builder().setClaims(claims).setSubject(subject).setIssuedAt(new Date(System.currentTimeMillis()))\n\t\t\t\t.setExpiration(new Date(System.currentTimeMillis() + expiration * 1000))\n\t\t\t\t.signWith(SignatureAlgorithm.HS512, secret).compact();\n\t}", "public StringBuilder createToken() throws IOException {\n /**\n * we need the url where we want to make an API call\n */\n URL url = new URL(\"https://api.scribital.com/v1/access/login\");\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n /**\n * set the required type, in this case it's a POST request\n */\n connection.setRequestMethod(\"POST\");\n\n /**\n * set the type of content, here we use a JSON type\n */\n connection.setRequestProperty(\"Content-Type\", \"application/json; utf-8\");\n connection.setDoOutput(true);\n\n /**\n * set the Timeout, will disconnect if the connection did not work, avoid infinite waiting\n */\n connection.setConnectTimeout(6000);\n connection.setReadTimeout(6000);\n\n /**\n * create the request body\n * here we need only the username and the api-key to make a POST request and to receive a valid token for the Skribble API\n */\n String jsonInputString = \"{\\\"username\\\": \\\"\" + username +\"\\\", \\\"api-key\\\":\\\"\" + api_key + \"\\\"}\";\n try(OutputStream os = connection.getOutputStream()){\n byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);\n os.write(input,0, input.length);\n }\n\n /**\n * read the response from the Skriblle API which is a token in this case\n */\n try(BufferedReader br = new BufferedReader(\n new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {\n StringBuilder response = new StringBuilder();\n String responseLine = null;\n while ((responseLine = br.readLine()) != null) {\n response.append(responseLine.trim());\n Token = response;\n }\n }\n return Token;\n }", "String getToken();", "String getToken();", "String getToken();", "String getToken();", "String getToken();", "public void generateToken(String uri) {\n this.token = \"sandbox\";\n }", "com.google.protobuf.ByteString\n getTokenBytes();", "com.google.protobuf.ByteString\n getTokenBytes();", "com.google.protobuf.ByteString\n getTokenBytes();", "public TokenTO generateToken(UserTO user) {\n TokenTO res;\n\n res = mgrToken.createToken(Crypto.generateToken() + Crypto.generateToken());\n mgrToken.save(res);\n user.setToken(res);\n getDao().update(user);\n\n return res;\n }", "public String generateTokenForUser(String userName) {\n\t\tSession session = new Session();\n\t\tString token = session.getToken();\n\t\tsessionMap.put(userName, session);\n\t\t\n\t\treturn Base64.getEncoder().encodeToString(token.getBytes());\n\t}", "public static String createToken(int userId) {\n String tokenRaw = userId + \"_\" + UUID.randomUUID().toString().replace(\"-\", \"\");\n return encryptedByMD5(tokenRaw);\n }", "com.google.protobuf.ByteString\n getTokenBytes();", "private String generateVerificationToken(User user) {\n String token = UUID.randomUUID().toString();\n VerificationToken verificationToken = new VerificationToken();\n verificationToken.setToken(token);\n verificationToken.setUser(user);// after that we save it to repository\n verificationTokenRepository.save(verificationToken);\n return token;\n }", "public String token() {\n return Codegen.stringProp(\"token\").config(config).require();\n }", "public RefreshToken generateRefreshToken(){\n RefreshToken refreshToken = new RefreshToken();\n //Creates a 128bit random UUID. This serves as our refresh token\n refreshToken.setToken(UUID.randomUUID().toString());\n //Set creation timestampt\n refreshToken.setCreatedDate(Instant.now());\n\n return refreshTokenRepository.save(refreshToken);\n }", "String getSecret();", "private String generateOtp() {\n\t\tString otp = TOTP.getOTP(SECRET);\n\t\treturn otp;\n\t}", "public S getRandomState();", "private static SecureRandomAndPad createSecureRandom() {\n byte[] seed;\n File devRandom = new File(\"/dev/urandom\");\n if (devRandom.exists()) {\n RandomSeed rs = new RandomSeed(\"/dev/urandom\", \"/dev/urandom\");\n seed = rs.getBytesBlocking(20);\n } else {\n seed = RandomSeed.getSystemStateHash();\n }\n return new SecureRandomAndPad(new SecureRandom(seed));\n }", "@Override\n\tprotected SessionKey generateSessionKey() {\n\n\t\tSessionKey sk = new SessionKey();\n\t\t\n\t\tSecureRandom random = null;\n\t\ttry {\n\t\t\trandom = SecureRandom.getInstance(\"SHA1PRNG\");\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tbyte bytes[] = new byte[16];\n\t\trandom.nextBytes(bytes);\n\n\t\tbyte transformation[] = \"AES/CBC/PKCS5Padding\".getBytes();\n\t\tsk.setTransformationName(transformation);\n\t\tsk.setKey(bytes); // 128 Bits\n\t\trandom.nextBytes(bytes);\n\t\tsk.setIV(bytes); // 128 Bits\n\n\t\t\n\t\treturn sk;\n\t}", "public interface TokenGenerator {\n\n String generate();\n\n}", "private static Key generateKey() {\n return new SecretKeySpec(keyValue, ALGO);\n }", "com.google.protobuf.ByteString\n getTokenBytes();", "com.google.protobuf.ByteString\n getTokenBytes();", "com.google.protobuf.ByteString\n getTokenBytes();", "com.google.protobuf.ByteString\n getTokenBytes();", "com.google.protobuf.ByteString\n getTokenBytes();", "public String generateToken(HttpServletRequest request)\r\n\t{\r\n\t\treturn tokensManager.generateToken((HttpServletRequest) request);\r\n\t}", "java.lang.String getSecret();", "public Token newToken() {\r\n\t\tString value = UUID.randomUUID().toString();\r\n\t\treturn new Token(value);\r\n\t}", "private String createSalt()\r\n {\r\n SecureRandom random = new SecureRandom();\r\n byte bytes[] = new byte[20];\r\n random.nextBytes(bytes);\r\n StringBuilder sb = new StringBuilder();\r\n\r\n for (int i = 0; i < bytes.length; i++)\r\n {\r\n sb.append(Integer.toString((bytes[i] & 0xff) + 0x100, 16).substring(1));\r\n }\r\n\r\n String salt = sb.toString();\r\n return salt;\r\n }", "byte[] get_secure_random_bytes();", "String getTokenString();", "public String generateToken(UserDetails userDetails) {\n\t\tMap<String, Object> claims = new HashMap<>();\n\t\treturn createToken(claims, userDetails.getUsername());\n\t}", "public String generateToken(Authentication authentication) {\n\t\tUser user=(User) authentication.getPrincipal();\t//Get user being authenticated (configured in security config)\n\t\tString userId= Long.toString(user.getId());\n\t\tDate now= new Date(System.currentTimeMillis());\n\t\tDate expiryTime= new Date(now.getTime()+SecurityConstants.TOKEN_EXPIRY);\n\t\t\n\t\tMap<String, Object> claims= new HashMap<>();\n\t\tclaims.put(\"id\", userId);\n\t\tclaims.put(\"username\", user.getUsername());\n\t\tclaims.put(\"fullname\", user.getFullName());\n\t\t//Role (IF IMPLEMENTED)\n\t\t\n\t\treturn Jwts.builder()\n\t\t\t\t.setSubject(userId)\n\t\t\t\t.setClaims(claims)\n\t\t\t\t.setIssuedAt(now)\n\t\t\t\t.setExpiration(expiryTime)\n\t\t\t\t.signWith(SignatureAlgorithm.HS512, SecurityConstants.SECRET)\n\t\t\t\t.compact();\n\t}", "public String secureIdentityToken() {\n return runtimeProperty(PROPERTY_SECURE_IDENTITY_TOKEN);\n }", "public Token(I2PAppContext ctx) {\n super(null);\n byte[] data = new byte[MY_TOK_LEN];\n ctx.random().nextBytes(data);\n setData(data);\n setValid(MY_TOK_LEN);\n lastSeen = ctx.clock().now();\n }", "byte[] token();", "protected String generateKey(){\n Random bi= new Random();\n String returnable= \"\";\n for(int i =0;i<20;i++)\n returnable += bi.nextInt(10);\n return returnable;\n }", "protected String generateToken(Token.Type type, String context, Map<String, String> assertions) {\n Preconditions.checkNotNull(context, \"context cannot be null\");\n Preconditions.checkNotNull(assertions, \"secret cannot be null\");\n assertions.put(Params.CONTEXT.toString(), context);\n return jwtManager.generateJwtToken(\n new DefaultToken(\n convertToJsonAndEncrypt(\n encapsulateSecret(\n type,\n assertions\n )\n ),\n tokenExpiryInfo.getTokenTypeTimeoutInMillis(type).longValue()\n )\n );\n }", "public abstract String getSecret();", "@VisibleForTesting\n protected EzSecurityToken getSecurityToken() {\n if (new EzProperties(getConfigurationProperties(), true).getBoolean(\"ezbake.security.fake.token\", false)) {\n return ThriftTestUtils.generateTestSecurityToken(applicationSecurityId, applicationSecurityId, Lists.newArrayList(\"U\"));\n } else {\n try {\n return securityClient.fetchAppToken();\n } catch (Exception ex) {\n logger.error(\"Failed to get security token for INS\", ex);\n throw new RuntimeException(ex);\n }\n }\n }", "@Override\r\n\tpublic Token createToken() {\n\t\tToken token = new Token();\r\n\t\treturn token;\r\n\t}", "private static Tuple<Integer, String> getToken() {\n\t\tTuple<Integer, String> result = new Tuple<Integer, String>();\n\t\tresult = GETRequest(AUTH_URL, AUTH_HEADER, \"\", \"\");\n\t\treturn result;\n\t}", "public static synchronized String generateUniqueToken(int length) {\n\n byte random[] = new byte[length];\n Random randomGenerator = new Random();\n StringBuffer buffer = new StringBuffer();\n\n randomGenerator.nextBytes(random);\n\n for (int j = 0; j < random.length; j++)\n {\n byte b1 = (byte) ((random[j] & 0xf0) >> 4);\n byte b2 = (byte) (random[j] & 0x0f);\n if (b1 < 10)\n buffer.append((char) ('0' + b1));\n else\n buffer.append((char) ('A' + (b1 - 10)));\n if (b2 < 10)\n buffer.append((char) ('0' + b2));\n else\n buffer.append((char) ('A' + (b2 - 10)));\n }\n\n return (buffer.toString());\n }", "public String getToken()\n {\n return ssProxy.getToken();\n }", "private static byte[] generateSymetricKey(int length) {\n\t\tSecureRandom random = new SecureRandom();\n\t\tbyte[] keyBytes = new byte[length];\n\t\trandom.nextBytes(keyBytes);\n\t\tSecretKeySpec key = new SecretKeySpec(keyBytes, \"AES\");\n\t\treturn key.getEncoded();\n\t}", "private int generateSecret() {\n int secret = secretGenerator.nextInt();\n while (secretToNumber.containsKey(secret)) {\n secret = secretGenerator.nextInt();\n }\n return secret;\n }", "private static String genString(){\n final String ALPHA_NUMERIC_STRING =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n int pwLength = 14; //The longer the password, the more likely the user is to change it.\n StringBuilder pw = new StringBuilder();\n while (pwLength-- != 0) {\n int character = (int)(Math.random()*ALPHA_NUMERIC_STRING.length());\n pw.append(ALPHA_NUMERIC_STRING.charAt(character));\n }\n return pw.toString(); //\n }", "public static String generateActivationKey() {\n return RandomStringUtils.randomNumeric(RESET_CODE_DIGIT_COUNT);\n }", "private String generateToken(LoginViewModel viewModel){\n \n String authenticationToken;\n \n try{\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(viewModel.getUsername(), viewModel.getPassword()));\n \n SecurityContextHolder.getContext().setAuthentication(authentication);\n UserPrincipal principal = (UserPrincipal) authentication.getPrincipal();\n \n System.out.println(generateExpirationDate());\n authenticationToken = JWT\n .create()\n .withClaim(\"role\",\"ROLE_\" + principal.getRole())\n .withSubject(principal.getUsername())\n .withExpiresAt(generateExpirationDate())\n .sign(HMAC512(CommonSecurityConfig.SECRET.getBytes()));\n }catch (Exception e){\n System.out.println(e.getMessage());\n return null;\n }\n \n return authenticationToken;\n }", "public static String generatePass(){\r\n \r\n String password = new Random().ints(10, 33, 122).collect(StringBuilder::new,\r\n StringBuilder::appendCodePoint, StringBuilder::append)\r\n .toString();\r\n return password;\r\n\r\n }", "private String generateNewPassword() throws Exception\n {\n if(this.weblisketSession != null && \n this.weblisketSession.getId() != null)\n {\n int startIndex = this.weblisketSession.getId().length();\n if(startIndex >= 8)\n {\n return this.weblisketSession.getId().substring(startIndex - 8);\n }\n else\n {\n throw new Exception(\"Error Generating New Password\");\n }\n }\n else\n {\n throw new Exception(\"No Session Available For Generating New Password\");\n }\n }", "@Override\n public String getStateToken() {\n return stateToken;\n }", "@Transactional\n public UserToken generateToken() {\n if (!firebaseService.canProceed())\n return null;\n\n try {\n Optional<UserAuth> userOptional = Auditor.getLoggedInUser();\n if (!userOptional.isPresent()) return UNAUTHENTICATED;\n UserAuth user = userOptional.get();\n Map<String, Object> claims = new HashMap<>();\n claims.put(\"type\", user.getType().toString());\n claims.put(\"department\", user.getDepartment().getName());\n claims.put(\"dean_admin\", PermissionManager.hasPermission(user.getAuthorities(), Role.DEAN_ADMIN));\n String token = FirebaseAuth.getInstance().createCustomTokenAsync(user.getUsername(), claims).get();\n return fromUser(user, token);\n } catch (InterruptedException | ExecutionException e) {\n return UNAUTHENTICATED;\n }\n }", "private String generateToken(User newUser) throws JSONException{\n User temp_user = userRepository.findByUsername(newUser.getUsername());\n String user_id = temp_user.getId().toString();\n\n //creating JSON representing new token format which then can be encoded --> DOUBLE CHECK IF ALSO WORKS WITH STRINGS ONLY\n JSONObject json = new JSONObject();\n json.put(\"user_id\", user_id);\n\n //creating and encoding token\n return Base64.getEncoder().encodeToString(json.toString().getBytes());\n }", "private static String generateSecret(Accessor accessor, Consumer consumer) {\n return generateHash(accessor.getToken() + consumer.getSecret() + System.nanoTime());\n }", "public String createToken(Map<String, Object> claims, String subject) {\n\t\t\n\t\tSystem.out.println(\"encoded :: \"+Base64.getEncoder().encode(SECERATE_KEY.getBytes()));\n\t\treturn Jwts.builder().setClaims(claims).setSubject(subject)\n\t\t\t\t.setIssuedAt(new Date(System.currentTimeMillis()))\n\t\t\t\t.setExpiration(new Date(System.currentTimeMillis() +1000 * 60 * 60 * 10))\n\t\t\t\t.signWith(SignatureAlgorithm.HS512, Base64.getEncoder().encode(SECERATE_KEY.getBytes())).compact();\n\t}", "void genKey(){\n Random rand = new Random();\n int key_length = 16;\n String key_alpha = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n StringBuilder sb = new StringBuilder(key_length);\n for(int i = 0; i < key_length; i++){\n int j = rand.nextInt(key_alpha.length());\n char c = key_alpha.charAt(j);\n sb.append(c);\n }\n this.key = sb.toString();\n }", "private String loadToken(String sid, String timestamp) {\n\n return \"abcdef\";\n }", "public int generateKey() {\n SecureRandom secureRandom = new SecureRandom();\n try {\n secureRandom = SecureRandom.getInstance(\"SHA1PRNG\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n return secureRandom.nextInt(26);\n }" ]
[ "0.8385685", "0.6975523", "0.68869835", "0.65833694", "0.6553533", "0.65491766", "0.6545368", "0.6501952", "0.6500381", "0.6455052", "0.64176846", "0.6309492", "0.6264404", "0.61816233", "0.61622", "0.6113809", "0.6108896", "0.60990185", "0.6098933", "0.6068163", "0.6043175", "0.6026914", "0.6022024", "0.6014359", "0.6013775", "0.6011127", "0.59987366", "0.59987366", "0.59987366", "0.59987366", "0.59987366", "0.59987366", "0.5964179", "0.5959469", "0.5949918", "0.59444207", "0.59318864", "0.59198064", "0.5907343", "0.5907343", "0.5907343", "0.5907343", "0.5907343", "0.5903166", "0.5895649", "0.5895649", "0.5895649", "0.5891258", "0.5860311", "0.5846473", "0.58445704", "0.5817998", "0.5815745", "0.579392", "0.57830393", "0.5774422", "0.5762083", "0.5756453", "0.5754095", "0.57123935", "0.5696328", "0.56809056", "0.56809056", "0.56809056", "0.56809056", "0.56809056", "0.5679859", "0.5677249", "0.5670081", "0.56610507", "0.56579226", "0.5649253", "0.5628261", "0.56134903", "0.56056136", "0.55766886", "0.55682003", "0.55603266", "0.5560029", "0.55570096", "0.5556576", "0.5542244", "0.55404204", "0.55269766", "0.551507", "0.55145794", "0.55109787", "0.5500327", "0.5491214", "0.5490639", "0.54902136", "0.54804", "0.5476024", "0.5448572", "0.54431635", "0.54373425", "0.5433747", "0.5431709", "0.5428723", "0.5422427" ]
0.8391783
0
returns a valid google access token, valid for 60 mins
public String getAccessCookie(final String authCode) throws IOException, JSONException { Credential credential = getUsercredential(authCode); String accessToken = credential.getAccessToken(); System.out.println(accessToken); return accessToken; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Duration getTokenExpiredIn();", "public Integer getAccessTokenValiditySeconds() {\n return accessTokenValiditySeconds;\n }", "public long getTokenValidityInSeconds() {\n return tokenValidityInSeconds;\n }", "@Test\n public void getGoogleAuthTokensTest() throws ApiException {\n String code = null;\n InlineResponse2003 response = api.getGoogleAuthTokens(code);\n\n // TODO: test validations\n }", "private void refreshGoogleCalendarToken() {\n this.getGoogleToken();\n }", "public Integer getRefreshTokenValiditySeconds() {\n return refreshTokenValiditySeconds;\n }", "private static String getAccessToken() throws IOException {\n\t\t \t\n\t\t GoogleCredential googleCredential = GoogleCredential\n\t .fromStream(new FileInputStream(path))\n\t .createScoped(Arrays.asList(SCOPES));\n\t\t \tgoogleCredential.refreshToken();\n\t\t \treturn googleCredential.getAccessToken();\n\t}", "boolean isComponentAccessTokenExpired();", "public String getAccessToken() {\n if (accessToken == null || (System.currentTimeMillis() > (expirationTime - 60 * 1000))) {\n if (refreshToken != null) {\n try {\n this.refreshAccessToken();\n } catch (IOException e) {\n log.error(\"Error fetching access token\", e);\n }\n }\n }\n\n return accessToken;\n }", "@SuppressWarnings(\"unused\")\n private static String getRefreshToken() throws IOException {\n String client_id = System.getenv(\"PICASSA_CLIENT_ID\");\n String client_secret = System.getenv(\"PICASSA_CLIENT_SECRET\");\n \n // Adapted from http://stackoverflow.com/a/14499390/1447621\n String redirect_uri = \"http://localhost\";\n String scope = \"http://picasaweb.google.com/data/\";\n List<String> scopes;\n HttpTransport transport = new NetHttpTransport();\n JsonFactory jsonFactory = new JacksonFactory();\n\n scopes = new LinkedList<String>();\n scopes.add(scope);\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, client_id, client_secret, scopes).build();\n GoogleAuthorizationCodeRequestUrl url = flow.newAuthorizationUrl();\n url.setRedirectUri(redirect_uri);\n url.setApprovalPrompt(\"force\");\n url.setAccessType(\"offline\");\n String authorize_url = url.build();\n \n // paste into browser to get code\n System.out.println(\"Put this url into your browser and paste in the access token:\");\n System.out.println(authorize_url);\n \n Scanner scanner = new Scanner(System.in);\n String code = scanner.nextLine();\n scanner.close();\n\n flow = new GoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, client_id, client_secret, scopes).build();\n GoogleTokenResponse res = flow.newTokenRequest(code).setRedirectUri(redirect_uri).execute();\n String refreshToken = res.getRefreshToken();\n String accessToken = res.getAccessToken();\n\n System.out.println(\"refresh:\");\n System.out.println(refreshToken);\n System.out.println(\"access:\");\n System.out.println(accessToken);\n return refreshToken;\n }", "public boolean accessTokenExpired() {\n Date currentTime = new Date();\n if ((currentTime.getTime() - lastAccessTime.getTime()) > TIMEOUT_PERIOD) {\n return true;\n } else {\n return false;\n }\n }", "public Optional<GoogleTokenResponse> getGoogleToken(@NonNull GoogleOAuthData data) {\n Validation validation = data.valid();\n\n Preconditions.checkArgument(validation.isValid(), validation.getMessage());\n GoogleAuthConsumer consumer = new GoogleAuthConsumer();\n try {\n GoogleTokenResponse response = consumer.redeemAuthToken(data.getAuth_code(), data.getClient_id(), data.getRedirect_uri());\n return Optional.ofNullable(response);\n } catch (Exception e) {\n return Optional.empty();\n }\n }", "public String generateNewAccessToken(String refresh_token) throws SocketTimeoutException, IOException, Exception{\n String newAccessToken = \"\";\n JSONObject jsonReturn = new JSONObject();\n JSONObject tokenRequestParams = new JSONObject();\n tokenRequestParams.element(\"refresh_token\", refresh_token);\n if(currentRefreshToken.equals(\"\")){\n //You must read in the properties first!\n Exception noProps = new Exception(\"You must read in the properties first with init(). There was no refresh token set.\");\n throw noProps;\n }\n else{\n try{\n URL rerum = new URL(Constant.RERUM_ACCESS_TOKEN_URL);\n HttpURLConnection connection = (HttpURLConnection) rerum.openConnection();\n connection.setRequestMethod(\"POST\"); \n connection.setConnectTimeout(5*1000); \n connection.setDoOutput(true);\n connection.setDoInput(true);\n connection.setRequestProperty(\"Content-Type\", \"application/json\");\n connection.connect();\n DataOutputStream outStream = new DataOutputStream(connection.getOutputStream());\n //Pass in the user provided JSON for the body \n outStream.writeBytes(tokenRequestParams.toString());\n outStream.flush();\n outStream.close(); \n //Execute rerum server v1 request\n BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(),\"utf-8\"));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null){\n //Gather rerum server v1 response\n sb.append(line);\n }\n reader.close();\n jsonReturn = JSONObject.fromObject(sb.toString());\n newAccessToken = jsonReturn.getString(\"access_token\");\n }\n catch(java.net.SocketTimeoutException e){ //This specifically catches the timeout\n System.out.println(\"The Auth0 token endpoint is taking too long...\");\n jsonReturn = new JSONObject(); //We were never going to get a response, so return an empty object.\n jsonReturn.element(\"error\", \"The Auth0 endpoint took too long\");\n throw e;\n }\n }\n setAccessToken(newAccessToken);\n writeProperty(\"access_token\", newAccessToken);\n return newAccessToken;\n }", "String getAccessToken();", "String getAccessToken();", "private String getToken() {\n String keyFilePath = System.getenv(\"APE_API_KEY\");\n if (Strings.isNullOrEmpty(keyFilePath)) {\n File globalKeyFile = GlobalConfiguration.getInstance().getHostOptions().\n getServiceAccountJsonKeyFiles().get(GLOBAL_APE_API_KEY);\n if (globalKeyFile == null || !globalKeyFile.exists()) {\n CLog.d(\"Unable to fetch the service key because neither environment variable \" +\n \"APE_API_KEY is set nor the key file is dynamically downloaded.\");\n return null;\n }\n keyFilePath = globalKeyFile.getAbsolutePath();\n }\n if (Strings.isNullOrEmpty(mApiScope)) {\n CLog.d(\"API scope not set, use flag --business-logic-api-scope.\");\n return null;\n }\n try {\n Credential credential = GoogleCredential.fromStream(new FileInputStream(keyFilePath))\n .createScoped(Collections.singleton(mApiScope));\n credential.refreshToken();\n return credential.getAccessToken();\n } catch (FileNotFoundException e) {\n CLog.e(String.format(\"Service key file %s doesn't exist.\", keyFilePath));\n } catch (IOException e) {\n CLog.e(String.format(\"Can't read the service key file, %s\", keyFilePath));\n }\n return null;\n }", "private static GoogleIdToken verifyGoogleIdToken(String token) {\n\n GoogleIdToken idToken = null;\n\n if(token == null)\n return null;\n\n GoogleIdTokenVerifier verifier = new GoogleIdTokenVerifier.Builder(new NetHttpTransport(), new JacksonFactory())\n .setAudience(Arrays.asList(SecurityConstants.CLIENT_ID))\n .setIssuer(SecurityConstants.ISSUER)\n .build();\n\n try {\n idToken = verifier.verify(token);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return idToken;\n }", "protected int getAccessTokenValiditySeconds(OAuth2Request clientAuth) {\n if (clientDetailsService != null) {\n ClientDetails client = clientDetailsService.loadClientByClientId(clientAuth.getClientId());\n Integer validity = client.getAccessTokenValiditySeconds();\n if (validity != null) {\n return validity;\n }\n }\n return accessTokenValiditySeconds;\n }", "public String getAccessToken();", "GoogleAuthenticatorKey createCredentials();", "protected int getRefreshTokenValiditySeconds(OAuth2Request clientAuth) {\n if (clientDetailsService != null) {\n ClientDetails client = clientDetailsService.loadClientByClientId(clientAuth.getClientId());\n Integer validity = client.getRefreshTokenValiditySeconds();\n if (validity != null) {\n return validity;\n }\n }\n return refreshTokenValiditySeconds;\n }", "long getInvalidLoginLockoutTime();", "public void getGoogleToken() {\n String googleEmail = sharedpreferences.getString(\"GoogleEmail\", \"\");\n String scopes = sharedpreferences.getString(\"GoogleScopes\", \"\");\n if (!\"\".equals(googleEmail)) {\n MyAsyncTask asyncTask = new MyAsyncTask(googleEmail, scopes, this.getBaseContext());\n asyncTask.delegate = this;\n asyncTask.execute();\n }\n }", "public RefreshToken generateRefreshToken(){\n RefreshToken refreshToken = new RefreshToken();\n //Creates a 128bit random UUID. This serves as our refresh token\n refreshToken.setToken(UUID.randomUUID().toString());\n //Set creation timestampt\n refreshToken.setCreatedDate(Instant.now());\n\n return refreshTokenRepository.save(refreshToken);\n }", "private String refreshToken() {\n return null;\n }", "public void checkToRefreshToken(\n final ServiceClientCompletion<ResponseResult> completion)\n {\n final long timeDiff =\n mSharecareToken.expiresIn.getTime() - new Date().getTime();\n final long timeDiffInMin = TimeUnit.MILLISECONDS.toMinutes(timeDiff);\n if (timeDiffInMin < TIME_LIMIT_IN_MINUTES)\n {\n refreshToken(completion);\n }\n else if (completion != null)\n {\n completion.onCompletion(ServiceResultStatus.CANCELLED, 0, null);\n }\n }", "public interface TokenProvider {\n /**\n * @return an always valid access token.\n */\n String getAccessToken();\n\n /**\n * Forces a refresh of all tokens.\n *\n * @return the newly refreshed access token.\n */\n String refreshTokens();\n}", "@Override\n\tpublic long getTokenExpiryTime() {\n\t\treturn 0;\n\t}", "String getAuthorizerRefreshToken(String appId);", "public long getTokenExpirationInMillis() {\n return tokenExpirationInMillis;\n }", "public RefreshToken createRefreshToken() {\n RefreshToken refreshToken = new RefreshToken();\n refreshToken.setExpiryDate(Instant.now().plusMillis(refreshTokenDurationMs));\n refreshToken.setToken(Util.generateRandomUuid());\n refreshToken.setRefreshCount(0L);\n return refreshToken;\n }", "boolean isAuthorizerAccessTokenExpired(String appId);", "public String generateNewAccessToken() throws SocketTimeoutException, IOException, Exception{\n System.out.println(\"Lived Religion has to get a new access token...\");\n String newAccessToken = \"\";\n JSONObject jsonReturn = new JSONObject();\n JSONObject tokenRequestParams = new JSONObject();\n tokenRequestParams.element(\"refresh_token\", currentRefreshToken);\n if(currentRefreshToken.equals(\"\")){\n //You must read in the properties first!\n System.out.println(\"You must read in the properties first with init()\");\n Exception noProps = new Exception(\"You must read in the properties first with init(). There was no refresh token set.\");\n throw noProps;\n }\n else{\n try{\n System.out.println(\"Connecting to RERUM with refresh token...\");\n URL rerum = new URL(Constant.RERUM_ACCESS_TOKEN_URL);\n HttpURLConnection connection = (HttpURLConnection) rerum.openConnection();\n connection.setRequestMethod(\"POST\"); \n connection.setConnectTimeout(5*1000); \n connection.setDoOutput(true);\n connection.setDoInput(true);\n connection.setRequestProperty(\"Content-Type\", \"application/json\");\n connection.connect();\n DataOutputStream outStream = new DataOutputStream(connection.getOutputStream());\n //Pass in the user provided JSON for the body \n outStream.writeBytes(tokenRequestParams.toString());\n outStream.flush();\n outStream.close(); \n //Execute rerum server v1 request\n BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(),\"utf-8\"));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null){\n //Gather rerum server v1 response\n sb.append(line);\n }\n reader.close();\n jsonReturn = JSONObject.fromObject(sb.toString());\n System.out.println(\"RERUM responded with access token...\");\n newAccessToken = jsonReturn.getString(\"access_token\");\n }\n catch(java.net.SocketTimeoutException e){ //This specifically catches the timeout\n System.out.println(\"The RERUM token endpoint is taking too long...\");\n jsonReturn = new JSONObject(); //We were never going to get a response, so return an empty object.\n jsonReturn.element(\"error\", \"The RERUM endpoint took too long\");\n throw e;\n //newAccessToken = \"error\";\n }\n }\n setAccessToken(newAccessToken);\n writeProperty(\"access_token\", newAccessToken);\n System.out.println(\"Lived Religion has a new access token, and it is written to the properties file...\");\n return newAccessToken;\n }", "public static String authenticate(String userId, String accessToken, String gcmRegId, Date expirationDate, String email) {\n final ArrayList<NameValuePair> params = new ArrayList<NameValuePair>();\n params.add(new BasicNameValuePair(PARAM_FACEBOOK_UID, userId));\n params.add(new BasicNameValuePair(PARAM_ACCESS_TOKEN, accessToken));\n params.add(new BasicNameValuePair(PARAM_GCM_REG_ID, gcmRegId));\n params.add(new BasicNameValuePair(PARAM_ACCESS_TOKEN_EXPIRES, String.valueOf(expirationDate.getTime())));\n params.add(new BasicNameValuePair(PARAM_EMAIL, email));\n\n try {\n String result = postWebService(params, AUTH_URI, null);\n\n final JSONObject obj = new JSONObject(result);\n String APIToken = obj.getString(PARAM_ACCESS_TOKEN);\n if (APIToken != null && APIToken.length() > 0) {\n Log.i(Constants.TAG, \"API KEY: \" + APIToken);\n return APIToken;\n } else {\n Log.e(Constants.TAG,\n \"Error authenticating\" + obj.getString(PARAM_INFO));\n return null;\n } // end if-else\n } catch (APICallException e) {\n Log.e(Constants.TAG, \"HTTP ERROR when getting API token - STATUS:\" + e.getMessage(), e);\n return null;\n } catch (IOException e) {\n Log.e(Constants.TAG, \"IOException when getting API token\", e);\n return null;\n } catch (JSONException e) {\n Log.e(Constants.TAG, \"JSONException when getting API token\", e);\n return null;\n } // end try-catch\n }", "public synchronized void checkTokenExpiry() {\n if (this.mExpiryDate != null && this.mExpiryDate.getTime() <= System.currentTimeMillis() + REFRESH_THRESHOLD) {\n acquireTokenAsync();\n }\n }", "long getExpiration();", "@Test\n public void testExpiredToken() {\n ApplicationContext context =\n TEST_DATA_RESOURCE\n .getSecondaryApplication()\n .getBuilder()\n .client(ClientType.AuthorizationGrant, true)\n .token(OAuthTokenType.Bearer, true, null, null, null)\n .build();\n OAuthToken t = context.getToken();\n\n String header = authHeaderBearer(t.getId());\n\n Response r = target(\"/token/private\")\n .request()\n .header(AUTHORIZATION, header)\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }", "OAuth2Token getToken();", "@Override\n\tpublic OauthAccessToken acquireOauthRefreshToken(String refreshToken) \n\t{\n\t\t\n\t\tString url = WeChatConst.WECHATOAUTHURL+WeChatConst.OAUTHREFRESHTOKENURI;\n\t\tMap<String, String> param = new HashMap<String, String>();\n\t\tparam.put(\"appid\", WeChatConst.APPID);\n\t\tparam.put(\"grant_type\", \"refresh_token\");\n\t\tparam.put(\"refresh_token\", refreshToken);\n\t\tString response = HttpClientUtils.doGetWithoutHead(url, param);\n\t\tlog.debug(\" acquireOauthRefreshToken response :\"+response);\n\t\ttry {\n\t\t\tJSONObject responseJson = JSONObject.parseObject(response);\n\t\t\tOauthAccessToken authAccessToken = new OauthAccessToken();\n\t\t\tif(!responseJson.containsKey(\"errcode\"))\n\t\t\t{\n\t\t\t\tauthAccessToken.setAccessToken(responseJson.getString(\"access_token\"));\n\t\t\t\tauthAccessToken.setExpiresIn(responseJson.getString(\"exoires_in\"));\n\t\t\t\tauthAccessToken.setOpenId(responseJson.getString(\"openid\"));\n\t\t\t\tauthAccessToken.setScope(responseJson.getString(\"scope\"));\n\t\t\t\treturn authAccessToken;\n\t\t\t}\n\t\t\treturn null;\n\t\t} catch (Exception e) {\n\t\t\tlog.error(e);\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tprotected RefreshToken doCreateNewRefreshToken(ServerAccessToken at) {\n\t\tRefreshToken refreshToken = super.doCreateNewRefreshToken(at);\n\t\trefreshToken.setTokenKey(\"RT:\" + UUID.randomUUID().toString());\n\t\trefreshToken.setExpiresIn(Oauth2Factory.REFRESH_TOKEN_EXPIRED_TIME_SECONDS);\n\t\t\n\t\tif (log.isDebugEnabled()) {\n\t\t\ttry {\n\t\t\t\tlog.debug(\"RefreshToken={}\", OBJECT_MAPPER.writeValueAsString(refreshToken));\n\t\t\t} catch (JsonProcessingException e) {\n\t\t\t\tlog.error(e.getMessage(), e);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn refreshToken;\n\t}", "void expireComponentAccessToken();", "public String generateAccessToken() {\n return accessTokenGenerator.generate().toString();\n }", "public String getGCalendarAccessToken( String gcalid, String emailID) {\n\t\t\n\t\tGoogleCredential credential = getGoogleCredential(emailID);\n\t\tif (credential == null) {\n\t\t\treturn null; // user not authorized\n\t\t}\n\t\telse{\n\t\t\treturn credential.getAccessToken();\n\t\t}\n\t}", "public synchronized String accessToken(String knownInvalidToken) {\n if (accessToken == null || (knownInvalidToken != null && accessToken.equals(knownInvalidToken))) {\n loadTokens();\n }\n\n return accessToken;\n }", "public static String getAccessToken() {\n return \"\";\n }", "public String getAccessToken()\n {\n if (accessToken == null)\n {\n if (DEBUG)\n {\n System.out.println(\"Access token is empty\");\n }\n try\n {\n FileReader fileReader = new FileReader(getCache(\"token\"));\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n accessToken = bufferedReader.readLine();\n if (DEBUG)\n {\n System.out.println(\"BufferReader line: \" + accessToken);\n }\n } catch (FileNotFoundException e)\n {\n e.printStackTrace();\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return accessToken;\n }", "@Override\n public void onRequestToken() {\n Toast.makeText(getApplicationContext(), \"Your token has expired\", Toast.LENGTH_LONG).show();\n Log.i(\"Video_Call_Tele\", \"The token as expired..\");\n // mRtcEngine.renewToken(token);\n // https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#af1428905e5778a9ca209f64592b5bf80\n // Renew token - TODO\n }", "@Nullable\n private String fetchToken() throws IOException {\n try {\n return GoogleAuthUtil.getToken(mActivity, mEmail, mScope);\n } catch (UserRecoverableAuthException ex) {\n // GooglePlayServices.apk is either old, disabled, or not present\n // so we need to show the user some UI in the activity to recover.\n // TODO: complain about old version\n Log.e(\"aqx1010\", \"required Google Play version not found\", ex);\n } catch (GoogleAuthException fatalException) {\n // Some other type of unrecoverable exception has occurred.\n // Report and log the error as appropriate for your app.\n Log.e(\"aqx1010\", \"fatal authorization exception\", fatalException);\n }\n return null;\n }", "public GoogleAuthHelper() {\n\t\t\n\t\tLoadType<ClientCredentials> credentials = ofy().load().type(ClientCredentials.class);\n\t\t\n\t\tfor(ClientCredentials credential : credentials) {\n\t\t\t// static ClientCredentials credentials = new ClientCredentials();\n\t\t\tCALLBACK_URI = credential.getCallBackUri();\n\t\t\tCLIENT_ID = credential.getclientId();\n\t\t\tCLIENT_SECRET = credential.getClientSecret();\n\t\t}\n\t\t\n\t\tflow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT,\n\t\t\t\tJSON_FACTORY, CLIENT_ID, CLIENT_SECRET, SCOPE).setAccessType(\n\t\t\t\t\"offline\").build();\n\t\tgenerateStateToken();\n\t}", "public void refreshToken() throws ServiceUnavailableException {\n int retryTime = 0;\n // refresh the access token\n while (true) {\n try {\n this.authResult = getAccessToken();\n break;// refresh token successfully\n } catch (ServiceUnavailableException e) {\n if (retryTime < conf.getMaxRetryTimes()) {\n retryTime++;\n try {\n Thread.sleep(conf.getIntervalTime());\n } catch (InterruptedException e1) {\n // ignore\n }\n continue;// retry to refresh token\n }\n throw e;// failed to refresh token after retry\n }\n\n }\n }", "public String getAccess_token() {\r\n\t\treturn access_token;\r\n\t}", "static @NonNull String getAuthToken(@NonNull Context context) throws AuthException {\n final long startTime = System.currentTimeMillis();\n final GoogleApiClient googleApiClient = getClient(context);\n try {\n final ConnectionResult result = googleApiClient.blockingConnect();\n if (result.isSuccess()) {\n final GoogleSignInResult googleSignInResult = Auth.GoogleSignInApi.silentSignIn(googleApiClient).await();\n final GoogleSignInAccount account = googleSignInResult.getSignInAccount();\n if(account != null) {\n final String authToken = account.getIdToken();\n if(authToken != null) {\n Log.i(TAG, \"Got auth token in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n return authToken;\n } else {\n throw new AuthException(\"Failed to get auth token\");\n }\n } else {\n throw new AuthException(\"Not signed in\");\n }\n } else {\n throw new AuthException(\"Sign in connection error\");\n }\n } finally {\n googleApiClient.disconnect();\n }\n }", "private Drive authentication() throws IOException {\n\t\t// Request a new access token using the refresh token.\n\t\tGoogleCredential credential = new GoogleCredential.Builder()\n\t\t\t\t.setTransport(HTTP_TRANSPORT)\n\t\t\t\t.setJsonFactory(JSON_FACTORY)\n\t\t\t\t.setClientSecrets(CLIENT_ID, CLIENT_SECRET).build()\n\t\t\t\t.setFromTokenResponse(new TokenResponse().setRefreshToken(REFRESH_TOKEN));\n\t\tcredential.refreshToken();\n\t\treturn new Drive.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential)\n\t\t\t\t.setApplicationName(\"tp3\").build();\n\t}", "public static JSONObject checkTokenIsValid(String accessToken, String openId) throws Exception {\r\n\t\tString checkTokenUrl = MessageFormat.format(CHECK_OAUTH_TOKEN_IS_VALID, accessToken, openId);\r\n\t\tString response = HttpClientUtils.sendRequest(checkTokenUrl);\r\n\t\treturn JSONObject.fromObject(response);\r\n\t}", "protected boolean generateIdTokenOnRefreshRequest() {\n\t\treturn true;\n\t}", "public User validateLogInGoogle(String idTokenString) {\n\t\ttry {\n\t\t\tGoogleIdToken idToken = verifier.verify(idTokenString);\n\t\t\tif (idToken != null) {\n\t\t\t\tPayload payload = idToken.getPayload();\n\n\t\t\t\tString userId = payload.getSubject();\n\t\t\t\tString email = payload.getEmail();\n\t\t\t\tLong expirationTime = payload.getExpirationTimeSeconds();\n\n\t\t\t\t// TODO: sacar las validacinoes de usuario a otra funcion\n\t\t\t\tUser user = repo.getUserByEmail(email, true);\n\t\t\t\tif (user == null) {\n\t\t\t\t\t// Si no existe el usuario, se crea en base de datos\n\t\t\t\t\tuser = new User();\n\n\t\t\t\t\tuser.setEmail(email);\n\t\t\t\t\tuser.setFullName(email);\n\t\t\t\t\tuser.setRoles(Arrays.asList(Constants.ROLE_USER));\n\n\t\t\t\t\tAuthUser authUser = new AuthUser();\n\t\t\t\t\tauthUser.setLastIdToken(idTokenString);\n\t\t\t\t\tauthUser.setProvider(Constants.OAUTH_PROVIDER_GOOGLE);\n\t\t\t\t\tauthUser.setUserId(userId);\n\t\t\t\t\tauthUser.setExpirationLastIdToken(expirationTime);\n\n\t\t\t\t\tuser.setAuth(authUser);\n\n\t\t\t\t\t// Se guarda el usuario con el auth puesto\n\t\t\t\t\trepo.createUser(user);\n\t\t\t\t} else {\n\t\t\t\t\t//Verificamos que no este desactivado el usuario\n\t\t\t\t\tif(!user.isActive()) {\n\t\t\t\t\t\tthrow new ResponseStatusException(HttpStatus.NOT_ACCEPTABLE,\n\t\t\t\t\t\t\t\t\"El usuario esta desactivado.\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Si el usuario existe, verifica que inicia sesion con Auth\n\t\t\t\t\tif (user.getAuth() != null) {\n\t\t\t\t\t\t// Verificamos los datos\n\t\t\t\t\t\tif (!user.getAuth().getProvider().equals(Constants.OAUTH_PROVIDER_GOOGLE)) {\n\t\t\t\t\t\t\tthrow new ResponseStatusException(HttpStatus.BAD_REQUEST,\n\t\t\t\t\t\t\t\t\t\"El usuario no tiene asociado este metodo de inicio de sesion.\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!user.getAuth().getUserId().equals(userId)) {\n\t\t\t\t\t\t\tthrow new ResponseStatusException(HttpStatus.BAD_REQUEST,\n\t\t\t\t\t\t\t\t\t\"El inicio de sesion de Google no corresponde al usuario.\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Si sale todo bien, actualizamos los datos\n\t\t\t\t\t\tuser.getAuth().setExpirationLastIdToken(expirationTime);\n\t\t\t\t\t\tuser.getAuth().setLastIdToken(idTokenString);\n\t\t\t\t\t\trepo.createUser(user);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Si no tiene el Auth, no se dejara iniciar sesion.\n\t\t\t\t\t\tthrow new ResponseStatusException(HttpStatus.BAD_REQUEST,\n\t\t\t\t\t\t\t\t\"El usuario no tiene asociado este metodo de inicio de sesion.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn user;\n\n\t\t\t} else {\n\t\t\t\t// El token es invalido, nos e pude verificar con el proveedor\n\t\t\t\tthrow new ResponseStatusException(HttpStatus.BAD_REQUEST, \"Token invalido.\");\n\t\t\t}\n\n\t\t} catch (GeneralSecurityException | IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new ResponseStatusException(HttpStatus.BAD_REQUEST);\n\t\t}\n\n\t}", "protected boolean generateRefreshTokenOnRefreshRequest() {\n\t\treturn true;\n\t}", "public interface TokenInvalidator {\n C0117M invalidateAccessToken();\n}", "public String getRefreshToken() {\r\n return refreshToken;\r\n }", "private void refreshAccessToken() throws IOException {\n\n if (clientId == null) fetchOauthProperties();\n\n URL url = new URL(tokenURI);\n\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"refresh_token\", refreshToken);\n params.put(\"client_id\", clientId);\n params.put(\"client_secret\", clientSecret);\n params.put(\"grant_type\", \"refresh_token\");\n\n String response = HttpUtils.getInstance().doPost(url, params);\n JsonParser parser = new JsonParser();\n JsonObject obj = parser.parse(response).getAsJsonObject();\n\n JsonPrimitive atprim = obj.getAsJsonPrimitive(\"access_token\");\n if (atprim != null) {\n accessToken = obj.getAsJsonPrimitive(\"access_token\").getAsString();\n expirationTime = System.currentTimeMillis() + (obj.getAsJsonPrimitive(\"expires_in\").getAsInt() * 1000);\n fetchUserProfile();\n } else {\n // Refresh token has failed, reauthorize from scratch\n reauthorize();\n }\n\n }", "public int getTokenViaClientCredentials(){\n\t\t//Do we have credentials?\n\t\tif (Is.nullOrEmpty(clientId) || Is.nullOrEmpty(clientSecret)){\n\t\t\treturn 1;\n\t\t}\n\t\ttry{\n\t\t\t//Build auth. header entry\n\t\t\tString authString = \"Basic \" + Base64.getEncoder().encodeToString((clientId + \":\" + clientSecret).getBytes());\n\t\t\t\n\t\t\t//Request headers\n\t\t\tMap<String, String> headers = new HashMap<>();\n\t\t\theaders.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\theaders.put(\"Authorization\", authString);\n\t\t\t\n\t\t\t//Request data\n\t\t\tString data = ContentBuilder.postForm(\"grant_type\", \"client_credentials\");\n\t\t\t\n\t\t\t//Call\n\t\t\tlong tic = System.currentTimeMillis();\n\t\t\tthis.lastRefreshTry = tic;\n\t\t\tJSONObject res = Connectors.httpPOST(spotifyAuthUrl, data, headers);\n\t\t\tStatistics.addExternalApiHit(\"SpotifyApi getTokenViaClientCredentials\");\n\t\t\tStatistics.addExternalApiTime(\"SpotifyApi getTokenViaClientCredentials\", tic);\n\t\t\t//System.out.println(res.toJSONString()); \t\t//DEBUG\n\t\t\tif (!Connectors.httpSuccess(res)){\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\tString token = JSON.getString(res, \"access_token\");\n\t\t\tString tokenType = JSON.getString(res, \"token_type\");\n\t\t\tlong expiresIn = JSON.getLongOrDefault(res, \"expires_in\", 0);\n\t\t\tif (Is.nullOrEmpty(token)){\n\t\t\t\treturn 4;\n\t\t\t}else{\n\t\t\t\tthis.token = token;\n\t\t\t\tthis.tokenType = tokenType;\n\t\t\t\tthis.tokenValidUntil = System.currentTimeMillis() + (expiresIn * 1000);\n\t\t\t}\n\t\t\treturn 0;\n\t\t\t\n\t\t}catch (Exception e){\n\t\t\tStatistics.addExternalApiHit(\"SpotifyApi-error getTokenViaClientCredentials\");\n\t\t\treturn 3;\n\t\t}\n\t}", "public String getExtendedAccessToken(String accessToken) throws AuthenticationException {\n\t \n\t AccessToken extendedAccessToken = null;\n\t try {\n\t extendedAccessToken = fbClient.obtainExtendedAccessToken(Constants.appId, Constants.appSecret, Constants.accessToken);\n\n//\t if (log.isDebugEnabled()) {\n//\t log.debug(MessageFormat.format(\"Got long lived session token {0} for token {1}\", extendedAccessToken, accessToken));\n//\t }\n\t \n\t } catch (FacebookException e) {\n\t if (e.getMessage().contains(\"Error validating access token\")) {\n\t throw new AuthenticationException(\"Error validating access token\");\n\t }\n\t \n\t throw new RuntimeException(\"Error exchanging short lived token for long lived token\", e);\n\t }\n\t return extendedAccessToken.getAccessToken();\n\t}", "public String refreshToken(String token) {\n String refreshedToken;\n try {\n final Claims claims = this.getClaimsFromToken(token);\n claims.put(CREATED, dateUtil.getCurrentDate());\n refreshedToken = this.generateToken(claims);\n } catch (Exception e) {\n refreshedToken = null;\n }\n return refreshedToken;\n }", "public String getRefresh_token() {\r\n\t\treturn refresh_token;\r\n\t}", "public void setAccessTokenValiditySeconds(int accessTokenValiditySeconds) {\n this.accessTokenValiditySeconds = accessTokenValiditySeconds;\n }", "public long getTokenValidityInSecondsForRememberMe() {\n return tokenValidityInSecondsForRememberMe;\n }", "RequestToken getOAuthRequestToken() throws MoefouException;", "AccessToken getOAuthAccessToken(RequestToken requestToken) throws MoefouException;", "RequestToken getOAuthRequestToken(String callbackURL) throws MoefouException;", "@RequestMapping(value=\"/googleLogin\", method=RequestMethod.POST, consumes=MediaType.APPLICATION_FORM_URLENCODED_VALUE)\n\tpublic @ResponseBody Object verifyGoogleToken(@RequestParam String googleToken) {\n\t\ttry {\n\t\t\tString email = userService.verifyGoogleToken(googleToken);\n\t\t\tSystem.out.println(\"Response from google: email - \" + email);\n\t\t\tif(email.length() > 0) {\n\t\t\t\t long now = new Date().getTime();\n\t\t\t\t long expires = now + 86400000;\n\t\t\t\t try {\n\t\t\t\t\t UserProfile up = userService.getUserByEmail(email);\n\t\t\t\t\t System.out.println(\"USER FOUND: \" + up.toString());\n\t\t\t\t\t String s = Jwts.builder().setSubject(up.getUserName()).setIssuer(\"UxP-Gll\").setExpiration(new Date(expires)).setHeaderParam(\"user\", up).signWith(SignatureAlgorithm.HS512, key).compact();\n\t\t\t\t\t return userService.getUserByUserName(up.getUserName(), s);\n\t\t\t\t } catch (Exception e) {\n\t\t\t\t\t return Collections.singletonMap(\"error\", \"no account found for email: \" + email); \n\t\t\t\t }\n\t\t\t\t \n\t\t\t} else {\n\t\t\t\treturn Collections.singletonMap(\"error\", \"bad response from google\");\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(e.toString());\n\t\t\treturn Collections.singletonMap(\"error\", \"token could not be validated\");\n\t\t}\n\t}", "private String retrieveToken(String accessCode) throws IOException {\n OAuthApp app = new OAuthApp(asanaCredentials.getClientId(), asanaCredentials.getClientSecret(),\n asanaCredentials.getRedirectUri());\n Client.oauth(app);\n String accessToken = app.fetchToken(accessCode);\n\n //check if user input is valid by testing if accesscode given by user successfully authorises the application\n if (!(app.isAuthorized())) {\n throw new IllegalArgumentException();\n }\n\n return accessToken;\n }", "public static String getAccessToken() {\n return accessToken;\n }", "private void getAccessToken() {\n\n\t\tMediaType mediaType = MediaType.parse(\"application/x-www-form-urlencoded\");\n\t\tRequestBody body = RequestBody.create(mediaType,\n\t\t\t\t\"client_id=\" + CONSUMER_KEY + \"&client_secret=\" + CONSUMER_SECRET + \"&grant_type=client_credentials\");\n\t\tRequest request = new Request.Builder().url(\"https://api.yelp.com/oauth2/token\").post(body)\n\t\t\t\t.addHeader(\"cache-control\", \"no-cache\").build();\n\n\t\ttry {\n\t\t\tokhttp3.Response response = client.newCall(request).execute();\n\t\t\tString respbody = response.body().string().trim();\n\t\t\tJSONParser parser = new JSONParser();\n\t\t\tJSONObject json = (JSONObject) parser.parse(respbody);\n\t\t\taccessToken = (String) json.get(\"access_token\");\n\t\t} catch (IOException | ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setAccessTokenValiditySeconds(Integer accessTokenValiditySeconds) {\n this.accessTokenValiditySeconds = accessTokenValiditySeconds;\n }", "Future<String> getAccessToken(OkapiConnectionParams params);", "public AccessToken getAccessToken() {\n return token;\n }", "@Test\n public void testRefreshToken() {\n ApplicationContext context =\n TEST_DATA_RESOURCE\n .getSecondaryApplication()\n .getBuilder()\n .client(ClientType.AuthorizationGrant, true)\n .bearerToken()\n .refreshToken()\n .build();\n OAuthToken t = context.getToken();\n\n String header = authHeaderBearer(t.getId());\n\n Response r = target(\"/token/private\")\n .request()\n .header(AUTHORIZATION, header)\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }", "private String getAccessTokenUrl(String identityServer) {\n\t\treturn \"https://accounts.google.com/o/oauth2/token\";\n\t}", "GoogleAuthenticatorKey createCredentials(String userName);", "public String refreshToken(String token) {\n\t\tString refreshedToken;\n\t\ttry {\n\t\t\tfinal Claims claims = this.getClaimsFromToken(token);\n\t\t\tclaims.put(\"created\", this.generateCurrentDate());\n\t\t\trefreshedToken = this.generateToken(claims);\n\t\t} catch (Exception e) {\n\t\t\trefreshedToken = null;\n\t\t}\n\t\treturn refreshedToken;\n\t}", "Optional<Instant> getTokenInvalidationTimestamp();", "private boolean validateAccessToken(String clientId, String clientSecret) {\n log.info(\"Client Id:{} Client Secret:{}\", clientId, clientSecret);\n\n // Enable the Below code when the Introspection URL is ready to test\n /**\n * String auth = clientId + clientSecret; RestTemplate restTemplate = new RestTemplate();\n * HttpHeaders headers = new HttpHeaders(); headers.add(\"Content-Type\",\n * MediaType.APPLICATION_JSON_VALUE); headers.add(\"Authorization\", \"Basic \" +\n * Base64.getEncoder().encodeToString(auth.getBytes())); HttpEntity<String> request = new\n * HttpEntity<String>(headers);\n *\n * <p>log.info(\"Sending Token Intropsection request to Endpoint::::: {}\",\n * tokenIntrospectionURL); ResponseEntity<String> response =\n * restTemplate.exchange(tokenIntrospectionURL, HttpMethod.POST, request, String.class); *\n */\n return true;\n }", "public String mo3470a(String str, boolean z) {\n n20 n20;\n String str2;\n jo0 jo0;\n jo0 jo02;\n jo0 jo03;\n ThreadUtils.m1460b();\n if (e20.b) {\n String str3 = \"getAccessToken() called with: forceRefresh = [\" + z + \"]\";\n jo0 jo04 = e20.a.a;\n if (jo04 != null) {\n jo04.a(\"OAuthTokenProvider\", str3);\n }\n }\n if (!z && this.f1255c.containsKey(str) && this.f1255c.get(str) != null) {\n if (!mo3474a(Long.valueOf(this.f1255c.get(str).c), this.f1255c.get(str).b)) {\n if (e20.b && (jo03 = e20.a.a) != null) {\n jo03.a(\"OAuthTokenProvider\", \"getAccessToken() cached token not expired, OK\");\n }\n return this.f1255c.get(str).a;\n } else if (e20.b && (jo02 = e20.a.a) != null) {\n jo02.a(\"OAuthTokenProvider\", \"getAccessToken() cached token expired\");\n }\n }\n if (e20.b && (jo0 = e20.a.a) != null) {\n jo0.a(\"OAuthTokenProvider\", \"fetchAccessToken() called\");\n }\n OAuthToken a = mo3469a(str);\n String str4 = \"null\";\n if (e20.b) {\n do0 do0 = e20.a;\n StringBuilder a2 = Eo.a(\"requestAccessToken result = [\");\n if (a == null) {\n str2 = str4;\n } else {\n str2 = \"non-null\";\n }\n String a3 = Eo.a(a2, str2, \"]\");\n jo0 jo05 = do0.a;\n if (jo05 != null) {\n jo05.a(\"OAuthTokenProvider\", a3);\n }\n }\n if (a == null) {\n n20 = null;\n } else {\n n20 = new n20(a.getAccessToken(), a.getExpiresIn(), System.currentTimeMillis() / 1000);\n }\n if (e20.b) {\n do0 do02 = e20.a;\n StringBuilder a4 = Eo.a(\"fetchAccessToken result = [\");\n if (n20 != null) {\n str4 = \"non-null\";\n }\n String a5 = Eo.a(a4, str4, \"]\");\n jo0 jo06 = do02.a;\n if (jo06 != null) {\n jo06.a(\"OAuthTokenProvider\", a5);\n }\n }\n if (n20 == null) {\n return null;\n }\n this.f1255c.put(str, n20);\n mo3471a();\n return n20.a;\n }", "public SalesforceAccessGrant(final String accessToken, final String scope, final String refreshToken, final Map<String, Object> response) {\n super(accessToken, scope, refreshToken, null);\n this.instanceUrl = (String)response.get(SalesforceConstants.AccessTokenResult.PARAM_INSTANCE_URL);\n this.id = (String)response.get(SalesforceConstants.AccessTokenResult.PARAM_ID);\n this.signature = (String)response.get(SalesforceConstants.AccessTokenResult.PARAM_SIGNATURE);\n this.issuedAt = (String)response.get(SalesforceConstants.AccessTokenResult.PARAM_ISSUED_AT);\n }", "public String getAccessToken() {\n return accessToken;\n }", "public String getAccessToken() {\n return accessToken;\n }", "int getSignOnTime();", "Lock getComponentAccessTokenLock();", "AccessToken getOAuthAccessToken() throws MoefouException;", "private GoogleCredential getGoogleCredential(String userId) {\t\t\n\t\t\n\t\ttry { \n\t\t\t// get the service account e-mail address and service account private key from property file\n\t\t\t// this email account and key file are specific for your environment\n\t\t\tif (SERVICE_ACCOUNT_EMAIL == null) {\n\t\t\t\tSERVICE_ACCOUNT_EMAIL = m_serverConfigurationService.getString(\"google.service.account.email\", \"\");\n\t\t\t}\n\t\t\tif (PRIVATE_KEY == null) {\n\t\t\t\tPRIVATE_KEY = m_serverConfigurationService.getString(\"google.private.key\", \"\");\n\t\t\t}\n\t\t\t\n\t\t\tGoogleCredential credential = getCredentialFromCredentialCache(userId);\n\t\t\treturn credential;\n\n\t\t} catch (Exception e) {\n\t\t\t// return null if an exception occurs while communicating with Google.\n\t\t\tM_log.error(\"Error creating a GoogleCredential object or requesting access token: \" + userId + \" \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "private String GetAccessToken() {\n final String grantType = \"password\";\n final String resourceId = \"https%3A%2F%2Fgraph.microsoft.com%2F\";\n final String tokenEndpoint = \"https://login.microsoftonline.com/common/oauth2/token\";\n\n try {\n URL url = new URL(tokenEndpoint);\n HttpURLConnection conn;\n if (configuration.isProxyUsed()) {\n Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(configuration.getProxyServer(), configuration.getProxyPort()));\n conn = (HttpURLConnection) url.openConnection(proxy);\n } else {\n conn = (HttpURLConnection) url.openConnection();\n }\n\n String line;\n StringBuilder jsonString = new StringBuilder();\n\n conn.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n conn.setRequestMethod(\"POST\");\n conn.setDoInput(true);\n conn.setDoOutput(true);\n conn.setInstanceFollowRedirects(false);\n conn.connect();\n\n try (OutputStreamWriter outputStreamWriter = new OutputStreamWriter(conn.getOutputStream(), StandardCharsets.UTF_8)) {\n String payload = String.format(\"grant_type=%1$s&resource=%2$s&client_id=%3$s&username=%4$s&password=%5$s\",\n grantType,\n resourceId,\n clientId,\n username,\n password);\n outputStreamWriter.write(payload);\n }\n\n try (BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\n while((line = br.readLine()) != null) {\n jsonString.append(line);\n }\n }\n\n conn.disconnect();\n\n JsonObject res = new GsonBuilder()\n .create()\n .fromJson(jsonString.toString(), JsonObject.class);\n\n return res\n .get(\"access_token\")\n .toString()\n .replaceAll(\"\\\"\", \"\");\n\n } catch (IOException e) {\n throw new IllegalAccessError(\"Unable to read authorization response: \" + e.getLocalizedMessage());\n }\n }", "private void configureAccessTokens() {\n // read JOSSO gateway configuration\n int accessTokensExpiration = DEFAULT_ACCESS_TOKENS_EXPIRATION;\n InputStream jossoGatewayConfigurationStream = null;\n try {\n jossoGatewayConfigurationStream = new FileInputStream(JOSSO_GATEWAY_CONFIGURATION);\n Document jossoGatewayConfiguration = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(jossoGatewayConfigurationStream);\n XPathExpression maxInactiveIntervalXPath = XPathFactory.newInstance().newXPath().compile(\"/beans/session-manager/@maxInactiveInterval\");\n String maxInactiveInterval = (String)maxInactiveIntervalXPath.evaluate(jossoGatewayConfiguration, XPathConstants.STRING);\n if ((maxInactiveInterval != null) && (maxInactiveInterval.length() > 0)) {\n accessTokensExpiration = Integer.parseInt(maxInactiveInterval)*60;\n }\n } catch (Exception e) {\n log.error(\"Cannot read or parse configuration file \"+JOSSO_GATEWAY_CONFIGURATION+\": \"+e);\n } finally {\n if (jossoGatewayConfigurationStream != null) {\n try {\n jossoGatewayConfigurationStream.close();\n } catch (IOException ioe ) {\n }\n }\n }\n // create or reconfigure access tokens map with expiration\n if (accessTokens == null) {\n accessTokens = new ExpiringMap<String,AuthAccessInfo>(accessTokensExpiration, ACCESS_TOKENS_EXPIRATION_INTERVAL);\n } else {\n accessTokens.setTimeToLive(accessTokensExpiration);\n }\n }", "String generateUnitRenewalToken(Unit unit, Instant expiration);", "@Override\n\tpublic void setTokenExpiryTime(long arg0) {\n\t\t\n\t}", "@Override\n public void onTokenRefresh() {\n Log.d(\"MyInstanceIDService\", \"onTokenRefresh\");\n// new GCMDoRequest().execute(new GCMRequest(this, GCMCommand.GET_TOKEN));\n }", "@Override\n public AccessTokenInfo getAccessTokenByConsumerKey(String consumerKey) throws APIManagementException {\n AccessTokenInfo tokenInfo = new AccessTokenInfo();\n ApiMgtDAO apiMgtDAO = ApiMgtDAO.getInstance();\n\n APIKey apiKey;\n try {\n apiKey = apiMgtDAO.getAccessTokenInfoByConsumerKey(consumerKey);\n if (apiKey != null) {\n tokenInfo.setAccessToken(apiKey.getAccessToken()); \n tokenInfo.setConsumerSecret(apiKey.getConsumerSecret());\n tokenInfo.setValidityPeriod(apiKey.getValidityPeriod());\n tokenInfo.setScope(apiKey.getTokenScope().split(\"\\\\s\"));\n } else {\n tokenInfo.setAccessToken(\"\");\n //set default validity period\n tokenInfo.setValidityPeriod(3600);\n }\n tokenInfo.setConsumerKey(consumerKey);\n\n } catch (SQLException e) {\n handleException(\"Cannot retrieve information for the given consumer key : \"\n + consumerKey, e);\n } catch (CryptoException e) {\n handleException(\"Token decryption failed of an access token for the given consumer key : \"\n + consumerKey, e);\n }\n return tokenInfo;\n }", "private boolean _requiresLogin() {\n AccessToken accessToken = AccessToken.getCurrentAccessToken();\n if (accessToken == null) {\n return true;\n } else {\n return accessToken.isExpired();\n }\n }", "public void setTokenValidityInSeconds(long tokenValidityInSeconds) {\n this.tokenValidityInSeconds = tokenValidityInSeconds;\n }", "public static String getGCMToken() {\n String appVersion = AppUtils.getAppVersionName();\n String cacheKey = \"gcm_reg_id_\" + appVersion;\n return getSharedPreferences().getString(cacheKey, null);\n }", "@Override\n protected String doInBackground(Void... params) {\n credential = GoogleAccountCredential.usingOAuth2(activity,\n Collections.singleton(CalendarScopes.CALENDAR));\n SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(activity);\n Log.d(tag, \"Google account name: \" + sharedPref.getString(activity.getString(R.string.pref_key_google_account_name),\n null));\n credential.setSelectedAccountName(sharedPref.getString(activity.getString(R.string.pref_key_google_account_name),\n null));\n\n /* Getting Google Calendar client */\n com.google.api.services.calendar.Calendar client =\n new com.google.api.services.calendar.Calendar.Builder(transport, jsonFactory,\n credential).setApplicationName(activity.getString(R.string.app_name)).build();\n\n /* Asking user for choosing Google account */\n if (credential.getSelectedAccountName() == null) {\n activity.startActivityForResult(credential.newChooseAccountIntent(),\n ACCOUNT_REQUEST_CODE);\n retry = true;\n return null;\n }\n\n /* Asking user for permission if needed */\n try {\n Log.d(tag, \"Token: \" + GoogleAuthUtil.getToken(activity.getApplicationContext(),\n credential.getSelectedAccount(), credential.getScope()));\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (UserRecoverableAuthException e) {\n Log.d(tag, \"Need permission\");\n activity.startActivityForResult(e.getIntent(),PERMISSION_REQUEST_CODE);\n retry = true;\n return null;\n } catch (GoogleAuthException e) {\n e.printStackTrace();\n return null;\n }\n Log.d(tag, \"Permission OK\");\n\n Event event = new Event()\n .setSummary(meeting.name)\n .setLocation(meeting.location)\n .setDescription(meeting.notes);\n\n /* Parsing the meeting date */\n SimpleDateFormat dateFormatter = new SimpleDateFormat(\"MM/dd/yyyy-HH:mm\", Locale.ENGLISH);\n DateTime startDateTime;\n try {\n startDateTime = new DateTime(dateFormatter.parse(meeting.date\n + \"-\" + meeting.time).getTime());\n } catch (ParseException e) {\n e.printStackTrace();\n return null;\n }\n Log.d(tag, \"Parsing meeting date OK\");\n\n EventDateTime start = new EventDateTime()\n .setDateTime(startDateTime);\n event.setStart(start);\n\n EventDateTime end = new EventDateTime()\n .setDateTime(startDateTime);\n event.setEnd(end);\n\n /* Setting attendees list */\n ArrayList<Integer> ids = attendToRepo.getAttendeeIDs(meeting.meeting_ID);\n ArrayList<EventAttendee> attendees = new ArrayList<>();\n for (int id : ids){\n Attendee attendee = attendeeRepo.getAttendeeById(id);\n EventAttendee eventAttendee = new EventAttendee();\n eventAttendee.setDisplayName(attendee.name);\n\n /* Email is mandatory for the API request */\n eventAttendee.setEmail(attendee.name + activity.getString(R.string.google_calendar_email_example));\n attendees.add(eventAttendee);\n Log.d(tag, \"GoogleCalendarTask \" + attendee.name + \" added to attendees\");\n }\n event.setAttendees(attendees);\n\n EventReminder[] reminderOverrides = new EventReminder[] {\n new EventReminder().setMethod(\"popup\").setMinutes(10),\n };\n Event.Reminders reminders = new Event.Reminders()\n .setUseDefault(false)\n .setOverrides(Arrays.asList(reminderOverrides));\n event.setReminders(reminders);\n\n String calendarId = \"primary\";\n try {\n event = client.events().insert(calendarId, event).execute();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Log.d(tag, \"Event created link: \" + event.getHtmlLink());\n\n return event.getHtmlLink();\n }", "public java.lang.String getOauth_token(){\r\n return localOauth_token;\r\n }" ]
[ "0.6485897", "0.62527597", "0.6034796", "0.5953053", "0.590985", "0.5835783", "0.580166", "0.57781214", "0.577022", "0.5722362", "0.5676308", "0.56739193", "0.56638294", "0.5652085", "0.5652085", "0.564666", "0.5592949", "0.5576717", "0.55250376", "0.5514648", "0.54956955", "0.5488599", "0.5468137", "0.5462695", "0.5343403", "0.53158003", "0.5297113", "0.5295978", "0.52930504", "0.52882737", "0.5287708", "0.5280544", "0.52717197", "0.5268952", "0.5246195", "0.5236024", "0.52071536", "0.5197656", "0.51708895", "0.51654494", "0.5152076", "0.514517", "0.51420027", "0.51309294", "0.51214397", "0.509246", "0.50924265", "0.5086535", "0.50829774", "0.50806427", "0.50578827", "0.50538874", "0.50525826", "0.5051735", "0.5041129", "0.5035102", "0.5029466", "0.50167686", "0.4997468", "0.49926376", "0.49780327", "0.49661726", "0.49627477", "0.4944947", "0.4942083", "0.4941448", "0.493885", "0.4936794", "0.49361137", "0.49291515", "0.49290156", "0.49285445", "0.4917718", "0.4913412", "0.49110302", "0.48983032", "0.48886326", "0.48734877", "0.48731595", "0.4868524", "0.4863642", "0.48511508", "0.48438025", "0.48430538", "0.48383445", "0.4830022", "0.48215878", "0.48078611", "0.4806228", "0.48056433", "0.48049477", "0.48044693", "0.4801552", "0.47992802", "0.4794201", "0.4794023", "0.4792155", "0.478773", "0.4785472", "0.4784774", "0.47807044" ]
0.0
-1
on first submision you may request a refresh token
public String getRefreshToken(Credential credential) throws IOException, JSONException { String refreshToken = credential.getRefreshToken(); System.out.println(refreshToken); return refreshToken; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onTokenRefresh() {\n }", "private String refreshToken() {\n return null;\n }", "private void mtd_refresh_token() {\n RxClient.get(FeedActivity.this).Login(new loginreq(sharedpreferences.\n getString(SharedPrefUtils.SpEmail, \"\"),\n sharedpreferences.getString(SharedPrefUtils.SpPassword, \"\")), new Callback<loginresp>() {\n @Override\n public void success(loginresp loginresp, Response response) {\n\n if (loginresp.getStatus().equals(\"200\")){\n\n editor.putString(SharedPrefUtils.SpRememberToken,loginresp.getToken().toString());\n editor.commit();\n\n final Handler handler = new Handler();\n final Runnable runnable = new Runnable() {\n @Override\n public void run() {\n wbService(tmpansList);\n progressBar.setVisibility(View.INVISIBLE);\n }\n };\n handler.postDelayed(runnable, 500);\n\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n progressBar.setVisibility(View.INVISIBLE);\n Log.d(\"refresh token\", \"refresh token error\");\n Toast.makeText(FeedActivity.this, \"Service not response\",\n Toast.LENGTH_LONG).show();\n finish();\n }\n });\n\n }", "@Override\r\n public void onTokenRefresh() {\n App.sendToken();\r\n }", "protected boolean generateRefreshTokenOnRefreshRequest() {\n\t\treturn true;\n\t}", "@Test\n public void testRefreshToken() {\n ApplicationContext context =\n TEST_DATA_RESOURCE\n .getSecondaryApplication()\n .getBuilder()\n .client(ClientType.AuthorizationGrant, true)\n .bearerToken()\n .refreshToken()\n .build();\n OAuthToken t = context.getToken();\n\n String header = authHeaderBearer(t.getId());\n\n Response r = target(\"/token/private\")\n .request()\n .header(AUTHORIZATION, header)\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }", "private void refreshGoogleCalendarToken() {\n this.getGoogleToken();\n }", "@Override\n public String refresh() {\n\n // Override the existing token\n setToken(null);\n\n // Get the identityId and token by making a call to your backend\n // (Call to your backend)\n\n // Call the update method with updated identityId and token to make sure\n // these are ready to be used from Credentials Provider.\n\n update(identityId, token);\n return token;\n\n }", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n /*Log.d(\"Refreshed token\", \"Refreshed token: \" + refreshedToken);\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n final CollectionReference clients = FirebaseFirestore.getInstance().collection(\"Tokens\");\n Map<String, Object> data1 = new HashMap<>();\n data1.put(\"token\", refreshedToken);\n clients.document(\"Iamhere\").set(data1, SetOptions.merge());*/\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n //sendRegistrationToServer(refreshedToken);\n }", "protected boolean generateIdTokenOnRefreshRequest() {\n\t\treturn true;\n\t}", "public String getRefresh_token() {\r\n\t\treturn refresh_token;\r\n\t}", "public String getRefreshToken() {\r\n return refreshToken;\r\n }", "@Override\n public void onTokenRefresh() {\n Log.d(\"MyInstanceIDService\", \"onTokenRefresh\");\n// new GCMDoRequest().execute(new GCMRequest(this, GCMCommand.GET_TOKEN));\n }", "@Override\n public void onRequestToken() {\n Toast.makeText(getApplicationContext(), \"Your token has expired\", Toast.LENGTH_LONG).show();\n Log.i(\"Video_Call_Tele\", \"The token as expired..\");\n // mRtcEngine.renewToken(token);\n // https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#af1428905e5778a9ca209f64592b5bf80\n // Renew token - TODO\n }", "private void refreshAccessToken() throws IOException {\n\n if (clientId == null) fetchOauthProperties();\n\n URL url = new URL(tokenURI);\n\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"refresh_token\", refreshToken);\n params.put(\"client_id\", clientId);\n params.put(\"client_secret\", clientSecret);\n params.put(\"grant_type\", \"refresh_token\");\n\n String response = HttpUtils.getInstance().doPost(url, params);\n JsonParser parser = new JsonParser();\n JsonObject obj = parser.parse(response).getAsJsonObject();\n\n JsonPrimitive atprim = obj.getAsJsonPrimitive(\"access_token\");\n if (atprim != null) {\n accessToken = obj.getAsJsonPrimitive(\"access_token\").getAsString();\n expirationTime = System.currentTimeMillis() + (obj.getAsJsonPrimitive(\"expires_in\").getAsInt() * 1000);\n fetchUserProfile();\n } else {\n // Refresh token has failed, reauthorize from scratch\n reauthorize();\n }\n\n }", "public String getRefreshToken() {\n\t\treturn refreshToken;\n\t}", "private void requestToken(){\n APIAuth auth = new APIAuth(this.prefs.getString(\"email\", \"\"), this.prefs.getString(\"password\", \"\"), this.prefs.getString(\"fname\", \"\") + \" \" +this.prefs.getString(\"lname\", \"\"), this.prefs, null);\n auth.authenticate();\n }", "public RefreshToken generateRefreshToken(){\n RefreshToken refreshToken = new RefreshToken();\n //Creates a 128bit random UUID. This serves as our refresh token\n refreshToken.setToken(UUID.randomUUID().toString());\n //Set creation timestampt\n refreshToken.setCreatedDate(Instant.now());\n\n return refreshTokenRepository.save(refreshToken);\n }", "@Override\n public void onTokenRefresh(){\n // start Gcm registration service\n Intent intent = new Intent(this, GcmRegistrationIntentService.class);\n startService(intent);\n }", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n\n saveToken(refreshedToken);\n sendRegistrationToServer(refreshedToken);\n }", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Timber.d(\"Refreshed token: \" + refreshedToken);\n }", "@Override\n\tpublic OauthAccessToken acquireOauthRefreshToken(String refreshToken) \n\t{\n\t\t\n\t\tString url = WeChatConst.WECHATOAUTHURL+WeChatConst.OAUTHREFRESHTOKENURI;\n\t\tMap<String, String> param = new HashMap<String, String>();\n\t\tparam.put(\"appid\", WeChatConst.APPID);\n\t\tparam.put(\"grant_type\", \"refresh_token\");\n\t\tparam.put(\"refresh_token\", refreshToken);\n\t\tString response = HttpClientUtils.doGetWithoutHead(url, param);\n\t\tlog.debug(\" acquireOauthRefreshToken response :\"+response);\n\t\ttry {\n\t\t\tJSONObject responseJson = JSONObject.parseObject(response);\n\t\t\tOauthAccessToken authAccessToken = new OauthAccessToken();\n\t\t\tif(!responseJson.containsKey(\"errcode\"))\n\t\t\t{\n\t\t\t\tauthAccessToken.setAccessToken(responseJson.getString(\"access_token\"));\n\t\t\t\tauthAccessToken.setExpiresIn(responseJson.getString(\"exoires_in\"));\n\t\t\t\tauthAccessToken.setOpenId(responseJson.getString(\"openid\"));\n\t\t\t\tauthAccessToken.setScope(responseJson.getString(\"scope\"));\n\t\t\t\treturn authAccessToken;\n\t\t\t}\n\t\t\treturn null;\n\t\t} catch (Exception e) {\n\t\t\tlog.error(e);\n\t\t}\n\t\treturn null;\n\t}", "public String refreshToken(String token) {\n\t\tString refreshedToken;\n\t\ttry {\n\t\t\tfinal Claims claims = this.getClaimsFromToken(token);\n\t\t\tclaims.put(\"created\", this.generateCurrentDate());\n\t\t\trefreshedToken = this.generateToken(claims);\n\t\t} catch (Exception e) {\n\t\t\trefreshedToken = null;\n\t\t}\n\t\treturn refreshedToken;\n\t}", "@Override\n public void onTokenRefresh() {\n String token = FirebaseInstanceId.getInstance().getToken();\n registerToken(token);\n }", "@Override\n\tprotected RefreshToken doCreateNewRefreshToken(ServerAccessToken at) {\n\t\tRefreshToken refreshToken = super.doCreateNewRefreshToken(at);\n\t\trefreshToken.setTokenKey(\"RT:\" + UUID.randomUUID().toString());\n\t\trefreshToken.setExpiresIn(Oauth2Factory.REFRESH_TOKEN_EXPIRED_TIME_SECONDS);\n\t\t\n\t\tif (log.isDebugEnabled()) {\n\t\t\ttry {\n\t\t\t\tlog.debug(\"RefreshToken={}\", OBJECT_MAPPER.writeValueAsString(refreshToken));\n\t\t\t} catch (JsonProcessingException e) {\n\t\t\t\tlog.error(e.getMessage(), e);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn refreshToken;\n\t}", "@Override\n public void onTokenRefresh() {\n\n //Getting registration token\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n\n //Displaying token on logcat\n Log.e(TAG, \"Refreshed token: \" + refreshedToken);\n\n //calling the method store token and passing token\n storeToken(refreshedToken);\n }", "public String refreshToken(String token) {\n String refreshedToken;\n try {\n final Claims claims = this.getClaimsFromToken(token);\n claims.put(CREATED, dateUtil.getCurrentDate());\n refreshedToken = this.generateToken(claims);\n } catch (Exception e) {\n refreshedToken = null;\n }\n return refreshedToken;\n }", "private void hasRefreshToken() {\n\n /* Attempt to get a user and acquireTokenSilently\n * If this fails we will do an interactive request\n */\n List<User> users = null;\n try {\n User currentUser = Helpers.getUserByPolicy(sampleApp.getUsers(), Constants.SISU_POLICY);\n\n if (currentUser != null) {\n /* We have 1 user */\n boolean forceRefresh = true;\n sampleApp.acquireTokenSilentAsync(\n scopes,\n currentUser,\n String.format(Constants.AUTHORITY, Constants.TENANT, Constants.SISU_POLICY),\n forceRefresh,\n getAuthSilentCallback());\n } else {\n /* We have no user for this policy*/\n updateRefreshTokenUI(false);\n }\n } catch (MsalClientException e) {\n /* No token in cache, proceed with normal unauthenticated app experience */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n\n } catch (IndexOutOfBoundsException e) {\n Log.d(TAG, \"User at this position does not exist: \" + e.toString());\n }\n }", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n try {\n sendNewTokenToServer(refreshedToken);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected void createIdTokenForRefreshRequest() {\n\t\tgenerateIdTokenClaims();\n\n\t\taddAtHashToIdToken();\n\n\t\taddCustomValuesToIdTokenForRefreshResponse();\n\n\t\tsignIdToken();\n\n\t\tcustomizeIdTokenSignatureForRefreshResponse();\n\n\t\tencryptIdTokenIfNecessary();\n\t}", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n if (refreshedToken != null) {\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n sendTokenToServer(refreshedToken);\n }\n }", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n SharedPreferences settings =\n getSharedPreferences(PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(PREF_FIREBASE_TOKEN, refreshedToken);\n editor.apply();\n }", "String getAuthorizerRefreshToken(String appId);", "@Override\n public void onTokenRefresh(){\n if (FirebaseAuth.getInstance().getCurrentUser() != null) {\n String token = FirebaseInstanceId.getInstance().getToken();\n Log.v(TAG, \"success in getting instance \"+ token);\n onSendRegistrationToServer(token);\n }\n }", "public void refreshToken(\n final ServiceClientCompletion<ResponseResult> completion)\n {\n // Create request headers.\n final HashMap<String, String> headers = new HashMap<String, String>(2);\n headers.put(\"Authorization\", AUTHORIZATION_HEADER);\n headers.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\n // Create request parameters.\n final HashMap<String, String> parameters =\n new HashMap<String, String>(2);\n parameters.put(\"grant_type\", \"refresh_token\");\n parameters.put(\"refresh_token\", mSharecareToken.refreshToken);\n\n this.beginRequest(REFRESH_TOKEN_ENDPOINT, ServiceMethod.GET, headers,\n parameters, (String)null, ServiceResponseFormat.GSON,\n new ServiceResponseTransform<JsonElement, ResponseResult>()\n {\n @Override\n public ResponseResult transformResponseData(\n final JsonElement json)\n throws ServiceResponseTransformException\n {\n final ResponseResult result =\n checkResultFromAuthService(json);\n if (result.success)\n {\n final boolean success =\n setSharecareToken(json,\n mSharecareToken.askMDProfileCreated,\n mSharecareToken.preProfileCreation);\n if (success)\n {\n final HashMap<String, Object> parameters =\n new HashMap<String, Object>(1);\n parameters.put(\"newAccessToken\",\n mSharecareToken.accessToken);\n result.parameters = parameters;\n }\n }\n\n LogError(\"refreshToken\", result);\n return result;\n }\n }, completion);\n }", "@Override\n public void onTokenRefresh() {\n // Get updated InstanceID token.\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(\"Refreshed token: \" + refreshedToken);\n sendRegistrationToServer(refreshedToken);\n }", "@Override\n public void onTokenRefresh() {\n // Fetch updated Instance ID token and notify our app's server of any changes (if applicable).\n startService(new Intent(this, RegistrationIntentService.class));\n }", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(\"myToken\", \"Refreshed token: \" + refreshedToken);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n //sendRegistrationToServer(refreshedToken);\n getApplicationContext().sendBroadcast(new Intent(broadcast));\n SharedPrefManager.getInstance(getApplicationContext()).storeToken(refreshedToken);\n }", "@GetMapping(value = \"/token/refresh\")\n public void refreshToken (HttpServletRequest request, HttpServletResponse response) throws IOException {\n String authorizationHeader = request.getHeader(AUTHORIZATION);\n if(authorizationHeader!=null && authorizationHeader.startsWith(\"Bearer \")){\n\n try {\n String refreshToken = authorizationHeader.substring(\"Bearer \".length());\n Algorithm algorithm = Algorithm.HMAC256(\"secret\".getBytes());\n JWTVerifier verifier = JWT.require(algorithm).build();\n DecodedJWT decodedJWT = verifier.verify(refreshToken);\n String userName = decodedJWT.getSubject();\n User user = userRepo.findByUserName(userName);\n\n String accessToken = JWT.create()\n .withSubject(user.getUserName())\n .withExpiresAt(new Date(System.currentTimeMillis()+ 10*60*1000))\n .withIssuer(request.getRequestURL().toString())\n .withClaim(\"roles\", user.getRoles().stream().map(Role::getRoleName).collect(Collectors.toList()))\n .sign(algorithm);\n\n\n\n Map<String , String> tokens = new HashMap<>();\n tokens.put(\"accessToken\",accessToken);\n tokens.put(\"refreshToken\",refreshToken);\n response.setContentType(APPLICATION_JSON_VALUE);\n new ObjectMapper().writeValue(response.getOutputStream(),tokens);\n\n }catch (Exception exception){\n\n response.setHeader(\"Error\", exception.getMessage());\n response.setStatus(FORBIDDEN.value());\n //response.sendError(FORBIDDEN.value());\n\n Map<String , String> error = new HashMap<>();\n error.put(\"errorMsg\",exception.getMessage());\n response.setContentType(APPLICATION_JSON_VALUE);\n new ObjectMapper().writeValue(response.getOutputStream(),error);\n }\n\n }else {\n throw new RuntimeException(\"Refresh token is missing\");\n }\n }", "@Override\n\tprotected Object refreshTokenGrantType(String requestId) {\n\t\treceivedRefreshRequest = true;\n\t\tvalidateRefreshRequest();\n\n\t\t//this must be after EnsureScopeInRefreshRequestContainsNoMoreThanOriginallyGranted is called\n\t\tcallAndStopOnFailure(ExtractScopeFromTokenEndpointRequest.class);\n\n\t\tgenerateAccessToken();\n\n\t\tif(generateIdTokenOnRefreshRequest()) {\n\t\t\tcreateIdTokenForRefreshRequest();\n\t\t}\n\n\t\tcreateRefreshToken(true);\n\n\t\tcallAndStopOnFailure(CreateTokenEndpointResponse.class);\n\n\t\tcall(exec().unmapKey(\"token_endpoint_request\").endBlock());\n\n\t\treturn new ResponseEntity<Object>(env.getObject(\"token_endpoint_response\"), HttpStatus.OK);\n\t}", "@Override\n public void onTokenRefresh() {\n final String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n\n //To displaying token on logcat\n Log.w(\"TOKEN: \", refreshedToken);\n\n SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFERENCE_FILE, MODE_PRIVATE);\n final Long userId = sharedPreferences.getLong(\"userId\", 0L);\n\n if (!userId.equals(0L)){\n\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"firebaseToken\", refreshedToken);\n editor.apply();\n\n Handler handler = new Handler(this.getMainLooper());\n\n Runnable runnable = new Runnable() {\n @Override\n public void run() {\n\n // Update token for this user\n UserTask<Void> userTask = new UserTask<>(userId);\n userTask.setFirebaseToken(refreshedToken);\n userTask.execute(\"refreshFirebaseToken\");\n\n }\n };\n\n handler.post(runnable);\n\n }\n\n }", "public ResponseEntity<OAuth2AccessToken> refreshToken(HttpServletRequest request, HttpServletResponse response, Map<String, String> params) {\n \n \ttry {\n \t\tString refreshToken = params.get(\"refreshToken\");\n\t OAuth2AccessToken accessToken = authorizationClient.sendRefreshGrant(refreshToken);\n\t return ResponseEntity.ok(accessToken);\n } catch (Exception ex) {\n log.error(\"failed to get OAuth2 tokens from UAA\", ex);\n throw ex;\n }\n\n }", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n sendRegistrationToServer(refreshedToken);\n }", "@Override\n public void onTokenRefresh() {\n\n String token = FirebaseInstanceId.getInstance().getToken();\n CTOKEN = token;\n\n// if(sgen.ID != \"\") {\n// String query = \"UPDATE USER_DETAILS SET FTOKEN = '\"+token+\"' WHERE ID = '\"+sgen.ID+\"'; \";\n// ArrayList<Team> savedatateam = servicesRequest.save_data(query);\n// sgen.FTOKEN = token;\n// }\n\n\n // Once the token is generated, subscribe to topic with the userId\n// if(sgen.ATOKEN.equals(sgen.CTOKEN)) {\n try {\n FirebaseMessaging.getInstance().subscribeToTopic(SUBSCRIBE_TO);\n Log.i(TAG, \"onTokenRefresh completed with token: \" + token);\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n// }\n\n\n /* sendRegistrationToServer(refreshedToken);*/\n }", "@Override\n public void onTokenRefresh() {\n // Get updated InstanceID token.\n device_id = Settings.Secure.getString(this.getContentResolver(),\n Settings.Secure.ANDROID_ID);\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n\n //**************need to modify the code such that it can update exisiting user data***********************\n sendRegistrationToServer(refreshedToken);\n //**************need to modify the code such that it can update exisiting user data***********************\n }", "public String generateNewAccessToken(String refresh_token) throws SocketTimeoutException, IOException, Exception{\n String newAccessToken = \"\";\n JSONObject jsonReturn = new JSONObject();\n JSONObject tokenRequestParams = new JSONObject();\n tokenRequestParams.element(\"refresh_token\", refresh_token);\n if(currentRefreshToken.equals(\"\")){\n //You must read in the properties first!\n Exception noProps = new Exception(\"You must read in the properties first with init(). There was no refresh token set.\");\n throw noProps;\n }\n else{\n try{\n URL rerum = new URL(Constant.RERUM_ACCESS_TOKEN_URL);\n HttpURLConnection connection = (HttpURLConnection) rerum.openConnection();\n connection.setRequestMethod(\"POST\"); \n connection.setConnectTimeout(5*1000); \n connection.setDoOutput(true);\n connection.setDoInput(true);\n connection.setRequestProperty(\"Content-Type\", \"application/json\");\n connection.connect();\n DataOutputStream outStream = new DataOutputStream(connection.getOutputStream());\n //Pass in the user provided JSON for the body \n outStream.writeBytes(tokenRequestParams.toString());\n outStream.flush();\n outStream.close(); \n //Execute rerum server v1 request\n BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(),\"utf-8\"));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null){\n //Gather rerum server v1 response\n sb.append(line);\n }\n reader.close();\n jsonReturn = JSONObject.fromObject(sb.toString());\n newAccessToken = jsonReturn.getString(\"access_token\");\n }\n catch(java.net.SocketTimeoutException e){ //This specifically catches the timeout\n System.out.println(\"The Auth0 token endpoint is taking too long...\");\n jsonReturn = new JSONObject(); //We were never going to get a response, so return an empty object.\n jsonReturn.element(\"error\", \"The Auth0 endpoint took too long\");\n throw e;\n }\n }\n setAccessToken(newAccessToken);\n writeProperty(\"access_token\", newAccessToken);\n return newAccessToken;\n }", "@Transient\n\tpublic String getRefreshToken() {\n\t\treturn refreshToken;\n\t}", "OAuth2Token getToken();", "@Override\n\tprotected boolean isRefreshTokenSupported(List<String> theScopes) {\n\t\tlog.debug(\"Always generate refresh token\");\n\t\treturn true;\n\t}", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"REFRESHED TOKEN: \" + refreshedToken);\n JSONObject jsonbody = new JSONObject();\n try {\n jsonbody.put(\"UserID\",App.profileModel.UserID);\n jsonbody.put(\"GCMToken\",refreshedToken);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if(refreshedToken != null)\n HttpCaller\n .getInstance()\n .updateGCMToken(\n jsonbody,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject o) {\n try {\n if(!o.getBoolean(\"Status\")) {\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError volleyError) {\n }\n },true);\n\n\n\n\n prefs = Prefs.getInstance();\n Gson gson = new Gson();\n userPrefsInance = prefs.init(getApplicationContext());\n userPrefsInance.edit().putString(prefs.GCM_TOKEN,refreshedToken);\n\n App.profileModel.GCMToken = refreshedToken;\n\n if(App.profileModel.UserID > 0) {\n HttpCaller.\n getInstance().\n updateGCMToken(\n null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject o) {\n try {\n if (!o.getBoolean(\"Status\")) {\n //Helper.showToast(\"Failed to update notification device token.\", ToastStyle.ERROR);\n\n }\n } catch (JSONException e) {\n e.printStackTrace();\n //Helper.showToast(\"Failed to update notification device token.\", ToastStyle.ERROR);\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError volleyError) {\n //Helper.showToast(\"Failed to update notification device token.\", ToastStyle.ERROR);\n\n }\n },true);\n }\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n }", "@Nullable\n public String getRefreshToken() {\n return refreshToken;\n }", "@SuppressWarnings(\"unused\")\n private static String getRefreshToken() throws IOException {\n String client_id = System.getenv(\"PICASSA_CLIENT_ID\");\n String client_secret = System.getenv(\"PICASSA_CLIENT_SECRET\");\n \n // Adapted from http://stackoverflow.com/a/14499390/1447621\n String redirect_uri = \"http://localhost\";\n String scope = \"http://picasaweb.google.com/data/\";\n List<String> scopes;\n HttpTransport transport = new NetHttpTransport();\n JsonFactory jsonFactory = new JacksonFactory();\n\n scopes = new LinkedList<String>();\n scopes.add(scope);\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, client_id, client_secret, scopes).build();\n GoogleAuthorizationCodeRequestUrl url = flow.newAuthorizationUrl();\n url.setRedirectUri(redirect_uri);\n url.setApprovalPrompt(\"force\");\n url.setAccessType(\"offline\");\n String authorize_url = url.build();\n \n // paste into browser to get code\n System.out.println(\"Put this url into your browser and paste in the access token:\");\n System.out.println(authorize_url);\n \n Scanner scanner = new Scanner(System.in);\n String code = scanner.nextLine();\n scanner.close();\n\n flow = new GoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, client_id, client_secret, scopes).build();\n GoogleTokenResponse res = flow.newTokenRequest(code).setRedirectUri(redirect_uri).execute();\n String refreshToken = res.getRefreshToken();\n String accessToken = res.getAccessToken();\n\n System.out.println(\"refresh:\");\n System.out.println(refreshToken);\n System.out.println(\"access:\");\n System.out.println(accessToken);\n return refreshToken;\n }", "@Override\n public void onTokenRefresh() {\n\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n\n // TODO: 13/6/2017 Persistir token en archivo XML.\n sharedPreferences = getSharedPreferences(\"datos\",MODE_PRIVATE);\n SharedPreferences.Editor edit = sharedPreferences.edit();\n edit.putString(String.valueOf(R.string.token),refreshedToken);\n edit.commit();\n\n\n }", "@Override\n public void onTokenRefresh() {\n String token = FirebaseInstanceId.getInstance().getToken();\n\n addRegistrationToFireDb(token);\n }", "@Override\n public void onTokenRefresh() {\n // Fetch updated Instance ID token and notify of changes\n Intent intent = new Intent(this, RegistrationIntentService.class);\n intent.putExtra(\"SOURCE\", \"GCM\");\n startService(intent);\n }", "public void refreshToken() throws ServiceUnavailableException {\n int retryTime = 0;\n // refresh the access token\n while (true) {\n try {\n this.authResult = getAccessToken();\n break;// refresh token successfully\n } catch (ServiceUnavailableException e) {\n if (retryTime < conf.getMaxRetryTimes()) {\n retryTime++;\n try {\n Thread.sleep(conf.getIntervalTime());\n } catch (InterruptedException e1) {\n // ignore\n }\n continue;// retry to refresh token\n }\n throw e;// failed to refresh token after retry\n }\n\n }\n }", "@Override\r\n\tpublic String refreshToken() throws OAuthSystemException {\n\t\treturn null;\r\n\t}", "@GET\n @Path(\"refresh\")\n public Response refreshUser() {\n\t\tJwtHandler jwth = (JwtHandler) servletContext.getAttribute(ApplicationResources.JWT_HANDLER_ATTR);\n\t\tString bearer = (String) req.getAttribute(BEARER); \n\t\t\n\t\t\t\t\t\t\t// Authz does not require, nor validate, the JWT. \n\t\t\t\t\t\t\t// This dummy call just retrieves any item from the JWT which with through exception if already expired\n\t\ttry {\n\t\t\tjwth.getClaimString(bearer, JwtHandler.USERNAME);\n\t\t\treturn Response.ok(null, MediaType.APPLICATION_JSON).build();\n\t\t} catch (AuthzException e) {\n\t\t\tErrorResponse response = new ErrorResponse(\"Session Expired.\", \"Please login.\", 409);\n\t\t\treturn Response.status(Response.Status.CONFLICT).type(MediaType.APPLICATION_JSON).entity(response).build();\t\n\t\t}\n\n }", "public void checkToRefreshToken(\n final ServiceClientCompletion<ResponseResult> completion)\n {\n final long timeDiff =\n mSharecareToken.expiresIn.getTime() - new Date().getTime();\n final long timeDiffInMin = TimeUnit.MILLISECONDS.toMinutes(timeDiff);\n if (timeDiffInMin < TIME_LIMIT_IN_MINUTES)\n {\n refreshToken(completion);\n }\n else if (completion != null)\n {\n completion.onCompletion(ServiceResultStatus.CANCELLED, 0, null);\n }\n }", "public Object refresh(HttpServletRequest request)\n throws OAuthProblemException, OAuthSystemException {\n try {\n\n OAuthTokenRequest oauthRequest = new OAuthTokenRequest(request);\n OAuthAuthzParameters oAuthAuthzParameters = new OAuthAuthzParameters(oauthRequest);\n String refreshToken = oauthRequest.getRefreshToken();\n\n if (!oAuthService.checkRefreshFrequency(refreshToken)) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_FREQUENCY))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_FRESH_FREQUENCY)\n .buildJSONMessage();\n logger.warn(\"refresh token {} too frequent, context: {}\", refreshToken, oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n // check token\n RefreshToken token = oAuthService.getRefreshToken(refreshToken);\n if (token == null) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_REQUEST))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_FRESH_TOKEN)\n .buildJSONMessage();\n logger.warn(\"invalid refresh token {}, context: {}\", refreshToken, oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n // check the client id and the token client id\n if (!token.getClientId().equals(oauthRequest.getClientId())) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT_INFO))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_CLIENT_DESCRIPTION)\n .buildJSONMessage();\n logger.info(\"invalid client id {} and {}, context: {}\", token.getClientId(), oauthRequest.getClientId(), oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n // check client id\n Client openOauthClients = oAuthService.getClientByClientId(oauthRequest.getClientId());\n if (openOauthClients == null) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_CLIENT_DESCRIPTION)\n .buildJSONMessage();\n logger.info(\"can not get client, context: {}\", oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n if (!openOauthClients.getGrantTypes().contains(Constants.OAUTH_REFRESH_TOKEN)) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT_INFO))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_GRANT_TYPE)\n .buildJSONMessage();\n logger.info(\"no grant type, context: {}\", oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n // check client secret\n if (!openOauthClients.getClientSecret().equals(oauthRequest.getClientSecret())) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT_INFO))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_CLIENT_DESCRIPTION)\n .buildJSONMessage();\n logger.info(\"invalid secret: {}, context: {}\", openOauthClients.getClientSecret(), oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n // check token time\n if (!AppUtils.checkBefore(token.getExpires())) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.NO_OR_EXPIRED_TOKEN))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_FRESH_TOKEN)\n .buildJSONMessage();\n logger.info(\"token is expired: {}, context: {}\", token.getId(), oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n OAuthIssuerImpl oAuthIssuer = new OAuthIssuerImpl(new UUIDValueGeneratorEx());\n String accessToken = oAuthIssuer.accessToken();\n\n oAuthAuthzParameters.setUserId(token.getUserId());\n\n if (StringUtils.isEmpty(oAuthAuthzParameters.getScope())) {\n oAuthAuthzParameters.setScope(openOauthClients.getDefaultScope());\n } else {\n oAuthAuthzParameters.setScope(\n OAuthUtils.encodeScopes(\n oAuthService.getRetainScopes(\n openOauthClients.getDefaultScope(),\n oAuthAuthzParameters.getScope()\n )\n )\n );\n }\n\n /**\n * limit client access token number\n */\n int limitNum = openOauthClients.getClientNum();\n limitNum = limitNum > 0 ? limitNum - 1 : limitNum;\n oAuthService.limitAccessToken(oAuthAuthzParameters.getClientId(),\n oAuthAuthzParameters.getUserId(), limitNum);\n\n oAuthService.saveAccessToken(accessToken, oAuthAuthzParameters);\n\n OAuthResponse response = OAuthASResponseEx\n .tokenResponse(HttpServletResponse.SC_OK)\n .setTokenType(\"uuid\")\n .setAccessToken(accessToken)\n .setRefreshToken(refreshToken)\n .setExpiresIn(String.valueOf(appConfig.tokenAccessExpire))\n .setScope(oAuthAuthzParameters.getScope())\n .buildJSONMessage();\n logger.info(\"response access token: {}, context: {}\", accessToken, oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n } catch (OAuthProblemException e) {\n logger.error(\"oauth problem exception\", e);\n OAuthResponse res = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_REQUEST))\n .setErrorDescription(e.getMessage())\n .buildJSONMessage();\n return new ResponseEntity<String>(res.getBody(), HttpStatus.valueOf(res.getResponseStatus()));\n }\n }", "@Override\n public void run() {\n UserTask<Void> userTask = new UserTask<>(userId);\n userTask.setFirebaseToken(refreshedToken);\n userTask.execute(\"refreshFirebaseToken\");\n\n }", "public interface TokenProvider {\n /**\n * @return an always valid access token.\n */\n String getAccessToken();\n\n /**\n * Forces a refresh of all tokens.\n *\n * @return the newly refreshed access token.\n */\n String refreshTokens();\n}", "void setAuthorizerRefreshToken(String appId, String authorizerRefreshToken);", "String refreshTokens();", "public java.lang.String getOauth_token(){\r\n return localOauth_token;\r\n }", "private String issueRefreshToken(UUID user, String deviceName) {\n String token = UUID.randomUUID().toString();\n String hash = BCrypt.hashpw(token, BCrypt.gensalt());\n\n dao.updateToken(user, deviceName, hash);\n\n return token;\n }", "Observable<Session> getByValidRefreshToken(String token, Date now);", "public String generateRefreshToken(ApplicationUser user) {\n Date expiryDate = java.sql.Date.valueOf(LocalDate.now().plusDays(jwtConfig.getRefreshExpirationDateInMs()));\n return Jwts.builder()\n .setSubject(user.getUser().getUsername())\n .claim(\"authorities\", user.getAuthorities())\n .setIssuedAt(new Date(System.currentTimeMillis()))\n .setExpiration(expiryDate)\n .signWith(jwtSecretKey.secretKey())\n .compact();\n }", "@Api(1.0)\n @NonNull\n public String getRefreshToken() {\n return mRefreshToken;\n }", "public boolean refreshToken(ClientDataMgr clientDataMgr) {\n try {\n System.out.println(\"refreshing token...\");\n\n if (clientId == null || clientSecret == null) {\n LOG.log(Level.SEVERE, \"missing client id or secret\");\n System.out.println(\"missing client id or secret in application.properties\");\n clientDataMgr.drop();\n return false;\n }\n String response = netUtils.post(authEndpoint,\n \"refresh_token=\" + clientDataMgr.getRefreshToken()\n + \"&client_id=\" + clientId\n + \"&client_secret=\" + clientSecret\n + \"&grant_type=refresh_token\");\n\n if (response == null) {\n LOG.log(Level.FINE, \"refresh token failed\");\n System.out.println(\"refresh token failed.\");\n clientDataMgr.drop();\n return false;\n }\n\n JSONParser j = new JSONParser();\n JSONObject jobj = (JSONObject) j.parse(response);\n if (!isValidRefreshResp(jobj)) {\n LOG.log(Level.WARNING, \"invalid token refresh resp\");\n System.out.println(\"refresh token failed.\");\n clientDataMgr.drop();\n return false;\n }\n\n clientDataMgr.loadFromJson(jobj);\n clientDataMgr.persist();\n return true;\n\n } catch (ParseException e) {\n LOG.log(Level.WARNING, \"google auth response parse failed\");\n }\n return false;\n }", "@Override\n public void onTokenRefresh() {\n try {\n if (Build.VERSION.SDK_INT < 26) {\n LeanplumNotificationHelper.startPushRegistrationService(this, \"GCM\");\n } else {\n LeanplumNotificationHelper.scheduleJobService(this,\n LeanplumGcmRegistrationJobService.class, LeanplumGcmRegistrationJobService.JOB_ID);\n }\n } catch (Throwable t) {\n Log.e(\"Failed to update GCM token.\", t);\n }\n }", "@PostMapping(\"/refreshJwtToken\")\n public ResponseEntity<TokenRefreshResponse> postRefreshToken(@Valid @RequestBody TokenRefreshRequest request) {\n TokenRefreshResponse tokenRefreshResponse = this.authenticationService.getRefreshedToken(request);\n return ResponseEntity.ok(tokenRefreshResponse);\n }", "public void setRefreshToken(String refreshToken) {\n\t\tthis.refreshToken = refreshToken;\n\t}", "private void allowForRefreshToken(ApplicationUser user, HttpServletRequest request) {\n UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken = new UsernamePasswordAuthenticationToken(\n null, null, null);\n SecurityContextHolder.getContext().setAuthentication(usernamePasswordAuthenticationToken);\n request.setAttribute(\"user\", user);\n }", "@Override\n public void onNewToken(String token) {\n Log.d(TAG, \"Refreshed token: \" + token);\n\n }", "void onGetTokenSuccess(AccessTokenData token);", "@Override\n public RefreshToken getRefreshToken(String refreshTokenCode) {\n if (log.isTraceEnabled()) {\n log.trace(\"Looking for the refresh token: \" + refreshTokenCode + \" for an authorization grant of type: \"\n + getAuthorizationGrantType());\n }\n return refreshTokens.get(TokenHashUtil.hash(refreshTokenCode));\n }", "@PostMapping(value = \"/refresh\")\n\tpublic ResponseEntity<UserTokenState> refreshAuthenticationToken(HttpServletRequest request) {\n\n\t\tString token = tokenUtils.getToken(request);\n\t\tString username = this.tokenUtils.getUsernameFromToken(token);\n\t\tUser user = (User) this.userDetailsService.loadUserByUsername(username);\n\n\t\tif (this.tokenUtils.canTokenBeRefreshed(token, user.getLastResetPasswordDate())) {\n\t\t\tString refreshedToken = tokenUtils.refreshToken(token);\n\t\t\tint expiresIn = tokenUtils.getExpiredIn();\n\n\t\t\treturn ResponseEntity.ok(new UserTokenState(refreshedToken, expiresIn, user));\n\t\t} else {\n\t\t\tUserTokenState userTokenState = new UserTokenState();\n\t\t\treturn ResponseEntity.badRequest().body(userTokenState);\n\t\t}\n\t}", "private void retrieveAccessToken() {\n Log.d(TAG, \"at retreiveAccessToken\");\n String accessURL = TWILIO_ACCESS_TOKEN_SERVER_URL + \"&identity=\" + \"1234\" + \"a\";\n Log.d(TAG, \"accessURL \" + accessURL);\n Ion.with(this).load(accessURL).asString().setCallback(new FutureCallback<String>() {\n @Override\n public void onCompleted(Exception e, String accessToken) {\n if (e == null) {\n Log.d(TAG, \"Access token: \" + accessToken);\n MainActivity.this.accessToken = accessToken;\n registerForCallInvites();\n } else {\n Toast.makeText(MainActivity.this,\n \"Error retrieving access token. Unable to make calls\",\n Toast.LENGTH_LONG).show();\n Log.d(TAG, e.toString());\n }\n }\n });\n }", "public RefreshToken createRefreshToken() {\n RefreshToken refreshToken = new RefreshToken();\n refreshToken.setExpiryDate(Instant.now().plusMillis(refreshTokenDurationMs));\n refreshToken.setToken(Util.generateRandomUuid());\n refreshToken.setRefreshCount(0L);\n return refreshToken;\n }", "GetToken.Req getGetTokenReq();", "@Override\n public RefreshToken getRefreshToken(String refreshTokenCode) {\n if (LOGGER.isTraceEnabled()) {\n LOGGER.trace(\"Looking for the refresh token: \" + refreshTokenCode\n + \" for an authorization grant of type: \" + getAuthorizationGrantType());\n }\n\n return refreshTokens.get(refreshTokenCode);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if(requestCode==request_Code){\n AuthenticationResponse response = AuthenticationClient.getResponse(resultCode,data);\n if(response.getType()==AuthenticationResponse.Type.TOKEN){\n accessToken = response.getAccessToken();\n }else{\n }\n }\n new SpotifyNewRelease(accessToken).execute();\n }", "public boolean refreshTokenKey() {\n\t\tOptional<String> apiGetTokenKeyURLOptional = ConfigPropertiesFileUtils.getValue(\"mail.api.url.getTokenKey\");\n\t\tif (!apiGetTokenKeyURLOptional.isPresent()) {\n\t\t\tLOGGER.error(\"mail.api.url.getTokenKey not exist\");\n\t\t\treturn false;\n\t\t}\n\t\tHttpClient httpClient = HttpClientBuilder.create().build();\n\t\tHttpPost request = new HttpPost(apiGetTokenKeyURLOptional.get().trim());\n\t\trequest.addHeader(\"Content-Type\", \"application/json\");\n\t\ttry {\n\t\t\tHttpResponse httpResponse = httpClient.execute(request);\n\t\t\tif (httpResponse.getStatusLine().getStatusCode() != 200) {\n\t\t\t\tLOGGER.error(\"Fail to get Token Key: \"\n\t\t\t\t\t\t+ IOUtils.toString(httpResponse.getEntity().getContent(), Charset.forName(\"UTF-8\")));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tString contentJsonString = IOUtils.toString(httpResponse.getEntity().getContent(),\n\t\t\t\t\tCharset.forName(\"UTF-8\"));\n\t\t\tJSONArray contentJsonArray = new JSONArray(contentJsonString);\n\t\t\tLOGGER.debug(\"TOKEN KEY : \" + contentJsonArray.getString(0));\n\t\t\tif (contentJsonArray.getString(0).equals(\"null\")) {\n\t\t\t\tLOGGER.error(\"The response is null, check the mail.api.url.getTokenKey\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis.tokenKey = contentJsonArray.getString(0);\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.error(\"Send request to ask a new token\", e);\n\t\t\treturn false;\n\t\t}\n\t\tLOGGER.debug(\"Get token key successfully\");\n\t\treturn true;\n\t}", "public void setToken(){\n token=null;\n try {\n OkHttpClient client = new OkHttpClient();\n RequestBody reqbody = RequestBody.create(null, new byte[0]); \n Request request = new Request.Builder()\n .url(\"https://api.mercadolibre.com/oauth/token?grant_type=client_credentials&client_id=\"+clienteID +\"&client_secret=\"+secretKey)\n .post(reqbody)\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"cache-control\", \"no-cache\")\n .addHeader(\"postman-token\", \"67053bf3-5397-e19a-89ad-dfb1903d50c4\")\n .build();\n \n Response response = client.newCall(request).execute();\n String respuesta=response.body().string();\n token=respuesta.substring(respuesta.indexOf(\"APP\"),respuesta.indexOf(\",\")-1);\n System.out.println(token);\n } catch (IOException ex) {\n Logger.getLogger(MercadoLibreAPI.class.getName()).log(Level.SEVERE, null, ex);\n token=null;\n }\n }", "public int getTokenViaClientCredentials(){\n\t\t//Do we have credentials?\n\t\tif (Is.nullOrEmpty(clientId) || Is.nullOrEmpty(clientSecret)){\n\t\t\treturn 1;\n\t\t}\n\t\ttry{\n\t\t\t//Build auth. header entry\n\t\t\tString authString = \"Basic \" + Base64.getEncoder().encodeToString((clientId + \":\" + clientSecret).getBytes());\n\t\t\t\n\t\t\t//Request headers\n\t\t\tMap<String, String> headers = new HashMap<>();\n\t\t\theaders.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\theaders.put(\"Authorization\", authString);\n\t\t\t\n\t\t\t//Request data\n\t\t\tString data = ContentBuilder.postForm(\"grant_type\", \"client_credentials\");\n\t\t\t\n\t\t\t//Call\n\t\t\tlong tic = System.currentTimeMillis();\n\t\t\tthis.lastRefreshTry = tic;\n\t\t\tJSONObject res = Connectors.httpPOST(spotifyAuthUrl, data, headers);\n\t\t\tStatistics.addExternalApiHit(\"SpotifyApi getTokenViaClientCredentials\");\n\t\t\tStatistics.addExternalApiTime(\"SpotifyApi getTokenViaClientCredentials\", tic);\n\t\t\t//System.out.println(res.toJSONString()); \t\t//DEBUG\n\t\t\tif (!Connectors.httpSuccess(res)){\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\tString token = JSON.getString(res, \"access_token\");\n\t\t\tString tokenType = JSON.getString(res, \"token_type\");\n\t\t\tlong expiresIn = JSON.getLongOrDefault(res, \"expires_in\", 0);\n\t\t\tif (Is.nullOrEmpty(token)){\n\t\t\t\treturn 4;\n\t\t\t}else{\n\t\t\t\tthis.token = token;\n\t\t\t\tthis.tokenType = tokenType;\n\t\t\t\tthis.tokenValidUntil = System.currentTimeMillis() + (expiresIn * 1000);\n\t\t\t}\n\t\t\treturn 0;\n\t\t\t\n\t\t}catch (Exception e){\n\t\t\tStatistics.addExternalApiHit(\"SpotifyApi-error getTokenViaClientCredentials\");\n\t\t\treturn 3;\n\t\t}\n\t}", "public String generateNewAccessToken() throws SocketTimeoutException, IOException, Exception{\n System.out.println(\"Lived Religion has to get a new access token...\");\n String newAccessToken = \"\";\n JSONObject jsonReturn = new JSONObject();\n JSONObject tokenRequestParams = new JSONObject();\n tokenRequestParams.element(\"refresh_token\", currentRefreshToken);\n if(currentRefreshToken.equals(\"\")){\n //You must read in the properties first!\n System.out.println(\"You must read in the properties first with init()\");\n Exception noProps = new Exception(\"You must read in the properties first with init(). There was no refresh token set.\");\n throw noProps;\n }\n else{\n try{\n System.out.println(\"Connecting to RERUM with refresh token...\");\n URL rerum = new URL(Constant.RERUM_ACCESS_TOKEN_URL);\n HttpURLConnection connection = (HttpURLConnection) rerum.openConnection();\n connection.setRequestMethod(\"POST\"); \n connection.setConnectTimeout(5*1000); \n connection.setDoOutput(true);\n connection.setDoInput(true);\n connection.setRequestProperty(\"Content-Type\", \"application/json\");\n connection.connect();\n DataOutputStream outStream = new DataOutputStream(connection.getOutputStream());\n //Pass in the user provided JSON for the body \n outStream.writeBytes(tokenRequestParams.toString());\n outStream.flush();\n outStream.close(); \n //Execute rerum server v1 request\n BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(),\"utf-8\"));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null){\n //Gather rerum server v1 response\n sb.append(line);\n }\n reader.close();\n jsonReturn = JSONObject.fromObject(sb.toString());\n System.out.println(\"RERUM responded with access token...\");\n newAccessToken = jsonReturn.getString(\"access_token\");\n }\n catch(java.net.SocketTimeoutException e){ //This specifically catches the timeout\n System.out.println(\"The RERUM token endpoint is taking too long...\");\n jsonReturn = new JSONObject(); //We were never going to get a response, so return an empty object.\n jsonReturn.element(\"error\", \"The RERUM endpoint took too long\");\n throw e;\n //newAccessToken = \"error\";\n }\n }\n setAccessToken(newAccessToken);\n writeProperty(\"access_token\", newAccessToken);\n System.out.println(\"Lived Religion has a new access token, and it is written to the properties file...\");\n return newAccessToken;\n }", "default WorkdayEndpointConsumerBuilder tokenRefresh(String tokenRefresh) {\n doSetProperty(\"tokenRefresh\", tokenRefresh);\n return this;\n }", "Observable<Boolean> addToken(TokenRequest oauthRequest, Session session, RelyingParty relyingParty, boolean needUpdateRefresh);", "public String generateRefreshToken(final User user, final String tenant)\n\t{\n\t\tClaims claims = Jwts.claims().setSubject(user.getId().toString());\n\t\tclaims.put(\"password\", user.getPassword());\n\t\tclaims.put(\"tenant\", tenant);\n\t\treturn buildToken(claims, refreshTokenExp);\n\t}", "public synchronized void checkTokenExpiry() {\n if (this.mExpiryDate != null && this.mExpiryDate.getTime() <= System.currentTimeMillis() + REFRESH_THRESHOLD) {\n acquireTokenAsync();\n }\n }", "@Override\n\tprotected ServerAccessToken doRefreshAccessToken(Client client, RefreshToken oldRefreshToken,\n\t\t\tList<String> restrictedScopes) {\n\t\trestrictedScopes.clear();\n\t\tServerAccessToken accessToken = super.doRefreshAccessToken(\n\t\t\t\tclient, oldRefreshToken, restrictedScopes);\n\t\t\n\t\tif (log.isDebugEnabled()) {\n\t\t\ttry {\n\t\t\t\tlog.debug(\"Old RefreshToken={}\", OBJECT_MAPPER.writeValueAsString(oldRefreshToken));\n\t\t\t\tlog.debug(\"ServerAccessToken={}\", OBJECT_MAPPER.writeValueAsString(accessToken));\n\t\t\t} catch (JsonProcessingException e) {\n\t\t\t\tlog.error(e.getMessage(), e);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn accessToken;\n\t}", "public boolean validateRefreshToken(String token){\n return refreshTokenRepository.findByToken(token).isPresent();\n }", "default WorkdayEndpointBuilder tokenRefresh(String tokenRefresh) {\n doSetProperty(\"tokenRefresh\", tokenRefresh);\n return this;\n }", "String getAccessToken();", "String getAccessToken();", "@Override\n public List<RefreshToken> getRefreshTokens() {\n return new ArrayList<RefreshToken>(refreshTokens.values());\n }", "@Override\n public List<RefreshToken> getRefreshTokens() {\n return new ArrayList<RefreshToken>(refreshTokens.values());\n }", "@RequestMapping(value = \"/gw/oauth/token/{version}/refresh\", method = RequestMethod.POST, produces = \"application/json;charset=utf-8\")\n public Object entry2(HttpServletRequest request)\n throws URISyntaxException, OAuthSystemException, OAuthProblemException {\n return this.refresh(request);\n }", "public static void requestToken(String username, String password, Context context) {\n SharedPreferences preferences = context.getSharedPreferences(token_storage, 0);\n SharedPreferences.Editor editor = preferences.edit();\n Call<Token> call = kedronService.getToken(\"password\", username, password);\n\n try {\n Log.d(\"Service\", \"Using a new token\");\n auth_token = call.execute().body();\n\n Log.d(\"Service\", \"Token received\");\n\n isTokenPresent = true;\n } catch (IOException e) {\n Log.e(\"TOKEN\", \"Failed to retrieve the token\", e);\n }\n\n header_token = \"Bearer \" + auth_token;\n\n editor.putString(\"token\", auth_token.getToken());\n editor.apply();\n\n bindToken();\n }", "default WorkdayEndpointProducerBuilder tokenRefresh(String tokenRefresh) {\n doSetProperty(\"tokenRefresh\", tokenRefresh);\n return this;\n }" ]
[ "0.7490559", "0.73476005", "0.73286694", "0.72479", "0.72414947", "0.7177566", "0.7166788", "0.71317583", "0.71124864", "0.7104656", "0.7082014", "0.7077287", "0.6926462", "0.69096076", "0.68916905", "0.6873867", "0.68500334", "0.6809121", "0.67903113", "0.67655164", "0.67645377", "0.67478484", "0.67462724", "0.67383176", "0.66707027", "0.66570103", "0.66507894", "0.6624211", "0.66211575", "0.6586138", "0.65830946", "0.6573053", "0.6564326", "0.6544553", "0.65404314", "0.65353596", "0.6528304", "0.6516786", "0.65093195", "0.650678", "0.6498107", "0.6496442", "0.6481365", "0.64697605", "0.64684755", "0.6448874", "0.6437948", "0.643187", "0.6424839", "0.642331", "0.6417589", "0.6413965", "0.64117366", "0.63776004", "0.6367398", "0.63639385", "0.6358344", "0.6322585", "0.63188237", "0.63180304", "0.62951446", "0.62882614", "0.62683797", "0.62594205", "0.6232741", "0.62111354", "0.61187243", "0.61050236", "0.607539", "0.60595304", "0.60554093", "0.6052793", "0.6052015", "0.60268587", "0.6022219", "0.6014888", "0.5995147", "0.5986004", "0.59753263", "0.59626955", "0.5921228", "0.589438", "0.58806187", "0.58001274", "0.5786793", "0.5782567", "0.5781261", "0.5780617", "0.577091", "0.5770728", "0.5767874", "0.57598156", "0.57409495", "0.5734046", "0.572807", "0.572807", "0.571645", "0.571645", "0.57030016", "0.5696029", "0.5693363" ]
0.0
-1
Accessor for state token
public String getStateToken() { return stateToken; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String getStateToken() {\n return stateToken;\n }", "@Override\n\tpublic Token getToken() {\n\t\treturn this.token;\n\t\t\n\t}", "public String token() {\n return this.token;\n }", "public T getToken() {\n return this.token;\n }", "public Token getToken() {\n return token;\n }", "public Token getToken() {\r\n return _token;\r\n }", "public DsByteString getToken() {\n return sToken;\n }", "public String getToken() {\r\n return token;\r\n }", "public String getToken() {\r\n return token;\r\n }", "public String getToken() {\n return this.token;\n }", "public Token getToken() {\n\t\treturn token;\n\t}", "public Token getToken() {\n\t\treturn token;\n\t}", "public Token getToken() {\n\t\treturn token;\n\t}", "public Token getToken() {\r\n\t\treturn this.token;\r\n\t}", "public String getToken() {\n return token.get();\n }", "public Token getToken() {\n return this.token;\n }", "public String getToken() {\n\t\treturn token;\n\t}", "public String getToken() {\n\t\treturn token;\n\t}", "public String getToken() {\n return this.token;\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "public String getToken()\n {\n return token;\n }", "public String getToken() {\n return this.token;\n }", "public String getTokenValue() { return tok; }", "@Nonnull\n public final String getToken() {\n return this.token;\n }", "public String token() {\n return Codegen.stringProp(\"token\").config(config).require();\n }", "public java.lang.String getToken(){\r\n return localToken;\r\n }", "public String getToken() {\n return token_;\n }", "public String getToken() {\n return token_;\n }", "public String getToken() {\n return token_;\n }", "public java.lang.String getToken(){\n return localToken;\n }", "public String getToken() {\n return instance.getToken();\n }", "public String getToken() {\n return instance.getToken();\n }", "public String getToken() {\n return instance.getToken();\n }", "public static String getToken() {\n \treturn mToken;\n }", "public String getToken() {\n\n return this.token;\n }", "public byte[] getToken() {\n\t\treturn this.token;\n\t}", "public int getTokenIndex() {\n return this.tokenIndex;\n }", "StateT getState();", "public int getToken_num() {\n return this.token_num;\n }", "public T getState() {\r\n\t\treturn state;\r\n\t}", "@Override\n protected String getEvaluableToken() {\n return TOKEN;\n }", "@java.lang.Override\n public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n token_ = s;\n }\n return s;\n }\n }", "@Override\n\tprotected String getEvaluableToken() {\n\t\treturn TOKEN;\n\t}", "State getState();", "State getState();", "State getState();", "State getState();", "public String getStringToken()\n\t{\n\t\tgetToken();\n\t\treturn token;\n\t}", "public String getState() { return state; }", "Token CurrentToken() throws ParseException {\r\n return token;\r\n }", "ESMFState getState();", "public LexerState getState() {\n\t\treturn state;\n\t}", "java.lang.String getState();", "public State getState(){return this.state;}", "public int getToken() {\n\t\t//previous token remembered?\n\t\tif (token != null)\n\t\t{\t\n\t\t\treturn tokenVal(); \n\t\t}\n\t\telse //need a new token.\n\t\t{\n\t\t\t//get position of next token\n\t\t\tint tokenStart = findTokenStart();\n\t\t\t//remove leading whitespace\n\t\t\tline = line.substring(tokenStart);\n\t\t\t//create char[] representation of line\n\t\t\tchar[] characters = line.toCharArray();\n\t\t\t//get type of token\n\t\t\ttType = getType(characters[0]);\n\t\t\tif (Objects.equals(tType, \"lowercase\"))\n\t\t\t{\n\t\t\t\ttoken = getLowerToken(characters);\n\t\t\t}\n\t\t\telse if (Objects.equals(tType, \"uppercase\"))\n\t\t\t{\n\t\t\t\ttoken = getIdentifierToken(characters);\n\t\t\t}\n\t\t\telse if (Objects.equals(tType, \"int\"))\n\t\t\t{\n\t\t\t\ttoken = getIntToken(characters);\n\t\t\t}\n\t\t\telse if (Objects.equals(tType, \"special\"))\n\t\t\t{\n\t\t\t\ttoken = getSpecialToken(characters);\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tSystem.out.println(\"Error this should not be seen\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t//token was found ok.\n\t\t\treturn tokenVal();\n\t\t}\n\t}", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "public String getState(){\n return state;\n }", "public String getState() {\n return this.state;\n }", "public String getState() {\n return this.state;\n }", "String getToken();", "String getToken();", "String getToken();", "String getToken();", "String getToken();", "Object getState();", "public java.lang.String getState() {\r\n return state;\r\n }", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "String getState();", "String getState();", "String getState();", "public String getToken();", "public void setToken(int value){token = value;}", "public TSLexerState getState() {\r\n \t\treturn state;\r\n \t}", "public String getState() {\n return state;\n }", "int getStateValue();", "int getStateValue();", "int getStateValue();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "public String getState()\n {\n \treturn state;\n }", "public final char getState() {\n\t\treturn _state;\n\t}", "public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n token_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n token_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n token_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public TState getState() {\n return state;\n }", "public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n token_ = s;\n }\n return s;\n }\n }", "public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n token_ = s;\n }\n return s;\n }\n }", "public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n token_ = s;\n }\n return s;\n }\n }" ]
[ "0.8266365", "0.70490295", "0.7044556", "0.70145696", "0.6990987", "0.69311607", "0.68820834", "0.6878695", "0.6878695", "0.68679637", "0.6864638", "0.6864638", "0.6864638", "0.68126583", "0.680988", "0.68031824", "0.6794402", "0.6794402", "0.67790526", "0.6764743", "0.6764743", "0.6764743", "0.6764743", "0.6764743", "0.6764277", "0.674727", "0.6734937", "0.6720788", "0.6720361", "0.66873527", "0.6665298", "0.6665298", "0.6665298", "0.6643198", "0.66243434", "0.66243434", "0.66243434", "0.6613555", "0.6611272", "0.6439983", "0.6415791", "0.6361436", "0.6315455", "0.6313462", "0.6309647", "0.62848645", "0.62800545", "0.6264045", "0.6264045", "0.6264045", "0.6264045", "0.6263395", "0.62630033", "0.62376827", "0.62250775", "0.6214483", "0.6201504", "0.6190696", "0.6168453", "0.6149859", "0.6149859", "0.6149859", "0.61486864", "0.6143932", "0.6143932", "0.6132914", "0.6132914", "0.6132914", "0.6132914", "0.6132914", "0.61317134", "0.6131265", "0.61292005", "0.61292005", "0.61292005", "0.61279833", "0.61279833", "0.61279833", "0.6124343", "0.6122658", "0.61208487", "0.61207116", "0.6117696", "0.6117696", "0.6117696", "0.6117094", "0.6117094", "0.6117094", "0.6117094", "0.6117094", "0.6117094", "0.61061156", "0.61031026", "0.6096649", "0.6096649", "0.6096649", "0.6086853", "0.6072536", "0.6072536", "0.6072536" ]
0.81803674
1
Expects an Authentication Code, and makes an authenticated request for the user's profile information
public Credential getUsercredential(final String authCode) throws IOException, JSONException { final GoogleTokenResponse response = flow.newTokenRequest(authCode) .setRedirectUri(CALLBACK_URI).execute(); final Credential credential = flow.createAndStoreCredential(response, null); return credential; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getUserInfoJson(final String authCode) throws IOException,\n\t\t\tJSONException {\n\t\tCredential credential = getUsercredential(authCode);\n\t\tfinal HttpRequestFactory requestFactory = HTTP_TRANSPORT\n\t\t\t\t.createRequestFactory(credential);\n\t\tfinal GenericUrl url = new GenericUrl(USER_INFO_URL);\n\t\tfinal HttpRequest request = requestFactory.buildGetRequest(url);\n\t\trequest.getHeaders().setContentType(\"application/json\");\n\t\tString jsonIdentity = request.execute().parseAsString();\n\t\t\n\t\treturn jsonIdentity;\n\n\t}", "private void editProfile() {\n Log.d(TAG, \"Starting volley request to API\");\n try {\n String authority = String.format(Constants.AUTHORITY,\n Constants.TENANT,\n Constants.EDIT_PROFILE_POLICY);\n\n User currentUser = Helpers.getUserByPolicy(\n sampleApp.getUsers(),\n Constants.EDIT_PROFILE_POLICY);\n\n sampleApp.acquireToken(\n this,\n Constants.SCOPES.split(\"\\\\s+\"),\n currentUser,\n UiBehavior.SELECT_ACCOUNT,\n null,\n null,\n authority,\n getEditPolicyCallback());\n } catch(MsalClientException e) {\n /* No User */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n }\n\n }", "Map<String, Object> getUserProfile();", "@Override\n public void onAuthSuccess() {\n fetchLinkedInPersonalInfo();\n }", "protected abstract void requestAuth(@NonNull Activity activity, int requestCode);", "@WebMethod(action=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/getUserProfile\",\n operationName=\"getUserProfile\")\n @RequestWrapper(targetNamespace=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/types/\",\n localName=\"getUserProfile\")\n @ResponseWrapper(targetNamespace=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/types/\",\n localName=\"getUserProfileResponse\")\n @WebResult(name=\"result\")\n @CallbackMethod(exclude=true)\n String getUserProfile(@WebParam(mode = WebParam.Mode.IN, name=\"profileInformation\")\n String profileInformation) throws ServiceException;", "public UserProfile getUserProfile(String username);", "@Override\n public User authorize(String code) {\n return User.of(new Random().nextInt(100000) + 1, \"[email protected]\", UUID.randomUUID().toString(), 43800);\n }", "@RequestMapping(value = {\"/profile\"})\n @PreAuthorize(\"hasRole('logon')\")\n public String showProfile(HttpServletRequest request, ModelMap model)\n {\n User currentUser = userService.getPrincipalUser();\n model.addAttribute(\"currentUser\", currentUser);\n return \"protected/profile\";\n }", "@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }", "public String getUserProfileAction()throws Exception{\n\t\tMap<String, Object> response=null;\n\t\tString responseStr=\"\";\n\t\tString userName=getSession().get(\"username\").toString();\n\t\tresponse = getService().getUserMgmtService().getUserProfile(userName);\n\t\tresponseStr=response.get(\"username\").toString()+\"|\"+response.get(\"firstname\").toString()+\"|\"+response.get(\"lastname\").toString()+\"|\"+response.get(\"emailid\")+\"|\"+response.get(\"role\");\n\t\tgetAuthBean().setResponse(responseStr);\n\t\tgetSession().putAll(response);\n\t\tinputStream = new StringBufferInputStream(responseStr);\n\t\tinputStream.close();\n\t\treturn SUCCESS;\n\t}", "public Profile get(Long id, String authenticationCode, long profileId) {\n return new Profile((int)(long)id,\"PROFIL_TESTOWY\", Boolean.FALSE, Boolean.TRUE);\n }", "public static com.sawdust.gae.logic.User getUser(final HttpServletRequest request, final HttpServletResponse response, final AccessToken accessData)\r\n {\n if (null != response)\r\n {\r\n setP3P(response); // Just always set this...\r\n }\r\n\r\n com.sawdust.gae.logic.User user = null;\r\n\r\n if (null == user)\r\n {\r\n try\r\n {\r\n LOG.finer(String.format(\"Attempting google authorization...\"));\r\n user = getUser_Google(request, accessData, user);\r\n }\r\n catch (final Throwable e)\r\n {\r\n \tLOG.warning(Util.getFullString(e));\r\n }\r\n }\r\n\r\n if (null == user)\r\n {\r\n try\r\n {\r\n LOG.finer(String.format(\"Attempting facebook authorization...\"));\r\n user = getUser_Facebook(request, user);\r\n }\r\n catch (final Throwable e)\r\n {\r\n \tLOG.warning(Util.getFullString(e));\r\n }\r\n }\r\n\r\n if (null == user)\r\n {\r\n try\r\n {\r\n LOG.finer(String.format(\"Attempting signed-cookie authorization...\"));\r\n user = getUser_Cookied(request, user);\r\n }\r\n catch (final Throwable e)\r\n {\r\n \tLOG.warning(Util.getFullString(e));\r\n }\r\n }\r\n\r\n if (null == user)\r\n {\r\n LOG.finer(String.format(\"Using guest authorization...\"));\r\n final String email = getGuestId(request, response);\r\n if (null == email) \r\n {\r\n return null;\r\n }\r\n user = new com.sawdust.gae.logic.User(UserTypes.Guest, email, null);\r\n }\r\n LOG.fine(String.format(\"User is %s\", user.getId()));\r\n if (user.getUserID().endsWith(\"facebook.null\"))\r\n {\r\n user.setSite(\"http://apps.facebook.com/sawdust-games/\");\r\n }\r\n else if (user.getUserID().endsWith(\"facebook.beta\"))\r\n {\r\n user.setSite(\"http://apps.facebook.com/sawdust-games-beta/\");\r\n }\r\n return user;\r\n }", "@Override\r\n\t\t\t\t\tpublic void onSuccess(UserProfile result) {\n\t\t\t\t\t\tuserAuthenticated();\r\n\t\t\t\t\t}", "@Override\n public JsonResponse duringAuthentication(String... params) {\n try {\n final String username = params[0];\n final String password = params[1];\n return RequestHandler.authenticate(this.getApplicationContext(), username, password);\n } catch (IOException e) {\n return null;\n }\n }", "public void getProfileWithCompletion(\n final ServiceClientCompletion<ResponseResult> completion)\n {\n // Create request headers.\n final HashMap<String, String> headers = new HashMap<String, String>(2);\n headers.put(\"Authorization\", AUTHORIZATION_HEADER);\n headers.put(\"Content-Type\", \"application/json\");\n\n // Create request parameters.\n final HashMap<String, String> parameters =\n new HashMap<String, String>(2);\n parameters.put(\"grant_type\", \"bearer\");\n parameters.put(\"access_token\", mSharecareToken.accessToken);\n\n // Create endpoint.\n final String endPoint =\n String.format(PROFILE_ENDPOINT, mSharecareToken.accountID);\n\n this.beginRequest(endPoint, ServiceMethod.GET, headers, parameters,\n (String)null, ServiceResponseFormat.GSON,\n new ServiceResponseTransform<JsonElement, ResponseResult>()\n {\n @Override\n public ResponseResult transformResponseData(\n final JsonElement json)\n throws ServiceResponseTransformException\n {\n final ResponseResult result =\n checkResultFromAuthService(json);\n if (result.success)\n {\n // Extract profile info to create profile object.\n final JsonObject jsonObject = json.getAsJsonObject();\n final String firstName =\n getStringFromJson(jsonObject, FIRST_NAME);\n final String lastName =\n getStringFromJson(jsonObject, LAST_NAME);\n final String email =\n getStringFromJson(jsonObject, EMAIL);\n final String gender =\n getStringFromJson(jsonObject, GENDER);\n final Date dateOfBirth =\n getDateFromJson(jsonObject, DATE_OF_BIRTH);\n final double height =\n getDoubleFromJson(jsonObject, HEIGHT, 0);\n final double weight =\n getDoubleFromJson(jsonObject, WEIGHT, 0);\n\n if (firstName != null && lastName != null\n && email != null)\n {\n final Profile profile = new Profile();\n profile.firstName = firstName;\n profile.lastName = lastName;\n profile.email = email;\n profile.heightInMeters = height;\n profile.weightInKg = weight;\n profile.gender = gender;\n profile.dateOfBirth = dateOfBirth;\n updateAskMDProfileWithCompletion(null);\n final HashMap<String, Object> parameters =\n new HashMap<String, Object>(1);\n parameters.put(PROFILE, profile);\n result.parameters = parameters;\n }\n else\n {\n result.success = false;\n result.errorMessage = \"Bad profile data.\";\n result.responseCode =\n ServiceClientConstants.SERVICE_RESPONSE_STATUS_CODE_BAD_DATA;\n }\n }\n\n LogError(\"getProfileWithCompletion\", result);\n return result;\n }\n }, completion);\n }", "public User doAuthentication(String account, String password);", "private void getUserInfo() {\n httpClient.get(API.LOGIN_GET_USER_INFO, new JsonHttpResponseHandler(){\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n super.onSuccess(statusCode, headers, response);\n callback.onLoginSuccess(response.optJSONObject(Constant.OAUTH_RESPONSE_USER_INFO));\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n super.onFailure(statusCode, headers, responseString, throwable);\n callback.onLoginFailed(throwable.getMessage(), ErrorCode.ERROR_CODE_SERVER_EXCEPTION);\n }\n });\n }", "@RequestMapping(value = \"/getUserProfileDetails\", method = RequestMethod.GET, produces = \"application/json\")\n\t@ResponseBody\n\tpublic GetUserProfileResponse getUserProfileDetails(@RequestParam String emailId) {\n \tGetUserProfileResponse getUserProfileDetails = null;\n\t\ttry {\n\t\t\t\n\t\t\tgetUserProfileDetails = this.econnectService.getUserProfileDetails(emailId);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn getUserProfileDetails;\n\t}", "@Override\n public void onAuthSuccess() {\n String url = \"https://api.linkedin.com/v1/people/~:(id,first-name,last-name,email-address)\";\n\n APIHelper apiHelper = APIHelper.getInstance(getApplicationContext());\n apiHelper.getRequest(OConnectBaseActivity.this, url, new ApiListener() {\n @Override\n public void onApiSuccess(ApiResponse apiResponse) {\n AppUtil.setLinkedInLoggedIn(OConnectBaseActivity.this, true);\n\n // Success!\n Log.d(\"APD\", \"linkedin response for data: \" + apiResponse.getResponseDataAsJson().toString());\n\n final JSONObject obj = apiResponse.getResponseDataAsJson();\n\n String firstName = \"\";\n String lastName = \"\";\n String emailAddress = \"\";\n\n try {\n if (obj.has(\"firstName\")) {\n firstName = obj.getString(\"firstName\");\n }\n\n if (obj.has(\"lastName\")) {\n lastName = obj.getString(\"lastName\");\n }\n\n if (obj.has(\"emailAddress\")) {\n emailAddress = obj.getString(\"emailAddress\");\n }\n } catch (Exception ex) {\n Log.d(\"APD\", ex.getMessage());\n }\n\n final String finalEmailAddress = emailAddress;\n final String finalFirstName = firstName;\n final String finalLastName = lastName;\n\n final String token = LISessionManager.getInstance(getApplicationContext()).getSession().getAccessToken().toString();\n\n ParseQuery<ParseUser> query = ParseUser.getQuery();\n query.whereEqualTo(\"username\", emailAddress);\n query.findInBackground(new FindCallback<ParseUser>() {\n public void done(List<ParseUser> objects, ParseException e) {\n if (e == null) {\n ParseUser parseUser = null;\n if (objects.size() > 0) {\n final ParseUser user = objects.get(0);\n\n user.setUsername(finalEmailAddress);\n user.setEmail(finalEmailAddress);\n user.put(\"firstName\", finalFirstName);\n user.put(\"lastName\", finalLastName);\n\n user.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n SignInActivity2 tempAct = new SignInActivity2();\n SignInActivity2.LinkedInImportTask task = tempAct.new LinkedInImportTask();\n task.execute(user.getObjectId(), token);\n }\n });\n\n parseUser = user;\n } else {\n final ParseUser user = new ParseUser();\n\n user.setUsername(finalEmailAddress);\n user.setEmail(finalEmailAddress);\n user.put(\"firstName\", finalFirstName);\n user.put(\"lastName\", finalLastName);\n\n user.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n SignInActivity2 tempAct = new SignInActivity2();\n SignInActivity2.LinkedInImportTask task = tempAct.new LinkedInImportTask();\n task.execute(user.getObjectId(), token);\n }\n });\n\n parseUser = user;\n }\n\n OConnectBaseActivity.currentPerson = Person.saveFromParseUser(parseUser, false);\n\n }\n }\n });\n }\n\n @Override\n public void onApiError(LIApiError liApiError) {\n // Error making GET request!\n }\n });\n }", "public void getProfileInformation() {\n\t\tmAsyncRunner.request(\"me\", new RequestListener() {\n\t\t\t@Override\n\t\t\tpublic void onComplete(String response, Object state) {\n\t\t\t\tLog.d(\"Profile\", response);\n\t\t\t\tString json = response;\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject profile = new JSONObject(json);\n\t\t\t\t\tLog.d(\"Arvind Profile Data\", \"\"+profile.toString());\n\t\t\t\t\tfinal String name = profile.getString(\"name\");\n\t\t\t\t\tfinal String email = profile.getString(\"email\");\n\t\t\t\t\tHashMap<String, String> hashMap = new HashMap<String, String>();\n\n\t\t\t\t\thashMap.put(\"first_name\", profile.getString(\"first_name\"));\n\n\t\t\t\t\thashMap.put(\"last_name\", profile.getString(\"last_name\"));\n\n\t\t\t\t\thashMap.put(\"id\", profile.getString(\"id\"));\n\n\t\t\t\t\thashMap.put(\"gender\", profile.getString(\"gender\"));\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\thashMap.put(\"email\", profile.getString(\"email\"));\n\t\t\t\t\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\n\t\t\t\t\thashMap.put(\"birthday\", profile.getString(\"birthday\"));\n\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t//\tGetAlbumdata();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tIntent returnIntent = new Intent();\n\t\t\t\t\treturnIntent.putExtra(\"map\", hashMap);\n\t\t\t\t\tsetResult(RESULT_OK,returnIntent);\n\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onIOException(IOException e, Object state) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onFileNotFoundException(FileNotFoundException e,\n\t\t\t\t\tObject state) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onMalformedURLException(MalformedURLException e,\n\t\t\t\t\tObject state) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onFacebookError(FacebookError e, Object state) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t});\n\t}", "HumanProfile getUserProfile();", "public void loadUserProfile(AccessToken accessToken) {\n GraphRequest request = GraphRequest.newMeRequest(accessToken, new GraphRequest.GraphJSONObjectCallback() {\n public void onCompleted(JSONObject object, GraphResponse response) {\n try {\n String first_name = object.getString(\"first_name\");\n String last_name = object.getString(\"last_name\");\n String email = object.getString(\"email\");\n String str = \"https://graph.facebook.com/\" + object.getString(\"id\") + \"/picture?type=normal\";\n Intent intent = new Intent(LoginOptionActivity.this, HomeActivity.class);\n intent.putExtra(\"name\", first_name + \" \" + last_name + \"\\n\" + email);\n intent.addFlags(268468224);\n LoginOptionActivity.this.startActivity(intent);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n });\n Bundle parameters = new Bundle();\n parameters.putString(GraphRequest.FIELDS_PARAM, \"first_name,last_name,email,id\");\n request.setParameters(parameters);\n request.executeAsync();\n }", "private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n String id = currentPerson.getId();\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.e(TAG, \"Id: \"+id+\", Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n signInTask = new AsyncTask(mBaseActivity);\n signInTask.execute(id, email, personName);\n// SharedPreferences preferences = mBaseActivity.getSharedPreferences(\"com.yathams.loginsystem\", MODE_PRIVATE);\n// preferences.edit().putString(\"email\", email).putString(\"userName\", personName).commit();\n\n } else {\n Toast.makeText(getApplicationContext(),\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic UserInfo getUserInfo() {\n\t\tHttpSession session = RpcContext.getHttpSession();\n String auth = (String)session.getAttribute(\"auth\");\n UserInfo ui = null;\n if (auth != null) {\n\t switch(AuthType.valueOf(auth)) {\n\t\t case Database: {\n\t\t String username = (String)session.getAttribute(\"username\");\n\t\t \t\tui = _uim.select(username);\n\t\t \t\tbreak;\n\t\t }\n\t\t case OAuth: {\n\t\t \t\tString googleid = (String)session.getAttribute(\"googleid\");\n\t\t \t\tui = _uim.selectByGoogleId(googleid);\n\t\t \t\tbreak;\n\t\t }\n\t }\n }\n\t\treturn ui;\n\t}", "public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}", "public void startAuth(AccountManagerCallback accountManagerCallback) {\n mAccountManagerCallback = accountManagerCallback;\n\n CognitoUser user = mUserPool.getUser(mEmail);\n user.getSessionInBackground(authenticationHandler);\n }", "@Override\n public void onSuccess(AuthenticationResult authenticationResult) {\n Log.d(TAG, \"Edit Profile: \" + authenticationResult.getAccessToken());\n hasRefreshToken();\n }", "private User authenticate(JSONObject data) {\r\n UserJpaController uJpa = new UserJpaController(Persistence.createEntityManagerFactory(\"MovBasePU\"));\r\n\r\n long fbId = Long.parseLong((String) data.remove(\"id\"));\r\n User user = uJpa.findByFbId(fbId);\r\n if (user != null) {\r\n return user;\r\n } else {\r\n user = new User(fbId, (String) data.remove(\"name\"), (String) data.remove(\"email\"), new Date(), \"u\");\r\n try {\r\n uJpa.create(user);\r\n } catch (Exception ex) {\r\n Logger.getLogger(LoginController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return user;\r\n }\r\n\r\n }", "@Before(unless = { \"signin\", \"doLogin\" })\n\tprivate static void checkAuthentification() {\n\t\t// get ID from secure social plugin\n\t\tString uid = session.get(PLAYUSER_ID);\n\t\tif (uid == null) {\n\t\t\tsignin(null);\n\t\t}\n\n\t\t// get the user from the store. TODO Can also get it from the cache...\n\t\tUser user = null;\n\t\tif (Cache.get(uid) == null) {\n\t\t\ttry {\n\t\t\t\tuser = UserClient.getUserFromID(uid);\n\t\t\t\tCache.set(uid, user);\n\t\t\t} catch (ApplicationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\t}\n\t\t} else {\n\t\t\tuser = (User) Cache.get(uid);\n\t\t}\n\n\t\tif (user == null) {\n\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\tAuthentifier.logout();\n\t\t}\n\n\t\tif (user.avatarURL == null) {\n\t\t\tuser.avatarURL = Gravatar.get(user.email, 100);\n\t\t}\n\n\t\t// push the user object in the request arguments for later display...\n\t\trenderArgs.put(PLAYUSER, user);\n\t}", "public User getUserDetails(String username);", "protected Map<String, Object> getUserProfile() {\r\n\t\tTimeRecorder timeRecorder = RequestContext.getThreadInstance()\r\n\t\t\t\t\t\t\t\t\t\t\t\t .getTimeRecorder();\r\n\t\tString profileId = (String)userProfile.get(AuthenticationConsts.KEY_PROFILE_ID);\r\n\r\n\t\tSite site = Utils.getEffectiveSite(request);\r\n\t\tString siteDNSName = (site == null ? null : site.getDNSName());\r\n\r\n\t\tIUserProfileRetriever retriever = UserProfileRetrieverFactory.createUserProfileImpl(AuthenticationConsts.USER_PROFILE_RETRIEVER, siteDNSName);\r\n\t\ttry {\r\n\t\t\ttimeRecorder.recordStart(Operation.PROFILE_CALL);\r\n\t\t\tMap<String, Object> userProfile = retriever.getUserProfile(profileId,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t request);\r\n\t\t\ttimeRecorder.recordEnd(Operation.PROFILE_CALL);\r\n\t\t\treturn userProfile;\r\n\t\t} catch (UserProfileException ex) {\r\n\t\t\ttimeRecorder.recordError(Operation.PROFILE_CALL, ex);\r\n\t\t\tRequestContext.getThreadInstance()\r\n\t\t\t\t\t\t .getDiagnosticContext()\r\n\t\t\t\t\t\t .setError(ErrorCode.PROFILE001, ex.toString());\r\n\t\t\tthrow ex;\r\n\t\t}\r\n\t}", "@Override\n protected void successfulAuthentication(HttpServletRequest req,\n HttpServletResponse res,\n FilterChain chain,\n Authentication auth) throws IOException {\n\n log.info(\"Authentication succeed!\");\n UserDetailsImpl user = (UserDetailsImpl) auth.getPrincipal();\n Collection authorities = user.getAuthorities();\n String token = authService.generateOrGetToken(user);\n ReimsUser.Role role = authService.getRoleByString(authorities.iterator().next().toString());\n\n // retrieve informative response for frontend needs\n res.setHeader(HEADER_STRING, token);\n UserResponse userResponse = new UserResponse();\n userResponse.setUsername(user.getUsername());\n userResponse.setId(user.getUserId());\n userResponse.setRole(role);\n\n // Creating Object of ObjectMapper define in Jackson Api\n ObjectMapper objectMapper = new ObjectMapper();\n\n String userJsonString = objectMapper.writeValueAsString(userResponse);\n\n PrintWriter out = res.getWriter();\n res.setContentType(\"application/json\");\n res.setCharacterEncoding(\"UTF-8\");\n out.print(userJsonString);\n out.flush();\n\n Session session = Session.builder().token(token).username(user.getUsername()).role(role).build();\n authService.registerOrUpdateSession(session);\n }", "private void getUserDetailsFromFB() {\n Bundle parameters = new Bundle();\n parameters.putString(\"fields\", \"email,name,picture,first_name,last_name,gender,timezone,verified\");\n new GraphRequest(\n AccessToken.getCurrentAccessToken(),\n \"/me\",\n parameters,\n HttpMethod.GET,\n new GraphRequest.Callback() {\n @Override\n public void onCompleted(GraphResponse response) {\n //Handle the result here\n try {\n email = response.getJSONObject().getString(\"email\");\n name = response.getJSONObject().getString(\"name\");\n timezone = response.getJSONObject().getString(\"timezone\");\n firstName = response.getJSONObject().getString(\"first_name\");\n lastName = response.getJSONObject().getString(\"last_name\");\n gender = response.getJSONObject().getString(\"gender\");\n isVerified = response.getJSONObject().getBoolean(\"verified\");\n\n JSONObject picture = response.getJSONObject().getJSONObject(\"picture\");\n JSONObject data = picture.getJSONObject(\"data\");\n\n //get the 50X50 profile pic they send us\n String pictureURL = data.getString(\"url\");\n\n new ProfilePicAsync(pictureURL,1).execute();\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }\n ).executeAsync();\n }", "Profile getProfile( String profileId );", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows IOException, ServletException {\n\t\tCredential credential = getCredential();\n\n\t\t// Build the Plus object using the credentials\n\t\tPlus plus = new Plus.Builder(transport, jsonFactory, credential)\n\t\t\t\t.setApplicationName(GoogleOAuth2.APPLICATION_NAME).build();\n\t\t// Make the API call\n\t\tPerson profile = plus.people().get(\"me\").execute();\n\t\t// Send the results as the response\n\t\tPrintWriter respWriter = resp.getWriter();\n\t\tresp.setStatus(200);\n\t\tresp.setContentType(\"text/html\");\n\t\trespWriter.println(\"<img src='\" + profile.getImage().getUrl() + \"'>\");\n\t\trespWriter.println(\"<a href='\" + profile.getUrl() + \"'>\" + profile.getDisplayName() + \"</a>\");\n\n\t\tUserService userService = UserServiceFactory.getUserService();\n\t\trespWriter.println(\"<div class=\\\"header\\\"><b>\" + req.getUserPrincipal().getName() + \"</b> | \"\n\t\t\t\t+ \"<a href=\\\"\" + userService.createLogoutURL(req.getRequestURL().toString())\n\t\t\t\t+ \"\\\">Log out</a> | \"\n\t\t\t\t+ \"<a href=\\\"http://code.google.com/p/google-api-java-client/source/browse\"\n\t\t\t\t+ \"/calendar-appengine-sample?repo=samples\\\">See source code for \"\n\t\t\t\t+ \"this sample</a></div>\");\n\t}", "H getProfile();", "private void lookupUserAccount() {\n String userId = tokens.getString(\"principalID\", \"\");\n String accessToken = tokens.getString(\"authorisationToken\", \"\");\n\n if (!\"\".equals(userId) && !\"\".equals(accessToken)) {\n // Make new json request\n String url = String.format(Constants.APIUrls.lookupUserAccount, userId);\n JsonRequest jsonRequest = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n String email;\n try {\n email = response.getString(\"email\");\n } catch (JSONException ex){\n email = \"unknown\";\n }\n String name;\n try{\n JSONObject nameObject = response.getJSONObject(\"name\");\n String firstName = nameObject.getString(\"givenName\");\n String lastName = nameObject.getString(\"familyName\");\n name = firstName + \" \" + lastName;\n } catch (JSONException ex){\n name = \"unknown\";\n }\n Boolean accountBlocked;\n try{\n JSONObject accountInfo = response.getJSONObject(\"urn:mace:oclc.org:eidm:schema:persona:wmscircselfinfo:20180101\").getJSONObject(\"circulationInfo\");\n accountBlocked = accountInfo.getBoolean(\"isCircBlocked\");\n } catch (JSONException ex){\n ex.printStackTrace();\n accountBlocked = true;\n }\n String borrowerCategory;\n try {\n JSONObject accountInfo = response.getJSONObject(\"urn:mace:oclc.org:eidm:schema:persona:wmscircselfinfo:20180101\").getJSONObject(\"circulationInfo\");\n borrowerCategory = accountInfo.getString(\"borrowerCategory\");\n } catch (JSONException ex){\n borrowerCategory = \"\";\n }\n String userBarcode;\n try {\n JSONObject accountInfo = response.getJSONObject(\"urn:mace:oclc.org:eidm:schema:persona:wmscircselfinfo:20180101\").getJSONObject(\"circulationInfo\");\n userBarcode = accountInfo.getString(\"barcode\");\n } catch (JSONException ex){\n userBarcode = \"\";\n }\n tokens.edit().putString(\"name\", name).apply();\n tokens.edit().putString(\"email\", email).apply();\n tokens.edit().putBoolean(\"accountBlocked\", accountBlocked).apply();\n tokens.edit().putString(\"borrowerCategory\", borrowerCategory).apply();\n tokens.edit().putString(\"userBarcode\", userBarcode).apply();\n sendBroadcast(new Intent(Constants.IntentActions.LOOKUP_USER_ACCOUNT_RESPONSE));\n LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(new Intent(Constants.IntentActions.LOOKUP_USER_ACCOUNT_RESPONSE));\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n sendBroadcast(new Intent(Constants.IntentActions.LOOKUP_USER_ACCOUNT_ERROR));\n }\n }\n ){\n @Override\n public Map<String, String> getHeaders() {\n Map<String, String> headers = new HashMap<>();\n headers.put(\"Authorization\", accessToken);\n return headers;\n }\n };\n\n requestQueue.add(jsonRequest);\n\n\n Log.e(TAG, \"user response sent\");\n }\n\n }", "@Override\n public Auth call() throws IOException {\n OkHttpClient client = new OkHttpClient();\n client.setFollowRedirects(false);\n client.setFollowSslRedirects(false);\n\n Request initRequest = new Request.Builder()\n .url(\"https://lobste.rs/login\")\n .build();\n\n Response initResponse = client.newCall(initRequest).execute();\n String initCookie = initResponse.header(\"Set-Cookie\").split(\";\")[0];\n String initBody = initResponse.body().string();\n String authenticity_token = Jsoup.parse(initBody).body().select(\"[name=authenticity_token]\").val();\n\n // Phase 2 is to authenticate given the cookie and authentication token\n RequestBody loginBody = new FormEncodingBuilder()\n .add(\"utf8\", \"\\u2713\")\n .add(\"authenticity_token\", authenticity_token)\n .add(\"email\", login)\n .add(\"password\", password)\n .add(\"commit\", \"Login\")\n .add(\"referer\", \"https://lobste.rs/\")\n .build();\n Request loginRequest = new Request.Builder()\n .url(\"https://lobste.rs/login\")\n .header(\"Cookie\", initCookie) // We must use #header instead of #addHeader\n .post(loginBody)\n .build();\n\n Response loginResponse = client.newCall(loginRequest).execute();\n String loginCookie = loginResponse.header(\"Set-Cookie\").split(\";\")[0];\n\n // Phase 3 is to grab the actual username/email from the settings page\n Request detailsRequest = new Request.Builder()\n .url(\"https://lobste.rs/settings\")\n .header(\"Cookie\", loginCookie)\n .build();\n Response detailsResponse = client.newCall(detailsRequest).execute();\n String detailsHtml = detailsResponse.body().string();\n\n Document dom = Jsoup.parse(detailsHtml);\n String username = dom.select(\"#user_username\").val();\n String email = dom.select(\"#user_email\").val();\n\n // And then we return the result of all three phases\n return new Auth(email, username, loginCookie);\n }", "private void getAccessToken(final String code, final OperationCallback<User> callback) {\n \n new Thread() {\n @Override\n public void run() {\n Log.i(TAG, \"Getting access token\");\n try {\n String postData = \"client_id=\" + CLIENT_ID + \"&client_secret=\" + CLIENT_SECRET +\n \"&grant_type=authorization_code\" + \"&redirect_uri=\" + CALLBACK_URL + \"&code=\" + code;\n String response = postRequest(TOKEN_URL, postData);\n \n Log.i(TAG, \"response \" + response);\n JSONObject jsonObj = (JSONObject) new JSONTokener(response).nextValue();\n \n mAccessToken = jsonObj.getString(\"access_token\");\n Log.i(TAG, \"Got access token: \" + mAccessToken);\n \n Gson gson = new Gson();\n User user = gson.fromJson(jsonObj.getJSONObject(\"user\").toString(), User.class);\n user.setAccessToken(mAccessToken);\n \n callback.notifyCompleted(user);\n } catch (Exception ex) {\n callback.notifyError(ex);\n Log.e(TAG, \"Error getting access token\", ex);\n }\n \n }\n }.start();\n }", "TasteProfile.UserProfile getUserProfile (String user_id);", "private void getUserData() {\n TwitterApiClient twitterApiClient = TwitterCore.getInstance().getApiClient();\n AccountService statusesService = twitterApiClient.getAccountService();\n Call<User> call = statusesService.verifyCredentials(true, true, true);\n call.enqueue(new Callback<User>() {\n @Override\n public void success(Result<User> userResult) {\n //Do something with result\n\n //parse the response\n String name = userResult.data.name;\n String email = userResult.data.email;\n String description = userResult.data.description;\n String pictureUrl = userResult.data.profileImageUrl;\n String bannerUrl = userResult.data.profileBannerUrl;\n String language = userResult.data.lang;\n long id = userResult.data.id;\n\n }\n\n public void failure(TwitterException exception) {\n //Do something on failure\n }\n });\n }", "public void login(Result<TwitterSession> result) {\n TwitterSession session = result.data;\n\n //Getting the username from session\n final String username = session.getUserName();\n\n\n //This code will fetch the profile image URL\n //Getting the account service of the user logged in\n TwitterCore.getInstance().getApiClient(session).getAccountService().verifyCredentials(false, true, false).enqueue(new Callback<User>() {\n @Override\n public void failure(TwitterException e) {\n //If any error occurs handle it here\n }\n\n @Override\n public void success(Result<User> userResult) {\n //If it succeeds creating a User object from userResult.data\n User user = userResult.data;\n\n //Getting the profile image url\n String profileImage = user.profileImageUrl.replace(\"_normal\", \"\");\n String followers = String.valueOf(user.followersCount);\n String description = user.description;\n\n\n //Creating an Intent\n Intent intent = new Intent(MainActivity.this, TwitterActivity.class);\n\n //Adding the values to intent\n intent.putExtra(TwitterActivity.TWITTER_USER_NAME, username);\n intent.putExtra(TwitterActivity.TWITTER_USER_PROFILE, profileImage);\n intent.putExtra(TwitterActivity.TWITTER_USER_FOLLOWERS, followers);\n intent.putExtra(TwitterActivity.TWITTER_USER_DESC,description);\n\n //Starting intent\n startActivity(intent);\n }\n });\n\n }", "public void requestUserData() {\r\n\t \tmText.setText(\"Fetching user name, profile pic...\");\r\n\t \tBundle params = new Bundle();\r\n\t \tparams.putString(\"fields\", \"name, picture\");\r\n\t \tUtility.mAsyncRunner.request(\"me\", params, new UserRequestListener());\r\n\t }", "public UserCredentials getProfileDetails() {\n return profile.getProfileDetails(currentUser);\n }", "@GET(\"users/signin\")\r\n Call<User> signIn(@Header(\"Authorization\") String token);", "@Override\n protected UserDetails getDetails(User user, boolean viewOwnProfile, PasswordPolicy passwordPolicy, Locale requestLocale, boolean preview) {\n return userService.getUserDetails(user);\n }", "private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = null;\n if(currentPerson.getImage().getUrl() != null){\n \tpersonPhotoUrl = currentPerson.getImage().getUrl();\n }else{\n \tpersonPhotoUrl = \"\";\n }\n String personGooglePlusProfile = currentPerson.getUrl();\n String gplusemail = Plus.AccountApi.getAccountName(mGoogleApiClient);\n \n Log.e(TAG, \"Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n \n user_id = currentPerson.getId();\n profile_image = personPhotoUrl;\n profile_url = personGooglePlusProfile;\n name = personName;\n this.email = gplusemail;\n \n /* txtName.setText(personName);\n txtEmail.setText(email);*/\n \n // by default the profile url gives 50x50 px image only\n // we can replace the value with whatever dimension we want by\n // replacing sz=X\n personPhotoUrl = personPhotoUrl.substring(0,\n personPhotoUrl.length() - 2)\n + PROFILE_PIC_SIZE;\n \n // new LoadProfileImage(imgProfilePic).execute(personPhotoUrl);\n \n Thread t = new Thread()\n\t\t\t\t{\n\t\t\t\t\tpublic void run()\n\t\t\t\t\t{\n\t\t\t\t\t\tJSONObject obj = new JSONObject();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tobj.put(\"uid\", user_id);\n\t\t\t\t\t\t\tobj.put(\"email\", email);\n\t\t\t\t\t\t\tobj.put(\"profile_url\", profile_url);\n\t\t\t\t\t\t\tobj.put(\"name\", name);\n\t\t\t\t\t\t\tobj.put(\"profile_image\", profile_image);\n\t\t\t\t\t\t\tobj.put(\"type\", \"google\");\n\t\t\t\t\t\t\tobj.put(\"device_id\", app.getDeviceInfo().device_id);\n\t\t\t\t\t\t\tobj.put(\"device_type\", \"android\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString response = HttpClient.getInstance(getApplicationContext()).SendHttpPost(Constant.SOCIAL_LOGIN, obj.toString());\n\t\t\t\t\t\t\tif(response != null){\n\t\t\t\t\t\t\t\tJSONObject ob = new JSONObject(response);\n\t\t\t\t\t\t\t\tif(ob.getBoolean(\"status\")){\n\t\t\t\t\t\t\t\t\tString first_name = ob.getString(\"first_name\");\n\t\t\t\t\t\t\t\t\tString last_name = ob.getString(\"last_name\");\n\t\t\t\t\t\t\t\t\tString user_id = ob.getString(\"user_id\");\n\t\t\t\t\t\t\t\t\tString reservation_type = ob.getString(\"reservation_type\");\n\t\t\t\t\t\t\t\t\tboolean checkin_status = ob.getBoolean(\"checkin_status\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tString rev_id = null,reservation_code = null;\n\t\t\t\t\t\t\t\t\tJSONArray object = ob.getJSONArray(\"reservation_detail\");\n\t\t\t\t\t\t\t\t\tfor(int i = 0;i<object.length();i++){\n\t\t\t\t\t\t\t\t\t\trev_id = object.getJSONObject(i).getString(\"reservation_id\");\n\t\t\t\t\t\t\t\t\t\treservation_code = object.getJSONObject(i).getString(\"reservation_code\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tapp.getUserInfo().SetUserInfo(first_name,\n\t\t\t\t\t\t\t\t\t\t\tlast_name,\n\t\t\t\t\t\t\t\t\t\t\tuser_id,\n\t\t\t\t\t\t\t\t\t\t\trev_id,\n\t\t\t\t\t\t\t\t\t\t\treservation_code,\n\t\t\t\t\t\t\t\t\t\t\treservation_type,\n\t\t\t\t\t\t\t\t\t\t\tcheckin_status);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tapp.getLogininfo().setLoginInfo(true);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tUpdateUiResult(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\tt.start();\n \n } else {\n Toast.makeText(getApplicationContext(),\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void setAuthCode(String authCode) {\n this.authCode=authCode;\n }", "private UserSession handleBasicAuthentication(String credentials, HttpServletRequest request) {\n\t\tString userPass = Base64Decoder.decode(credentials);\n\n\t\t// The decoded string is in the form\n\t\t// \"userID:password\".\n\t\tint p = userPass.indexOf(\":\");\n\t\tif (p != -1) {\n\t\t\tString userID = userPass.substring(0, p);\n\t\t\tString password = userPass.substring(p + 1);\n\t\t\t\n\t\t\t// Validate user ID and password\n\t\t\t// and set valid true if valid.\n\t\t\t// In this example, we simply check\n\t\t\t// that neither field is blank\n\t\t\tIdentity identity = WebDAVAuthManager.authenticate(userID, password);\n\t\t\tif (identity != null) {\n\t\t\t\tUserSession usess = UserSession.getUserSession(request);\n\t\t\t\tsynchronized(usess) {\n\t\t\t\t\t//double check to prevent severals concurrent login\n\t\t\t\t\tif(usess.isAuthenticated()) {\n\t\t\t\t\t\treturn usess;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tusess.signOffAndClear();\n\t\t\t\t\tusess.setIdentity(identity);\n\t\t\t\t\tUserDeletionManager.getInstance().setIdentityAsActiv(identity);\n\t\t\t\t\t// set the roles (admin, author, guest)\n\t\t\t\t\tRoles roles = BaseSecurityManager.getInstance().getRoles(identity);\n\t\t\t\t\tusess.setRoles(roles);\n\t\t\t\t\t// set authprovider\n\t\t\t\t\t//usess.getIdentityEnvironment().setAuthProvider(OLATAuthenticationController.PROVIDER_OLAT);\n\t\t\t\t\n\t\t\t\t\t// set session info\n\t\t\t\t\tSessionInfo sinfo = new SessionInfo(identity.getName(), request.getSession());\n\t\t\t\t\tUser usr = identity.getUser();\n\t\t\t\t\tsinfo.setFirstname(usr.getProperty(UserConstants.FIRSTNAME, null));\n\t\t\t\t\tsinfo.setLastname(usr.getProperty(UserConstants.LASTNAME, null));\n\t\t\t\t\tsinfo.setFromIP(request.getRemoteAddr());\n\t\t\t\t\tsinfo.setFromFQN(request.getRemoteAddr());\n\t\t\t\t\ttry {\n\t\t\t\t\t\tInetAddress[] iaddr = InetAddress.getAllByName(request.getRemoteAddr());\n\t\t\t\t\t\tif (iaddr.length > 0) sinfo.setFromFQN(iaddr[0].getHostName());\n\t\t\t\t\t} catch (UnknownHostException e) {\n\t\t\t\t\t\t // ok, already set IP as FQDN\n\t\t\t\t\t}\n\t\t\t\t\tsinfo.setAuthProvider(BaseSecurityModule.getDefaultAuthProviderIdentifier());\n\t\t\t\t\tsinfo.setUserAgent(request.getHeader(\"User-Agent\"));\n\t\t\t\t\tsinfo.setSecure(request.isSecure());\n\t\t\t\t\tsinfo.setWebDAV(true);\n\t\t\t\t\tsinfo.setWebModeFromUreq(null);\n\t\t\t\t\t// set session info for this session\n\t\t\t\t\tusess.setSessionInfo(sinfo);\n\t\t\t\t\t//\n\t\t\t\t\tusess.signOn();\n\t\t\t\t\treturn usess;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@GetMapping(\"/profile\")\n public ModelAndView profile(Principal p){\n\n LdapQuery query = query()\n .attributes(\"cn\",\"sn\",\"mail\") // Attributes you want to get\n .base(LdapUtils.emptyLdapName())\n .where(\"uid\") // Query field name\n .is(p.getName()); // Query value\n List<Person> result = ldapTemplate.search( query, new PersonAttributesMapper() );\n Person person = result.get(0);\n\n ModelAndView mav = new ModelAndView();\n mav.setViewName(\"profile\");\n mav.addObject(\"person\", person);\n\n // For testing purpose\n // Next call will create individual LdapTemplate for calls\n Person tom = ldapClient.getPersonByUidFromDocker(\"tom\");\n List<Person> people = ldapClient.getPeopleFromFreeLdap();\n\n mav.addObject(\"tom\", tom);\n mav.addObject(\"people\", people);\n mav.addObject(\"peopleSearch\", ldapClient.getPeopleFromFreeLdapWithSearch());\n\n return mav;\n }", "private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.e(TAG, \"Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n\n Toast.makeText(context, personName + \"\\n\" + email, Toast.LENGTH_SHORT).show();\n\n /*txtName.setText(personName);\n txtEmail.setText(email);*/\n\n // by default the profile url gives 50x50 px image only\n // we can replace the value with whatever dimension we want by\n // replacing sz=X\n /*personPhotoUrl = personPhotoUrl.substring(0,\n personPhotoUrl.length() - 2)\n + PROFILE_PIC_SIZE;\n\n new LoadProfileImage(imgProfilePic).execute(personPhotoUrl);*/\n\n } else {\n Toast.makeText(context,\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public UserProfile getUserProfile() {return userProfile;}", "private void getProfileInfo() {\n OkHttpClient client = new OkHttpClient.Builder()\n .cookieJar(new CookieJar() {\n private final HashMap<HttpUrl, List<Cookie>> cookieStore = new HashMap<>();\n @Override\n public void saveFromResponse(HttpUrl url, List<Cookie> cookies) {\n cookieStore.put(url, cookies);\n }\n\n @Override\n public List<Cookie> loadForRequest(HttpUrl url) {\n List<Cookie> cookies = cookieStore.get(url);\n return cookies != null ? cookies : new ArrayList<>();\n }\n })\n .build();\n\n AsyncTask.execute(() -> {\n try {\n HttpUrl url = HttpUrl.parse(URL + \"/nuh/myprofile\")\n .newBuilder()\n .build();\n\n Request requestToken = new Request.Builder()\n .url(url)\n .build();\n\n client.newCall(requestToken).execute();\n String token = \"\";\n\n List<Cookie> cookies = client.cookieJar().loadForRequest(url);\n for (Cookie cookie : cookies) {\n if (cookie.name().equals(\"csrftoken\")) {\n token = cookie.value();\n }\n }\n\n Request request = new Request.Builder()\n .header(\"X-CSRFToken\", token)\n .url(URL + \"/nuh/myprofile\")\n .build();\n\n Response response = client.newCall(request).execute();\n if (response.isSuccessful()) {\n String JSON = response.body().string();\n Log.d(\"JSON\", \"getProfileInfo: JSON: \" + JSON);\n JSONArray array = new JSONArray(JSON);\n JSONObject usernameObj = array.getJSONObject(0);\n String username = usernameObj.getString(\"username\");\n JSONObject firstNameObj = array.getJSONObject(1);\n String firstName = firstNameObj.getString(\"first_name\");\n JSONObject lastNameObj = array.getJSONObject(2);\n String lastName = lastNameObj.getString(\"last_name\");\n JSONObject emailObj = array.getJSONObject(3);\n String email = emailObj.getString(\"e_mail\");\n\n JSONObject categoriesObj = array.getJSONObject(4);\n String needFood = categoriesObj.getString(\"get_food\");\n String needAccomodation = categoriesObj.getString(\"get_accommodation\");\n String needClothes = categoriesObj.getString(\"get_clothes\");\n String needMedicine = categoriesObj.getString(\"get_medicine\");\n String needOther = categoriesObj.getString(\"get_other\");\n String giveFood = categoriesObj.getString(\"give_food\");\n String giveAccomodation = categoriesObj.getString(\"give_accommodation\");\n String giveClothes = categoriesObj.getString(\"give_clothes\");\n String giveMedicine = categoriesObj.getString(\"give_medicine\");\n String giveOther = categoriesObj.getString(\"give_other\");\n double latitude = categoriesObj.getDouble(\"latitude\");\n double longitude = categoriesObj.getDouble(\"longitude\");\n\n SharedPreferences.Editor editor = getSharedPreferences(HELP_CATEGORIES, MODE_PRIVATE).edit();\n editor.putString(USERNAME, username);\n editor.putString(FIRST_NAME, firstName);\n editor.putString(LAST_NAME, lastName);\n editor.putString(EMAIL, email);\n editor.putBoolean(FOOD_NEED, needFood != null);\n editor.putBoolean(ACCOMODATION_NEED, needAccomodation != null);\n editor.putBoolean(CLOTHES_NEED, needClothes != null);\n editor.putBoolean(MEDICINE_NEED, needMedicine != null);\n editor.putBoolean(OTHER_NEED, needOther != null);\n editor.putBoolean(FOOD_GIVE, giveFood != null);\n editor.putBoolean(ACCOMODATION_GIVE, giveAccomodation != null);\n editor.putBoolean(CLOTHES_GIVE, giveClothes != null);\n editor.putBoolean(MEDICINE_GIVE, giveMedicine != null);\n editor.putBoolean(OTHER_GIVE, giveOther != null);\n editor.putString(FOOD_NEED_TEXT, needFood);\n editor.putString(ACCOMODATION_NEED_TEXT, needAccomodation);\n editor.putString(CLOTHES_NEED_TEXT, needClothes);\n editor.putString(MEDICINE_NEED_TEXT, needMedicine);\n editor.putString(OTHER_NEED_TEXT, needOther);\n editor.putString(FOOD_GIVE_TEXT, giveFood);\n editor.putString(ACCOMODATION_GIVE_TEXT, giveAccomodation);\n editor.putString(CLOTHES_GIVE_TEXT, giveClothes);\n editor.putString(MEDICINE_GIVE_TEXT, giveMedicine);\n editor.putString(OTHER_GIVE_TEXT, giveOther);\n editor.apply();\n getSharedPreferences(LOGIN, MODE_PRIVATE)\n .edit()\n .putString(LATITUDE, String.valueOf(latitude))\n .putString(LONGITUDE, String.valueOf(longitude))\n .apply();\n\n } else {\n runOnUiThread(() -> Toast.makeText(this, \"Something went wrong\", Toast.LENGTH_SHORT).show());\n }\n } catch (IOException | JSONException e) {\n e.printStackTrace();\n }\n });\n }", "public void getProfileInformation() {\n\n\t\t mAsyncRunner.request(\"me\", new RequestListener() {\n\t\t\t @Override\n\t\t\t public void onComplete(String response, Object state) {\n\t\t\t\t Log.d(\"Profile\", response);\n\t\t\t\t String json = response;\n\t\t\t\t try {\n\t\t\t\t\t // Facebook Profile JSON data\n\t\t\t\t\t JSONObject profile = new JSONObject(json);\n\n\t\t\t\t\t uName = profile.getString(\"name\");\n\t\t\t\t\t uMail = profile.getString(\"email\");\n\t\t\t\t\t //uGender=profile.getString(\"gender\");\n\n\n\t\t\t\t\t //final String birthday=profile.getString(\"birthday\");\n\t\t\t\t\t runOnUiThread(new Runnable() {\n\t\t\t\t\t\t @Override\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\t //Toast.makeText(getApplicationContext(), \"Name: \" + name + \"\\nEmail: \" + email+\"\\nGender: \"+gender, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t getResponse();\n\t\t\t\t\t\t }\n\t\t\t\t\t });\n\t\t\t\t } \n\t\t\t\t catch (JSONException e) \n\t\t\t\t {\n\t\t\t\t\t errorMessage = \"JSON Error Occured\";\n\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t }\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onIOException(IOException e, Object state) {\n\t\t\t\t errorMessage = \"Facebook Data read Error Occured\";\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onFileNotFoundException(FileNotFoundException e, Object state) {\n\t\t\t\t errorMessage = \"Facebook Image read Error Occured\";\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onMalformedURLException(MalformedURLException e,\n\t\t\t\t\t Object state) {\n\t\t\t\t errorMessage = \"Facebook URL Error Occured\";\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onFacebookError(FacebookError e, Object state) {\n\t\t\t\t errorMessage = \"Facebook Error Occured OnFacebook\";\n\t\t\t }\n\t\t });\n\t }", "@Override\n protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain,\n Authentication authResult) throws IOException, ServletException {\n ApiUser apiUser = this.apiUsersService.getApiUserByUserName(((User) authResult.getPrincipal()).getUsername());\n String jwtToken = Jwts.builder()\n .setSubject(((User) authResult.getPrincipal()).getUsername())\n .setExpiration(new Date(System.currentTimeMillis() + EXPIRATION_TIME))\n .claim(\"authorities\", ((User) authResult.getPrincipal()).getAuthorities().toArray())\n .claim(\"firstName\", apiUser.getFirstName())\n .claim(\"lastName\", apiUser.getLastName())\n .claim(\"apiUserId\", apiUser.getId())\n .signWith(SignatureAlgorithm.HS512, SECRET.getBytes(StandardCharsets.UTF_8))\n .compact();\n try {\n response.getWriter().write(TOKEN_PREFIX + jwtToken);\n this.eventsService.createEvent(new Event(\"Logged In\", apiUser,\n new Date(System.currentTimeMillis()).getTime(), false));\n } catch (Exception e) {\n authLogger.warn(e.getMessage());\n throw (e);\n }\n response.setStatus(HttpServletResponse.SC_ACCEPTED);\n }", "protected synchronized String authenticated() throws JSONException {\n JSONObject principal = new JSONObject()\n .put(FIELD_USERNAME, USER)\n .put(FIELD_PASSWORD, PASSWORD);\n if (token == null){ //Avoid authentication in each call\n token =\n given()\n .basePath(\"/\")\n .contentType(ContentType.JSON)\n .body(principal.toString())\n .when()\n .post(LOGIN)\n .then()\n .statusCode(200)\n .extract()\n .header(HEADER_AUTHORIZATION);\n\n }\n return token;\n }", "public String getAccessCookie(final String authCode) throws IOException,\n\t\t\tJSONException {\n\t\tCredential credential = getUsercredential(authCode);\n\t\tString accessToken = credential.getAccessToken();\n\t\tSystem.out.println(accessToken);\n\t\treturn accessToken;\n\t}", "static public User getUser(HttpServletRequest request) {\n String accessToken = request.getParameter(\"access_token\");\n if (accessToken == null) {\n return null;\n } else {\n try {\n URL url = new URL(\n \"https://www.googleapis.com/oauth2/v1/tokeninfo\"\n + \"?access_token=\" + accessToken);\n\n Map<String, String> userData = mapper.readValue(\n new InputStreamReader(url.openStream(), \"UTF-8\"),\n new TypeReference<Map<String, String>>() {\n });\n if (userData.get(\"audience\") == null\n || userData.containsKey(\"error\")\n || !userData.get(\"audience\")\n .equals(Constants.CLIENT_ID)) {\n return null;\n } else {\n String email = userData.get(\"email\"),\n userId = userData.get(\"user_id\");\n User user = null;\n PersistenceManager pm = PMF.get().getPersistenceManager();\n try {\n user = pm.getObjectById(User.class, userId);\n } catch (JDOObjectNotFoundException ex) {\n user = new User(userId, email);\n pm.makePersistent(user);\n } finally {\n pm.close();\n }\n return user;\n }\n } catch (Exception ex) {\n System.err.println(ex.getMessage());\n return null;\n }\n }\n }", "void getProfile(@NonNull final String profileId, @Nullable Callback<ComapiResult<Map<String, Object>>> callback);", "public String getProfile();", "@GetMapping(produces = { JSON, XML }, path = \"/profile/{id}\")\t\n\tpublic ResponseEntity<ProfileDTO> getProfile(@PathVariable(\"id\") int id, \n\t\t\t@RequestHeader(HttpHeaders.ACCEPT) Version version) { \n\t\t\n\t\tif(!principal.isAuthorized()) {\n\t\t\treturn ResponseEntity.ok(profileService.read(id, true, version));\n\t\t} \n\t\t\n\t\tUser issuer = getCurrentUser();\n\t\t\n\t\tif (issuer.getIdAsInt() == id) {\n\t\t\treturn ResponseEntity.ok(profileService.read(id, false, version));\n\t\t} else {\n\t\t\tProfileDTO fetched = profileService.read(id, true, version);\n\t\t\t\n\t\t\tif (fetched != null) {\n\t\t\t\tguestService.visitUserProfile(id, issuer.getIdAsInt(), false);\n\t\t\t}\n\t\t\t\n\t\t\treturn ResponseEntity.ok(fetched);\n\t\t}\n\t}", "private void handleResponseAfterSignIn(int requestCode, int resultCode, Intent data) {\n IdpResponse response = IdpResponse.fromResultIntent(data);\n\n if (requestCode == RC_SIGN_IN) {\n if (resultCode == RESULT_OK) { // SUCCESS\n getUserInfoFromFirebaseAuth(); // Get user info from firebase auth\n\n WorkmateHelper.isWorkmateExist(task -> {\n if (task.isSuccessful()) { // they are document to parse\n for (QueryDocumentSnapshot document : task.getResult())\n if (document.getId().equals(mUserMailAddress)) { // Is the document exist we leave\n startActivity(new Intent(mContext, MainActivity.class)); // Start main activity if log succeed\n return;\n }\n WorkmateHelper.createWorkmate(mUserName, mUserProfilePicture, mUserMailAddress); // Create User on DB\n } else\n Log.d(\"tag\", \"Error getting documents: \", task.getException());\n\n startActivity(new Intent(mContext, MainActivity.class));\n });\n\n } else { // ERRORS\n if (response == null) {\n Toast.makeText(this,getString(R.string.error_authentication_canceled), Toast.LENGTH_LONG).show() ;\n logOut();\n } else if (Objects.requireNonNull(response.getError()).getErrorCode() == ErrorCodes.NO_NETWORK) {\n Toast.makeText(this,getString(R.string.error_no_internet), Toast.LENGTH_LONG).show() ;\n } else {\n Toast.makeText(this,getString(R.string.unknown_error), Toast.LENGTH_LONG).show() ;\n }\n }\n }\n }", "public void login(HttpServletRequest req, HttpServletResponse res) throws IOException {\n\n // Client credentials\n Properties p = GlobalSettings.getNode(\"oauth.password-credentials\");\n String clientId = p.getProperty(\"client\");\n String secret = p.getProperty(\"secret\");\n ClientCredentials clientCredentials = new ClientCredentials(clientId, secret);\n\n // User credentials\n String username = req.getParameter(\"username\");\n String password = req.getParameter(\"password\");\n UsernamePassword userCredentials = new UsernamePassword(username, password);\n\n // Create request\n TokenResponse oauth = TokenRequest.newPassword(userCredentials, clientCredentials).post();\n if (oauth.isSuccessful()) {\n PSToken token = oauth.getAccessToken();\n\n // If open id was defined, we can get the member directly\n PSMember member = oauth.getMember();\n if (member == null) {\n member = OAuthUtils.retrieve(token);\n }\n\n if (member != null) {\n OAuthUser user = new OAuthUser(member, token);\n HttpSession session = req.getSession(false);\n String goToURL = this.defaultTarget;\n if (session != null) {\n ProtectedRequest target = (ProtectedRequest)session.getAttribute(AuthSessions.REQUEST_ATTRIBUTE);\n if (target != null) {\n goToURL = target.url();\n session.invalidate();\n }\n }\n session = req.getSession(true);\n session.setAttribute(AuthSessions.USER_ATTRIBUTE, user);\n res.sendRedirect(goToURL);\n } else {\n LOGGER.error(\"Unable to identify user!\");\n res.sendError(HttpServletResponse.SC_FORBIDDEN);\n }\n\n } else {\n LOGGER.error(\"OAuth failed '{}': {}\", oauth.getError(), oauth.getErrorDescription());\n if (oauth.isAvailable()) {\n res.sendError(HttpServletResponse.SC_FORBIDDEN);\n } else {\n res.sendError(HttpServletResponse.SC_BAD_GATEWAY);\n }\n }\n\n }", "@Override\n protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token)\n throws AuthenticationException {\n\n LOG.info(\"Obtaining authentication info\");\n\n /* Any leading and/or trailing white space contained in the credentials\n * (password) has been stripped out before it gets here.\n */\n try {\n if (token instanceof OAuthToken) {\n // Principal = email\n // Credentials = authenticator\n LOG.info(\"Authentication is using OAuth\");\n return new SimpleAccount(\n token.getPrincipal(), \n token.getCredentials(), \n \"CloudSession\");\n } else {\n LOG.info(\"Authentication is using local login authority\");\n\n // Principal = login\n String principal = (String) token.getPrincipal();\n\n // Credentials = password\n String credentials = new String((char[]) token.getCredentials());\n\n LOG.info(\"Authenticating user '{}'\", principal);\n\n // Thia can throw a NullPointerException\n User user = SecurityServiceImpl.authenticateLocalUserStatic(\n principal, \n credentials);\n\n if (user == null) {\n LOG.info(\"No exception but user object is null\");\n return null;\n }\n\n LOG.info(\"User {} is authenticated\", principal);\n\n try {\n return new SimpleAccount(\n token.getPrincipal(), \n token.getCredentials(), \n \"CloudSession\");\n } catch (Throwable t) {\n LOG.error(\"Unexpected exception creating account object\", t);\n }\n }\n throw new AuthenticationException(\"Unable to authenticate token\");\n }\n catch (UnknownUserException ex) {\n LOG.warn(\"Authentication failed. Message: {}\", ex.getMessage());\n throw new AuthenticationException(ex.getMessage());\n }\n catch (UserBlockedException ex) {\n LOG.warn(\"Blocked user {}\", ex);\n throw new AuthenticationException(ex.getMessage());\n }\n catch (EmailNotConfirmedException ex) {\n LOG.warn(\"Authentication failed. Message: {}\", ex.getMessage());\n throw new AuthenticationException(\"EmailNotConfirmed\");\n }\n catch (InsufficientBucketTokensException ex) {\n LOG.info(\"Insufficient bucket tokens: {}\", ex.getMessage());\n throw new AuthenticationException(ex.getMessage());\n }\n catch (NullPointerException npe) {\n LOG.warn(\"NullPointer\", npe);\n throw new AuthenticationException(npe.getMessage());\n }\n catch (Throwable t) {\n // This is a catchall exception handler that kicks the can back\n // to the caller\n LOG.warn(\"Throwable\", t);\n }\n\n return null;\n }", "@Override\n protected void processAuthenticationResponse(HttpServletRequest request, HttpServletResponse response,\n AuthenticationContext context) throws AuthenticationFailedException {\n Map<String, String> authenticatorProperties = context.getAuthenticatorProperties();\n String apiKey = authenticatorProperties.get(Token2Constants.APIKEY);\n String userToken = request.getParameter(Token2Constants.CODE);\n String id = getUserId(context);\n String json = validateToken(Token2Constants.TOKEN2_VALIDATE_ENDPOINT, apiKey, id, Token2Constants.JSON_FORMAT,\n userToken);\n Map<String, Object> userClaims;\n userClaims = JSONUtils.parseJSON(json);\n if (userClaims != null) {\n String validation = String.valueOf(userClaims.get(Token2Constants.VALIDATION));\n if (validation.equals(\"true\")) {\n context.setSubject(AuthenticatedUser\n .createLocalAuthenticatedUserFromSubjectIdentifier(\"an authorised user\"));\n } else {\n throw new AuthenticationFailedException(\"Given hardware token has been expired or is not a valid token\");\n }\n } else {\n throw new AuthenticationFailedException(\"UserClaim object is null\");\n }\n }", "@Override\n\tpublic void authInfoRequested(LinphoneCore lc, String realm, String username) {\n\t\t\n\t}", "private void retrieveBasicUserInfo() {\n //TODO: Check out dagger here. New retrofit interface here every time currently.\n UserService service = ServiceFactory.getInstagramUserService();\n service.getUser(mAccessToken)\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new Subscriber<Response<MediaResponse<User>>>() {\n @Override\n public void onCompleted() {\n }\n\n @Override\n public void onError(Throwable e) {\n Log.e(MY_USER_FRAGMENT, e.getLocalizedMessage());\n }\n\n @Override\n public void onNext(Response<MediaResponse<User>> response) {\n // Looks for instagram error response.\n ResponseBody errorBody = response.errorBody();\n if (!response.isSuccessful() && errorBody != null) {\n try {\n Converter<ResponseBody, MediaResponse> errorConverter = ServiceFactory.getRetrofit().responseBodyConverter(MediaResponse.class, new Annotation[0]);\n MediaResponse mediaError = errorConverter.convert(response.errorBody());\n Toast.makeText(getContext(), mediaError.getMeta().getErrorMessage(), Toast.LENGTH_LONG).show();\n\n if (mediaError.getMeta().getErrorType().equals(getString(R.string.o_auth_error))) {\n oauthEventFired = true;\n EventBus.getDefault().post(new ExpiredOAuthEvent(true));\n }\n } catch (IOException e) {\n Log.e(MY_USER_FRAGMENT, \"There was a problem parsing the error response.\");\n }\n } else {\n showUserInfo(response.body().getData());\n }\n }\n });\n }", "ApplicationProfile getApplicationProfile();", "public UserProtheus requestUserProtheusByCode() {\n\n // Define url for request.\n urlPath = \"http://{ipServer}:{portServer}/REST/GET/JWSRUSERS/cod/{userCode}\";\n urlPath = urlPath.replace(\"{ipServer}\", ipServer);\n urlPath = urlPath.replace(\"{portServer}\", portServer);\n urlPath = urlPath.replace(\"{userCode}\", userProtheus.getCode());\n\n try {\n\n // Set URL for request.\n url = new URL(urlPath);\n\n // Set key for authorization basic\n authorizationBasic = \"Basic \" + Base64.encodeToString((userProtheus.getCode()+ \":\" + userProtheus.getPassword()).getBytes() , Base64.DEFAULT);\n\n // Open connection HTTP.\n httpConnection = (HttpURLConnection) url.openConnection();\n\n // set header for request.\n httpConnection.setRequestMethod(\"GET\");\n httpConnection.setRequestProperty(\"Content-type\", \"application/json\");\n httpConnection.setRequestProperty(\"Accept\", \"application/json\");\n httpConnection.setRequestProperty(\"Authorization\", authorizationBasic);\n httpConnection.setDoOutput(true);\n httpConnection.setDoInput(true);\n httpConnection.setConnectTimeout(5000);\n httpConnection.connect();\n\n // Get response.\n bufferedLine = \"\";\n bufferedReader = new BufferedReader(new InputStreamReader(url.openStream()));\n while ((bufferedLine = bufferedReader.readLine()) != null) {\n httpReturn.append(bufferedLine);\n }\n\n // Set userProtheus with json reponse.\n userProtheus = new Gson().fromJson(httpReturn.toString(), UserProtheus.class);\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (ProtocolException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return userProtheus;\n\n }", "@Override\n public User getUserByActivationCode(String activationCode) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_ACTIVATION_CODE);\n params.put(User.PARAM_ACTIVATION_CODE, activationCode);\n return getRepository().getEntity(User.class, params);\n }", "@Override\n public void onSuccess(CognitoUserDetails cognitoUserDetails) {\n String email = cognitoUserDetails.getAttributes().getAttributes().get(ATTR_EMAIL);\n String uid = cognitoUserDetails.getAttributes().getAttributes().get(ATTR_SUB);\n String userName = mCognitoUser.getUserId();\n prefManager.setEmail(email);\n prefManager.setUsername(userName);\n prefManager.setUid(uid);\n prefManager.setIsGuest(false);\n mCallback.onSignInSuccess();\n }", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n helper.init(req, resp);\n Language locale = Language.getByLocale(\n (String) helper.getSessionAttribute(SESSION_LANGUAGE));\n\n User user = (User) helper.getSessionAttribute(SESSION_CURRENT_USER);\n\n if (user != null) {\n Optional<User> opt = userService.findById(user.getUserId(), locale);\n if (opt.isPresent()) {\n user = opt.get();\n\n prepareLevel(user, req, locale);\n prepareAchievements(user, req, locale);\n prepareProgression(user, req, locale);\n\n helper.setSessionAttribute(SESSION_CURRENT_USER, user);\n }\n helper.dispatch(Destination.GOTO_PROFILE);\n } else {\n helper.redirect(Destination.GOTO_AUTHORIZATION);\n }\n }", "public User getUserByActivationCode(String activationCode) throws UserManagementException;", "public void customLoginTwitter() {\n //check if user is already authenticated or not\n if (getTwitterSession() == null) {\n\n //if user is not authenticated start authenticating\n client.authorize(this, new Callback<TwitterSession>() {\n @Override\n public void success(Result<TwitterSession> result) {\n\n // Do something with result, which provides a TwitterSession for making API calls\n TwitterSession twitterSession = result.data;\n fetchTwitterEmail(twitterSession);\n }\n\n @Override\n public void failure(TwitterException e) {\n // Do something on failure\n Toast.makeText(SignInActivity.this, \"Failed to authenticate. Please try again.\", Toast.LENGTH_SHORT).show();\n }\n });\n } else {\n //if user is already authenticated direct call fetch twitter email api\n Toast.makeText(this, \"User already authenticated\", Toast.LENGTH_SHORT).show();\n// fetchTwitterEmail(getTwitterSession());\n }\n }", "void getProfile(@NonNull final String profileId, @Nullable Callback<ComapiResult<ComapiProfile>> callback);", "UserDetails getDetails();", "String getProfile();", "@Override\n\tpublic Authentication authenticate(Authentication authentication) throws AuthenticationException {\n\t\tString userId = authentication.getPrincipal().toString();\n\t\tString password = authentication.getCredentials().toString();\n\t\tUserInfo userAuth = Config.getInstance().getUserAuth();\n\t\tuserAuth.setUserEmail(userId);\n\t\tuserAuth.setUserPassword(password);\n\t\tLoginService loginService = Config.getInstance().getLoginService();\n\t\tUserInfo userInfo;\n\t\ttry{\n\t\t\tuserInfo = loginService.authenticateUser(userId,password);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new AuthenticationServiceException(\"1000\");\n\t\t}\n\t\tif (userInfo != null)\n\t\t{\n\t\t\treturn grantNormalRole(userInfo, authentication);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// No user with this banner id found.\n\t\t\tthrow new BadCredentialsException(\"1001\");\n\t\t}\n\t}", "@Override\n public void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException,\n IOException {\n \n final JsonMessage message = new JsonMessage(200, this.getClass().getName());\n \n try {\n final Map<String, String> parameters = getParameters(request);\n final RequestCode code = requestCodeMap.get(parameters.get(\"code\"));\n final String login = parameters.get(\"login\");\n final String password = parameters.get(\"password\");\n \n switch (code) {\n case READ :\n message.setMethod(\"READ\");\n if (login == null) {\n throw new InternalBackEndException(\"login argument missing!\");\n } else if (password == null) {\n throw new InternalBackEndException(\"password argument missing!\");\n } else {\n message.addData(\"warning\", \"METHOD DEPRECATED - Post method should be used instead of Get!\");\n final MUserBean userBean = authenticationManager.read(login, password);\n message.setDescription(\"Successfully authenticated\");\n message.addData(\"user\", getGson().toJson(userBean));\n }\n break;\n case DELETE :\n throw new InternalBackEndException(\"not implemented yet...\");\n default :\n throw new InternalBackEndException(\"AuthenticationRequestHandler(\" + code + \") not exist!\");\n }\n } catch (final AbstractMymedException e) {\n e.printStackTrace();\n MLogger.info(\"Error in doGet operation\");\n MLogger.debug(\"Error in doGet operation\", e.getCause());\n message.setStatus(e.getStatus());\n message.setDescription(e.getMessage());\n }\n \n printJSonResponse(message, response);\n }", "@RequestMapping(\"/welcome2\")\n\n public String gatherFbData(@RequestParam(\"code\") String code,\n HttpServletResponse response, Model model) {\n //verifies code recieved from fb login\n if (code == null || code.equals(\"\")) {\n throw new RuntimeException(\n \"ERROR: Didn't get code parameter in callback\");\n }\n\n FBConnection fbConnection = new FBConnection();\n //gathers accessToken using code\n String accessToken = fbConnection.getAccessToken(code);\n //gathers fbGraph String using accessToken\n FBGraph fbGraph = new FBGraph(accessToken);\n String graph = fbGraph.getFBGraph();\n Map fbProfileData = fbGraph.getGraphData(graph);\n //stores fbId locally\n String id = fbProfileData.get(\"id\").toString();\n //creates cookie with user fbId, set cookie to expire when browser closes, attaches cookie HttpServlet\n Cookie userCookie = new Cookie(\"userTag\", id);\n userCookie.setMaxAge(-1);\n response.addCookie(userCookie);\n\n if (accessUser.userIdExists(id)) {\n //use fbId to access user within database\n User newUser = accessUser.selectUser(id);\n //gather userName to attach to model to send to view\n String userName = newUser.getName();\n //loads userPrefences intially when user logins\n userPreferences.buildUserPreferences(id);\n //add userName to model to display on welcomeExists\n model.addAttribute(\"message\", userName);\n return\n \"welcomeExists\";\n } else {\n //loads userPrefernces intially when user logins, for new user this loads \"empty preferences\"\n userPreferences.buildUserPreferences(id);\n return \"welcomeNew\";\n }\n }", "private void verifyCode(String code) {\n // below line is used for getting getting\n // credentials from our verification id and code.\n PhoneAuthCredential credential = PhoneAuthProvider.getCredential(verificationId, code);\n\n // after getting credential we are\n // calling sign in method.\n signInWithCredential(credential);\n }", "@RequestMapping(value = \"/callback\", method = RequestMethod.GET)\n public String saveCode(Principal p, HttpSession session,\n @RequestParam(value = \"code\", required = false, defaultValue = \"\") String code) {\n if (p == null || code.isEmpty()) {\n return \"login\";\n } else {\n Authorizer auth = (Authorizer) session.getAttribute(\"authorizer\");\n session.removeAttribute(\"authorizer\");\n CredentialWrapper credential = auth.getCredential(p.getName(), code);\n credentialRepository.save(credential);\n }\n \n return \"index\";\n }", "public static void getUserInfoFromOIDC(HttpServletRequest req,HttpServletResponse resp) throws IOException, InterruptedException\n\t{\n\t\tCookie c[]=req.getCookies(); \n\t\tString accessToken=null;\n\t\t//c.length gives the cookie count \n\t\tfor(int i=0;i<c.length;i++){ \n\t\t if(c[i].getName().equals(\"access_token\"))\n\t\t\t accessToken=c[i].getValue();\n\t\t}\n\t\t//Send HTTP Post request to get the users profile to msOIDC userinfo endpoint\n\t\tHttpRequest IDTokKeyVerified = HttpRequest.newBuilder()\n\t\t .uri(URI.create(\"http://localhost:8080/OPENID/msOIDC/userinfo\"))\n\t\t .POST(BodyPublishers.ofString(\"\"))\n\t\t .header(\"client_id\",\"mano.lmfsktkmyj\")\n\t\t .header(\"scope\",\"profile\")\n\t\t .header(\"access_token\",accessToken)\n\t\t .build();\n\t\tHttpClient client = HttpClient.newHttpClient();\n\t\t // Send HTTP request\n\t HttpResponse<String> tokenResponse;\n\t\ttokenResponse = client.send(IDTokKeyVerified,\n\t HttpResponse.BodyHandlers.ofString());\n\t\t\t\t\t\t\n\t\t//Enclosed the response in map datastructure ,it is easy to parse the response\n\t\tMap<String,Object> validateissuer_resp=processJSON(tokenResponse.body().replace(\"{\", \"\").replace(\"}\",\"\"));\n\t\tresponseFormat(validateissuer_resp, resp);\n\t}", "public UserInfo getUserInfoByToken(String token) {\n LOGGER.debug(\"Start user info request to OAuth service\");\n\n try {\n HttpHeaders headers = new HttpHeaders();\n headers.setBearerAuth(token);\n HttpEntity<Object> applicationRequest = new HttpEntity<>(headers);\n return UserInfoBuilder.buildWithEnv(env,\n restTemplate\n .exchange(userInfoUrl,\n HttpMethod.GET,\n applicationRequest,\n JsonNode.class)\n .getBody());\n } catch (ResourceAccessException | HttpStatusCodeException e) {\n throw new AuthenticationServiceException(\"Error during request\", e);\n }\n }", "public java.lang.String CC_GetMobileUserInfo(java.lang.String accessToken, java.lang.String accessCode) throws java.rmi.RemoteException;", "@GetMapping(\"/my-profile/{login:\" + Constants.LOGIN_REGEX + \"}\")\n\t@Timed\n\tpublic ResponseEntity<ManagedUserVM> getUser(@PathVariable String login) {\n\t\tLOGGER.debug(\"REST request to get User : {}\", login);\n\t\treturn userService.getUserWithAuthoritiesByLogin(login).map(ManagedUserVM::new)\n\t\t\t\t.map(managedUserVM -> new ResponseEntity<>(managedUserVM, HttpStatus.OK))\n\t\t\t\t.orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n\t}", "@Test\n public void getUser() throws Exception {\n String tokenLisa = authenticationService.authorizeUser(userCredentialsLisa);\n User lisa = service.getUser(tokenLisa, \"1\");\n User peter = service.getUser(tokenLisa, \"2\");\n\n assertNotNull(lisa);\n assertNotNull(peter);\n\n\n String tokenPeter = authenticationService.authorizeUser(userCredentialsPeter);\n lisa = service.getUser(tokenPeter, \"1\");\n peter = service.getUser(tokenPeter, \"2\");\n\n assertNull(lisa);\n assertNotNull(peter);\n }", "@GetMapping(\"/{id}\")\n public ResponseEntity<?> getUser(@PathVariable int id) {\n return profileService.getUserById(id);\n }", "@Override\n public void onAuthenticated(AuthData authData) {\n Intent intent = new Intent(getApplicationContext(), ActiveUserActivity.class);\n startActivity(intent);\n }", "@Override\r\n\t\t\tpublic void onSuccess(Void result) {\n\t\t\t\tsynAlert.clear();\r\n\t\t\t\tauthenticationController.initializeFromExistingAccessTokenCookie(new AsyncCallback<UserProfile>() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t\t\tsynAlert.handleException(caught);\r\n\t\t\t\t\t\tview.showLogin();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onSuccess(UserProfile result) {\r\n\t\t\t\t\t\t// Signed ToU. Check for temp username, passing record, and then forward\r\n\t\t\t\t\t\tuserAuthenticated();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}", "private static Object doAuth(Request req, Response res) {\n \n HashMap<String, String> response = new HashMap<>();\n\t\t \n String email = Jsoup.parse(req.queryParams(\"email\")).text();\n\t\t String password = Jsoup.parse(req.queryParams(\"password\")).text();\n\t\t\n res.type(Path.Web.JSON_TYPE);\n \t\t\n\t\t\n\t\tif(email != null && !email.isEmpty() && password != null && !password.isEmpty() ) {\n \n authenticate = new Authenticate(password);\n\t\t\t//note that the server obj has been created during call to login()\n\t\t\tString M2 = authenticate.getM2(server);\n\t\t\t\n if(M2 != null || !M2.isEmpty()) {\n \n \n\t\t\tSession session = req.session(true);\n\t\t\tsession.maxInactiveInterval(Path.Web.SESSION_TIMEOUT);\n\t\t\tUser user = UserController.getUserByEmail(email);\n\t\t\tsession.attribute(Path.Web.ATTR_USER_NAME, user.getUsername());\n session.attribute(Path.Web.ATTR_USER_ID, user.getId().toString()); //saves the id as String\n\t\t\tsession.attribute(Path.Web.AUTH_STATUS, authenticate.authenticated);\n\t\t\tsession.attribute(Path.Web.ATTR_EMAIL, user.getEmail());\n logger.info(user.toString() + \" Has Logged In Successfully\");\n \n response.put(\"M2\", M2);\n response.put(\"code\", \"200\");\n response.put(\"status\", \"success\");\n response.put(\"target\", Path.Web.DASHBOARD);\n \n String respjson = gson.toJson(response);\n logger.info(\"Final response sent By doAuth to client = \" + respjson);\n res.status(200);\n return respjson;\n }\n\t\t\t\t\n\t\t} \n \n res.status(401);\n response.put(\"code\", \"401\");\n response.put(\"status\", \"Error! Invalid Login Credentials\");\n \n return gson.toJson(response);\n }", "private void authorize(){\n\t\t\n\t\tURL authURL = null;\n\t\tURL homeURL = null;\n\t\tURLConnection homeCon = null;\n\t\t\n\t\tString loginPage = GG.GG_LOGIN+\"?ACCOUNT=\"+GG.GG_UID\n\t\t\t+\"&PASSWORD=\"+GG.GG_PASS;\n\t\tString cookieString = \"\";\n\t\tString cookieString1 = \"\";\n\t\t\n\t\ttry{\n\t\t\thomeURL = new URL(GG.GG_HOME);\n\t\t\thomeCon = homeURL.openConnection();\n\t\t\t\n\t\t\t// Look At the headers\n\t\t\tMap headerMap = homeCon.getHeaderFields();\n\t\t\t\n\t\t\t// Look for the Cookie\n\t\t\tif(headerMap.containsKey(\"Set-Cookie\")){\n\t\t\t\t\n\t\t\t\t// this gets the exact value of the header\n\t\t\t\t// otherwise gets some formatted string\n\t\t\t\tcookieString = homeCon.getHeaderField(\"Set-Cookie\");\n\t\t\t\t//log.finest(\"cookie1: \"+cookieString);\n\t\t\t\t\n\t\t\t\tauthURL = new URL(loginPage);\n\t\t\t\tHttpURLConnection.setFollowRedirects(false);\n\t\t\t\tHttpURLConnection loginCon = (HttpURLConnection) authURL.openConnection();\n\t\t\t\t\n\t\t\t\t// doOutput must be set before connecting\n\t\t\t\tloginCon.setAllowUserInteraction(true);\n\t\t\t\tloginCon.setUseCaches(false);\n\t\t\t\tloginCon.setDoOutput(true);\n\t\t\t\tloginCon.setRequestProperty(\"Cookie\", cookieString);\n\t\t\t\tloginCon.connect();\n\t\t\t\t\n\t\t\t\t// Look At the headers\n\t\t\t\tMap headerMap1 = loginCon.getHeaderFields();\n\t\t\t\t\n\t\t\t\tcookieString1 = loginCon.getHeaderField(\"Set-Cookie\");\n\t\t\t\t//log.finest(\"cookie2: \"+cookieString1);\n\t\t\t\tif(!Pattern.matches(\".*\\\\.\"+GG.GG_UID+\"\\\\.\\\\d+.*\", cookieString1)){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tString location = loginCon.getHeaderField(\"Location\");\n\t\t\t\tURL gotURL = new URL(location);\n\t\t\t\tHttpURLConnection gotCon = (HttpURLConnection) gotURL.openConnection();\n\t\t\t\t// doOutput must be set before connecting\n\t\t\t\tgotCon.setAllowUserInteraction(true);\n\t\t\t\tgotCon.setUseCaches(false);\n\t\t\t\tgotCon.setDoOutput(true);\n\t\t\t\tgotCon.setRequestProperty(\"Cookie\", cookieString);\n\t\t\t\tgotCon.setRequestProperty(\"Cookie\", cookieString1);\n\t\t\t\t\n\t\t\t\tgotCon.connect();\n\t\t\t\t\n\t\t\t\t// Got the Cookies\n\t\t\t\tcookies[0] = cookieString;\n\t\t\t\tcookies[1] = cookieString1;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tlog.info(\"Unable to find the Cookie\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\tauthorized = true;\n\t}", "protected void onSuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, Authentication authResult) throws IOException {\n }", "private void updateUserLogin() {\n\t\tSessionManager sessionManager = new SessionManager(\n\t\t\t\tMyApps.getAppContext());\n\n\t\tRequestParams params = new RequestParams();\n\t\tparams.add(\"user_id\", sessionManager.getUserDetail().getUserID());\n\n\t\tLog.d(\"EL\", \"userID: \" + sessionManager.getUserDetail().getUserID());\n\n\t\tKraveRestClient.post(WebServiceConstants.AV_UPDATE_USER_PROFILE_DATA_1,\n\t\t\t\tparams, new JsonHttpResponseHandler() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tJSONObject response) {\n\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tLog.d(\"EL\", \"response: \" + response.toString(2));\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\n\t\t\t\t\t\tsuper.onFailure(statusCode, headers, throwable,\n\t\t\t\t\t\t\t\terrorResponse);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "private void requestToken(){\n APIAuth auth = new APIAuth(this.prefs.getString(\"email\", \"\"), this.prefs.getString(\"password\", \"\"), this.prefs.getString(\"fname\", \"\") + \" \" +this.prefs.getString(\"lname\", \"\"), this.prefs, null);\n auth.authenticate();\n }", "private void handleSignInResult(GoogleSignInResult result) {\n if (result.isSuccess()) {\n // Signed in successfully, show authenticated UI.\n GoogleSignInAccount acct = result.getSignInAccount();\n test = (TextView) findViewById(R.id.tvTest);\n //ImageView prof = (ImageView) findViewById(R.id.iv_profile_icon);\n String personName = acct.getDisplayName();\n String personEmail = acct.getEmail();\n String personId = acct.getId();\n Uri personPhoto = acct.getPhotoUrl();\n\n test.setText(\"Logged in as: \" + personName);\n\n currentUser = new User(personName);\n if(currentUser == null) {\n Snackbar snackbar = Snackbar.make(\n coordinatorLayout, \"Logged in as \"+personName+\", but User class is NULL\",\n Snackbar.LENGTH_LONG);\n snackbar.show();\n }else{\n Snackbar snackbar = Snackbar.make(\n coordinatorLayout, \"Logged in as \"+personName+\". Welcome!\",\n Snackbar.LENGTH_LONG);\n snackbar.show();\n if (service != null) {\n service.setUserID(currentUser.getName());\n }\n }\n\n //mStatusTextView.setText(getString(R.string.signed_in_fmt, acct.getDisplayName()));\n //updateUI(true);\n } else {\n test = (TextView) findViewById(R.id.tvTest);\n test.setText(\"Please login with Google Login\");\n }\n }", "@Override\n public void onSuccess(Uri uri) {\n\n\n UserProfileChangeRequest profleUpdate = new UserProfileChangeRequest.Builder()\n .setDisplayName(name)\n .setPhotoUri(uri)\n .build();\n\n\n currentUser.updateProfile(profleUpdate)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if (task.isSuccessful()) {\n // user info updated successfully\n showMessage(\"Register Complete\");\n updateUI();\n }\n\n }\n });\n\n }", "@Override\n public void onSuccess(Uri uri) {\n\n\n UserProfileChangeRequest profleUpdate = new UserProfileChangeRequest.Builder()\n .setDisplayName(name)\n .setPhotoUri(uri)\n .build();\n\n\n currentUser.updateProfile(profleUpdate)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if (task.isSuccessful()) {\n // user info updated successfully\n showMessage(\"Register Complete\");\n updateUI();\n }\n\n }\n });\n\n }", "@Transactional\n public static Result login(Integer code, String email) {\n if (code == 666) {\n Usuario u = null;\n u = Sistema.getUsuario(email);\n if (u != null) {\n return ok(Json.toJson(u));\n }\n }\n return Results.badRequest();\n }" ]
[ "0.619334", "0.6130533", "0.6022236", "0.59430027", "0.591189", "0.5905309", "0.58737", "0.5867976", "0.5867772", "0.5861287", "0.5837636", "0.58228177", "0.58218247", "0.5805939", "0.57505697", "0.5746983", "0.57002956", "0.57002383", "0.56878287", "0.56756794", "0.5651597", "0.5641428", "0.5634941", "0.5622831", "0.55941325", "0.55683917", "0.55450207", "0.5539261", "0.5536286", "0.5535288", "0.5532552", "0.5522426", "0.55153376", "0.55106443", "0.5510556", "0.54929394", "0.5491618", "0.5490528", "0.5483413", "0.54790187", "0.5470302", "0.54657525", "0.54373664", "0.54286927", "0.5427416", "0.5426939", "0.5418809", "0.5417051", "0.5417042", "0.5415269", "0.54092145", "0.54076374", "0.5392044", "0.53892314", "0.5386548", "0.5377592", "0.53518456", "0.5347258", "0.5345184", "0.53395027", "0.53393", "0.53325474", "0.53294027", "0.5325691", "0.5318142", "0.5317973", "0.5310211", "0.530998", "0.530874", "0.5303775", "0.52954257", "0.52919275", "0.5291374", "0.5289013", "0.5285846", "0.5283158", "0.52805954", "0.5279005", "0.52684426", "0.5268014", "0.5258789", "0.525528", "0.5237216", "0.52341884", "0.52329814", "0.52287495", "0.522356", "0.5222142", "0.52141523", "0.5213781", "0.52120495", "0.5205166", "0.52009815", "0.51943004", "0.5194288", "0.51884055", "0.51857734", "0.5184054", "0.5184054", "0.51816475" ]
0.5464399
42
returns a google credential from a refresh token for accessing api services
public Credential getCredentialRefTkn(String refreshToken){ Credential credential = createCredentialWithRefreshToken(HTTP_TRANSPORT, JSON_FACTORY, new TokenResponse().setRefreshToken(refreshToken), CLIENT_ID, CLIENT_SECRET); return credential; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unused\")\n private static String getRefreshToken() throws IOException {\n String client_id = System.getenv(\"PICASSA_CLIENT_ID\");\n String client_secret = System.getenv(\"PICASSA_CLIENT_SECRET\");\n \n // Adapted from http://stackoverflow.com/a/14499390/1447621\n String redirect_uri = \"http://localhost\";\n String scope = \"http://picasaweb.google.com/data/\";\n List<String> scopes;\n HttpTransport transport = new NetHttpTransport();\n JsonFactory jsonFactory = new JacksonFactory();\n\n scopes = new LinkedList<String>();\n scopes.add(scope);\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, client_id, client_secret, scopes).build();\n GoogleAuthorizationCodeRequestUrl url = flow.newAuthorizationUrl();\n url.setRedirectUri(redirect_uri);\n url.setApprovalPrompt(\"force\");\n url.setAccessType(\"offline\");\n String authorize_url = url.build();\n \n // paste into browser to get code\n System.out.println(\"Put this url into your browser and paste in the access token:\");\n System.out.println(authorize_url);\n \n Scanner scanner = new Scanner(System.in);\n String code = scanner.nextLine();\n scanner.close();\n\n flow = new GoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, client_id, client_secret, scopes).build();\n GoogleTokenResponse res = flow.newTokenRequest(code).setRedirectUri(redirect_uri).execute();\n String refreshToken = res.getRefreshToken();\n String accessToken = res.getAccessToken();\n\n System.out.println(\"refresh:\");\n System.out.println(refreshToken);\n System.out.println(\"access:\");\n System.out.println(accessToken);\n return refreshToken;\n }", "private String getToken() {\n String keyFilePath = System.getenv(\"APE_API_KEY\");\n if (Strings.isNullOrEmpty(keyFilePath)) {\n File globalKeyFile = GlobalConfiguration.getInstance().getHostOptions().\n getServiceAccountJsonKeyFiles().get(GLOBAL_APE_API_KEY);\n if (globalKeyFile == null || !globalKeyFile.exists()) {\n CLog.d(\"Unable to fetch the service key because neither environment variable \" +\n \"APE_API_KEY is set nor the key file is dynamically downloaded.\");\n return null;\n }\n keyFilePath = globalKeyFile.getAbsolutePath();\n }\n if (Strings.isNullOrEmpty(mApiScope)) {\n CLog.d(\"API scope not set, use flag --business-logic-api-scope.\");\n return null;\n }\n try {\n Credential credential = GoogleCredential.fromStream(new FileInputStream(keyFilePath))\n .createScoped(Collections.singleton(mApiScope));\n credential.refreshToken();\n return credential.getAccessToken();\n } catch (FileNotFoundException e) {\n CLog.e(String.format(\"Service key file %s doesn't exist.\", keyFilePath));\n } catch (IOException e) {\n CLog.e(String.format(\"Can't read the service key file, %s\", keyFilePath));\n }\n return null;\n }", "public Credential getUsercredentialwithAccessToken(String accessToken) {\n\t\treturn new GoogleCredential.Builder().setTransport(HTTP_TRANSPORT)\n\t\t\t\t.setJsonFactory(new JacksonFactory())\n\t\t\t\t.setClientSecrets(CLIENT_ID, CLIENT_SECRET).build()\n\t\t\t\t.setAccessToken(accessToken);\n\t}", "public static GoogleCredential createCredentialWithRefreshToken(\n\t\t\tHttpTransport transport, JacksonFactory jsonFactory,\n\t\t\tTokenResponse tokenResponse, String clientId, String clientSecret) {\n\t\treturn new GoogleCredential.Builder().setTransport(HTTP_TRANSPORT)\n\t\t\t\t.setJsonFactory(new JacksonFactory())\n\t\t\t\t.setClientSecrets(clientId, clientSecret).build()\n\t\t\t\t.setFromTokenResponse(tokenResponse);\n\t}", "private GoogleCredential getGoogleCredential(String userId) {\t\t\n\t\t\n\t\ttry { \n\t\t\t// get the service account e-mail address and service account private key from property file\n\t\t\t// this email account and key file are specific for your environment\n\t\t\tif (SERVICE_ACCOUNT_EMAIL == null) {\n\t\t\t\tSERVICE_ACCOUNT_EMAIL = m_serverConfigurationService.getString(\"google.service.account.email\", \"\");\n\t\t\t}\n\t\t\tif (PRIVATE_KEY == null) {\n\t\t\t\tPRIVATE_KEY = m_serverConfigurationService.getString(\"google.private.key\", \"\");\n\t\t\t}\n\t\t\t\n\t\t\tGoogleCredential credential = getCredentialFromCredentialCache(userId);\n\t\t\treturn credential;\n\n\t\t} catch (Exception e) {\n\t\t\t// return null if an exception occurs while communicating with Google.\n\t\t\tM_log.error(\"Error creating a GoogleCredential object or requesting access token: \" + userId + \" \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "GoogleAuthenticatorKey createCredentials();", "private static String getAccessToken() throws IOException {\n\t\t \t\n\t\t GoogleCredential googleCredential = GoogleCredential\n\t .fromStream(new FileInputStream(path))\n\t .createScoped(Arrays.asList(SCOPES));\n\t\t \tgoogleCredential.refreshToken();\n\t\t \treturn googleCredential.getAccessToken();\n\t}", "public String getRefreshToken() {\r\n return refreshToken;\r\n }", "public String getRefreshToken(Credential credential) throws IOException,\n\t\t\tJSONException {\n\t\tString refreshToken = credential.getRefreshToken();\n\t\tSystem.out.println(refreshToken);\n\t\treturn refreshToken;\n\t}", "@Override\n\tpublic OauthAccessToken acquireOauthRefreshToken(String refreshToken) \n\t{\n\t\t\n\t\tString url = WeChatConst.WECHATOAUTHURL+WeChatConst.OAUTHREFRESHTOKENURI;\n\t\tMap<String, String> param = new HashMap<String, String>();\n\t\tparam.put(\"appid\", WeChatConst.APPID);\n\t\tparam.put(\"grant_type\", \"refresh_token\");\n\t\tparam.put(\"refresh_token\", refreshToken);\n\t\tString response = HttpClientUtils.doGetWithoutHead(url, param);\n\t\tlog.debug(\" acquireOauthRefreshToken response :\"+response);\n\t\ttry {\n\t\t\tJSONObject responseJson = JSONObject.parseObject(response);\n\t\t\tOauthAccessToken authAccessToken = new OauthAccessToken();\n\t\t\tif(!responseJson.containsKey(\"errcode\"))\n\t\t\t{\n\t\t\t\tauthAccessToken.setAccessToken(responseJson.getString(\"access_token\"));\n\t\t\t\tauthAccessToken.setExpiresIn(responseJson.getString(\"exoires_in\"));\n\t\t\t\tauthAccessToken.setOpenId(responseJson.getString(\"openid\"));\n\t\t\t\tauthAccessToken.setScope(responseJson.getString(\"scope\"));\n\t\t\t\treturn authAccessToken;\n\t\t\t}\n\t\t\treturn null;\n\t\t} catch (Exception e) {\n\t\t\tlog.error(e);\n\t\t}\n\t\treturn null;\n\t}", "private void refreshGoogleCalendarToken() {\n this.getGoogleToken();\n }", "public GoogleAuthHelper() {\n\t\t\n\t\tLoadType<ClientCredentials> credentials = ofy().load().type(ClientCredentials.class);\n\t\t\n\t\tfor(ClientCredentials credential : credentials) {\n\t\t\t// static ClientCredentials credentials = new ClientCredentials();\n\t\t\tCALLBACK_URI = credential.getCallBackUri();\n\t\t\tCLIENT_ID = credential.getclientId();\n\t\t\tCLIENT_SECRET = credential.getClientSecret();\n\t\t}\n\t\t\n\t\tflow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT,\n\t\t\t\tJSON_FACTORY, CLIENT_ID, CLIENT_SECRET, SCOPE).setAccessType(\n\t\t\t\t\"offline\").build();\n\t\tgenerateStateToken();\n\t}", "public String getRefresh_token() {\r\n\t\treturn refresh_token;\r\n\t}", "@Bean\n\t@RefreshScope\n\tCredentials refreshableCredentials() throws Exception {\n\t\tLOGGER.warn(\"***** ASKED FOR NEW CREDENTIALS\");\n\n\t\tList<String> scopes = Collections.singletonList(GcpScope.STORAGE_READ_WRITE.getUrl());\n\n\t\treturn GoogleCredentials.fromStream(\n\t\t\t\t// You'd be reading from Vault here, not from local file.\n\t\t\t\tnew FileInputStream(this.privateKeyLocation))\n\t\t\t\t.createScoped(scopes);\n\t}", "protected Pair<String, String> refresh() throws ServiceException {\n final Account acct = this.mDataSource.getAccount();\n final OAuthInfo oauthInfo = new OAuthInfo(new HashMap<String, String>());\n final String refreshToken = OAuth2DataSource.getRefreshToken(mDataSource);\n final String clientId = config\n .getString(String.format(OAuth2ConfigConstants.LC_OAUTH_CLIENT_ID_TEMPLATE.getValue(),\n YahooOAuth2Constants.CLIENT_NAME.getValue()), YahooOAuth2Constants.CLIENT_NAME.getValue(), acct);\n final String clientSecret = config\n .getString(String.format(OAuth2ConfigConstants.LC_OAUTH_CLIENT_SECRET_TEMPLATE.getValue(),\n YahooOAuth2Constants.CLIENT_NAME.getValue()), YahooOAuth2Constants.CLIENT_NAME.getValue(), acct);\n final String clientRedirectUri = config.getString(\n String.format(OAuth2ConfigConstants.LC_OAUTH_CLIENT_REDIRECT_URI_TEMPLATE.getValue(),\n YahooOAuth2Constants.CLIENT_NAME.getValue()),\n YahooOAuth2Constants.CLIENT_NAME.getValue(), acct);\n\n if (StringUtils.isEmpty(clientId) || StringUtils.isEmpty(clientSecret)\n || StringUtils.isEmpty(clientRedirectUri)) {\n throw ServiceException.FAILURE(\"Required config(id, secret and redirectUri) parameters are not provided.\", null);\n }\n // set client specific properties\n oauthInfo.setRefreshToken(refreshToken);\n oauthInfo.setClientId(clientId);\n oauthInfo.setClientSecret(clientSecret);\n oauthInfo.setClientRedirectUri(clientRedirectUri);\n oauthInfo.setTokenUrl(YahooOAuth2Constants.AUTHENTICATE_URI.getValue());\n\n ZimbraLog.extensions.debug(\"Fetching access credentials for import.\");\n final JsonNode credentials = YahooOAuth2Handler.getTokenRequest(oauthInfo,\n OAuth2Utilities.encodeBasicHeader(clientId, clientSecret));\n\n return new Pair<String, String>(credentials.get(\"access_token\").asText(),\n credentials.get(YahooOAuth2Constants.GUID_KEY.getValue()).asText());\n }", "public String getRefreshToken() {\n\t\treturn refreshToken;\n\t}", "private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT)\n throws IOException {\n // Load client secrets.\n InputStream in = GoogleCalendar.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY,\n new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT,\n JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(\n new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\").build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "String getAuthorizerRefreshToken(String appId);", "private Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "private static Credential getCredentials(HttpTransport HTTP_TRANSPORT) throws IOException {\r\n // Load client secrets.\r\n InputStream in = SheetsQuickstart.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\r\n if (in == null) {\r\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\r\n }\r\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\r\n\r\n // Build flow and trigger user authorization request.\r\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\r\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\r\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\r\n .setAccessType(\"offline\")\r\n .build();\r\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\r\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\r\n }", "public void getGoogleToken() {\n String googleEmail = sharedpreferences.getString(\"GoogleEmail\", \"\");\n String scopes = sharedpreferences.getString(\"GoogleScopes\", \"\");\n if (!\"\".equals(googleEmail)) {\n MyAsyncTask asyncTask = new MyAsyncTask(googleEmail, scopes, this.getBaseContext());\n asyncTask.delegate = this;\n asyncTask.execute();\n }\n }", "public String getGCalendarAccessToken( String gcalid, String emailID) {\n\t\t\n\t\tGoogleCredential credential = getGoogleCredential(emailID);\n\t\tif (credential == null) {\n\t\t\treturn null; // user not authorized\n\t\t}\n\t\telse{\n\t\t\treturn credential.getAccessToken();\n\t\t}\n\t}", "GmailClient getGmailClient(Credential credential);", "private Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n // Load client secrets.\n InputStream in = EventoUtils.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "private String refreshToken() {\n return null;\n }", "public static Credential authorize() throws IOException, GeneralSecurityException {\n // Load client secrets.\n InputStream in = GoogleIntegration.class.getResourceAsStream(\"/client_secret.json\");\n GoogleClientSecrets clientSecrets =\n GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n FileDataStoreFactory DATA_FACTORY = new FileDataStoreFactory(DATA_STORE_DIR);\n HttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow =\n new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(DATA_FACTORY)\n .setAccessType(\"offline\")\n .build();\n Credential credential = new AuthorizationCodeInstalledApp(\n flow, new LocalServerReceiver()).authorize(\"user\");\n System.out.println(\n \"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n return credential;\n }", "GoogleAuthenticatorKey createCredentials(String userName);", "String getAccessToken();", "String getAccessToken();", "private static String getCloudAuth(String accessToken) {\n\t\ttry {\n\t\t\tURL urlResource = new URL(\"https://myapi.pathomation.com/api/v1/authenticate\");\n\t\t\tURLConnection conn = urlResource.openConnection();\n\t\t\tconn.setRequestProperty( \"Authorization\", \"Bearer \" + accessToken);\n\t\t\tconn.setUseCaches( false );\n\t\t\treturn getResponseString(conn);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n // Load client secrets.\n InputStream in = GoogleAuthorizeUtil.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "public static Map<String, String> getAccessTokenByApiRefreshToken(String cspServer, String refreshToken)\n\t\t\tthrows Exception {\n\t\t// Form the REST URL\n\t\tString cspURL = \"https://\" + cspServer + CSP_ENDPOINT;\n\t\tURL url = new URL(cspURL);\n\n\t\t// Form the REST Header\n\t\tMap<String, String> headers = new HashMap<String, String>();\n\t\theaders.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\theaders.put(\"Accept\", \"application/json\");\n\t\tString body = \"refresh_token=\" + refreshToken;\n\t\tURLEncoder.encode(body, \"UTF-8\");\n\n\t\t// POST the REST CALL and get the API Response\n\t\tMap<Integer, String> apiResponse = RestHandler.httpPost(url, headers, body);\n\t\tIterator<Integer> iter = apiResponse.keySet().iterator();\n\t\tInteger key = iter.next();\n\t\tString local_response = apiResponse.get(key).replaceFirst(\"\\\\{\", \"\").replace(\"\\\\}\", \"\");\n\t\tStringTokenizer tokenizer = new StringTokenizer(local_response, \",\");\n\t\tMap<String, String> map = new HashMap<>();\n\t\twhile (tokenizer.hasMoreElements()) {\n\t\t\tString element = (String) tokenizer.nextElement();\n\t\t\tString[] res = element.split(\":\");\n\t\t\tString jsonkey = res[0].replaceAll(\"\\\"\", \"\");\n\t\t\tString value = res[1].replaceAll(\"\\\"\", \"\");\n\t\t\tif (\"access_token\".equalsIgnoreCase(jsonkey)) {\n\t\t\t\tmap.put(jsonkey, value);\n\t\t\t}\n\n\t\t\tif (\"id_token\".equalsIgnoreCase(jsonkey)) {\n\t\t\t\tmap.put(jsonkey, value);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "public static Credential authorize() throws IOException \n\t {\n\t // Load client secrets.\n\t InputStream in = YouTubeDownloader.class.getResourceAsStream(\"/youtube/downloader/resources/clients_secrets.json\");\n\t GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader( in ));\n\n\t // Build flow and trigger user authorization request.\n\t GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n\t HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n\t .setDataStoreFactory(DATA_STORE_FACTORY)\n\t .setAccessType(\"offline\")\n\t .build();\n\t Credential credential = new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize(\"user\");\n\t System.out.println(\"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n\t return credential;\n\t }", "public static Credential authorize() throws IOException {\n // Load client secrets.\n InputStream in =\n Quickstart2.class.getResourceAsStream(\"/client_secret.json\");\n GoogleClientSecrets clientSecrets =\n GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow =\n new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(DATA_STORE_FACTORY)\n .setAccessType(\"offline\")\n .build();\n \n Credential credential = new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize(\"user\");\n \n System.out.println(\"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n return credential;\n }", "private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n InputStream in = SheetsRead.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "public String getAccessToken();", "private Drive authentication() throws IOException {\n\t\t// Request a new access token using the refresh token.\n\t\tGoogleCredential credential = new GoogleCredential.Builder()\n\t\t\t\t.setTransport(HTTP_TRANSPORT)\n\t\t\t\t.setJsonFactory(JSON_FACTORY)\n\t\t\t\t.setClientSecrets(CLIENT_ID, CLIENT_SECRET).build()\n\t\t\t\t.setFromTokenResponse(new TokenResponse().setRefreshToken(REFRESH_TOKEN));\n\t\tcredential.refreshToken();\n\t\treturn new Drive.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential)\n\t\t\t\t.setApplicationName(\"tp3\").build();\n\t}", "public Optional<GoogleTokenResponse> getGoogleToken(@NonNull GoogleOAuthData data) {\n Validation validation = data.valid();\n\n Preconditions.checkArgument(validation.isValid(), validation.getMessage());\n GoogleAuthConsumer consumer = new GoogleAuthConsumer();\n try {\n GoogleTokenResponse response = consumer.redeemAuthToken(data.getAuth_code(), data.getClient_id(), data.getRedirect_uri());\n return Optional.ofNullable(response);\n } catch (Exception e) {\n return Optional.empty();\n }\n }", "public Credentials getCredentials(AuthScope authscope)\n {\n return credentials;\n }", "String getToken(String scope, String username, String password) throws AuthorizationException;", "private GoogleCredential getCredentialFromCredentialCache(final String userId) throws IOException{\n\t\tGoogleCredential credential = (GoogleCredential)cache.get(userId);\n\t\tif (credential != null){\n\t\t\tM_log.debug(\"Fetching credential from cache for user: \" + userId);\n\t\t\treturn credential;\n\t\t}\n\t\telse{ // Need to create credential and create access token.\n\t\t\tcredential = SakaiGoogleAuthServiceImpl.authorize(userId, SERVICE_ACCOUNT_EMAIL, PRIVATE_KEY, CalendarScopes.CALENDAR);\n\t\t\tif (credential != null){\n\t\t\t\tcredential.refreshToken(); // Populates credential with access token\n\t\t\t\taddCredentialToCache(userId, credential);\n\t\t\t}\n\t\t\treturn credential;\n\t\t}\n\t}", "@Nullable\n public String getRefreshToken() {\n return refreshToken;\n }", "@Transient\n\tpublic String getRefreshToken() {\n\t\treturn refreshToken;\n\t}", "public static Credential authorize() throws IOException {\n\t\t// Load client secrets.\n\t\tInputStream in = GmailDownloader.class.getResourceAsStream(\"/client_secret.json\");\n\t\tGoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n\t\t// Build flow and trigger user authorization request.\n\t\tGoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT, JSON_FACTORY,\n\t\t\t\tclientSecrets, SCOPES).setDataStoreFactory(DATA_STORE_FACTORY).setAccessType(\"offline\").build();\n\t\tCredential credential = new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize(\"user\");\n\t\tSystem.out.println(\"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n\t\treturn credential;\n\t}", "@Api(1.0)\n @NonNull\n public String getRefreshToken() {\n return mRefreshToken;\n }", "String getComponentAccessToken();", "private Calendar getGoogleClient(String email)\t{\n\t\tGoogleCredential credential = getGoogleCredential(email);\n\t\tCalendar client = getGoogleClient(credential);\n\t\treturn client;\n\t}", "public Credential getUsercredential(final String authCode)\n\t\t\tthrows IOException, JSONException {\n\t\tfinal GoogleTokenResponse response = flow.newTokenRequest(authCode)\n\t\t\t\t.setRedirectUri(CALLBACK_URI).execute();\n\t\tfinal Credential credential = flow.createAndStoreCredential(response,\n\t\t\t\tnull);\n\t\treturn credential;\n\t}", "private static com.google.api.services.calendar.Calendar getCalendarService() throws IOException\n{\n Credential cred = authorize();\n com.google.api.services.calendar.Calendar.Builder bldr =\n new com.google.api.services.calendar.Calendar.Builder(HTTP_TRANSPORT,JSON_FACTORY,cred);\n bldr.setApplicationName(APPLICATION_NAME);\n\n com.google.api.services.calendar.Calendar cal = bldr.build();\n\n return cal;\n}", "public int getTokenViaClientCredentials(){\n\t\t//Do we have credentials?\n\t\tif (Is.nullOrEmpty(clientId) || Is.nullOrEmpty(clientSecret)){\n\t\t\treturn 1;\n\t\t}\n\t\ttry{\n\t\t\t//Build auth. header entry\n\t\t\tString authString = \"Basic \" + Base64.getEncoder().encodeToString((clientId + \":\" + clientSecret).getBytes());\n\t\t\t\n\t\t\t//Request headers\n\t\t\tMap<String, String> headers = new HashMap<>();\n\t\t\theaders.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\theaders.put(\"Authorization\", authString);\n\t\t\t\n\t\t\t//Request data\n\t\t\tString data = ContentBuilder.postForm(\"grant_type\", \"client_credentials\");\n\t\t\t\n\t\t\t//Call\n\t\t\tlong tic = System.currentTimeMillis();\n\t\t\tthis.lastRefreshTry = tic;\n\t\t\tJSONObject res = Connectors.httpPOST(spotifyAuthUrl, data, headers);\n\t\t\tStatistics.addExternalApiHit(\"SpotifyApi getTokenViaClientCredentials\");\n\t\t\tStatistics.addExternalApiTime(\"SpotifyApi getTokenViaClientCredentials\", tic);\n\t\t\t//System.out.println(res.toJSONString()); \t\t//DEBUG\n\t\t\tif (!Connectors.httpSuccess(res)){\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\tString token = JSON.getString(res, \"access_token\");\n\t\t\tString tokenType = JSON.getString(res, \"token_type\");\n\t\t\tlong expiresIn = JSON.getLongOrDefault(res, \"expires_in\", 0);\n\t\t\tif (Is.nullOrEmpty(token)){\n\t\t\t\treturn 4;\n\t\t\t}else{\n\t\t\t\tthis.token = token;\n\t\t\t\tthis.tokenType = tokenType;\n\t\t\t\tthis.tokenValidUntil = System.currentTimeMillis() + (expiresIn * 1000);\n\t\t\t}\n\t\t\treturn 0;\n\t\t\t\n\t\t}catch (Exception e){\n\t\t\tStatistics.addExternalApiHit(\"SpotifyApi-error getTokenViaClientCredentials\");\n\t\t\treturn 3;\n\t\t}\n\t}", "private CdekAuthToken getAuthToken()\n {\n String authEndpoint = conf.ENDPOINT + \"/oauth/token?grant_type={grant_type}&client_id={client_id}&client_secret={client_secret}\";\n\n HttpHeaders defaultHeaders = new HttpHeaders();\n HttpEntity req = new HttpEntity(defaultHeaders);\n\n return rest.postForObject(authEndpoint, req, CdekAuthToken.class, conf.getAuthData());\n }", "@Override\n public ExternalCredentialsResponse getCredentials(Principal principal, DomainDetails domainDetails, String idToken, ExternalCredentialsRequest externalCredentialsRequest)\n throws ResourceException {\n\n // first make sure that our required components are available and configured\n\n if (authorizer == null) {\n throw new ResourceException(ResourceException.FORBIDDEN, \"ZTS authorizer not configured\");\n }\n\n Map<String, String> attributes = externalCredentialsRequest.getAttributes();\n final String gcpServiceAccount = getRequestAttribute(attributes, GCP_SERVICE_ACCOUNT, null);\n if (StringUtil.isEmpty(gcpServiceAccount)) {\n throw new ResourceException(ResourceException.BAD_REQUEST, \"missing gcp service account\");\n }\n\n // verify that the given principal is authorized for all scopes requested\n\n final String gcpTokenScope = getRequestAttribute(attributes, GCP_TOKEN_SCOPE, GCP_DEFAULT_TOKEN_SCOPE);\n String[] gcpTokenScopeList = gcpTokenScope.split(\" \");\n for (String scopeItem : gcpTokenScopeList) {\n final String resource = domainDetails.getName() + \":\" + scopeItem;\n if (!authorizer.access(GCP_SCOPE_ACTION, resource, principal, null)) {\n throw new ResourceException(ResourceException.FORBIDDEN, \"Principal not authorized for configured scope\");\n }\n }\n\n try {\n // first we're going to get our exchange token\n\n GcpExchangeTokenResponse exchangeTokenResponse = getExchangeToken(domainDetails, idToken, externalCredentialsRequest);\n\n final String serviceUrl = String.format(\"https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/%s@%s.iam.gserviceaccount.com:generateAccessToken\",\n gcpServiceAccount, domainDetails.getGcpProjectId());\n final String authorizationHeader = exchangeTokenResponse.getTokenType() + \" \" + exchangeTokenResponse.getAccessToken();\n\n GcpAccessTokenRequest accessTokenRequest = new GcpAccessTokenRequest();\n accessTokenRequest.setScopeList(gcpTokenScope);\n int expiryTime = externalCredentialsRequest.getExpiryTime() == null ? 3600 : externalCredentialsRequest.getExpiryTime();\n accessTokenRequest.setLifetimeSeconds(expiryTime);\n\n HttpPost httpPost = new HttpPost(serviceUrl);\n httpPost.addHeader(HttpHeaders.AUTHORIZATION, authorizationHeader);\n httpPost.setEntity(new StringEntity(jsonMapper.writeValueAsString(accessTokenRequest), ContentType.APPLICATION_JSON));\n\n final HttpDriverResponse httpResponse = httpDriver.doPostHttpResponse(httpPost);\n if (httpResponse.getStatusCode() != HttpStatus.SC_OK) {\n GcpAccessTokenError error = jsonMapper.readValue(httpResponse.getMessage(), GcpAccessTokenError.class);\n throw new ResourceException(httpResponse.getStatusCode(), error.getErrorMessage());\n }\n\n GcpAccessTokenResponse gcpAccessTokenResponse = jsonMapper.readValue(httpResponse.getMessage(), GcpAccessTokenResponse.class);\n\n ExternalCredentialsResponse externalCredentialsResponse = new ExternalCredentialsResponse();\n attributes = new HashMap<>();\n attributes.put(GCP_ACCESS_TOKEN, gcpAccessTokenResponse.getAccessToken());\n externalCredentialsResponse.setAttributes(attributes);\n externalCredentialsResponse.setExpiration(Timestamp.fromString(gcpAccessTokenResponse.getExpireTime()));\n return externalCredentialsResponse;\n\n } catch (Exception ex) {\n throw new ResourceException(ResourceException.FORBIDDEN, ex.getMessage());\n }\n }", "public java.lang.String getOauth_token(){\r\n return localOauth_token;\r\n }", "public Object getCredential()\n {\n return this.credential;\n }", "public Object getCredential()\n {\n return this.credential;\n }", "public Object getCredential()\n {\n return this.credential;\n }", "@Override\n public String refresh() {\n\n // Override the existing token\n setToken(null);\n\n // Get the identityId and token by making a call to your backend\n // (Call to your backend)\n\n // Call the update method with updated identityId and token to make sure\n // these are ready to be used from Credentials Provider.\n\n update(identityId, token);\n return token;\n\n }", "private void getAccessToken() {\n\n\t\tMediaType mediaType = MediaType.parse(\"application/x-www-form-urlencoded\");\n\t\tRequestBody body = RequestBody.create(mediaType,\n\t\t\t\t\"client_id=\" + CONSUMER_KEY + \"&client_secret=\" + CONSUMER_SECRET + \"&grant_type=client_credentials\");\n\t\tRequest request = new Request.Builder().url(\"https://api.yelp.com/oauth2/token\").post(body)\n\t\t\t\t.addHeader(\"cache-control\", \"no-cache\").build();\n\n\t\ttry {\n\t\t\tokhttp3.Response response = client.newCall(request).execute();\n\t\t\tString respbody = response.body().string().trim();\n\t\t\tJSONParser parser = new JSONParser();\n\t\t\tJSONObject json = (JSONObject) parser.parse(respbody);\n\t\t\taccessToken = (String) json.get(\"access_token\");\n\t\t} catch (IOException | ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public AccessToken refreshAccessToken(String refreshToken) throws OAuthSdkException {\n\n // prepare params\n List<NameValuePair> params = new ArrayList<NameValuePair>();\n params.add(new BasicNameValuePair(CLIENT_ID, String.valueOf(client.getId())));\n params.add(new BasicNameValuePair(REDIRECT_URI, client.getRedirectUri()));\n params.add(new BasicNameValuePair(CLIENT_SECRET, client.getSecret()));\n params.add(new BasicNameValuePair(GRANT_TYPE, GrantType.REFRESH_TOKEN.getType()));\n params.add(new BasicNameValuePair(TOKEN_TYPE, AccessToken.TokenType.MAC.getType()));\n params.add(new BasicNameValuePair(REFRESH_TOKEN, refreshToken));\n\n HttpResponse response = httpClient.get(AuthorizeUrlUtils.getTokenUrl(), params);\n log.debug(\"Refresh access token response[{}]\", response);\n\n String entityContent = HttpResponseUtils.getEntityContent(response);\n if (StringUtils.isBlank(entityContent) || !JSONUtils.mayBeJSON(entityContent)) {\n log.error(\"The refresh token response[{}] is not json format!\", entityContent);\n throw new OAuthSdkException(\"The refresh token response is not json format\");\n }\n\n JSONObject json = JSONObject.fromObject(entityContent);\n if (json.has(\"access_token\")) {\n log.debug(\"Refresh access token json result[{}]\", json);\n return new AccessToken(json);\n }\n\n // error response\n int errorCode = json.optInt(\"error\", -1);\n String errorDesc = json.optString(\"error_description\", StringUtils.EMPTY);\n log.error(\"Refresh access token error, error info [code={}, desc={}]!\", errorCode, errorDesc);\n throw new OAuthSdkException(\"Refresh access token error!\", errorCode, errorDesc);\n }", "public void getResponseGoogle(String googleToken, final AsyncHandler<lrAccessToken> handler)\n\t {\n\t\t \tMap<String, String> params = new HashMap<String, String>();\n\t\t \tparams.put(\"key\",AKey);\n\t\t \tparams.put(\"google_access_token\",googleToken);\n\t\t \tproviderHandler(Endpoint.API_V2_ACCESS_TOKEN_GOOGLE, params, handler);\n\t }", "public interface GmailClientFactory {\n /**\n * Creates a GmailClient instance\n *\n * @param credential a valid Google credential object\n * @return a GmailClient instance that contains the user's credentials\n */\n GmailClient getGmailClient(Credential credential);\n}", "@Override\n public Object getCredentials() {\n return token;\n }", "static @NonNull String getAuthToken(@NonNull Context context) throws AuthException {\n final long startTime = System.currentTimeMillis();\n final GoogleApiClient googleApiClient = getClient(context);\n try {\n final ConnectionResult result = googleApiClient.blockingConnect();\n if (result.isSuccess()) {\n final GoogleSignInResult googleSignInResult = Auth.GoogleSignInApi.silentSignIn(googleApiClient).await();\n final GoogleSignInAccount account = googleSignInResult.getSignInAccount();\n if(account != null) {\n final String authToken = account.getIdToken();\n if(authToken != null) {\n Log.i(TAG, \"Got auth token in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n return authToken;\n } else {\n throw new AuthException(\"Failed to get auth token\");\n }\n } else {\n throw new AuthException(\"Not signed in\");\n }\n } else {\n throw new AuthException(\"Sign in connection error\");\n }\n } finally {\n googleApiClient.disconnect();\n }\n }", "private String GetAccessToken() {\n final String grantType = \"password\";\n final String resourceId = \"https%3A%2F%2Fgraph.microsoft.com%2F\";\n final String tokenEndpoint = \"https://login.microsoftonline.com/common/oauth2/token\";\n\n try {\n URL url = new URL(tokenEndpoint);\n HttpURLConnection conn;\n if (configuration.isProxyUsed()) {\n Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(configuration.getProxyServer(), configuration.getProxyPort()));\n conn = (HttpURLConnection) url.openConnection(proxy);\n } else {\n conn = (HttpURLConnection) url.openConnection();\n }\n\n String line;\n StringBuilder jsonString = new StringBuilder();\n\n conn.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n conn.setRequestMethod(\"POST\");\n conn.setDoInput(true);\n conn.setDoOutput(true);\n conn.setInstanceFollowRedirects(false);\n conn.connect();\n\n try (OutputStreamWriter outputStreamWriter = new OutputStreamWriter(conn.getOutputStream(), StandardCharsets.UTF_8)) {\n String payload = String.format(\"grant_type=%1$s&resource=%2$s&client_id=%3$s&username=%4$s&password=%5$s\",\n grantType,\n resourceId,\n clientId,\n username,\n password);\n outputStreamWriter.write(payload);\n }\n\n try (BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\n while((line = br.readLine()) != null) {\n jsonString.append(line);\n }\n }\n\n conn.disconnect();\n\n JsonObject res = new GsonBuilder()\n .create()\n .fromJson(jsonString.toString(), JsonObject.class);\n\n return res\n .get(\"access_token\")\n .toString()\n .replaceAll(\"\\\"\", \"\");\n\n } catch (IOException e) {\n throw new IllegalAccessError(\"Unable to read authorization response: \" + e.getLocalizedMessage());\n }\n }", "public GoogleApiClient getGoogleApiCLient()\n {\n return googleApiClient;\n }", "@Test\n public void getGoogleAuthTokensTest() throws ApiException {\n String code = null;\n InlineResponse2003 response = api.getGoogleAuthTokens(code);\n\n // TODO: test validations\n }", "public Object credential(HttpServletRequest request)\n throws URISyntaxException, OAuthSystemException {\n try {\n OAuthClientCredentialRequest oauthRequest = new OAuthClientCredentialRequest(request);\n OAuthAuthzParameters oAuthAuthzParameters = new OAuthAuthzParameters(oauthRequest);\n\n if (!oauthRequest.getGrantType().equals(Constants.OAUTH_CLIENT_CREDENTIALS)) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_REQUEST))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_GRANT_TYPE)\n .buildJSONMessage();\n logger.info(\"invalid grant type: {}, context: {}\", oauthRequest.getGrantType(), oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n Client client = oAuthService.getClientByClientId(oAuthAuthzParameters.getClientId());\n if (client == null) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_CLIENT_DESCRIPTION)\n .buildJSONMessage();\n logger.info(\"can not get client, context: {}\", oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n if (!client.getGrantTypes().contains(Constants.OAUTH_CLIENT_CREDENTIALS)) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT_INFO))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_GRANT_TYPE)\n .buildJSONMessage();\n logger.info(\"no grant type, context: {}\", oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n if (!client.getClientSecret().equals(oAuthAuthzParameters.getClientSecret())) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT_INFO))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_CLIENT_DESCRIPTION)\n .buildJSONMessage();\n logger.info(\"invalid secret: {}, context: {}\", client.getClientSecret(), oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n if (StringUtils.isEmpty(oAuthAuthzParameters.getScope())) {\n oAuthAuthzParameters.setScope(client.getDefaultScope());\n } else {\n oAuthAuthzParameters.setScope(\n OAuthUtils.encodeScopes(\n oAuthService.getRetainScopes(\n client.getDefaultScope(),\n oAuthAuthzParameters.getScope()\n )\n )\n );\n }\n\n OAuthIssuer oauthIssuerImpl = new OAuthIssuerImpl(new UUIDValueGeneratorEx());\n String accessToken = oauthIssuerImpl.accessToken();\n\n oAuthService.saveAccessToken(accessToken, oAuthAuthzParameters);\n\n OAuthResponse response = OAuthASResponseEx\n .tokenResponse(HttpServletResponse.SC_OK)\n .setTokenType(\"uuid\")\n .setAccessToken(accessToken)\n .setExpiresIn(String.valueOf(appConfig.tokenAccessExpire))\n .setScope(oAuthAuthzParameters.getScope())\n .buildJSONMessage();\n logger.info(\"response access token {}, context: {}\", accessToken, oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n } catch (OAuthProblemException e) {\n logger.error(\"oauth problem exception\", e);\n final OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_REQUEST))\n .setErrorDescription(e.getMessage())\n .buildJSONMessage();\n HttpHeaders headers = new HttpHeaders();\n return new ResponseEntity<String>(response.getBody(), headers, HttpStatus.valueOf(response.getResponseStatus()));\n }\n }", "@Override\r\n\tpublic String refreshToken() throws OAuthSystemException {\n\t\treturn null;\r\n\t}", "public SalesforceAccessGrant(final String accessToken, final String scope, final String refreshToken, final Map<String, Object> response) {\n super(accessToken, scope, refreshToken, null);\n this.instanceUrl = (String)response.get(SalesforceConstants.AccessTokenResult.PARAM_INSTANCE_URL);\n this.id = (String)response.get(SalesforceConstants.AccessTokenResult.PARAM_ID);\n this.signature = (String)response.get(SalesforceConstants.AccessTokenResult.PARAM_SIGNATURE);\n this.issuedAt = (String)response.get(SalesforceConstants.AccessTokenResult.PARAM_ISSUED_AT);\n }", "List<ExposedOAuthCredentialModel> readExposedOAuthCredentials();", "public static String getAccessToken() {\n return accessToken;\n }", "@Nullable\n private String fetchToken() throws IOException {\n try {\n return GoogleAuthUtil.getToken(mActivity, mEmail, mScope);\n } catch (UserRecoverableAuthException ex) {\n // GooglePlayServices.apk is either old, disabled, or not present\n // so we need to show the user some UI in the activity to recover.\n // TODO: complain about old version\n Log.e(\"aqx1010\", \"required Google Play version not found\", ex);\n } catch (GoogleAuthException fatalException) {\n // Some other type of unrecoverable exception has occurred.\n // Report and log the error as appropriate for your app.\n Log.e(\"aqx1010\", \"fatal authorization exception\", fatalException);\n }\n return null;\n }", "private String getAccessTokenUrl(String identityServer) {\n\t\treturn \"https://accounts.google.com/o/oauth2/token\";\n\t}", "private String getCredentials() {\n String credentials = \"\";\n AccountManager accountManager = AccountManager.get(getContext());\n\n final Account availableAccounts[] = accountManager.getAccountsByType(AccountGeneral.ACCOUNT_TYPE);\n\n //there should be only one ERT account\n if(availableAccounts.length > 0) {\n Account account = availableAccounts[0];\n AccountManagerFuture<Bundle> future = accountManager.getAuthToken(account, AccountGeneral.AUTHTOKEN_TYPE_FULL_ACCESS, null, null, null, null);\n try {\n Bundle bundle = future.getResult();\n String accountName = bundle.getString(AccountManager.KEY_ACCOUNT_NAME);\n String token = bundle.getString(AccountManager.KEY_AUTHTOKEN);\n credentials = accountName + \":\" + token;\n } catch (OperationCanceledException | IOException | AuthenticatorException e) {\n Log.e(LOG_TAG, e.getMessage());\n }\n }\n return credentials;\n }", "@Override\n public RefreshToken getRefreshToken(String refreshTokenCode) {\n if (log.isTraceEnabled()) {\n log.trace(\"Looking for the refresh token: \" + refreshTokenCode + \" for an authorization grant of type: \"\n + getAuthorizationGrantType());\n }\n return refreshTokens.get(TokenHashUtil.hash(refreshTokenCode));\n }", "@Override\n public RefreshToken getRefreshToken(String refreshTokenCode) {\n if (LOGGER.isTraceEnabled()) {\n LOGGER.trace(\"Looking for the refresh token: \" + refreshTokenCode\n + \" for an authorization grant of type: \" + getAuthorizationGrantType());\n }\n\n return refreshTokens.get(refreshTokenCode);\n }", "public static JSONObject refreshToken(String refreshToken) throws Exception {\r\n\t\tString refreshTokenUrl = MessageFormat.format(REFRESH_TOKEN_URL, SOCIAL_LOGIN_CLIENT_ID, refreshToken);\r\n\t\tString response = HttpClientUtils.sendRequest(refreshTokenUrl);\r\n\t\treturn JSONObject.fromObject(response);\r\n\t}", "String getToken(String username, String password, String grant_type) throws IllegalAccessException{\n\n String URI = serviceUrl + \"/oauth/token\" + \"?\" +\n String.format(\"%s=%s&%s=%s&%s=%s\", \"grant_type\", grant_type, \"username\", username, \"password\", password);\n// String CONTENT_TYPE = \"application/x-www-form-urlencoded\";\n // TODO clientId and clientSecret !!!\n String ENCODING = \"Basic \" +\n Base64.getEncoder().encodeToString(String.format(\"%s:%s\", \"clientId\", \"clientSecret\").getBytes());\n\n// AtomicReference<String> token = null;\n// authorization.subscribe(map -> {\n// token.set((String) map.get(ACCESS_TOKEN));\n// });\n\n String token = null;\n try {\n token = (String)WebClient.create().post()\n .uri(URI)\n .accept(MediaType.APPLICATION_FORM_URLENCODED)\n .contentType(MediaType.APPLICATION_FORM_URLENCODED)\n .header(\"Authorization\", ENCODING)\n .retrieve()\n .bodyToMono(Map.class)\n .block().get(ACCESS_TOKEN);\n } catch (Exception e){\n throw new IllegalAccessException(\"Can't reach access token\");\n }\n\n return token;\n }", "public RefreshToken generateRefreshToken(){\n RefreshToken refreshToken = new RefreshToken();\n //Creates a 128bit random UUID. This serves as our refresh token\n refreshToken.setToken(UUID.randomUUID().toString());\n //Set creation timestampt\n refreshToken.setCreatedDate(Instant.now());\n\n return refreshTokenRepository.save(refreshToken);\n }", "public Credential getCredential() {\n return this.credential;\n }", "private static Calendar getService() throws GeneralSecurityException, IOException {\n final NetHttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n return new Calendar.Builder(HTTP_TRANSPORT, JSON_FACTORY, getCredentials(HTTP_TRANSPORT))\n .setApplicationName(APPLICATION_NAME).build();\n }", "public String getToken(String name){\n\n return credentials.get(name, token);\n }", "public String getAccessToken() {\n return accessToken;\n }", "@Test\n public void getGoogleAuthUrlTest() throws ApiException {\n InlineResponse2002 response = api.getGoogleAuthUrl();\n\n // TODO: test validations\n }", "public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {\n return WorkflowsStubSettings.defaultCredentialsProviderBuilder();\n }", "public String getAccessToken() {\n return accessToken;\n }", "public String getAccessToken() {\n if (accessToken == null || (System.currentTimeMillis() > (expirationTime - 60 * 1000))) {\n if (refreshToken != null) {\n try {\n this.refreshAccessToken();\n } catch (IOException e) {\n log.error(\"Error fetching access token\", e);\n }\n }\n }\n\n return accessToken;\n }", "public String generateNewAccessToken(String refresh_token) throws SocketTimeoutException, IOException, Exception{\n String newAccessToken = \"\";\n JSONObject jsonReturn = new JSONObject();\n JSONObject tokenRequestParams = new JSONObject();\n tokenRequestParams.element(\"refresh_token\", refresh_token);\n if(currentRefreshToken.equals(\"\")){\n //You must read in the properties first!\n Exception noProps = new Exception(\"You must read in the properties first with init(). There was no refresh token set.\");\n throw noProps;\n }\n else{\n try{\n URL rerum = new URL(Constant.RERUM_ACCESS_TOKEN_URL);\n HttpURLConnection connection = (HttpURLConnection) rerum.openConnection();\n connection.setRequestMethod(\"POST\"); \n connection.setConnectTimeout(5*1000); \n connection.setDoOutput(true);\n connection.setDoInput(true);\n connection.setRequestProperty(\"Content-Type\", \"application/json\");\n connection.connect();\n DataOutputStream outStream = new DataOutputStream(connection.getOutputStream());\n //Pass in the user provided JSON for the body \n outStream.writeBytes(tokenRequestParams.toString());\n outStream.flush();\n outStream.close(); \n //Execute rerum server v1 request\n BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(),\"utf-8\"));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null){\n //Gather rerum server v1 response\n sb.append(line);\n }\n reader.close();\n jsonReturn = JSONObject.fromObject(sb.toString());\n newAccessToken = jsonReturn.getString(\"access_token\");\n }\n catch(java.net.SocketTimeoutException e){ //This specifically catches the timeout\n System.out.println(\"The Auth0 token endpoint is taking too long...\");\n jsonReturn = new JSONObject(); //We were never going to get a response, so return an empty object.\n jsonReturn.element(\"error\", \"The Auth0 endpoint took too long\");\n throw e;\n }\n }\n setAccessToken(newAccessToken);\n writeProperty(\"access_token\", newAccessToken);\n return newAccessToken;\n }", "GcpExchangeTokenResponse getExchangeToken(DomainDetails domainDetails, final String idToken,\n ExternalCredentialsRequest externalCredentialsRequest) throws IOException {\n\n Map<String, String> attributes = externalCredentialsRequest.getAttributes();\n final String gcpTokenScope = getRequestAttribute(attributes, GCP_TOKEN_SCOPE, GCP_DEFAULT_TOKEN_SCOPE);\n final String gcpWorkloadPoolName = getRequestAttribute(attributes, GCP_WORKLOAD_POOL_NAME, defaultWorkloadPoolName);\n final String gcpWorkloadProviderName = getRequestAttribute(attributes, GCP_WORKLOAD_PROVIDER_NAME, defaultWorkloadProviderName);\n\n String audience = String.format(\"//iam.googleapis.com/projects/%s/locations/global/workloadIdentityPools/%s/providers/%s\",\n domainDetails.getGcpProjectNumber(), gcpWorkloadPoolName, gcpWorkloadProviderName);\n\n GcpExchangeTokenRequest exchangeTokenRequest = new GcpExchangeTokenRequest();\n exchangeTokenRequest.setGrantType(GCP_GRANT_TYPE);\n exchangeTokenRequest.setAudience(audience);\n exchangeTokenRequest.setScope(gcpTokenScope);\n exchangeTokenRequest.setRequestedTokenType(GCP_ACCESS_TOKEN_TYPE);\n exchangeTokenRequest.setSubjectToken(idToken);\n exchangeTokenRequest.setSubjectTokenType(GCP_ID_TOKEN_TYPE);\n\n HttpPost httpPost = new HttpPost(GCP_STS_TOKEN_URL);\n httpPost.setEntity(new StringEntity(jsonMapper.writeValueAsString(exchangeTokenRequest), ContentType.APPLICATION_JSON));\n\n final HttpDriverResponse httpResponse = httpDriver.doPostHttpResponse(httpPost);\n if (httpResponse.getStatusCode() != HttpStatus.SC_OK) {\n GcpExchangeTokenError error = jsonMapper.readValue(httpResponse.getMessage(), GcpExchangeTokenError.class);\n throw new ResourceException(httpResponse.getStatusCode(), error.getErrorDescription());\n }\n return jsonMapper.readValue(httpResponse.getMessage(), GcpExchangeTokenResponse.class);\n }", "public interface GoogleAccountDataClient {\n AccountNameCheckResponse checkAccountName(AccountNameCheckRequest accountNameCheckRequest) throws ;\n\n CheckFactoryResetPolicyComplianceResponse checkFactoryResetPolicyCompliance(CheckFactoryResetPolicyComplianceRequest checkFactoryResetPolicyComplianceRequest) throws ;\n\n PasswordCheckResponse checkPassword(PasswordCheckRequest passwordCheckRequest) throws ;\n\n CheckRealNameResponse checkRealName(CheckRealNameRequest checkRealNameRequest) throws ;\n\n void clearFactoryResetChallenges() throws ;\n\n ClearTokenResponse clearToken(ClearTokenRequest clearTokenRequest) throws ;\n\n boolean clearWorkAccountAppWhitelist() throws ;\n\n TokenResponse confirmCredentials(ConfirmCredentialsRequest confirmCredentialsRequest) throws ;\n\n TokenResponse createAccount(GoogleAccountSetupRequest googleAccountSetupRequest) throws ;\n\n TokenResponse createPlusProfile(GoogleAccountSetupRequest googleAccountSetupRequest) throws ;\n\n @Deprecated\n GoogleAccountData getAccountData(@Deprecated String str) throws ;\n\n Bundle getAccountExportData(String str) throws ;\n\n String getAccountId(String str) throws ;\n\n AccountRecoveryData getAccountRecoveryCountryInfo() throws ;\n\n AccountRecoveryData getAccountRecoveryData(AccountRecoveryDataRequest accountRecoveryDataRequest) throws ;\n\n AccountRecoveryGuidance getAccountRecoveryGuidance(AccountRecoveryGuidanceRequest accountRecoveryGuidanceRequest) throws ;\n\n GetAndAdvanceOtpCounterResponse getAndAdvanceOtpCounter(String str) throws ;\n\n GoogleAccountData getGoogleAccountData(Account account) throws ;\n\n String getGoogleAccountId(Account account) throws ;\n\n GplusInfoResponse getGplusInfo(GplusInfoRequest gplusInfoRequest) throws ;\n\n OtpResponse getOtp(OtpRequest otpRequest) throws ;\n\n TokenResponse getToken(TokenRequest tokenRequest) throws ;\n\n boolean installAccountFromExportData(String str, Bundle bundle) throws ;\n\n AccountRemovalResponse removeAccount(AccountRemovalRequest accountRemovalRequest) throws ;\n\n boolean setWorkAccountAppWhitelistFingerprint(String str, String str2) throws ;\n\n TokenResponse signIn(AccountSignInRequest accountSignInRequest) throws ;\n\n AccountRecoveryUpdateResult updateAccountRecoveryData(AccountRecoveryUpdateRequest accountRecoveryUpdateRequest) throws ;\n\n TokenResponse updateCredentials(UpdateCredentialsRequest updateCredentialsRequest) throws ;\n\n ValidateAccountCredentialsResponse validateAccountCredentials(AccountCredentials accountCredentials) throws ;\n}", "void createExposedOAuthCredential(IntegrationClientCredentialsDetailsModel integrationCCD);", "public Object credentials() {\n return cred;\n }", "public QCloudLifecycleCredentials onGetCredentialFromLocal(String secretId2, String secretKey2) throws QCloudClientException {\n long current = System.currentTimeMillis() / 1000;\n String keyTime = current + \";\" + (current + this.duration);\n return new BasicQCloudCredentials(secretId2, secretKey2SignKey(secretKey2, keyTime), keyTime);\n }", "public static Drive getDriveService(String token) throws IOException, GeneralSecurityException {\n Credential credential = new GoogleCredential().setAccessToken(token);\n return new Drive.Builder(GoogleNetHttpTransport.newTrustedTransport(), JacksonFactory.getDefaultInstance(), credential).setApplicationName(APPLICATION_NAME).build();\n }", "private static GoogleIdToken verifyGoogleIdToken(String token) {\n\n GoogleIdToken idToken = null;\n\n if(token == null)\n return null;\n\n GoogleIdTokenVerifier verifier = new GoogleIdTokenVerifier.Builder(new NetHttpTransport(), new JacksonFactory())\n .setAudience(Arrays.asList(SecurityConstants.CLIENT_ID))\n .setIssuer(SecurityConstants.ISSUER)\n .build();\n\n try {\n idToken = verifier.verify(token);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return idToken;\n }", "public String getAccessToken() {\n readLock.lock();\n try {\n return accessToken;\n } finally {\n readLock.unlock();\n }\n }", "public interface TokenProvider {\n /**\n * @return an always valid access token.\n */\n String getAccessToken();\n\n /**\n * Forces a refresh of all tokens.\n *\n * @return the newly refreshed access token.\n */\n String refreshTokens();\n}", "OAuth2Token getToken();", "String getAuthorizerAccessToken(String appId);", "GoogleAuthClient(ManagedChannel channel, CallCredentials callCredentials) {\n this.channel = channel;\n blockingStub = PublisherGrpc.newBlockingStub(channel).withCallCredentials(callCredentials);\n }" ]
[ "0.68446887", "0.6771073", "0.6728438", "0.6659602", "0.6640806", "0.66006637", "0.65307516", "0.63937724", "0.63685864", "0.62877935", "0.6199586", "0.61903155", "0.6164032", "0.61415875", "0.6138039", "0.61326826", "0.6120597", "0.6111364", "0.6103937", "0.6075062", "0.60533553", "0.6039865", "0.6035833", "0.601017", "0.60045713", "0.5963751", "0.59590816", "0.59571296", "0.59571296", "0.59491795", "0.5926811", "0.5904486", "0.58822685", "0.5878179", "0.58761954", "0.5867851", "0.58640987", "0.5863165", "0.5827185", "0.57720727", "0.57626325", "0.57580286", "0.57521117", "0.5751594", "0.57496315", "0.5740862", "0.57117903", "0.57107276", "0.57045776", "0.56823206", "0.5675356", "0.5664823", "0.5660841", "0.5636888", "0.5636888", "0.5636888", "0.5601199", "0.5588955", "0.5588745", "0.5551668", "0.55346036", "0.5522776", "0.55186063", "0.5503802", "0.549667", "0.5489477", "0.5480523", "0.54412", "0.5437514", "0.5427125", "0.5424509", "0.54177105", "0.54099494", "0.53981113", "0.53590924", "0.5328898", "0.5327083", "0.5323894", "0.53154737", "0.53139514", "0.53012383", "0.52998394", "0.52854073", "0.52824193", "0.5281132", "0.5280633", "0.5279863", "0.52499735", "0.52491736", "0.52329785", "0.52313393", "0.5223932", "0.5222417", "0.52033246", "0.51946545", "0.5180651", "0.51664025", "0.51649094", "0.5152857", "0.514837" ]
0.7086123
0
returns a google credential from an access token for accessing api services
public Credential getUsercredentialwithAccessToken(String accessToken) { return new GoogleCredential.Builder().setTransport(HTTP_TRANSPORT) .setJsonFactory(new JacksonFactory()) .setClientSecrets(CLIENT_ID, CLIENT_SECRET).build() .setAccessToken(accessToken); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GoogleAuthenticatorKey createCredentials();", "private GoogleCredential getGoogleCredential(String userId) {\t\t\n\t\t\n\t\ttry { \n\t\t\t// get the service account e-mail address and service account private key from property file\n\t\t\t// this email account and key file are specific for your environment\n\t\t\tif (SERVICE_ACCOUNT_EMAIL == null) {\n\t\t\t\tSERVICE_ACCOUNT_EMAIL = m_serverConfigurationService.getString(\"google.service.account.email\", \"\");\n\t\t\t}\n\t\t\tif (PRIVATE_KEY == null) {\n\t\t\t\tPRIVATE_KEY = m_serverConfigurationService.getString(\"google.private.key\", \"\");\n\t\t\t}\n\t\t\t\n\t\t\tGoogleCredential credential = getCredentialFromCredentialCache(userId);\n\t\t\treturn credential;\n\n\t\t} catch (Exception e) {\n\t\t\t// return null if an exception occurs while communicating with Google.\n\t\t\tM_log.error(\"Error creating a GoogleCredential object or requesting access token: \" + userId + \" \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "private String getToken() {\n String keyFilePath = System.getenv(\"APE_API_KEY\");\n if (Strings.isNullOrEmpty(keyFilePath)) {\n File globalKeyFile = GlobalConfiguration.getInstance().getHostOptions().\n getServiceAccountJsonKeyFiles().get(GLOBAL_APE_API_KEY);\n if (globalKeyFile == null || !globalKeyFile.exists()) {\n CLog.d(\"Unable to fetch the service key because neither environment variable \" +\n \"APE_API_KEY is set nor the key file is dynamically downloaded.\");\n return null;\n }\n keyFilePath = globalKeyFile.getAbsolutePath();\n }\n if (Strings.isNullOrEmpty(mApiScope)) {\n CLog.d(\"API scope not set, use flag --business-logic-api-scope.\");\n return null;\n }\n try {\n Credential credential = GoogleCredential.fromStream(new FileInputStream(keyFilePath))\n .createScoped(Collections.singleton(mApiScope));\n credential.refreshToken();\n return credential.getAccessToken();\n } catch (FileNotFoundException e) {\n CLog.e(String.format(\"Service key file %s doesn't exist.\", keyFilePath));\n } catch (IOException e) {\n CLog.e(String.format(\"Can't read the service key file, %s\", keyFilePath));\n }\n return null;\n }", "private static String getAccessToken() throws IOException {\n\t\t \t\n\t\t GoogleCredential googleCredential = GoogleCredential\n\t .fromStream(new FileInputStream(path))\n\t .createScoped(Arrays.asList(SCOPES));\n\t\t \tgoogleCredential.refreshToken();\n\t\t \treturn googleCredential.getAccessToken();\n\t}", "String getAccessToken();", "String getAccessToken();", "GoogleAuthenticatorKey createCredentials(String userName);", "public String getAccessToken();", "private static String getCloudAuth(String accessToken) {\n\t\ttry {\n\t\t\tURL urlResource = new URL(\"https://myapi.pathomation.com/api/v1/authenticate\");\n\t\t\tURLConnection conn = urlResource.openConnection();\n\t\t\tconn.setRequestProperty( \"Authorization\", \"Bearer \" + accessToken);\n\t\t\tconn.setUseCaches( false );\n\t\t\treturn getResponseString(conn);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "GmailClient getGmailClient(Credential credential);", "public static Credential authorize() throws IOException {\n // Load client secrets.\n InputStream in =\n Quickstart2.class.getResourceAsStream(\"/client_secret.json\");\n GoogleClientSecrets clientSecrets =\n GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow =\n new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(DATA_STORE_FACTORY)\n .setAccessType(\"offline\")\n .build();\n \n Credential credential = new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize(\"user\");\n \n System.out.println(\"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n return credential;\n }", "public static Credential authorize() throws IOException, GeneralSecurityException {\n // Load client secrets.\n InputStream in = GoogleIntegration.class.getResourceAsStream(\"/client_secret.json\");\n GoogleClientSecrets clientSecrets =\n GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n FileDataStoreFactory DATA_FACTORY = new FileDataStoreFactory(DATA_STORE_DIR);\n HttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow =\n new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(DATA_FACTORY)\n .setAccessType(\"offline\")\n .build();\n Credential credential = new AuthorizationCodeInstalledApp(\n flow, new LocalServerReceiver()).authorize(\"user\");\n System.out.println(\n \"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n return credential;\n }", "private Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "public String getGCalendarAccessToken( String gcalid, String emailID) {\n\t\t\n\t\tGoogleCredential credential = getGoogleCredential(emailID);\n\t\tif (credential == null) {\n\t\t\treturn null; // user not authorized\n\t\t}\n\t\telse{\n\t\t\treturn credential.getAccessToken();\n\t\t}\n\t}", "public static Credential authorize() throws IOException \n\t {\n\t // Load client secrets.\n\t InputStream in = YouTubeDownloader.class.getResourceAsStream(\"/youtube/downloader/resources/clients_secrets.json\");\n\t GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader( in ));\n\n\t // Build flow and trigger user authorization request.\n\t GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n\t HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n\t .setDataStoreFactory(DATA_STORE_FACTORY)\n\t .setAccessType(\"offline\")\n\t .build();\n\t Credential credential = new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize(\"user\");\n\t System.out.println(\"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n\t return credential;\n\t }", "private static Credential getCredentials(HttpTransport HTTP_TRANSPORT) throws IOException {\r\n // Load client secrets.\r\n InputStream in = SheetsQuickstart.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\r\n if (in == null) {\r\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\r\n }\r\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\r\n\r\n // Build flow and trigger user authorization request.\r\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\r\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\r\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\r\n .setAccessType(\"offline\")\r\n .build();\r\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\r\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\r\n }", "@SuppressWarnings(\"unused\")\n private static String getRefreshToken() throws IOException {\n String client_id = System.getenv(\"PICASSA_CLIENT_ID\");\n String client_secret = System.getenv(\"PICASSA_CLIENT_SECRET\");\n \n // Adapted from http://stackoverflow.com/a/14499390/1447621\n String redirect_uri = \"http://localhost\";\n String scope = \"http://picasaweb.google.com/data/\";\n List<String> scopes;\n HttpTransport transport = new NetHttpTransport();\n JsonFactory jsonFactory = new JacksonFactory();\n\n scopes = new LinkedList<String>();\n scopes.add(scope);\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, client_id, client_secret, scopes).build();\n GoogleAuthorizationCodeRequestUrl url = flow.newAuthorizationUrl();\n url.setRedirectUri(redirect_uri);\n url.setApprovalPrompt(\"force\");\n url.setAccessType(\"offline\");\n String authorize_url = url.build();\n \n // paste into browser to get code\n System.out.println(\"Put this url into your browser and paste in the access token:\");\n System.out.println(authorize_url);\n \n Scanner scanner = new Scanner(System.in);\n String code = scanner.nextLine();\n scanner.close();\n\n flow = new GoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, client_id, client_secret, scopes).build();\n GoogleTokenResponse res = flow.newTokenRequest(code).setRedirectUri(redirect_uri).execute();\n String refreshToken = res.getRefreshToken();\n String accessToken = res.getAccessToken();\n\n System.out.println(\"refresh:\");\n System.out.println(refreshToken);\n System.out.println(\"access:\");\n System.out.println(accessToken);\n return refreshToken;\n }", "public void getGoogleToken() {\n String googleEmail = sharedpreferences.getString(\"GoogleEmail\", \"\");\n String scopes = sharedpreferences.getString(\"GoogleScopes\", \"\");\n if (!\"\".equals(googleEmail)) {\n MyAsyncTask asyncTask = new MyAsyncTask(googleEmail, scopes, this.getBaseContext());\n asyncTask.delegate = this;\n asyncTask.execute();\n }\n }", "private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT)\n throws IOException {\n // Load client secrets.\n InputStream in = GoogleCalendar.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY,\n new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT,\n JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(\n new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\").build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "String getComponentAccessToken();", "private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n // Load client secrets.\n InputStream in = GoogleAuthorizeUtil.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "private Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n // Load client secrets.\n InputStream in = EventoUtils.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "public GoogleAuthHelper() {\n\t\t\n\t\tLoadType<ClientCredentials> credentials = ofy().load().type(ClientCredentials.class);\n\t\t\n\t\tfor(ClientCredentials credential : credentials) {\n\t\t\t// static ClientCredentials credentials = new ClientCredentials();\n\t\t\tCALLBACK_URI = credential.getCallBackUri();\n\t\t\tCLIENT_ID = credential.getclientId();\n\t\t\tCLIENT_SECRET = credential.getClientSecret();\n\t\t}\n\t\t\n\t\tflow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT,\n\t\t\t\tJSON_FACTORY, CLIENT_ID, CLIENT_SECRET, SCOPE).setAccessType(\n\t\t\t\t\"offline\").build();\n\t\tgenerateStateToken();\n\t}", "public static Credential authorize() throws IOException {\n\t\t// Load client secrets.\n\t\tInputStream in = GmailDownloader.class.getResourceAsStream(\"/client_secret.json\");\n\t\tGoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n\t\t// Build flow and trigger user authorization request.\n\t\tGoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT, JSON_FACTORY,\n\t\t\t\tclientSecrets, SCOPES).setDataStoreFactory(DATA_STORE_FACTORY).setAccessType(\"offline\").build();\n\t\tCredential credential = new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize(\"user\");\n\t\tSystem.out.println(\"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n\t\treturn credential;\n\t}", "String getToken(String scope, String username, String password) throws AuthorizationException;", "private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n InputStream in = SheetsRead.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "public static String getAccessToken() {\n return accessToken;\n }", "public void getResponseGoogle(String googleToken, final AsyncHandler<lrAccessToken> handler)\n\t {\n\t\t \tMap<String, String> params = new HashMap<String, String>();\n\t\t \tparams.put(\"key\",AKey);\n\t\t \tparams.put(\"google_access_token\",googleToken);\n\t\t \tproviderHandler(Endpoint.API_V2_ACCESS_TOKEN_GOOGLE, params, handler);\n\t }", "@Override\n public ExternalCredentialsResponse getCredentials(Principal principal, DomainDetails domainDetails, String idToken, ExternalCredentialsRequest externalCredentialsRequest)\n throws ResourceException {\n\n // first make sure that our required components are available and configured\n\n if (authorizer == null) {\n throw new ResourceException(ResourceException.FORBIDDEN, \"ZTS authorizer not configured\");\n }\n\n Map<String, String> attributes = externalCredentialsRequest.getAttributes();\n final String gcpServiceAccount = getRequestAttribute(attributes, GCP_SERVICE_ACCOUNT, null);\n if (StringUtil.isEmpty(gcpServiceAccount)) {\n throw new ResourceException(ResourceException.BAD_REQUEST, \"missing gcp service account\");\n }\n\n // verify that the given principal is authorized for all scopes requested\n\n final String gcpTokenScope = getRequestAttribute(attributes, GCP_TOKEN_SCOPE, GCP_DEFAULT_TOKEN_SCOPE);\n String[] gcpTokenScopeList = gcpTokenScope.split(\" \");\n for (String scopeItem : gcpTokenScopeList) {\n final String resource = domainDetails.getName() + \":\" + scopeItem;\n if (!authorizer.access(GCP_SCOPE_ACTION, resource, principal, null)) {\n throw new ResourceException(ResourceException.FORBIDDEN, \"Principal not authorized for configured scope\");\n }\n }\n\n try {\n // first we're going to get our exchange token\n\n GcpExchangeTokenResponse exchangeTokenResponse = getExchangeToken(domainDetails, idToken, externalCredentialsRequest);\n\n final String serviceUrl = String.format(\"https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/%s@%s.iam.gserviceaccount.com:generateAccessToken\",\n gcpServiceAccount, domainDetails.getGcpProjectId());\n final String authorizationHeader = exchangeTokenResponse.getTokenType() + \" \" + exchangeTokenResponse.getAccessToken();\n\n GcpAccessTokenRequest accessTokenRequest = new GcpAccessTokenRequest();\n accessTokenRequest.setScopeList(gcpTokenScope);\n int expiryTime = externalCredentialsRequest.getExpiryTime() == null ? 3600 : externalCredentialsRequest.getExpiryTime();\n accessTokenRequest.setLifetimeSeconds(expiryTime);\n\n HttpPost httpPost = new HttpPost(serviceUrl);\n httpPost.addHeader(HttpHeaders.AUTHORIZATION, authorizationHeader);\n httpPost.setEntity(new StringEntity(jsonMapper.writeValueAsString(accessTokenRequest), ContentType.APPLICATION_JSON));\n\n final HttpDriverResponse httpResponse = httpDriver.doPostHttpResponse(httpPost);\n if (httpResponse.getStatusCode() != HttpStatus.SC_OK) {\n GcpAccessTokenError error = jsonMapper.readValue(httpResponse.getMessage(), GcpAccessTokenError.class);\n throw new ResourceException(httpResponse.getStatusCode(), error.getErrorMessage());\n }\n\n GcpAccessTokenResponse gcpAccessTokenResponse = jsonMapper.readValue(httpResponse.getMessage(), GcpAccessTokenResponse.class);\n\n ExternalCredentialsResponse externalCredentialsResponse = new ExternalCredentialsResponse();\n attributes = new HashMap<>();\n attributes.put(GCP_ACCESS_TOKEN, gcpAccessTokenResponse.getAccessToken());\n externalCredentialsResponse.setAttributes(attributes);\n externalCredentialsResponse.setExpiration(Timestamp.fromString(gcpAccessTokenResponse.getExpireTime()));\n return externalCredentialsResponse;\n\n } catch (Exception ex) {\n throw new ResourceException(ResourceException.FORBIDDEN, ex.getMessage());\n }\n }", "private void getAccessToken() {\n\n\t\tMediaType mediaType = MediaType.parse(\"application/x-www-form-urlencoded\");\n\t\tRequestBody body = RequestBody.create(mediaType,\n\t\t\t\t\"client_id=\" + CONSUMER_KEY + \"&client_secret=\" + CONSUMER_SECRET + \"&grant_type=client_credentials\");\n\t\tRequest request = new Request.Builder().url(\"https://api.yelp.com/oauth2/token\").post(body)\n\t\t\t\t.addHeader(\"cache-control\", \"no-cache\").build();\n\n\t\ttry {\n\t\t\tokhttp3.Response response = client.newCall(request).execute();\n\t\t\tString respbody = response.body().string().trim();\n\t\t\tJSONParser parser = new JSONParser();\n\t\t\tJSONObject json = (JSONObject) parser.parse(respbody);\n\t\t\taccessToken = (String) json.get(\"access_token\");\n\t\t} catch (IOException | ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Credential getCredentialRefTkn(String refreshToken){\n\tCredential credential = createCredentialWithRefreshToken(HTTP_TRANSPORT,\n\t\t\tJSON_FACTORY,\n\t\t\tnew TokenResponse().setRefreshToken(refreshToken), CLIENT_ID,\n\t\t\tCLIENT_SECRET);\n\treturn credential;\n\t}", "public Credentials getCredentials(AuthScope authscope)\n {\n return credentials;\n }", "private GoogleCredential getCredentialFromCredentialCache(final String userId) throws IOException{\n\t\tGoogleCredential credential = (GoogleCredential)cache.get(userId);\n\t\tif (credential != null){\n\t\t\tM_log.debug(\"Fetching credential from cache for user: \" + userId);\n\t\t\treturn credential;\n\t\t}\n\t\telse{ // Need to create credential and create access token.\n\t\t\tcredential = SakaiGoogleAuthServiceImpl.authorize(userId, SERVICE_ACCOUNT_EMAIL, PRIVATE_KEY, CalendarScopes.CALENDAR);\n\t\t\tif (credential != null){\n\t\t\t\tcredential.refreshToken(); // Populates credential with access token\n\t\t\t\taddCredentialToCache(userId, credential);\n\t\t\t}\n\t\t\treturn credential;\n\t\t}\n\t}", "public Credential getUsercredential(final String authCode)\n\t\t\tthrows IOException, JSONException {\n\t\tfinal GoogleTokenResponse response = flow.newTokenRequest(authCode)\n\t\t\t\t.setRedirectUri(CALLBACK_URI).execute();\n\t\tfinal Credential credential = flow.createAndStoreCredential(response,\n\t\t\t\tnull);\n\t\treturn credential;\n\t}", "Future<String> getAccessToken(OkapiConnectionParams params);", "private CdekAuthToken getAuthToken()\n {\n String authEndpoint = conf.ENDPOINT + \"/oauth/token?grant_type={grant_type}&client_id={client_id}&client_secret={client_secret}\";\n\n HttpHeaders defaultHeaders = new HttpHeaders();\n HttpEntity req = new HttpEntity(defaultHeaders);\n\n return rest.postForObject(authEndpoint, req, CdekAuthToken.class, conf.getAuthData());\n }", "public String getAccessToken() {\n return accessToken;\n }", "public String getAccessToken() {\n return accessToken;\n }", "public void retrieveAccessToken(Context context) {\n PBookAuth mPBookAuth = mApplicationPreferences.getPBookAuth();\n if (mPBookAuth == null || TextUtils.isEmpty(mPBookAuth.getClientName())) {\n view.onReturnAccessToken(null, false);\n return;\n }\n Ion.with(context).load(ACCESS_TOKEN_SERVICE_URL).setBodyParameter(\"client\", mPBookAuth.getClientName()).setBodyParameter(\"phoneNumber\", mPBookAuth.getPhoneNumber()).setBodyParameter(\"platform\", PLATFORM_KEY).asString().setCallback(new FutureCallback<String>() {\n @Override\n public void onCompleted(Exception e, String accessToken) {\n if (e == null || !TextUtils.isEmpty(accessToken)) {\n mApplicationPreferences.setTwilioToken(accessToken);\n view.onReturnAccessToken(accessToken, true);\n } else {\n view.onReturnAccessToken(accessToken, false);\n }\n }\n });\n }", "static @NonNull String getAuthToken(@NonNull Context context) throws AuthException {\n final long startTime = System.currentTimeMillis();\n final GoogleApiClient googleApiClient = getClient(context);\n try {\n final ConnectionResult result = googleApiClient.blockingConnect();\n if (result.isSuccess()) {\n final GoogleSignInResult googleSignInResult = Auth.GoogleSignInApi.silentSignIn(googleApiClient).await();\n final GoogleSignInAccount account = googleSignInResult.getSignInAccount();\n if(account != null) {\n final String authToken = account.getIdToken();\n if(authToken != null) {\n Log.i(TAG, \"Got auth token in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n return authToken;\n } else {\n throw new AuthException(\"Failed to get auth token\");\n }\n } else {\n throw new AuthException(\"Not signed in\");\n }\n } else {\n throw new AuthException(\"Sign in connection error\");\n }\n } finally {\n googleApiClient.disconnect();\n }\n }", "String getAuthorizerAccessToken(String appId);", "private static com.google.api.services.calendar.Calendar getCalendarService() throws IOException\n{\n Credential cred = authorize();\n com.google.api.services.calendar.Calendar.Builder bldr =\n new com.google.api.services.calendar.Calendar.Builder(HTTP_TRANSPORT,JSON_FACTORY,cred);\n bldr.setApplicationName(APPLICATION_NAME);\n\n com.google.api.services.calendar.Calendar cal = bldr.build();\n\n return cal;\n}", "private String getAccessTokenUrl(String identityServer) {\n\t\treturn \"https://accounts.google.com/o/oauth2/token\";\n\t}", "private Drive authentication() throws IOException {\n\t\t// Request a new access token using the refresh token.\n\t\tGoogleCredential credential = new GoogleCredential.Builder()\n\t\t\t\t.setTransport(HTTP_TRANSPORT)\n\t\t\t\t.setJsonFactory(JSON_FACTORY)\n\t\t\t\t.setClientSecrets(CLIENT_ID, CLIENT_SECRET).build()\n\t\t\t\t.setFromTokenResponse(new TokenResponse().setRefreshToken(REFRESH_TOKEN));\n\t\tcredential.refreshToken();\n\t\treturn new Drive.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential)\n\t\t\t\t.setApplicationName(\"tp3\").build();\n\t}", "public static GoogleCredential createCredentialWithRefreshToken(\n\t\t\tHttpTransport transport, JacksonFactory jsonFactory,\n\t\t\tTokenResponse tokenResponse, String clientId, String clientSecret) {\n\t\treturn new GoogleCredential.Builder().setTransport(HTTP_TRANSPORT)\n\t\t\t\t.setJsonFactory(new JacksonFactory())\n\t\t\t\t.setClientSecrets(clientId, clientSecret).build()\n\t\t\t\t.setFromTokenResponse(tokenResponse);\n\t}", "public Optional<GoogleTokenResponse> getGoogleToken(@NonNull GoogleOAuthData data) {\n Validation validation = data.valid();\n\n Preconditions.checkArgument(validation.isValid(), validation.getMessage());\n GoogleAuthConsumer consumer = new GoogleAuthConsumer();\n try {\n GoogleTokenResponse response = consumer.redeemAuthToken(data.getAuth_code(), data.getClient_id(), data.getRedirect_uri());\n return Optional.ofNullable(response);\n } catch (Exception e) {\n return Optional.empty();\n }\n }", "private String GetAccessToken() {\n final String grantType = \"password\";\n final String resourceId = \"https%3A%2F%2Fgraph.microsoft.com%2F\";\n final String tokenEndpoint = \"https://login.microsoftonline.com/common/oauth2/token\";\n\n try {\n URL url = new URL(tokenEndpoint);\n HttpURLConnection conn;\n if (configuration.isProxyUsed()) {\n Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(configuration.getProxyServer(), configuration.getProxyPort()));\n conn = (HttpURLConnection) url.openConnection(proxy);\n } else {\n conn = (HttpURLConnection) url.openConnection();\n }\n\n String line;\n StringBuilder jsonString = new StringBuilder();\n\n conn.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n conn.setRequestMethod(\"POST\");\n conn.setDoInput(true);\n conn.setDoOutput(true);\n conn.setInstanceFollowRedirects(false);\n conn.connect();\n\n try (OutputStreamWriter outputStreamWriter = new OutputStreamWriter(conn.getOutputStream(), StandardCharsets.UTF_8)) {\n String payload = String.format(\"grant_type=%1$s&resource=%2$s&client_id=%3$s&username=%4$s&password=%5$s\",\n grantType,\n resourceId,\n clientId,\n username,\n password);\n outputStreamWriter.write(payload);\n }\n\n try (BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\n while((line = br.readLine()) != null) {\n jsonString.append(line);\n }\n }\n\n conn.disconnect();\n\n JsonObject res = new GsonBuilder()\n .create()\n .fromJson(jsonString.toString(), JsonObject.class);\n\n return res\n .get(\"access_token\")\n .toString()\n .replaceAll(\"\\\"\", \"\");\n\n } catch (IOException e) {\n throw new IllegalAccessError(\"Unable to read authorization response: \" + e.getLocalizedMessage());\n }\n }", "@Nullable\n private String fetchToken() throws IOException {\n try {\n return GoogleAuthUtil.getToken(mActivity, mEmail, mScope);\n } catch (UserRecoverableAuthException ex) {\n // GooglePlayServices.apk is either old, disabled, or not present\n // so we need to show the user some UI in the activity to recover.\n // TODO: complain about old version\n Log.e(\"aqx1010\", \"required Google Play version not found\", ex);\n } catch (GoogleAuthException fatalException) {\n // Some other type of unrecoverable exception has occurred.\n // Report and log the error as appropriate for your app.\n Log.e(\"aqx1010\", \"fatal authorization exception\", fatalException);\n }\n return null;\n }", "private String getCredentials() {\n String credentials = \"\";\n AccountManager accountManager = AccountManager.get(getContext());\n\n final Account availableAccounts[] = accountManager.getAccountsByType(AccountGeneral.ACCOUNT_TYPE);\n\n //there should be only one ERT account\n if(availableAccounts.length > 0) {\n Account account = availableAccounts[0];\n AccountManagerFuture<Bundle> future = accountManager.getAuthToken(account, AccountGeneral.AUTHTOKEN_TYPE_FULL_ACCESS, null, null, null, null);\n try {\n Bundle bundle = future.getResult();\n String accountName = bundle.getString(AccountManager.KEY_ACCOUNT_NAME);\n String token = bundle.getString(AccountManager.KEY_AUTHTOKEN);\n credentials = accountName + \":\" + token;\n } catch (OperationCanceledException | IOException | AuthenticatorException e) {\n Log.e(LOG_TAG, e.getMessage());\n }\n }\n return credentials;\n }", "public interface GoogleAccountDataClient {\n AccountNameCheckResponse checkAccountName(AccountNameCheckRequest accountNameCheckRequest) throws ;\n\n CheckFactoryResetPolicyComplianceResponse checkFactoryResetPolicyCompliance(CheckFactoryResetPolicyComplianceRequest checkFactoryResetPolicyComplianceRequest) throws ;\n\n PasswordCheckResponse checkPassword(PasswordCheckRequest passwordCheckRequest) throws ;\n\n CheckRealNameResponse checkRealName(CheckRealNameRequest checkRealNameRequest) throws ;\n\n void clearFactoryResetChallenges() throws ;\n\n ClearTokenResponse clearToken(ClearTokenRequest clearTokenRequest) throws ;\n\n boolean clearWorkAccountAppWhitelist() throws ;\n\n TokenResponse confirmCredentials(ConfirmCredentialsRequest confirmCredentialsRequest) throws ;\n\n TokenResponse createAccount(GoogleAccountSetupRequest googleAccountSetupRequest) throws ;\n\n TokenResponse createPlusProfile(GoogleAccountSetupRequest googleAccountSetupRequest) throws ;\n\n @Deprecated\n GoogleAccountData getAccountData(@Deprecated String str) throws ;\n\n Bundle getAccountExportData(String str) throws ;\n\n String getAccountId(String str) throws ;\n\n AccountRecoveryData getAccountRecoveryCountryInfo() throws ;\n\n AccountRecoveryData getAccountRecoveryData(AccountRecoveryDataRequest accountRecoveryDataRequest) throws ;\n\n AccountRecoveryGuidance getAccountRecoveryGuidance(AccountRecoveryGuidanceRequest accountRecoveryGuidanceRequest) throws ;\n\n GetAndAdvanceOtpCounterResponse getAndAdvanceOtpCounter(String str) throws ;\n\n GoogleAccountData getGoogleAccountData(Account account) throws ;\n\n String getGoogleAccountId(Account account) throws ;\n\n GplusInfoResponse getGplusInfo(GplusInfoRequest gplusInfoRequest) throws ;\n\n OtpResponse getOtp(OtpRequest otpRequest) throws ;\n\n TokenResponse getToken(TokenRequest tokenRequest) throws ;\n\n boolean installAccountFromExportData(String str, Bundle bundle) throws ;\n\n AccountRemovalResponse removeAccount(AccountRemovalRequest accountRemovalRequest) throws ;\n\n boolean setWorkAccountAppWhitelistFingerprint(String str, String str2) throws ;\n\n TokenResponse signIn(AccountSignInRequest accountSignInRequest) throws ;\n\n AccountRecoveryUpdateResult updateAccountRecoveryData(AccountRecoveryUpdateRequest accountRecoveryUpdateRequest) throws ;\n\n TokenResponse updateCredentials(UpdateCredentialsRequest updateCredentialsRequest) throws ;\n\n ValidateAccountCredentialsResponse validateAccountCredentials(AccountCredentials accountCredentials) throws ;\n}", "String getToken(String username, String password, String grant_type) throws IllegalAccessException{\n\n String URI = serviceUrl + \"/oauth/token\" + \"?\" +\n String.format(\"%s=%s&%s=%s&%s=%s\", \"grant_type\", grant_type, \"username\", username, \"password\", password);\n// String CONTENT_TYPE = \"application/x-www-form-urlencoded\";\n // TODO clientId and clientSecret !!!\n String ENCODING = \"Basic \" +\n Base64.getEncoder().encodeToString(String.format(\"%s:%s\", \"clientId\", \"clientSecret\").getBytes());\n\n// AtomicReference<String> token = null;\n// authorization.subscribe(map -> {\n// token.set((String) map.get(ACCESS_TOKEN));\n// });\n\n String token = null;\n try {\n token = (String)WebClient.create().post()\n .uri(URI)\n .accept(MediaType.APPLICATION_FORM_URLENCODED)\n .contentType(MediaType.APPLICATION_FORM_URLENCODED)\n .header(\"Authorization\", ENCODING)\n .retrieve()\n .bodyToMono(Map.class)\n .block().get(ACCESS_TOKEN);\n } catch (Exception e){\n throw new IllegalAccessException(\"Can't reach access token\");\n }\n\n return token;\n }", "public String getAccessToken() {\n readLock.lock();\n try {\n return accessToken;\n } finally {\n readLock.unlock();\n }\n }", "@Test\n public void getGoogleAuthTokensTest() throws ApiException {\n String code = null;\n InlineResponse2003 response = api.getGoogleAuthTokens(code);\n\n // TODO: test validations\n }", "public String getAccessToken() {\n return accessToken;\n }", "public interface GmailClientFactory {\n /**\n * Creates a GmailClient instance\n *\n * @param credential a valid Google credential object\n * @return a GmailClient instance that contains the user's credentials\n */\n GmailClient getGmailClient(Credential credential);\n}", "public Object credential(HttpServletRequest request)\n throws URISyntaxException, OAuthSystemException {\n try {\n OAuthClientCredentialRequest oauthRequest = new OAuthClientCredentialRequest(request);\n OAuthAuthzParameters oAuthAuthzParameters = new OAuthAuthzParameters(oauthRequest);\n\n if (!oauthRequest.getGrantType().equals(Constants.OAUTH_CLIENT_CREDENTIALS)) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_REQUEST))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_GRANT_TYPE)\n .buildJSONMessage();\n logger.info(\"invalid grant type: {}, context: {}\", oauthRequest.getGrantType(), oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n Client client = oAuthService.getClientByClientId(oAuthAuthzParameters.getClientId());\n if (client == null) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_CLIENT_DESCRIPTION)\n .buildJSONMessage();\n logger.info(\"can not get client, context: {}\", oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n if (!client.getGrantTypes().contains(Constants.OAUTH_CLIENT_CREDENTIALS)) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT_INFO))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_GRANT_TYPE)\n .buildJSONMessage();\n logger.info(\"no grant type, context: {}\", oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n if (!client.getClientSecret().equals(oAuthAuthzParameters.getClientSecret())) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT_INFO))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_CLIENT_DESCRIPTION)\n .buildJSONMessage();\n logger.info(\"invalid secret: {}, context: {}\", client.getClientSecret(), oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n if (StringUtils.isEmpty(oAuthAuthzParameters.getScope())) {\n oAuthAuthzParameters.setScope(client.getDefaultScope());\n } else {\n oAuthAuthzParameters.setScope(\n OAuthUtils.encodeScopes(\n oAuthService.getRetainScopes(\n client.getDefaultScope(),\n oAuthAuthzParameters.getScope()\n )\n )\n );\n }\n\n OAuthIssuer oauthIssuerImpl = new OAuthIssuerImpl(new UUIDValueGeneratorEx());\n String accessToken = oauthIssuerImpl.accessToken();\n\n oAuthService.saveAccessToken(accessToken, oAuthAuthzParameters);\n\n OAuthResponse response = OAuthASResponseEx\n .tokenResponse(HttpServletResponse.SC_OK)\n .setTokenType(\"uuid\")\n .setAccessToken(accessToken)\n .setExpiresIn(String.valueOf(appConfig.tokenAccessExpire))\n .setScope(oAuthAuthzParameters.getScope())\n .buildJSONMessage();\n logger.info(\"response access token {}, context: {}\", accessToken, oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n } catch (OAuthProblemException e) {\n logger.error(\"oauth problem exception\", e);\n final OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_REQUEST))\n .setErrorDescription(e.getMessage())\n .buildJSONMessage();\n HttpHeaders headers = new HttpHeaders();\n return new ResponseEntity<String>(response.getBody(), headers, HttpStatus.valueOf(response.getResponseStatus()));\n }\n }", "public static String getAccessToken(Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\treturn prefs.getString(TWITTER_ACCESS_TOKEN, null);\n\t\t}", "public Object getCredential()\n {\n return this.credential;\n }", "public Object getCredential()\n {\n return this.credential;\n }", "public Object getCredential()\n {\n return this.credential;\n }", "private Calendar getGoogleClient(String email)\t{\n\t\tGoogleCredential credential = getGoogleCredential(email);\n\t\tCalendar client = getGoogleClient(credential);\n\t\treturn client;\n\t}", "public int getTokenViaClientCredentials(){\n\t\t//Do we have credentials?\n\t\tif (Is.nullOrEmpty(clientId) || Is.nullOrEmpty(clientSecret)){\n\t\t\treturn 1;\n\t\t}\n\t\ttry{\n\t\t\t//Build auth. header entry\n\t\t\tString authString = \"Basic \" + Base64.getEncoder().encodeToString((clientId + \":\" + clientSecret).getBytes());\n\t\t\t\n\t\t\t//Request headers\n\t\t\tMap<String, String> headers = new HashMap<>();\n\t\t\theaders.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\theaders.put(\"Authorization\", authString);\n\t\t\t\n\t\t\t//Request data\n\t\t\tString data = ContentBuilder.postForm(\"grant_type\", \"client_credentials\");\n\t\t\t\n\t\t\t//Call\n\t\t\tlong tic = System.currentTimeMillis();\n\t\t\tthis.lastRefreshTry = tic;\n\t\t\tJSONObject res = Connectors.httpPOST(spotifyAuthUrl, data, headers);\n\t\t\tStatistics.addExternalApiHit(\"SpotifyApi getTokenViaClientCredentials\");\n\t\t\tStatistics.addExternalApiTime(\"SpotifyApi getTokenViaClientCredentials\", tic);\n\t\t\t//System.out.println(res.toJSONString()); \t\t//DEBUG\n\t\t\tif (!Connectors.httpSuccess(res)){\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\tString token = JSON.getString(res, \"access_token\");\n\t\t\tString tokenType = JSON.getString(res, \"token_type\");\n\t\t\tlong expiresIn = JSON.getLongOrDefault(res, \"expires_in\", 0);\n\t\t\tif (Is.nullOrEmpty(token)){\n\t\t\t\treturn 4;\n\t\t\t}else{\n\t\t\t\tthis.token = token;\n\t\t\t\tthis.tokenType = tokenType;\n\t\t\t\tthis.tokenValidUntil = System.currentTimeMillis() + (expiresIn * 1000);\n\t\t\t}\n\t\t\treturn 0;\n\t\t\t\n\t\t}catch (Exception e){\n\t\t\tStatistics.addExternalApiHit(\"SpotifyApi-error getTokenViaClientCredentials\");\n\t\t\treturn 3;\n\t\t}\n\t}", "public String getAccessToken()\n {\n if (accessToken == null)\n {\n if (DEBUG)\n {\n System.out.println(\"Access token is empty\");\n }\n try\n {\n FileReader fileReader = new FileReader(getCache(\"token\"));\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n accessToken = bufferedReader.readLine();\n if (DEBUG)\n {\n System.out.println(\"BufferReader line: \" + accessToken);\n }\n } catch (FileNotFoundException e)\n {\n e.printStackTrace();\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return accessToken;\n }", "public static Drive getDriveService(String token) throws IOException, GeneralSecurityException {\n Credential credential = new GoogleCredential().setAccessToken(token);\n return new Drive.Builder(GoogleNetHttpTransport.newTrustedTransport(), JacksonFactory.getDefaultInstance(), credential).setApplicationName(APPLICATION_NAME).build();\n }", "public static String getAccessToken() {\n return \"\";\n }", "@Override\n public void authenticate() throws IOException, BadAccessIdOrKeyException {\n try{\n HttpPost post = new HttpPost(Constants.FRGXAPI_TOKEN);\n List<NameValuePair> params = new ArrayList<>();\n params.add(new BasicNameValuePair(\"grant_type\", \"apiAccessKey\"));\n params.add(new BasicNameValuePair(\"apiAccessId\", accessId));\n params.add(new BasicNameValuePair(\"apiAccessKey\", accessKey));\n post.setEntity(new UrlEncodedFormEntity(params, \"UTF-8\"));\n\n HttpResponse response = client.execute(post);\n String a = response.getStatusLine().toString();\n\n if(a.equals(\"HTTP/1.1 400 Bad Request\")){\n throw (new BadAccessIdOrKeyException(\"Bad Access Id Or Key\"));\n }\n HttpEntity entity = response.getEntity();\n String responseString = EntityUtils.toString(response.getEntity());\n\n JsonParser jsonParser = new JsonParser();\n JsonObject jo = (JsonObject) jsonParser.parse(responseString);\n if(jo.get(\"access_token\") == null){\n throw new NullResponseException(\"The Access Token you get is null.\");\n }\n String accessToken = jo.get(\"access_token\").getAsString();\n List<Header> headers = new ArrayList<>();\n headers.add(new BasicHeader(HttpHeaders.CONTENT_TYPE, \"application/json\"));\n headers.add(new BasicHeader(\"Authorization\", \"Bearer \" + accessToken));\n\n client = HttpClients.custom().setDefaultHeaders(headers).build();\n } catch (NullResponseException e) {\n System.out.println(e.getMsg());\n }\n }", "public String getAccessToken() {\n\t\treturn accessToken;\n\t}", "public String getAccessToken() {\n\t\treturn accessToken;\n\t}", "@Test\n public void getGoogleAuthUrlTest() throws ApiException {\n InlineResponse2002 response = api.getGoogleAuthUrl();\n\n // TODO: test validations\n }", "public String getToken(String name){\n\n return credentials.get(name, token);\n }", "@MainThread\n void getAccessToken(Account account, String scope, GetAccessTokenCallback callback) {\n ConnectionRetry.runAuthTask(new AuthTask<AccessTokenData>() {\n @Override\n public AccessTokenData run() throws AuthException {\n return mAccountManagerFacade.getAccessToken(account, scope);\n }\n @Override\n public void onSuccess(AccessTokenData token) {\n callback.onGetTokenSuccess(token);\n }\n @Override\n public void onFailure(boolean isTransientError) {\n callback.onGetTokenFailure(isTransientError);\n }\n });\n }", "public java.lang.String getOauth_token(){\r\n return localOauth_token;\r\n }", "protected AccessToken getAccessToken() \n\t{\n\t\treturn accessToken;\n\t}", "List<ExposedOAuthCredentialModel> readExposedOAuthCredentials();", "private static Calendar getService() throws GeneralSecurityException, IOException {\n final NetHttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n return new Calendar.Builder(HTTP_TRANSPORT, JSON_FACTORY, getCredentials(HTTP_TRANSPORT))\n .setApplicationName(APPLICATION_NAME).build();\n }", "private static Credential authorize(List<String> scopes) throws Exception {\r\n\r\n\t // Load client secrets.\r\n\t GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(\r\n\t JSON_FACTORY, UploadVideo.class.getResourceAsStream(\"/client_secrets.json\"));\r\n\r\n\t // Checks that the defaults have been replaced (Default = \"Enter X here\").\r\n\t if (clientSecrets.getDetails().getClientId().startsWith(\"Enter\")\r\n\t || clientSecrets.getDetails().getClientSecret().startsWith(\"Enter \")) {\r\n\t System.out.println(\r\n\t \"Enter Client ID and Secret from https://code.google.com/apis/console/?api=youtube\"\r\n\t + \"into youtube-cmdline-uploadvideo-sample/src/main/resources/client_secrets.json\");\r\n\t System.exit(1);\r\n\t }\r\n\r\n\t // Set up file credential store.\r\n\t FileCredentialStore credentialStore = new FileCredentialStore(\r\n\t new File(System.getProperty(\"user.home\"), \".credentials/youtube-api-uploadvideo.json\"),\r\n\t JSON_FACTORY);\r\n\r\n\t // Set up authorization code flow.\r\n\t GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\r\n\t HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, scopes).setCredentialStore(credentialStore)\r\n\t .build();\r\n\r\n\t // Build the local server and bind it to port 9000\r\n\t LocalServerReceiver localReceiver = new LocalServerReceiver.Builder().setPort(8080).build();\r\n\r\n\t // Authorize.\r\n\t return new AuthorizationCodeInstalledApp(flow, localReceiver).authorize(\"user\");\r\n\t }", "public AccessToken getAccessToken() {\n return token;\n }", "private static GoogleApiClient getClient(@NonNull Context context) {\n final String serverClientId = context.getString(R.string.server_client_id);\n final GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(serverClientId)\n .requestEmail()\n .build();\n\n // Build a GoogleApiClient with access to the Google Sign-In API\n return new GoogleApiClient.Builder(context)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n }", "public String getAccessToken(){\n //return \"3be8b617e076b96b2b0fa6369b6c72ed84318d72\";\n return MobileiaAuth.getInstance(mContext).getCurrentUser().getAccessToken();\n }", "public SalesforceAccessGrant(final String accessToken, final String scope, final String refreshToken, final Map<String, Object> response) {\n super(accessToken, scope, refreshToken, null);\n this.instanceUrl = (String)response.get(SalesforceConstants.AccessTokenResult.PARAM_INSTANCE_URL);\n this.id = (String)response.get(SalesforceConstants.AccessTokenResult.PARAM_ID);\n this.signature = (String)response.get(SalesforceConstants.AccessTokenResult.PARAM_SIGNATURE);\n this.issuedAt = (String)response.get(SalesforceConstants.AccessTokenResult.PARAM_ISSUED_AT);\n }", "public Credential getCredential() {\n return this.credential;\n }", "void createExposedOAuthCredential(IntegrationClientCredentialsDetailsModel integrationCCD);", "public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {\n return WorkflowsStubSettings.defaultCredentialsProviderBuilder();\n }", "public String getAccessToken () {\n\t\treturn this.accessToken;\n\t}", "protected static Credentials getServiceCredentials() throws AnaplanAPIException {\n if (authType == AUTH_TYPE.CERT) {\n try {\n return new Credentials(getCertificate(), getPrivateKey());\n } catch (Exception e) {\n throw new AnaplanAPIException(\"Could not initialise service credentials\", e);\n }\n } else if (authType == AUTH_TYPE.OAUTH) {\n return new Credentials(clientId);\n }\n return new Credentials(getUsername(), getPassphrase());\n }", "AccessToken getOAuthAccessToken() throws MoefouException;", "public GoogleApiClient getGoogleApiCLient()\n {\n return googleApiClient;\n }", "AccessToken getOAuthAccessToken(RequestToken requestToken) throws MoefouException;", "private String retrieveToken(String accessCode) throws IOException {\n OAuthApp app = new OAuthApp(asanaCredentials.getClientId(), asanaCredentials.getClientSecret(),\n asanaCredentials.getRedirectUri());\n Client.oauth(app);\n String accessToken = app.fetchToken(accessCode);\n\n //check if user input is valid by testing if accesscode given by user successfully authorises the application\n if (!(app.isAuthorized())) {\n throw new IllegalArgumentException();\n }\n\n return accessToken;\n }", "private HttpRequestInitializer getCredentials(final NetHttpTransport HTTP_TRANSPORT, TCC tcc) throws IOException {\n\t\tlogger.debug(\"Obtendo credenciais...\");\n\t\tString credentialsPath = CREDENTIALS_FILE_PATH + tcc.getAluno().getCurso().getCodigoCurso() + \".json\";\n\t\tlogger.debug(\"Caminho do arquivo de credenciais: \" + credentialsPath);\n\t\tGoogleCredentials credentials = GoogleCredentials.fromStream(new FileInputStream(credentialsPath));\n\t\tcredentials = credentials.createScoped(SCOPES);\n\t\tcredentials.refreshIfExpired();\n\t\tHttpRequestInitializer requestInitializer = new HttpCredentialsAdapter(credentials);\n\t\treturn requestInitializer;\n\t}", "@Override\n public Object getCredentials() {\n return token;\n }", "public java.lang.String getAccessToken(java.lang.String userName, java.lang.String password) throws java.rmi.RemoteException;", "public String getRefreshToken(Credential credential) throws IOException,\n\t\t\tJSONException {\n\t\tString refreshToken = credential.getRefreshToken();\n\t\tSystem.out.println(refreshToken);\n\t\treturn refreshToken;\n\t}", "@Transient\n\tpublic String getAccessToken() {\n\t\treturn accessToken;\n\t}", "@Api(1.0)\n @NonNull\n public String getAccessToken() {\n return mAccessToken;\n }", "boolean authorize(String secret, int verificationCode)\n throws GoogleAuthenticatorException;", "private YouTube getService() throws GeneralSecurityException, IOException {\n final NetHttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport();\n return new YouTube.Builder(httpTransport, JSON_FACTORY, null)\n .setApplicationName(APPLICATION_NAME)\n .build();\n }", "public String getAccess_token() {\r\n\t\treturn access_token;\r\n\t}", "@Nullable\n public String getAccessToken() {\n return accessToken;\n }", "public String getAccessToken() {\n if (accessToken == null || (System.currentTimeMillis() > (expirationTime - 60 * 1000))) {\n if (refreshToken != null) {\n try {\n this.refreshAccessToken();\n } catch (IOException e) {\n log.error(\"Error fetching access token\", e);\n }\n }\n }\n\n return accessToken;\n }" ]
[ "0.7157486", "0.7003007", "0.6981532", "0.69133854", "0.6592825", "0.6592825", "0.65753984", "0.65285426", "0.652011", "0.6323308", "0.63073236", "0.6304731", "0.6291744", "0.62623024", "0.6231891", "0.62285227", "0.620941", "0.6208416", "0.62065107", "0.61997175", "0.61893237", "0.61851245", "0.6184227", "0.6171046", "0.6094259", "0.60731244", "0.6068262", "0.59855014", "0.59841967", "0.59835196", "0.5954099", "0.5925652", "0.59156924", "0.589632", "0.5894392", "0.5885363", "0.5883457", "0.58810973", "0.5876417", "0.58662504", "0.5863356", "0.5852531", "0.584644", "0.5845466", "0.5817204", "0.58116114", "0.57997924", "0.5775077", "0.57553136", "0.57349354", "0.571934", "0.57099336", "0.56936973", "0.5680072", "0.5679436", "0.5677121", "0.56733274", "0.5673131", "0.5673131", "0.5673131", "0.56538725", "0.5653206", "0.5619486", "0.5584489", "0.5576226", "0.5569618", "0.5561092", "0.5561092", "0.55592906", "0.5550116", "0.5535538", "0.5534683", "0.55077267", "0.55027336", "0.5489773", "0.5465888", "0.5460174", "0.5445737", "0.5442145", "0.5433203", "0.54230195", "0.5416498", "0.54114616", "0.5404253", "0.539839", "0.53915834", "0.538819", "0.5369772", "0.5365139", "0.5360147", "0.53522784", "0.5346573", "0.53372115", "0.53269786", "0.5312543", "0.5308907", "0.5308826", "0.5298326", "0.5290892", "0.52775526" ]
0.7455343
0
returns a google credential from a refresh token for accessing api services
public static GoogleCredential createCredentialWithRefreshToken( HttpTransport transport, JacksonFactory jsonFactory, TokenResponse tokenResponse, String clientId, String clientSecret) { return new GoogleCredential.Builder().setTransport(HTTP_TRANSPORT) .setJsonFactory(new JacksonFactory()) .setClientSecrets(clientId, clientSecret).build() .setFromTokenResponse(tokenResponse); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Credential getCredentialRefTkn(String refreshToken){\n\tCredential credential = createCredentialWithRefreshToken(HTTP_TRANSPORT,\n\t\t\tJSON_FACTORY,\n\t\t\tnew TokenResponse().setRefreshToken(refreshToken), CLIENT_ID,\n\t\t\tCLIENT_SECRET);\n\treturn credential;\n\t}", "@SuppressWarnings(\"unused\")\n private static String getRefreshToken() throws IOException {\n String client_id = System.getenv(\"PICASSA_CLIENT_ID\");\n String client_secret = System.getenv(\"PICASSA_CLIENT_SECRET\");\n \n // Adapted from http://stackoverflow.com/a/14499390/1447621\n String redirect_uri = \"http://localhost\";\n String scope = \"http://picasaweb.google.com/data/\";\n List<String> scopes;\n HttpTransport transport = new NetHttpTransport();\n JsonFactory jsonFactory = new JacksonFactory();\n\n scopes = new LinkedList<String>();\n scopes.add(scope);\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, client_id, client_secret, scopes).build();\n GoogleAuthorizationCodeRequestUrl url = flow.newAuthorizationUrl();\n url.setRedirectUri(redirect_uri);\n url.setApprovalPrompt(\"force\");\n url.setAccessType(\"offline\");\n String authorize_url = url.build();\n \n // paste into browser to get code\n System.out.println(\"Put this url into your browser and paste in the access token:\");\n System.out.println(authorize_url);\n \n Scanner scanner = new Scanner(System.in);\n String code = scanner.nextLine();\n scanner.close();\n\n flow = new GoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, client_id, client_secret, scopes).build();\n GoogleTokenResponse res = flow.newTokenRequest(code).setRedirectUri(redirect_uri).execute();\n String refreshToken = res.getRefreshToken();\n String accessToken = res.getAccessToken();\n\n System.out.println(\"refresh:\");\n System.out.println(refreshToken);\n System.out.println(\"access:\");\n System.out.println(accessToken);\n return refreshToken;\n }", "private String getToken() {\n String keyFilePath = System.getenv(\"APE_API_KEY\");\n if (Strings.isNullOrEmpty(keyFilePath)) {\n File globalKeyFile = GlobalConfiguration.getInstance().getHostOptions().\n getServiceAccountJsonKeyFiles().get(GLOBAL_APE_API_KEY);\n if (globalKeyFile == null || !globalKeyFile.exists()) {\n CLog.d(\"Unable to fetch the service key because neither environment variable \" +\n \"APE_API_KEY is set nor the key file is dynamically downloaded.\");\n return null;\n }\n keyFilePath = globalKeyFile.getAbsolutePath();\n }\n if (Strings.isNullOrEmpty(mApiScope)) {\n CLog.d(\"API scope not set, use flag --business-logic-api-scope.\");\n return null;\n }\n try {\n Credential credential = GoogleCredential.fromStream(new FileInputStream(keyFilePath))\n .createScoped(Collections.singleton(mApiScope));\n credential.refreshToken();\n return credential.getAccessToken();\n } catch (FileNotFoundException e) {\n CLog.e(String.format(\"Service key file %s doesn't exist.\", keyFilePath));\n } catch (IOException e) {\n CLog.e(String.format(\"Can't read the service key file, %s\", keyFilePath));\n }\n return null;\n }", "public Credential getUsercredentialwithAccessToken(String accessToken) {\n\t\treturn new GoogleCredential.Builder().setTransport(HTTP_TRANSPORT)\n\t\t\t\t.setJsonFactory(new JacksonFactory())\n\t\t\t\t.setClientSecrets(CLIENT_ID, CLIENT_SECRET).build()\n\t\t\t\t.setAccessToken(accessToken);\n\t}", "private GoogleCredential getGoogleCredential(String userId) {\t\t\n\t\t\n\t\ttry { \n\t\t\t// get the service account e-mail address and service account private key from property file\n\t\t\t// this email account and key file are specific for your environment\n\t\t\tif (SERVICE_ACCOUNT_EMAIL == null) {\n\t\t\t\tSERVICE_ACCOUNT_EMAIL = m_serverConfigurationService.getString(\"google.service.account.email\", \"\");\n\t\t\t}\n\t\t\tif (PRIVATE_KEY == null) {\n\t\t\t\tPRIVATE_KEY = m_serverConfigurationService.getString(\"google.private.key\", \"\");\n\t\t\t}\n\t\t\t\n\t\t\tGoogleCredential credential = getCredentialFromCredentialCache(userId);\n\t\t\treturn credential;\n\n\t\t} catch (Exception e) {\n\t\t\t// return null if an exception occurs while communicating with Google.\n\t\t\tM_log.error(\"Error creating a GoogleCredential object or requesting access token: \" + userId + \" \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "GoogleAuthenticatorKey createCredentials();", "private static String getAccessToken() throws IOException {\n\t\t \t\n\t\t GoogleCredential googleCredential = GoogleCredential\n\t .fromStream(new FileInputStream(path))\n\t .createScoped(Arrays.asList(SCOPES));\n\t\t \tgoogleCredential.refreshToken();\n\t\t \treturn googleCredential.getAccessToken();\n\t}", "public String getRefreshToken() {\r\n return refreshToken;\r\n }", "public String getRefreshToken(Credential credential) throws IOException,\n\t\t\tJSONException {\n\t\tString refreshToken = credential.getRefreshToken();\n\t\tSystem.out.println(refreshToken);\n\t\treturn refreshToken;\n\t}", "@Override\n\tpublic OauthAccessToken acquireOauthRefreshToken(String refreshToken) \n\t{\n\t\t\n\t\tString url = WeChatConst.WECHATOAUTHURL+WeChatConst.OAUTHREFRESHTOKENURI;\n\t\tMap<String, String> param = new HashMap<String, String>();\n\t\tparam.put(\"appid\", WeChatConst.APPID);\n\t\tparam.put(\"grant_type\", \"refresh_token\");\n\t\tparam.put(\"refresh_token\", refreshToken);\n\t\tString response = HttpClientUtils.doGetWithoutHead(url, param);\n\t\tlog.debug(\" acquireOauthRefreshToken response :\"+response);\n\t\ttry {\n\t\t\tJSONObject responseJson = JSONObject.parseObject(response);\n\t\t\tOauthAccessToken authAccessToken = new OauthAccessToken();\n\t\t\tif(!responseJson.containsKey(\"errcode\"))\n\t\t\t{\n\t\t\t\tauthAccessToken.setAccessToken(responseJson.getString(\"access_token\"));\n\t\t\t\tauthAccessToken.setExpiresIn(responseJson.getString(\"exoires_in\"));\n\t\t\t\tauthAccessToken.setOpenId(responseJson.getString(\"openid\"));\n\t\t\t\tauthAccessToken.setScope(responseJson.getString(\"scope\"));\n\t\t\t\treturn authAccessToken;\n\t\t\t}\n\t\t\treturn null;\n\t\t} catch (Exception e) {\n\t\t\tlog.error(e);\n\t\t}\n\t\treturn null;\n\t}", "private void refreshGoogleCalendarToken() {\n this.getGoogleToken();\n }", "public GoogleAuthHelper() {\n\t\t\n\t\tLoadType<ClientCredentials> credentials = ofy().load().type(ClientCredentials.class);\n\t\t\n\t\tfor(ClientCredentials credential : credentials) {\n\t\t\t// static ClientCredentials credentials = new ClientCredentials();\n\t\t\tCALLBACK_URI = credential.getCallBackUri();\n\t\t\tCLIENT_ID = credential.getclientId();\n\t\t\tCLIENT_SECRET = credential.getClientSecret();\n\t\t}\n\t\t\n\t\tflow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT,\n\t\t\t\tJSON_FACTORY, CLIENT_ID, CLIENT_SECRET, SCOPE).setAccessType(\n\t\t\t\t\"offline\").build();\n\t\tgenerateStateToken();\n\t}", "public String getRefresh_token() {\r\n\t\treturn refresh_token;\r\n\t}", "@Bean\n\t@RefreshScope\n\tCredentials refreshableCredentials() throws Exception {\n\t\tLOGGER.warn(\"***** ASKED FOR NEW CREDENTIALS\");\n\n\t\tList<String> scopes = Collections.singletonList(GcpScope.STORAGE_READ_WRITE.getUrl());\n\n\t\treturn GoogleCredentials.fromStream(\n\t\t\t\t// You'd be reading from Vault here, not from local file.\n\t\t\t\tnew FileInputStream(this.privateKeyLocation))\n\t\t\t\t.createScoped(scopes);\n\t}", "protected Pair<String, String> refresh() throws ServiceException {\n final Account acct = this.mDataSource.getAccount();\n final OAuthInfo oauthInfo = new OAuthInfo(new HashMap<String, String>());\n final String refreshToken = OAuth2DataSource.getRefreshToken(mDataSource);\n final String clientId = config\n .getString(String.format(OAuth2ConfigConstants.LC_OAUTH_CLIENT_ID_TEMPLATE.getValue(),\n YahooOAuth2Constants.CLIENT_NAME.getValue()), YahooOAuth2Constants.CLIENT_NAME.getValue(), acct);\n final String clientSecret = config\n .getString(String.format(OAuth2ConfigConstants.LC_OAUTH_CLIENT_SECRET_TEMPLATE.getValue(),\n YahooOAuth2Constants.CLIENT_NAME.getValue()), YahooOAuth2Constants.CLIENT_NAME.getValue(), acct);\n final String clientRedirectUri = config.getString(\n String.format(OAuth2ConfigConstants.LC_OAUTH_CLIENT_REDIRECT_URI_TEMPLATE.getValue(),\n YahooOAuth2Constants.CLIENT_NAME.getValue()),\n YahooOAuth2Constants.CLIENT_NAME.getValue(), acct);\n\n if (StringUtils.isEmpty(clientId) || StringUtils.isEmpty(clientSecret)\n || StringUtils.isEmpty(clientRedirectUri)) {\n throw ServiceException.FAILURE(\"Required config(id, secret and redirectUri) parameters are not provided.\", null);\n }\n // set client specific properties\n oauthInfo.setRefreshToken(refreshToken);\n oauthInfo.setClientId(clientId);\n oauthInfo.setClientSecret(clientSecret);\n oauthInfo.setClientRedirectUri(clientRedirectUri);\n oauthInfo.setTokenUrl(YahooOAuth2Constants.AUTHENTICATE_URI.getValue());\n\n ZimbraLog.extensions.debug(\"Fetching access credentials for import.\");\n final JsonNode credentials = YahooOAuth2Handler.getTokenRequest(oauthInfo,\n OAuth2Utilities.encodeBasicHeader(clientId, clientSecret));\n\n return new Pair<String, String>(credentials.get(\"access_token\").asText(),\n credentials.get(YahooOAuth2Constants.GUID_KEY.getValue()).asText());\n }", "public String getRefreshToken() {\n\t\treturn refreshToken;\n\t}", "private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT)\n throws IOException {\n // Load client secrets.\n InputStream in = GoogleCalendar.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY,\n new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT,\n JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(\n new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\").build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "String getAuthorizerRefreshToken(String appId);", "private Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "private static Credential getCredentials(HttpTransport HTTP_TRANSPORT) throws IOException {\r\n // Load client secrets.\r\n InputStream in = SheetsQuickstart.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\r\n if (in == null) {\r\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\r\n }\r\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\r\n\r\n // Build flow and trigger user authorization request.\r\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\r\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\r\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\r\n .setAccessType(\"offline\")\r\n .build();\r\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\r\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\r\n }", "public void getGoogleToken() {\n String googleEmail = sharedpreferences.getString(\"GoogleEmail\", \"\");\n String scopes = sharedpreferences.getString(\"GoogleScopes\", \"\");\n if (!\"\".equals(googleEmail)) {\n MyAsyncTask asyncTask = new MyAsyncTask(googleEmail, scopes, this.getBaseContext());\n asyncTask.delegate = this;\n asyncTask.execute();\n }\n }", "public String getGCalendarAccessToken( String gcalid, String emailID) {\n\t\t\n\t\tGoogleCredential credential = getGoogleCredential(emailID);\n\t\tif (credential == null) {\n\t\t\treturn null; // user not authorized\n\t\t}\n\t\telse{\n\t\t\treturn credential.getAccessToken();\n\t\t}\n\t}", "GmailClient getGmailClient(Credential credential);", "private Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n // Load client secrets.\n InputStream in = EventoUtils.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "private String refreshToken() {\n return null;\n }", "public static Credential authorize() throws IOException, GeneralSecurityException {\n // Load client secrets.\n InputStream in = GoogleIntegration.class.getResourceAsStream(\"/client_secret.json\");\n GoogleClientSecrets clientSecrets =\n GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n FileDataStoreFactory DATA_FACTORY = new FileDataStoreFactory(DATA_STORE_DIR);\n HttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow =\n new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(DATA_FACTORY)\n .setAccessType(\"offline\")\n .build();\n Credential credential = new AuthorizationCodeInstalledApp(\n flow, new LocalServerReceiver()).authorize(\"user\");\n System.out.println(\n \"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n return credential;\n }", "GoogleAuthenticatorKey createCredentials(String userName);", "String getAccessToken();", "String getAccessToken();", "private static String getCloudAuth(String accessToken) {\n\t\ttry {\n\t\t\tURL urlResource = new URL(\"https://myapi.pathomation.com/api/v1/authenticate\");\n\t\t\tURLConnection conn = urlResource.openConnection();\n\t\t\tconn.setRequestProperty( \"Authorization\", \"Bearer \" + accessToken);\n\t\t\tconn.setUseCaches( false );\n\t\t\treturn getResponseString(conn);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n // Load client secrets.\n InputStream in = GoogleAuthorizeUtil.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "public static Map<String, String> getAccessTokenByApiRefreshToken(String cspServer, String refreshToken)\n\t\t\tthrows Exception {\n\t\t// Form the REST URL\n\t\tString cspURL = \"https://\" + cspServer + CSP_ENDPOINT;\n\t\tURL url = new URL(cspURL);\n\n\t\t// Form the REST Header\n\t\tMap<String, String> headers = new HashMap<String, String>();\n\t\theaders.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\theaders.put(\"Accept\", \"application/json\");\n\t\tString body = \"refresh_token=\" + refreshToken;\n\t\tURLEncoder.encode(body, \"UTF-8\");\n\n\t\t// POST the REST CALL and get the API Response\n\t\tMap<Integer, String> apiResponse = RestHandler.httpPost(url, headers, body);\n\t\tIterator<Integer> iter = apiResponse.keySet().iterator();\n\t\tInteger key = iter.next();\n\t\tString local_response = apiResponse.get(key).replaceFirst(\"\\\\{\", \"\").replace(\"\\\\}\", \"\");\n\t\tStringTokenizer tokenizer = new StringTokenizer(local_response, \",\");\n\t\tMap<String, String> map = new HashMap<>();\n\t\twhile (tokenizer.hasMoreElements()) {\n\t\t\tString element = (String) tokenizer.nextElement();\n\t\t\tString[] res = element.split(\":\");\n\t\t\tString jsonkey = res[0].replaceAll(\"\\\"\", \"\");\n\t\t\tString value = res[1].replaceAll(\"\\\"\", \"\");\n\t\t\tif (\"access_token\".equalsIgnoreCase(jsonkey)) {\n\t\t\t\tmap.put(jsonkey, value);\n\t\t\t}\n\n\t\t\tif (\"id_token\".equalsIgnoreCase(jsonkey)) {\n\t\t\t\tmap.put(jsonkey, value);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "public static Credential authorize() throws IOException \n\t {\n\t // Load client secrets.\n\t InputStream in = YouTubeDownloader.class.getResourceAsStream(\"/youtube/downloader/resources/clients_secrets.json\");\n\t GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader( in ));\n\n\t // Build flow and trigger user authorization request.\n\t GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n\t HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n\t .setDataStoreFactory(DATA_STORE_FACTORY)\n\t .setAccessType(\"offline\")\n\t .build();\n\t Credential credential = new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize(\"user\");\n\t System.out.println(\"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n\t return credential;\n\t }", "public static Credential authorize() throws IOException {\n // Load client secrets.\n InputStream in =\n Quickstart2.class.getResourceAsStream(\"/client_secret.json\");\n GoogleClientSecrets clientSecrets =\n GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow =\n new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(DATA_STORE_FACTORY)\n .setAccessType(\"offline\")\n .build();\n \n Credential credential = new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize(\"user\");\n \n System.out.println(\"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n return credential;\n }", "private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n InputStream in = SheetsRead.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "public String getAccessToken();", "private Drive authentication() throws IOException {\n\t\t// Request a new access token using the refresh token.\n\t\tGoogleCredential credential = new GoogleCredential.Builder()\n\t\t\t\t.setTransport(HTTP_TRANSPORT)\n\t\t\t\t.setJsonFactory(JSON_FACTORY)\n\t\t\t\t.setClientSecrets(CLIENT_ID, CLIENT_SECRET).build()\n\t\t\t\t.setFromTokenResponse(new TokenResponse().setRefreshToken(REFRESH_TOKEN));\n\t\tcredential.refreshToken();\n\t\treturn new Drive.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential)\n\t\t\t\t.setApplicationName(\"tp3\").build();\n\t}", "public Optional<GoogleTokenResponse> getGoogleToken(@NonNull GoogleOAuthData data) {\n Validation validation = data.valid();\n\n Preconditions.checkArgument(validation.isValid(), validation.getMessage());\n GoogleAuthConsumer consumer = new GoogleAuthConsumer();\n try {\n GoogleTokenResponse response = consumer.redeemAuthToken(data.getAuth_code(), data.getClient_id(), data.getRedirect_uri());\n return Optional.ofNullable(response);\n } catch (Exception e) {\n return Optional.empty();\n }\n }", "public Credentials getCredentials(AuthScope authscope)\n {\n return credentials;\n }", "String getToken(String scope, String username, String password) throws AuthorizationException;", "private GoogleCredential getCredentialFromCredentialCache(final String userId) throws IOException{\n\t\tGoogleCredential credential = (GoogleCredential)cache.get(userId);\n\t\tif (credential != null){\n\t\t\tM_log.debug(\"Fetching credential from cache for user: \" + userId);\n\t\t\treturn credential;\n\t\t}\n\t\telse{ // Need to create credential and create access token.\n\t\t\tcredential = SakaiGoogleAuthServiceImpl.authorize(userId, SERVICE_ACCOUNT_EMAIL, PRIVATE_KEY, CalendarScopes.CALENDAR);\n\t\t\tif (credential != null){\n\t\t\t\tcredential.refreshToken(); // Populates credential with access token\n\t\t\t\taddCredentialToCache(userId, credential);\n\t\t\t}\n\t\t\treturn credential;\n\t\t}\n\t}", "@Nullable\n public String getRefreshToken() {\n return refreshToken;\n }", "@Transient\n\tpublic String getRefreshToken() {\n\t\treturn refreshToken;\n\t}", "public static Credential authorize() throws IOException {\n\t\t// Load client secrets.\n\t\tInputStream in = GmailDownloader.class.getResourceAsStream(\"/client_secret.json\");\n\t\tGoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n\t\t// Build flow and trigger user authorization request.\n\t\tGoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT, JSON_FACTORY,\n\t\t\t\tclientSecrets, SCOPES).setDataStoreFactory(DATA_STORE_FACTORY).setAccessType(\"offline\").build();\n\t\tCredential credential = new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize(\"user\");\n\t\tSystem.out.println(\"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n\t\treturn credential;\n\t}", "@Api(1.0)\n @NonNull\n public String getRefreshToken() {\n return mRefreshToken;\n }", "String getComponentAccessToken();", "private Calendar getGoogleClient(String email)\t{\n\t\tGoogleCredential credential = getGoogleCredential(email);\n\t\tCalendar client = getGoogleClient(credential);\n\t\treturn client;\n\t}", "public Credential getUsercredential(final String authCode)\n\t\t\tthrows IOException, JSONException {\n\t\tfinal GoogleTokenResponse response = flow.newTokenRequest(authCode)\n\t\t\t\t.setRedirectUri(CALLBACK_URI).execute();\n\t\tfinal Credential credential = flow.createAndStoreCredential(response,\n\t\t\t\tnull);\n\t\treturn credential;\n\t}", "private static com.google.api.services.calendar.Calendar getCalendarService() throws IOException\n{\n Credential cred = authorize();\n com.google.api.services.calendar.Calendar.Builder bldr =\n new com.google.api.services.calendar.Calendar.Builder(HTTP_TRANSPORT,JSON_FACTORY,cred);\n bldr.setApplicationName(APPLICATION_NAME);\n\n com.google.api.services.calendar.Calendar cal = bldr.build();\n\n return cal;\n}", "public int getTokenViaClientCredentials(){\n\t\t//Do we have credentials?\n\t\tif (Is.nullOrEmpty(clientId) || Is.nullOrEmpty(clientSecret)){\n\t\t\treturn 1;\n\t\t}\n\t\ttry{\n\t\t\t//Build auth. header entry\n\t\t\tString authString = \"Basic \" + Base64.getEncoder().encodeToString((clientId + \":\" + clientSecret).getBytes());\n\t\t\t\n\t\t\t//Request headers\n\t\t\tMap<String, String> headers = new HashMap<>();\n\t\t\theaders.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\theaders.put(\"Authorization\", authString);\n\t\t\t\n\t\t\t//Request data\n\t\t\tString data = ContentBuilder.postForm(\"grant_type\", \"client_credentials\");\n\t\t\t\n\t\t\t//Call\n\t\t\tlong tic = System.currentTimeMillis();\n\t\t\tthis.lastRefreshTry = tic;\n\t\t\tJSONObject res = Connectors.httpPOST(spotifyAuthUrl, data, headers);\n\t\t\tStatistics.addExternalApiHit(\"SpotifyApi getTokenViaClientCredentials\");\n\t\t\tStatistics.addExternalApiTime(\"SpotifyApi getTokenViaClientCredentials\", tic);\n\t\t\t//System.out.println(res.toJSONString()); \t\t//DEBUG\n\t\t\tif (!Connectors.httpSuccess(res)){\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\tString token = JSON.getString(res, \"access_token\");\n\t\t\tString tokenType = JSON.getString(res, \"token_type\");\n\t\t\tlong expiresIn = JSON.getLongOrDefault(res, \"expires_in\", 0);\n\t\t\tif (Is.nullOrEmpty(token)){\n\t\t\t\treturn 4;\n\t\t\t}else{\n\t\t\t\tthis.token = token;\n\t\t\t\tthis.tokenType = tokenType;\n\t\t\t\tthis.tokenValidUntil = System.currentTimeMillis() + (expiresIn * 1000);\n\t\t\t}\n\t\t\treturn 0;\n\t\t\t\n\t\t}catch (Exception e){\n\t\t\tStatistics.addExternalApiHit(\"SpotifyApi-error getTokenViaClientCredentials\");\n\t\t\treturn 3;\n\t\t}\n\t}", "private CdekAuthToken getAuthToken()\n {\n String authEndpoint = conf.ENDPOINT + \"/oauth/token?grant_type={grant_type}&client_id={client_id}&client_secret={client_secret}\";\n\n HttpHeaders defaultHeaders = new HttpHeaders();\n HttpEntity req = new HttpEntity(defaultHeaders);\n\n return rest.postForObject(authEndpoint, req, CdekAuthToken.class, conf.getAuthData());\n }", "@Override\n public ExternalCredentialsResponse getCredentials(Principal principal, DomainDetails domainDetails, String idToken, ExternalCredentialsRequest externalCredentialsRequest)\n throws ResourceException {\n\n // first make sure that our required components are available and configured\n\n if (authorizer == null) {\n throw new ResourceException(ResourceException.FORBIDDEN, \"ZTS authorizer not configured\");\n }\n\n Map<String, String> attributes = externalCredentialsRequest.getAttributes();\n final String gcpServiceAccount = getRequestAttribute(attributes, GCP_SERVICE_ACCOUNT, null);\n if (StringUtil.isEmpty(gcpServiceAccount)) {\n throw new ResourceException(ResourceException.BAD_REQUEST, \"missing gcp service account\");\n }\n\n // verify that the given principal is authorized for all scopes requested\n\n final String gcpTokenScope = getRequestAttribute(attributes, GCP_TOKEN_SCOPE, GCP_DEFAULT_TOKEN_SCOPE);\n String[] gcpTokenScopeList = gcpTokenScope.split(\" \");\n for (String scopeItem : gcpTokenScopeList) {\n final String resource = domainDetails.getName() + \":\" + scopeItem;\n if (!authorizer.access(GCP_SCOPE_ACTION, resource, principal, null)) {\n throw new ResourceException(ResourceException.FORBIDDEN, \"Principal not authorized for configured scope\");\n }\n }\n\n try {\n // first we're going to get our exchange token\n\n GcpExchangeTokenResponse exchangeTokenResponse = getExchangeToken(domainDetails, idToken, externalCredentialsRequest);\n\n final String serviceUrl = String.format(\"https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/%s@%s.iam.gserviceaccount.com:generateAccessToken\",\n gcpServiceAccount, domainDetails.getGcpProjectId());\n final String authorizationHeader = exchangeTokenResponse.getTokenType() + \" \" + exchangeTokenResponse.getAccessToken();\n\n GcpAccessTokenRequest accessTokenRequest = new GcpAccessTokenRequest();\n accessTokenRequest.setScopeList(gcpTokenScope);\n int expiryTime = externalCredentialsRequest.getExpiryTime() == null ? 3600 : externalCredentialsRequest.getExpiryTime();\n accessTokenRequest.setLifetimeSeconds(expiryTime);\n\n HttpPost httpPost = new HttpPost(serviceUrl);\n httpPost.addHeader(HttpHeaders.AUTHORIZATION, authorizationHeader);\n httpPost.setEntity(new StringEntity(jsonMapper.writeValueAsString(accessTokenRequest), ContentType.APPLICATION_JSON));\n\n final HttpDriverResponse httpResponse = httpDriver.doPostHttpResponse(httpPost);\n if (httpResponse.getStatusCode() != HttpStatus.SC_OK) {\n GcpAccessTokenError error = jsonMapper.readValue(httpResponse.getMessage(), GcpAccessTokenError.class);\n throw new ResourceException(httpResponse.getStatusCode(), error.getErrorMessage());\n }\n\n GcpAccessTokenResponse gcpAccessTokenResponse = jsonMapper.readValue(httpResponse.getMessage(), GcpAccessTokenResponse.class);\n\n ExternalCredentialsResponse externalCredentialsResponse = new ExternalCredentialsResponse();\n attributes = new HashMap<>();\n attributes.put(GCP_ACCESS_TOKEN, gcpAccessTokenResponse.getAccessToken());\n externalCredentialsResponse.setAttributes(attributes);\n externalCredentialsResponse.setExpiration(Timestamp.fromString(gcpAccessTokenResponse.getExpireTime()));\n return externalCredentialsResponse;\n\n } catch (Exception ex) {\n throw new ResourceException(ResourceException.FORBIDDEN, ex.getMessage());\n }\n }", "public java.lang.String getOauth_token(){\r\n return localOauth_token;\r\n }", "public Object getCredential()\n {\n return this.credential;\n }", "public Object getCredential()\n {\n return this.credential;\n }", "public Object getCredential()\n {\n return this.credential;\n }", "@Override\n public String refresh() {\n\n // Override the existing token\n setToken(null);\n\n // Get the identityId and token by making a call to your backend\n // (Call to your backend)\n\n // Call the update method with updated identityId and token to make sure\n // these are ready to be used from Credentials Provider.\n\n update(identityId, token);\n return token;\n\n }", "private void getAccessToken() {\n\n\t\tMediaType mediaType = MediaType.parse(\"application/x-www-form-urlencoded\");\n\t\tRequestBody body = RequestBody.create(mediaType,\n\t\t\t\t\"client_id=\" + CONSUMER_KEY + \"&client_secret=\" + CONSUMER_SECRET + \"&grant_type=client_credentials\");\n\t\tRequest request = new Request.Builder().url(\"https://api.yelp.com/oauth2/token\").post(body)\n\t\t\t\t.addHeader(\"cache-control\", \"no-cache\").build();\n\n\t\ttry {\n\t\t\tokhttp3.Response response = client.newCall(request).execute();\n\t\t\tString respbody = response.body().string().trim();\n\t\t\tJSONParser parser = new JSONParser();\n\t\t\tJSONObject json = (JSONObject) parser.parse(respbody);\n\t\t\taccessToken = (String) json.get(\"access_token\");\n\t\t} catch (IOException | ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public AccessToken refreshAccessToken(String refreshToken) throws OAuthSdkException {\n\n // prepare params\n List<NameValuePair> params = new ArrayList<NameValuePair>();\n params.add(new BasicNameValuePair(CLIENT_ID, String.valueOf(client.getId())));\n params.add(new BasicNameValuePair(REDIRECT_URI, client.getRedirectUri()));\n params.add(new BasicNameValuePair(CLIENT_SECRET, client.getSecret()));\n params.add(new BasicNameValuePair(GRANT_TYPE, GrantType.REFRESH_TOKEN.getType()));\n params.add(new BasicNameValuePair(TOKEN_TYPE, AccessToken.TokenType.MAC.getType()));\n params.add(new BasicNameValuePair(REFRESH_TOKEN, refreshToken));\n\n HttpResponse response = httpClient.get(AuthorizeUrlUtils.getTokenUrl(), params);\n log.debug(\"Refresh access token response[{}]\", response);\n\n String entityContent = HttpResponseUtils.getEntityContent(response);\n if (StringUtils.isBlank(entityContent) || !JSONUtils.mayBeJSON(entityContent)) {\n log.error(\"The refresh token response[{}] is not json format!\", entityContent);\n throw new OAuthSdkException(\"The refresh token response is not json format\");\n }\n\n JSONObject json = JSONObject.fromObject(entityContent);\n if (json.has(\"access_token\")) {\n log.debug(\"Refresh access token json result[{}]\", json);\n return new AccessToken(json);\n }\n\n // error response\n int errorCode = json.optInt(\"error\", -1);\n String errorDesc = json.optString(\"error_description\", StringUtils.EMPTY);\n log.error(\"Refresh access token error, error info [code={}, desc={}]!\", errorCode, errorDesc);\n throw new OAuthSdkException(\"Refresh access token error!\", errorCode, errorDesc);\n }", "public void getResponseGoogle(String googleToken, final AsyncHandler<lrAccessToken> handler)\n\t {\n\t\t \tMap<String, String> params = new HashMap<String, String>();\n\t\t \tparams.put(\"key\",AKey);\n\t\t \tparams.put(\"google_access_token\",googleToken);\n\t\t \tproviderHandler(Endpoint.API_V2_ACCESS_TOKEN_GOOGLE, params, handler);\n\t }", "public interface GmailClientFactory {\n /**\n * Creates a GmailClient instance\n *\n * @param credential a valid Google credential object\n * @return a GmailClient instance that contains the user's credentials\n */\n GmailClient getGmailClient(Credential credential);\n}", "@Override\n public Object getCredentials() {\n return token;\n }", "static @NonNull String getAuthToken(@NonNull Context context) throws AuthException {\n final long startTime = System.currentTimeMillis();\n final GoogleApiClient googleApiClient = getClient(context);\n try {\n final ConnectionResult result = googleApiClient.blockingConnect();\n if (result.isSuccess()) {\n final GoogleSignInResult googleSignInResult = Auth.GoogleSignInApi.silentSignIn(googleApiClient).await();\n final GoogleSignInAccount account = googleSignInResult.getSignInAccount();\n if(account != null) {\n final String authToken = account.getIdToken();\n if(authToken != null) {\n Log.i(TAG, \"Got auth token in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n return authToken;\n } else {\n throw new AuthException(\"Failed to get auth token\");\n }\n } else {\n throw new AuthException(\"Not signed in\");\n }\n } else {\n throw new AuthException(\"Sign in connection error\");\n }\n } finally {\n googleApiClient.disconnect();\n }\n }", "private String GetAccessToken() {\n final String grantType = \"password\";\n final String resourceId = \"https%3A%2F%2Fgraph.microsoft.com%2F\";\n final String tokenEndpoint = \"https://login.microsoftonline.com/common/oauth2/token\";\n\n try {\n URL url = new URL(tokenEndpoint);\n HttpURLConnection conn;\n if (configuration.isProxyUsed()) {\n Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(configuration.getProxyServer(), configuration.getProxyPort()));\n conn = (HttpURLConnection) url.openConnection(proxy);\n } else {\n conn = (HttpURLConnection) url.openConnection();\n }\n\n String line;\n StringBuilder jsonString = new StringBuilder();\n\n conn.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n conn.setRequestMethod(\"POST\");\n conn.setDoInput(true);\n conn.setDoOutput(true);\n conn.setInstanceFollowRedirects(false);\n conn.connect();\n\n try (OutputStreamWriter outputStreamWriter = new OutputStreamWriter(conn.getOutputStream(), StandardCharsets.UTF_8)) {\n String payload = String.format(\"grant_type=%1$s&resource=%2$s&client_id=%3$s&username=%4$s&password=%5$s\",\n grantType,\n resourceId,\n clientId,\n username,\n password);\n outputStreamWriter.write(payload);\n }\n\n try (BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\n while((line = br.readLine()) != null) {\n jsonString.append(line);\n }\n }\n\n conn.disconnect();\n\n JsonObject res = new GsonBuilder()\n .create()\n .fromJson(jsonString.toString(), JsonObject.class);\n\n return res\n .get(\"access_token\")\n .toString()\n .replaceAll(\"\\\"\", \"\");\n\n } catch (IOException e) {\n throw new IllegalAccessError(\"Unable to read authorization response: \" + e.getLocalizedMessage());\n }\n }", "public GoogleApiClient getGoogleApiCLient()\n {\n return googleApiClient;\n }", "@Test\n public void getGoogleAuthTokensTest() throws ApiException {\n String code = null;\n InlineResponse2003 response = api.getGoogleAuthTokens(code);\n\n // TODO: test validations\n }", "public Object credential(HttpServletRequest request)\n throws URISyntaxException, OAuthSystemException {\n try {\n OAuthClientCredentialRequest oauthRequest = new OAuthClientCredentialRequest(request);\n OAuthAuthzParameters oAuthAuthzParameters = new OAuthAuthzParameters(oauthRequest);\n\n if (!oauthRequest.getGrantType().equals(Constants.OAUTH_CLIENT_CREDENTIALS)) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_REQUEST))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_GRANT_TYPE)\n .buildJSONMessage();\n logger.info(\"invalid grant type: {}, context: {}\", oauthRequest.getGrantType(), oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n Client client = oAuthService.getClientByClientId(oAuthAuthzParameters.getClientId());\n if (client == null) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_CLIENT_DESCRIPTION)\n .buildJSONMessage();\n logger.info(\"can not get client, context: {}\", oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n if (!client.getGrantTypes().contains(Constants.OAUTH_CLIENT_CREDENTIALS)) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT_INFO))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_GRANT_TYPE)\n .buildJSONMessage();\n logger.info(\"no grant type, context: {}\", oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n if (!client.getClientSecret().equals(oAuthAuthzParameters.getClientSecret())) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT_INFO))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_CLIENT_DESCRIPTION)\n .buildJSONMessage();\n logger.info(\"invalid secret: {}, context: {}\", client.getClientSecret(), oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n if (StringUtils.isEmpty(oAuthAuthzParameters.getScope())) {\n oAuthAuthzParameters.setScope(client.getDefaultScope());\n } else {\n oAuthAuthzParameters.setScope(\n OAuthUtils.encodeScopes(\n oAuthService.getRetainScopes(\n client.getDefaultScope(),\n oAuthAuthzParameters.getScope()\n )\n )\n );\n }\n\n OAuthIssuer oauthIssuerImpl = new OAuthIssuerImpl(new UUIDValueGeneratorEx());\n String accessToken = oauthIssuerImpl.accessToken();\n\n oAuthService.saveAccessToken(accessToken, oAuthAuthzParameters);\n\n OAuthResponse response = OAuthASResponseEx\n .tokenResponse(HttpServletResponse.SC_OK)\n .setTokenType(\"uuid\")\n .setAccessToken(accessToken)\n .setExpiresIn(String.valueOf(appConfig.tokenAccessExpire))\n .setScope(oAuthAuthzParameters.getScope())\n .buildJSONMessage();\n logger.info(\"response access token {}, context: {}\", accessToken, oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n } catch (OAuthProblemException e) {\n logger.error(\"oauth problem exception\", e);\n final OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_REQUEST))\n .setErrorDescription(e.getMessage())\n .buildJSONMessage();\n HttpHeaders headers = new HttpHeaders();\n return new ResponseEntity<String>(response.getBody(), headers, HttpStatus.valueOf(response.getResponseStatus()));\n }\n }", "@Override\r\n\tpublic String refreshToken() throws OAuthSystemException {\n\t\treturn null;\r\n\t}", "public SalesforceAccessGrant(final String accessToken, final String scope, final String refreshToken, final Map<String, Object> response) {\n super(accessToken, scope, refreshToken, null);\n this.instanceUrl = (String)response.get(SalesforceConstants.AccessTokenResult.PARAM_INSTANCE_URL);\n this.id = (String)response.get(SalesforceConstants.AccessTokenResult.PARAM_ID);\n this.signature = (String)response.get(SalesforceConstants.AccessTokenResult.PARAM_SIGNATURE);\n this.issuedAt = (String)response.get(SalesforceConstants.AccessTokenResult.PARAM_ISSUED_AT);\n }", "List<ExposedOAuthCredentialModel> readExposedOAuthCredentials();", "public static String getAccessToken() {\n return accessToken;\n }", "@Nullable\n private String fetchToken() throws IOException {\n try {\n return GoogleAuthUtil.getToken(mActivity, mEmail, mScope);\n } catch (UserRecoverableAuthException ex) {\n // GooglePlayServices.apk is either old, disabled, or not present\n // so we need to show the user some UI in the activity to recover.\n // TODO: complain about old version\n Log.e(\"aqx1010\", \"required Google Play version not found\", ex);\n } catch (GoogleAuthException fatalException) {\n // Some other type of unrecoverable exception has occurred.\n // Report and log the error as appropriate for your app.\n Log.e(\"aqx1010\", \"fatal authorization exception\", fatalException);\n }\n return null;\n }", "private String getAccessTokenUrl(String identityServer) {\n\t\treturn \"https://accounts.google.com/o/oauth2/token\";\n\t}", "private String getCredentials() {\n String credentials = \"\";\n AccountManager accountManager = AccountManager.get(getContext());\n\n final Account availableAccounts[] = accountManager.getAccountsByType(AccountGeneral.ACCOUNT_TYPE);\n\n //there should be only one ERT account\n if(availableAccounts.length > 0) {\n Account account = availableAccounts[0];\n AccountManagerFuture<Bundle> future = accountManager.getAuthToken(account, AccountGeneral.AUTHTOKEN_TYPE_FULL_ACCESS, null, null, null, null);\n try {\n Bundle bundle = future.getResult();\n String accountName = bundle.getString(AccountManager.KEY_ACCOUNT_NAME);\n String token = bundle.getString(AccountManager.KEY_AUTHTOKEN);\n credentials = accountName + \":\" + token;\n } catch (OperationCanceledException | IOException | AuthenticatorException e) {\n Log.e(LOG_TAG, e.getMessage());\n }\n }\n return credentials;\n }", "@Override\n public RefreshToken getRefreshToken(String refreshTokenCode) {\n if (log.isTraceEnabled()) {\n log.trace(\"Looking for the refresh token: \" + refreshTokenCode + \" for an authorization grant of type: \"\n + getAuthorizationGrantType());\n }\n return refreshTokens.get(TokenHashUtil.hash(refreshTokenCode));\n }", "@Override\n public RefreshToken getRefreshToken(String refreshTokenCode) {\n if (LOGGER.isTraceEnabled()) {\n LOGGER.trace(\"Looking for the refresh token: \" + refreshTokenCode\n + \" for an authorization grant of type: \" + getAuthorizationGrantType());\n }\n\n return refreshTokens.get(refreshTokenCode);\n }", "public static JSONObject refreshToken(String refreshToken) throws Exception {\r\n\t\tString refreshTokenUrl = MessageFormat.format(REFRESH_TOKEN_URL, SOCIAL_LOGIN_CLIENT_ID, refreshToken);\r\n\t\tString response = HttpClientUtils.sendRequest(refreshTokenUrl);\r\n\t\treturn JSONObject.fromObject(response);\r\n\t}", "String getToken(String username, String password, String grant_type) throws IllegalAccessException{\n\n String URI = serviceUrl + \"/oauth/token\" + \"?\" +\n String.format(\"%s=%s&%s=%s&%s=%s\", \"grant_type\", grant_type, \"username\", username, \"password\", password);\n// String CONTENT_TYPE = \"application/x-www-form-urlencoded\";\n // TODO clientId and clientSecret !!!\n String ENCODING = \"Basic \" +\n Base64.getEncoder().encodeToString(String.format(\"%s:%s\", \"clientId\", \"clientSecret\").getBytes());\n\n// AtomicReference<String> token = null;\n// authorization.subscribe(map -> {\n// token.set((String) map.get(ACCESS_TOKEN));\n// });\n\n String token = null;\n try {\n token = (String)WebClient.create().post()\n .uri(URI)\n .accept(MediaType.APPLICATION_FORM_URLENCODED)\n .contentType(MediaType.APPLICATION_FORM_URLENCODED)\n .header(\"Authorization\", ENCODING)\n .retrieve()\n .bodyToMono(Map.class)\n .block().get(ACCESS_TOKEN);\n } catch (Exception e){\n throw new IllegalAccessException(\"Can't reach access token\");\n }\n\n return token;\n }", "public RefreshToken generateRefreshToken(){\n RefreshToken refreshToken = new RefreshToken();\n //Creates a 128bit random UUID. This serves as our refresh token\n refreshToken.setToken(UUID.randomUUID().toString());\n //Set creation timestampt\n refreshToken.setCreatedDate(Instant.now());\n\n return refreshTokenRepository.save(refreshToken);\n }", "public Credential getCredential() {\n return this.credential;\n }", "private static Calendar getService() throws GeneralSecurityException, IOException {\n final NetHttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n return new Calendar.Builder(HTTP_TRANSPORT, JSON_FACTORY, getCredentials(HTTP_TRANSPORT))\n .setApplicationName(APPLICATION_NAME).build();\n }", "public String getToken(String name){\n\n return credentials.get(name, token);\n }", "public String getAccessToken() {\n return accessToken;\n }", "@Test\n public void getGoogleAuthUrlTest() throws ApiException {\n InlineResponse2002 response = api.getGoogleAuthUrl();\n\n // TODO: test validations\n }", "public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {\n return WorkflowsStubSettings.defaultCredentialsProviderBuilder();\n }", "public String getAccessToken() {\n return accessToken;\n }", "public String getAccessToken() {\n if (accessToken == null || (System.currentTimeMillis() > (expirationTime - 60 * 1000))) {\n if (refreshToken != null) {\n try {\n this.refreshAccessToken();\n } catch (IOException e) {\n log.error(\"Error fetching access token\", e);\n }\n }\n }\n\n return accessToken;\n }", "public String generateNewAccessToken(String refresh_token) throws SocketTimeoutException, IOException, Exception{\n String newAccessToken = \"\";\n JSONObject jsonReturn = new JSONObject();\n JSONObject tokenRequestParams = new JSONObject();\n tokenRequestParams.element(\"refresh_token\", refresh_token);\n if(currentRefreshToken.equals(\"\")){\n //You must read in the properties first!\n Exception noProps = new Exception(\"You must read in the properties first with init(). There was no refresh token set.\");\n throw noProps;\n }\n else{\n try{\n URL rerum = new URL(Constant.RERUM_ACCESS_TOKEN_URL);\n HttpURLConnection connection = (HttpURLConnection) rerum.openConnection();\n connection.setRequestMethod(\"POST\"); \n connection.setConnectTimeout(5*1000); \n connection.setDoOutput(true);\n connection.setDoInput(true);\n connection.setRequestProperty(\"Content-Type\", \"application/json\");\n connection.connect();\n DataOutputStream outStream = new DataOutputStream(connection.getOutputStream());\n //Pass in the user provided JSON for the body \n outStream.writeBytes(tokenRequestParams.toString());\n outStream.flush();\n outStream.close(); \n //Execute rerum server v1 request\n BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(),\"utf-8\"));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null){\n //Gather rerum server v1 response\n sb.append(line);\n }\n reader.close();\n jsonReturn = JSONObject.fromObject(sb.toString());\n newAccessToken = jsonReturn.getString(\"access_token\");\n }\n catch(java.net.SocketTimeoutException e){ //This specifically catches the timeout\n System.out.println(\"The Auth0 token endpoint is taking too long...\");\n jsonReturn = new JSONObject(); //We were never going to get a response, so return an empty object.\n jsonReturn.element(\"error\", \"The Auth0 endpoint took too long\");\n throw e;\n }\n }\n setAccessToken(newAccessToken);\n writeProperty(\"access_token\", newAccessToken);\n return newAccessToken;\n }", "GcpExchangeTokenResponse getExchangeToken(DomainDetails domainDetails, final String idToken,\n ExternalCredentialsRequest externalCredentialsRequest) throws IOException {\n\n Map<String, String> attributes = externalCredentialsRequest.getAttributes();\n final String gcpTokenScope = getRequestAttribute(attributes, GCP_TOKEN_SCOPE, GCP_DEFAULT_TOKEN_SCOPE);\n final String gcpWorkloadPoolName = getRequestAttribute(attributes, GCP_WORKLOAD_POOL_NAME, defaultWorkloadPoolName);\n final String gcpWorkloadProviderName = getRequestAttribute(attributes, GCP_WORKLOAD_PROVIDER_NAME, defaultWorkloadProviderName);\n\n String audience = String.format(\"//iam.googleapis.com/projects/%s/locations/global/workloadIdentityPools/%s/providers/%s\",\n domainDetails.getGcpProjectNumber(), gcpWorkloadPoolName, gcpWorkloadProviderName);\n\n GcpExchangeTokenRequest exchangeTokenRequest = new GcpExchangeTokenRequest();\n exchangeTokenRequest.setGrantType(GCP_GRANT_TYPE);\n exchangeTokenRequest.setAudience(audience);\n exchangeTokenRequest.setScope(gcpTokenScope);\n exchangeTokenRequest.setRequestedTokenType(GCP_ACCESS_TOKEN_TYPE);\n exchangeTokenRequest.setSubjectToken(idToken);\n exchangeTokenRequest.setSubjectTokenType(GCP_ID_TOKEN_TYPE);\n\n HttpPost httpPost = new HttpPost(GCP_STS_TOKEN_URL);\n httpPost.setEntity(new StringEntity(jsonMapper.writeValueAsString(exchangeTokenRequest), ContentType.APPLICATION_JSON));\n\n final HttpDriverResponse httpResponse = httpDriver.doPostHttpResponse(httpPost);\n if (httpResponse.getStatusCode() != HttpStatus.SC_OK) {\n GcpExchangeTokenError error = jsonMapper.readValue(httpResponse.getMessage(), GcpExchangeTokenError.class);\n throw new ResourceException(httpResponse.getStatusCode(), error.getErrorDescription());\n }\n return jsonMapper.readValue(httpResponse.getMessage(), GcpExchangeTokenResponse.class);\n }", "public interface GoogleAccountDataClient {\n AccountNameCheckResponse checkAccountName(AccountNameCheckRequest accountNameCheckRequest) throws ;\n\n CheckFactoryResetPolicyComplianceResponse checkFactoryResetPolicyCompliance(CheckFactoryResetPolicyComplianceRequest checkFactoryResetPolicyComplianceRequest) throws ;\n\n PasswordCheckResponse checkPassword(PasswordCheckRequest passwordCheckRequest) throws ;\n\n CheckRealNameResponse checkRealName(CheckRealNameRequest checkRealNameRequest) throws ;\n\n void clearFactoryResetChallenges() throws ;\n\n ClearTokenResponse clearToken(ClearTokenRequest clearTokenRequest) throws ;\n\n boolean clearWorkAccountAppWhitelist() throws ;\n\n TokenResponse confirmCredentials(ConfirmCredentialsRequest confirmCredentialsRequest) throws ;\n\n TokenResponse createAccount(GoogleAccountSetupRequest googleAccountSetupRequest) throws ;\n\n TokenResponse createPlusProfile(GoogleAccountSetupRequest googleAccountSetupRequest) throws ;\n\n @Deprecated\n GoogleAccountData getAccountData(@Deprecated String str) throws ;\n\n Bundle getAccountExportData(String str) throws ;\n\n String getAccountId(String str) throws ;\n\n AccountRecoveryData getAccountRecoveryCountryInfo() throws ;\n\n AccountRecoveryData getAccountRecoveryData(AccountRecoveryDataRequest accountRecoveryDataRequest) throws ;\n\n AccountRecoveryGuidance getAccountRecoveryGuidance(AccountRecoveryGuidanceRequest accountRecoveryGuidanceRequest) throws ;\n\n GetAndAdvanceOtpCounterResponse getAndAdvanceOtpCounter(String str) throws ;\n\n GoogleAccountData getGoogleAccountData(Account account) throws ;\n\n String getGoogleAccountId(Account account) throws ;\n\n GplusInfoResponse getGplusInfo(GplusInfoRequest gplusInfoRequest) throws ;\n\n OtpResponse getOtp(OtpRequest otpRequest) throws ;\n\n TokenResponse getToken(TokenRequest tokenRequest) throws ;\n\n boolean installAccountFromExportData(String str, Bundle bundle) throws ;\n\n AccountRemovalResponse removeAccount(AccountRemovalRequest accountRemovalRequest) throws ;\n\n boolean setWorkAccountAppWhitelistFingerprint(String str, String str2) throws ;\n\n TokenResponse signIn(AccountSignInRequest accountSignInRequest) throws ;\n\n AccountRecoveryUpdateResult updateAccountRecoveryData(AccountRecoveryUpdateRequest accountRecoveryUpdateRequest) throws ;\n\n TokenResponse updateCredentials(UpdateCredentialsRequest updateCredentialsRequest) throws ;\n\n ValidateAccountCredentialsResponse validateAccountCredentials(AccountCredentials accountCredentials) throws ;\n}", "void createExposedOAuthCredential(IntegrationClientCredentialsDetailsModel integrationCCD);", "public Object credentials() {\n return cred;\n }", "public QCloudLifecycleCredentials onGetCredentialFromLocal(String secretId2, String secretKey2) throws QCloudClientException {\n long current = System.currentTimeMillis() / 1000;\n String keyTime = current + \";\" + (current + this.duration);\n return new BasicQCloudCredentials(secretId2, secretKey2SignKey(secretKey2, keyTime), keyTime);\n }", "public static Drive getDriveService(String token) throws IOException, GeneralSecurityException {\n Credential credential = new GoogleCredential().setAccessToken(token);\n return new Drive.Builder(GoogleNetHttpTransport.newTrustedTransport(), JacksonFactory.getDefaultInstance(), credential).setApplicationName(APPLICATION_NAME).build();\n }", "private static GoogleIdToken verifyGoogleIdToken(String token) {\n\n GoogleIdToken idToken = null;\n\n if(token == null)\n return null;\n\n GoogleIdTokenVerifier verifier = new GoogleIdTokenVerifier.Builder(new NetHttpTransport(), new JacksonFactory())\n .setAudience(Arrays.asList(SecurityConstants.CLIENT_ID))\n .setIssuer(SecurityConstants.ISSUER)\n .build();\n\n try {\n idToken = verifier.verify(token);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return idToken;\n }", "public String getAccessToken() {\n readLock.lock();\n try {\n return accessToken;\n } finally {\n readLock.unlock();\n }\n }", "public interface TokenProvider {\n /**\n * @return an always valid access token.\n */\n String getAccessToken();\n\n /**\n * Forces a refresh of all tokens.\n *\n * @return the newly refreshed access token.\n */\n String refreshTokens();\n}", "OAuth2Token getToken();", "String getAuthorizerAccessToken(String appId);", "GoogleAuthClient(ManagedChannel channel, CallCredentials callCredentials) {\n this.channel = channel;\n blockingStub = PublisherGrpc.newBlockingStub(channel).withCallCredentials(callCredentials);\n }" ]
[ "0.70853543", "0.6844742", "0.6772429", "0.67277604", "0.66416276", "0.6600734", "0.65312195", "0.639379", "0.6368126", "0.62875175", "0.6200403", "0.6190954", "0.61642975", "0.6141216", "0.6138306", "0.6132734", "0.6119661", "0.611213", "0.6102799", "0.60739976", "0.6054634", "0.6040195", "0.60362846", "0.6009167", "0.60050976", "0.5962806", "0.5958926", "0.5957751", "0.5957751", "0.59493595", "0.5925837", "0.590451", "0.5881605", "0.5877333", "0.587517", "0.58684117", "0.5863957", "0.58637786", "0.58264905", "0.5772309", "0.5763068", "0.5757968", "0.57522136", "0.57509744", "0.5749382", "0.5740967", "0.5712807", "0.5709429", "0.5704928", "0.5682668", "0.5675542", "0.5664148", "0.56623024", "0.5636514", "0.5636514", "0.5636514", "0.56013244", "0.5589837", "0.55881786", "0.55530936", "0.553495", "0.5522832", "0.55192614", "0.5503543", "0.54980433", "0.5490097", "0.5479807", "0.544153", "0.5437229", "0.54274976", "0.5424859", "0.5419062", "0.5410676", "0.5398079", "0.53583485", "0.5328035", "0.5326736", "0.5323937", "0.53160167", "0.5313245", "0.530163", "0.5299925", "0.52856004", "0.5283057", "0.52810353", "0.5280869", "0.5279582", "0.5249805", "0.52485305", "0.5234169", "0.52305603", "0.52235454", "0.5222177", "0.5204548", "0.51963156", "0.5180615", "0.5166605", "0.51661617", "0.515333", "0.5147987" ]
0.6659255
4
gets the users google profile with a valid google credntial and returns it in a json object
public String getUserInfoJson(Credential credential) throws IOException, JSONException { final HttpRequestFactory requestFactory = HTTP_TRANSPORT .createRequestFactory(credential); final GenericUrl url = new GenericUrl(USER_INFO_URL); final HttpRequest request = requestFactory.buildGetRequest(url); request.getHeaders().setContentType("application/json"); String jsonIdentity = request.execute().parseAsString(); return jsonIdentity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String RetrieveGoogleSignInProfile(){\n String personName;\n acct = GoogleSignIn.getLastSignedInAccount(ChooseService.this);\n if (acct != null) {\n personName = acct.getDisplayName();\n /*String personGivenName = acct.getGivenName();\n String personFamilyName = acct.getFamilyName();\n String personEmail = acct.getEmail();\n String personId = acct.getId();\n Uri personPhoto = acct.getPhotoUrl();*/\n }else{\n personName = null;\n }\n return personName;\n }", "private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n String id = currentPerson.getId();\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.e(TAG, \"Id: \"+id+\", Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n signInTask = new AsyncTask(mBaseActivity);\n signInTask.execute(id, email, personName);\n// SharedPreferences preferences = mBaseActivity.getSharedPreferences(\"com.yathams.loginsystem\", MODE_PRIVATE);\n// preferences.edit().putString(\"email\", email).putString(\"userName\", personName).commit();\n\n } else {\n Toast.makeText(getApplicationContext(),\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "Map<String, Object> getUserProfile();", "private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi.getCurrentPerson(mGoogleApiClient);\n String personId = currentPerson.getId();\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n\n String personBirthday = currentPerson.getBirthday();\n int personGender = currentPerson.getGender();\n String personNickname = currentPerson.getNickname();\n\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.i(TAG, \"Id: \" + personId + \", Name: \" + personName + \", plusProfile: \" + personGooglePlusProfile + \", email: \" + email + \", Image: \" + personPhotoUrl + \", Birthday: \" + personBirthday + \", Gender: \" + personGender + \", Nickname: \" + personNickname);\n\n // by default the profile url gives\n // 50x50 px\n // image only\n // we can replace the value with\n // whatever\n // dimension we want by\n // replacing sz=X\n personPhotoUrl = personPhotoUrl.substring(0, personPhotoUrl.length() - 2) + PROFILE_PIC_SIZE;\n\n Log.e(TAG, \"PhotoUrl : \" + personPhotoUrl);\n\n Log.i(TAG, \"Finally Set UserData\");\n Log.i(TAG, \"account : \" + email + \", Social_Id : \" + personId);\n\n StringBuffer sb = new StringBuffer();\n sb.append(\"Id : \").append(personId).append(\"\\n\");\n sb.append(\"Name : \").append(personName).append(\"\\n\");\n sb.append(\"plusProfile : \").append(personGooglePlusProfile).append(\"\\n\");\n sb.append(\"Email : \").append(email).append(\"\\n\");\n sb.append(\"PhotoUrl : \").append(personPhotoUrl).append(\"\\n\");\n sb.append(\"Birthday : \").append(personBirthday).append(\"\\n\");\n sb.append(\"Gender : \").append(personGender).append(\"\\n\");\n sb.append(\"Nickname : \").append(personNickname).append(\"\\n\");\n\n tv_info.setText(sb.toString());\n\n signOutFromGplus();\n\n /** set Google User Data **/\n RegisterData.name = personName;\n RegisterData.email = email;\n RegisterData.password = \"\";\n RegisterData.source = \"google\";\n RegisterData.image = personPhotoUrl;\n\n new UserLoginAsyncTask().execute();\n } else {\n Toast.makeText(mContext, \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.e(TAG, \"Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n\n Toast.makeText(context, personName + \"\\n\" + email, Toast.LENGTH_SHORT).show();\n\n /*txtName.setText(personName);\n txtEmail.setText(email);*/\n\n // by default the profile url gives 50x50 px image only\n // we can replace the value with whatever dimension we want by\n // replacing sz=X\n /*personPhotoUrl = personPhotoUrl.substring(0,\n personPhotoUrl.length() - 2)\n + PROFILE_PIC_SIZE;\n\n new LoadProfileImage(imgProfilePic).execute(personPhotoUrl);*/\n\n } else {\n Toast.makeText(context,\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public User getUserInfoJson(final String accessToken) throws IOException {\n\t\tfinal GoogleCredential credential = new GoogleCredential.Builder()\n\t\t\t\t.setJsonFactory(JSON_FACTORY).build()\n\t\t\t\t.setAccessToken(accessToken);\n\t\t\n\t\tfinal HttpRequestFactory requestFactory = HTTP_TRANSPORT.createRequestFactory(credential);\n//\t\tfinal HttpRequestFactory requestFactory = HTTP_TRANSPORT.createRequestFactory(request -> {\n//\t\t\trequest.setParser(new JsonObjectParser(JSON_FACTORY));\n//\t\t});\n\n\t\t// Make an authenticated request - to google+ API user profile\n\t\tfinal GenericUrl url = new GenericUrl(USER_INFO_URL);\n\t\tfinal HttpRequest request = requestFactory.buildGetRequest(url);\n\t\t\n\t\trequest.getHeaders().setContentType(\"application/json\");\n\t\tfinal String rawResponse = request.execute().parseAsString();\n//\t\tSystem.out.println(rawResponse);\n\t\t\n\t //final User user = (User) request.execute().parseAs(User.class);\n\t\t\n\t\treturn JSON_FACTORY.fromString(rawResponse, User.class);\n\t}", "private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = null;\n if(currentPerson.getImage().getUrl() != null){\n \tpersonPhotoUrl = currentPerson.getImage().getUrl();\n }else{\n \tpersonPhotoUrl = \"\";\n }\n String personGooglePlusProfile = currentPerson.getUrl();\n String gplusemail = Plus.AccountApi.getAccountName(mGoogleApiClient);\n \n Log.e(TAG, \"Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n \n user_id = currentPerson.getId();\n profile_image = personPhotoUrl;\n profile_url = personGooglePlusProfile;\n name = personName;\n this.email = gplusemail;\n \n /* txtName.setText(personName);\n txtEmail.setText(email);*/\n \n // by default the profile url gives 50x50 px image only\n // we can replace the value with whatever dimension we want by\n // replacing sz=X\n personPhotoUrl = personPhotoUrl.substring(0,\n personPhotoUrl.length() - 2)\n + PROFILE_PIC_SIZE;\n \n // new LoadProfileImage(imgProfilePic).execute(personPhotoUrl);\n \n Thread t = new Thread()\n\t\t\t\t{\n\t\t\t\t\tpublic void run()\n\t\t\t\t\t{\n\t\t\t\t\t\tJSONObject obj = new JSONObject();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tobj.put(\"uid\", user_id);\n\t\t\t\t\t\t\tobj.put(\"email\", email);\n\t\t\t\t\t\t\tobj.put(\"profile_url\", profile_url);\n\t\t\t\t\t\t\tobj.put(\"name\", name);\n\t\t\t\t\t\t\tobj.put(\"profile_image\", profile_image);\n\t\t\t\t\t\t\tobj.put(\"type\", \"google\");\n\t\t\t\t\t\t\tobj.put(\"device_id\", app.getDeviceInfo().device_id);\n\t\t\t\t\t\t\tobj.put(\"device_type\", \"android\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString response = HttpClient.getInstance(getApplicationContext()).SendHttpPost(Constant.SOCIAL_LOGIN, obj.toString());\n\t\t\t\t\t\t\tif(response != null){\n\t\t\t\t\t\t\t\tJSONObject ob = new JSONObject(response);\n\t\t\t\t\t\t\t\tif(ob.getBoolean(\"status\")){\n\t\t\t\t\t\t\t\t\tString first_name = ob.getString(\"first_name\");\n\t\t\t\t\t\t\t\t\tString last_name = ob.getString(\"last_name\");\n\t\t\t\t\t\t\t\t\tString user_id = ob.getString(\"user_id\");\n\t\t\t\t\t\t\t\t\tString reservation_type = ob.getString(\"reservation_type\");\n\t\t\t\t\t\t\t\t\tboolean checkin_status = ob.getBoolean(\"checkin_status\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tString rev_id = null,reservation_code = null;\n\t\t\t\t\t\t\t\t\tJSONArray object = ob.getJSONArray(\"reservation_detail\");\n\t\t\t\t\t\t\t\t\tfor(int i = 0;i<object.length();i++){\n\t\t\t\t\t\t\t\t\t\trev_id = object.getJSONObject(i).getString(\"reservation_id\");\n\t\t\t\t\t\t\t\t\t\treservation_code = object.getJSONObject(i).getString(\"reservation_code\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tapp.getUserInfo().SetUserInfo(first_name,\n\t\t\t\t\t\t\t\t\t\t\tlast_name,\n\t\t\t\t\t\t\t\t\t\t\tuser_id,\n\t\t\t\t\t\t\t\t\t\t\trev_id,\n\t\t\t\t\t\t\t\t\t\t\treservation_code,\n\t\t\t\t\t\t\t\t\t\t\treservation_type,\n\t\t\t\t\t\t\t\t\t\t\tcheckin_status);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tapp.getLogininfo().setLoginInfo(true);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tUpdateUiResult(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\tt.start();\n \n } else {\n Toast.makeText(getApplicationContext(),\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "java.lang.String getProfileURL();", "public void getProfileInformation() {\n\n\t\t mAsyncRunner.request(\"me\", new RequestListener() {\n\t\t\t @Override\n\t\t\t public void onComplete(String response, Object state) {\n\t\t\t\t Log.d(\"Profile\", response);\n\t\t\t\t String json = response;\n\t\t\t\t try {\n\t\t\t\t\t // Facebook Profile JSON data\n\t\t\t\t\t JSONObject profile = new JSONObject(json);\n\n\t\t\t\t\t uName = profile.getString(\"name\");\n\t\t\t\t\t uMail = profile.getString(\"email\");\n\t\t\t\t\t //uGender=profile.getString(\"gender\");\n\n\n\t\t\t\t\t //final String birthday=profile.getString(\"birthday\");\n\t\t\t\t\t runOnUiThread(new Runnable() {\n\t\t\t\t\t\t @Override\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\t //Toast.makeText(getApplicationContext(), \"Name: \" + name + \"\\nEmail: \" + email+\"\\nGender: \"+gender, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t getResponse();\n\t\t\t\t\t\t }\n\t\t\t\t\t });\n\t\t\t\t } \n\t\t\t\t catch (JSONException e) \n\t\t\t\t {\n\t\t\t\t\t errorMessage = \"JSON Error Occured\";\n\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t }\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onIOException(IOException e, Object state) {\n\t\t\t\t errorMessage = \"Facebook Data read Error Occured\";\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onFileNotFoundException(FileNotFoundException e, Object state) {\n\t\t\t\t errorMessage = \"Facebook Image read Error Occured\";\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onMalformedURLException(MalformedURLException e,\n\t\t\t\t\t Object state) {\n\t\t\t\t errorMessage = \"Facebook URL Error Occured\";\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onFacebookError(FacebookError e, Object state) {\n\t\t\t\t errorMessage = \"Facebook Error Occured OnFacebook\";\n\t\t\t }\n\t\t });\n\t }", "public void getProfileInformation() {\n\t\tmAsyncRunner.request(\"me\", new RequestListener() {\n\t\t\t@Override\n\t\t\tpublic void onComplete(String response, Object state) {\n\t\t\t\tLog.d(\"Profile\", response);\n\t\t\t\tString json = response;\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject profile = new JSONObject(json);\n\t\t\t\t\tLog.d(\"Arvind Profile Data\", \"\"+profile.toString());\n\t\t\t\t\tfinal String name = profile.getString(\"name\");\n\t\t\t\t\tfinal String email = profile.getString(\"email\");\n\t\t\t\t\tHashMap<String, String> hashMap = new HashMap<String, String>();\n\n\t\t\t\t\thashMap.put(\"first_name\", profile.getString(\"first_name\"));\n\n\t\t\t\t\thashMap.put(\"last_name\", profile.getString(\"last_name\"));\n\n\t\t\t\t\thashMap.put(\"id\", profile.getString(\"id\"));\n\n\t\t\t\t\thashMap.put(\"gender\", profile.getString(\"gender\"));\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\thashMap.put(\"email\", profile.getString(\"email\"));\n\t\t\t\t\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\n\t\t\t\t\thashMap.put(\"birthday\", profile.getString(\"birthday\"));\n\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t//\tGetAlbumdata();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tIntent returnIntent = new Intent();\n\t\t\t\t\treturnIntent.putExtra(\"map\", hashMap);\n\t\t\t\t\tsetResult(RESULT_OK,returnIntent);\n\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onIOException(IOException e, Object state) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onFileNotFoundException(FileNotFoundException e,\n\t\t\t\t\tObject state) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onMalformedURLException(MalformedURLException e,\n\t\t\t\t\tObject state) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onFacebookError(FacebookError e, Object state) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t});\n\t}", "private void getUserDetailsFromFB() {\n Bundle parameters = new Bundle();\n parameters.putString(\"fields\", \"email,name,picture,first_name,last_name,gender,timezone,verified\");\n new GraphRequest(\n AccessToken.getCurrentAccessToken(),\n \"/me\",\n parameters,\n HttpMethod.GET,\n new GraphRequest.Callback() {\n @Override\n public void onCompleted(GraphResponse response) {\n //Handle the result here\n try {\n email = response.getJSONObject().getString(\"email\");\n name = response.getJSONObject().getString(\"name\");\n timezone = response.getJSONObject().getString(\"timezone\");\n firstName = response.getJSONObject().getString(\"first_name\");\n lastName = response.getJSONObject().getString(\"last_name\");\n gender = response.getJSONObject().getString(\"gender\");\n isVerified = response.getJSONObject().getBoolean(\"verified\");\n\n JSONObject picture = response.getJSONObject().getJSONObject(\"picture\");\n JSONObject data = picture.getJSONObject(\"data\");\n\n //get the 50X50 profile pic they send us\n String pictureURL = data.getString(\"url\");\n\n new ProfilePicAsync(pictureURL,1).execute();\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }\n ).executeAsync();\n }", "String getProfile();", "private void retrieveProfile() {\r\n\r\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\r\n\r\n if (user == null) {\r\n return;\r\n }\r\n\r\n String userId = user.getUid();\r\n String email = user.getEmail();\r\n DocumentReference reference = mFirebaseFirestore.collection(\"users\").document(userId);\r\n reference.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\r\n @Override\r\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\r\n if (task.isSuccessful()) {\r\n DocumentSnapshot documentSnapshot = task.getResult();\r\n mTextViewName.setText((CharSequence) documentSnapshot.get(\"name\"));\r\n mTextViewContact.setText((CharSequence) documentSnapshot.get(\"contact\"));\r\n mTextViewEstate.setText((CharSequence) documentSnapshot.get(\"estate\"));\r\n mTextViewHouseNo.setText((CharSequence) documentSnapshot.get(\"houseno\"));\r\n }\r\n Toast.makeText(Testing.this, \"Profile data loaded successfully!\", Toast.LENGTH_LONG).show();\r\n }\r\n })\r\n .addOnFailureListener(new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n Toast.makeText(Testing.this, \"Error fetching profile data. Check your internet connection!\" + e.toString(), Toast.LENGTH_LONG).show();\r\n }\r\n });\r\n\r\n }", "void getProfile(@NonNull final String profileId, @Nullable Callback<ComapiResult<Map<String, Object>>> callback);", "public void loadProfile() {\n SharedPreferences prefs = this.getSharedPreferences(\"MYPREFERENCES\", Context.MODE_PRIVATE);\n Intent intent = this.getIntent();\n\n // Email del perfil a cargar\n if (intent.getStringExtra(EMAIL_USER_PROFILE) != null) {\n emailProfile = intent.getStringExtra(EMAIL_USER_PROFILE);\n } else {\n emailProfile = \"\";\n }\n\n // Email del usuario logueado\n if (prefs.contains(LoginGoogleActivity.USER_KEY)) {\n emailLogin = prefs.getString(LoginGoogleActivity.USER_KEY, \"\");\n }\n\n userName = (TextView) this.findViewById(R.id.PublicCommentNameProfile);\n imgProfile = (ImageView) this.findViewById(R.id.PublicCommentImgProfile);\n\n\n // Compruebo si el perfil es del usuario logueado o de otro\n if ((emailProfile.isEmpty())) {\n // perfil usuario logueado\n if (prefs.contains(LoginGoogleActivity.USER_NAME)) {\n userName.setText(prefs.getString(LoginGoogleActivity.USER_NAME, \"\"));\n }\n if (prefs.contains(LoginGoogleActivity.USER_URL)) {\n new DownloadImageTask(imgProfile).execute(prefs.getString(LoginGoogleActivity.USER_URL, \"\"));\n }\n\n // extraer lista de comentarios\n loadCommentsList(emailLogin);\n\n }else if(emailProfile.compareTo(emailLogin) == 0 )\n {\n Intent i = new Intent(this, MenuActivity.class);\n startActivity(i);\n }\n else {\n try {\n\n String formatEmail = emailProfile.replaceAll(\"\\\\.\", \"___\");\n String userGet = new RestServiceGet().execute(\"http://\"+IP+\":8080/InftelSocialNetwork-web/webresources/users/\" + formatEmail).get();\n\n if(!userGet.isEmpty() && userGet != null) {\n\n Gson gson = new Gson();\n JSONObject json = null;\n JSONArray userArray = new JSONArray(userGet);\n\n for(int i=0; i<userArray.length();i++ )\n {\n json = new JSONObject(userArray.get(i).toString());\n\n }\n\n User perfil = gson.fromJson(json.toString(), User.class);\n\n\n userName.setText(perfil.getName());\n new DownloadImageTask(imgProfile).execute(perfil.getImageUrl(), \"\");\n\n loadBotonSeguir(emailLogin, emailProfile);\n loadCommentsList(emailProfile);\n }\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n }", "public void loadUserProfile(AccessToken accessToken) {\n GraphRequest request = GraphRequest.newMeRequest(accessToken, new GraphRequest.GraphJSONObjectCallback() {\n public void onCompleted(JSONObject object, GraphResponse response) {\n try {\n String first_name = object.getString(\"first_name\");\n String last_name = object.getString(\"last_name\");\n String email = object.getString(\"email\");\n String str = \"https://graph.facebook.com/\" + object.getString(\"id\") + \"/picture?type=normal\";\n Intent intent = new Intent(LoginOptionActivity.this, HomeActivity.class);\n intent.putExtra(\"name\", first_name + \" \" + last_name + \"\\n\" + email);\n intent.addFlags(268468224);\n LoginOptionActivity.this.startActivity(intent);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n });\n Bundle parameters = new Bundle();\n parameters.putString(GraphRequest.FIELDS_PARAM, \"first_name,last_name,email,id\");\n request.setParameters(parameters);\n request.executeAsync();\n }", "public void getProfile() {\n\n String mKey = getString(R.string.preference_name);\n SharedPreferences mPrefs = getSharedPreferences(mKey, MODE_PRIVATE);\n\n // Load the user email\n\n /*userEmail = getString(R.string.preference_key_profile_email);\n userPassword = getString(R.string.preference_key_profile_password);*/\n\n // Load the user email\n\n mKey = getString(R.string.preference_key_profile_email);\n userEmail = mPrefs.getString(mKey, \"\");\n\n // Load the user password\n\n mKey = getString(R.string.preference_key_profile_password);\n userPassword = mPrefs.getString(mKey, \"\");\n\n\n //userEmail = getString(R.string.register_email);\n //userPassword = getString(R.string.register_password);\n\n }", "public static UserInfo getAccountInfoFromProfile(Context context) {\n Cursor dc = null;\n ContentResolver resolver= context.getContentResolver();\n Cursor pc = resolver.query(Profile.CONTENT_URI, PROFILE_PROJECTION, null, \n null, null);\n if (pc == null) {\n return null;\n }\n UserInfo acctInfo = null;\n try {\n while (pc.moveToNext()) {\n String displayName = pc.getString(COLUMN_DISPLAY_NAME);\n if (displayName == null || displayName.isEmpty()) {\n continue;\n }\n if (acctInfo == null) {\n acctInfo = new UserInfo();\n }\n acctInfo.setDisplayName(displayName);\n long rawContactsId = pc.getLong(COLUMN_RAW_CONTACTS_ID);\n \n Uri profileDataUri = Uri.withAppendedPath(Profile.CONTENT_URI, \"data\");\n dc = resolver.query(profileDataUri, PROFILE_DATA_PROJECTION,\n Data.RAW_CONTACT_ID+\"=? AND \"+Data.MIMETYPE+\" IN (?,?)\", \n new String[] { String.valueOf(rawContactsId), \n Phone.CONTENT_ITEM_TYPE, Email.CONTENT_ITEM_TYPE }, null);\n boolean firstEmail = true, firstPhone = true;\n while (dc != null && dc.moveToNext()) {\n String data;\n int type = dc.getInt(COLUMN_TYPE);\n int isPrimary = dc.getInt(COLUMN_ISPRIMARY);\n boolean isPhone = Phone.CONTENT_ITEM_TYPE.equals(dc.getString(COLUMN_MIMETYPE));\n if (isPhone) {\n data = dc.getString(COLUMN_PHONENUM);\n if (isPrimary == 1 || firstPhone) {\n // TODO: phone number is not supported yet.\n// acctInfo.setPhone(data);\n firstPhone = false;\n }\n } else {\n data = dc.getString(COLUMN_EMAILADDR);\n if (isPrimary == 1 || firstEmail) {\n acctInfo.setEmail(data);\n firstEmail = false;\n }\n }\n }\n }\n return acctInfo;\n } finally {\n pc.close();\n if (dc != null) {\n dc.close();\n }\n }\n }", "protected Map<String, Object> getUserProfile() {\r\n\t\tTimeRecorder timeRecorder = RequestContext.getThreadInstance()\r\n\t\t\t\t\t\t\t\t\t\t\t\t .getTimeRecorder();\r\n\t\tString profileId = (String)userProfile.get(AuthenticationConsts.KEY_PROFILE_ID);\r\n\r\n\t\tSite site = Utils.getEffectiveSite(request);\r\n\t\tString siteDNSName = (site == null ? null : site.getDNSName());\r\n\r\n\t\tIUserProfileRetriever retriever = UserProfileRetrieverFactory.createUserProfileImpl(AuthenticationConsts.USER_PROFILE_RETRIEVER, siteDNSName);\r\n\t\ttry {\r\n\t\t\ttimeRecorder.recordStart(Operation.PROFILE_CALL);\r\n\t\t\tMap<String, Object> userProfile = retriever.getUserProfile(profileId,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t request);\r\n\t\t\ttimeRecorder.recordEnd(Operation.PROFILE_CALL);\r\n\t\t\treturn userProfile;\r\n\t\t} catch (UserProfileException ex) {\r\n\t\t\ttimeRecorder.recordError(Operation.PROFILE_CALL, ex);\r\n\t\t\tRequestContext.getThreadInstance()\r\n\t\t\t\t\t\t .getDiagnosticContext()\r\n\t\t\t\t\t\t .setError(ErrorCode.PROFILE001, ex.toString());\r\n\t\t\tthrow ex;\r\n\t\t}\r\n\t}", "public Optional<CredentialProfile> get(StructuredTableContext context, CredentialProfileId id)\n throws IOException {\n StructuredTable table = context.getTable(CredentialProviderStore.CREDENTIAL_PROFILES);\n Collection<Field<?>> key = Arrays.asList(\n Fields.stringField(CredentialProviderStore.NAMESPACE_FIELD,\n id.getNamespace()),\n Fields.stringField(CredentialProviderStore.PROFILE_NAME_FIELD,\n id.getName()));\n return table.read(key).map(row -> GSON.fromJson(row\n .getString(CredentialProviderStore.PROFILE_DATA_FIELD), CredentialProfile.class));\n }", "void getProfile(@NonNull final String profileId, @Nullable Callback<ComapiResult<ComapiProfile>> callback);", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n Toast.makeText(this, getResources().getString(R.string.autenticandoseGoogle) + \" \" + acct.getId(), Toast.LENGTH_SHORT).show();\n\n showProgressDialog();\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.autenticadoGoogle), Toast.LENGTH_SHORT).show();\n FirebaseUser user = mAuth.getCurrentUser();\n updateUI(user);\n finish();\n } else {\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.autenticacionFallida), Toast.LENGTH_SHORT).show();\n updateUI(null);\n }\n hideProgressDialog();\n\n\n }\n });\n }", "static public User getUser(HttpServletRequest request) {\n String accessToken = request.getParameter(\"access_token\");\n if (accessToken == null) {\n return null;\n } else {\n try {\n URL url = new URL(\n \"https://www.googleapis.com/oauth2/v1/tokeninfo\"\n + \"?access_token=\" + accessToken);\n\n Map<String, String> userData = mapper.readValue(\n new InputStreamReader(url.openStream(), \"UTF-8\"),\n new TypeReference<Map<String, String>>() {\n });\n if (userData.get(\"audience\") == null\n || userData.containsKey(\"error\")\n || !userData.get(\"audience\")\n .equals(Constants.CLIENT_ID)) {\n return null;\n } else {\n String email = userData.get(\"email\"),\n userId = userData.get(\"user_id\");\n User user = null;\n PersistenceManager pm = PMF.get().getPersistenceManager();\n try {\n user = pm.getObjectById(User.class, userId);\n } catch (JDOObjectNotFoundException ex) {\n user = new User(userId, email);\n pm.makePersistent(user);\n } finally {\n pm.close();\n }\n return user;\n }\n } catch (Exception ex) {\n System.err.println(ex.getMessage());\n return null;\n }\n }\n }", "public String getProfile();", "Profile getProfile( String profileId );", "@Test\n public void getGoogleAuthUrlTest() throws ApiException {\n InlineResponse2002 response = api.getGoogleAuthUrl();\n\n // TODO: test validations\n }", "com.google.protobuf2.Any getProfile();", "com.google.protobuf.ByteString\n getProfileURLBytes();", "private void getProfil() {\n Call<FeedUser> call = baseApiService.getAllProfile(sessionManager.getSpContenttype(),\n sessionManager.getSpAccept(), sessionManager.getSpAuthorization());\n call.enqueue(new Callback<FeedUser>() {\n @Override\n public void onResponse(Call<FeedUser> call, Response<FeedUser> response) {\n if (response.isSuccessful()) {\n try {\n name = response.body().getDataProfil().getName().toString();\n email = response.body().getDataProfil().getEmail();\n initComponetNavHeader();\n } catch (Exception e) {\n Log.d(TAG, \" error :\" + e);\n }\n\n } else {\n Toast.makeText(SettingActivity.this, \"Response not success\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<FeedUser> call, Throwable t) {\n Toast.makeText(SettingActivity.this, \"Cek Connection\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "private String profileTest() {\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(\n \"/home/pascal/bin/workspace_juno/pgu-geo/war/WEB-INF/pgu/profile.json\"));\n } catch (final FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n\n final StringBuilder sb = new StringBuilder();\n String line = null;\n\n try {\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n } catch (final IOException e) {\n throw new RuntimeException(e);\n }\n return sb.toString();\n }", "private User retrievePersonalProfileData() {\n if (checkIfProfileExists()) {\n return SharedPrefsUtils.convertSharedPrefsToUserModel(context);\n } else {\n return null;\n }\n }", "HumanProfile getUserProfile();", "TasteProfile.UserProfile getUserProfile (String user_id);", "private void getProfileInfo() {\n OkHttpClient client = new OkHttpClient.Builder()\n .cookieJar(new CookieJar() {\n private final HashMap<HttpUrl, List<Cookie>> cookieStore = new HashMap<>();\n @Override\n public void saveFromResponse(HttpUrl url, List<Cookie> cookies) {\n cookieStore.put(url, cookies);\n }\n\n @Override\n public List<Cookie> loadForRequest(HttpUrl url) {\n List<Cookie> cookies = cookieStore.get(url);\n return cookies != null ? cookies : new ArrayList<>();\n }\n })\n .build();\n\n AsyncTask.execute(() -> {\n try {\n HttpUrl url = HttpUrl.parse(URL + \"/nuh/myprofile\")\n .newBuilder()\n .build();\n\n Request requestToken = new Request.Builder()\n .url(url)\n .build();\n\n client.newCall(requestToken).execute();\n String token = \"\";\n\n List<Cookie> cookies = client.cookieJar().loadForRequest(url);\n for (Cookie cookie : cookies) {\n if (cookie.name().equals(\"csrftoken\")) {\n token = cookie.value();\n }\n }\n\n Request request = new Request.Builder()\n .header(\"X-CSRFToken\", token)\n .url(URL + \"/nuh/myprofile\")\n .build();\n\n Response response = client.newCall(request).execute();\n if (response.isSuccessful()) {\n String JSON = response.body().string();\n Log.d(\"JSON\", \"getProfileInfo: JSON: \" + JSON);\n JSONArray array = new JSONArray(JSON);\n JSONObject usernameObj = array.getJSONObject(0);\n String username = usernameObj.getString(\"username\");\n JSONObject firstNameObj = array.getJSONObject(1);\n String firstName = firstNameObj.getString(\"first_name\");\n JSONObject lastNameObj = array.getJSONObject(2);\n String lastName = lastNameObj.getString(\"last_name\");\n JSONObject emailObj = array.getJSONObject(3);\n String email = emailObj.getString(\"e_mail\");\n\n JSONObject categoriesObj = array.getJSONObject(4);\n String needFood = categoriesObj.getString(\"get_food\");\n String needAccomodation = categoriesObj.getString(\"get_accommodation\");\n String needClothes = categoriesObj.getString(\"get_clothes\");\n String needMedicine = categoriesObj.getString(\"get_medicine\");\n String needOther = categoriesObj.getString(\"get_other\");\n String giveFood = categoriesObj.getString(\"give_food\");\n String giveAccomodation = categoriesObj.getString(\"give_accommodation\");\n String giveClothes = categoriesObj.getString(\"give_clothes\");\n String giveMedicine = categoriesObj.getString(\"give_medicine\");\n String giveOther = categoriesObj.getString(\"give_other\");\n double latitude = categoriesObj.getDouble(\"latitude\");\n double longitude = categoriesObj.getDouble(\"longitude\");\n\n SharedPreferences.Editor editor = getSharedPreferences(HELP_CATEGORIES, MODE_PRIVATE).edit();\n editor.putString(USERNAME, username);\n editor.putString(FIRST_NAME, firstName);\n editor.putString(LAST_NAME, lastName);\n editor.putString(EMAIL, email);\n editor.putBoolean(FOOD_NEED, needFood != null);\n editor.putBoolean(ACCOMODATION_NEED, needAccomodation != null);\n editor.putBoolean(CLOTHES_NEED, needClothes != null);\n editor.putBoolean(MEDICINE_NEED, needMedicine != null);\n editor.putBoolean(OTHER_NEED, needOther != null);\n editor.putBoolean(FOOD_GIVE, giveFood != null);\n editor.putBoolean(ACCOMODATION_GIVE, giveAccomodation != null);\n editor.putBoolean(CLOTHES_GIVE, giveClothes != null);\n editor.putBoolean(MEDICINE_GIVE, giveMedicine != null);\n editor.putBoolean(OTHER_GIVE, giveOther != null);\n editor.putString(FOOD_NEED_TEXT, needFood);\n editor.putString(ACCOMODATION_NEED_TEXT, needAccomodation);\n editor.putString(CLOTHES_NEED_TEXT, needClothes);\n editor.putString(MEDICINE_NEED_TEXT, needMedicine);\n editor.putString(OTHER_NEED_TEXT, needOther);\n editor.putString(FOOD_GIVE_TEXT, giveFood);\n editor.putString(ACCOMODATION_GIVE_TEXT, giveAccomodation);\n editor.putString(CLOTHES_GIVE_TEXT, giveClothes);\n editor.putString(MEDICINE_GIVE_TEXT, giveMedicine);\n editor.putString(OTHER_GIVE_TEXT, giveOther);\n editor.apply();\n getSharedPreferences(LOGIN, MODE_PRIVATE)\n .edit()\n .putString(LATITUDE, String.valueOf(latitude))\n .putString(LONGITUDE, String.valueOf(longitude))\n .apply();\n\n } else {\n runOnUiThread(() -> Toast.makeText(this, \"Something went wrong\", Toast.LENGTH_SHORT).show());\n }\n } catch (IOException | JSONException e) {\n e.printStackTrace();\n }\n });\n }", "public void getProfileWithCompletion(\n final ServiceClientCompletion<ResponseResult> completion)\n {\n // Create request headers.\n final HashMap<String, String> headers = new HashMap<String, String>(2);\n headers.put(\"Authorization\", AUTHORIZATION_HEADER);\n headers.put(\"Content-Type\", \"application/json\");\n\n // Create request parameters.\n final HashMap<String, String> parameters =\n new HashMap<String, String>(2);\n parameters.put(\"grant_type\", \"bearer\");\n parameters.put(\"access_token\", mSharecareToken.accessToken);\n\n // Create endpoint.\n final String endPoint =\n String.format(PROFILE_ENDPOINT, mSharecareToken.accountID);\n\n this.beginRequest(endPoint, ServiceMethod.GET, headers, parameters,\n (String)null, ServiceResponseFormat.GSON,\n new ServiceResponseTransform<JsonElement, ResponseResult>()\n {\n @Override\n public ResponseResult transformResponseData(\n final JsonElement json)\n throws ServiceResponseTransformException\n {\n final ResponseResult result =\n checkResultFromAuthService(json);\n if (result.success)\n {\n // Extract profile info to create profile object.\n final JsonObject jsonObject = json.getAsJsonObject();\n final String firstName =\n getStringFromJson(jsonObject, FIRST_NAME);\n final String lastName =\n getStringFromJson(jsonObject, LAST_NAME);\n final String email =\n getStringFromJson(jsonObject, EMAIL);\n final String gender =\n getStringFromJson(jsonObject, GENDER);\n final Date dateOfBirth =\n getDateFromJson(jsonObject, DATE_OF_BIRTH);\n final double height =\n getDoubleFromJson(jsonObject, HEIGHT, 0);\n final double weight =\n getDoubleFromJson(jsonObject, WEIGHT, 0);\n\n if (firstName != null && lastName != null\n && email != null)\n {\n final Profile profile = new Profile();\n profile.firstName = firstName;\n profile.lastName = lastName;\n profile.email = email;\n profile.heightInMeters = height;\n profile.weightInKg = weight;\n profile.gender = gender;\n profile.dateOfBirth = dateOfBirth;\n updateAskMDProfileWithCompletion(null);\n final HashMap<String, Object> parameters =\n new HashMap<String, Object>(1);\n parameters.put(PROFILE, profile);\n result.parameters = parameters;\n }\n else\n {\n result.success = false;\n result.errorMessage = \"Bad profile data.\";\n result.responseCode =\n ServiceClientConstants.SERVICE_RESPONSE_STATUS_CODE_BAD_DATA;\n }\n }\n\n LogError(\"getProfileWithCompletion\", result);\n return result;\n }\n }, completion);\n }", "public HashMap<String, String> getUserDetails(){\n HashMap<String, String> user = new HashMap<String, String>();\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n return user;\n }", "public UserProfile getUserProfile(String username);", "com.google.protobuf2.AnyOrBuilder getProfileOrBuilder();", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n fbAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n //Log.d(TAG, \"signInWithCredential:success\");\n FirebaseUser user = fbAuth.getCurrentUser();\n UserModel userModel=new UserModel();\n userModel.setEmail(user.getEmail());\n userModel.setDisplayName(user.getDisplayName());\n userModel.setPhotoUrl(user.getPhotoUrl().toString());\n userModel.setUid(user.getUid());\n UserFBDB userFBDB = new UserFBDB();\n userFBDB.save(userModel);\n updateUI(user);\n } else {\n // If sign in fails, display a message to the user.\n //Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n Exception ex=task.getException();\n signupWithGoogleBtn.setVisibility(View.VISIBLE);\n mProgress.setVisibility(View.INVISIBLE);\n Toast.makeText(SignupActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n //updateUI(null);\n }\n\n // ...\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"singn\", e.getMessage());\n }\n });\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows IOException, ServletException {\n\t\tCredential credential = getCredential();\n\n\t\t// Build the Plus object using the credentials\n\t\tPlus plus = new Plus.Builder(transport, jsonFactory, credential)\n\t\t\t\t.setApplicationName(GoogleOAuth2.APPLICATION_NAME).build();\n\t\t// Make the API call\n\t\tPerson profile = plus.people().get(\"me\").execute();\n\t\t// Send the results as the response\n\t\tPrintWriter respWriter = resp.getWriter();\n\t\tresp.setStatus(200);\n\t\tresp.setContentType(\"text/html\");\n\t\trespWriter.println(\"<img src='\" + profile.getImage().getUrl() + \"'>\");\n\t\trespWriter.println(\"<a href='\" + profile.getUrl() + \"'>\" + profile.getDisplayName() + \"</a>\");\n\n\t\tUserService userService = UserServiceFactory.getUserService();\n\t\trespWriter.println(\"<div class=\\\"header\\\"><b>\" + req.getUserPrincipal().getName() + \"</b> | \"\n\t\t\t\t+ \"<a href=\\\"\" + userService.createLogoutURL(req.getRequestURL().toString())\n\t\t\t\t+ \"\\\">Log out</a> | \"\n\t\t\t\t+ \"<a href=\\\"http://code.google.com/p/google-api-java-client/source/browse\"\n\t\t\t\t+ \"/calendar-appengine-sample?repo=samples\\\">See source code for \"\n\t\t\t\t+ \"this sample</a></div>\");\n\t}", "private void getUserData() {\n TwitterApiClient twitterApiClient = TwitterCore.getInstance().getApiClient();\n AccountService statusesService = twitterApiClient.getAccountService();\n Call<User> call = statusesService.verifyCredentials(true, true, true);\n call.enqueue(new Callback<User>() {\n @Override\n public void success(Result<User> userResult) {\n //Do something with result\n\n //parse the response\n String name = userResult.data.name;\n String email = userResult.data.email;\n String description = userResult.data.description;\n String pictureUrl = userResult.data.profileImageUrl;\n String bannerUrl = userResult.data.profileBannerUrl;\n String language = userResult.data.lang;\n long id = userResult.data.id;\n\n }\n\n public void failure(TwitterException exception) {\n //Do something on failure\n }\n });\n }", "@RequestMapping(value=\"/googleLogin\", method=RequestMethod.POST, consumes=MediaType.APPLICATION_FORM_URLENCODED_VALUE)\n\tpublic @ResponseBody Object verifyGoogleToken(@RequestParam String googleToken) {\n\t\ttry {\n\t\t\tString email = userService.verifyGoogleToken(googleToken);\n\t\t\tSystem.out.println(\"Response from google: email - \" + email);\n\t\t\tif(email.length() > 0) {\n\t\t\t\t long now = new Date().getTime();\n\t\t\t\t long expires = now + 86400000;\n\t\t\t\t try {\n\t\t\t\t\t UserProfile up = userService.getUserByEmail(email);\n\t\t\t\t\t System.out.println(\"USER FOUND: \" + up.toString());\n\t\t\t\t\t String s = Jwts.builder().setSubject(up.getUserName()).setIssuer(\"UxP-Gll\").setExpiration(new Date(expires)).setHeaderParam(\"user\", up).signWith(SignatureAlgorithm.HS512, key).compact();\n\t\t\t\t\t return userService.getUserByUserName(up.getUserName(), s);\n\t\t\t\t } catch (Exception e) {\n\t\t\t\t\t return Collections.singletonMap(\"error\", \"no account found for email: \" + email); \n\t\t\t\t }\n\t\t\t\t \n\t\t\t} else {\n\t\t\t\treturn Collections.singletonMap(\"error\", \"bad response from google\");\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(e.toString());\n\t\t\treturn Collections.singletonMap(\"error\", \"token could not be validated\");\n\t\t}\n\t}", "@Override\n public void fetchFromSource(){\n System.out.println(\"pull the user credential from gmail\");\n }", "private void getFaceBookData(JSONObject object) {\n\n try {\n\n fbEmail = object.getString(\"email\");\n fbFirstName = object.getString(\"first_name\");\n fbLastName = object.getString(\"last_name\");\n fbUid = object.getString(\"id\");\n\n\n Toast.makeText(this, fbEmail, Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private void googleSignInResult(GoogleSignInResult result) {\n if (result.isSuccess()) {\n // add to shared preferences\n GoogleSignInAccount account = result.getSignInAccount();\n userName = account.getDisplayName();\n userEmail = account.getEmail();\n userGoogleId = account.getId();\n userPhotoUrl = account.getPhotoUrl();\n\n editor.putString(getString(R.string.shared_prefs_key_username), userName);\n editor.putString(getString(R.string.shared_prefs_key_email), userEmail);\n editor.putString(getString(R.string.shared_prefs_key_google_id), userGoogleId);\n editor.putString(getString(R.string.shared_prefs_key_user_photo_url), userPhotoUrl.toString());\n\n editor.apply();\n\n // add to firebase users\n member = new Member();\n member.setUsername(userName);\n member.setEmail(userEmail);\n member.setId(userGoogleId);\n member.setPhotoUrl(userPhotoUrl.toString());\n member.setLoginType(getString(R.string.login_type_google));\n\n rref.orderByChild(getString(R.string.firebase_key_email)).equalTo(member.getEmail()).addListenerForSingleValueEvent(\n new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n String key;\n if (dataSnapshot.exists()) {\n key = dataSnapshot.getChildren().iterator().next().getKey();\n firebaseKey = key;\n getUserDetailsFromFirebase();\n } else {\n // new user\n key = rref.push().getKey();\n }\n editor.putString(getString(R.string.shared_prefs_key_firebasekey), key);\n editor.apply();\n\n Map<String, Object> userUpdates = new HashMap<>();\n\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_username), userName);\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_google_id), userGoogleId);\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_photo_url), userPhotoUrl.toString());\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_login_type), getString(R.string.login_type_google));\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_email), userEmail);\n\n rref.updateChildren(userUpdates);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n }\n );\n\n } else {\n gotoMainActivity();\n }\n }", "AspirantProfile getAspirantProfile(String email)\n throws IllegalArgumentException, ServiceException;", "private static Profile getProfileFromUser(User user) {\n // First fetch the user's Profile from the datastore.\n Profile profile = ofy().load().key(\n Key.create(Profile.class, user.getUserId())).now();\n if (profile == null) {\n // Create a new Profile if it doesn't exist.\n // Use default displayName and teeShirtSize\n String email = user.getEmail();\n\n profile = new Profile(user.getUserId(),\n extractDefaultDisplayNameFromEmail(email), email, null, null, null, null);\n }\n return profile;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_account_gplus, container, false);\n\n Intent intent = getActivity().getIntent();\n\n Call<StudentGoogleProfile> call = null;\n final ImageView imageView = (ImageView) rootView.findViewById(R.id.student_account_gplus_image);\n final TextView name = (TextView) rootView.findViewById(R.id.student_account_gplus_name);\n final TextView surname = (TextView) rootView.findViewById(R.id.student_account_gplus_surname);\n\n Uri uri = null;\n if (intent != null)\n uri = intent.getData();\n\n Pattern pattern = Pattern.compile(\"https://plus.google.com/u/0/\\\\d{21}\");\n\n if (uri != null) {\n if (pattern.matcher(uri.toString()).matches()) {\n ApiInterface apiInterface = GooglePlusApiClient.getClient().create(ApiInterface.class);\n call = apiInterface.getStudentGoogleProfile(uri.getLastPathSegment(), API_KEY_GOOGLE_PLUS);\n }\n else {\n Toast.makeText(getActivity(), \"Invalid link!!! Choose another browser, please.\", Toast.LENGTH_LONG).show();\n getActivity().startActivity(new Intent(Intent.ACTION_VIEW, uri));\n }\n }\n else if (intent != null && intent.hasExtra(Intent.EXTRA_TEXT)) {\n ApiInterface apiInterface = GooglePlusApiClient.getClient().create(ApiInterface.class);\n call = apiInterface.getStudentGoogleProfile(intent.getStringExtra(Intent.EXTRA_TEXT), API_KEY_GOOGLE_PLUS);\n }\n if (call != null) {\n Log.v(\"LOG:\", call.request().url().toString());\n call.enqueue(new Callback<StudentGoogleProfile>() {\n @Override\n public void onResponse(Call<StudentGoogleProfile> call, Response<StudentGoogleProfile> response) {\n StudentGoogleProfile studentGoogleProfile = response.body();\n name.setText(studentGoogleProfile.getName());\n surname.setText(studentGoogleProfile.getSurname());\n Picasso.with(getContext()).load(studentGoogleProfile.getImageUrl()).into(imageView);\n }\n\n @Override\n public void onFailure(Call<StudentGoogleProfile> call, Throwable t) {\n }\n });\n }\n\n return rootView;\n }", "H getProfile();", "public Profile getProfile(String id) {\r\n\t\tString uuid = id;\r\n\t\tSystem.out.println(\"MineshafterProfileClient.getProfile(\" + uuid + \")\");\r\n\t\tURL u;\r\n\t\ttry {\r\n\t\t\tu = new URL(API_URL + \"?uuid=\" + id);\r\n\r\n\t\t\tHttpsURLConnection conn = (HttpsURLConnection) u.openConnection();\r\n\r\n\t\t\tInputStream in = conn.getInputStream();\r\n\t\t\tString profileJSON = Streams.toString(in);\r\n\t\t\tStreams.close(in);\r\n\r\n\t\t\tSystem.out.println(\"MS API Response: \" + profileJSON);\r\n\r\n\t\t\tif (profileJSON == null || profileJSON.length() == 0) { return new Profile(); }\r\n\r\n\t\t\tJsonObject pj = JsonObject.readFrom(profileJSON);\r\n\r\n\t\t\tProfile p = new Profile(pj.get(\"username\").asString(), uuid);\r\n\t\t\tJsonValue skinVal = pj.get(\"skin\");\r\n\t\t\tJsonValue capeVal = pj.get(\"cape\");\r\n\t\t\tJsonValue modelVal = pj.get(\"model\");\r\n\r\n\t\t\tString url;\r\n\t\t\tif (skinVal != null && !skinVal.isNull() && !skinVal.asString().isEmpty()) {\r\n\t\t\t\turl = textureHandler.addSkin(uuid, skinVal.asString());\r\n\t\t\t\tp.setSkin(url);\r\n\t\t\t}\r\n\r\n\t\t\tif (capeVal != null && !capeVal.isNull() && !capeVal.asString().isEmpty()) {\r\n\t\t\t\turl = textureHandler.addCape(uuid, capeVal.asString());\r\n\t\t\t\tp.setCape(url);\r\n\t\t\t}\r\n\r\n\t\t\tif (modelVal != null && !modelVal.isNull()) {\r\n\t\t\t\tString model = modelVal.asString();\r\n\t\t\t\tif (model.equals(\"slim\")) {\r\n\t\t\t\t\tp.setModel(CharacterModel.SLIM);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tp.setModel(CharacterModel.CLASSIC);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn p;\r\n\t\t} catch (ParseException e) {\r\n\t\t\tSystem.out.println(\"Unable to parse getProfile response, using blank profile\");\r\n\t\t\treturn new Profile();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn new Profile();\r\n\t}", "private ProfileRestClient getProfileRestClient() {\n if (mProfileRestClient == null && mHsConfig != null) {\n mProfileRestClient = new ProfileRestClient(mHsConfig);\n }\n return mProfileRestClient;\n }", "@java.lang.Override\n public com.google.protobuf2.Any getProfile() {\n return profile_ == null ? com.google.protobuf2.Any.getDefaultInstance() : profile_;\n }", "private void RegisterGoogleSignup() {\n\n\t\ttry {\n\t\t\tLocalData data = new LocalData(SplashActivity.this);\n\n\t\t\tArrayList<String> asName = new ArrayList<String>();\n\t\t\tArrayList<String> asValue = new ArrayList<String>();\n\n\t\t\tasName.add(\"email\");\n\t\t\tasName.add(\"firstname\");\n\t\t\tasName.add(\"gender\");\n\t\t\tasName.add(\"id\");\n\t\t\tasName.add(\"lastname\");\n\t\t\tasName.add(\"name\");\n\t\t\t// asName.add(\"link\");\n\n\t\t\tasName.add(\"device_type\");\n\t\t\tasName.add(\"device_id\");\n\t\t\tasName.add(\"gcm_id\");\n\t\t\tasName.add(\"timezone\");\n\n\t\t\tasValue.add(data.GetS(LocalData.EMAIL));\n\t\t\tasValue.add(data.GetS(LocalData.FIRST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.GENDER));\n\t\t\tasValue.add(data.GetS(LocalData.ID));\n\t\t\tasValue.add(data.GetS(LocalData.LAST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.NAME));\n\t\t\t// asValue.add(data.GetS(LocalData.LINK));\n\n\t\t\tasValue.add(\"A\");\n\n\t\t\tString android_id = Secure\n\t\t\t\t\t.getString(SplashActivity.this.getContentResolver(),\n\t\t\t\t\t\t\tSecure.ANDROID_ID);\n\n\t\t\tasValue.add(android_id);\n\n\t\t\tLocalData data1 = new LocalData(SplashActivity.this);\n\t\t\tasValue.add(data1.GetS(\"gcmId\"));\n\t\t\tasValue.add(Main.GetTimeZone());\n\t\t\tString sURL = StringURLs.getQuery(StringURLs.GOOGLE_LOGIN, asName,\n\t\t\t\t\tasValue);\n\n\t\t\tConnectServer connectServer = new ConnectServer();\n\t\t\tconnectServer.setMode(ConnectServer.MODE_POST);\n\t\t\tconnectServer.setContext(SplashActivity.this);\n\t\t\tconnectServer.setListener(new ConnectServerListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onServerResponse(String sJSON, JSONObject jsonObject) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\tLog.d(\"JSON DATA\", sJSON);\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tif (sJSON.length() != 0) {\n\t\t\t\t\t\t\tJSONObject object = new JSONObject(sJSON);\n\t\t\t\t\t\t\tJSONObject response = object\n\t\t\t\t\t\t\t\t\t.getJSONObject(JSONStrings.JSON_RESPONSE);\n\t\t\t\t\t\t\tString sResult = response\n\t\t\t\t\t\t\t\t\t.getString(JSONStrings.JSON_SUCCESS);\n\n\t\t\t\t\t\t\tif (sResult.equalsIgnoreCase(\"1\") == true) {\n\n\t\t\t\t\t\t\t\tString user_id = response.getString(\"userid\");\n\n\t\t\t\t\t\t\t\tLocalData data = new LocalData(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this);\n\t\t\t\t\t\t\t\tdata.Update(\"userid\", user_id);\n\t\t\t\t\t\t\t\tdata.Update(\"name\", response.getString(\"name\"));\n\n\t\t\t\t\t\t\t\tGetNotificationCount();\n\n\t\t\t\t\t\t\t} else if (sResult.equalsIgnoreCase(\"0\") == true) {\n\n\t\t\t\t\t\t\t\tString msgcode = jsonObject.getJSONObject(\n\t\t\t\t\t\t\t\t\t\t\"response\").getString(\"msgcode\");\n\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, msgcode),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception exp) {\n\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconnectServer.execute(sURL);\n\n\t\t} catch (Exception exp) {\n\n\t\t\tToast.makeText(SplashActivity.this,\n\t\t\t\t\tMain.getStringResourceByName(SplashActivity.this, \"c100\"),\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t}\n\t}", "@Override\n public void onSuccess(LoginResult loginResult) {\n GraphRequest request = GraphRequest.newMeRequest(loginResult.getAccessToken(),\n new GraphRequest.GraphJSONObjectCallback() {\n @Override\n public void onCompleted(JSONObject object, GraphResponse response) {\n try{\n email = object.getString(\"email\");\n name = object.getString(\"name\");\n\n } catch (JSONException ex) {\n ex.printStackTrace();\n Log.e(\"error\",ex.getMessage());\n }\n CheckUserOnPArse();\n\n }\n });\n Bundle parameters = new Bundle();\n parameters.putString(\"fields\",\"id,name,email\");\n request.setParameters(parameters);\n request.executeAsync();\n }", "GistUser deserializeUserFromJson(String json);", "public UserInfo(GoogleSignInAccount acct) {\n if (acct != null) {\n name = acct.getDisplayName();\n givenName = acct.getGivenName();\n familyName = acct.getFamilyName();\n email = acct.getEmail();\n id = acct.getId();\n profilePhoto = acct.getPhotoUrl();\n }\n }", "private void attemptCreateAccountWithGoogle() {\n // Configure sign-in to request the user's ID, email address, and basic profile. ID and\n // basic profile are included in DEFAULT_SIGN_IN.\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n if (mGoogleApiClient == null) {\n // Build a GoogleApiClient with access to GoogleSignIn.API and the options above.\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this, this)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n }\n\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n if(Constants.mAuth==null){\n Constants.mAuth= FirebaseAuth.getInstance();\n Log.d(Constants.TAG,\"mAuth new Instance\");\n }\n Constants.mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(Constants.TAG, \"signInResult:google success\");\n Constants.user=Constants.mAuth.getCurrentUser();\n SharedPreferences sharedPreferences=getSharedPreferences(Constants.LoginSharedPref.SHARED_PREF_NAME,MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreferences.edit();\n editor.putBoolean(Constants.LoginSharedPref.PREVIOUSLY_STARTED,true);\n editor.putBoolean(Constants.LoginSharedPref.LOGGED_IN,true);\n String email=Constants.user.getEmail();\n String name=Constants.user.getDisplayName();\n Uri photoUrl=Constants.user.getPhotoUrl();\n editor.putString(Constants.LoginSharedPref.LOGIN_EMAIL,email);\n editor.putString(Constants.LoginSharedPref.LOGIN_URENAME,name);\n if(photoUrl!=null) {\n Log.d(Constants.TAG,\" Photo Url Extract: \"+photoUrl.toString());\n editor.putString(Constants.LoginSharedPref.PROFILE_URL, photoUrl.toString());\n }\n editor.putBoolean(Constants.LoginSharedPref.IS_EMAIL_VERIFIED,true);\n editor.commit();\n progressBar.setVisibility(View.GONE);\n contentHome.setVisibility(View.VISIBLE);\n Intent intent=new Intent(HomeActivity.this,MainActivity.class);\n startActivity(intent);\n finish();\n } else {\n // If sign in fails, display a message to the user.\n progressBar.setVisibility(View.GONE);\n contentHome.setVisibility(View.VISIBLE);\n Log.d(Constants.TAG, \"signInResult:google with firebase failure\", task.getException());\n Toast.makeText(HomeActivity.this, \"An error occured while signing in. Check your network connection \",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n }", "private void FirebaseGoogleAuth(GoogleSignInAccount acct) {\n if (acct != null) {\n AuthCredential authCredential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(authCredential).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Successful\", Toast.LENGTH_SHORT).show();\n FirebaseUser user = mAuth.getCurrentUser();\n\n updateUI(user);\n\n } else {\n Toast.makeText(MainActivity.this, \"Failed\", Toast.LENGTH_SHORT).show();\n updateUI(null);\n }\n }\n });\n }\n else{\n Toast.makeText(MainActivity.this, \"acc failed\", Toast.LENGTH_SHORT).show();\n }\n }", "public Profile searchProfile(String name) {\r\n\t\tSystem.out.println(\"MineshafterProfileClient.searchProfile(\" + name + \")\");\r\n\r\n\t\ttry {\r\n\t\t\tname = URLEncoder.encode(name, \"UTF-8\");\r\n\t\t\tURL u = new URL(API_URL + \"?username=\" + name);\r\n\t\t\tHttpsURLConnection conn = (HttpsURLConnection) u.openConnection();\r\n\r\n\t\t\tInputStream in = conn.getInputStream();\r\n\t\t\tString uuid = Util.ensureUUIDFormatted(Streams.toString(in));\r\n\t\t\tStreams.close(in);\r\n\r\n\t\t\tif (uuid == null || uuid.length() == 0) { return new Profile(name); }\r\n\r\n\t\t\treturn new Profile(name, uuid);\r\n\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn new Profile(name);\r\n\t}", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mFirebaseAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser user = mFirebaseAuth.getCurrentUser();\n //Toast.makeText(SignInActivity.this, R.string.sign_in_successful, Toast.LENGTH_SHORT).show();\n hideSignInWithGoogleLoadingIndicator();\n returnToCallingActivity();\n } else {\n // If sign in fails, display a message to the user.\n Log.w(DEBUG_TAG, \"signInWithCredential:failure\", task.getException());\n Toast.makeText(SignInActivity.this, R.string.failed_to_sign_in_with_credentials, Toast.LENGTH_SHORT).show();\n //Snackbar.make(findViewById(R.id.main_layout), \"Authentication Failed.\", Snackbar.LENGTH_SHORT).show();\n }\n }\n });\n }", "public void getResultsFromApi() {\n if (! isGooglePlayServicesAvailable()) {\n acquireGooglePlayServices();\n } else if (mCredential.getSelectedAccountName() == null) {\n mFragment.chooseAccount();\n } else if (! isDeviceOnline()) {\n // mOutputText.setText(\"No network connection available.\");\n } else if (mService == null){\n Log.d(Util.TAG_GOOGLE, mCredential.getSelectedAccountName());\n HttpTransport transport = AndroidHttp.newCompatibleTransport();\n JsonFactory jsonFactory = JacksonFactory.getDefaultInstance();\n mService = new com.google.api.services.gmail.Gmail.Builder(\n transport, jsonFactory, mCredential)\n .setApplicationName(\"Gmail API Android Quickstart\")\n .build();\n mFragment.readEmails();\n }\n }", "public java.lang.String getProfileURL() {\n java.lang.Object ref = profileURL_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n profileURL_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "People getUser();", "@WebMethod(action=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/getUserProfile\",\n operationName=\"getUserProfile\")\n @RequestWrapper(targetNamespace=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/types/\",\n localName=\"getUserProfile\")\n @ResponseWrapper(targetNamespace=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/types/\",\n localName=\"getUserProfileResponse\")\n @WebResult(name=\"result\")\n @CallbackMethod(exclude=true)\n String getUserProfile(@WebParam(mode = WebParam.Mode.IN, name=\"profileInformation\")\n String profileInformation) throws ServiceException;", "@RequestMapping(value = \"/getUserProfileDetails\", method = RequestMethod.GET, produces = \"application/json\")\n\t@ResponseBody\n\tpublic GetUserProfileResponse getUserProfileDetails(@RequestParam String emailId) {\n \tGetUserProfileResponse getUserProfileDetails = null;\n\t\ttry {\n\t\t\t\n\t\t\tgetUserProfileDetails = this.econnectService.getUserProfileDetails(emailId);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn getUserProfileDetails;\n\t}", "@java.lang.Override\n public com.google.protobuf.StringValue getProfilePictureUrl() {\n return profilePictureUrl_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : profilePictureUrl_;\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n\n user.put(KEY_USER_ID, pref.getString(KEY_USER_ID, null));\n user.put(KEY_AUTH_TOKEN, pref.getString(KEY_AUTH_TOKEN, null));\n user.put(KEY_USER_NAME, pref.getString(KEY_USER_NAME, \"\"));\n user.put(KEY_USER_EMAIL, pref.getString(KEY_USER_EMAIL, null));\n user.put(KEY_USER_MOBILE, pref.getString(KEY_USER_MOBILE, null));\n user.put(KEY_USER_ADDRESS, pref.getString(KEY_USER_ADDRESS, null));\n user.put(KEY_USER_IMAGE, pref.getString(KEY_USER_IMAGE, null));\n user.put(KEY_USER_STRIPE_ID, pref.getString(KEY_USER_STRIPE_ID, null));\n user.put(KEY_REFFERAL_CODE, pref.getString(KEY_REFFERAL_CODE, \"\"));\n user.put(KEY_REFFERAL_LINK, pref.getString(KEY_REFFERAL_LINK, \"\"));\n user.put(KEY_USER_PASSWORD, pref.getString(KEY_USER_PASSWORD, \"\"));\n // return user\n return user;\n }", "UserDTO getProfile(final int userId) throws DataUnreachableException;", "private GoogleCredential getGoogleCredential(String userId) {\t\t\n\t\t\n\t\ttry { \n\t\t\t// get the service account e-mail address and service account private key from property file\n\t\t\t// this email account and key file are specific for your environment\n\t\t\tif (SERVICE_ACCOUNT_EMAIL == null) {\n\t\t\t\tSERVICE_ACCOUNT_EMAIL = m_serverConfigurationService.getString(\"google.service.account.email\", \"\");\n\t\t\t}\n\t\t\tif (PRIVATE_KEY == null) {\n\t\t\t\tPRIVATE_KEY = m_serverConfigurationService.getString(\"google.private.key\", \"\");\n\t\t\t}\n\t\t\t\n\t\t\tGoogleCredential credential = getCredentialFromCredentialCache(userId);\n\t\t\treturn credential;\n\n\t\t} catch (Exception e) {\n\t\t\t// return null if an exception occurs while communicating with Google.\n\t\t\tM_log.error(\"Error creating a GoogleCredential object or requesting access token: \" + userId + \" \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "public static URL getUrlForProfileSync(){\r\n\t\tString strUrl = getBaseURL() + \"mip_services/core/api/1.0/profile/enhanced\";\r\n\t\treturn str2url(strUrl);\r\n\t}", "public static com.sawdust.gae.logic.User getUser(final HttpServletRequest request, final HttpServletResponse response, final AccessToken accessData)\r\n {\n if (null != response)\r\n {\r\n setP3P(response); // Just always set this...\r\n }\r\n\r\n com.sawdust.gae.logic.User user = null;\r\n\r\n if (null == user)\r\n {\r\n try\r\n {\r\n LOG.finer(String.format(\"Attempting google authorization...\"));\r\n user = getUser_Google(request, accessData, user);\r\n }\r\n catch (final Throwable e)\r\n {\r\n \tLOG.warning(Util.getFullString(e));\r\n }\r\n }\r\n\r\n if (null == user)\r\n {\r\n try\r\n {\r\n LOG.finer(String.format(\"Attempting facebook authorization...\"));\r\n user = getUser_Facebook(request, user);\r\n }\r\n catch (final Throwable e)\r\n {\r\n \tLOG.warning(Util.getFullString(e));\r\n }\r\n }\r\n\r\n if (null == user)\r\n {\r\n try\r\n {\r\n LOG.finer(String.format(\"Attempting signed-cookie authorization...\"));\r\n user = getUser_Cookied(request, user);\r\n }\r\n catch (final Throwable e)\r\n {\r\n \tLOG.warning(Util.getFullString(e));\r\n }\r\n }\r\n\r\n if (null == user)\r\n {\r\n LOG.finer(String.format(\"Using guest authorization...\"));\r\n final String email = getGuestId(request, response);\r\n if (null == email) \r\n {\r\n return null;\r\n }\r\n user = new com.sawdust.gae.logic.User(UserTypes.Guest, email, null);\r\n }\r\n LOG.fine(String.format(\"User is %s\", user.getId()));\r\n if (user.getUserID().endsWith(\"facebook.null\"))\r\n {\r\n user.setSite(\"http://apps.facebook.com/sawdust-games/\");\r\n }\r\n else if (user.getUserID().endsWith(\"facebook.beta\"))\r\n {\r\n user.setSite(\"http://apps.facebook.com/sawdust-games-beta/\");\r\n }\r\n return user;\r\n }", "public java.lang.String getProfileURL() {\n java.lang.Object ref = profileURL_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n profileURL_ = s;\n return s;\n }\n }", "public static PrivateUser loadUser() {\n SharedPreferences preferences = getSharedPrefs();\n String jsonUser = preferences.getString(USER_PREF, null);\n PrivateUser user = null;\n\n if (jsonUser != null) {\n user = new Gson().fromJson(jsonUser, PrivateUser.class);\n }\n\n return user;\n }", "private static String getVerificationJsonResult(String username, WdkModel wdkModel) throws WdkModelException {\n try {\n JSONObject result = new JSONObject();\n boolean isValid = (username != null);\n if (isValid) {\n // cookie seems valid; try to get user's name and email\n User user = wdkModel.getUserFactory().getUserByEmail(username);\n if (user == null) {\n // user does not exist; cookie is invalid\n isValid = false;\n }\n else {\n result\n .put(USER_DATA_KEY, new JSONObject()\n .put(USER_ID_KEY, user.getUserId())\n .put(DISPLAY_NAME_KEY, user.getDisplayName())\n .put(EMAIL_KEY, user.getEmail()));\n isValid = true;\n }\n }\n return result.put(IS_VALID_KEY, isValid).toString();\n }\n catch (JSONException e) {\n throw new WdkModelException(\"Unable to generate JSON object from data.\", e);\n }\n }", "public UserProfile getUserProfile() {return userProfile;}", "public String getUserInfoJson(final String authCode) throws IOException,\n\t\t\tJSONException {\n\t\tCredential credential = getUsercredential(authCode);\n\t\tfinal HttpRequestFactory requestFactory = HTTP_TRANSPORT\n\t\t\t\t.createRequestFactory(credential);\n\t\tfinal GenericUrl url = new GenericUrl(USER_INFO_URL);\n\t\tfinal HttpRequest request = requestFactory.buildGetRequest(url);\n\t\trequest.getHeaders().setContentType(\"application/json\");\n\t\tString jsonIdentity = request.execute().parseAsString();\n\t\t\n\t\treturn jsonIdentity;\n\n\t}", "public String getProfile() {\n return profile;\n }", "@java.lang.Override\n public com.google.protobuf2.AnyOrBuilder getProfileOrBuilder() {\n return getProfile();\n }", "public static ExternalUserProfile read(String username, JSONObject jsonObject) throws JSONException {\n if (jsonObject.has(JSONKeys.FIRST_NAME) && jsonObject.has(JSONKeys.LAST_NAME) &&\n jsonObject.has(JSONKeys.DESCRIPTION)) {\n String email = \"\";\n if (jsonObject.has(JSONKeys.EMAIL)) {\n email = jsonObject.getString(JSONKeys.EMAIL);\n }\n\n return new ExternalUserProfile(\n username,\n jsonObject.getString(JSONKeys.FIRST_NAME),\n jsonObject.getString(JSONKeys.LAST_NAME),\n email,\n jsonObject.getString(JSONKeys.DESCRIPTION)\n );\n } else {\n return null;\n }\n }", "java.lang.String getProfileImage();", "public GoogleUser(Social social, Person person, Integer sessionTimeoutInSec) {\n super(\"Google\", social, person, sessionTimeoutInSec);\n }", "GmailClient getGmailClient(Credential credential);", "public synchronized String getUserJSON(String uID) {\n YelpUser u = this.userMap.get(uID);\n if (u == null) {\n return \"ERR: NO_SUCH_USER\";\n } else {\n return gson.toJson(u);\n }\n }", "public static void retrieveActiveUser(final Context context){\n FirebaseFirestore firebaseFirestore = FirebaseFirestore.getInstance();\n\n /* Return all users */\n firebaseFirestore.collection(\"users\")\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n /* For each user */\n for (QueryDocumentSnapshot document : task.getResult()) {\n /* Get user data */\n Map<String, Object> userData = document.getData();\n\n /* If the correct user */\n // Update not to pull every user back\n if (MainActivity.activeUser.email.toLowerCase().equals(userData.get(\"email\").toString().toLowerCase())) {\n /* Retrieve active users information */\n\n MainActivity.activeUser.email = document.get(\"email\").toString();\n MainActivity.activeUser.username = document.get(\"username\").toString();\n MainActivity.activeUser.password = document.get(\"password\").toString();\n MainActivity.activeUser.profilePictureURL = document.get(\"imageUrl\").toString();\n\n\n\n break;\n }\n }\n } else {\n Toast.makeText(context.getApplicationContext(), \"Firestore retireval failed\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n Log.d(TAG, \"firebaseAuthWithGoogle:\" + acct.getId());\n // [START_EXCLUDE silent]\n// showProgressDialog();\n // [END_EXCLUDE]\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(TAG, \"signInWithCredential:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n Toast.makeText(current,\"Sign \"+user.getEmail(),Toast.LENGTH_LONG).show();\n\n updateUI(user);\n updateCurrentUser(user);\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n Toast.makeText(current,\"Failed\"+task.getException().toString(),Toast.LENGTH_LONG).show();\n updateUI(null);\n }\n\n // [START_EXCLUDE]\n// hideProgressDialog();\n // [END_EXCLUDE]\n }\n });\n }", "private void getProfile(String username) {\n if (new AppCommonMethods(mContext).isNetworkAvailable()) {\n WLAPIcalls mAPIcall = new WLAPIcalls(mContext, getString(R.string.getProfile), this);\n mAPIcall.getProfile(username);\n } else {\n Toast.makeText(mContext, R.string.no_internet, Toast.LENGTH_SHORT).show();\n }\n }", "public User getPrefsUser() {\n Gson gson = new Gson();\n String json = prefs.getString(USER_PREFS, \"\");\n return gson.fromJson(json, User.class);\n }", "private void getProfileInfo() {\n boolean connectivity=checkConnection();\n if(connectivity){\n progressBar.setVisibility(View.VISIBLE);\n assert currentUser != null;\n String userid = currentUser.getUid();\n databaseReference.child(userid).addValueEventListener(new ValueEventListener() {\n @SuppressLint(\"SetTextI18n\")\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n @SuppressLint({\"NewApi\", \"LocalSuppress\"}) String name = Objects.requireNonNull(dataSnapshot.child(\"name\").getValue()).toString();\n @SuppressLint({\"NewApi\", \"LocalSuppress\"}) String number = Objects.requireNonNull(dataSnapshot.child(\"number\").getValue()).toString();\n String email = currentUser.getEmail();\n Name.setText(name);\n Number.setText(\"+92\" + number);\n Email.setText(email);\n progressBar.setVisibility(View.GONE);\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }\n else{\n Toast.makeText(getContext(), \"No Internet Connectivity!\", Toast.LENGTH_SHORT).show();\n }\n\n\n }", "public void getGoogleToken() {\n String googleEmail = sharedpreferences.getString(\"GoogleEmail\", \"\");\n String scopes = sharedpreferences.getString(\"GoogleScopes\", \"\");\n if (!\"\".equals(googleEmail)) {\n MyAsyncTask asyncTask = new MyAsyncTask(googleEmail, scopes, this.getBaseContext());\n asyncTask.delegate = this;\n asyncTask.execute();\n }\n }", "public User getById(String id){\n List<User> users = userRepo.findAll();\n for (User user : users){\n if(user.getGoogleId().equals(id)){\n return user;\n }\n }\n throw new UserNotFoundException(\"\");\n }", "@java.lang.Override\n public com.google.protobuf.StringValueOrBuilder getProfilePictureUrlOrBuilder() {\n return getProfilePictureUrl();\n }", "JSONObject getCurrentUser(String email){\n dbConnection();\n JSONObject userDetails = new JSONObject();\n JSONArray detailsInarray = new JSONArray();\n boolean checkEmail = checkEmailExist(email);\n if(checkEmail){\n try{\n stmt = con.prepareStatement(\"SELECT * FROM users WHERE email =?\");\n stmt.setString(1,email);\n rs = stmt.executeQuery();\n while(rs.next()){\n JSONObject userData = new JSONObject();\n userData.put(\"id\",rs.getInt(1));\n userData.put(\"name\",rs.getString(2));\n userData.put(\"email\",rs.getString(3));\n userData.put(\"userStatus\",rs.getBoolean(5));\n detailsInarray.add(userData);\n }\n userDetails.put(\"user\",detailsInarray);\n }\n catch(Exception e){\n e.printStackTrace();\n }\n finally{\n closeConnection();\n }\n }\n return userDetails;\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n //Log.d(TAG, \"signInWithCredential:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n mGoogleSignInClient.signOut();\n updateUI(user);\n } else {\n // If sign in fails, display a message to the user.\n //Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n //Snackbar.make(findViewById(R.id.main_layout), \"Authentication Failed.\", Snackbar.LENGTH_SHORT).show();\n updateUI(null);\n }\n\n // ...\n }\n });\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n // user name\n\n user.put(KEY_ID, pref.getString(KEY_ID, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n return user;\n }", "public HashMap<String, String> getUserDetails()\n {\n HashMap<String, String> user = new HashMap<>();\n\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_PHONE, pref.getString(KEY_PHONE, null));\n\n return user;\n }", "@Override\n\tpublic Profile getProfile(Users user) {\n\t\treturn null;\n\t}", "private void lookupUserAccount() {\n String userId = tokens.getString(\"principalID\", \"\");\n String accessToken = tokens.getString(\"authorisationToken\", \"\");\n\n if (!\"\".equals(userId) && !\"\".equals(accessToken)) {\n // Make new json request\n String url = String.format(Constants.APIUrls.lookupUserAccount, userId);\n JsonRequest jsonRequest = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n String email;\n try {\n email = response.getString(\"email\");\n } catch (JSONException ex){\n email = \"unknown\";\n }\n String name;\n try{\n JSONObject nameObject = response.getJSONObject(\"name\");\n String firstName = nameObject.getString(\"givenName\");\n String lastName = nameObject.getString(\"familyName\");\n name = firstName + \" \" + lastName;\n } catch (JSONException ex){\n name = \"unknown\";\n }\n Boolean accountBlocked;\n try{\n JSONObject accountInfo = response.getJSONObject(\"urn:mace:oclc.org:eidm:schema:persona:wmscircselfinfo:20180101\").getJSONObject(\"circulationInfo\");\n accountBlocked = accountInfo.getBoolean(\"isCircBlocked\");\n } catch (JSONException ex){\n ex.printStackTrace();\n accountBlocked = true;\n }\n String borrowerCategory;\n try {\n JSONObject accountInfo = response.getJSONObject(\"urn:mace:oclc.org:eidm:schema:persona:wmscircselfinfo:20180101\").getJSONObject(\"circulationInfo\");\n borrowerCategory = accountInfo.getString(\"borrowerCategory\");\n } catch (JSONException ex){\n borrowerCategory = \"\";\n }\n String userBarcode;\n try {\n JSONObject accountInfo = response.getJSONObject(\"urn:mace:oclc.org:eidm:schema:persona:wmscircselfinfo:20180101\").getJSONObject(\"circulationInfo\");\n userBarcode = accountInfo.getString(\"barcode\");\n } catch (JSONException ex){\n userBarcode = \"\";\n }\n tokens.edit().putString(\"name\", name).apply();\n tokens.edit().putString(\"email\", email).apply();\n tokens.edit().putBoolean(\"accountBlocked\", accountBlocked).apply();\n tokens.edit().putString(\"borrowerCategory\", borrowerCategory).apply();\n tokens.edit().putString(\"userBarcode\", userBarcode).apply();\n sendBroadcast(new Intent(Constants.IntentActions.LOOKUP_USER_ACCOUNT_RESPONSE));\n LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(new Intent(Constants.IntentActions.LOOKUP_USER_ACCOUNT_RESPONSE));\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n sendBroadcast(new Intent(Constants.IntentActions.LOOKUP_USER_ACCOUNT_ERROR));\n }\n }\n ){\n @Override\n public Map<String, String> getHeaders() {\n Map<String, String> headers = new HashMap<>();\n headers.put(\"Authorization\", accessToken);\n return headers;\n }\n };\n\n requestQueue.add(jsonRequest);\n\n\n Log.e(TAG, \"user response sent\");\n }\n\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n Log.d(LGN, \"Resultado de Solicitud\");\n super.onActivityResult(requestCode, resultCode, data);\n try {\n Log.d(LGN, \"onActivityResult: \" + requestCode);\n if (requestCode == GOOGLE_SIGNIN_REQUEST) {\n Log.d(LGN, \"Respuesta de Google\");\n GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);\n Log.d(LGN, result.getStatus() + \"\");\n Log.d(LGN, resultCode + \"\");\n Log.d(LGN, data + \"\");\n if (result.isSuccess()) {\n Log.d(LGN, \"Respuesta Buena\");\n GoogleSignInAccount user = result.getSignInAccount();\n AuthCredential credential = GoogleAuthProvider.getCredential(user.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(LGN, \"Login con Google correcta: \" + task.isSuccessful());\n if (task.isSuccessful()) {\n isNew = task.getResult().getAdditionalUserInfo().isNewUser();\n Log.d(LGN, \"Antiguedad: \" + (isNew ? \"Nuevo\" : \"Antiguo\"));\n if (isNew) {\n Log.d(LGN, \"Es nuevo\");\n FirebaseUser currentUser = FirebaseAuth.getInstance().getCurrentUser();\n uid = currentUser.getUid();\n\n for (UserInfo profile : currentUser.getProviderData()) {\n correo = profile.getEmail();\n }\n\n Usuario usuario = new Usuario();\n usuario.setNombre(currentUser.getDisplayName());\n usuario.setCorreo(correo);\n usuario.setExp(0);\n usuario.setMonedas(0);\n usuario.setAvatar(currentUser.getPhotoUrl() != null ? currentUser.getPhotoUrl().toString() : null);\n\n DatabaseReference usuarioData = FirebaseDatabase.getInstance().getReference(\"usuario\");\n usuarioData.child(currentUser.getUid()).setValue(usuario)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n createColecciones(uid);\n Log.d(LGN, \"Usuario con Google Creado\");\n Toast.makeText(LoginActivity.this, \"Usuario Creado\", Toast.LENGTH_SHORT).show();\n } else {\n Log.d(LGN, \"Error en la creacion\");\n Log.e(LGN, \"onFailure\", task.getException());\n }\n }\n });\n\n /* Intent home = new Intent(LoginActivity.this, AvatarActivity.class);\n startActivity(home);\n finish();*/\n\n } else {\n Log.d(LGN, \"Es antiguo\");\n }\n } else {\n loginPanel.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n Log.e(LGN, \"Login con Google incorrecta:\", task.getException());\n Toast.makeText(LoginActivity.this, \"Autenticacion Fallida.\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n } else {\n loginPanel.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n Log.e(LGN, \"Sesion con Google Errada!\");\n }\n } else if (FACEBOOK_SIGNIN_REQUEST == requestCode) {\n Log.d(LGN, \"Respuesta de Facebook\");\n mCallbackManager.onActivityResult(requestCode, resultCode, data);\n }\n } catch (Throwable t) {\n try {\n loginPanel.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n Log.e(TAG, \"onThrowable: \" + t.getMessage(), t);\n if (getApplication() != null)\n Toast.makeText(getApplication(), t.getMessage(), Toast.LENGTH_LONG).show();\n } catch (Throwable x) {\n }\n }\n }", "public UserModel getUserProfile(){\n\n UserAPI userAPI = RetrofitUrl.getInstance().create(UserAPI.class);\n Call<UserModel> usersCall = userAPI.getUserProfile(RetrofitUrl.token);\n\n usersCall.enqueue(new Callback<UserModel>() {\n @Override\n public void onResponse(Call<UserModel> call, Response<UserModel> response) {\n if(!response.isSuccessful()){\n Toast.makeText(MainActivity.this, \"Error loading profile!!\", Toast.LENGTH_SHORT).show();\n return;\n }\n userProfile = response.body();\n showdetail(userProfile.getFullName());\n getBalanceDetail(userProfile);\n refresh(5000);\n }\n\n @Override\n public void onFailure(Call<UserModel> call, Throwable t) {\n Toast.makeText(MainActivity.this, \"Error loading profile...\", Toast.LENGTH_SHORT).show();\n\n }\n });\n return userProfile;\n }" ]
[ "0.7288774", "0.6695322", "0.6596452", "0.6556254", "0.65394515", "0.65353024", "0.6426097", "0.62844825", "0.6039052", "0.6005875", "0.59840655", "0.5953133", "0.59351087", "0.59259343", "0.5921276", "0.5920721", "0.58984756", "0.5886306", "0.5849489", "0.58088535", "0.57978374", "0.5772534", "0.57722926", "0.5768956", "0.57414424", "0.57370013", "0.57337993", "0.57151866", "0.5708473", "0.5680643", "0.5665627", "0.56148547", "0.5607998", "0.5602686", "0.5600821", "0.5567476", "0.554189", "0.5537728", "0.5528886", "0.55173606", "0.551141", "0.5493741", "0.5480202", "0.54478234", "0.5441812", "0.544018", "0.54013896", "0.5395421", "0.5393399", "0.53912705", "0.53499395", "0.5346242", "0.5342712", "0.5335195", "0.53237283", "0.53058964", "0.5304557", "0.53023624", "0.5294557", "0.52853876", "0.5285283", "0.52843076", "0.5283191", "0.5279684", "0.5272578", "0.5267494", "0.5267182", "0.5264643", "0.5259756", "0.5240657", "0.52363306", "0.52341604", "0.5229726", "0.5215272", "0.52149755", "0.52148706", "0.5204425", "0.5202122", "0.5198199", "0.518023", "0.5178904", "0.51749086", "0.51724154", "0.51677114", "0.51625633", "0.51623344", "0.51554203", "0.51507914", "0.51499474", "0.5149486", "0.51476574", "0.5146817", "0.514001", "0.51313466", "0.5129434", "0.51241755", "0.5123493", "0.5117432", "0.51152235", "0.5114578" ]
0.53731257
50
gets the users google profile with a valid google auth code and returns it in a json object
public String getUserInfoJson(final String authCode) throws IOException, JSONException { Credential credential = getUsercredential(authCode); final HttpRequestFactory requestFactory = HTTP_TRANSPORT .createRequestFactory(credential); final GenericUrl url = new GenericUrl(USER_INFO_URL); final HttpRequest request = requestFactory.buildGetRequest(url); request.getHeaders().setContentType("application/json"); String jsonIdentity = request.execute().parseAsString(); return jsonIdentity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String RetrieveGoogleSignInProfile(){\n String personName;\n acct = GoogleSignIn.getLastSignedInAccount(ChooseService.this);\n if (acct != null) {\n personName = acct.getDisplayName();\n /*String personGivenName = acct.getGivenName();\n String personFamilyName = acct.getFamilyName();\n String personEmail = acct.getEmail();\n String personId = acct.getId();\n Uri personPhoto = acct.getPhotoUrl();*/\n }else{\n personName = null;\n }\n return personName;\n }", "Map<String, Object> getUserProfile();", "public User getUserInfoJson(final String accessToken) throws IOException {\n\t\tfinal GoogleCredential credential = new GoogleCredential.Builder()\n\t\t\t\t.setJsonFactory(JSON_FACTORY).build()\n\t\t\t\t.setAccessToken(accessToken);\n\t\t\n\t\tfinal HttpRequestFactory requestFactory = HTTP_TRANSPORT.createRequestFactory(credential);\n//\t\tfinal HttpRequestFactory requestFactory = HTTP_TRANSPORT.createRequestFactory(request -> {\n//\t\t\trequest.setParser(new JsonObjectParser(JSON_FACTORY));\n//\t\t});\n\n\t\t// Make an authenticated request - to google+ API user profile\n\t\tfinal GenericUrl url = new GenericUrl(USER_INFO_URL);\n\t\tfinal HttpRequest request = requestFactory.buildGetRequest(url);\n\t\t\n\t\trequest.getHeaders().setContentType(\"application/json\");\n\t\tfinal String rawResponse = request.execute().parseAsString();\n//\t\tSystem.out.println(rawResponse);\n\t\t\n\t //final User user = (User) request.execute().parseAs(User.class);\n\t\t\n\t\treturn JSON_FACTORY.fromString(rawResponse, User.class);\n\t}", "private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n String id = currentPerson.getId();\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.e(TAG, \"Id: \"+id+\", Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n signInTask = new AsyncTask(mBaseActivity);\n signInTask.execute(id, email, personName);\n// SharedPreferences preferences = mBaseActivity.getSharedPreferences(\"com.yathams.loginsystem\", MODE_PRIVATE);\n// preferences.edit().putString(\"email\", email).putString(\"userName\", personName).commit();\n\n } else {\n Toast.makeText(getApplicationContext(),\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.e(TAG, \"Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n\n Toast.makeText(context, personName + \"\\n\" + email, Toast.LENGTH_SHORT).show();\n\n /*txtName.setText(personName);\n txtEmail.setText(email);*/\n\n // by default the profile url gives 50x50 px image only\n // we can replace the value with whatever dimension we want by\n // replacing sz=X\n /*personPhotoUrl = personPhotoUrl.substring(0,\n personPhotoUrl.length() - 2)\n + PROFILE_PIC_SIZE;\n\n new LoadProfileImage(imgProfilePic).execute(personPhotoUrl);*/\n\n } else {\n Toast.makeText(context,\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi.getCurrentPerson(mGoogleApiClient);\n String personId = currentPerson.getId();\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n\n String personBirthday = currentPerson.getBirthday();\n int personGender = currentPerson.getGender();\n String personNickname = currentPerson.getNickname();\n\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.i(TAG, \"Id: \" + personId + \", Name: \" + personName + \", plusProfile: \" + personGooglePlusProfile + \", email: \" + email + \", Image: \" + personPhotoUrl + \", Birthday: \" + personBirthday + \", Gender: \" + personGender + \", Nickname: \" + personNickname);\n\n // by default the profile url gives\n // 50x50 px\n // image only\n // we can replace the value with\n // whatever\n // dimension we want by\n // replacing sz=X\n personPhotoUrl = personPhotoUrl.substring(0, personPhotoUrl.length() - 2) + PROFILE_PIC_SIZE;\n\n Log.e(TAG, \"PhotoUrl : \" + personPhotoUrl);\n\n Log.i(TAG, \"Finally Set UserData\");\n Log.i(TAG, \"account : \" + email + \", Social_Id : \" + personId);\n\n StringBuffer sb = new StringBuffer();\n sb.append(\"Id : \").append(personId).append(\"\\n\");\n sb.append(\"Name : \").append(personName).append(\"\\n\");\n sb.append(\"plusProfile : \").append(personGooglePlusProfile).append(\"\\n\");\n sb.append(\"Email : \").append(email).append(\"\\n\");\n sb.append(\"PhotoUrl : \").append(personPhotoUrl).append(\"\\n\");\n sb.append(\"Birthday : \").append(personBirthday).append(\"\\n\");\n sb.append(\"Gender : \").append(personGender).append(\"\\n\");\n sb.append(\"Nickname : \").append(personNickname).append(\"\\n\");\n\n tv_info.setText(sb.toString());\n\n signOutFromGplus();\n\n /** set Google User Data **/\n RegisterData.name = personName;\n RegisterData.email = email;\n RegisterData.password = \"\";\n RegisterData.source = \"google\";\n RegisterData.image = personPhotoUrl;\n\n new UserLoginAsyncTask().execute();\n } else {\n Toast.makeText(mContext, \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = null;\n if(currentPerson.getImage().getUrl() != null){\n \tpersonPhotoUrl = currentPerson.getImage().getUrl();\n }else{\n \tpersonPhotoUrl = \"\";\n }\n String personGooglePlusProfile = currentPerson.getUrl();\n String gplusemail = Plus.AccountApi.getAccountName(mGoogleApiClient);\n \n Log.e(TAG, \"Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n \n user_id = currentPerson.getId();\n profile_image = personPhotoUrl;\n profile_url = personGooglePlusProfile;\n name = personName;\n this.email = gplusemail;\n \n /* txtName.setText(personName);\n txtEmail.setText(email);*/\n \n // by default the profile url gives 50x50 px image only\n // we can replace the value with whatever dimension we want by\n // replacing sz=X\n personPhotoUrl = personPhotoUrl.substring(0,\n personPhotoUrl.length() - 2)\n + PROFILE_PIC_SIZE;\n \n // new LoadProfileImage(imgProfilePic).execute(personPhotoUrl);\n \n Thread t = new Thread()\n\t\t\t\t{\n\t\t\t\t\tpublic void run()\n\t\t\t\t\t{\n\t\t\t\t\t\tJSONObject obj = new JSONObject();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tobj.put(\"uid\", user_id);\n\t\t\t\t\t\t\tobj.put(\"email\", email);\n\t\t\t\t\t\t\tobj.put(\"profile_url\", profile_url);\n\t\t\t\t\t\t\tobj.put(\"name\", name);\n\t\t\t\t\t\t\tobj.put(\"profile_image\", profile_image);\n\t\t\t\t\t\t\tobj.put(\"type\", \"google\");\n\t\t\t\t\t\t\tobj.put(\"device_id\", app.getDeviceInfo().device_id);\n\t\t\t\t\t\t\tobj.put(\"device_type\", \"android\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString response = HttpClient.getInstance(getApplicationContext()).SendHttpPost(Constant.SOCIAL_LOGIN, obj.toString());\n\t\t\t\t\t\t\tif(response != null){\n\t\t\t\t\t\t\t\tJSONObject ob = new JSONObject(response);\n\t\t\t\t\t\t\t\tif(ob.getBoolean(\"status\")){\n\t\t\t\t\t\t\t\t\tString first_name = ob.getString(\"first_name\");\n\t\t\t\t\t\t\t\t\tString last_name = ob.getString(\"last_name\");\n\t\t\t\t\t\t\t\t\tString user_id = ob.getString(\"user_id\");\n\t\t\t\t\t\t\t\t\tString reservation_type = ob.getString(\"reservation_type\");\n\t\t\t\t\t\t\t\t\tboolean checkin_status = ob.getBoolean(\"checkin_status\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tString rev_id = null,reservation_code = null;\n\t\t\t\t\t\t\t\t\tJSONArray object = ob.getJSONArray(\"reservation_detail\");\n\t\t\t\t\t\t\t\t\tfor(int i = 0;i<object.length();i++){\n\t\t\t\t\t\t\t\t\t\trev_id = object.getJSONObject(i).getString(\"reservation_id\");\n\t\t\t\t\t\t\t\t\t\treservation_code = object.getJSONObject(i).getString(\"reservation_code\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tapp.getUserInfo().SetUserInfo(first_name,\n\t\t\t\t\t\t\t\t\t\t\tlast_name,\n\t\t\t\t\t\t\t\t\t\t\tuser_id,\n\t\t\t\t\t\t\t\t\t\t\trev_id,\n\t\t\t\t\t\t\t\t\t\t\treservation_code,\n\t\t\t\t\t\t\t\t\t\t\treservation_type,\n\t\t\t\t\t\t\t\t\t\t\tcheckin_status);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tapp.getLogininfo().setLoginInfo(true);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tUpdateUiResult(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\tt.start();\n \n } else {\n Toast.makeText(getApplicationContext(),\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "java.lang.String getProfileURL();", "String getProfile();", "@Test\n public void getGoogleAuthUrlTest() throws ApiException {\n InlineResponse2002 response = api.getGoogleAuthUrl();\n\n // TODO: test validations\n }", "private void getUserDetailsFromFB() {\n Bundle parameters = new Bundle();\n parameters.putString(\"fields\", \"email,name,picture,first_name,last_name,gender,timezone,verified\");\n new GraphRequest(\n AccessToken.getCurrentAccessToken(),\n \"/me\",\n parameters,\n HttpMethod.GET,\n new GraphRequest.Callback() {\n @Override\n public void onCompleted(GraphResponse response) {\n //Handle the result here\n try {\n email = response.getJSONObject().getString(\"email\");\n name = response.getJSONObject().getString(\"name\");\n timezone = response.getJSONObject().getString(\"timezone\");\n firstName = response.getJSONObject().getString(\"first_name\");\n lastName = response.getJSONObject().getString(\"last_name\");\n gender = response.getJSONObject().getString(\"gender\");\n isVerified = response.getJSONObject().getBoolean(\"verified\");\n\n JSONObject picture = response.getJSONObject().getJSONObject(\"picture\");\n JSONObject data = picture.getJSONObject(\"data\");\n\n //get the 50X50 profile pic they send us\n String pictureURL = data.getString(\"url\");\n\n new ProfilePicAsync(pictureURL,1).execute();\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }\n ).executeAsync();\n }", "void getProfile(@NonNull final String profileId, @Nullable Callback<ComapiResult<Map<String, Object>>> callback);", "public void getProfileInformation() {\n\n\t\t mAsyncRunner.request(\"me\", new RequestListener() {\n\t\t\t @Override\n\t\t\t public void onComplete(String response, Object state) {\n\t\t\t\t Log.d(\"Profile\", response);\n\t\t\t\t String json = response;\n\t\t\t\t try {\n\t\t\t\t\t // Facebook Profile JSON data\n\t\t\t\t\t JSONObject profile = new JSONObject(json);\n\n\t\t\t\t\t uName = profile.getString(\"name\");\n\t\t\t\t\t uMail = profile.getString(\"email\");\n\t\t\t\t\t //uGender=profile.getString(\"gender\");\n\n\n\t\t\t\t\t //final String birthday=profile.getString(\"birthday\");\n\t\t\t\t\t runOnUiThread(new Runnable() {\n\t\t\t\t\t\t @Override\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\t //Toast.makeText(getApplicationContext(), \"Name: \" + name + \"\\nEmail: \" + email+\"\\nGender: \"+gender, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t getResponse();\n\t\t\t\t\t\t }\n\t\t\t\t\t });\n\t\t\t\t } \n\t\t\t\t catch (JSONException e) \n\t\t\t\t {\n\t\t\t\t\t errorMessage = \"JSON Error Occured\";\n\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t }\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onIOException(IOException e, Object state) {\n\t\t\t\t errorMessage = \"Facebook Data read Error Occured\";\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onFileNotFoundException(FileNotFoundException e, Object state) {\n\t\t\t\t errorMessage = \"Facebook Image read Error Occured\";\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onMalformedURLException(MalformedURLException e,\n\t\t\t\t\t Object state) {\n\t\t\t\t errorMessage = \"Facebook URL Error Occured\";\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onFacebookError(FacebookError e, Object state) {\n\t\t\t\t errorMessage = \"Facebook Error Occured OnFacebook\";\n\t\t\t }\n\t\t });\n\t }", "public void getProfileInformation() {\n\t\tmAsyncRunner.request(\"me\", new RequestListener() {\n\t\t\t@Override\n\t\t\tpublic void onComplete(String response, Object state) {\n\t\t\t\tLog.d(\"Profile\", response);\n\t\t\t\tString json = response;\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject profile = new JSONObject(json);\n\t\t\t\t\tLog.d(\"Arvind Profile Data\", \"\"+profile.toString());\n\t\t\t\t\tfinal String name = profile.getString(\"name\");\n\t\t\t\t\tfinal String email = profile.getString(\"email\");\n\t\t\t\t\tHashMap<String, String> hashMap = new HashMap<String, String>();\n\n\t\t\t\t\thashMap.put(\"first_name\", profile.getString(\"first_name\"));\n\n\t\t\t\t\thashMap.put(\"last_name\", profile.getString(\"last_name\"));\n\n\t\t\t\t\thashMap.put(\"id\", profile.getString(\"id\"));\n\n\t\t\t\t\thashMap.put(\"gender\", profile.getString(\"gender\"));\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\thashMap.put(\"email\", profile.getString(\"email\"));\n\t\t\t\t\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\n\t\t\t\t\thashMap.put(\"birthday\", profile.getString(\"birthday\"));\n\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t//\tGetAlbumdata();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tIntent returnIntent = new Intent();\n\t\t\t\t\treturnIntent.putExtra(\"map\", hashMap);\n\t\t\t\t\tsetResult(RESULT_OK,returnIntent);\n\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onIOException(IOException e, Object state) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onFileNotFoundException(FileNotFoundException e,\n\t\t\t\t\tObject state) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onMalformedURLException(MalformedURLException e,\n\t\t\t\t\tObject state) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onFacebookError(FacebookError e, Object state) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t});\n\t}", "public String getProfile();", "protected Map<String, Object> getUserProfile() {\r\n\t\tTimeRecorder timeRecorder = RequestContext.getThreadInstance()\r\n\t\t\t\t\t\t\t\t\t\t\t\t .getTimeRecorder();\r\n\t\tString profileId = (String)userProfile.get(AuthenticationConsts.KEY_PROFILE_ID);\r\n\r\n\t\tSite site = Utils.getEffectiveSite(request);\r\n\t\tString siteDNSName = (site == null ? null : site.getDNSName());\r\n\r\n\t\tIUserProfileRetriever retriever = UserProfileRetrieverFactory.createUserProfileImpl(AuthenticationConsts.USER_PROFILE_RETRIEVER, siteDNSName);\r\n\t\ttry {\r\n\t\t\ttimeRecorder.recordStart(Operation.PROFILE_CALL);\r\n\t\t\tMap<String, Object> userProfile = retriever.getUserProfile(profileId,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t request);\r\n\t\t\ttimeRecorder.recordEnd(Operation.PROFILE_CALL);\r\n\t\t\treturn userProfile;\r\n\t\t} catch (UserProfileException ex) {\r\n\t\t\ttimeRecorder.recordError(Operation.PROFILE_CALL, ex);\r\n\t\t\tRequestContext.getThreadInstance()\r\n\t\t\t\t\t\t .getDiagnosticContext()\r\n\t\t\t\t\t\t .setError(ErrorCode.PROFILE001, ex.toString());\r\n\t\t\tthrow ex;\r\n\t\t}\r\n\t}", "static public User getUser(HttpServletRequest request) {\n String accessToken = request.getParameter(\"access_token\");\n if (accessToken == null) {\n return null;\n } else {\n try {\n URL url = new URL(\n \"https://www.googleapis.com/oauth2/v1/tokeninfo\"\n + \"?access_token=\" + accessToken);\n\n Map<String, String> userData = mapper.readValue(\n new InputStreamReader(url.openStream(), \"UTF-8\"),\n new TypeReference<Map<String, String>>() {\n });\n if (userData.get(\"audience\") == null\n || userData.containsKey(\"error\")\n || !userData.get(\"audience\")\n .equals(Constants.CLIENT_ID)) {\n return null;\n } else {\n String email = userData.get(\"email\"),\n userId = userData.get(\"user_id\");\n User user = null;\n PersistenceManager pm = PMF.get().getPersistenceManager();\n try {\n user = pm.getObjectById(User.class, userId);\n } catch (JDOObjectNotFoundException ex) {\n user = new User(userId, email);\n pm.makePersistent(user);\n } finally {\n pm.close();\n }\n return user;\n }\n } catch (Exception ex) {\n System.err.println(ex.getMessage());\n return null;\n }\n }\n }", "public static UserInfo getAccountInfoFromProfile(Context context) {\n Cursor dc = null;\n ContentResolver resolver= context.getContentResolver();\n Cursor pc = resolver.query(Profile.CONTENT_URI, PROFILE_PROJECTION, null, \n null, null);\n if (pc == null) {\n return null;\n }\n UserInfo acctInfo = null;\n try {\n while (pc.moveToNext()) {\n String displayName = pc.getString(COLUMN_DISPLAY_NAME);\n if (displayName == null || displayName.isEmpty()) {\n continue;\n }\n if (acctInfo == null) {\n acctInfo = new UserInfo();\n }\n acctInfo.setDisplayName(displayName);\n long rawContactsId = pc.getLong(COLUMN_RAW_CONTACTS_ID);\n \n Uri profileDataUri = Uri.withAppendedPath(Profile.CONTENT_URI, \"data\");\n dc = resolver.query(profileDataUri, PROFILE_DATA_PROJECTION,\n Data.RAW_CONTACT_ID+\"=? AND \"+Data.MIMETYPE+\" IN (?,?)\", \n new String[] { String.valueOf(rawContactsId), \n Phone.CONTENT_ITEM_TYPE, Email.CONTENT_ITEM_TYPE }, null);\n boolean firstEmail = true, firstPhone = true;\n while (dc != null && dc.moveToNext()) {\n String data;\n int type = dc.getInt(COLUMN_TYPE);\n int isPrimary = dc.getInt(COLUMN_ISPRIMARY);\n boolean isPhone = Phone.CONTENT_ITEM_TYPE.equals(dc.getString(COLUMN_MIMETYPE));\n if (isPhone) {\n data = dc.getString(COLUMN_PHONENUM);\n if (isPrimary == 1 || firstPhone) {\n // TODO: phone number is not supported yet.\n// acctInfo.setPhone(data);\n firstPhone = false;\n }\n } else {\n data = dc.getString(COLUMN_EMAILADDR);\n if (isPrimary == 1 || firstEmail) {\n acctInfo.setEmail(data);\n firstEmail = false;\n }\n }\n }\n }\n return acctInfo;\n } finally {\n pc.close();\n if (dc != null) {\n dc.close();\n }\n }\n }", "void getProfile(@NonNull final String profileId, @Nullable Callback<ComapiResult<ComapiProfile>> callback);", "Profile getProfile( String profileId );", "@RequestMapping(value=\"/googleLogin\", method=RequestMethod.POST, consumes=MediaType.APPLICATION_FORM_URLENCODED_VALUE)\n\tpublic @ResponseBody Object verifyGoogleToken(@RequestParam String googleToken) {\n\t\ttry {\n\t\t\tString email = userService.verifyGoogleToken(googleToken);\n\t\t\tSystem.out.println(\"Response from google: email - \" + email);\n\t\t\tif(email.length() > 0) {\n\t\t\t\t long now = new Date().getTime();\n\t\t\t\t long expires = now + 86400000;\n\t\t\t\t try {\n\t\t\t\t\t UserProfile up = userService.getUserByEmail(email);\n\t\t\t\t\t System.out.println(\"USER FOUND: \" + up.toString());\n\t\t\t\t\t String s = Jwts.builder().setSubject(up.getUserName()).setIssuer(\"UxP-Gll\").setExpiration(new Date(expires)).setHeaderParam(\"user\", up).signWith(SignatureAlgorithm.HS512, key).compact();\n\t\t\t\t\t return userService.getUserByUserName(up.getUserName(), s);\n\t\t\t\t } catch (Exception e) {\n\t\t\t\t\t return Collections.singletonMap(\"error\", \"no account found for email: \" + email); \n\t\t\t\t }\n\t\t\t\t \n\t\t\t} else {\n\t\t\t\treturn Collections.singletonMap(\"error\", \"bad response from google\");\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(e.toString());\n\t\t\treturn Collections.singletonMap(\"error\", \"token could not be validated\");\n\t\t}\n\t}", "public Optional<CredentialProfile> get(StructuredTableContext context, CredentialProfileId id)\n throws IOException {\n StructuredTable table = context.getTable(CredentialProviderStore.CREDENTIAL_PROFILES);\n Collection<Field<?>> key = Arrays.asList(\n Fields.stringField(CredentialProviderStore.NAMESPACE_FIELD,\n id.getNamespace()),\n Fields.stringField(CredentialProviderStore.PROFILE_NAME_FIELD,\n id.getName()));\n return table.read(key).map(row -> GSON.fromJson(row\n .getString(CredentialProviderStore.PROFILE_DATA_FIELD), CredentialProfile.class));\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n Toast.makeText(this, getResources().getString(R.string.autenticandoseGoogle) + \" \" + acct.getId(), Toast.LENGTH_SHORT).show();\n\n showProgressDialog();\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.autenticadoGoogle), Toast.LENGTH_SHORT).show();\n FirebaseUser user = mAuth.getCurrentUser();\n updateUI(user);\n finish();\n } else {\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.autenticacionFallida), Toast.LENGTH_SHORT).show();\n updateUI(null);\n }\n hideProgressDialog();\n\n\n }\n });\n }", "public Credential getUsercredential(final String authCode)\n\t\t\tthrows IOException, JSONException {\n\t\tfinal GoogleTokenResponse response = flow.newTokenRequest(authCode)\n\t\t\t\t.setRedirectUri(CALLBACK_URI).execute();\n\t\tfinal Credential credential = flow.createAndStoreCredential(response,\n\t\t\t\tnull);\n\t\treturn credential;\n\t}", "public void getProfile() {\n\n String mKey = getString(R.string.preference_name);\n SharedPreferences mPrefs = getSharedPreferences(mKey, MODE_PRIVATE);\n\n // Load the user email\n\n /*userEmail = getString(R.string.preference_key_profile_email);\n userPassword = getString(R.string.preference_key_profile_password);*/\n\n // Load the user email\n\n mKey = getString(R.string.preference_key_profile_email);\n userEmail = mPrefs.getString(mKey, \"\");\n\n // Load the user password\n\n mKey = getString(R.string.preference_key_profile_password);\n userPassword = mPrefs.getString(mKey, \"\");\n\n\n //userEmail = getString(R.string.register_email);\n //userPassword = getString(R.string.register_password);\n\n }", "public void loadUserProfile(AccessToken accessToken) {\n GraphRequest request = GraphRequest.newMeRequest(accessToken, new GraphRequest.GraphJSONObjectCallback() {\n public void onCompleted(JSONObject object, GraphResponse response) {\n try {\n String first_name = object.getString(\"first_name\");\n String last_name = object.getString(\"last_name\");\n String email = object.getString(\"email\");\n String str = \"https://graph.facebook.com/\" + object.getString(\"id\") + \"/picture?type=normal\";\n Intent intent = new Intent(LoginOptionActivity.this, HomeActivity.class);\n intent.putExtra(\"name\", first_name + \" \" + last_name + \"\\n\" + email);\n intent.addFlags(268468224);\n LoginOptionActivity.this.startActivity(intent);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n });\n Bundle parameters = new Bundle();\n parameters.putString(GraphRequest.FIELDS_PARAM, \"first_name,last_name,email,id\");\n request.setParameters(parameters);\n request.executeAsync();\n }", "com.google.protobuf2.Any getProfile();", "com.google.protobuf.ByteString\n getProfileURLBytes();", "public void loadProfile() {\n SharedPreferences prefs = this.getSharedPreferences(\"MYPREFERENCES\", Context.MODE_PRIVATE);\n Intent intent = this.getIntent();\n\n // Email del perfil a cargar\n if (intent.getStringExtra(EMAIL_USER_PROFILE) != null) {\n emailProfile = intent.getStringExtra(EMAIL_USER_PROFILE);\n } else {\n emailProfile = \"\";\n }\n\n // Email del usuario logueado\n if (prefs.contains(LoginGoogleActivity.USER_KEY)) {\n emailLogin = prefs.getString(LoginGoogleActivity.USER_KEY, \"\");\n }\n\n userName = (TextView) this.findViewById(R.id.PublicCommentNameProfile);\n imgProfile = (ImageView) this.findViewById(R.id.PublicCommentImgProfile);\n\n\n // Compruebo si el perfil es del usuario logueado o de otro\n if ((emailProfile.isEmpty())) {\n // perfil usuario logueado\n if (prefs.contains(LoginGoogleActivity.USER_NAME)) {\n userName.setText(prefs.getString(LoginGoogleActivity.USER_NAME, \"\"));\n }\n if (prefs.contains(LoginGoogleActivity.USER_URL)) {\n new DownloadImageTask(imgProfile).execute(prefs.getString(LoginGoogleActivity.USER_URL, \"\"));\n }\n\n // extraer lista de comentarios\n loadCommentsList(emailLogin);\n\n }else if(emailProfile.compareTo(emailLogin) == 0 )\n {\n Intent i = new Intent(this, MenuActivity.class);\n startActivity(i);\n }\n else {\n try {\n\n String formatEmail = emailProfile.replaceAll(\"\\\\.\", \"___\");\n String userGet = new RestServiceGet().execute(\"http://\"+IP+\":8080/InftelSocialNetwork-web/webresources/users/\" + formatEmail).get();\n\n if(!userGet.isEmpty() && userGet != null) {\n\n Gson gson = new Gson();\n JSONObject json = null;\n JSONArray userArray = new JSONArray(userGet);\n\n for(int i=0; i<userArray.length();i++ )\n {\n json = new JSONObject(userArray.get(i).toString());\n\n }\n\n User perfil = gson.fromJson(json.toString(), User.class);\n\n\n userName.setText(perfil.getName());\n new DownloadImageTask(imgProfile).execute(perfil.getImageUrl(), \"\");\n\n loadBotonSeguir(emailLogin, emailProfile);\n loadCommentsList(emailProfile);\n }\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n }", "private void retrieveProfile() {\r\n\r\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\r\n\r\n if (user == null) {\r\n return;\r\n }\r\n\r\n String userId = user.getUid();\r\n String email = user.getEmail();\r\n DocumentReference reference = mFirebaseFirestore.collection(\"users\").document(userId);\r\n reference.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\r\n @Override\r\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\r\n if (task.isSuccessful()) {\r\n DocumentSnapshot documentSnapshot = task.getResult();\r\n mTextViewName.setText((CharSequence) documentSnapshot.get(\"name\"));\r\n mTextViewContact.setText((CharSequence) documentSnapshot.get(\"contact\"));\r\n mTextViewEstate.setText((CharSequence) documentSnapshot.get(\"estate\"));\r\n mTextViewHouseNo.setText((CharSequence) documentSnapshot.get(\"houseno\"));\r\n }\r\n Toast.makeText(Testing.this, \"Profile data loaded successfully!\", Toast.LENGTH_LONG).show();\r\n }\r\n })\r\n .addOnFailureListener(new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n Toast.makeText(Testing.this, \"Error fetching profile data. Check your internet connection!\" + e.toString(), Toast.LENGTH_LONG).show();\r\n }\r\n });\r\n\r\n }", "private String profileTest() {\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(\n \"/home/pascal/bin/workspace_juno/pgu-geo/war/WEB-INF/pgu/profile.json\"));\n } catch (final FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n\n final StringBuilder sb = new StringBuilder();\n String line = null;\n\n try {\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n } catch (final IOException e) {\n throw new RuntimeException(e);\n }\n return sb.toString();\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows IOException, ServletException {\n\t\tCredential credential = getCredential();\n\n\t\t// Build the Plus object using the credentials\n\t\tPlus plus = new Plus.Builder(transport, jsonFactory, credential)\n\t\t\t\t.setApplicationName(GoogleOAuth2.APPLICATION_NAME).build();\n\t\t// Make the API call\n\t\tPerson profile = plus.people().get(\"me\").execute();\n\t\t// Send the results as the response\n\t\tPrintWriter respWriter = resp.getWriter();\n\t\tresp.setStatus(200);\n\t\tresp.setContentType(\"text/html\");\n\t\trespWriter.println(\"<img src='\" + profile.getImage().getUrl() + \"'>\");\n\t\trespWriter.println(\"<a href='\" + profile.getUrl() + \"'>\" + profile.getDisplayName() + \"</a>\");\n\n\t\tUserService userService = UserServiceFactory.getUserService();\n\t\trespWriter.println(\"<div class=\\\"header\\\"><b>\" + req.getUserPrincipal().getName() + \"</b> | \"\n\t\t\t\t+ \"<a href=\\\"\" + userService.createLogoutURL(req.getRequestURL().toString())\n\t\t\t\t+ \"\\\">Log out</a> | \"\n\t\t\t\t+ \"<a href=\\\"http://code.google.com/p/google-api-java-client/source/browse\"\n\t\t\t\t+ \"/calendar-appengine-sample?repo=samples\\\">See source code for \"\n\t\t\t\t+ \"this sample</a></div>\");\n\t}", "HumanProfile getUserProfile();", "private User retrievePersonalProfileData() {\n if (checkIfProfileExists()) {\n return SharedPrefsUtils.convertSharedPrefsToUserModel(context);\n } else {\n return null;\n }\n }", "public void getGoogleToken() {\n String googleEmail = sharedpreferences.getString(\"GoogleEmail\", \"\");\n String scopes = sharedpreferences.getString(\"GoogleScopes\", \"\");\n if (!\"\".equals(googleEmail)) {\n MyAsyncTask asyncTask = new MyAsyncTask(googleEmail, scopes, this.getBaseContext());\n asyncTask.delegate = this;\n asyncTask.execute();\n }\n }", "AspirantProfile getAspirantProfile(String email)\n throws IllegalArgumentException, ServiceException;", "public Optional<GoogleTokenResponse> getGoogleToken(@NonNull GoogleOAuthData data) {\n Validation validation = data.valid();\n\n Preconditions.checkArgument(validation.isValid(), validation.getMessage());\n GoogleAuthConsumer consumer = new GoogleAuthConsumer();\n try {\n GoogleTokenResponse response = consumer.redeemAuthToken(data.getAuth_code(), data.getClient_id(), data.getRedirect_uri());\n return Optional.ofNullable(response);\n } catch (Exception e) {\n return Optional.empty();\n }\n }", "private void getProfil() {\n Call<FeedUser> call = baseApiService.getAllProfile(sessionManager.getSpContenttype(),\n sessionManager.getSpAccept(), sessionManager.getSpAuthorization());\n call.enqueue(new Callback<FeedUser>() {\n @Override\n public void onResponse(Call<FeedUser> call, Response<FeedUser> response) {\n if (response.isSuccessful()) {\n try {\n name = response.body().getDataProfil().getName().toString();\n email = response.body().getDataProfil().getEmail();\n initComponetNavHeader();\n } catch (Exception e) {\n Log.d(TAG, \" error :\" + e);\n }\n\n } else {\n Toast.makeText(SettingActivity.this, \"Response not success\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<FeedUser> call, Throwable t) {\n Toast.makeText(SettingActivity.this, \"Cek Connection\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "@RequestMapping(value = \"/getUserProfileDetails\", method = RequestMethod.GET, produces = \"application/json\")\n\t@ResponseBody\n\tpublic GetUserProfileResponse getUserProfileDetails(@RequestParam String emailId) {\n \tGetUserProfileResponse getUserProfileDetails = null;\n\t\ttry {\n\t\t\t\n\t\t\tgetUserProfileDetails = this.econnectService.getUserProfileDetails(emailId);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn getUserProfileDetails;\n\t}", "H getProfile();", "ApplicationProfile getApplicationProfile();", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n fbAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n //Log.d(TAG, \"signInWithCredential:success\");\n FirebaseUser user = fbAuth.getCurrentUser();\n UserModel userModel=new UserModel();\n userModel.setEmail(user.getEmail());\n userModel.setDisplayName(user.getDisplayName());\n userModel.setPhotoUrl(user.getPhotoUrl().toString());\n userModel.setUid(user.getUid());\n UserFBDB userFBDB = new UserFBDB();\n userFBDB.save(userModel);\n updateUI(user);\n } else {\n // If sign in fails, display a message to the user.\n //Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n Exception ex=task.getException();\n signupWithGoogleBtn.setVisibility(View.VISIBLE);\n mProgress.setVisibility(View.INVISIBLE);\n Toast.makeText(SignupActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n //updateUI(null);\n }\n\n // ...\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"singn\", e.getMessage());\n }\n });\n }", "private void getProfileInfo() {\n OkHttpClient client = new OkHttpClient.Builder()\n .cookieJar(new CookieJar() {\n private final HashMap<HttpUrl, List<Cookie>> cookieStore = new HashMap<>();\n @Override\n public void saveFromResponse(HttpUrl url, List<Cookie> cookies) {\n cookieStore.put(url, cookies);\n }\n\n @Override\n public List<Cookie> loadForRequest(HttpUrl url) {\n List<Cookie> cookies = cookieStore.get(url);\n return cookies != null ? cookies : new ArrayList<>();\n }\n })\n .build();\n\n AsyncTask.execute(() -> {\n try {\n HttpUrl url = HttpUrl.parse(URL + \"/nuh/myprofile\")\n .newBuilder()\n .build();\n\n Request requestToken = new Request.Builder()\n .url(url)\n .build();\n\n client.newCall(requestToken).execute();\n String token = \"\";\n\n List<Cookie> cookies = client.cookieJar().loadForRequest(url);\n for (Cookie cookie : cookies) {\n if (cookie.name().equals(\"csrftoken\")) {\n token = cookie.value();\n }\n }\n\n Request request = new Request.Builder()\n .header(\"X-CSRFToken\", token)\n .url(URL + \"/nuh/myprofile\")\n .build();\n\n Response response = client.newCall(request).execute();\n if (response.isSuccessful()) {\n String JSON = response.body().string();\n Log.d(\"JSON\", \"getProfileInfo: JSON: \" + JSON);\n JSONArray array = new JSONArray(JSON);\n JSONObject usernameObj = array.getJSONObject(0);\n String username = usernameObj.getString(\"username\");\n JSONObject firstNameObj = array.getJSONObject(1);\n String firstName = firstNameObj.getString(\"first_name\");\n JSONObject lastNameObj = array.getJSONObject(2);\n String lastName = lastNameObj.getString(\"last_name\");\n JSONObject emailObj = array.getJSONObject(3);\n String email = emailObj.getString(\"e_mail\");\n\n JSONObject categoriesObj = array.getJSONObject(4);\n String needFood = categoriesObj.getString(\"get_food\");\n String needAccomodation = categoriesObj.getString(\"get_accommodation\");\n String needClothes = categoriesObj.getString(\"get_clothes\");\n String needMedicine = categoriesObj.getString(\"get_medicine\");\n String needOther = categoriesObj.getString(\"get_other\");\n String giveFood = categoriesObj.getString(\"give_food\");\n String giveAccomodation = categoriesObj.getString(\"give_accommodation\");\n String giveClothes = categoriesObj.getString(\"give_clothes\");\n String giveMedicine = categoriesObj.getString(\"give_medicine\");\n String giveOther = categoriesObj.getString(\"give_other\");\n double latitude = categoriesObj.getDouble(\"latitude\");\n double longitude = categoriesObj.getDouble(\"longitude\");\n\n SharedPreferences.Editor editor = getSharedPreferences(HELP_CATEGORIES, MODE_PRIVATE).edit();\n editor.putString(USERNAME, username);\n editor.putString(FIRST_NAME, firstName);\n editor.putString(LAST_NAME, lastName);\n editor.putString(EMAIL, email);\n editor.putBoolean(FOOD_NEED, needFood != null);\n editor.putBoolean(ACCOMODATION_NEED, needAccomodation != null);\n editor.putBoolean(CLOTHES_NEED, needClothes != null);\n editor.putBoolean(MEDICINE_NEED, needMedicine != null);\n editor.putBoolean(OTHER_NEED, needOther != null);\n editor.putBoolean(FOOD_GIVE, giveFood != null);\n editor.putBoolean(ACCOMODATION_GIVE, giveAccomodation != null);\n editor.putBoolean(CLOTHES_GIVE, giveClothes != null);\n editor.putBoolean(MEDICINE_GIVE, giveMedicine != null);\n editor.putBoolean(OTHER_GIVE, giveOther != null);\n editor.putString(FOOD_NEED_TEXT, needFood);\n editor.putString(ACCOMODATION_NEED_TEXT, needAccomodation);\n editor.putString(CLOTHES_NEED_TEXT, needClothes);\n editor.putString(MEDICINE_NEED_TEXT, needMedicine);\n editor.putString(OTHER_NEED_TEXT, needOther);\n editor.putString(FOOD_GIVE_TEXT, giveFood);\n editor.putString(ACCOMODATION_GIVE_TEXT, giveAccomodation);\n editor.putString(CLOTHES_GIVE_TEXT, giveClothes);\n editor.putString(MEDICINE_GIVE_TEXT, giveMedicine);\n editor.putString(OTHER_GIVE_TEXT, giveOther);\n editor.apply();\n getSharedPreferences(LOGIN, MODE_PRIVATE)\n .edit()\n .putString(LATITUDE, String.valueOf(latitude))\n .putString(LONGITUDE, String.valueOf(longitude))\n .apply();\n\n } else {\n runOnUiThread(() -> Toast.makeText(this, \"Something went wrong\", Toast.LENGTH_SHORT).show());\n }\n } catch (IOException | JSONException e) {\n e.printStackTrace();\n }\n });\n }", "public void getProfileWithCompletion(\n final ServiceClientCompletion<ResponseResult> completion)\n {\n // Create request headers.\n final HashMap<String, String> headers = new HashMap<String, String>(2);\n headers.put(\"Authorization\", AUTHORIZATION_HEADER);\n headers.put(\"Content-Type\", \"application/json\");\n\n // Create request parameters.\n final HashMap<String, String> parameters =\n new HashMap<String, String>(2);\n parameters.put(\"grant_type\", \"bearer\");\n parameters.put(\"access_token\", mSharecareToken.accessToken);\n\n // Create endpoint.\n final String endPoint =\n String.format(PROFILE_ENDPOINT, mSharecareToken.accountID);\n\n this.beginRequest(endPoint, ServiceMethod.GET, headers, parameters,\n (String)null, ServiceResponseFormat.GSON,\n new ServiceResponseTransform<JsonElement, ResponseResult>()\n {\n @Override\n public ResponseResult transformResponseData(\n final JsonElement json)\n throws ServiceResponseTransformException\n {\n final ResponseResult result =\n checkResultFromAuthService(json);\n if (result.success)\n {\n // Extract profile info to create profile object.\n final JsonObject jsonObject = json.getAsJsonObject();\n final String firstName =\n getStringFromJson(jsonObject, FIRST_NAME);\n final String lastName =\n getStringFromJson(jsonObject, LAST_NAME);\n final String email =\n getStringFromJson(jsonObject, EMAIL);\n final String gender =\n getStringFromJson(jsonObject, GENDER);\n final Date dateOfBirth =\n getDateFromJson(jsonObject, DATE_OF_BIRTH);\n final double height =\n getDoubleFromJson(jsonObject, HEIGHT, 0);\n final double weight =\n getDoubleFromJson(jsonObject, WEIGHT, 0);\n\n if (firstName != null && lastName != null\n && email != null)\n {\n final Profile profile = new Profile();\n profile.firstName = firstName;\n profile.lastName = lastName;\n profile.email = email;\n profile.heightInMeters = height;\n profile.weightInKg = weight;\n profile.gender = gender;\n profile.dateOfBirth = dateOfBirth;\n updateAskMDProfileWithCompletion(null);\n final HashMap<String, Object> parameters =\n new HashMap<String, Object>(1);\n parameters.put(PROFILE, profile);\n result.parameters = parameters;\n }\n else\n {\n result.success = false;\n result.errorMessage = \"Bad profile data.\";\n result.responseCode =\n ServiceClientConstants.SERVICE_RESPONSE_STATUS_CODE_BAD_DATA;\n }\n }\n\n LogError(\"getProfileWithCompletion\", result);\n return result;\n }\n }, completion);\n }", "@Override\n public void fetchFromSource(){\n System.out.println(\"pull the user credential from gmail\");\n }", "private void attemptCreateAccountWithGoogle() {\n // Configure sign-in to request the user's ID, email address, and basic profile. ID and\n // basic profile are included in DEFAULT_SIGN_IN.\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n if (mGoogleApiClient == null) {\n // Build a GoogleApiClient with access to GoogleSignIn.API and the options above.\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this, this)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n }\n\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "public Profile get(Long id, String authenticationCode, long profileId) {\n return new Profile((int)(long)id,\"PROFIL_TESTOWY\", Boolean.FALSE, Boolean.TRUE);\n }", "private ProfileRestClient getProfileRestClient() {\n if (mProfileRestClient == null && mHsConfig != null) {\n mProfileRestClient = new ProfileRestClient(mHsConfig);\n }\n return mProfileRestClient;\n }", "public HashMap<String, String> getUserDetails(){\n HashMap<String, String> user = new HashMap<String, String>();\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n return user;\n }", "private void getFaceBookData(JSONObject object) {\n\n try {\n\n fbEmail = object.getString(\"email\");\n fbFirstName = object.getString(\"first_name\");\n fbLastName = object.getString(\"last_name\");\n fbUid = object.getString(\"id\");\n\n\n Toast.makeText(this, fbEmail, Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@java.lang.Override\n public com.google.protobuf2.Any getProfile() {\n return profile_ == null ? com.google.protobuf2.Any.getDefaultInstance() : profile_;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_account_gplus, container, false);\n\n Intent intent = getActivity().getIntent();\n\n Call<StudentGoogleProfile> call = null;\n final ImageView imageView = (ImageView) rootView.findViewById(R.id.student_account_gplus_image);\n final TextView name = (TextView) rootView.findViewById(R.id.student_account_gplus_name);\n final TextView surname = (TextView) rootView.findViewById(R.id.student_account_gplus_surname);\n\n Uri uri = null;\n if (intent != null)\n uri = intent.getData();\n\n Pattern pattern = Pattern.compile(\"https://plus.google.com/u/0/\\\\d{21}\");\n\n if (uri != null) {\n if (pattern.matcher(uri.toString()).matches()) {\n ApiInterface apiInterface = GooglePlusApiClient.getClient().create(ApiInterface.class);\n call = apiInterface.getStudentGoogleProfile(uri.getLastPathSegment(), API_KEY_GOOGLE_PLUS);\n }\n else {\n Toast.makeText(getActivity(), \"Invalid link!!! Choose another browser, please.\", Toast.LENGTH_LONG).show();\n getActivity().startActivity(new Intent(Intent.ACTION_VIEW, uri));\n }\n }\n else if (intent != null && intent.hasExtra(Intent.EXTRA_TEXT)) {\n ApiInterface apiInterface = GooglePlusApiClient.getClient().create(ApiInterface.class);\n call = apiInterface.getStudentGoogleProfile(intent.getStringExtra(Intent.EXTRA_TEXT), API_KEY_GOOGLE_PLUS);\n }\n if (call != null) {\n Log.v(\"LOG:\", call.request().url().toString());\n call.enqueue(new Callback<StudentGoogleProfile>() {\n @Override\n public void onResponse(Call<StudentGoogleProfile> call, Response<StudentGoogleProfile> response) {\n StudentGoogleProfile studentGoogleProfile = response.body();\n name.setText(studentGoogleProfile.getName());\n surname.setText(studentGoogleProfile.getSurname());\n Picasso.with(getContext()).load(studentGoogleProfile.getImageUrl()).into(imageView);\n }\n\n @Override\n public void onFailure(Call<StudentGoogleProfile> call, Throwable t) {\n }\n });\n }\n\n return rootView;\n }", "com.google.protobuf2.AnyOrBuilder getProfileOrBuilder();", "TasteProfile.UserProfile getUserProfile (String user_id);", "public Profile getProfile(String id) {\r\n\t\tString uuid = id;\r\n\t\tSystem.out.println(\"MineshafterProfileClient.getProfile(\" + uuid + \")\");\r\n\t\tURL u;\r\n\t\ttry {\r\n\t\t\tu = new URL(API_URL + \"?uuid=\" + id);\r\n\r\n\t\t\tHttpsURLConnection conn = (HttpsURLConnection) u.openConnection();\r\n\r\n\t\t\tInputStream in = conn.getInputStream();\r\n\t\t\tString profileJSON = Streams.toString(in);\r\n\t\t\tStreams.close(in);\r\n\r\n\t\t\tSystem.out.println(\"MS API Response: \" + profileJSON);\r\n\r\n\t\t\tif (profileJSON == null || profileJSON.length() == 0) { return new Profile(); }\r\n\r\n\t\t\tJsonObject pj = JsonObject.readFrom(profileJSON);\r\n\r\n\t\t\tProfile p = new Profile(pj.get(\"username\").asString(), uuid);\r\n\t\t\tJsonValue skinVal = pj.get(\"skin\");\r\n\t\t\tJsonValue capeVal = pj.get(\"cape\");\r\n\t\t\tJsonValue modelVal = pj.get(\"model\");\r\n\r\n\t\t\tString url;\r\n\t\t\tif (skinVal != null && !skinVal.isNull() && !skinVal.asString().isEmpty()) {\r\n\t\t\t\turl = textureHandler.addSkin(uuid, skinVal.asString());\r\n\t\t\t\tp.setSkin(url);\r\n\t\t\t}\r\n\r\n\t\t\tif (capeVal != null && !capeVal.isNull() && !capeVal.asString().isEmpty()) {\r\n\t\t\t\turl = textureHandler.addCape(uuid, capeVal.asString());\r\n\t\t\t\tp.setCape(url);\r\n\t\t\t}\r\n\r\n\t\t\tif (modelVal != null && !modelVal.isNull()) {\r\n\t\t\t\tString model = modelVal.asString();\r\n\t\t\t\tif (model.equals(\"slim\")) {\r\n\t\t\t\t\tp.setModel(CharacterModel.SLIM);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tp.setModel(CharacterModel.CLASSIC);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn p;\r\n\t\t} catch (ParseException e) {\r\n\t\t\tSystem.out.println(\"Unable to parse getProfile response, using blank profile\");\r\n\t\t\treturn new Profile();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn new Profile();\r\n\t}", "@java.lang.Override\n public com.google.protobuf.StringValue getProfilePictureUrl() {\n return profilePictureUrl_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : profilePictureUrl_;\n }", "public String getProfile() {\n return profile;\n }", "public String getUserInfoJson(Credential credential) throws IOException,\n\t\t\tJSONException {\n\t\tfinal HttpRequestFactory requestFactory = HTTP_TRANSPORT\n\t\t\t\t.createRequestFactory(credential);\n\t\tfinal GenericUrl url = new GenericUrl(USER_INFO_URL);\n\t\tfinal HttpRequest request = requestFactory.buildGetRequest(url);\n\t\trequest.getHeaders().setContentType(\"application/json\");\n\t\tString jsonIdentity = request.execute().parseAsString();\n\t\treturn jsonIdentity;\n\t}", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n mCallbackManager.onActivityResult(requestCode, resultCode, data); // DATA CALLBACK FOR FACEBOOK\n if (data != null) {\n progressDialog.show();\n progressDialog.setMessage(\"Logging you in...\");\n if (requestCode == 9001 && resultCode == RESULT_OK) {\n Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);\n try {\n // Google Sign In was successful, authenticate with Firebase\n GoogleSignInAccount account = task.getResult(ApiException.class);\n assert account != null;\n firebaseAuthWithGoogle(account.getIdToken());\n } catch (ApiException e) {\n e.printStackTrace();\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n }else {\n progressDialog.dismiss();\n }\n }", "private void getUserData() {\n TwitterApiClient twitterApiClient = TwitterCore.getInstance().getApiClient();\n AccountService statusesService = twitterApiClient.getAccountService();\n Call<User> call = statusesService.verifyCredentials(true, true, true);\n call.enqueue(new Callback<User>() {\n @Override\n public void success(Result<User> userResult) {\n //Do something with result\n\n //parse the response\n String name = userResult.data.name;\n String email = userResult.data.email;\n String description = userResult.data.description;\n String pictureUrl = userResult.data.profileImageUrl;\n String bannerUrl = userResult.data.profileBannerUrl;\n String language = userResult.data.lang;\n long id = userResult.data.id;\n\n }\n\n public void failure(TwitterException exception) {\n //Do something on failure\n }\n });\n }", "public java.lang.String getProfileURL() {\n java.lang.Object ref = profileURL_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n profileURL_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static com.sawdust.gae.logic.User getUser(final HttpServletRequest request, final HttpServletResponse response, final AccessToken accessData)\r\n {\n if (null != response)\r\n {\r\n setP3P(response); // Just always set this...\r\n }\r\n\r\n com.sawdust.gae.logic.User user = null;\r\n\r\n if (null == user)\r\n {\r\n try\r\n {\r\n LOG.finer(String.format(\"Attempting google authorization...\"));\r\n user = getUser_Google(request, accessData, user);\r\n }\r\n catch (final Throwable e)\r\n {\r\n \tLOG.warning(Util.getFullString(e));\r\n }\r\n }\r\n\r\n if (null == user)\r\n {\r\n try\r\n {\r\n LOG.finer(String.format(\"Attempting facebook authorization...\"));\r\n user = getUser_Facebook(request, user);\r\n }\r\n catch (final Throwable e)\r\n {\r\n \tLOG.warning(Util.getFullString(e));\r\n }\r\n }\r\n\r\n if (null == user)\r\n {\r\n try\r\n {\r\n LOG.finer(String.format(\"Attempting signed-cookie authorization...\"));\r\n user = getUser_Cookied(request, user);\r\n }\r\n catch (final Throwable e)\r\n {\r\n \tLOG.warning(Util.getFullString(e));\r\n }\r\n }\r\n\r\n if (null == user)\r\n {\r\n LOG.finer(String.format(\"Using guest authorization...\"));\r\n final String email = getGuestId(request, response);\r\n if (null == email) \r\n {\r\n return null;\r\n }\r\n user = new com.sawdust.gae.logic.User(UserTypes.Guest, email, null);\r\n }\r\n LOG.fine(String.format(\"User is %s\", user.getId()));\r\n if (user.getUserID().endsWith(\"facebook.null\"))\r\n {\r\n user.setSite(\"http://apps.facebook.com/sawdust-games/\");\r\n }\r\n else if (user.getUserID().endsWith(\"facebook.beta\"))\r\n {\r\n user.setSite(\"http://apps.facebook.com/sawdust-games-beta/\");\r\n }\r\n return user;\r\n }", "public String getGoogleUserFirstName(){\n return (String) attributes.get(GOOGLE_USER_FIRST_NAME);\n }", "public User getById(String id){\n List<User> users = userRepo.findAll();\n for (User user : users){\n if(user.getGoogleId().equals(id)){\n return user;\n }\n }\n throw new UserNotFoundException(\"\");\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mFirebaseAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser user = mFirebaseAuth.getCurrentUser();\n //Toast.makeText(SignInActivity.this, R.string.sign_in_successful, Toast.LENGTH_SHORT).show();\n hideSignInWithGoogleLoadingIndicator();\n returnToCallingActivity();\n } else {\n // If sign in fails, display a message to the user.\n Log.w(DEBUG_TAG, \"signInWithCredential:failure\", task.getException());\n Toast.makeText(SignInActivity.this, R.string.failed_to_sign_in_with_credentials, Toast.LENGTH_SHORT).show();\n //Snackbar.make(findViewById(R.id.main_layout), \"Authentication Failed.\", Snackbar.LENGTH_SHORT).show();\n }\n }\n });\n }", "public UserProfile getUserProfile(String username);", "java.lang.String getProfileImage();", "public java.lang.String getProfileURL() {\n java.lang.Object ref = profileURL_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n profileURL_ = s;\n return s;\n }\n }", "public JSONObject requestDeviceAuthTokens(String deviceCode) {\n try {\n String response = netUtils.post(authEndpoint,\n \"client_id=\" + clientId\n + \"&client_secret=\" + clientSecret\n + \"&code=\" + deviceCode\n + \"&grant_type=\" + grantType);\n\n if (response == null) {\n LOG.log(Level.FINE, \"pending authorization from user\");\n return null;\n }\n\n JSONParser j = new JSONParser();\n JSONObject jobj = (JSONObject) j.parse(response);\n if (jobj.containsKey(\"error\")) {\n LOG.log(Level.FINE, \"pending authorization from user\");\n return null;\n }\n return jobj;\n\n } catch (ParseException e) {\n LOG.log(Level.WARNING, \"google auth response parse failed\");\n }\n\n return null;\n }", "private void RegisterGoogleSignup() {\n\n\t\ttry {\n\t\t\tLocalData data = new LocalData(SplashActivity.this);\n\n\t\t\tArrayList<String> asName = new ArrayList<String>();\n\t\t\tArrayList<String> asValue = new ArrayList<String>();\n\n\t\t\tasName.add(\"email\");\n\t\t\tasName.add(\"firstname\");\n\t\t\tasName.add(\"gender\");\n\t\t\tasName.add(\"id\");\n\t\t\tasName.add(\"lastname\");\n\t\t\tasName.add(\"name\");\n\t\t\t// asName.add(\"link\");\n\n\t\t\tasName.add(\"device_type\");\n\t\t\tasName.add(\"device_id\");\n\t\t\tasName.add(\"gcm_id\");\n\t\t\tasName.add(\"timezone\");\n\n\t\t\tasValue.add(data.GetS(LocalData.EMAIL));\n\t\t\tasValue.add(data.GetS(LocalData.FIRST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.GENDER));\n\t\t\tasValue.add(data.GetS(LocalData.ID));\n\t\t\tasValue.add(data.GetS(LocalData.LAST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.NAME));\n\t\t\t// asValue.add(data.GetS(LocalData.LINK));\n\n\t\t\tasValue.add(\"A\");\n\n\t\t\tString android_id = Secure\n\t\t\t\t\t.getString(SplashActivity.this.getContentResolver(),\n\t\t\t\t\t\t\tSecure.ANDROID_ID);\n\n\t\t\tasValue.add(android_id);\n\n\t\t\tLocalData data1 = new LocalData(SplashActivity.this);\n\t\t\tasValue.add(data1.GetS(\"gcmId\"));\n\t\t\tasValue.add(Main.GetTimeZone());\n\t\t\tString sURL = StringURLs.getQuery(StringURLs.GOOGLE_LOGIN, asName,\n\t\t\t\t\tasValue);\n\n\t\t\tConnectServer connectServer = new ConnectServer();\n\t\t\tconnectServer.setMode(ConnectServer.MODE_POST);\n\t\t\tconnectServer.setContext(SplashActivity.this);\n\t\t\tconnectServer.setListener(new ConnectServerListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onServerResponse(String sJSON, JSONObject jsonObject) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\tLog.d(\"JSON DATA\", sJSON);\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tif (sJSON.length() != 0) {\n\t\t\t\t\t\t\tJSONObject object = new JSONObject(sJSON);\n\t\t\t\t\t\t\tJSONObject response = object\n\t\t\t\t\t\t\t\t\t.getJSONObject(JSONStrings.JSON_RESPONSE);\n\t\t\t\t\t\t\tString sResult = response\n\t\t\t\t\t\t\t\t\t.getString(JSONStrings.JSON_SUCCESS);\n\n\t\t\t\t\t\t\tif (sResult.equalsIgnoreCase(\"1\") == true) {\n\n\t\t\t\t\t\t\t\tString user_id = response.getString(\"userid\");\n\n\t\t\t\t\t\t\t\tLocalData data = new LocalData(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this);\n\t\t\t\t\t\t\t\tdata.Update(\"userid\", user_id);\n\t\t\t\t\t\t\t\tdata.Update(\"name\", response.getString(\"name\"));\n\n\t\t\t\t\t\t\t\tGetNotificationCount();\n\n\t\t\t\t\t\t\t} else if (sResult.equalsIgnoreCase(\"0\") == true) {\n\n\t\t\t\t\t\t\t\tString msgcode = jsonObject.getJSONObject(\n\t\t\t\t\t\t\t\t\t\t\"response\").getString(\"msgcode\");\n\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, msgcode),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception exp) {\n\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconnectServer.execute(sURL);\n\n\t\t} catch (Exception exp) {\n\n\t\t\tToast.makeText(SplashActivity.this,\n\t\t\t\t\tMain.getStringResourceByName(SplashActivity.this, \"c100\"),\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t}\n\t}", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n if(Constants.mAuth==null){\n Constants.mAuth= FirebaseAuth.getInstance();\n Log.d(Constants.TAG,\"mAuth new Instance\");\n }\n Constants.mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(Constants.TAG, \"signInResult:google success\");\n Constants.user=Constants.mAuth.getCurrentUser();\n SharedPreferences sharedPreferences=getSharedPreferences(Constants.LoginSharedPref.SHARED_PREF_NAME,MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreferences.edit();\n editor.putBoolean(Constants.LoginSharedPref.PREVIOUSLY_STARTED,true);\n editor.putBoolean(Constants.LoginSharedPref.LOGGED_IN,true);\n String email=Constants.user.getEmail();\n String name=Constants.user.getDisplayName();\n Uri photoUrl=Constants.user.getPhotoUrl();\n editor.putString(Constants.LoginSharedPref.LOGIN_EMAIL,email);\n editor.putString(Constants.LoginSharedPref.LOGIN_URENAME,name);\n if(photoUrl!=null) {\n Log.d(Constants.TAG,\" Photo Url Extract: \"+photoUrl.toString());\n editor.putString(Constants.LoginSharedPref.PROFILE_URL, photoUrl.toString());\n }\n editor.putBoolean(Constants.LoginSharedPref.IS_EMAIL_VERIFIED,true);\n editor.commit();\n progressBar.setVisibility(View.GONE);\n contentHome.setVisibility(View.VISIBLE);\n Intent intent=new Intent(HomeActivity.this,MainActivity.class);\n startActivity(intent);\n finish();\n } else {\n // If sign in fails, display a message to the user.\n progressBar.setVisibility(View.GONE);\n contentHome.setVisibility(View.VISIBLE);\n Log.d(Constants.TAG, \"signInResult:google with firebase failure\", task.getException());\n Toast.makeText(HomeActivity.this, \"An error occured while signing in. Check your network connection \",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n }", "@Test\n public void getGoogleAuthTokensTest() throws ApiException {\n String code = null;\n InlineResponse2003 response = api.getGoogleAuthTokens(code);\n\n // TODO: test validations\n }", "private void FirebaseGoogleAuth(GoogleSignInAccount acct) {\n if (acct != null) {\n AuthCredential authCredential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(authCredential).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Successful\", Toast.LENGTH_SHORT).show();\n FirebaseUser user = mAuth.getCurrentUser();\n\n updateUI(user);\n\n } else {\n Toast.makeText(MainActivity.this, \"Failed\", Toast.LENGTH_SHORT).show();\n updateUI(null);\n }\n }\n });\n }\n else{\n Toast.makeText(MainActivity.this, \"acc failed\", Toast.LENGTH_SHORT).show();\n }\n }", "private GoogleCredential getGoogleCredential(String userId) {\t\t\n\t\t\n\t\ttry { \n\t\t\t// get the service account e-mail address and service account private key from property file\n\t\t\t// this email account and key file are specific for your environment\n\t\t\tif (SERVICE_ACCOUNT_EMAIL == null) {\n\t\t\t\tSERVICE_ACCOUNT_EMAIL = m_serverConfigurationService.getString(\"google.service.account.email\", \"\");\n\t\t\t}\n\t\t\tif (PRIVATE_KEY == null) {\n\t\t\t\tPRIVATE_KEY = m_serverConfigurationService.getString(\"google.private.key\", \"\");\n\t\t\t}\n\t\t\t\n\t\t\tGoogleCredential credential = getCredentialFromCredentialCache(userId);\n\t\t\treturn credential;\n\n\t\t} catch (Exception e) {\n\t\t\t// return null if an exception occurs while communicating with Google.\n\t\t\tM_log.error(\"Error creating a GoogleCredential object or requesting access token: \" + userId + \" \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "GmailClient getGmailClient(Credential credential);", "public String getAccessCookie(final String authCode) throws IOException,\n\t\t\tJSONException {\n\t\tCredential credential = getUsercredential(authCode);\n\t\tString accessToken = credential.getAccessToken();\n\t\tSystem.out.println(accessToken);\n\t\treturn accessToken;\n\t}", "@SuppressWarnings(\"unused\")\n private static String getRefreshToken() throws IOException {\n String client_id = System.getenv(\"PICASSA_CLIENT_ID\");\n String client_secret = System.getenv(\"PICASSA_CLIENT_SECRET\");\n \n // Adapted from http://stackoverflow.com/a/14499390/1447621\n String redirect_uri = \"http://localhost\";\n String scope = \"http://picasaweb.google.com/data/\";\n List<String> scopes;\n HttpTransport transport = new NetHttpTransport();\n JsonFactory jsonFactory = new JacksonFactory();\n\n scopes = new LinkedList<String>();\n scopes.add(scope);\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, client_id, client_secret, scopes).build();\n GoogleAuthorizationCodeRequestUrl url = flow.newAuthorizationUrl();\n url.setRedirectUri(redirect_uri);\n url.setApprovalPrompt(\"force\");\n url.setAccessType(\"offline\");\n String authorize_url = url.build();\n \n // paste into browser to get code\n System.out.println(\"Put this url into your browser and paste in the access token:\");\n System.out.println(authorize_url);\n \n Scanner scanner = new Scanner(System.in);\n String code = scanner.nextLine();\n scanner.close();\n\n flow = new GoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, client_id, client_secret, scopes).build();\n GoogleTokenResponse res = flow.newTokenRequest(code).setRedirectUri(redirect_uri).execute();\n String refreshToken = res.getRefreshToken();\n String accessToken = res.getAccessToken();\n\n System.out.println(\"refresh:\");\n System.out.println(refreshToken);\n System.out.println(\"access:\");\n System.out.println(accessToken);\n return refreshToken;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == RC_SIGN_IN) {\n GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);\n\n System.out.println(\"result status code\" + result.getStatus());\n if (result.isSuccess()) {\n onSucessGoogleLogin(result);\n\n } else {\n // Google Sign In failed, update UI appropriately\n Utility.logData(\"Login unsuccessful\");\n Utility.showShortToast(\"Login unsuccessful\");\n }\n\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "public UserProfile getUserProfile() {return userProfile;}", "public static String getAuthrUrl(String redirectUri, String scope) throws Exception {\r\n\t\tString getCodeUrl = MessageFormat.format(GET_OAUTH_USER_AGREE_URL, SOCIAL_LOGIN_CLIENT_ID, java.net.URLEncoder.encode(redirectUri, \"utf-8\"), scope);\r\n\t\treturn getCodeUrl;\r\n\t}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n\n user.put(KEY_USER_ID, pref.getString(KEY_USER_ID, null));\n user.put(KEY_AUTH_TOKEN, pref.getString(KEY_AUTH_TOKEN, null));\n user.put(KEY_USER_NAME, pref.getString(KEY_USER_NAME, \"\"));\n user.put(KEY_USER_EMAIL, pref.getString(KEY_USER_EMAIL, null));\n user.put(KEY_USER_MOBILE, pref.getString(KEY_USER_MOBILE, null));\n user.put(KEY_USER_ADDRESS, pref.getString(KEY_USER_ADDRESS, null));\n user.put(KEY_USER_IMAGE, pref.getString(KEY_USER_IMAGE, null));\n user.put(KEY_USER_STRIPE_ID, pref.getString(KEY_USER_STRIPE_ID, null));\n user.put(KEY_REFFERAL_CODE, pref.getString(KEY_REFFERAL_CODE, \"\"));\n user.put(KEY_REFFERAL_LINK, pref.getString(KEY_REFFERAL_LINK, \"\"));\n user.put(KEY_USER_PASSWORD, pref.getString(KEY_USER_PASSWORD, \"\"));\n // return user\n return user;\n }", "public com.google.protobuf2.Any getProfile() {\n if (profileBuilder_ == null) {\n return profile_ == null ? com.google.protobuf2.Any.getDefaultInstance() : profile_;\n } else {\n return profileBuilder_.getMessage();\n }\n }", "People getUser();", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n Log.d(TAG, \"firebaseAuthWithGoogle:\" + acct.getId());\n // [START_EXCLUDE silent]\n// showProgressDialog();\n // [END_EXCLUDE]\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(TAG, \"signInWithCredential:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n Toast.makeText(current,\"Sign \"+user.getEmail(),Toast.LENGTH_LONG).show();\n\n updateUI(user);\n updateCurrentUser(user);\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n Toast.makeText(current,\"Failed\"+task.getException().toString(),Toast.LENGTH_LONG).show();\n updateUI(null);\n }\n\n // [START_EXCLUDE]\n// hideProgressDialog();\n // [END_EXCLUDE]\n }\n });\n }", "private void googleSignInResult(GoogleSignInResult result) {\n if (result.isSuccess()) {\n // add to shared preferences\n GoogleSignInAccount account = result.getSignInAccount();\n userName = account.getDisplayName();\n userEmail = account.getEmail();\n userGoogleId = account.getId();\n userPhotoUrl = account.getPhotoUrl();\n\n editor.putString(getString(R.string.shared_prefs_key_username), userName);\n editor.putString(getString(R.string.shared_prefs_key_email), userEmail);\n editor.putString(getString(R.string.shared_prefs_key_google_id), userGoogleId);\n editor.putString(getString(R.string.shared_prefs_key_user_photo_url), userPhotoUrl.toString());\n\n editor.apply();\n\n // add to firebase users\n member = new Member();\n member.setUsername(userName);\n member.setEmail(userEmail);\n member.setId(userGoogleId);\n member.setPhotoUrl(userPhotoUrl.toString());\n member.setLoginType(getString(R.string.login_type_google));\n\n rref.orderByChild(getString(R.string.firebase_key_email)).equalTo(member.getEmail()).addListenerForSingleValueEvent(\n new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n String key;\n if (dataSnapshot.exists()) {\n key = dataSnapshot.getChildren().iterator().next().getKey();\n firebaseKey = key;\n getUserDetailsFromFirebase();\n } else {\n // new user\n key = rref.push().getKey();\n }\n editor.putString(getString(R.string.shared_prefs_key_firebasekey), key);\n editor.apply();\n\n Map<String, Object> userUpdates = new HashMap<>();\n\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_username), userName);\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_google_id), userGoogleId);\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_photo_url), userPhotoUrl.toString());\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_login_type), getString(R.string.login_type_google));\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_email), userEmail);\n\n rref.updateChildren(userUpdates);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n }\n );\n\n } else {\n gotoMainActivity();\n }\n }", "@Override\n protected void onActivityResult(\n int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n switch(requestCode) {\n case REQUEST_GOOGLE_PLAY_SERVICES:\n if (resultCode != RESULT_OK) {\n mOutputText.setText(\n \"This app requires Google Play Services. Please install \" +\n \"Google Play Services on your device and relaunch this app.\");\n } else {\n getResultsFromApi();\n }\n break;\n case REQUEST_ACCOUNT_PICKER:\n if (resultCode == RESULT_OK && data != null &&\n data.getExtras() != null) {\n String accountName =\n data.getStringExtra(AccountManager.KEY_ACCOUNT_NAME);\n if (accountName != null) {\n\n\n userId = accountName;\n //save User Email Id\n SharedPreferences mPrefs = getSharedPreferences(\"label\", 0);SharedPreferences.Editor mEditor = mPrefs.edit();mEditor.putString(\"UserId\", userId).apply();\n\n SharedPreferences settings =\n getPreferences(Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(PREF_ACCOUNT_NAME, accountName);\n editor.apply();\n mCredential.setSelectedAccountName(accountName);\n getResultsFromApi();\n }\n }\n break;\n case REQUEST_AUTHORIZATION:\n if (resultCode == RESULT_OK) {\n getResultsFromApi();\n }\n break;\n }\n }", "public void getResultsFromApi() {\n if (! isGooglePlayServicesAvailable()) {\n acquireGooglePlayServices();\n } else if (mCredential.getSelectedAccountName() == null) {\n mFragment.chooseAccount();\n } else if (! isDeviceOnline()) {\n // mOutputText.setText(\"No network connection available.\");\n } else if (mService == null){\n Log.d(Util.TAG_GOOGLE, mCredential.getSelectedAccountName());\n HttpTransport transport = AndroidHttp.newCompatibleTransport();\n JsonFactory jsonFactory = JacksonFactory.getDefaultInstance();\n mService = new com.google.api.services.gmail.Gmail.Builder(\n transport, jsonFactory, mCredential)\n .setApplicationName(\"Gmail API Android Quickstart\")\n .build();\n mFragment.readEmails();\n }\n }", "@WebMethod(action=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/getUserProfile\",\n operationName=\"getUserProfile\")\n @RequestWrapper(targetNamespace=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/types/\",\n localName=\"getUserProfile\")\n @ResponseWrapper(targetNamespace=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/types/\",\n localName=\"getUserProfileResponse\")\n @WebResult(name=\"result\")\n @CallbackMethod(exclude=true)\n String getUserProfile(@WebParam(mode = WebParam.Mode.IN, name=\"profileInformation\")\n String profileInformation) throws ServiceException;", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n Log.d(LGN, \"Resultado de Solicitud\");\n super.onActivityResult(requestCode, resultCode, data);\n try {\n Log.d(LGN, \"onActivityResult: \" + requestCode);\n if (requestCode == GOOGLE_SIGNIN_REQUEST) {\n Log.d(LGN, \"Respuesta de Google\");\n GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);\n Log.d(LGN, result.getStatus() + \"\");\n Log.d(LGN, resultCode + \"\");\n Log.d(LGN, data + \"\");\n if (result.isSuccess()) {\n Log.d(LGN, \"Respuesta Buena\");\n GoogleSignInAccount user = result.getSignInAccount();\n AuthCredential credential = GoogleAuthProvider.getCredential(user.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(LGN, \"Login con Google correcta: \" + task.isSuccessful());\n if (task.isSuccessful()) {\n isNew = task.getResult().getAdditionalUserInfo().isNewUser();\n Log.d(LGN, \"Antiguedad: \" + (isNew ? \"Nuevo\" : \"Antiguo\"));\n if (isNew) {\n Log.d(LGN, \"Es nuevo\");\n FirebaseUser currentUser = FirebaseAuth.getInstance().getCurrentUser();\n uid = currentUser.getUid();\n\n for (UserInfo profile : currentUser.getProviderData()) {\n correo = profile.getEmail();\n }\n\n Usuario usuario = new Usuario();\n usuario.setNombre(currentUser.getDisplayName());\n usuario.setCorreo(correo);\n usuario.setExp(0);\n usuario.setMonedas(0);\n usuario.setAvatar(currentUser.getPhotoUrl() != null ? currentUser.getPhotoUrl().toString() : null);\n\n DatabaseReference usuarioData = FirebaseDatabase.getInstance().getReference(\"usuario\");\n usuarioData.child(currentUser.getUid()).setValue(usuario)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n createColecciones(uid);\n Log.d(LGN, \"Usuario con Google Creado\");\n Toast.makeText(LoginActivity.this, \"Usuario Creado\", Toast.LENGTH_SHORT).show();\n } else {\n Log.d(LGN, \"Error en la creacion\");\n Log.e(LGN, \"onFailure\", task.getException());\n }\n }\n });\n\n /* Intent home = new Intent(LoginActivity.this, AvatarActivity.class);\n startActivity(home);\n finish();*/\n\n } else {\n Log.d(LGN, \"Es antiguo\");\n }\n } else {\n loginPanel.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n Log.e(LGN, \"Login con Google incorrecta:\", task.getException());\n Toast.makeText(LoginActivity.this, \"Autenticacion Fallida.\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n } else {\n loginPanel.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n Log.e(LGN, \"Sesion con Google Errada!\");\n }\n } else if (FACEBOOK_SIGNIN_REQUEST == requestCode) {\n Log.d(LGN, \"Respuesta de Facebook\");\n mCallbackManager.onActivityResult(requestCode, resultCode, data);\n }\n } catch (Throwable t) {\n try {\n loginPanel.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n Log.e(TAG, \"onThrowable: \" + t.getMessage(), t);\n if (getApplication() != null)\n Toast.makeText(getApplication(), t.getMessage(), Toast.LENGTH_LONG).show();\n } catch (Throwable x) {\n }\n }\n }", "@GetMapping(produces = { JSON, XML }, path = \"/profile/{id}\")\t\n\tpublic ResponseEntity<ProfileDTO> getProfile(@PathVariable(\"id\") int id, \n\t\t\t@RequestHeader(HttpHeaders.ACCEPT) Version version) { \n\t\t\n\t\tif(!principal.isAuthorized()) {\n\t\t\treturn ResponseEntity.ok(profileService.read(id, true, version));\n\t\t} \n\t\t\n\t\tUser issuer = getCurrentUser();\n\t\t\n\t\tif (issuer.getIdAsInt() == id) {\n\t\t\treturn ResponseEntity.ok(profileService.read(id, false, version));\n\t\t} else {\n\t\t\tProfileDTO fetched = profileService.read(id, true, version);\n\t\t\t\n\t\t\tif (fetched != null) {\n\t\t\t\tguestService.visitUserProfile(id, issuer.getIdAsInt(), false);\n\t\t\t}\n\t\t\t\n\t\t\treturn ResponseEntity.ok(fetched);\n\t\t}\n\t}", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n //Log.d(TAG, \"signInWithCredential:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n mGoogleSignInClient.signOut();\n updateUI(user);\n } else {\n // If sign in fails, display a message to the user.\n //Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n //Snackbar.make(findViewById(R.id.main_layout), \"Authentication Failed.\", Snackbar.LENGTH_SHORT).show();\n updateUI(null);\n }\n\n // ...\n }\n });\n }", "public byte[] getProfilePicture(){\n return profile_picture;\n }", "public String getProfileUrl() {\n\t\treturn profileUrl;\n\t}", "@Override\n protected Void doInBackground(Void... _) {\n Bundle appActivities = new Bundle();\n String scopes = \"oauth2:email profile\";\n Context cxt = DSUAccountAuthActivity.this;\n try {\n String accountName = Plus.AccountApi.getAccountName(mGoogleApiClient);\n String googleAccessToken = GoogleAuthUtil.getToken(\n DSUAccountAuthActivity.this, // Context context\n accountName, // String accountName\n scopes, // String scope\n appActivities // Bundle bundle\n );\n Bundle options = DSUAccountAuthActivity.this.getIntent().getBundleExtra(\"options\");\n DSUClient client = DSUClient.getDSUClientFromOptions(options, DSUAccountAuthActivity.this);\n\n Response response = client.signin(googleAccessToken);\n // clear token and default account from cache immediately to avoid stable state in the future\n GoogleAuthUtil.clearToken(DSUAccountAuthActivity.this, googleAccessToken);\n Plus.AccountApi.clearDefaultAccount(mGoogleApiClient);\n\n String responseBody = \"\";\n if (response != null && response.isSuccessful()) {\n try {\n responseBody = response.body().string();\n // use the google access token to sign in the dsu\n JSONObject token = new JSONObject(responseBody);\n final String accessToken = token.getString(DSUAuth.ACCESS_TOKEN_TYPE);\n final String refreshToken = token.getString(DSUAuth.REFRESH_TOKEN_TYPE);\n // Get an instance of the Android account manager\n AccountManager accountManager = (AccountManager) getSystemService(ACCOUNT_SERVICE);\n final Account account = DSUAuth.getDefaultAccount(cxt);\n // set options bundle as the userdata\n accountManager.addAccountExplicitly(account, null, options);\n\n // make the account syncable and automatically synced\n // TODO JARED: this is only used to access the SyncAdapter. Do we want to make it generic?\n // TODO ANDY: I make authorities to be string value in the xml configuration\n String providerAuthorities = DSUAuth.getDSUProviderAuthorities(cxt);\n ContentResolver.setIsSyncable(account, providerAuthorities, 1);\n ContentResolver.setSyncAutomatically(account, providerAuthorities, true);\n ContentResolver.setMasterSyncAutomatically(true);\n\n accountManager.setAuthToken(account, DSUAuth.ACCESS_TOKEN_TYPE, accessToken);\n accountManager.setAuthToken(account, DSUAuth.REFRESH_TOKEN_TYPE, refreshToken);\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Intent i = new Intent();\n i.putExtra(AccountManager.KEY_ACCOUNT_NAME, account.name);\n i.putExtra(AccountManager.KEY_ACCOUNT_TYPE, account.type);\n DSUAccountAuthActivity.this.setAccountAuthenticatorResult(i.getExtras());\n setResult(RESULT_OK);\n finish();\n }\n });\n } catch (JSONException e) {\n Log.e(TAG, \"Fail to parse response from google-sign-in endpoint:\" + responseBody, e);\n onDsuAuthFailed(INVALID_ACCESS_TOKEN);\n }\n } else {\n Log.e(TAG, \"Failed to sign in: \" + responseBody);\n onDsuAuthFailed(FAILED_TO_SIGN_IN);\n }\n\n // ** Step 3. Check Returned Access Tokens **\n\n } catch (UserRecoverableAuthException e) {\n // Requesting an authorization code will always throw\n // UserRecoverableAuthException on the first call to GoogleAuthUtil.getToken\n // because the user must consent to offline access to their data. After\n // consent is granted control is returned to your activity in onActivityResult\n // and the second call to GoogleAuthUtil.getToken will succeed.\n DSUAccountAuthActivity.this.startActivityForResult(e.getIntent(), AUTH_CODE_REQUEST_CODE);\n\n } catch (Exception e) {\n Log.e(TAG, \"Failed to sign in\", e);\n onDsuAuthFailed(FAILED_TO_SIGN_IN);\n }\n return null;\n }", "public GetIntegrationsResponse getgoogleDrive(String emailAddress, String projectId) {\n log.info(\"{\\\"message\\\":\\\"Getting google drive data\\\", \\\"project\\\":\\\"{}\\\"}}\", projectId);\n\n // Validation Check\n validationHandler.isUserOwnProject(emailAddress, projectId);\n\n // get from database\n List<GoogleDriveEntity> googleDriveEntities = googleDriveRepository.findGoogleDriveEntitiesByProjectId(projectId);\n\n // Convert to response\n List<IntegrationObjectResponse> googleDriveIntegrations = googleDriveEntities.stream().map(googleDriveEntity ->\n IntegrationObjectResponse\n .builder()\n .integrationId(googleDriveEntity.getGoogleDriveId())\n .integrationName(googleDriveEntity.getGoogleDriveName())\n .build()\n ).collect(Collectors.toList());\n\n log.info(\"{\\\"message\\\":\\\"Got google drive data\\\", \\\"project\\\":\\\"{}\\\"}, \\\"google drive\\\":\\\"{}\\\"}\", projectId, googleDriveIntegrations);\n return new GetIntegrationsResponse(googleDriveIntegrations);\n }", "public UserCredentials getProfileDetails() {\n return profile.getProfileDetails(currentUser);\n }", "@java.lang.Override\n public com.google.protobuf2.AnyOrBuilder getProfileOrBuilder() {\n return getProfile();\n }", "public UserProtheus requestUserProtheusByCode() {\n\n // Define url for request.\n urlPath = \"http://{ipServer}:{portServer}/REST/GET/JWSRUSERS/cod/{userCode}\";\n urlPath = urlPath.replace(\"{ipServer}\", ipServer);\n urlPath = urlPath.replace(\"{portServer}\", portServer);\n urlPath = urlPath.replace(\"{userCode}\", userProtheus.getCode());\n\n try {\n\n // Set URL for request.\n url = new URL(urlPath);\n\n // Set key for authorization basic\n authorizationBasic = \"Basic \" + Base64.encodeToString((userProtheus.getCode()+ \":\" + userProtheus.getPassword()).getBytes() , Base64.DEFAULT);\n\n // Open connection HTTP.\n httpConnection = (HttpURLConnection) url.openConnection();\n\n // set header for request.\n httpConnection.setRequestMethod(\"GET\");\n httpConnection.setRequestProperty(\"Content-type\", \"application/json\");\n httpConnection.setRequestProperty(\"Accept\", \"application/json\");\n httpConnection.setRequestProperty(\"Authorization\", authorizationBasic);\n httpConnection.setDoOutput(true);\n httpConnection.setDoInput(true);\n httpConnection.setConnectTimeout(5000);\n httpConnection.connect();\n\n // Get response.\n bufferedLine = \"\";\n bufferedReader = new BufferedReader(new InputStreamReader(url.openStream()));\n while ((bufferedLine = bufferedReader.readLine()) != null) {\n httpReturn.append(bufferedLine);\n }\n\n // Set userProtheus with json reponse.\n userProtheus = new Gson().fromJson(httpReturn.toString(), UserProtheus.class);\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (ProtocolException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return userProtheus;\n\n }", "@java.lang.Override\n public com.google.protobuf.StringValueOrBuilder getProfilePictureUrlOrBuilder() {\n return getProfilePictureUrl();\n }", "public UserInfo(GoogleSignInAccount acct) {\n if (acct != null) {\n name = acct.getDisplayName();\n givenName = acct.getGivenName();\n familyName = acct.getFamilyName();\n email = acct.getEmail();\n id = acct.getId();\n profilePhoto = acct.getPhotoUrl();\n }\n }" ]
[ "0.71227664", "0.6456888", "0.6354093", "0.6337825", "0.6227916", "0.61799425", "0.60501367", "0.6014338", "0.58772933", "0.584754", "0.58337736", "0.5830029", "0.58130336", "0.5798168", "0.57488555", "0.5740053", "0.5707927", "0.5687405", "0.5676123", "0.5673607", "0.56535655", "0.5615786", "0.55878353", "0.55810237", "0.5566764", "0.5564218", "0.55073106", "0.54666877", "0.5466401", "0.5447164", "0.5404906", "0.53956974", "0.5390639", "0.5370651", "0.53424186", "0.5339736", "0.5314283", "0.5314111", "0.53006536", "0.5288108", "0.5254493", "0.5249945", "0.5249888", "0.52433884", "0.5242655", "0.5214955", "0.52093107", "0.52083904", "0.520745", "0.51993054", "0.51924616", "0.51917535", "0.519102", "0.51865673", "0.5173731", "0.5159005", "0.5157763", "0.51558554", "0.51424557", "0.5133218", "0.51192874", "0.51159334", "0.5115454", "0.5112673", "0.51068", "0.5101567", "0.50912356", "0.5091151", "0.5089342", "0.5087079", "0.5080263", "0.50710917", "0.5057469", "0.5054328", "0.5044041", "0.5041002", "0.50269264", "0.5025533", "0.5012097", "0.50059175", "0.500309", "0.49975178", "0.4989606", "0.49858898", "0.49847454", "0.49837562", "0.49760965", "0.49749044", "0.4967678", "0.49569044", "0.49543732", "0.49522775", "0.49458542", "0.4930557", "0.4927929", "0.4927578", "0.49260992", "0.49236134", "0.4921868", "0.49178046" ]
0.595513
8
MarketQueryV4API is subscription type communication to be notified when a particular event occurs on the registered data. The subscription is done to the MDX (Market Data Express) via the CAS. All notifications will be sent from the MDX to the client directly without passing by the CAS.
public interface MarketQueryV4API { public boolean isV4ToV3MDConversionEnabled(); public boolean isMDXSupportedSession(String session); public void subscribeCurrentMarketV4(int classKey, EventChannelListener clientListener) throws SystemException, CommunicationException, AuthorizationException, DataValidationException; public void unsubscribeCurrentMarketV4(int classKey, EventChannelListener clientListener) throws SystemException, CommunicationException, AuthorizationException, DataValidationException; public void subscribeRecapLastSaleV4(int classKey, EventChannelListener clientListener) throws SystemException, CommunicationException, AuthorizationException, DataValidationException; public void unsubscribeRecapLastSaleV4(int classKey, EventChannelListener clientListener) throws SystemException, CommunicationException, AuthorizationException, DataValidationException; public void subscribeTickerV4(int classKey, EventChannelListener clientListener) throws SystemException, CommunicationException, AuthorizationException, DataValidationException; public void unsubscribeTickerV4(int classKey, EventChannelListener clientListener) throws SystemException, CommunicationException, AuthorizationException, DataValidationException; public void subscribeNBBOForClassV2(String sessionName, int classKey, EventChannelListener clientListener) throws SystemException, CommunicationException, AuthorizationException, DataValidationException; public void unsubscribeNBBOForClassV2(String sessionName, int classKey, EventChannelListener clientListener) throws SystemException, CommunicationException, AuthorizationException, DataValidationException; /** * Get the NBBOStruct for a product key for a session name. * @param sessionName to subscribe to. * @param productKey to query. * @return the NBBOStruct for a product key. * @throws UserException sent by server. */ public NBBOStruct getNbboSnapshotForProduct(String sessionName, int productKey) throws UserException; /** * Get the NBBOStruct for a product key for a session name within a period of subscription time. * @param timeout to limit the subscribtion time in millisecond. * @param sessionName to subscribe to. * @param productKey to query. * @return the NBBOStruct for a product key. * @throws UserException sent by server. */ public NBBOStruct getNbboSnapshotForProduct(int timeout, String sessionName, int productKey) throws UserException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface QxService {\n String transmission(String data, String appId, String sign);\n}", "@ClassVersion(\"$Id$\")\npublic interface MarketDataServiceAdapter\n{\n /**\n * Requests the given market data.\n *\n * @param inRequest a <code>MarketDataRequest</code> value\n * @param inStreamEvents a <code>boolean</code> value\n * @return a <code>long</code> value\n */\n long request(MarketDataRequest inRequest,\n boolean inStreamEvents);\n /**\n * Gets the timestamp of the most recent update for the given request.\n *\n * @param inId a <code>long</code> value\n * @return a <code>long</code> value\n */\n long getLastUpdate(long inId);\n /**\n * Cancels the given market data request.\n *\n * @param inId a <code>long</code> value\n */\n void cancel(long inId);\n /**\n * Gets the queued events, if any, for the given request id.\n *\n * @param inId a <code>long</code> value\n * @return a <code>Deque&lt;Eventgt;</code> value\n */\n Deque<Event> getEvents(long inId);\n /**\n * Gets the queued events, if any, for each of the given request ids.\n *\n * @param inRequestIds a <code>List&lt;Long&gt;</code> value\n * @return a <code>Map&lt;Long,LinkedList&lt;Event&gt;&gt;</code> value\n */\n Map<Long,LinkedList<Event>> getAllEvents(List<Long> inRequestIds);\n /**\n * Gets the most recent snapshot for the given attributes.\n *\n * @param inInstrument an <code>Instrument</code> value\n * @param inContent a <code>Content</code> value\n * @param inProvider a <code>String</code> value or <code>null</code>\n * @return a <code>Deque&lt;Event&gt;</code> value\n */\n Deque<Event> getSnapshot(Instrument inInstrument,\n Content inContent,\n String inProvider);\n /**\n * Gets the most recent snapshot page for the given attributes.\n *\n * @param inInstrument an <code>Instrument</code> value\n * @param inContent a <code>Content</code> value\n * @param inProvider a <code>String</code> value or <code>null</code>\n * @param inPageRequest a <code>PageRequest</code> value\n * @return a <code>Deque&lt;Event&gt;</code> value\n */\n Deque<Event> getSnapshotPage(Instrument inInstrument,\n Content inContent,\n String inProvider,\n PageRequest inPageRequest);\n /**\n * Gets the available capabilities.\n *\n * @return a <code>Set&lt;Capability&gt;</code> value\n */\n Set<Capability> getAvailableCapability();\n}", "public interface IMarketObserver {\n\n //To be defined in which format MarketAgent publishes stockprice\n /**\n * This method is called when information about an IMarket\n * which was previously requested using an asynchronous\n * interface becomes available.\n */\n public void onStockpriceChanged();\n\n /**\n * This method is called when information about an IMarket\n * which was previously requested using an asynchronous\n * interface becomes available.\n *\n * @param transactionEntry the transaction entry\n */\n public void onTransactionAdded(TransactionEntry transactionEntry);\n \n /**\n * This method is called when information about an IMarket\n * which was previously requested using an asynchronous\n * interface becomes available.\n *\n * @param orderEntry the order entry\n */\n public void onOrderAdded(OrderEntry orderEntry);\n \n /**\n * This method is called when information about an IMarket\n * which was previously requested using an asynchronous\n * interface becomes available.\n *\n * @param shareEntry the share entry\n */\n public void onShareAdded(ShareEntry shareEntry);\n}", "long request(MarketDataRequest inRequest,\n boolean inStreamEvents);", "abstract public void onQueryRequestArrived(ClientQueryRequest request);", "@Override\n public void onMessage(Message message) {\n try {\n // Generate data\n QueueProcessor processor = getBean(QueueProcessor.class);\n ServiceData serviceData = processor.parseResponseMessage(response, message);\n\n // If return is a DataList or Data, parse it with the query\n if (serviceData.getClientActionList() == null || serviceData.getClientActionList().isEmpty()) {\n serviceData = queryService.onSubscribeData(query, address, serviceData, parameterMap);\n } else {\n // Add address to client action list\n for (ClientAction action : serviceData.getClientActionList()) {\n action.setAddress(getAddress());\n }\n }\n\n // Broadcast data\n broadcastService.broadcastMessageToUID(address.getSession(), serviceData.getClientActionList());\n\n // Log sent message\n getLogger().log(QueueListener.class, Level.DEBUG,\n \"New message received from subscription to address {0}. Content: {1}\",\n getAddress().toString(), message.toString());\n } catch (AWException exc) {\n broadcastService.sendErrorToUID(address.getSession(), exc.getTitle(), exc.getMessage());\n\n // Log error\n getLogger().log(QueueListener.class, Level.ERROR, \"Error in message from subscription to address {0}. Content: {1}\", exc,\n getAddress().toString(), message.toString());\n } catch (Exception exc) {\n broadcastService.sendErrorToUID(address.getSession(), null, exc.getMessage());\n\n // Log error\n getLogger().log(QueueListener.class, Level.ERROR, \"Error in message from subscription to address {0}. Content: {1}\", exc,\n getAddress().toString(), message.toString());\n }\n }", "public interface IPullWxUser {\n\n /**\n * 把公众号推荐给用户\n */\n void pull(WxPullPublicObservable publicObservable) ;\n\n}", "public interface QMContactListenerImp {\r\n\r\n /**\r\n * 同意订阅\r\n * */\r\n void onContactAgreed(String username);\r\n\r\n /**\r\n * 拒绝订阅\r\n * */\r\n void onContactRefused(String username);\r\n\r\n /**\r\n * 订阅邀请\r\n * */\r\n void onContactInvited(String username);\r\n\r\n /**\r\n * 取消订阅\r\n * */\r\n void onContactDeleted(String username);\r\n\r\n\r\n /**\r\n * 下线\r\n * */\r\n void onUnavailable(String username);\r\n\r\n\r\n /**\r\n * 上线\r\n * */\r\n void onAvailable(String username);\r\n}", "public interface IMarketDataService {\n\n\t/**\n\t * Method used to retrieve market data.\n\t * @param symbol The symbol to query on\n\t * @return List of market data performance values\n\t */\n\tList<MarketPerformanceData> retrieveMarketData(String[] symbol);\n\n\t/**\n\t * Method used to retrieve symbol related news.\n\t * @param symbol The symbol to query on\n\t * @return String The rss xml\n\t */\n\tString retrieveSymbolNewsItems(String symbol);\n\n}", "public void onSubscribe() {\n\n }", "@Override\n public void registerWithMarketMethod() {\n getLinks(Links.ClientCompanyMarketLink.class)\n .send(\n Messages.MarketRegistrationClientCompany.class,\n (msg, link) -> {\n msg.specialization = compSpecialization;\n msg.ID = getID();\n });\n }", "public interface RxViewDispatch {\n\n /**\n * All the stores will call this event after they process an action and the store change it.\n * The view can react and request the needed data\n */\n void onRxStoreChanged(@NonNull RxStoreChange change);\n\n\n}", "public interface IntfOnChange\n{\n /**\n The method is called when the broker sends a change notification event.\n\n @param subscribers the number of clients subscribed to the topic.\n @param tid the topic name requested or the ephemeral topic ID\n requested to be observed.\n */\n public void smqOnChange(final long subscribers, final long tid);\n}", "public interface LogisticsDataApi {\n\n\n /**\n * 用户类型:-1用户, 0-咨询会员,1-交易会员,2-商家会员\n * 会员认证 状态: 0 -未认证, 1 -已认证\n * 会员锁定 状态: 0 -正常, 1 -锁定, 2 -注销\n * /member/query_type_new?token GET 用户类型\n */\n @GET(\"member/query_type_new\")\n Observable<UserTypeData> getUserType(@Query(\"token\") String token);\n\n /**\n * 发布求购 publish\n *\n * 收货信息 member/get_member_delivery_address?token 取默认地址 / 没有默认取第一条\n *\n * 原料品名 baseData/query_breed?keyword\n * 原料牌号 baseData/query_spec?keyword & code // code 为 breed code\n * 生产厂家 baseData/query_brand?keyword\n *\n * 提交 求购数据 member/publish_buy - post reference: class: MemberPurchaseDTOs\n */\n\n\n // 收货地址\n @GET(\"member/get_member_delivery_address\")\n Observable<PublishData.AddressData> getAddressData(@Query(\"token\") String token);\n\n // breed\n @GET(\"baseData/query_breed\")\n Observable<PublishData> getBreedData(@Query(\"keyword\") String keyword);\n // spec\n @GET(\"baseData/query_spec\")\n Observable<PublishData> getSpecData(@Query(\"keyword\") String keyword,\n @Query(\"code\") String breedCode);\n // brand\n @GET(\"baseData/query_brand\")\n Observable<PublishData.PublishBrandData> getBrandData(@Query(\"keyword\") String keyword);\n\n\n\n // 提交 求购数据 post Content-Type为application/json todo\n @POST(\"member/publish_buy\")\n Observable<VerifyData> postPurchaseData(@Body RequestBody requestBody);\n\n\n /**\n * 发布求购 publish - 收货地址 新增/编辑 get\n @\"/member/save_member_delivery_address\" // 新增收货信息\n @\"/member/update_member_delivery_address\" // 编辑收货信息\n */\n // 新增收货信息\n @GET(\"member/save_member_delivery_address\")\n Observable<VerifyData> getSaveAddressData(\n @Query(\"token\") String token,\n @Query(\"address\") String address,\n @Query(\"contactName\") String contactName,\n @Query(\"mobile\") String mobile,\n @Query(\"isDefault\") String isDefault,\n @Query(\"provinceCode\") String provinceCode,\n @Query(\"provinceName\") String provinceName,\n @Query(\"cityCode\") String cityCode,\n @Query(\"cityName\") String cityName,\n @Query(\"districtCode\") String districtCode,\n @Query(\"districtName\") String districtName\n );\n\n // 修改收货信息 (memberDeliveryAddressId 新增地址没有此参数)\n @GET(\"member/update_member_delivery_address\")\n Observable<VerifyData> getUpdateAddressData(\n @Query(\"token\") String token,\n @Query(\"address\") String address,\n @Query(\"contactName\") String contactName,\n @Query(\"mobile\") String mobile,\n @Query(\"isDefault\") int isDefault,\n @Query(\"provinceCode\") String provinceCode,\n @Query(\"provinceName\") String provinceName,\n @Query(\"cityCode\") String cityCode,\n @Query(\"cityName\") String cityName,\n @Query(\"districtCode\") String districtCode,\n @Query(\"districtName\") String districtName,\n @Query(\"memberDeliveryAddressId\") String memberDeliveryAddressId\n );\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n /**\n * purchase\n * member/purchase_pool?token 求购池数据\n * member/my_purchase_list?token 我的求购\n * shop/my_quote_list?token 我的报价\n */\n @GET(\"member/purchase_pool\")\n Observable<PurchaseData> getPurchasePoolData(@Query(\"token\") String token,\n @Query(\"pageNum\") int pageNum,\n @Query(\"pageSize\") int pageSize);\n\n\n @GET(\"member/my_purchase_list\")\n Observable<PurchaseData> getMyPurchaseData(@Query(\"token\") String token,\n @Query(\"pageNum\") int pageNum,\n @Query(\"pageSize\") int pageSize);\n\n @GET(\"shop/my_quote_list\")\n Observable<PurchaseData> getMyQuoteData(@Query(\"token\") String token,\n @Query(\"pageNum\") int pageNum,\n @Query(\"pageSize\") int pageSize);\n\n /**\n * member/purchase_quote_list?token&memberPurchaseId 求购报价详情\n * shop/my_quote_detail?quoteId&token 报价详情\n */\n\n @GET(\"member/purchase_quote_list\")\n Observable<PurchaseQuoteData> getMyPurchaseDetailData(@Query(\"token\") String token,\n @Query(\"memberPurchaseId\") String memberPurchaseId);\n\n @GET(\"shop/my_quote_detail\")\n Observable<QuoteDetailData> getMyQuoteDetailData(@Query(\"token\") String token,\n @Query(\"quoteId\") String quoteId);\n\n\n /**\n * member/member_review_quote ?token&sellMemberQuoteId& reviewNote 买家复议\n * shop/sell_review_quote ? token& quoteId& price 卖家复议\n */\n\n @GET(\"member/member_review_quote\")\n Observable<VerifyData> getPurchaseReviewData(@Query(\"token\") String token,\n @Query(\"sellMemberQuoteId\") String sellMemberQuoteId,\n @Query(\"reviewNote\") String reviewNote);\n\n @GET(\"shop/sell_review_quote\")\n Observable<VerifyData> getQuoteReviewData(@Query(\"token\") String token,\n @Query(\"quoteId\") String quoteId,\n @Query(\"price\") String price);\n\n\n /** 商家报价\n * baseData/query_like_warehouse?companyShortName 模糊搜索仓库\n * baseData/query_warehouse?companyShortName 精准搜索仓库 1.创建新仓库校验 2.选择历史\n * shop/sell_price 报价 - 提交报价数据 post\n */\n\n @GET(\"baseData/query_like_warehouse\")\n Observable<WarehouseData> getFuzzyWarehouseData(@Query(\"companyShortName\") String companyShortName);\n\n @GET(\"baseData/query_warehouse\")\n Observable<WarehouseData.WarehouseCheckData> getWarehouseData(@Query(\"companyShortName\") String companyShortName);\n\n\n // 提交报价数据 post todo\n @FormUrlEncoded\n @POST(\"shop/sell_price\")\n Observable<VerifyData> postQuoteData(\n @Field(\"token\") String token,\n @Field(\"memberPurchaseId\") long memberPurchaseId,\n @Field(\"price\") double price,\n @Field(\"isSupplierDistribution\") int isSupplierDistribution, // 0 - no ; 1 - yes;\n @Field(\"deliveryDate\") String deliveryDate,\n @Field(\"warehouse\") String warehouse // warehouse json\n );\n\n\n\n\n\n\n /**\n * logistics\n * /app/logistics/from_address 出发地\n * /app/logistics/to_address?provFrom&cityFrom&distinctFrom 目的地\n * /app/logistics/query_price?provFrom&cityFrom&distinctFrom&provTo&cityTo&distinctTo&amount 价格\n * @return\n */\n\n // 出发地\n @GET(\"logistics/from_address\")\n Observable<LogisticsCityData> getFromData();\n\n // 目的地\n @GET(\"logistics/to_address\")\n Observable<LogisticsCityData> getDestinationData(@Query(\"provFrom\") String provFrom,\n @Query(\"cityFrom\") String cityFrom,\n @Query(\"distinctFrom\") String distinctFrom\n );\n\n // 价格\n @GET(\"logistics/query_price\")\n Observable<LogisticsResultData> getPriceData(@Query(\"provFrom\") String provFrom,\n @Query(\"cityFrom\") String cityFrom,\n @Query(\"distinctFrom\") String distinctFrom,\n @Query(\"provTo\") String provTo,\n @Query(\"cityTo\") String cityTo,\n @Query(\"distinctTo\") String distinctTo,\n @Query(\"amount\") int amount\n );\n\n\n /**\n * 一键下单页面计算:\n 采购单价:求购报价的价格;\n 运费单价:求购报价的运费单价;(非供配情况下,选择自提,重置为0)\n 资金服务费利率:未认证会员为0;\n 账期:使用授信(部分授信,或全部授信)默认为最大账期天数;款到发货,账期为0;\n\n 选择账期后计算-----------------------------------------------------\n\n 1.资金服务费 =(采购单价+运费单价)*数量*资金服务费利率*账期\n\n * 全部授信- 资金服务费 =(采购单价+运费单价)*数量*资金服务费利率*账期\n * 部分授信- 资金服务费 = 授信额度(自填)*资金服务费利率*账期\n\n\n 2.销售总货款 =(采购单价+运费单价)*数量 + 资金服务费\n\n 3.采购总货款 = 采购单价*数量\n\n 4.物流总货款 = 运费单价*数量\n\n 5.销售单价 = 销售总货款/数量\n\n\n 6.使用授信(授信金额)\n 全部授信-使用授信 =(采购单价+运费单价)* 数量 + 资金服务费\n 部分授信-使用授信 = 授信额度(自填);\n 款到发货-使用授信 = 0;\n\n 7.手续费 = 销售总货款*0.3%\n *\n * /member/purchase_check_create_order?token \t\t\t\t 检验能否一键下单\n * /member/query_purchase_create_order_details?token&quoteId 确认订单\n */\n\n // 检验能否一键下单\n @GET(\"member/purchase_check_create_order\")\n Observable<VerifyData> getOrderCheckData(@Query(\"token\") String token);\n\n // 确认订单\n @GET(\"member/query_purchase_create_order_details\")\n Observable<OrderConfirmData> getOrderConfirmData(@Query(\"token\") String token,\n @Query(\"quoteId\") String quoteId);\n\n /**\n * 保证金\n * order/check_deposit?token & receivableWay\n */\n @GET(\"order/check_deposit\")\n Observable<VerifyData> getCheckDepositData(@Query(\"token\") String token,\n @Query(\"receivableWay\") String receivableWay);\n\n /**\n * private Long memberPurchaseId = 0L;\t\t\t\t\t\t// 会员求购单Id\n private Long sellMemberQuoteId = 0L;\t\t\t\t\t // 报价单Id\n\n private Double saleSumQty = 0D;\t\t\t\t\t\t\t// 销售总重量\n private Double saleSumAmt = 0D;\t\t\t\t\t\t\t// 销售总金额\n private Double purchaseSumQty = 0D;\t\t\t\t\t\t// 采购总重量\n private Double purchaseSumAmt = 0D;\t\t\t\t\t\t// 采购总金额\n private Double logisticsSumCost = 0D;\t\t\t\t\t // 物流总货款\n private Double salePrice = 0D;\t\t\t\t\t\t\t // 销售单价\n\n private Integer distributionWay = 0;\t\t\t\t\t// 配送方式 0-供方配送 1-自提 2-平台配送\n private String deliveryDate = \"\";\t\t\t\t\t\t// 交货日期\n private Integer receivableWay = 0;\t\t\t\t\t\t// 结算方式 0-全额授信 1-部分授信 2-款到发货\n private Double creditAmount = 0D;\t\t\t\t\t\t// 授信金额\n private Integer receivableDay = 0;\t\t\t\t\t\t// 货到收款天数- 账期\n\n private String packagSpec = \"\";\t\t\t\t\t\t// 包装规格\n\n private Double memberMoneyRate = 0D;\t\t\t\t\t// 服务费利率\n private\tDouble serviceAmt = 0D;\t\t\t\t\t\t// 服务费\n */\n /**\n * /order/purchase_save_sale_order // 一键下单 todo\n */\n @FormUrlEncoded\n @POST(\"order/purchase_save_sale_order\")\n Observable<VerifyData> postOrderData(@Field(\"token\") String token,\n @Field(\"memberPurchaseId\") Long memberPurchaseId,\n @Field(\"sellMemberQuoteId\") Long sellMemberQuoteId,\n @Field(\"saleSumQty\") Double saleSumQty,\n @Field(\"saleSumAmt\") Double saleSumAmt,\n @Field(\"purchaseSumQty\") Double purchaseSumQty,\n @Field(\"purchaseSumAmt\") Double purchaseSumAmt,\n @Field(\"logisticsSumCost\") Double logisticsSumCost,\n @Field(\"salePrice\") Double salePrice,\n @Field(\"distributionWay\") int distributionWay,\n @Field(\"deliveryDate\") String deliveryDate,\n @Field(\"receivableWay\") int receivableWay,\n @Field(\"creditAmount\") Double creditAmount,\n @Field(\"receivableDay\") int receivableDay,\n @Field(\"packagSpec\") String packagSpec,\n @Field(\"memberMoneyRate\") Double memberMoneyRate,\n @Field(\"serviceAmt\") Double serviceAmt);\n\n\n\n\n\n /**\n * OrderFragment 订单列表\n * @param token\n * @param subStatus\n * 10-待审核 12-待支付手续费 11-待上传采购合同\n * 20-待收款 30-待付款 40-待发货 50-待确认收货\n * 90-交易失败 100-待开票? 101-待开票审核? 102-交易成功\n */\n @GET(\"order/query_order_list\")\n Observable<OrdersData> getOrderData(@Query(\"token\") String token,\n @Query(\"subStatus\") String subStatus,\n @Query(\"pageNum\") int pageNum,\n @Query(\"pageSize\") int pageSize);\n\n /**\n * 订单详情\n * order/query_order_detail?token&orderId\n */\n @GET(\"order/query_order_detail\")\n Observable<OrderDetailData> getOrderDetailData(@Query(\"token\") String token,\n @Query(\"orderId\") String orderId);\n\n /**\n * 支付手续费\n * order/member_purchase_alipay_create?token&orderSn&goodsAmount 支付宝 todo\n * order/member_purchase_wx_create?token&orderSn&goodsAmount 微信 todo\n * private String operateStatus;\t// 操作状态 null没有; A0-支付手续费; A1-开票申请; A2-申请展期\n */\n\n // 支付宝支付\n @FormUrlEncoded\n @POST(\"order/member_purchase_alipay_create\")\n Observable<OrderData> postAliPayData(@Field(\"token\") String token,\n @Query(\"orderId\") String orderId,\n @Field(\"orderSn\") String orderSn,\n @Field(\"goodsAmount\") String goodsAmount);\n\n\n\n // 微信支付\n @FormUrlEncoded\n @POST(\"order/member_purchase_wx_create\")\n Observable<OrderPayData> postWeChatPayData(@Field(\"token\") String token,\n @Query(\"orderId\") String orderId,\n @Field(\"orderSn\") String orderSn,\n @Field(\"goodsAmount\") String goodsAmount);\n\n /**\n * rder/query_extends_days_detail?orderId&token 展期详情\n * order/save_extends_days 申请展期\n */\n @GET(\"order/query_extends_days_detail\")\n Observable<ExtensionData> getExtensionData(@Query(\"token\") String token,\n @Query(\"orderId\") String orderId);\n\n /**\n * order/save_extends_days 申请展期\n * private String token ;\n private Long orderId = 0L; // 订单Id\n private String contractCode = \"\"; // 关联合同号\n private Double amount = 0D; // 金额\n private Integer days = 0; // 天数\n private String note = \"\"; // 备注\n */\n\n @FormUrlEncoded\n @POST(\"order/save_extends_days\")\n Observable<VerifyData> postExtensionData(@Field(\"token\") String token,\n @Query(\"orderId\") long orderId,\n @Field(\"contractCode\") String contractCode,\n @Field(\"amount\") double amount,\n @Field(\"days\") int days,\n @Field(\"note\") String note);\n\n}", "public interface QueryService {\n @GET(API.URL_CLOCK)\n Call<String> query(@Path(\"page\") int page);\n\n @GET(API.URL_LEAVE)\n Call<String> getLeaveData();\n\n @GET(API.URL_BROADCAST_DETAIL)\n Call<String> getBroadcastData(@Query(\"mid\") String mid);\n}", "public abstract void callback_query(CallbackQuery cq);", "public interface SubscriptionManager {\n\n void subscribe(Subscription subscription);\n\n void updateMetric(String tenant, String metricId, Metric.Update update);\n void updateForecaster(String tenant, String metricId, org.hawkular.datamining.forecast.Forecaster.Update update);\n\n boolean isSubscribed(String tenant, String metricId);\n Subscription subscription(String tenant, String metricId);\n Set<Subscription> subscriptionsOfTenant(String tenant);\n\n void unsubscribeAll(String tenant, String metricId);\n void unsubscribe(String tenant, String metricId, Subscription.SubscriptionOwner subscriptionOwner);\n void unsubscribe(String tenant, String metricId, Set<Subscription.SubscriptionOwner> subscriptionOwners);\n\n void setPredictionListener(PredictionListener predictionListener);\n}", "public interface XmppMessagingEvent {\n\n void onLogin();\n void onConnect();\n void onDisconnect();\n void onIncomingMessage();\n void onReceiptMessageReceived();\n}", "public interface DataConnection {\n\n public void subscribe(NewsItemHandler handler);\n\n public void unsubscribe();\n}", "@Override\n public void queryIdArrived(final QueryId queryId) {\n }", "public interface MarketWatcher {\n Stock getQuote(String symbol);\n}", "public interface GsoapCallEventListener {\n void onEventSend(int eventType, String... data);\n}", "public interface OnQueryReadyInterface {\n void onQueryReady(String query);\n}", "messages.Facademessages.Subscribe getSubscribe();", "public void callMarket(OrderManagementContext orderManagementContext_);", "com.exacttarget.wsdl.partnerapi.QueryRequest addNewQueryRequest();", "public interface Publisher {\n public void subscribe(Product.Type t, Subscriber s);\n public void unsubscribe(Product.Type t, Subscriber s);\n public void notifySubscribers(Product.Type eventType);\n}", "public interface VOMSProtocolListener {\n\n /**\n * Informs that a VOMS HTTP GET request is being issued for the URL passed as\n * argument\n * \n * @param url\n * the request url\n */\n public void notifyHTTPRequest(String url);\n\n /**\n * Informs that a VOMS legacy request is being issued\n * \n * @param xmlLegacyRequest\n * a string representation of the XML legacy request\n */\n public void notifyLegacyRequest(String xmlLegacyRequest);\n\n /**\n * Informs that a VOMSResponse was received from a remote VOMS server\n * \n * @param r\n * the received {@link VOMSResponse}\n */\n public void notifyReceivedResponse(VOMSResponse r);\n}", "public interface IResultsAvailable {\n public void onResultsAvailable(QueryResult results);\n}", "public interface ContinuousQuery<K, V> {\n\n /**\n * Add a listener for a continuous query.\n *\n * @param queryString the query\n * @param listener the listener\n */\n <C> void addContinuousQueryListener(String queryString, ContinuousQueryListener<K, C> listener);\n\n /**\n * Add a listener for a continuous query.\n *\n * @param queryString the query\n * @param namedParameters the query parameters\n * @param listener the listener\n */\n <C> void addContinuousQueryListener(String queryString, Map<String, Object> namedParameters, ContinuousQueryListener<K, C> listener);\n\n /**\n * Add a listener for a continuous query.\n *\n * @param query the query object\n * @param listener the listener\n */\n <C> void addContinuousQueryListener(Query<?> query, ContinuousQueryListener<K, C> listener);\n\n /**\n * Remove a continuous query listener.\n *\n * @param listener the listener to remove\n */\n void removeContinuousQueryListener(ContinuousQueryListener<K, ?> listener);\n\n /**\n * Get the list of currently registered listeners.\n */\n List<ContinuousQueryListener<K, ?>> getListeners();\n\n /**\n * Unregisters all listeners.\n */\n void removeAllListeners();\n}", "private void subscribe() {\r\n\r\n OnUpdatePlayerSubscription subscription = OnUpdatePlayerSubscription.builder().build();\r\n subscriptionWatcher = awsAppSyncClient.subscribe(subscription);\r\n subscriptionWatcher.execute(subCallback);\r\n }", "void setQueryRequest(com.exacttarget.wsdl.partnerapi.QueryRequest queryRequest);", "public interface MovieSubscription {\n\n void subscribe(double amount);\n}", "public interface EventChannel {\n /**\n * Gets the id property: Fully qualified resource Id for the resource.\n *\n * @return the id value.\n */\n String id();\n\n /**\n * Gets the name property: The name of the resource.\n *\n * @return the name value.\n */\n String name();\n\n /**\n * Gets the type property: The type of the resource.\n *\n * @return the type value.\n */\n String type();\n\n /**\n * Gets the systemData property: The system metadata relating to Event Channel resource.\n *\n * @return the systemData value.\n */\n SystemData systemData();\n\n /**\n * Gets the source property: Source of the event channel. This represents a unique resource in the partner's\n * resource model.\n *\n * @return the source value.\n */\n EventChannelSource source();\n\n /**\n * Gets the destination property: Represents the destination of an event channel.\n *\n * @return the destination value.\n */\n EventChannelDestination destination();\n\n /**\n * Gets the provisioningState property: Provisioning state of the event channel.\n *\n * @return the provisioningState value.\n */\n EventChannelProvisioningState provisioningState();\n\n /**\n * Gets the partnerTopicReadinessState property: The readiness state of the corresponding partner topic.\n *\n * @return the partnerTopicReadinessState value.\n */\n PartnerTopicReadinessState partnerTopicReadinessState();\n\n /**\n * Gets the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this timer expires\n * while the corresponding partner topic is never activated, the event channel and corresponding partner topic are\n * deleted.\n *\n * @return the expirationTimeIfNotActivatedUtc value.\n */\n OffsetDateTime expirationTimeIfNotActivatedUtc();\n\n /**\n * Gets the filter property: Information about the filter for the event channel.\n *\n * @return the filter value.\n */\n EventChannelFilter filter();\n\n /**\n * Gets the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to remove any\n * ambiguity of the origin of creation of the partner topic for the customer.\n *\n * @return the partnerTopicFriendlyDescription value.\n */\n String partnerTopicFriendlyDescription();\n\n /**\n * Gets the inner com.azure.resourcemanager.eventgrid.fluent.models.EventChannelInner object.\n *\n * @return the inner object.\n */\n EventChannelInner innerModel();\n\n /** The entirety of the EventChannel definition. */\n interface Definition\n extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {\n }\n /** The EventChannel definition stages. */\n interface DefinitionStages {\n /** The first stage of the EventChannel definition. */\n interface Blank extends WithParentResource {\n }\n /** The stage of the EventChannel definition allowing to specify parent resource. */\n interface WithParentResource {\n /**\n * Specifies resourceGroupName, partnerNamespaceName.\n *\n * @param resourceGroupName The name of the resource group within the user's subscription.\n * @param partnerNamespaceName Name of the partner namespace.\n * @return the next definition stage.\n */\n WithCreate withExistingPartnerNamespace(String resourceGroupName, String partnerNamespaceName);\n }\n /**\n * The stage of the EventChannel definition which contains all the minimum required properties for the resource\n * to be created, but also allows for any other optional properties to be specified.\n */\n interface WithCreate\n extends DefinitionStages.WithSource,\n DefinitionStages.WithDestination,\n DefinitionStages.WithExpirationTimeIfNotActivatedUtc,\n DefinitionStages.WithFilter,\n DefinitionStages.WithPartnerTopicFriendlyDescription {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n EventChannel create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n EventChannel create(Context context);\n }\n /** The stage of the EventChannel definition allowing to specify source. */\n interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n WithCreate withSource(EventChannelSource source);\n }\n /** The stage of the EventChannel definition allowing to specify destination. */\n interface WithDestination {\n /**\n * Specifies the destination property: Represents the destination of an event channel..\n *\n * @param destination Represents the destination of an event channel.\n * @return the next definition stage.\n */\n WithCreate withDestination(EventChannelDestination destination);\n }\n /** The stage of the EventChannel definition allowing to specify expirationTimeIfNotActivatedUtc. */\n interface WithExpirationTimeIfNotActivatedUtc {\n /**\n * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this\n * timer expires while the corresponding partner topic is never activated, the event channel and\n * corresponding partner topic are deleted..\n *\n * @param expirationTimeIfNotActivatedUtc Expiration time of the event channel. If this timer expires while\n * the corresponding partner topic is never activated, the event channel and corresponding partner topic\n * are deleted.\n * @return the next definition stage.\n */\n WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);\n }\n /** The stage of the EventChannel definition allowing to specify filter. */\n interface WithFilter {\n /**\n * Specifies the filter property: Information about the filter for the event channel..\n *\n * @param filter Information about the filter for the event channel.\n * @return the next definition stage.\n */\n WithCreate withFilter(EventChannelFilter filter);\n }\n /** The stage of the EventChannel definition allowing to specify partnerTopicFriendlyDescription. */\n interface WithPartnerTopicFriendlyDescription {\n /**\n * Specifies the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be\n * set by the publisher/partner to show custom description for the customer partner topic. This will be\n * helpful to remove any ambiguity of the origin of creation of the partner topic for the customer..\n *\n * @param partnerTopicFriendlyDescription Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to\n * remove any ambiguity of the origin of creation of the partner topic for the customer.\n * @return the next definition stage.\n */\n WithCreate withPartnerTopicFriendlyDescription(String partnerTopicFriendlyDescription);\n }\n }\n /**\n * Begins update for the EventChannel resource.\n *\n * @return the stage of resource update.\n */\n EventChannel.Update update();\n\n /** The template for EventChannel update. */\n interface Update\n extends UpdateStages.WithSource,\n UpdateStages.WithDestination,\n UpdateStages.WithExpirationTimeIfNotActivatedUtc,\n UpdateStages.WithFilter,\n UpdateStages.WithPartnerTopicFriendlyDescription {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n EventChannel apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n EventChannel apply(Context context);\n }\n /** The EventChannel update stages. */\n interface UpdateStages {\n /** The stage of the EventChannel update allowing to specify source. */\n interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n Update withSource(EventChannelSource source);\n }\n /** The stage of the EventChannel update allowing to specify destination. */\n interface WithDestination {\n /**\n * Specifies the destination property: Represents the destination of an event channel..\n *\n * @param destination Represents the destination of an event channel.\n * @return the next definition stage.\n */\n Update withDestination(EventChannelDestination destination);\n }\n /** The stage of the EventChannel update allowing to specify expirationTimeIfNotActivatedUtc. */\n interface WithExpirationTimeIfNotActivatedUtc {\n /**\n * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this\n * timer expires while the corresponding partner topic is never activated, the event channel and\n * corresponding partner topic are deleted..\n *\n * @param expirationTimeIfNotActivatedUtc Expiration time of the event channel. If this timer expires while\n * the corresponding partner topic is never activated, the event channel and corresponding partner topic\n * are deleted.\n * @return the next definition stage.\n */\n Update withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);\n }\n /** The stage of the EventChannel update allowing to specify filter. */\n interface WithFilter {\n /**\n * Specifies the filter property: Information about the filter for the event channel..\n *\n * @param filter Information about the filter for the event channel.\n * @return the next definition stage.\n */\n Update withFilter(EventChannelFilter filter);\n }\n /** The stage of the EventChannel update allowing to specify partnerTopicFriendlyDescription. */\n interface WithPartnerTopicFriendlyDescription {\n /**\n * Specifies the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be\n * set by the publisher/partner to show custom description for the customer partner topic. This will be\n * helpful to remove any ambiguity of the origin of creation of the partner topic for the customer..\n *\n * @param partnerTopicFriendlyDescription Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to\n * remove any ambiguity of the origin of creation of the partner topic for the customer.\n * @return the next definition stage.\n */\n Update withPartnerTopicFriendlyDescription(String partnerTopicFriendlyDescription);\n }\n }\n /**\n * Refreshes the resource to sync with Azure.\n *\n * @return the refreshed resource.\n */\n EventChannel refresh();\n\n /**\n * Refreshes the resource to sync with Azure.\n *\n * @param context The context to associate with this operation.\n * @return the refreshed resource.\n */\n EventChannel refresh(Context context);\n}", "void subscribe();", "public interface AllStockInteractor <T> {\n Subscription lodeAllStockList(RequestCallBack<T> callback, Call<Stocklist> call);\n}", "public Response fire(EventI event);", "public interface APICallbacks\r\n{\r\n\r\n /**\r\n * <p>This is the copyright notice for this class </p>\r\n *\r\n * @copyright<br><p><B>Patsystems UK Limited 2000-2007</b></p>\r\n */\r\n public static final String COPYRIGHT = \"Copyright (c) Patsystems UK Limited 2000-2007\";\r\n\r\n /**\r\n * Host Link Status Change message ID.\r\n */\r\n public static final int MID_HOST_LINK_CHANGE = 1;\r\n\r\n /**\r\n * Price Link Status Change message ID.\r\n */\r\n public static final int MID_PRICE_LINK_CHANGE = 2;\r\n\r\n /**\r\n * Logon Status message ID.\r\n */\r\n public static final int MID_LOGON_STATUS = 3;\r\n\r\n /**\r\n * User Message message ID.\r\n */\r\n public final static int MID_MESSAGE = 4;\r\n\r\n /**\r\n * Order message ID.\r\n */\r\n public static final int MID_ORDER = 5;\r\n\r\n /**\r\n * End of Day message ID.\r\n */\r\n public static final int MID_FORCED_LOGOUT = 6;\r\n\r\n /**\r\n * Download Complete message ID.\r\n */\r\n public static final int MID_DOWNLOAD_COMPLETE = 7;\r\n\r\n /**\r\n * Price Change message ID.\r\n */\r\n public static final int MID_PRICE = 8;\r\n\r\n /**\r\n * Fill message ID.\r\n */\r\n public static final int MID_FILL = 9;\r\n\r\n /**\r\n * Status Update message ID.\r\n */\r\n public static final int MID_STATUS = 10;\r\n\r\n /**\r\n * Contract Added message ID.\r\n */\r\n public static final int MID_CONTRACT_ADDED = 11;\r\n\r\n /**\r\n * Contract Deleted message ID.\r\n */\r\n public static final int MID_CONTRACT_DELETED = 12;\r\n\r\n /**\r\n * Exchange Rate Updated message ID.\r\n */\r\n public static final int MID_EXCHANGE_RATE = 13;\r\n\r\n /**\r\n * Connectivity Status Update message ID.\r\n */\r\n public static final int MID_CONNECTIVITY_STATUS = 14;\r\n\r\n /**\r\n * Order Cancellation Timeout message ID.\r\n */\r\n public static final int MID_ORDER_CANCEL_FAILURE_ID = 15;\r\n\r\n /**\r\n * At Best message ID.\r\n */\r\n public static final int MID_AT_BEST_ID = 16;\r\n\r\n /**\r\n * Memory warning message ID.\r\n */\r\n public static final int MID_MEMORY_WARNING = 18;\r\n\r\n /**\r\n * Subscriber Depth message ID.\r\n */\r\n public static final int MID_SUBSCRIBER_DEPTH = 19;\r\n\r\n /**\r\n * DOM update message ID.\r\n */\r\n public static final int MID_DOM_UPDATE = 21;\r\n\r\n /**\r\n * Settlement Price message ID.\r\n */\r\n public static final int MID_SETTLEMENT_PRICE = 22;\r\n\r\n /**\r\n * Strategy creation successfullyReceived ID.\r\n */\r\n public static final int MID_STRATEGY_CREATION_RECEIVED = 23;\r\n\r\n /**\r\n * Strategy creation failure ID.\r\n */\r\n public static final int MID_STRATEGY_CREATION_FAILURE = 24;\r\n\r\n /**\r\n * Generic Price message ID.\r\n */\r\n public static final int MID_GENERIC_PRICE = 26;\r\n\r\n /**\r\n * Price blank message ID\r\n */\r\n public static final int MID_BLANK_PRICE = 27;\r\n\r\n /**\r\n * Order Queued Timeout ID.\r\n */\r\n public static final int MID_ORDER_QUEUED_TIMEOUT = 28;\r\n\r\n /**\r\n * Order Sent Timeout ID.\r\n */\r\n public static final int MID_ORDER_SENT_TIMEOUT = 29;\r\n\r\n /**\r\n * Order Book reset ID.\r\n */\r\n public static final int MID_RESET_ORDERBOOK = 30;\r\n\r\n /**\r\n * Exception/Error ID (Internal).\r\n */\r\n public static final int MID_ERROR = -1;\r\n\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQ = 100;\r\n\r\n /**\r\n * LOW Price Alert.\r\n */\r\n public static final int MID_LOWPRICE = 101;\r\n\r\n /**\r\n * HIGH Price Alert.\r\n */\r\n public static final int MID_HIGHPRICE = 102;\r\n\r\n\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQI_BID = 103;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQI_OFFER = 104;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQI_2_SIDES = 105;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_BID = 106;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_OFFER = 107;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_2_SIDES = 108;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_CROSS = 109;\r\n\r\n /**\r\n * Strategy creation strategy created event id.\r\n */\r\n public static final int MID_STRATEGY_CREATION_CREATED = 200;\r\n\r\n /**\r\n * Event ID to update order history\r\n */\r\n public static final int MID_UPDATE_ORDERHISTORY = 1000;\r\n\r\n\r\n}", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "public interface DbSubscriber extends Subscriber {\n void onDbDataUpdated(@Db.DbEvent int tableId, Object dbObject);\n\n void onDbErrorError(@Db.DbEvent int tableId, Object error);\n}", "public interface EsConnection {\n\n /**\n * Write events to a stream\n * <p>\n * When writing events to a stream the {@link eventstore.core.ExpectedVersion} choice can\n * make a very large difference in the observed behavior. For example, if no stream exists\n * and ExpectedVersion.Any is used, a new stream will be implicitly created when appending.\n * <p>\n * There are also differences in idempotency between different types of calls.\n * If you specify an ExpectedVersion aside from ExpectedVersion.Any the Event Store\n * will give you an idempotency guarantee. If using ExpectedVersion.Any the Event Store\n * will do its best to provide idempotency but does not guarantee idempotency\n *\n * @param stream name of the stream to write events to\n * @param expectedVersion expected version of the stream to write to, or <code>ExpectedVersion.Any</code> if <code>null</code>\n * @param events events to append to the stream\n * @param credentials optional user credentials to perform operation with.\n * @return A {@link scala.concurrent.Future} that the caller can await on\n */\n Future<WriteResult> writeEvents(\n String stream,\n ExpectedVersion expectedVersion,\n Collection<EventData> events,\n UserCredentials credentials);\n\n /**\n * Write events to a stream\n * <p>\n * When writing events to a stream the {@link eventstore.core.ExpectedVersion} choice can\n * make a very large difference in the observed behavior. For example, if no stream exists\n * and ExpectedVersion.Any is used, a new stream will be implicitly created when appending.\n * <p>\n * There are also differences in idempotency between different types of calls.\n * If you specify an ExpectedVersion aside from ExpectedVersion.Any the Event Store\n * will give you an idempotency guarantee. If using ExpectedVersion.Any the Event Store\n * will do its best to provide idempotency but does not guarantee idempotency\n *\n * @param stream name of the stream to write events to\n * @param expectedVersion expected version of the stream to write to, or <code>ExpectedVersion.Any</code> if <code>null</code>\n * @param events events to append to the stream\n * @param credentials optional user credentials to perform operation with.\n * @param requireMaster Require Event Store to refuse operation if it is not master\n * @return A {@link scala.concurrent.Future} that the caller can await on\n */\n Future<WriteResult> writeEvents(\n String stream,\n ExpectedVersion expectedVersion,\n Collection<EventData> events,\n UserCredentials credentials,\n boolean requireMaster);\n\n /**\n * Deletes a stream from the Event Store\n *\n * @param stream name of the stream to delete\n * @param expectedVersion optional expected version that the stream should have when being deleted, or <code>ExpectedVersion.Any</code> if <code>null</code>\n * @param credentials optional user credentials to perform operation with.\n * @return A {@link scala.concurrent.Future} that the caller can await on\n */\n Future<DeleteResult> deleteStream(\n String stream,\n ExpectedVersion.Existing expectedVersion,\n UserCredentials credentials);\n\n /**\n * Deletes a stream from the Event Store\n *\n * @param stream name of the stream to delete\n * @param expectedVersion optional expected version that the stream should have when being deleted, or <code>ExpectedVersion.Any</code> if <code>null</code>\n * @param hardDelete Indicator for tombstoning vs soft-deleting the stream. Tombstoned streams can never be recreated. Soft-deleted streams can be written to again, but the EventNumber sequence will not start from 0.\n * @param credentials optional user credentials to perform operation with.\n * @return A {@link scala.concurrent.Future} that the caller can await on\n */\n Future<DeleteResult> deleteStream(\n String stream,\n ExpectedVersion.Existing expectedVersion,\n boolean hardDelete,\n UserCredentials credentials);\n\n /**\n * Deletes a stream from the Event Store\n *\n * @param stream name of the stream to delete\n * @param expectedVersion optional expected version that the stream should have when being deleted, or <code>ExpectedVersion.Any</code> if <code>null</code>\n * @param hardDelete Indicator for tombstoning vs soft-deleting the stream. Tombstoned streams can never be recreated. Soft-deleted streams can be written to again, but the EventNumber sequence will not start from 0.\n * @param credentials optional user credentials to perform operation with.\n * @param requireMaster Require Event Store to refuse operation if it is not master\n * @return A {@link scala.concurrent.Future} that the caller can await on\n */\n Future<DeleteResult> deleteStream(\n String stream,\n ExpectedVersion.Existing expectedVersion,\n boolean hardDelete,\n UserCredentials credentials,\n boolean requireMaster);\n\n /**\n * Starts a transaction in the event store on a given stream asynchronously\n * <p>\n * A {@link eventstore.j.EsTransaction} allows the calling of multiple writes with multiple\n * round trips over long periods of time between the caller and the event store. This method\n * is only available through the TCP interface and no equivalent exists for the RESTful interface.\n *\n * @param stream The stream to start a transaction on\n * @param expectedVersion The expected version of the stream at the time of starting the transaction\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link scala.concurrent.Future} containing an actual transaction\n */\n Future<EsTransaction> startTransaction(\n String stream,\n ExpectedVersion expectedVersion,\n UserCredentials credentials);\n\n /**\n * Starts a transaction in the event store on a given stream asynchronously\n * <p>\n * A {@link eventstore.j.EsTransaction} allows the calling of multiple writes with multiple\n * round trips over long periods of time between the caller and the event store. This method\n * is only available through the TCP interface and no equivalent exists for the RESTful interface.\n *\n * @param stream The stream to start a transaction on\n * @param expectedVersion The expected version of the stream at the time of starting the transaction\n * @param credentials The optional user credentials to perform operation with\n * @param requireMaster Require Event Store to refuse operation if it is not master\n * @return A {@link scala.concurrent.Future} containing an actual transaction\n */\n Future<EsTransaction> startTransaction(\n String stream,\n ExpectedVersion expectedVersion,\n UserCredentials credentials,\n boolean requireMaster);\n\n\n /**\n * Continues transaction by provided transaction ID.\n * <p>\n * A {@link eventstore.j.EsTransaction} allows the calling of multiple writes with multiple\n * round trips over long periods of time between the caller and the event store. This method\n * is only available through the TCP interface and no equivalent exists for the RESTful interface.\n *\n * @param transactionId The transaction ID that needs to be continued.\n * @param credentials The optional user credentials to perform operation with\n * @return A transaction for given id\n */\n EsTransaction continueTransaction(long transactionId, UserCredentials credentials);\n\n\n /**\n * Reads a single event from a stream at event number\n *\n * @param stream name of the stream to read from\n * @param eventNumber optional event number to read, or EventNumber.Last for reading latest event, EventNumber.Last if null\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link scala.concurrent.Future} containing an event\n */\n Future<Event> readEvent(\n String stream,\n EventNumber eventNumber,\n boolean resolveLinkTos,\n UserCredentials credentials);\n\n /**\n * Reads a single event from a stream at event number\n *\n * @param stream name of the stream to read from\n * @param eventNumber optional event number to read, or EventNumber.Last for reading latest event, EventNumber.Last if null\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @param requireMaster Require Event Store to refuse operation if it is not master\n * @return A {@link scala.concurrent.Future} containing an event\n */\n Future<Event> readEvent(\n String stream,\n EventNumber eventNumber,\n boolean resolveLinkTos,\n UserCredentials credentials,\n boolean requireMaster);\n\n\n /**\n * Reads count events from a stream forwards (e.g. oldest to newest) starting from event number\n *\n * @param stream name of stream to read from\n * @param fromNumber optional event number to read, EventNumber.First if null\n * @param maxCount maximum count of items to read\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link scala.concurrent.Future} containing the results of the read operation\n */\n Future<ReadStreamEventsCompleted> readStreamEventsForward(\n String stream,\n EventNumber.Exact fromNumber,\n int maxCount,\n boolean resolveLinkTos,\n UserCredentials credentials);\n\n /**\n * Reads count events from a stream forwards (e.g. oldest to newest) starting from event number\n *\n * @param stream name of stream to read from\n * @param fromNumber optional event number to read, EventNumber.First if null\n * @param maxCount maximum count of items to read\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @param requireMaster Require Event Store to refuse operation if it is not master\n * @return A {@link scala.concurrent.Future} containing the results of the read operation\n */\n Future<ReadStreamEventsCompleted> readStreamEventsForward(\n String stream,\n EventNumber.Exact fromNumber,\n int maxCount,\n boolean resolveLinkTos,\n UserCredentials credentials,\n boolean requireMaster);\n\n\n /**\n * Reads count events from from a stream backwards (e.g. newest to oldest) starting from event number\n *\n * @param stream name of stream to read from\n * @param fromNumber optional event number to read, EventNumber.Last if null\n * @param maxCount maximum count of items to read\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link scala.concurrent.Future} containing the results of the read operation\n */\n Future<ReadStreamEventsCompleted> readStreamEventsBackward(\n String stream,\n EventNumber fromNumber,\n int maxCount,\n boolean resolveLinkTos,\n UserCredentials credentials);\n\n /**\n * Reads count events from from a stream backwards (e.g. newest to oldest) starting from event number\n *\n * @param stream name of stream to read from\n * @param fromNumber optional event number to read, EventNumber.Last if null\n * @param maxCount maximum count of items to read\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @param requireMaster Require Event Store to refuse operation if it is not master\n * @return A {@link scala.concurrent.Future} containing the results of the read operation\n */\n Future<ReadStreamEventsCompleted> readStreamEventsBackward(\n String stream,\n EventNumber fromNumber,\n int maxCount,\n boolean resolveLinkTos,\n UserCredentials credentials,\n boolean requireMaster);\n\n\n /**\n * Reads all events in the node forward (e.g. beginning to end) starting from position\n *\n * @param fromPosition optional position to start reading from, Position.First of null\n * @param maxCount maximum count of items to read\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link scala.concurrent.Future} containing the results of the read operation\n */\n Future<ReadAllEventsCompleted> readAllEventsForward(\n Position fromPosition,\n int maxCount,\n boolean resolveLinkTos,\n UserCredentials credentials);\n\n /**\n * Reads all events in the node forward (e.g. beginning to end) starting from position\n *\n * @param fromPosition optional position to start reading from, Position.First of null\n * @param maxCount maximum count of items to read\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @param requireMaster Require Event Store to refuse operation if it is not master\n * @return A {@link scala.concurrent.Future} containing the results of the read operation\n */\n Future<ReadAllEventsCompleted> readAllEventsForward(\n Position fromPosition,\n int maxCount,\n boolean resolveLinkTos,\n UserCredentials credentials,\n boolean requireMaster);\n\n\n /**\n * Reads all events in the node backwards (e.g. end to beginning) starting from position\n *\n * @param fromPosition optional position to start reading from, Position.Last of null\n * @param maxCount maximum count of items to read\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link scala.concurrent.Future} containing the results of the read operation\n */\n Future<ReadAllEventsCompleted> readAllEventsBackward(\n Position fromPosition,\n int maxCount,\n boolean resolveLinkTos,\n UserCredentials credentials);\n\n /**\n * Reads all events in the node backwards (e.g. end to beginning) starting from position\n *\n * @param fromPosition optional position to start reading from, Position.Last of null\n * @param maxCount maximum count of items to read\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @param requireMaster Require Event Store to refuse operation if it is not master\n * @return A {@link scala.concurrent.Future} containing the results of the read operation\n */\n Future<ReadAllEventsCompleted> readAllEventsBackward(\n Position fromPosition,\n int maxCount,\n boolean resolveLinkTos,\n UserCredentials credentials,\n boolean requireMaster);\n\n\n /**\n * Subscribes to a single event stream. New events\n * written to the stream while the subscription is active will be\n * pushed to the client.\n *\n * @param stream The stream to subscribe to\n * @param observer A {@link eventstore.akka.SubscriptionObserver} to handle a new event received over the subscription\n * @param resolveLinkTos Whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link java.io.Closeable} representing the subscription which can be closed.\n */\n Closeable subscribeToStream(\n String stream,\n SubscriptionObserver<Event> observer,\n boolean resolveLinkTos,\n UserCredentials credentials);\n\n\n /**\n * Subscribes to a single event stream. Existing events from\n * lastCheckpoint onwards are read from the stream\n * and presented to the user of <code>SubscriptionObserver</code>\n * as if they had been pushed.\n * <p>\n * Once the end of the stream is read the subscription is\n * transparently (to the user) switched to push new events as\n * they are written.\n * <p>\n * If events have already been received and resubscription from the same point\n * is desired, use the event number of the last event processed which\n * appeared on the subscription.\n *\n * @param stream The stream to subscribe to\n * @param observer A {@link eventstore.akka.SubscriptionObserver} to handle a new event received over the subscription\n * @param fromEventNumberExclusive The event number from which to start, or <code>null</code> to read all events.\n * @param resolveLinkTos Whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link java.io.Closeable} representing the subscription which can be closed.\n */\n Closeable subscribeToStreamFrom(\n String stream,\n SubscriptionObserver<Event> observer,\n Long fromEventNumberExclusive,\n boolean resolveLinkTos,\n UserCredentials credentials);\n\n /**\n * Subscribes to all events in the Event Store. New events written to the stream\n * while the subscription is active will be pushed to the client.\n *\n * @param observer A {@link eventstore.akka.SubscriptionObserver} to handle a new event received over the subscription\n * @param resolveLinkTos Whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link java.io.Closeable} representing the subscription which can be closed.\n */\n Closeable subscribeToAll(\n SubscriptionObserver<IndexedEvent> observer,\n boolean resolveLinkTos,\n UserCredentials credentials);\n\n\n /**\n * Subscribes to a all events. Existing events from position\n * onwards are read from the Event Store and presented to the user of\n * <code>SubscriptionObserver</code> as if they had been pushed.\n * <p>\n * Once the end of the stream is read the subscription is\n * transparently (to the user) switched to push new events as\n * they are written.\n * <p>\n * If events have already been received and resubscription from the same point\n * is desired, use the position representing the last event processed which\n * appeared on the subscription.\n *\n * @param observer A {@link eventstore.akka.SubscriptionObserver} to handle a new event received over the subscription\n * @param fromPositionExclusive The position from which to start, or <code>null</code> to read all events\n * @param resolveLinkTos Whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link java.io.Closeable} representing the subscription which can be closed.\n */\n Closeable subscribeToAllFrom(\n SubscriptionObserver<IndexedEvent> observer,\n Position.Exact fromPositionExclusive,\n boolean resolveLinkTos,\n UserCredentials credentials);\n\n\n// TODO support stream not found\n// Future<Unit> setStreamMetadata(String stream, int expectedMetastreamVersion, StreamMetadata metadata, UserCredentials credentials);\n// Future<StreamMetadataResult> getStreamMetadataAsync(String stream, UserCredentials credentials);\n// Future<RawStreamMetadataResult> getStreamMetadataAsRawBytesAsync(String stream, UserCredentials credentials); TODO\n\n /**\n * Sets the metadata for a stream.\n *\n * @param stream The name of the stream for which to set metadata.\n * @param expectedMetastreamVersion The expected version for the write to the metadata stream.\n * @param metadata A byte array representing the new metadata.\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link scala.concurrent.Future} representing the operation\n */\n Future<WriteResult> setStreamMetadata(\n String stream,\n ExpectedVersion expectedMetastreamVersion,\n byte[] metadata,\n UserCredentials credentials);\n\n /**\n * Reads the metadata for a stream as a byte array.\n *\n * @param stream The name of the stream for which to read metadata.\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link scala.concurrent.Future} containing the metadata as byte array.\n */\n Future<byte[]> getStreamMetadataBytes(String stream, UserCredentials credentials);\n\n /**\n * Creates a Source you can use to subscribe to a single event stream. Existing events from\n * event number onwards are read from the stream and presented to the user of\n * <code>Source</code> as if they had been pushed.\n * <p>\n * Once the end of the stream is read the <code>Source</code> transparently (to the user)\n * switches to push new events as they are written.\n * <p>\n * If events have already been received and resubscription from the same point\n * is desired, use the event number of the last event processed.\n *\n * @param stream The stream to subscribe to\n * @param fromEventNumberExclusive The event number from which to start, or <code>null</code> to read all events.\n * @param resolveLinkTos Whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @param infinite Whether to subscribe to the future events upon reading all current\n * @return A {@link akka.stream.javadsl.Source} representing the stream\n */\n Source<Event, NotUsed> streamSource(\n String stream,\n EventNumber fromEventNumberExclusive,\n boolean resolveLinkTos,\n UserCredentials credentials,\n boolean infinite);\n\n /**\n * Creates a Source you can use to subscribes to all events. Existing events from position\n * onwards are read from the Event Store and presented to the user of\n * <code>Source</code> as if they had been pushed.\n * <p>\n * Once the end of the stream is read the <code>Source</code> transparently (to the user)\n * switches to push new events as they are written.\n * <p>\n * If events have already been received and resubscription from the same point\n * is desired, use the position representing the last event processed.\n *\n * @param fromPositionExclusive The position from which to start, or <code>null</code> to read all events\n * @param resolveLinkTos Whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @param infinite Whether to subscribe to the future events upon reading all current\n * @return A {@link akka.stream.javadsl.Source} representing all streams\n */\n Source<IndexedEvent, NotUsed> allStreamsSource(\n Position fromPositionExclusive,\n boolean resolveLinkTos,\n UserCredentials credentials,\n boolean infinite);\n\n /**\n * Asynchronously create a persistent subscription group on a stream\n *\n * @param stream The name of the stream to create the persistent subscription on\n * @param groupName The name of the group to create\n * @param settings The {@link PersistentSubscriptionSettings} for the subscription, or <code>null</code> for defaults\n * @param credentials The credentials to be used for this operation\n * @return A {@link scala.concurrent.Future} representing the operation\n */\n Future<scala.Unit> createPersistentSubscription(\n String stream,\n String groupName,\n PersistentSubscriptionSettings settings,\n UserCredentials credentials);\n\n /**\n * Asynchronously update a persistent subscription group on a stream\n *\n * @param stream The name of the stream to create the persistent subscription on\n * @param groupName The name of the group to create\n * @param settings The {@link PersistentSubscriptionSettings} for the subscription, or <code>null</code> for defaults\n * @param credentials The credentials to be used for this operation, or <code>null</code> for default\n * @return A {@link scala.concurrent.Future} representing the operation\n */\n Future<scala.Unit> updatePersistentSubscription(\n String stream,\n String groupName,\n PersistentSubscriptionSettings settings,\n UserCredentials credentials);\n\n /**\n * Asynchronously delete a persistent subscription group on a stream\n *\n * @param stream The name of the stream to create the persistent subscription on\n * @param groupName The name of the group to create\n * @param credentials The credentials to be used for this operation, or <code>null</code> for default\n * @return A {@link scala.concurrent.Future} representing the operation\n */\n Future<scala.Unit> deletePersistentSubscription(\n String stream,\n String groupName,\n UserCredentials credentials);\n}", "public interface QARxDataCallBack<T> {\n void onSucess(T t);\n\n void onFail();\n\n}", "public interface PaymentCallBackFacade {\n\n CommonResp callback(NotifyTradeStatusReq notifyTradeStatusReq);\n}", "public interface RmrkXTeeService {\n /**\n * Send a document to the treasury.\n * \n * @param uniqueId A unique identifier for the document\n * @param type Type specified by their service analysis document\n * @param manus A signed digidoc container containing the document\n * @return\n * @throws XRoadServiceConsumptionException\n */\n String sendDocument(String uniqueId, String type, byte[] document) throws XRoadServiceConsumptionException;\n}", "public interface HTTPContract {\n void getRequirementList(AnnounceDataSource.GetRequirementListCallback callback);\n void getFeelingList(AnnounceDataSource.GetFeelingListCallback callback);\n void postFeelingCommend();\n void postFeelingComment();\n// void postRequirementBook();\n// void postRequirementComment();\n\n}", "@Override\n\tpublic PushSubscription subscribeForPush(FactTreeMemento pivotTree,\n\t\t\tFactID pivotID, UUID clientGuid) {\n\t\treturn null;\n\t}", "void vpaid_fireEvent(String type, String value);", "protected abstract void onQueryResult(NewsResponse newsResponse);", "public interface ISubsManager {\n\n public void subscribe(NodeId nodeId);\n}", "public interface OnGetSubscriptionTaskCompleted {\n\n void onGetSubscription(Subscription question);\n\n}", "SubscriptionDetails subscribeToMessage(SubscribeToMessage cmd);", "@Override\n\tpublic void onSubscribe(String arg0, int arg1) {\n\t\t\n\t}", "public void subscribe() {\n mEventBus.subscribe(NetResponseProcessingCompletedEvent.CLASS_NAME, this);\n mEventBus.subscribe(FailureResponseDTO.CLASS_NAME, this);\n }", "public interface SubscriptionListener {\n public void onReceivedMessage(String message);\n}", "public interface CalenderApi {\n\n /**\n * 获取AccessToken\n * @param accessTokenBean\n * @return\n */\n @Headers(\"Content-Type: application/json\" )\n @POST(\"/oauth/token\")\n Observable<AccessTokenResponse> getAccessToken(@Body AccessTokenBean accessTokenBean);\n\n /**\n * 获取RefreshToken\n * @param refreshTokenBean\n * @return\n */\n @Headers(\"Content-Type: application/json\" )\n @POST(\"/oauth/token\")\n Observable<AccessTokenResponse> refreshAccessToken(@Body RefreshTokenBean refreshTokenBean);\n\n /**\n * 取消授权\n * @param revokeTokenBean\n * @return\n */\n @Headers(\"Content-Type: application/json\" )\n @POST(\"/oauth/token\")\n Observable<AccessTokenResponse> revokeToken(@Body RevokeTokenBean revokeTokenBean);\n\n /**\n * 获取日历列表\n * @return\n */\n @GET(\"/v1/calendars\")\n Observable<CalendarBean> getCalendarList();\n\n /**\n * 获取日历时间列表\n * @param fromDate\n * @param toDate\n * @return\n */\n @GET(\"/v1/events?tzid=Etc/UTC\")\n Observable<EventBean> getEventList(@Query(\"from\") String fromDate, @Query(\"to\") String toDate);\n\n}", "public interface SessionMarketDataCache<T> extends MarketDataCache\n{\n String getSessionName();\n\n T getMarketDataForProduct(int classKey, int productKey) throws SystemException, CommunicationException,\n AuthorizationException, DataValidationException, NotFoundException;\n\n /**\n * If there is no market data cached for the product and lazyInitCache is true, then the cache\n * will initialize for the product, and subscribe for the product's class, if it's not already\n * subscribed.\n */\n T getMarketDataForProduct(int classKey, int productKey, boolean lazyInitCache) throws SystemException, CommunicationException,\n AuthorizationException, DataValidationException, NotFoundException;\n\n /**\n * Instruct the cache to maintain a list of products that have received updates since the last\n * time the MarketDataCacheClient called getUpdatedProductsList()\n */\n void maintainUpdatedProductsList(MarketDataCacheClient cacheUser);\n\n /**\n * Return a Set of Products that the MarketDataCache has received updates for. A Set will be\n * maintained by the cache for each MarketDataCacheClient that has been been registered via\n * maintainUpdatedProductsList(). Each time a MarketDataCacheClient calls this method, the\n * cache will clear out the Set of updated Products for that client.\n * @param cacheUser that has registered with maintainUpdatedProductsList()\n * @return Set<SessionKeyWrapper> that this cache has received market data updates for since the\n * last time this MarketDataCacheClient has called this method\n * @throws IllegalArgumentException if maintainUpdatedProductsList() hasn't been called for this\n * MarketDataCacheClient\n */\n Set<SessionKeyWrapper> getUpdatedProductsForClass(MarketDataCacheClient cacheUser,\n SessionKeyWrapper classKeyContainer)\n throws IllegalArgumentException;\n}", "public interface QueryPrescription {\n //处方列表\n// void updateView(Prescription user);\n //内容列表\n void update(PrescriptionContent p);\n //内容详情\n void update(PrescriptionInfo p,boolean is);\n// void showProgressDialog();\n\n// void hideProgressDialog();\n void tokenchange();\n// void showError(String msg);\n void showError(PrescriptionInfo msg,boolean is);\n}", "public Single<ResponseData> executeEventMessageService(Predicate<Record> filter, String path, HttpMethod method,\n JsonObject requestData, DeliveryOptions options) {\n final Comparator<Record> comparator = Comparator.comparingInt(\n r -> EventMethodDefinition.from(r.getMetadata().getJsonObject(EventMessageService.EVENT_METHOD_CONFIG))\n .getOrder());\n return findRecord(filter, EventMessageService.TYPE).sorted(comparator).firstOrError().flatMap(record -> {\n JsonObject config = new JsonObject().put(EventMessageService.SHARED_KEY_CONFIG, sharedKey)\n .put(EventMessageService.DELIVERY_OPTIONS_CONFIG,\n Objects.isNull(options) ? new JsonObject() : options.toJson());\n ServiceReference ref = get().getReferenceWithConfiguration(record, config);\n Single<ResponseData> command = Single.create(source -> ref.getAs(EventMessagePusher.class)\n .execute(path, method, requestData,\n source::onSuccess, source::onError));\n return circuitController.wrap(command).doFinally(ref::release);\n }).doOnError(t -> logger.error(\"Failed when redirect to {} :: {}\", t, method, path));\n }", "public interface CommercialUpdateNotificationService {\n void notify(Commercial commercial);\n}", "protected abstract void onQueryStart();", "@Override\r\n\tpublic int publishEvent(String messageIndicator, String queueName,\r\n\t\t\tString messageType, Object object) throws RemoteException {\n\t\treturn 0;\r\n\t}", "public interface GrabTicketQueryService {\n\n\n /**\n * 抢票查询\n * @param method\n * @param train_date\n * @param from_station\n * @param to_station\n * @return\n */\n JSONObject grabTicketQuery(String uid, String partnerid, String method, String from_station, String to_station, String from_station_name, String to_station_name, String train_date, String purpose_codes);\n// JSONObject grabTicketQuery(String partnerid, String method, String from_station, String to_station, String train_date, String purpose_codes);\n}", "@Override\r\n\tpublic void queryResult(queryResultRequest request, StreamObserver<queryResultResponse> responseObserver) {\n\t\tsuper.queryResult(request, responseObserver);\r\n\t}", "@Subscribe\n public void onEvent(Object event) {\n }", "@Subscribe\n public void onEvent(Object event) {\n }", "public interface IExchangeDataIndexer {\n\t/**\n\t * Get the exchange indexed by this indexer.\n\t * \n\t * @return {@link Exchange}\n\t */\n\tpublic Exchange getExchange();\n\t\n\t/**\n\t * Get the list of indexes managed by this indexer.\n\t * \n\t * @return The list of names of indexes managed by this indexer.\n\t */\n\tpublic List<String> getExchangeIndexes();\n\t\n\t/**\n\t * Updates the list of stocks in this index, by fetching latest data from the source. \n\t * \n\t * @return Updated list of the stocks.\n\t */\n\tList<MarketData> getMarketDataItems(String index);\n\t\n\t/**\n\t * Synchronizes the recently fetched stock data(of a single index) to the data store.\n\t * \n\t * @param exchangeCode Code for this exchange.\n\t * @param items Recently fetched stock data.\n\t */\n\tpublic void syncToDataStore(String exchangeCode, Collection<MarketData> items);\n}", "public interface ServiceApi {\n @GET(\"/user/login\")\n Observable<DlBean> dL(@Query(\"mobile\") String mobile,@Query(\"password\") String password );\n @GET(\"/user/reg\")\n Observable<ZcBean> zC(@Query(\"mobile\") String mobile,@Query(\"password\") String password );\n @GET(\"/ad/getAd\")\n Observable<LbBean> lieb(@Query(\"source\") String source );\n // http://120.27.23.105/product/getProductDetail?pid=1&source=android\n @GET(\"/product/getProductDetail\")\n Observable<XqBean> xQ(@Query(\"source\") String source, @Query(\"pid\") int pid);\n @GET(\"product/getCarts\")\n Observable<MsgBean<List<DataBean>>> getDatas(@Query(\"uid\") String uid, @Query(\"source\") String source);\n @GET(\"product/deleteCart\")\n Observable<MsgBean> deleteData(@Query(\"uid\") String uid, @Query(\"pid\") String pid, @Query(\"source\") String source);\n\n}", "public interface EventContextApi {\n\n /**\n * This API returns a number of events that happened just before and after the specified event. This allows clients to get the\n * context surrounding an event.\n * <br>\n * <b>Requires auth</b>: Yes.\n *\n * @param roomId Required. The room to get events from.\n * @param eventId Required. The event to get context around.\n * @param limit The maximum number of events to return. Default: 10.\n * @return <p>Status code 200: The events and state surrounding the requested event.</p>\n */\n @GET(\"/_matrix/client/r0/rooms/{roomId}/context/{eventId}\")\n EventContextResponse context(@Path(\"roomId\") String roomId, @Path(\"eventId\") String eventId, @Query(\"limit\") Integer limit);\n}", "public interface OtherYqCallback {\n public void onValue(String data);\n}", "public interface OnGetPayFinishedListener {\n void OnGetPayError(String message);\n void OnGetPaySuccess(String message);\n}", "public interface StoreApi {\n\n @GET(\"api/v1.6/store\")\n Observable<ShopItem> getShopItem(@Header(\"app_secret\") String appSecret, @Header(\"Authorization\") String token);\n\n @GET(\"api/v1.6/checkout\")\n Observable<MySabayItem> getMySabayCheckout(@Header(\"app_secret\") String appSecret, @Header(\"Authorization\") String token, @Query(\"uuid\") String uuid);\n\n @GET(\"api/v1.6/cashier\")\n Observable<ThirdPartyItem> get3PartyCheckout(@Header(\"app_secret\") String appSecret, @Header(\"Authorization\") String token, @Query(\"uuid\") String uuid);\n\n @POST(\"api/v1.6/verify_receipt/google\")\n Observable<GoogleVerifyResponse> postToVerifyGoogle(@Header(\"app_secret\") String appSecret, @Header(\"Authorization\") String token,\n @Body() GoogleVerifyBody body);\n\n @POST(\"api/v1.6/charge/auth\")\n Observable<PaymentResponseItem> postToPaid(@Header(\"app_secret\") String appSecret, @Header(\"Authorization\") String token,\n @Body() PaymentBody body);\n\n @POST(\"api/v1.6/charge/onetime\")\n Observable<ResponseItem> postToChargeOneTime(@Header(\"app_secret\") String appSecret, @Header(\"Authorization\") String token,\n @Body() PaymentBody body);\n\n\n}", "public interface BrokerInterface extends Remote {\n /**\n * Subscribes to a game\n * @param subscriber the interface on which the broker calls the dispatch message method\n * @param clientId the unique id of the client to find in which game it belongs\n * @throws RemoteException\n */\n public void subscribe(SubscriberInterface subscriber, UUID clientId) throws RemoteException;\n}", "public interface PublicCurrencyUpdateListener {\n void updating();\n\n void updated();\n\n void updateError(Throwable t);\n\n void startUpdate();\n}", "public interface IAliPayService {\n\n //获取二维码\n public AliResponse getQrcode(AliPay pay) throws Exception;\n\n //用户下单通知\n public NotifyResponse returnNotify(Map param,String charset) throws Exception;\n\n public static class CallbackResponse {\n private String success;\n\n public String getSuccess() {\n return success;\n }\n\n public void setSuccess(String success) {\n this.success = success;\n }\n\n }\n\n public static class NotifyData{\n\n private String partner;\n private String qrcode;\n //商品名称\n private String subject;\n //支付宝交易号\n private String trade_no;\n //商户网站唯一订单号\n private String out_trade_no;\n //交易总金额\n private String total_fee;\n //交易状态\n private String trade_status;\n //买家支付宝账号\n private String buyer_email;\n //交易创建时间 yyyy-MM-dd HH:mm:ss\n private String gmt_create;\n //交易付款时间 yyyy-MM-dd HH:mm:ss\n private String gmt_payment;\n\n public String getPartner() {\n return partner;\n }\n\n public void setPartner(String partner) {\n this.partner = partner;\n }\n\n public String getQrcode() {\n return qrcode;\n }\n\n public void setQrcode(String qrcode) {\n this.qrcode = qrcode;\n }\n\n public String getSubject() {\n return subject;\n }\n\n public void setSubject(String subject) {\n this.subject = subject;\n }\n\n public String getTrade_no() {\n return trade_no;\n }\n\n public void setTrade_no(String trade_no) {\n this.trade_no = trade_no;\n }\n\n public String getOut_trade_no() {\n return out_trade_no;\n }\n\n public void setOut_trade_no(String out_trade_no) {\n this.out_trade_no = out_trade_no;\n }\n\n public String getTotal_fee() {\n return total_fee;\n }\n\n public void setTotal_fee(String total_fee) {\n this.total_fee = total_fee;\n }\n\n public String getTrade_status() {\n return trade_status;\n }\n\n public void setTrade_status(String trade_status) {\n this.trade_status = trade_status;\n }\n\n public String getBuyer_email() {\n return buyer_email;\n }\n\n public void setBuyer_email(String buyer_email) {\n this.buyer_email = buyer_email;\n }\n\n public String getGmt_create() {\n return gmt_create;\n }\n\n public void setGmt_create(String gmt_create) {\n this.gmt_create = gmt_create;\n }\n\n public String getGmt_payment() {\n return gmt_payment;\n }\n\n public void setGmt_payment(String gmt_payment) {\n this.gmt_payment = gmt_payment;\n }\n\n public boolean isSuccess() throws Exception{\n return \"TRADE_FINISHED\".equals(trade_status) || \"TRADE_SUCCESS\".equals(trade_status);\n }\n }\n\n public static class NotifyResponse{\n\n private String out_trade_no;\n private String is_success;\n private String error_code;\n\n public String getOut_trade_no() {\n return out_trade_no;\n }\n\n public void setOut_trade_no(String out_trade_no) {\n this.out_trade_no = out_trade_no;\n }\n\n public String getIs_success() {\n return is_success;\n }\n\n public void setIs_success(String is_success) {\n this.is_success = is_success;\n }\n\n public String getError_code() {\n return error_code;\n }\n\n public void setError_code(String error_code) {\n this.error_code = error_code;\n }\n\n @JsonIgnore\n public boolean isSuccess() {\n return \"T\".equals(is_success);\n }\n\n }\n\n public static class NotifyPay {\n //买家支付宝账号对应的支付宝唯一用户号。以2088开头的纯16位数字\n private String user_id;\n //二维码\n private String qrcode;\n //用户下单的商品编号\n private String goods_id;\n //用户下单的商品名称\n private String goods_name;\n //用户购买指定商品的数量\n private String quantity;\n //用户购买商品的总价,单位元,精确到小数点后2位\n private String price;\n //通常表示规格、颜色、款式等\n private String sku_id;\n //商品属性名称\n private String sku_name;\n //只有个别支付宝特约商户才需要处理该返回值,其他商户不需要解析该字段\n private String context_data;\n\n //收货人所在省份\n private String prov;\n //收货人所在城市\n private String city;\n //收货人所在县区名称\n private String area;\n //收货人详细地址\n private String address;\n //收货人姓名\n private String buyer_name;\n //收货人地址的邮政编码\n private String post_code;\n //收货人联系电话\n private String phone;\n\n //签名\n private String sign;\n public String getUser_id() {\n return user_id;\n }\n\n public void setUser_id(String user_id) {\n this.user_id = user_id;\n }\n\n public String getQrcode() {\n return qrcode;\n }\n\n public void setQrcode(String qrcode) {\n this.qrcode = qrcode;\n }\n\n public String getGoods_id() {\n return goods_id;\n }\n\n public void setGoods_id(String goods_id) {\n this.goods_id = goods_id;\n }\n\n public String getGoods_name() {\n return goods_name;\n }\n\n public void setGoods_name(String goods_name) {\n this.goods_name = goods_name;\n }\n\n public String getQuantity() {\n return quantity;\n }\n\n public void setQuantity(String quantity) {\n this.quantity = quantity;\n }\n\n public String getPrice() {\n return price;\n }\n\n public void setPrice(String price) {\n this.price = price;\n }\n\n public String getSku_id() {\n return sku_id;\n }\n\n public void setSku_id(String sku_id) {\n this.sku_id = sku_id;\n }\n\n public String getSku_name() {\n return sku_name;\n }\n\n public void setSku_name(String sku_name) {\n this.sku_name = sku_name;\n }\n\n public String getContext_data() {\n return context_data;\n }\n\n public void setContext_data(String context_data) {\n this.context_data = context_data;\n }\n\n public String getProv() {\n return prov;\n }\n\n public void setProv(String prov) {\n this.prov = prov;\n }\n\n public String getCity() {\n return city;\n }\n\n public void setCity(String city) {\n this.city = city;\n }\n\n public String getArea() {\n return area;\n }\n\n public void setArea(String area) {\n this.area = area;\n }\n\n public String getAddress() {\n return address;\n }\n\n public void setAddress(String address) {\n this.address = address;\n }\n\n public String getBuyer_name() {\n return buyer_name;\n }\n\n public void setBuyer_name(String buyer_name) {\n this.buyer_name = buyer_name;\n }\n\n public String getPost_code() {\n return post_code;\n }\n\n public void setPost_code(String post_code) {\n this.post_code = post_code;\n }\n\n public String getPhone() {\n return phone;\n }\n\n public void setPhone(String phone) {\n this.phone = phone;\n }\n\n public String getSign() {\n return sign;\n }\n\n public void setSign(String sign) {\n this.sign = sign;\n }\n\n }\n\n public static class ResponseKey{\n public String name;\n @JacksonXmlText\n public String value;\n\n public String getName() {\n return name;\n }\n\n public void setName(String name) {\n this.name = name;\n }\n\n public String getValue() {\n return value;\n }\n\n public void setValue(String value) {\n this.value = value;\n }\n }\n\n public static class AliPay{\n\n //接口名称 alipay.mobile.qrcode.manage\n private String service;\n //合作者身份ID\n private String partner;\n //参数编码字符集\n private String _input_charset;\n //sign_type MD5\n private String sign_type;\n //签名\n private String sign;\n //接口调用时间\n private String timestamp;\n //动作 add modify stop restart\n private String method;\n //二维码 “https://qr.alipay.com/”开头,加上一串字符串。\n private String qrcode;\n //业务类型 10:商品码;9:商户码(友宝售货机码),友宝目前只支持9;11:链接码;12:链接码(预授权业务)。\n private String biz_type;\n //业务数据\n private BizData biz_data;\n\n public static class BizData{\n\n //交易类型 1:即时到账 2:担保交易 当本参数设置为2时,need_address必须为T。\n private String trade_type;\n //是否需要收货地址 T:需要 F:不需要\n private String need_address;\n //商品明细\n private GoodsInfo goods_info;\n //通知商户下单URL\n private String return_url;\n //通知商户支付结果url\n private String notify_url;\n //查询商品信息url\n private String query_url;\n //扩展属性\n private ExtInfo ext_info;\n //备注\n private String memo;\n //链接地址\n private String url;\n\n public String getUrl() {\n return url;\n }\n\n public void setUrl(String url) {\n this.url = url;\n }\n\n public String getTrade_type() {\n return trade_type;\n }\n\n public void setTrade_type(String trade_type) {\n this.trade_type = trade_type;\n }\n\n public String getNeed_address() {\n return need_address;\n }\n\n public void setNeed_address(String need_address) {\n this.need_address = need_address;\n }\n\n public GoodsInfo getGoods_info() {\n return goods_info;\n }\n\n public void setGoods_info(GoodsInfo goods_info) {\n this.goods_info = goods_info;\n }\n\n public String getReturn_url() {\n return return_url;\n }\n\n public void setReturn_url(String return_url) {\n this.return_url = return_url;\n }\n\n public String getNotify_url() {\n return notify_url;\n }\n\n public void setNotify_url(String notify_url) {\n this.notify_url = notify_url;\n }\n\n public String getQuery_url() {\n return query_url;\n }\n\n public void setQuery_url(String query_url) {\n this.query_url = query_url;\n }\n\n public ExtInfo getExt_info() {\n return ext_info;\n }\n\n public void setExt_info(ExtInfo ext_info) {\n this.ext_info = ext_info;\n }\n\n public String getMemo() {\n return memo;\n }\n\n public void setMemo(String memo) {\n this.memo = memo;\n }\n public static class GoodsInfo{\n\n //商品编号\n private String id;\n //商品名称\n private String name;\n //商品价格\n private String price;\n //商品总库存\n private String inventory;\n //商品属性标题\n private String sku_title;\n //商品属性\n private List<Sku> sku;\n //商品有效期\n private String expiry_date;\n //商品描述\n private String desc;\n\n public String getId() {\n return id;\n }\n\n public void setId(String id) {\n this.id = id;\n }\n\n public String getName() {\n return name;\n }\n\n public void setName(String name) {\n this.name = name;\n }\n\n public String getPrice() {\n return price;\n }\n\n public void setPrice(String price) {\n this.price = price;\n }\n\n public String getInventory() {\n return inventory;\n }\n\n public void setInventory(String inventory) {\n this.inventory = inventory;\n }\n\n public String getSku_title() {\n return sku_title;\n }\n\n public void setSku_title(String sku_title) {\n this.sku_title = sku_title;\n }\n\n public List<Sku> getSku() {\n return sku;\n }\n\n public void setSku(List<Sku> sku) {\n this.sku = sku;\n }\n\n public String getExpiry_date() {\n return expiry_date;\n }\n\n public void setExpiry_date(String expiry_date) {\n this.expiry_date = expiry_date;\n }\n\n public String getDesc() {\n return desc;\n }\n\n public void setDesc(String desc) {\n this.desc = desc;\n }\n\n public static class Sku{\n\n private String sku_id;\n private String sku_name;\n private String sku_price;\n private String sku_inventory;\n\n public String getSku_id() {\n return sku_id;\n }\n\n public void setSku_id(String sku_id) {\n this.sku_id = sku_id;\n }\n\n public String getSku_name() {\n return sku_name;\n }\n\n public void setSku_name(String sku_name) {\n this.sku_name = sku_name;\n }\n\n public String getSku_price() {\n return sku_price;\n }\n\n public void setSku_price(String sku_price) {\n this.sku_price = sku_price;\n }\n\n public String getSku_inventory() {\n return sku_inventory;\n }\n\n public void setSku_inventory(String sku_inventory) {\n this.sku_inventory = sku_inventory;\n }\n }\n }\n public static class ExtInfo{\n\n //单次购买上限\n private String single_limit;\n //单用户购买上限\n private String user_limit;\n //支付超时时间\n private String pay_timeout;\n //二维码logo名称\n private String logo_name;\n //自定义收集用户信息扩展字段\n private String ext_field;\n\n public String getSingle_limit() {\n return single_limit;\n }\n\n public void setSingle_limit(String single_limit) {\n this.single_limit = single_limit;\n }\n\n public String getUser_limit() {\n return user_limit;\n }\n\n public void setUser_limit(String user_limit) {\n this.user_limit = user_limit;\n }\n\n public String getPay_timeout() {\n return pay_timeout;\n }\n\n public void setPay_timeout(String pay_timeout) {\n this.pay_timeout = pay_timeout;\n }\n\n public String getLogo_name() {\n return logo_name;\n }\n\n public void setLogo_name(String logo_name) {\n this.logo_name = logo_name;\n }\n\n public String getExt_field() {\n return ext_field;\n }\n\n public void setExt_field(String ext_field) {\n this.ext_field = ext_field;\n }\n }\n }\n\n\n public String getService() {\n return service;\n }\n\n public void setService(String service) {\n this.service = service;\n }\n\n public String getPartner() {\n return partner;\n }\n\n public void setPartner(String partner) {\n this.partner = partner;\n }\n\n public String get_input_charset() {\n return _input_charset;\n }\n\n public void set_input_charset(String _input_charset) {\n this._input_charset = _input_charset;\n }\n\n public String getSign_type() {\n return sign_type;\n }\n\n public void setSign_type(String sign_type) {\n this.sign_type = sign_type;\n }\n\n public String getSign() {\n return sign;\n }\n\n public void setSign(String sign) {\n this.sign = sign;\n }\n\n public String getTimestamp() {\n return timestamp;\n }\n\n public void setTimestamp(String timestamp) {\n this.timestamp = timestamp;\n }\n\n public String getMethod() {\n return method;\n }\n\n public void setMethod(String method) {\n this.method = method;\n }\n\n public String getQrcode() {\n return qrcode;\n }\n\n public void setQrcode(String qrcode) {\n this.qrcode = qrcode;\n }\n\n public String getBiz_type() {\n return biz_type;\n }\n\n public void setBiz_type(String biz_type) {\n this.biz_type = biz_type;\n }\n\n public BizData getBiz_data() {\n return biz_data;\n }\n\n public void setBiz_data(BizData biz_data) {\n this.biz_data = biz_data;\n }\n }\n\n public class AliResponse {\n private String is_success;\n private String error;\n private Request request;\n\n private Response response;\n\n private String sign;\n\n private String sign_type;\n\n public String getIs_success() {\n return is_success;\n }\n\n public void setIs_success(String is_success) {\n this.is_success = is_success;\n }\n\n public String getError() {\n return error;\n }\n\n public void setError(String error) {\n this.error = error;\n }\n\n public Request getRequest() {\n return request;\n }\n\n public void setRequest(Request request) {\n this.request = request;\n }\n\n public Response getResponse() {\n return response;\n }\n\n public void setResponse(Response response) {\n this.response = response;\n }\n\n public String getSign() {\n return sign;\n }\n\n public void setSign(String sign) {\n this.sign = sign;\n }\n\n public String getSign_type() {\n return sign_type;\n }\n\n public void setSign_type(String sign_type) {\n this.sign_type = sign_type;\n }\n\n public static class Request{\n @JacksonXmlElementWrapper(useWrapping = false)\n private List<ResponseKey> param;\n\n public List<ResponseKey> getParam() {\n return param;\n }\n\n public void setParam(List<ResponseKey> param) {\n this.param = param;\n }\n }\n\n public static class Response{\n private Alipay alipay;\n\n public Alipay getAlipay() {\n return alipay;\n }\n\n public void setAlipay(Alipay alipay) {\n this.alipay = alipay;\n }\n\n public static class Alipay{\n private String qrcode;\n private String qrcode_img_url;\n private String result_code;\n private String error_message;\n\n public String getQrcode() {\n return qrcode;\n }\n\n public void setQrcode(String qrcode) {\n this.qrcode = qrcode;\n }\n\n public String getQrcode_img_url() {\n return qrcode_img_url;\n }\n\n public void setQrcode_img_url(String qrcode_img_url) {\n this.qrcode_img_url = qrcode_img_url;\n }\n\n public String getResult_code() {\n return result_code;\n }\n\n public void setResult_code(String result_code) {\n this.result_code = result_code;\n }\n\n public String getError_message() {\n return error_message;\n }\n\n public void setError_message(String error_message) {\n this.error_message = error_message;\n }\n\n public boolean isSuccess(){\n return \"SUCCESS\".equals(result_code);\n }\n }\n\n }\n\n public boolean isSucess() throws Exception{\n return \"T\".equals(is_success);\n }\n\n }\n\n\n}", "public interface FilterResultsCallback {\n void onPublish(int filterResults);\n}", "@Override\n public void onEmulatorQuery(int query_id, int query_type, ByteBuffer query_data) {\n switch (query_type) {\n case ProtocolConstants.SENSORS_QUERY_LIST:\n // Preallocate large response buffer.\n ByteBuffer resp = ByteBuffer.allocate(1024);\n resp.order(getEndian());\n // Iterate through the list of monitored sensors, dumping them\n // into the response buffer.\n for (MonitoredSensor sensor : mSensors) {\n // Entry for each sensor must contain:\n // - an integer for its ID\n // - a zero-terminated emulator-friendly name.\n final byte[] name = sensor.getEmulatorFriendlyName().getBytes();\n final int required_size = 4 + name.length + 1;\n resp = ExpandIf(resp, required_size);\n resp.putInt(sensor.getType());\n resp.put(name);\n resp.put((byte) 0);\n }\n // Terminating entry contains single -1 integer.\n resp = ExpandIf(resp, 4);\n resp.putInt(-1);\n sendQueryResponse(query_id, resp);\n return;\n\n default:\n Loge(\"Unknown query \" + query_type);\n return;\n }\n }", "public interface FilterEventConsumer {\n void onMessage(EventeumMessage<ContractEventFilter> message);\n}", "public interface StockExchangeService {\n\n void addSellOrder(String orderId, String stockName, Double price, int quantity, LocalTime time);\n\n void matchAndExecuteBuyOrder(String orderId, String stockName, Double price, int quantity, LocalTime time);\n}", "public static void operation() {\n try ( QueryExecution qExec = QueryExecutionHTTP.service(dataURL).query(\"ASK{}\").build() ) {\n qExec.execAsk();\n System.out.println(\"Operation succeeded\");\n } catch (QueryException ex) {\n System.out.println(\"Operation failed: \"+ex.getMessage());\n }\n System.out.println();\n }", "void onRxStoreChanged(@NonNull RxStoreChange change);", "public interface OnDataGetListener {\n void onDataGet(Object data);\n}", "@Override\r\n public void onShowQueryResult() {\n }", "void subscribe(String id);", "public Event subscribe(Address resource, String event, int expires, Content body);", "public interface OnVkQueryExecuted {\n\n void onVkQueryExecuted(int postId);\n\n}", "public interface OnQueueDataChangedListener {\n\n void onQueueDataChanged();\n }", "public interface ApiService {\n @GET(\"charts/transactions-per-second\")\n Observable<Chart> getChartsTransactionsPerSecond(@Query(\"timespan\") String timespan,\n @Query(\"rollingAverage\") String rollingAverage, @Query(\"start\") String start,\n @Query(\"format\") String format, @Query(\"sampled\") String sampled);\n\n @GET(\"stats\")\n Observable<Stat> getStats();\n\n @GET(\"pools?timespan=5days\")\n Observable<Pool> getPools(@Query(\"timespan\") String timespan);\n}", "public interface IAPIEvent extends IEvent {\n\n /**\n * Gets the transmission sessions id who the event was caused by.\n * \n * @return The transmission sessions sessionId\n */\n UUID getSessionId();\n\n /**\n * Gets the status of the transmission session associated with the event.\n * \n * @return The status of the transmission session\n */\n SessionStatus getStatus();\n}", "public interface EventInteractor {\n\n void getEvents(String sellerId,\n Date after,\n Date before,\n final PaginatedResourceRequestCallback<PR_AEvent> callback);\n\n void getCustomerEvents(String customerId,\n final PaginatedResourceRequestCallback<PR_AEvent> callback);\n\n}", "public interface DevCardMarketObserver {\n\n void updateDevCardMarketState(DevCardMarket devCardMarket);\n\n}", "public interface QueryListener {\n void onSuccess(Pharmacy pharmacy);\n\n void onError(String error);\n}", "@Override\n public void onSubscribe(String channel, int subscribedChannels) {\n System.out.println(\"Client is Subscribed to channel : \"+ channel);\n }", "com.exacttarget.wsdl.partnerapi.QueryRequest getQueryRequest();", "@Override\n\tpublic void DataAcquisitionObjectEvent(Interface.DataAcquisitionObjectEvent e,String data) {\n\t\t\n\t}", "public interface RequestServer {\n\n @GET(\"caseplatform/mobile/system-eventapp!register.action\")\n Call<StringResult> register(@Query(\"account\") String account, @Query(\"password\") String password, @Query(\"name\") String name,\n @Query(\"mobilephone\") String mobilephone, @Query(\"identityNum\") String identityNum);\n\n @GET(\"caseplatform/mobile/login-app!login.action\")\n Call<String> login(@Query(\"name\") String username, @Query(\"password\") String password);\n\n @GET(\"caseplatform/mobile/system-eventapp!setUserPassword.action\")\n Call<StringResult> setPassword(@Query(\"account\") String account,\n @Query(\"newPassword\") String newPassword,\n @Query(\"oldPassword\") String oldPassword);\n\n @GET(\"caseplatform/mobile/system-eventapp!getEventInfo.action\")\n Call<Event> getEvents(@Query(\"account\") String account, @Query(\"eventType\") String eventType);\n\n @GET(\"caseplatform/mobile/system-eventapp!reportEventInfo.action \")\n Call<EventUpload> reportEvent(\n @Query(\"account\") String account,\n @Query(\"eventType\") String eventType,\n @Query(\"address\") String address,\n @Query(\"eventX\") String eventX,\n @Query(\"eventY\") String eventY,\n @Query(\"eventMs\") String eventMs,\n @Query(\"eventMc\") String eventMc,\n @Query(\"eventId\") String eventId,\n @Query(\"eventClyj\") String eventClyj,\n @Query(\"eventImg\") String eventImg,\n @Query(\"eventVideo\") String eventVideo,\n @Query(\"eventVoice\") String eventVoice\n );\n\n @GET(\"caseplatform/mobile/system-eventapp!getUserInfo.action\")\n Call<UserInfo> getUserInfo(@Query(\"orgNo\") String orgNo, @Query(\"account\") String account);\n\n @GET(\"caseplatform/mobile/system-eventapp!getOrgDataInfo.action\")\n Call<OrgDataInfo> getOrgData(@Query(\"orgNo\") String orgNo, @Query(\"account\") String account);\n\n @Multipart\n @POST(\"caseplatform/mobile/video-upload!uplodVideo.action\")\n Call<FileUpload> uploadVideo(@Part(\"video\") File video, @Part(\"videoFileName\") String videoFileName);\n\n @POST(\"caseplatform/mobile/video-upload!uplodVideo.action\")\n Call<FileUpload> uploadVideo(@Body RequestBody requestBody);\n\n @GET(\"caseplatform/mobile/video-upload!uplodAudio.action\")\n Call<FileUpload> uploadAudio(@Query(\"audio\") File audio, @Query(\"audioFileName\") String audioFileName);\n\n @POST(\"caseplatform/mobile/video-upload!uplodAudio.action\")\n Call<FileUpload> uploadAudio(@Body RequestBody requestBody);\n\n @GET(\"caseplatform/mobile/file-upload!uplodFile.action\")\n Call<FileUpload> uploadImage(@Query(\"img\") File img, @Query(\"imgFileName\") String imgFileName);\n\n @POST(\"caseplatform/mobile/file-upload!uplodFile.action\")\n Call<FileUpload> uploadImage(@Body RequestBody requestBody);\n\n @GET(\"caseplatform/mobile/system-eventapp!jobgps.action\")\n Call<StringResult> setCoordinate(@Query(\"account\") String account,\n @Query(\"address\") String address,\n @Query(\"x\") String x,\n @Query(\"y\") String y,\n @Query(\"coordsType\") String coordsType,\n @Query(\"device_id\") String device_id\n );\n\n @GET(\"caseplatform/mobile/system-eventapp!Mbtrajectory.action\")\n Call<Task> getTask(@Query(\"account\") String account);\n\n}", "interface MessageCallback {\n /**\n * Called when a new message arrives on the subscription consumer. the\n * message should be delivered to the STOMP client.\n * \n * @param subscription\n * the original subscription information\n * @param msg\n * the message that just arrived\n */\n public void onMessage(ClientSubscription subscription,\n HazelcastMQMessage msg);\n }", "public interface KLineSevser {\n @GET(\"kline\")\n Observable<KLineInfo> kline(\n @Query(\"symbol\") String symbol,\n @Query(\"period\") String period,\n @Query(\"size\") String size\n );\n}", "@Override\n public void execute() {\n eslClient.getEventNotificationService().register(newEventNotificationConfig(URL)\n .forEvent(EVENT1)\n .forEvent(EVENT2)\n .forEvent(EVENT3));\n\n // Get the registered event notifications\n eventNotificationConfig = eslClient.getEventNotificationService().getEventNotificationConfig();\n }", "void onEvent (ZyniEvent event, Object ... params);", "public void smqOnChange(final long subscribers, final long tid);" ]
[ "0.5830669", "0.56970334", "0.55709475", "0.5399589", "0.5301178", "0.5154422", "0.5055143", "0.4952739", "0.494254", "0.49349013", "0.49182796", "0.4907689", "0.48560512", "0.48368135", "0.48017985", "0.47985148", "0.47928098", "0.47879973", "0.47841138", "0.4780268", "0.47569212", "0.4753526", "0.47490197", "0.4744821", "0.46903056", "0.46815374", "0.4670862", "0.46555975", "0.46267512", "0.45898107", "0.45878887", "0.45867524", "0.45837516", "0.4582965", "0.4581546", "0.45695028", "0.4557605", "0.45541084", "0.45512527", "0.45507818", "0.45460245", "0.45260268", "0.4525138", "0.45242143", "0.45185736", "0.45062208", "0.45003858", "0.44968405", "0.44899306", "0.4489226", "0.44870573", "0.44867384", "0.44841403", "0.4481013", "0.4475873", "0.44584766", "0.44574338", "0.44524825", "0.44518837", "0.445124", "0.44493493", "0.44398525", "0.44337925", "0.44333097", "0.44333097", "0.44294834", "0.44280648", "0.44255993", "0.44221392", "0.44209093", "0.44127613", "0.44107395", "0.44102156", "0.44102097", "0.44089895", "0.4407772", "0.44053537", "0.44021678", "0.4401274", "0.44000617", "0.43913928", "0.43858445", "0.43840688", "0.43814522", "0.4377038", "0.4371776", "0.43698344", "0.43658194", "0.43645874", "0.43630677", "0.43556243", "0.43534273", "0.43505165", "0.434875", "0.43472886", "0.4346829", "0.4345724", "0.43450028", "0.43437305", "0.4342291" ]
0.71608686
0
Get the NBBOStruct for a product key for a session name.
public NBBOStruct getNbboSnapshotForProduct(String sessionName, int productKey) throws UserException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public NBBOStruct getNbboSnapshotForProduct(int timeout, String sessionName, int productKey)\n throws UserException;", "public Product getProductFromName(String prodName) throws BackendException;", "int getProductKey();", "public synchronized WebElement shoppingBagProductName() throws Exception {\n\n\t\treturn utils.findElementByLocator(driver, \"PDP_ShoppingBagProduct\",\n\t\t\t\t\"| PDP:Content(Product Name) of the Shopping bag page\");\n\t}", "public Long getBufferStock()\r\n\t{\r\n\t\treturn getBufferStock( getSession().getSessionContext() );\r\n\t}", "BListKey getKey();", "public Object getObjFromSession(String key)\n\t{\n\t\treturn context.getSession().get(key);\n\t}", "public PxProductInfo getDbCombo() {\n long __key = this.dbComboId;\n if (dbCombo__resolvedKey == null || !dbCombo__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n PxProductInfoDao targetDao = daoSession.getPxProductInfoDao();\n PxProductInfo dbComboNew = targetDao.load(__key);\n synchronized (this) {\n dbCombo = dbComboNew;\n \tdbCombo__resolvedKey = __key;\n }\n }\n return dbCombo;\n }", "public Number getBpoId() {\n return (Number) getAttributeInternal(BPOID);\n }", "public org.mrk.grpc.catalog.ProductOrBuilder getProductOrBuilder() {\n return getProduct();\n }", "public Product getProductFromId(Integer prodId) throws BackendException;", "Product getProductByProductName(String productName);", "public Long getBufferStock(final SessionContext ctx)\r\n\t{\r\n\t\treturn (Long)getProperty( ctx, BUFFERSTOCK);\r\n\t}", "public interface IBBO {\n String getSecurityId();\n\n double getBidPx();\n\n double getOfferPx();\n\n double getBidSize();\n\n double getOfferSize();\n\n String getTradingStatus();\n\n double getLastPx();\n\n double getLastSize();\n\n double getLowPx();\n\n double getHighPx();\n\n double getOpenPx();\n\n double getClosePx();\n\n PerformanceData getPerformanceData();\n\n boolean isInRecovery(IChannelStatus.ChannelType channelType);\n\n boolean isInRecoverySet(IChannelStatus.ChannelType channelType);\n}", "public List<productmodel> getproductbyname(String name);", "public static Object getObject(HttpSession session, String key) {\n return session.getAttribute(key);\n }", "public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}", "T getMarketDataForProduct(int classKey, int productKey, boolean lazyInitCache) throws SystemException, CommunicationException,\n AuthorizationException, DataValidationException, NotFoundException;", "public abstract I_SessionInfo getSession(I_SessionName sessionName);", "public final String getBname() {\n return bname;\n }", "public ProductModel getBag(String setName) {\n\t\treturn null;\r\n\t}", "public synchronized WebElement lnk_productNameMiniBag() throws Exception {\n\n\t\treturn utils.findElementByLocator(driver, \"PDP_MiniBag_productLNK\", \"Mini Bag| Product name\");\n\t}", "Stock retrieveStock(String symbol);", "public PersistedBmmPackage getPackage(String packageName) {\n return packages.get(packageName.toUpperCase());\n }", "public STRUCT asStruct(Connection conn) throws SQLException {\r\n\t\tSTRUCT struct = null;\r\n\t\tStructDescriptor sd = StructDescriptor.createDescriptor(\"SWC_PEGA_NOTIFY_OBJ\", conn);\r\n\t\tObject[] attributes = new Object[] { swcPubId, pegaResponseCode, pegaResponseMSG };\r\n\t\tstruct = new STRUCT(sd, conn, attributes);\r\n\t\treturn struct;\r\n\t}", "public String getProduct() {\n\t\treturn stockSymbol;\n\t}", "public String getKeyBiz() {\n return keyBiz;\n }", "public abstract I_SessionInfo getSessionInfo(I_SessionName sessionName);", "public java.math.BigDecimal getKswn() throws java.rmi.RemoteException;", "com.google.protobuf.ByteString\n getSessionHandleBytes();", "private Book getBook(String sku) {\n return bookDB.get(sku);\n }", "ProductPurchaseItem getProductPurchaseItemPerId(long sprcId);", "MIBObject get(String oid);", "public String getBName()\n\t{\n\t\treturn bName;\n\t}", "public String findSName(String key) {\n\t\n\treturn stockList.get(key).sName; //for a given key , hashmap give a ojbect , to find name we should get object.sNAme\n }", "public static ITn3812Context findTn3812Session(final WebSocketSession session, final String name) {\r\n final Map<String, ITn3812Context> map = getTn3812Sessions(session);\r\n return map.get(name);\r\n }", "com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder();", "public org.mrk.grpc.catalog.ProductOrBuilder getProductOrBuilder() {\n if (productBuilder_ != null) {\n return productBuilder_.getMessageOrBuilder();\n } else {\n return product_ == null ?\n org.mrk.grpc.catalog.Product.getDefaultInstance() : product_;\n }\n }", "Object getRemoteConnectionContextObject( String key );", "public Stock getFromMap(String name){\n\tif(table.containsKey(name)){\n\tStock rval = table.get(name);\n\treturn rval;\n\t}\n\telse{\n\t\t//call pull from URL and return newStock \n\t\taddToMap(String name, Stock newStock);\n\t\tgetFromMap(name);\n\t}\n}", "Object getProduct();", "Stock retrieveStock(String symbol, String asOf);", "public String getBversion() {\n return bversion;\n }", "public ABLKey Key(String name) {\r\n\t\treturn new ABLKey(BrickFinder.getDefault().getKey(name));\r\n\t}", "com.google.protobuf.ByteString\n getKeyspaceBytes();", "com.google.protobuf.ByteString\n getKeyspaceBytes();", "com.google.protobuf.ByteString\n getKeyspaceBytes();", "com.google.protobuf.ByteString\n getKeyspaceBytes();", "public ReservationModel findKcckReservationBySessionId(String sessionId) {\n\t\tKcckReservationInfo kcckReservationInfo = this.reservationRepository.findKcckReservationBySessionId(sessionId);\n\t\tif (kcckReservationInfo != null) {\n\t\t\tReservationModel reservationModel = new ReservationModel();\n\t\t\treservationModel.setReservationId(kcckReservationInfo.getReservationId());\n\t\t\treservationModel.setHospitalId(kcckReservationInfo.getHospitalId());\n\t\t\treservationModel.setDeptId(kcckReservationInfo.getDeptId());\n\t\t\treservationModel.setDoctorId(kcckReservationInfo.getDoctorId());\n\t\t\treservationModel.setPatientId(kcckReservationInfo.getPatientId());\n\t\t\treservationModel.setPatientName(kcckReservationInfo.getPatientName());\n\t\t\treservationModel.setNameFurigana(kcckReservationInfo.getNameFurigana());\n\t\t\treservationModel.setPhoneNumber(kcckReservationInfo.getPhoneNumber());\n\t\t\treservationModel.setEmail(kcckReservationInfo.getEmail());\n\t\t\treservationModel.setReservationDate(kcckReservationInfo.getReservationDate());\n\t\t\treservationModel.setReservationTime(kcckReservationInfo.getReservationTime());\n\t\t\treservationModel.setSessionId(kcckReservationInfo.getSessionId());\n\t\t\treservationModel.setReservationCode(kcckReservationInfo.getReservationCode());\n\t\t\treservationModel.setReminderTime(kcckReservationInfo.getReminderTime());\n\t\t\treservationModel.setDoctorName(kcckReservationInfo.getDoctorName());\n\t\t\treservationModel.setDoctorCode(kcckReservationInfo.getDoctorCode());\n\t\t\treservationModel.setDeptName(kcckReservationInfo.getDeptName());\n\t\t\treservationModel.setCardNumber(kcckReservationInfo.getPatientCode());\n\t\t\treservationModel.setPatientSex(kcckReservationInfo.getPatientGender());\n\t\t\treservationModel.setPatientBirtday(MssDateTimeUtil.dateToString(kcckReservationInfo.getPatientBirthDay(),\n\t\t\t\t\tDateTimeFormat.DATE_FORMAT_YYYYMMDD_EXTEND));\n\t\t\treturn reservationModel;\n\t\t}\n\t\treturn null;\n\n\t}", "public static String getNameFromStruct( ResourceKey key, Struct struct )\n {\n String s = null;\n\n switch( key.getType() )\n {\n case ResourceTypes.TYPE_IFO: // module info\n s = \"Module Information\";\n break;\n case ResourceTypes.TYPE_ARE: // area\n s = struct.getString( \"Name\" );\n break;\n case ResourceTypes.TYPE_GIC: // area comments\n case ResourceTypes.TYPE_GIT: // area objects\n break;\n case ResourceTypes.TYPE_UTC: // creature blueprint\n String first = struct.getString( \"FirstName\" );\n String last = struct.getString( \"LastName\" );\n if( first != null && last != null )\n s = first + \" \" + last;\n else if( last != null )\n s = last;\n else\n s = first;\n s.trim();\n break;\n case ResourceTypes.TYPE_UTD: // door blueprint\n s = struct.getString( \"LocName\" );\n break;\n case ResourceTypes.TYPE_UTE: // encounter blueprint\n s = struct.getString( \"LocalizedName\" );\n break;\n case ResourceTypes.TYPE_UTI: // item blueprint\n s = struct.getString( \"LocalizedName\" );\n break;\n case ResourceTypes.TYPE_UTP: // placeable blueprint\n s = struct.getString( \"LocName\" );\n break;\n case ResourceTypes.TYPE_UTS: // sound blueprint\n s = struct.getString( \"LocName\" );\n break;\n case ResourceTypes.TYPE_UTM: // store blueprint\n s = struct.getString( \"LocName\" );\n break;\n case ResourceTypes.TYPE_UTT: // trigger blueprint\n s = struct.getString( \"LocalizedName\" );\n break;\n case ResourceTypes.TYPE_UTW: // waypoint blueprint\n s = struct.getString( \"LocalizedName\" );\n break;\n case ResourceTypes.TYPE_DLG: // conversation\n // Conversations have no name\n case ResourceTypes.TYPE_JRL: // journal\n // Neither do journals, besides they don't go into\n // the tree anyway.\n case ResourceTypes.TYPE_FAC: // faction\n // Likewise\n case ResourceTypes.TYPE_ITP: // palette\n // No name.\n case ResourceTypes.TYPE_PTM: // plot manager\n case ResourceTypes.TYPE_PTT: // plot wizard blueprint\n case ResourceTypes.TYPE_BIC: // Character/Creature file\n break;\n }\n\n if( \"\".equals( s ) )\n s = null;\n\n return( s );\n }", "com.weizhu.proto.WeizhuProtos.Session getSession();", "java.lang.String getProductCode();", "public String getProductID() {\n final byte[] data = new byte[12];\n mem.getBytes(16, data, 0, data.length);\n return new String(data).trim();\n }", "OrderBook getOrderBook(String symbol, Integer limit);", "public Key getkey(String appid) {\n log.debug(getSessionFactory() == null ? \"Session Factory is null\" : \"Session Factory is Not null\");\n log.debug(\"Application id :\" + appid);\n\n try {\n SimpleJdbcTemplate jdbcTemplate =\n new SimpleJdbcTemplate(SessionFactoryUtils.getDataSource(getSessionFactory()));\n Map args = new HashMap();\n args.put(\"in1\", new String(appid));\n\n return jdbcTemplate.queryForObject(\"select a.APP_ID,a.name,a.CERTIFICATEID,a.soa_group_id,c.soa_group_name from \" + APP_KEY_TABLE + \" a , SOA_GROUP c where a.status='Active' and a.soa_group_id=c.soa_group_id and a.APP_ID=?\"\n , new ParameterizedRowMapper<Key>() {\n public Key mapRow(ResultSet rs, int rowNum) throws SQLException {\n return new Key(rs.getString(\"APP_ID\"), rs.getString(\"name\"), rs.getString(\"soa_group_id\"), rs.getString(\"soa_group_name\"), rs.getString(\"CERTIFICATEID\"));\n }\n }, appid);\n } catch (DataAccessException e) {\n e.printStackTrace();\n return null;//To change body of catch statement use File | Settings | File Templates.\n }\n }", "protected final Product getProduct() {\n Product.Builder product = new Product.Builder()\n .implementationTitle(getClass())\n .implementationVersion(getClass());\n Optional.ofNullable(getClass().getPackage())\n .flatMap(p -> Optional.ofNullable(p.getSpecificationVersion()))\n .map(specVersion -> \"(specification \" + specVersion + \")\")\n .ifPresent(product::comment);\n return product.build();\n }", "public long getBomItemKey() {\n\t\treturn bomItemKey;\n\t}", "com.google.protobuf.ByteString\n getSessionIDBytes();", "com.google.protobuf.ByteString\n getSessionIDBytes();", "public GoogleMobilityData getRecordByKey(Long pk) throws SQLException {\n\n String select = \"SELECT * FROM GoogleMobilityData WHERE Synthetic_Mobility_PK=?\";\n Connection connection = null;\n PreparedStatement selectStmt = null;\n ResultSet results = null;\n try {\n connection = connectionManager.getConnection();\n selectStmt = connection.prepareStatement(select);\n selectStmt.setLong(1, pk);\n results = selectStmt.executeQuery();\n if (results.next()) {\n Date date = results.getDate(\"Date\");\n String country = results.getString(\"Country\");\n Long rec = results.getLong(\"Rec\");\n Long grocery = results.getLong(\"Grocery\");\n Long parks = results.getLong(\"Parks\");\n Long transit = results.getLong(\"Transit_Station\");\n Long work = results.getLong(\"Work\");\n Long residential = results.getLong(\"Residential\");\n String fips = results.getString(\"JHCountyStat_FipsCode\");\n\n GoogleMobilityData record = new GoogleMobilityData(date, country, rec, grocery, parks, transit, work, residential, fips);\n return record;\n }\n } catch (SQLException e) {\n e.printStackTrace();\n throw e;\n } finally {\n if (connection != null) {\n connection.close();\n }\n if (selectStmt != null) {\n selectStmt.close();\n }\n if (results != null) {\n results.close();\n }\n }\n return null;\n }", "ByteBuffer readKey(int entryIndex) {\n if (entryIndex == Chunk.NONE) {\n return null;\n }\n\n long keyReference = getKeyReference(entryIndex);\n int[] keyArray = longToInts(keyReference);\n int blockID = keyArray[BLOCK_ID_LENGTH_ARRAY_INDEX] >> KEY_BLOCK_SHIFT;\n int keyPosition = keyArray[POSITION_ARRAY_INDEX];\n int length = keyArray[BLOCK_ID_LENGTH_ARRAY_INDEX] & KEY_LENGTH_MASK;\n\n return memoryManager.getByteBufferFromBlockID(blockID, keyPosition, length);\n }", "private RLabel getDbProductLabel() {\n if (dbProductLabel == null) {\n dbProductLabel = new RLabel();\n dbProductLabel.setText(\"<%= ivy.cms.co(\\\"/Dialogs/about/databaseProduct\\\") %>\");\n dbProductLabel.setStyleProperties(\"{/insetsTop \\\"2\\\"}\");\n dbProductLabel.setName(\"dbProductLabel\");\n }\n return dbProductLabel;\n }", "static BigDecimal Find(String productId){\n\n\t\tBigDecimal price=null;\n\n\t\tLong key=Long.parseLong(productId);\n\n\t\tif(!productListOnID.containsKey(key)){\n\t\t\tprice=new BigDecimal(\"0\");\n\t\t}else{\n\n\t\t\tdxm116130Product product=productListOnID.get(key);\n\t\t\tprice=product.getProductPrice();\n\n\t\t}\n\t\t\n\t\treturn price;\n\n\n\t}", "public static Entity getSingleKitesProto(String kitesprotoName) {\r\n\t\tKey key = KeyFactory.createKey(\"KitesProto\", kitesprotoName);\r\n\t\treturn Util.findEntity(key);\r\n\t}", "public Key getKey() {\n\t\tString fieldvalue = getValue(\"sys_id\");\n\t\tassert fieldvalue != null;\n\t\treturn new Key(fieldvalue);\n\t}", "public com.weizhu.proto.WeizhuProtos.Session.Builder getSessionBuilder() {\n bitField0_ |= 0x00000002;\n onChanged();\n return getSessionFieldBuilder().getBuilder();\n }", "private static Key createInternalLobKey() {\n return Key.createKey(Arrays.asList(INTERNAL_KEY_SPACE,\n ILK_PREFIX_COMPONENT,\n UUID.randomUUID().toString()));\n }", "public String getSumShopKb() {\n return sumShopKb;\n }", "public ProductContainer getProductContainer(String name);", "String getProduct();", "public String getKeyBuyItemName() {\r\n return getKeyShootName();\r\n }", "public org.mrk.grpc.catalog.Product.Builder getProductBuilder() {\n \n onChanged();\n return getProductFieldBuilder().getBuilder();\n }", "public Basket(){\r\n\r\n basket = new Hashtable();\r\n keys = new Vector();\r\n }", "public static String bName(int index) {\n\t\treturn ((IdentifierResolver) bIdents.get(index)).getBName();\n\t}", "com.google.protobuf.ByteString\n getBididBytes();", "public SCDataSpec get(String key) throws IOException;", "private static String m970t(Bundle bundle) {\n ArrayList<String> stringArrayList = bundle.getStringArrayList(\"pack_names\");\n if (stringArrayList != null && !stringArrayList.isEmpty()) {\n return stringArrayList.get(0);\n }\n throw new C2155bj(\"Session without pack received.\");\n }", "com.google.protobuf.ByteString\n getBuyDescribeBytes();", "@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }", "public Booking getBooking(String name) {\n\t\t\tint i = 0;\r\n\t\t\tBooking buffer;\r\n\t\t\t\r\n\t\t\twhile(i < Bookings.size()) {\r\n\t\t\t\tbuffer = Bookings.get(i);\r\n\t\t\t\tString Name = buffer.getBooker();\r\n\t\t\t\tif (name.contentEquals(Name)) {\r\n\t\t\t\t\treturn buffer;\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}", "private synchronized OutputBuffer findOutputBuffer(String name) {\n for (int i = buffers.length - 1; i >= 0; i--) {\n if (name.equals(buffers[i].getName())) {\n return buffers[i];\n }\n }\n\n return null;\n }", "ISObject getFull(String key);", "public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }", "public static Object get(String name) throws NoSuchElementException {\n Object object = null;\n PersistentRootEntry entry = (PersistentRootEntry)Native.getPersistentMemoryTable();\n while (entry != null) {\n String ename = entry.name;\n if (ename != null && ename.equals(name)) {\n object = entry.value;\n break;\n }\n entry = entry.next;\n }\n\n if (object != null) {\n return object;\n }\n if (name.equals(\"new byte[0]\")) { object = new byte[0];\n } else if (name.equals(\"new byte[0][]\")) { object = new byte[0][];\n } else if (name.equals(\"new char[0]\")) { object = new char[0];\n } else if (name.equals(\"new char[0][]\")) { object = new char[0][];\n } else if (name.equals(\"new int[0]\")) { object = new int[0];\n } else if (name.equals(\"new Object[0]\")) { object = new Object[0];\n } else if (name.equals(\"new byte[] {0}\")) { object = new byte[] {0};\n } else if (name.equals(\"new byte[] {1}\")) { object = new byte[] {1};\n } else if (name.equals(\"new byte[] {3}\")) { object = new byte[] {3};\n } else if (name.equals(\"new byte[] {7}\")) { object = new byte[] {7};\n } else if (name.equals(\"new byte[] {15}\")) { object = new byte[] {15};\n } else if (name.equals(\"new byte[] {31}\")) { object = new byte[] {31};\n } else if (name.equals(\"new short[0]\")) { object = new short[0];\n } else if (name.equals(\"new short[MTYPE_LAST+1][]\")) { object = new short[SquawkConstants.MTYPE_LAST+1][];\n } else {\n throw new NoSuchElementException(name);\n }\n put(name, object);\n return object;\n }", "String getVolumeNr(final BlockDevInfo thisBDI) {\n for (final DrbdVolumeInfo dvi : drbdVolumes) {\n for (final BlockDevInfo bdi : dvi.getBlockDevInfos()) {\n if (bdi == thisBDI) {\n return dvi.getName();\n }\n }\n }\n Tools.appWarning(\"could not get volume nr for: \" + thisBDI.getName());\n return null;\n }", "@Override\n public synchronized char[] getKey(String catalogName)\n {\n char[] key;\n try {\n key = loadKey(catalogName);\n }\n catch (SecurityKeyException e) {\n key = null;\n LOG.warn(\"the %s is not exist.\", catalogName);\n }\n return key;\n }", "public synchronized KeyBinding getKeyBinding() {\r\n\t\tif (keyBinding == null){\r\n\t\t\tkeyBinding = new KeyBinding();\r\n\t\t}\r\n\t\treturn keyBinding;\r\n\t}", "public KVCommInterface getStore();", "com.google.openrtb.OpenRtb.BidRequest getBidrequest();", "public String getBidByBifPubkey(String publKey) throws SDKException {\n Bid bid = new Bid(publKey,null);\n return bid.getBidStr();\n }", "public Object getObject(String key);", "public Object getKey() { return name; }", "public V bubbaGet(K key) {\n int idx = hash(key);\n int hashVal = idx;\n\n while (table[idx] != null && table[idx].offset >= calcOff(hashVal, idx)) {\n if (table[idx].key != null && table[idx].equals(key)) {\n return table[idx].value;\n }\n increment(idx);\n }\n return null;\n }", "private Package_c getPackage(final String name) {\n\t\tPackage_c communication = Package_c.PackageInstance(modelRoot,\n\t\t\t\tnew ClassQueryInterface_c() {\n\n\t\t\t\t\tpublic boolean evaluate(Object candidate) {\n\t\t\t\t\t\tPackage_c selected = (Package_c) candidate;\n\t\t\t\t\t\treturn selected.getName().equals(name);\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\treturn communication;\n\t}", "public byte getBDeviceSubClass() {\r\n\t\treturn bDeviceSubClass;\r\n\t}", "private com.google.protobuf.SingleFieldBuilderV3<\n org.mrk.grpc.catalog.Product, org.mrk.grpc.catalog.Product.Builder, org.mrk.grpc.catalog.ProductOrBuilder> \n getProductFieldBuilder() {\n if (productBuilder_ == null) {\n productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.mrk.grpc.catalog.Product, org.mrk.grpc.catalog.Product.Builder, org.mrk.grpc.catalog.ProductOrBuilder>(\n getProduct(),\n getParentForChildren(),\n isClean());\n product_ = null;\n }\n return productBuilder_;\n }", "com.google.protobuf.ByteString\n getNameKeySpaceBytes();", "public String getBscid() {\r\n return bscid;\r\n }", "public String getBscid() {\r\n return bscid;\r\n }", "@GetMapping(\"/list/{name}\")\n public ResponseEntity<List<Product>> getProd(@PathVariable String name, final HttpSession session) {\n log.info(session.getId() + \" : Retrieving products with given keyword\");\n return ResponseEntity.status(HttpStatus.OK).body(prodService.getProdList(name));\n }" ]
[ "0.7122028", "0.53411734", "0.5309384", "0.4944269", "0.48629946", "0.47866046", "0.47709423", "0.47114846", "0.4695117", "0.45938534", "0.45846283", "0.45787367", "0.45779398", "0.45614958", "0.4558116", "0.4555647", "0.45305526", "0.45258978", "0.45160508", "0.44913596", "0.44848114", "0.44755667", "0.44651988", "0.44625264", "0.44570735", "0.44453734", "0.44259876", "0.44203815", "0.44093218", "0.44028616", "0.44004995", "0.4391225", "0.43874934", "0.43828887", "0.43713418", "0.43678614", "0.43673074", "0.4365506", "0.43487498", "0.4347992", "0.4342028", "0.43411797", "0.43315303", "0.43280923", "0.43251792", "0.43251792", "0.43251792", "0.43251792", "0.43076688", "0.4299419", "0.42965376", "0.42960554", "0.42947042", "0.42824292", "0.4280484", "0.4265889", "0.42561913", "0.42495576", "0.42495576", "0.42411572", "0.42404115", "0.42393723", "0.4233634", "0.42262203", "0.4224882", "0.4223043", "0.4215753", "0.42096087", "0.42007464", "0.419607", "0.41941372", "0.41701263", "0.4167523", "0.41646308", "0.41595477", "0.41580242", "0.41564777", "0.4149834", "0.4148537", "0.41462547", "0.41452947", "0.41448078", "0.41416216", "0.4140845", "0.4139896", "0.41320148", "0.41301435", "0.4129944", "0.4117586", "0.41167957", "0.41105068", "0.41081703", "0.40991992", "0.40986001", "0.4096124", "0.40958405", "0.4092999", "0.4091379", "0.4091379", "0.40891796" ]
0.7925565
0
Get the NBBOStruct for a product key for a session name within a period of subscription time.
public NBBOStruct getNbboSnapshotForProduct(int timeout, String sessionName, int productKey) throws UserException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public NBBOStruct getNbboSnapshotForProduct(String sessionName, int productKey) throws UserException;", "public Product getProductFromName(String prodName) throws BackendException;", "int getProductKey();", "public synchronized WebElement shoppingBagProductName() throws Exception {\n\n\t\treturn utils.findElementByLocator(driver, \"PDP_ShoppingBagProduct\",\n\t\t\t\t\"| PDP:Content(Product Name) of the Shopping bag page\");\n\t}", "public Long getBufferStock()\r\n\t{\r\n\t\treturn getBufferStock( getSession().getSessionContext() );\r\n\t}", "T getMarketDataForProduct(int classKey, int productKey, boolean lazyInitCache) throws SystemException, CommunicationException,\n AuthorizationException, DataValidationException, NotFoundException;", "public interface MarketQueryV4API\n{\n public boolean isV4ToV3MDConversionEnabled();\n\n public boolean isMDXSupportedSession(String session);\n\n public void subscribeCurrentMarketV4(int classKey, EventChannelListener clientListener)\n throws SystemException, CommunicationException, AuthorizationException, DataValidationException;\n\n public void unsubscribeCurrentMarketV4(int classKey, EventChannelListener clientListener)\n throws SystemException, CommunicationException, AuthorizationException, DataValidationException;\n\n public void subscribeRecapLastSaleV4(int classKey, EventChannelListener clientListener)\n throws SystemException, CommunicationException, AuthorizationException, DataValidationException;\n\n public void unsubscribeRecapLastSaleV4(int classKey, EventChannelListener clientListener)\n throws SystemException, CommunicationException, AuthorizationException, DataValidationException;\n\n public void subscribeTickerV4(int classKey, EventChannelListener clientListener)\n throws SystemException, CommunicationException, AuthorizationException, DataValidationException;\n\n public void unsubscribeTickerV4(int classKey, EventChannelListener clientListener)\n throws SystemException, CommunicationException, AuthorizationException, DataValidationException;\n\n public void subscribeNBBOForClassV2(String sessionName, int classKey, EventChannelListener clientListener)\n throws SystemException, CommunicationException, AuthorizationException, DataValidationException;\n\n public void unsubscribeNBBOForClassV2(String sessionName, int classKey, EventChannelListener clientListener)\n throws SystemException, CommunicationException, AuthorizationException, DataValidationException;\n\n /**\n * Get the NBBOStruct for a product key for a session name.\n * @param sessionName to subscribe to.\n * @param productKey to query.\n * @return the NBBOStruct for a product key.\n * @throws UserException sent by server.\n */\n public NBBOStruct getNbboSnapshotForProduct(String sessionName, int productKey) throws UserException;\n\n /**\n * Get the NBBOStruct for a product key for a session name within a period of subscription time.\n * @param timeout to limit the subscribtion time in millisecond.\n * @param sessionName to subscribe to.\n * @param productKey to query.\n * @return the NBBOStruct for a product key.\n * @throws UserException sent by server.\n */\n public NBBOStruct getNbboSnapshotForProduct(int timeout, String sessionName, int productKey)\n throws UserException;\n}", "public abstract I_SessionInfo getSession(I_SessionName sessionName);", "public ReservationModel findKcckReservationBySessionId(String sessionId) {\n\t\tKcckReservationInfo kcckReservationInfo = this.reservationRepository.findKcckReservationBySessionId(sessionId);\n\t\tif (kcckReservationInfo != null) {\n\t\t\tReservationModel reservationModel = new ReservationModel();\n\t\t\treservationModel.setReservationId(kcckReservationInfo.getReservationId());\n\t\t\treservationModel.setHospitalId(kcckReservationInfo.getHospitalId());\n\t\t\treservationModel.setDeptId(kcckReservationInfo.getDeptId());\n\t\t\treservationModel.setDoctorId(kcckReservationInfo.getDoctorId());\n\t\t\treservationModel.setPatientId(kcckReservationInfo.getPatientId());\n\t\t\treservationModel.setPatientName(kcckReservationInfo.getPatientName());\n\t\t\treservationModel.setNameFurigana(kcckReservationInfo.getNameFurigana());\n\t\t\treservationModel.setPhoneNumber(kcckReservationInfo.getPhoneNumber());\n\t\t\treservationModel.setEmail(kcckReservationInfo.getEmail());\n\t\t\treservationModel.setReservationDate(kcckReservationInfo.getReservationDate());\n\t\t\treservationModel.setReservationTime(kcckReservationInfo.getReservationTime());\n\t\t\treservationModel.setSessionId(kcckReservationInfo.getSessionId());\n\t\t\treservationModel.setReservationCode(kcckReservationInfo.getReservationCode());\n\t\t\treservationModel.setReminderTime(kcckReservationInfo.getReminderTime());\n\t\t\treservationModel.setDoctorName(kcckReservationInfo.getDoctorName());\n\t\t\treservationModel.setDoctorCode(kcckReservationInfo.getDoctorCode());\n\t\t\treservationModel.setDeptName(kcckReservationInfo.getDeptName());\n\t\t\treservationModel.setCardNumber(kcckReservationInfo.getPatientCode());\n\t\t\treservationModel.setPatientSex(kcckReservationInfo.getPatientGender());\n\t\t\treservationModel.setPatientBirtday(MssDateTimeUtil.dateToString(kcckReservationInfo.getPatientBirthDay(),\n\t\t\t\t\tDateTimeFormat.DATE_FORMAT_YYYYMMDD_EXTEND));\n\t\t\treturn reservationModel;\n\t\t}\n\t\treturn null;\n\n\t}", "com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder();", "public Object getObjFromSession(String key)\n\t{\n\t\treturn context.getSession().get(key);\n\t}", "Stock retrieveStock(String symbol, String asOf);", "public interface IBBO {\n String getSecurityId();\n\n double getBidPx();\n\n double getOfferPx();\n\n double getBidSize();\n\n double getOfferSize();\n\n String getTradingStatus();\n\n double getLastPx();\n\n double getLastSize();\n\n double getLowPx();\n\n double getHighPx();\n\n double getOpenPx();\n\n double getClosePx();\n\n PerformanceData getPerformanceData();\n\n boolean isInRecovery(IChannelStatus.ChannelType channelType);\n\n boolean isInRecoverySet(IChannelStatus.ChannelType channelType);\n}", "public java.math.BigDecimal getKswn() throws java.rmi.RemoteException;", "Stock retrieveStock(String symbol);", "public org.mrk.grpc.catalog.ProductOrBuilder getProductOrBuilder() {\n return getProduct();\n }", "public static Object getObject(HttpSession session, String key) {\n return session.getAttribute(key);\n }", "ProductPurchaseItem getProductPurchaseItemPerId(long sprcId);", "public Product getProductFromId(Integer prodId) throws BackendException;", "public abstract I_SessionInfo getSessionInfo(I_SessionName sessionName);", "public String getProductDirectoryServicingSessionReference() {\n return productDirectoryServicingSessionReference;\n }", "com.weizhu.proto.WeizhuProtos.Session getSession();", "Product getProductByProductName(String productName);", "public PxProductInfo getDbCombo() {\n long __key = this.dbComboId;\n if (dbCombo__resolvedKey == null || !dbCombo__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n PxProductInfoDao targetDao = daoSession.getPxProductInfoDao();\n PxProductInfo dbComboNew = targetDao.load(__key);\n synchronized (this) {\n dbCombo = dbComboNew;\n \tdbCombo__resolvedKey = __key;\n }\n }\n return dbCombo;\n }", "public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}", "public List<productmodel> getproductbyname(String name);", "public String findSName(String key) {\n\t\n\treturn stockList.get(key).sName; //for a given key , hashmap give a ojbect , to find name we should get object.sNAme\n }", "BListKey getKey();", "public String getProduct() {\n\t\treturn stockSymbol;\n\t}", "public STRUCT asStruct(Connection conn) throws SQLException {\r\n\t\tSTRUCT struct = null;\r\n\t\tStructDescriptor sd = StructDescriptor.createDescriptor(\"SWC_PEGA_NOTIFY_OBJ\", conn);\r\n\t\tObject[] attributes = new Object[] { swcPubId, pegaResponseCode, pegaResponseMSG };\r\n\t\tstruct = new STRUCT(sd, conn, attributes);\r\n\t\treturn struct;\r\n\t}", "public synchronized WebElement lnk_productNameMiniBag() throws Exception {\n\n\t\treturn utils.findElementByLocator(driver, \"PDP_MiniBag_productLNK\", \"Mini Bag| Product name\");\n\t}", "public com.weizhu.proto.WeizhuProtos.Session.Builder getSessionBuilder() {\n bitField0_ |= 0x00000002;\n onChanged();\n return getSessionFieldBuilder().getBuilder();\n }", "public Object get(String namespace, String key) {\n \t\tthis.init();\n \t\treturn this._get(this.getKey(namespace, key));\n \t}", "public Stock getFromMap(String name){\n\tif(table.containsKey(name)){\n\tStock rval = table.get(name);\n\treturn rval;\n\t}\n\telse{\n\t\t//call pull from URL and return newStock \n\t\taddToMap(String name, Stock newStock);\n\t\tgetFromMap(name);\n\t}\n}", "public Long getBufferStock(final SessionContext ctx)\r\n\t{\r\n\t\treturn (Long)getProperty( ctx, BUFFERSTOCK);\r\n\t}", "static BigDecimal Find(String productId){\n\n\t\tBigDecimal price=null;\n\n\t\tLong key=Long.parseLong(productId);\n\n\t\tif(!productListOnID.containsKey(key)){\n\t\t\tprice=new BigDecimal(\"0\");\n\t\t}else{\n\n\t\t\tdxm116130Product product=productListOnID.get(key);\n\t\t\tprice=product.getProductPrice();\n\n\t\t}\n\t\t\n\t\treturn price;\n\n\n\t}", "public static ITn3812Context findTn3812Session(final WebSocketSession session, final String name) {\r\n final Map<String, ITn3812Context> map = getTn3812Sessions(session);\r\n return map.get(name);\r\n }", "String getSessionKey(String sessionId) {\n return this.namespace + \"sessions:\" + sessionId;\n }", "public Map<String, Stock> getStocks();", "@Test\n public void TestBCABBACBCB() {\n HashMap<Character, Product> productList = new HashMap<Character, Product>();\n Product product = new Product('A', 20, 2, 1);\n productList.put(product.getName(), product);\n\n product = new Product('B', 50, 5, 3);\n productList.put(product.getName(), product);\n\n product = new Product('C', 30, 3, 2);\n productList.put(product.getName(), product);\n\n com.jama.domain.Supermarket supermarket = new com.jama.domain.Supermarket(productList);\n\n try {\n int totalPrice = supermarket.checkout(\"BCABBACBCB\");\n assertEquals(\"Total prices are not equal.\", new Integer(230), new Integer(totalPrice));\n }\n catch (Exception e)\n {\n fail(e.getMessage());\n }\n }", "Object getProduct();", "public String getKeyBiz() {\n return keyBiz;\n }", "public Number getBpoId() {\n return (Number) getAttributeInternal(BPOID);\n }", "public String getSkillBktParams (String stdId, String skill){\n String p = new String(\"\");\n Iterator<Document> cr;\n Document query = new Document();\n query = new Document(\"_id\", new ObjectId(stdId));\n MongoCursor<Document> cursor = studentSkills.find(query).iterator();\n try {\n // SKill already exists\n if (cursor.hasNext()){\n Document c = cursor.next();\n List<Document> skills = (List<Document>)c.get(\"skills\");\n cr = skills.iterator();\n\n try {\n int i =0 ;\n while (cr.hasNext()){\n Document sk = cr.next();\n String name = (String)sk.get(\"name\");\n if (name!=null && name.equals(skill)){\n p = (String)sk.get(\"bktParams\");\n }\n else return \"\";\n\n }\n // System.out.println(c.toJson(),skills);\n\n\n }\n finally {\n cursor.close();\n }\n }\n // SKill is new for student\n else{\n return \"\";\n\n }\n } finally {\n cursor.close();\n }\n if (p==null) return \"\";\n return p;\n}", "com.google.protobuf.ByteString\n getKeyspaceBytes();", "com.google.protobuf.ByteString\n getKeyspaceBytes();", "com.google.protobuf.ByteString\n getKeyspaceBytes();", "com.google.protobuf.ByteString\n getKeyspaceBytes();", "String getProduct();", "@Override\r\n\tpublic byte[] getBytes() throws UnsupportedEncodingException {\r\n\t\tbyte[] bytes = new byte[RECORD_SIZE];\r\n\t\tbytes = Utilities.completeBytes(bytes, this.bidInfo.getBytes(), 0);\r\n\t\tbytes = Utilities.completeBytes(bytes,\r\n\t\t\t\tUtilities.stringToBytes(Utilities.completeLength(biddingName, 30)), 32);\r\n\t\tbytes = Utilities.completeBytes(bytes, Utilities.intToBytes(typeProduct.ordinal()), 62);\r\n\t\tbytes = Utilities.completeBytes(bytes, product.getBytes(), 66);\r\n\t\tbytes = Utilities.completeBytes(bytes, publicationTime.getBytes(), 157);\r\n\t\tbytes = Utilities.completeBytes(bytes, initTime.getBytes(), 171);\r\n\t\tbytes = Utilities.completeBytes(bytes, finishTime.getBytes(), 185);\r\n\t\tbytes = Utilities.completeBytes(bytes, (byte) ((isAutomaticIncremet)?0:1), 199);\r\n\t\tbytes = Utilities.completeBytes(bytes, (byte) ((isPublic)?0:1), 200);\r\n\t\tbytes = Utilities.completeBytes(bytes,\r\n\t\t\t\tUtilities.stringToBytes(Utilities.completeLength(owner, 20)), 201);\r\n\t\treturn bytes;\r\n\t}", "com.google.protobuf.ByteString\n getSessionIDBytes();", "com.google.protobuf.ByteString\n getSessionIDBytes();", "OrderBook getOrderBook(String symbol, Integer limit);", "java.lang.String getProductCode();", "public org.mrk.grpc.catalog.ProductOrBuilder getProductOrBuilder() {\n if (productBuilder_ != null) {\n return productBuilder_.getMessageOrBuilder();\n } else {\n return product_ == null ?\n org.mrk.grpc.catalog.Product.getDefaultInstance() : product_;\n }\n }", "private Item getNewItem(String gtin) throws IOException {\n\n\t\tlog.info(\"Getting Item with Barcode: \" + gtin);\n\t\tGson gson = new Gson();\n\t\tURL url = new URL(\"https://api.outpan.com/v2/products/\" + gtin + \"?apikey=e13a9fb0bda8684d72bc3dba1b16ae1e\");\n\n\t\tStringBuilder temp = new StringBuilder();\n\t\tScanner scanner = new Scanner(url.openStream());\n\n\t\twhile (scanner.hasNext()) {\n\t\t\ttemp.append(scanner.nextLine());\n\t\t}\n\t\tscanner.close();\n\n\t\tItem item = new Item(gson.fromJson(temp.toString(), Item.class));\n\t\t\n\t\tif (item.name != null) {\n\t\t\treturn item;\n\t\t} else {\n\t\t\tthrow new NoNameForProductException();\n\t\t}\n\t}", "public QueryRequestAccelerator getRecordFromCache(Product product) {\n \n QueryRequestAccelerator record = null;\n String key = AcceleratorRecordFactory.getInstance().getKey(product);\n \n String value = RedisCacheManager.getInstance().get(key);\n if ((value == null) || (value.isEmpty())) {\n LOGGER.warn(\"Input key [ \"\n + key \n + \" ] does not exist in the cache.\");\n }\n else {\n \n record = JSONSerializer.getInstance()\n .deserializeToQueryRequestAccelerator(value);\n if (LOGGER.isDebugEnabled()){ \n LOGGER.debug(\"Key => [ \"\n + key \n + \" ], value => [ \"\n + value\n + \" ].\");\n }\n }\n \n return record;\n }", "Account getAccount(Long recvWindow, Long timestamp);", "TradingProduct getTradingProduct();", "LinkedHashMap<Long, Driver> getDriversForOrder(Long time, OrderDTO orderDTO);", "com.google.openrtb.OpenRtb.BidRequest getBidrequest();", "private com.google.protobuf.SingleFieldBuilder<\n com.weizhu.proto.WeizhuProtos.Session, com.weizhu.proto.WeizhuProtos.Session.Builder, com.weizhu.proto.WeizhuProtos.SessionOrBuilder> \n getSessionFieldBuilder() {\n if (sessionBuilder_ == null) {\n sessionBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n com.weizhu.proto.WeizhuProtos.Session, com.weizhu.proto.WeizhuProtos.Session.Builder, com.weizhu.proto.WeizhuProtos.SessionOrBuilder>(\n getSession(),\n getParentForChildren(),\n isClean());\n session_ = null;\n }\n return sessionBuilder_;\n }", "public GoogleMobilityData getRecordByKey(Long pk) throws SQLException {\n\n String select = \"SELECT * FROM GoogleMobilityData WHERE Synthetic_Mobility_PK=?\";\n Connection connection = null;\n PreparedStatement selectStmt = null;\n ResultSet results = null;\n try {\n connection = connectionManager.getConnection();\n selectStmt = connection.prepareStatement(select);\n selectStmt.setLong(1, pk);\n results = selectStmt.executeQuery();\n if (results.next()) {\n Date date = results.getDate(\"Date\");\n String country = results.getString(\"Country\");\n Long rec = results.getLong(\"Rec\");\n Long grocery = results.getLong(\"Grocery\");\n Long parks = results.getLong(\"Parks\");\n Long transit = results.getLong(\"Transit_Station\");\n Long work = results.getLong(\"Work\");\n Long residential = results.getLong(\"Residential\");\n String fips = results.getString(\"JHCountyStat_FipsCode\");\n\n GoogleMobilityData record = new GoogleMobilityData(date, country, rec, grocery, parks, transit, work, residential, fips);\n return record;\n }\n } catch (SQLException e) {\n e.printStackTrace();\n throw e;\n } finally {\n if (connection != null) {\n connection.close();\n }\n if (selectStmt != null) {\n selectStmt.close();\n }\n if (results != null) {\n results.close();\n }\n }\n return null;\n }", "String getStockName();", "ISObject getFull(String key);", "java.lang.String getBuyDescribe();", "private static List<String> getSessionsWithPurchases(\r\n Map<String, List<String>> sessionsFromCustomer,\r\n Map<String, List<Buy>> buysFromSessions\r\n )\r\n {\r\n // Initializes the session list.\r\n List<String> sessionList = new LinkedList<>();\r\n\r\n // Loops over all possible sessions, and finds ones for which purchases exist.\r\n for (Map.Entry<String, List<String>> entry: sessionsFromCustomer.entrySet()) {\r\n\r\n for (String sessionId: entry.getValue()) {\r\n if (buysFromSessions.containsKey(sessionId)) {\r\n sessionList.add(sessionId);\r\n }\r\n }\r\n\r\n }\r\n return sessionList;\r\n }", "public String getProductName() {\r\n return productName;\r\n }", "@GetMapping(\"/list/{name}\")\n public ResponseEntity<List<Product>> getProd(@PathVariable String name, final HttpSession session) {\n log.info(session.getId() + \" : Retrieving products with given keyword\");\n return ResponseEntity.status(HttpStatus.OK).body(prodService.getProdList(name));\n }", "public String getSumShopKb() {\n return sumShopKb;\n }", "public interface SessionMarketDataCache<T> extends MarketDataCache\n{\n String getSessionName();\n\n T getMarketDataForProduct(int classKey, int productKey) throws SystemException, CommunicationException,\n AuthorizationException, DataValidationException, NotFoundException;\n\n /**\n * If there is no market data cached for the product and lazyInitCache is true, then the cache\n * will initialize for the product, and subscribe for the product's class, if it's not already\n * subscribed.\n */\n T getMarketDataForProduct(int classKey, int productKey, boolean lazyInitCache) throws SystemException, CommunicationException,\n AuthorizationException, DataValidationException, NotFoundException;\n\n /**\n * Instruct the cache to maintain a list of products that have received updates since the last\n * time the MarketDataCacheClient called getUpdatedProductsList()\n */\n void maintainUpdatedProductsList(MarketDataCacheClient cacheUser);\n\n /**\n * Return a Set of Products that the MarketDataCache has received updates for. A Set will be\n * maintained by the cache for each MarketDataCacheClient that has been been registered via\n * maintainUpdatedProductsList(). Each time a MarketDataCacheClient calls this method, the\n * cache will clear out the Set of updated Products for that client.\n * @param cacheUser that has registered with maintainUpdatedProductsList()\n * @return Set<SessionKeyWrapper> that this cache has received market data updates for since the\n * last time this MarketDataCacheClient has called this method\n * @throws IllegalArgumentException if maintainUpdatedProductsList() hasn't been called for this\n * MarketDataCacheClient\n */\n Set<SessionKeyWrapper> getUpdatedProductsForClass(MarketDataCacheClient cacheUser,\n SessionKeyWrapper classKeyContainer)\n throws IllegalArgumentException;\n}", "@Override\r\n\tpublic ArrayList<BankAccountVO> getBankAccountVOListByKey(String key) {\n\t\tif(key.equals(\"ss\")){\r\n\t\t\tArrayList<BankAccountVO> BAVOList = new ArrayList<>();\r\n\t\t\tBAVOList.add(new BankAccountVO(\"ss141250110\",20000));\r\n\t\t\treturn BAVOList;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public String getKeyBuyItemName() {\r\n return getKeyShootName();\r\n }", "private Bill generateBill(String productName, Integer quantity) throws ScriptException {\n Bill bill = null;\n Optional<Product> optional = productCatalogueRepository.getProduct(productName);\n if (optional.isPresent()) {\n Product product = optional.get();\n bill = new Bill();\n BigDecimal totalAmount = calculateTotalAmount(product, quantity);\n BigDecimal amountPayable = calculateAmountPayable(product, quantity);\n BigDecimal savings = totalAmount.subtract(amountPayable);\n bill.setQuantity(quantity);\n bill.setProduct(product);\n bill.setTotalAmountPayable(amountPayable);\n bill.setTotalSavings(savings);\n }\n return bill;\n }", "public Key getkey(String appid) {\n log.debug(getSessionFactory() == null ? \"Session Factory is null\" : \"Session Factory is Not null\");\n log.debug(\"Application id :\" + appid);\n\n try {\n SimpleJdbcTemplate jdbcTemplate =\n new SimpleJdbcTemplate(SessionFactoryUtils.getDataSource(getSessionFactory()));\n Map args = new HashMap();\n args.put(\"in1\", new String(appid));\n\n return jdbcTemplate.queryForObject(\"select a.APP_ID,a.name,a.CERTIFICATEID,a.soa_group_id,c.soa_group_name from \" + APP_KEY_TABLE + \" a , SOA_GROUP c where a.status='Active' and a.soa_group_id=c.soa_group_id and a.APP_ID=?\"\n , new ParameterizedRowMapper<Key>() {\n public Key mapRow(ResultSet rs, int rowNum) throws SQLException {\n return new Key(rs.getString(\"APP_ID\"), rs.getString(\"name\"), rs.getString(\"soa_group_id\"), rs.getString(\"soa_group_name\"), rs.getString(\"CERTIFICATEID\"));\n }\n }, appid);\n } catch (DataAccessException e) {\n e.printStackTrace();\n return null;//To change body of catch statement use File | Settings | File Templates.\n }\n }", "public String getProductName() {\n return productName;\n }", "public String getProductName() {\n return productName;\n }", "public String getProductName() {\n return productName;\n }", "private static Key createInternalLobKey() {\n return Key.createKey(Arrays.asList(INTERNAL_KEY_SPACE,\n ILK_PREFIX_COMPONENT,\n UUID.randomUUID().toString()));\n }", "x0401.oecdStandardAuditFileTaxPT1.ProductDocument.Product getProduct();", "@Override\n\tpublic String[] businessKeys() {\n\t\treturn new String[]{\"DeviceLoginRecord\"};\n\t}", "public static String getNameFromStruct( ResourceKey key, Struct struct )\n {\n String s = null;\n\n switch( key.getType() )\n {\n case ResourceTypes.TYPE_IFO: // module info\n s = \"Module Information\";\n break;\n case ResourceTypes.TYPE_ARE: // area\n s = struct.getString( \"Name\" );\n break;\n case ResourceTypes.TYPE_GIC: // area comments\n case ResourceTypes.TYPE_GIT: // area objects\n break;\n case ResourceTypes.TYPE_UTC: // creature blueprint\n String first = struct.getString( \"FirstName\" );\n String last = struct.getString( \"LastName\" );\n if( first != null && last != null )\n s = first + \" \" + last;\n else if( last != null )\n s = last;\n else\n s = first;\n s.trim();\n break;\n case ResourceTypes.TYPE_UTD: // door blueprint\n s = struct.getString( \"LocName\" );\n break;\n case ResourceTypes.TYPE_UTE: // encounter blueprint\n s = struct.getString( \"LocalizedName\" );\n break;\n case ResourceTypes.TYPE_UTI: // item blueprint\n s = struct.getString( \"LocalizedName\" );\n break;\n case ResourceTypes.TYPE_UTP: // placeable blueprint\n s = struct.getString( \"LocName\" );\n break;\n case ResourceTypes.TYPE_UTS: // sound blueprint\n s = struct.getString( \"LocName\" );\n break;\n case ResourceTypes.TYPE_UTM: // store blueprint\n s = struct.getString( \"LocName\" );\n break;\n case ResourceTypes.TYPE_UTT: // trigger blueprint\n s = struct.getString( \"LocalizedName\" );\n break;\n case ResourceTypes.TYPE_UTW: // waypoint blueprint\n s = struct.getString( \"LocalizedName\" );\n break;\n case ResourceTypes.TYPE_DLG: // conversation\n // Conversations have no name\n case ResourceTypes.TYPE_JRL: // journal\n // Neither do journals, besides they don't go into\n // the tree anyway.\n case ResourceTypes.TYPE_FAC: // faction\n // Likewise\n case ResourceTypes.TYPE_ITP: // palette\n // No name.\n case ResourceTypes.TYPE_PTM: // plot manager\n case ResourceTypes.TYPE_PTT: // plot wizard blueprint\n case ResourceTypes.TYPE_BIC: // Character/Creature file\n break;\n }\n\n if( \"\".equals( s ) )\n s = null;\n\n return( s );\n }", "public org.mrk.grpc.catalog.Product.Builder getProductBuilder() {\n \n onChanged();\n return getProductFieldBuilder().getBuilder();\n }", "@Override\n\tObject getTimerCommand() {\n\t\treturn new Read(\"ProductPurchased\", \"ANY\", nextOffset);\n\t}", "public static SaplingExtendedSpendingKey m10458a(HDSeed brq) {\n long j;\n byte[] c = brq.mo42963c();\n byte[] bArr = new byte[169];\n if (c == null) {\n j = 0;\n } else {\n j = (long) c.length;\n }\n RustZCash.zip32_xsk_master(c, j, bArr);\n try {\n SaplingExtendedSpendingKey brw = new SaplingExtendedSpendingKey();\n brw.decodeSerialStream(bArr, 0);\n return brw;\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public String getBName()\n\t{\n\t\treturn bName;\n\t}", "public final String getBname() {\n return bname;\n }", "public String getSessionKey() {\n return sessionKey;\n }", "com.google.protobuf.ByteString\n getBuyDescribeBytes();", "private static List<String> getItemsPurchasedByCustomer(\r\n List<String> sessionListForCustomer,\r\n Map<String, List<Buy>> buysFromSessions\r\n ){\r\n // Initializes list of products.\r\n List<String> listProduct = new LinkedList<>();\r\n\r\n // Goes through every session in the session list\r\n // and adds every product that was bought within those\r\n // sessions to listProduct.\r\n for (String session: sessionListForCustomer) {\r\n for (Buy purchase: buysFromSessions.get(session)) {\r\n if (!listProduct.contains(purchase)) {\r\n listProduct.add(purchase.getProduct());\r\n }\r\n }\r\n }\r\n return listProduct;\r\n }", "public String getProduct() {\r\n return this.product;\r\n }", "public abstract <T> MarketDataBox<T> getValue(MarketDataKey<T> key);", "@Override\r\n\tpublic java.util.List<Inventory> findAll(String nameProduct) {\n\t\tsession=HibernateUlits.getSessionFactory().openSession();\r\n\t\t\r\n\t\tInventory inventory = new Inventory();\r\n\t\t\r\n\t\tQuery query = session.createQuery(\"FROM Inventory WHERE invName = '\" + nameProduct + \"'\");\r\n\t\t\r\n\t\tList inventor = query.list();\r\n\t\t\r\n\t\tList<Inventory> invent= new ArrayList<>();\r\n\t\t\r\n\t\tfor (Iterator iter = inventor.iterator();iter.hasNext();) {\r\n\t\t\tInventory in = (Inventory)iter.next();\r\n\t\t\tInteger id= in.getInvId();\r\n\t\t\tString name = in.getInvName();\r\n\t\t\tString description = in.getInvDescription();\r\n\t\t\tString location = in.getInvLocation();\r\n\t\t\tBigDecimal price = in.getInvPrice();\r\n\t\t\tShort stock = in.getInvStock();\r\n\t\t\tShort weight = in.getInvWeight();\r\n\t\t\tShort size = in.getInvSize();\r\n\t\t\t\r\n\t\t\tInventory tempInv = new Inventory(id,name,description,location,price,stock,weight,size);\r\n\t\t\tinvent.add(tempInv);\r\n\t\t }\r\n\t \r\n\t \r\n\t\treturn invent;\r\n\t}", "java.lang.String getProductGroup();", "public SCDataSpec get(String key) throws IOException;", "@Override\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }", "MIBObject get(String oid);", "private Book getBook(String sku) {\n return bookDB.get(sku);\n }", "@Override\n public StorageCapacity find(String key, String value) {\n Session session = Hibernate.createSession();\n\n if (session != null) {\n try {\n session.beginTransaction();\n\n CriteriaBuilder criteriaBuilder = session.getCriteriaBuilder();\n CriteriaQuery<StorageCapacity> criteriaQuery = criteriaBuilder.createQuery(StorageCapacity.class);\n Root<StorageCapacity> root = criteriaQuery.from(StorageCapacity.class);\n\n criteriaQuery.select(root).where(criteriaBuilder.equal(root.get(key), value));\n\n Query<StorageCapacity> query = session.createQuery(criteriaQuery);\n StorageCapacity result = query.getSingleResult();\n\n session.getTransaction().commit();\n\n return result;\n }\n catch (Exception exception) {\n session.getTransaction().rollback();\n\n System.out.println(\"Unable to find storage capacity.\");\n exception.printStackTrace();\n }\n }\n\n return null;\n }", "com.google.protobuf.ByteString\n getSessionHandleBytes();" ]
[ "0.77701706", "0.5144664", "0.5035738", "0.4889142", "0.47448367", "0.4620086", "0.4563503", "0.45601165", "0.45274946", "0.4525099", "0.44871187", "0.44692355", "0.4464466", "0.4453677", "0.44528544", "0.44487745", "0.44434124", "0.4415878", "0.44114175", "0.4407787", "0.4401206", "0.4400155", "0.43977398", "0.43957022", "0.4392688", "0.43593207", "0.4344533", "0.4303047", "0.43020588", "0.42860973", "0.4271591", "0.42626998", "0.424825", "0.42402098", "0.42378548", "0.4237271", "0.42287764", "0.42180234", "0.42151782", "0.42132202", "0.42109427", "0.4188225", "0.4166837", "0.41612402", "0.41584834", "0.41584834", "0.41584834", "0.41584834", "0.41490468", "0.41395143", "0.41356367", "0.41356367", "0.413343", "0.41305697", "0.41294757", "0.41158348", "0.4111359", "0.4104745", "0.4103922", "0.40943524", "0.40899485", "0.40833214", "0.4082157", "0.40588945", "0.4056897", "0.40552494", "0.40545547", "0.4050219", "0.4045264", "0.4044012", "0.40414897", "0.40396088", "0.403728", "0.4032752", "0.40307227", "0.40280008", "0.40280008", "0.40280008", "0.4025151", "0.40243214", "0.402358", "0.40135148", "0.40116847", "0.40095493", "0.40083948", "0.4005396", "0.39983684", "0.39974394", "0.39945278", "0.39942828", "0.39926246", "0.39870664", "0.39838675", "0.39836484", "0.39773634", "0.39734152", "0.3973348", "0.39724487", "0.39662075", "0.3965959" ]
0.7340129
1
declare instance of a circle class called c1 Construct the instance with the default constructor circle which sets its radius and color to its default values trying
public static void main(String[] args) { circle c1 = new circle(); //invoke public methods on instance c1 via dot operator System.out.println("Radius of Circle is" + c1.getRadius() + " & Area of the cirle is " + c1.getArea()); //Declare the instance of the class called c2 //Construct the instance with the 2nd constructor //with the given radius and default color circle c2 = new circle(2.0); //Invoke public methods on instance c2 via dot operator System.out.println("Caricle has radius of "+c2.getRadius() + " and area of " + c2.getArea() ); circle c4 = new circle(); //construct instance of a circle using default constructor c4.setRadius(4.5); //change radius value from default value given in constructor System.out.println("New radius set is " + c4.getRadius()); c4.setColor("blue"); //change color System.out.println("New color of the circle is " + c4.getColor()); System.out.println(c4.toString()); System.out.println("Circumference of the circle is " + c4.getCircumference()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Circle(){ // 1 constructor\n this.radius = DEFAULT_RADIUS;\n this.color = DEFAULT_COLOR;\n }", "public Circle(double radius){ // 2 constructor\n this.radius = radius;\n this.color = DEFAULT_COLOR;\n }", "public Circle() {\n radius = 1.0;\n color = \"red\";\n }", "public Circle() {\n radius = 1.0;\n color = \"red\";\n }", "public Circle(){\n\t\t\n\t\tradius = 1.0;\n\t\tcolor =\"Red\";\n\t}", "public Circle(double radius, String color){ // 3 constructor\n this.radius = radius;\n this.color = color;\n }", "SimpleCircle() {\n\t\tradius=1;\n\t}", "SimpleCircle() {\n\t\tradius = 1;\n\t}", "public Circle(){}", "public Circle() {\n this( 1.0 ); \n }", "public Circle() {\n\t\tr=0.0; //by defalut set radius to something so we have a circle \n\t}", "public Circle(double r) {\n radius = r;\n color = \"red\";\n }", "public Circle() {\n this(0, 0, 1);\n }", "public Circle(double radius){\n\t\tradius =this.radius;\n\t\tcolor =\"Red\";\n\t}", "public Circle(double r) {\n radius = r;\n color = \"red\";\n }", "public Circle(double radius,String c){\n\t\tradius = this.radius;\n\t\tcolor =c;\n\t}", "public Circle() {\r\n this.radius = 0.0;\r\n this.center = new Point();\r\n }", "public Circle(int x, int y, int r, Color c) {\n super(x-r,y-r);\n color = c;\n name = \"Circle\";\n width = 2*r;\n height = 2*r;\n radius = r;\n }", "public Circle()\r\n\t{\r\n\t\tradius = 0.0;\r\n\t}", "public Circle(){\n }", "public Circle(SelectedColor color) {\n super(Name.Circle, color);\n\n Log.i(\"Circle\",\"Created a \" + color + \" Circle\");\n //Need getcolor() to pick random\n //Maybe keep all colors random at create time, then when we add them to data struc\n //we change one of the colors depending on \"correct shape\"\n }", "public Circle(double radius) {\n super(\"white\", true);\n this.radius = radius;\n }", "public Circle(double radius){\n this.radius = radius;\n }", "public Circle(){\r\n\t \t// System.out.println(\"Default constructor dipanggil.\");\r\n\t \tjejari = 1;\r\n\t \tx = 5;\r\n\t \tbilObjekWujud++;\r\n\t }", "public Circle(double r)\r\n\t{\r\n\t\tradius=r;\r\n\t}", "public Circle(double radio) {\n\n super(\"circle\");\n this.radio=radio;\n }", "public Circle(double r)\n {\n setRad(r);\n\n }", "public Circle(int x, int y) {\n\t \n\tSystem.out.println(\"Circel constructor called.\"); \n \n\tthis.X=x;\n\tthis.Y=y;\n}", "public Circle(Circle circle) {\n this.center = circle.center;\n this.radius = circle.radius;\n }", "public Circle(Circle c){\n\t\tthis(c.radius,c.p);\n\t}", "public Ex1Circle(double radiusIn)\n {\n radius = radiusIn;\n }", "public Circle(int x, int y, int r) {\n super(x-r,y-r);\n name = \"Circle\";\n width = 2*r;\n height = 2*r;\n radius = r;\n }", "public Circle(String color, double radius)\r\n {\r\n super(color);\r\n mRadius = radius;\r\n \r\n }", "public Circle(double r) {\n this.r = r;\n }", "public Circle(double givenRadius)\n\t{\n\t\tradius = givenRadius;\n\t}", "public Circle(double radius, String color, boolean filled){\n super(color, filled);\n this.radius = radius;\n }", "public Circle() {\n super(new GeoCircle(), FeatureTypeEnum.GEO_CIRCLE);\n this.setFillStyle(null);\n }", "public Circle(int r) {\n\t\tthis.radius = r;\n\t}", "public static void main(String[] args){\n\t\tCircle c1 = new Circle();\n\t\tSystem.out.println(\"Radius is \" + c1.getRadius()+ \" Color is \" + c1.getColor() + \" Area is \"+ c1.getArea());\n\t\t/*\n\t\t A system println is done.\n\t\t We use the dot operator to invoke the methods! Remember the methods? They return\n\t\t the radius....color...and area!\n\n\t\t Our first constructor already have values , they equaled to 1.0 and 'red'\n\t\t */\n\n\t\tCircle c2 = new Circle(2.0);\n\t\tSystem.out.println(\"Radius is \" + c2.getRadius()+ \" Color is \" + c2.getColor() + \" Area is \"+ c2.getArea());\n\t\t/*\n\t\t * Observe, Constructor 2 needed data for it's double r. Here, we tell it (give r value 2.0)\n\t\t * r now equals 2.0, and that means that radius now equals 2.0!\n\t\t */\n\n\t\tCircle c3 = new Circle(2.0, \"blue\");\n\t\tSystem.out.println(\"Radius is \" + c3.getRadius()+ \" Color is \" + c3.getColor() + \" Area is \"+ c3.getArea());\n\t\t/*\n\t\t * Constructor 3 needed 2 different data values, so we gave it to them\n\t\t *\n\t\t *\n\t\t * We are done ! Yay!!!\n\t\t */\n\n Circle c4 = new Circle(2.0, \"blue\");\n System.out.println(\"Radius is \" + c4.getRadius()+ \" Color is \" + c4.getColor() + \" Area is \"+ c4.getArea() + \" Circumference is \" + c4.getCircumference());\n /*\n *\n * Calling new getCircumference method\n *\n */\n\n\t}", "public Circle(int centerX, int centerY, int radius, Color color) {\n\t\tsuper();\n\t\tthis.centerX = centerX;\n\t\tthis.centerY = centerY;\n\t\tthis.radius = radius;\n\t\tthis.color = color;\n\t}", "public Circle(Point o, double r) {\n origin = new Point(o);\n radius = r;\n }", "public Circle(double radius){\n// Set the this.X to the args\n//Force any var radius < 0 to 0\n this.radius = Math.max(0, radius);\n }", "public Circle(Point p, Point q, double r) {\n // TODO: Question 2.1\n\n }", "public Circle(double r) {\n this.r = r;\n this.center = new Point(0,0);\n }", "SimpleCircle(double newRadius){\n\t\tradius=newRadius;\n\t}", "public Circle(int x, int y) {\n super(x-5,y-5);\n name = \"Circle\";\n width = 2*5;\n height = 2*5;\n radius = 5;\n }", "SimpleCircle(double newRadius) {\n\t\tradius = newRadius;\n\t}", "public Circle(double radius, Point center) {\r\n this.radius = radius;\r\n this.center = center;\r\n }", "public Circle( double r, int a, int b )\r\n {\r\n super( a, b ); // call to superclass constructor\r\n setRadius( r ); \r\n }", "private void createCircle(double x, double y) {\r\n GOval circle = new GOval(x, y, DIAMETR, DIAMETR);\r\n circle.setFilled(true);\r\n circle.setFillColor(Color.BLACK);\r\n add(circle);\r\n }", "public Circle(double r, Point center) {\n this.r = r;\n this.center = center;\n }", "public Circle(double xValue, double yValue, double r) {\n origin = new Point(xValue, yValue);\n radius = r;\n }", "Circle(int radius) {\n\t\tsuper(radius);\n\t\tSystem.out.println(\"The area of circle is \"+3.14*(radius*radius));\n\t}", "public Circle(double newRadius) {\n\t\tradius = newRadius;\t\t\t\n\t}", "public Circle(float centerX, float centerY, float radius) {\n this.center = new Vector2(centerX, centerY);\n this.radius = radius;\n }", "public Circle(double jejari){\r\n\t\t// this();//panggil default constructor\r\n\t\t this.jejari = jejari;\r\n\t\t x = 5;\r\n\t\t// this(jejari, 59); //panggil constructor 2 parameter\r\n\t\tbilObjekWujud++;\r\n\t}", "public Circle(double radius, String color, boolean fill) {\n super(color, fill);\n this.radius = radius;\n }", "public Circle(double centerx, double centery, double radius, Color c) {\n\t\tsuper(name, centerx, centery, radius + centerx, radius + centery, c);\n\t\tthis.radius = new Double(radius);\n\t}", "public Circle(Vector2 center, float radius) {\n this.center = center;\n this.radius = radius;\n }", "public Shape(Color c) {\n\t\tcolor = c;\n\t}", "public Circle(double radius) {\n super(new GeoCircle(), FeatureTypeEnum.GEO_CIRCLE);\n radius = makePositive(radius, \"Invalid radius. NaN\");\n\n if (radius >= MINIMUM_RADIUS) {\n this.getRenderable().setRadius(radius);\n } else {\n throw new IllegalArgumentException(\"Invalid radius. \" + radius + \" Minimum supported \" + MINIMUM_RADIUS);\n }\n this.setFillStyle(null);\n }", "public CircleWithException() {\n this(1.0);\n }", "public Cone(String labelIn, double heightIn, double radiusIn)\r\n {\r\n setHeight(heightIn);\r\n setLabel(labelIn);\r\n setRadius(radiusIn);\r\n }", "public CircleComponent()\n {\n circles = new ArrayList<>();\n circleCounter = 0;\n\n }", "public Shape(double x, double y) { \n\t\t\tthis(x, y, RADIUS_DEFAULT, Color.BLACK, 50, 50, 15, 15, \"\", ShapeType.CIRCLE); \n\t\t}", "private void addCircle() {\n\t\tdouble r = getRadius();\n\t\tadd(new GOval(getWidth() / 2.0 - r, getHeight() / 2.0 - r, 2 * r, 2 * r));\n\t}", "public CircularGameObject(GameObject parent, double radius, double[] fillColour, double[] lineColour) {\n super(parent);\n\n setRadius(radius);\n setFillColour(fillColour);\n setLineColour(lineColour);\n }", "public ShapeComponent drawCircle()\n\t{\n\t\tShapeComponent circleComponent = new ShapeComponent(radius*2, radius*2, \n\t\t\t\t\"circle\");\n\t\treturn circleComponent;\n\t}", "public ColorEllipse(javax.swing.JPanel container){//I'm making this shape's subclass ask for a container of type javax.swing.JPanel when isntantiated. \n\t\tsuper(container, new java.awt.geom.Ellipse2D.Double());//I'm passing the superclass constructor the container that will be \n\t\t\t\t\t\t\t\t //received when the shape is created and I'm also passing a new ellipse of type java.awt.geom.Ellipse2D.Double.\n\t}", "public static void main(String[] args) {\n\t\tCircle c1 = new Circle(1.0);\n//\t\tSystem.out.println(c1.count);\t// access class variable 'count' by object variable\n//\t\tSystem.out.println(Circle.count);\t// access it by class name\n\t\t\n\t\tCircle c2 = new Circle(2.0);\n//\t\tSystem.out.println(c1.count);\n//\t\tSystem.out.println(Circle.count);\n//\t\tSystem.out.println(Circle.PI);\n\t\t\n//\t\tSystem.out.println(c1.getRadius());\n//\t\tSystem.out.println(c1.perimeter());\n//\t\tSystem.out.println(c1.area());\n\t\t\n//\t\tSystem.out.println(c2.getRadius());\n//\t\tSystem.out.println(c2.perimeter());\n//\t\tSystem.out.println(c2.area());\n\t\t\n//\t\tSystem.out.println(c1.PI);\n//\t\tc1.PI = 3.0;\t//The final field Circle.PI cannot be assigned\n//\t\tSystem.out.println(c1.PI);\n//\t\tc2.PI = 2.0;\t//The final field Circle.PI cannot be assigned\t\n//\t\tSystem.out.println(c2.PI);\n\t\t\n//\t\tSystem.out.println(c1.getRadius());\n//\t\tSystem.out.println(c1.perimeter());\n//\t\tSystem.out.println(c1.area());\n//\t\t\n//\t\tSystem.out.println(c2.getRadius());\n//\t\tSystem.out.println(c2.perimeter());\n//\t\tSystem.out.println(c2.area());\n\n\t}", "private static Circle createCircle(String[] input) {\r\n int px = Integer.parseInt(input[1]);\r\n int py = Integer.parseInt(input[2]);\r\n int vx = Integer.parseInt(input[3]);\r\n int vy = Integer.parseInt(input[4]);\r\n boolean isFilled = Boolean.parseBoolean(input[5]);\r\n int diameter = Integer.parseInt(input[6]);\r\n float r = (float) Integer.parseInt(input[7]) / 255.0f;\r\n float g = (float) Integer.parseInt(input[8]) / 255.0f;\r\n float b = (float) Integer.parseInt(input[9]) / 255.0f;\r\n int insertionTime = Integer.parseInt(input[10]);\r\n boolean isFlashing = Boolean.parseBoolean(input[11]);\r\n float r1 = (float) Integer.parseInt(input[12]) / 255.0f;\r\n float g1 = (float) Integer.parseInt(input[13]) / 255.0f;\r\n float b1 = (float) Integer.parseInt(input[14]) / 255.0f;\r\n return new Circle(insertionTime, px, py, vx, vy, diameter, new Color(r, g, b, 1), isFilled,\r\n isFlashing, new Color(r1, g1, b1, 1));\r\n }", "public Circle(Point2D origin, double radius) {\n if (radius <= 0) {\n throw new IllegalArgumentException(\"Radius must be greater than zero\");\n }\n this.origin = origin;\n this.radius = radius;\n\n }", "public String _setcirclecolor(int _nonvaluecolor,int _innercolor) throws Exception{\n_mcirclenonvaluecolor = _nonvaluecolor;\n //BA.debugLineNum = 61;BA.debugLine=\"mCircleFillColor = InnerColor\";\n_mcirclefillcolor = _innercolor;\n //BA.debugLineNum = 62;BA.debugLine=\"Draw\";\n_draw();\n //BA.debugLineNum = 63;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "public CircleTest(String testName)\n {\n super( testName );\n circle = (Circle) shapeMap.get(\"circle\");\n }", "public Color getColor() {\n return circleColor;\n\n }", "public LED(int x, int y, int radius, int color, Graphics g)\n {\n // variablen instanzieren\n g2d = (Graphics2D) g;\n \n //LED instanzieren\n g.setColor(new Color(color));\n g.fillOval(x, y, radius, radius);\n }", "public Ball(Point center, int r, java.awt.Color color){\r\n this.center = center;\r\n this.radius =r;\r\n this.color =color;\r\n }", "public Square(Point2D.Double center, double radius, Color color)\n {\n super( center, radius, color);\n rect = new Rectangle2D.Double(center.getX()-radius,center.getY()-radius,radius*2, radius*2);\n }", "public void paintComponent(Graphics g)\r\n\t{\r\n\t\tCircle c1 = new Circle(3);\r\n\t\tCircle c2 = c1;\r\n\t\tc1.setRadius(4);\r\n\t\tSystem.out.println(c2.getRadius());\r\n\r\n\t}", "public Circle(double x, double y, double z, double radius) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.radius = radius;\n pos = Vector3d.createVector3d(x, y, z);\n }", "public Circle(Vector3d center, double radius) {\n this.x = center.x;\n this.y = center.y;\n this.z = center.z;\n this.radius = radius;\n pos = Vector3d.createVector3d(x, y, z);\n }", "public City(String name, float x, float y, CityColor color, int radius) {\r\n\t\tsuper(x, y);\r\n\t\tthis.name = name;\r\n\t\tthis.color = color;\r\n\t\tthis.radius = radius;\r\n\t}", "public DrawableCircle(Point center, double radius, boolean isFilled, Color color) {\n this.center = center;\n this.radius = radius;\n this.isFilled = isFilled;\n this.color = color;\n }", "public Ball(AbstractGame world) {\n super(world);\n innerColor = Color.WHITE;\n myCircle = new Circle(15);\n myCircle.setFill(innerColor);\n myCircle.setCenterX(x);\n myCircle.setCenterY(y);\n myShape = myCircle;\n }", "public Circle(double radius) throws ShapeException {\n if (radius > 0) {\n this.radius = radius;\n } else {\n throw new ShapeException(\"Invalid radius!\");\n }\n }", "private void newCircle()\n {\n setMinimumSize(null);\n\n //Generate a new circle\n panel.generateNewCircle();\n\n //Calculate the circle properties and setup the text area with their values\n generateTextArea();\n\n //Repack the frame to fit everything perfectly\n pack();\n\n setMinimumSize(getSize());\n }", "public Circle getShape(){\n\t\treturn new Circle();\n\t}", "Circle2D(double newX, double newY, double newRadius){\r\n\t\tthis.x = newX;\r\n\t\tthis.y = newY;\r\n\t\tthis.radius = newRadius;\r\n\t}", "public static void main(String[] args) {\r\n DrawCircle circle = new DrawCircle();\r\n }", "public Shape(Shape c) { \n\t\t\t\n\t\t\tthis(c.getCenterX(), c.getCenterY(), c.getRadius(), c.getColor(), c.getWidth(), c.getHeight(), c.getAW(), c.getAH(), c.getText(), c.getType()); \n\t\t\t\n\t\t}", "public GameObjectBase(float boundsRadius) {\n bounds = new Circle(x,y,boundsRadius);\n }", "public static void main(String[] args) {\n\n Color color = new Color();\n color.setIntensity(10);\n color.setName(\"Green\");\n Shape.color = color; // aici se modifica campul color la nivel de clasa\n // Shape.color - variabilele si methodele se acceseaza cu numele clasei iar schimbarea este vizibila in toate instantele clasei\n// shape.setColor(color); // bad practice , nu e ok sa avem getteri si setteri pentru variabile statice\n// shape1.setAria(1); // aici se modifica valoarea campului aria numai in obiectul shape1\n\n// System.out.println(shape1.getAria());\n// System.out.println(Shape.color);\n// System.out.println(shape1.color1);\n\n// System.out.println(shape2.color1);\n// Color color2 = new Color();\n// color2.setIntensity(110);\n// color2.setName(\"Red\");\n// shape2.color = color2; // e acelasi lucru ca si atunci cand schimbam valoarea campului static cu numele clasei, tot la nivel de clasa se schimba si asa pentru ca e static\n // cum e aici schimbat nu e ok- (bad practice) pentru ca ne poate induce in eroare, color fiid un camp static el trebuie accesat cu numele clasei\n // chiar si cand folosim numele unei instante a clasei , schimbarea este vizibila in toate celelalte intante ale clasei\n// System.out.println(shape2.color);\n// System.out.println(shape3.color);\n// System.out.println(shape4.color);\n }", "public Shape(String color) { \n System.out.println(\"Shape constructor called\"); \n this.color = color; \n }", "public PXRadialGradient() {\n center = new PointF();\n }", "public void testCircleConstructor(int x, int y)\n {\n String fb = \"\";\n Circle circle = new Circle(x, y);\n if (circle.getxPosition() != x)\n {\n fb += \"Fail in TestPrelab2.\\n\";\n fb += \"Circle parameter constructor improperly set xPosition.\\n\";\n fb += \"Circle circle = new Circle(\" + x + \",\" + y + \");\\n\";\n fb += \"did not set xPosition to \" + x + \".\\n\";\n fail(fb);\n }\n \n if (circle.getyPosition() != y)\n {\n fb += \"Fail in TestPrelab2.\\n\";\n fb += \"Circle parameter constructor improperly set xPosition.\\n\";\n fb += \"Circle circle = new Circle(\" + x + \",\" + y + \");\\n\";\n fb += \"did not set yPosition to \" + y + \".\\n\";\n fail(fb);\n }\n \n if (!circle.getColor().equals(\"red\"))\n {\n fb += \"Fail in TestPrelab2.\\n\";\n fb += \"Circle parameter constructor improperly set Color.\\n\";\n fb += \"Check lab documentation for proper color.\\n\";\n fail(fb); \n }\n \n if (circle.getDiameter() != 10)\n {\n fb += \"Fail in TestPrelab2.\\n\";\n fb += \"Circle parameter constructor improperly set diameter.\\n\";\n fb += \"Check lab documentation for proper diameter.\\n\";\n fail(fb); \n }\n \n if (!circle.isIsVisible() || !circle.isMvr())\n {\n fb += \"Fail in TestPrelab2.\\n\";\n fb += \"Circle parameter constructor did not make the circle \" \n + \"visible correctly.\\n\";\n fb += \"Constructor should run makeVisible().\\n\";\n fb += \"Check lab documentation.\\n\";\n fail(fb); \n }\n }", "public FilledCircleState1(JVDraw context) {\n\t\tsuper(context);\n\t}", "public Circle(IGeoCircle renderable) {\n super(renderable, FeatureTypeEnum.GEO_CIRCLE);\n\n if(null == renderable) {\n throw new IllegalArgumentException(\"Encapsulated GeoCircle must be non-null\");\n }\n this.setRadius(makePositive(this.getRadius(), \"Invalid radius. NaN\"));\n\n if (this.getRadius() < MINIMUM_RADIUS) {\n throw new IllegalArgumentException(\"Invalid radius. \" + this.getRadius() + \" Minimum supported \" + MINIMUM_RADIUS);\n }\n }", "public Ball(Point center, int radius, Color color) {\n\n this.center = center;\n if (radius > 0) {\n this.radius = radius;\n } else {\n this.radius = DEFAULT_RADIUS;\n }\n this.color = color;\n this.velocity = new Velocity(0, 0);\n }", "public CircleWithException(double radius) {\n setRadius(radius);\n numberOfObjects++;\n }", "Shape1(){\n\t\tSystem.out.println(\"Shape is constructed\");\n\t}" ]
[ "0.87202775", "0.85439503", "0.8405981", "0.8396547", "0.8319921", "0.8260718", "0.81475216", "0.8072442", "0.79058176", "0.78790486", "0.7852895", "0.7837734", "0.78272015", "0.7816442", "0.7790958", "0.7744007", "0.7733603", "0.77225566", "0.7693362", "0.7683247", "0.76376677", "0.76237094", "0.7540769", "0.7524014", "0.74577504", "0.7418449", "0.7414965", "0.7386133", "0.73726887", "0.7341875", "0.7314568", "0.72987086", "0.7254823", "0.7244313", "0.72050947", "0.71956676", "0.7190756", "0.7163022", "0.71602976", "0.7112863", "0.70823914", "0.70604146", "0.70255524", "0.7016315", "0.7014", "0.6976158", "0.6939402", "0.69086844", "0.6886708", "0.6843207", "0.680806", "0.6790129", "0.6784193", "0.6767069", "0.67485005", "0.6729811", "0.6718266", "0.6715011", "0.6702194", "0.6679626", "0.66650146", "0.66492087", "0.66043264", "0.6601167", "0.6588407", "0.65758276", "0.64939004", "0.6489373", "0.64626503", "0.6460826", "0.64518255", "0.6421877", "0.63809115", "0.6376695", "0.6367346", "0.63457525", "0.6334192", "0.6329866", "0.63280976", "0.63251436", "0.63148814", "0.62850636", "0.62792456", "0.6270557", "0.6266796", "0.62422353", "0.6240238", "0.6239462", "0.6236275", "0.61754906", "0.61680347", "0.61649966", "0.6160774", "0.6153843", "0.6110695", "0.60939467", "0.60897475", "0.60860837", "0.60725546", "0.6069766" ]
0.73492974
29
Use this factory method to create a new instance of this fragment using the provided parameters.
public static CoatOfArmsFragment newInstance(City city) { CoatOfArmsFragment fragment = new CoatOfArmsFragment(); Bundle args = new Bundle(); args.putParcelable(ARG_INDEX, city); fragment.setArguments(args); return fragment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "protected abstract Fragment createFragment();", "public void createFragment() {\n\n }", "@Override\n protected Fragment createFragment() {\n Intent intent = getIntent();\n\n long id = intent.getLongExtra(MovieDetailFragment.EXTRA_ID, -1);\n return MovieDetailFragment.newInstance(id);\n }", "public CuartoFragment() {\n }", "public StintFragment() {\n }", "public ExploreFragment() {\n\n }", "public RickAndMortyFragment() {\n }", "public FragmentMy() {\n }", "public LogFragment() {\n }", "public FeedFragment() {\n }", "public HistoryFragment() {\n }", "public HistoryFragment() {\n }", "public static MyFeedFragment newInstance() {\n return new MyFeedFragment();\n }", "public WkfFragment() {\n }", "public static ScheduleFragment newInstance() {\n ScheduleFragment fragment = new ScheduleFragment();\n Bundle args = new Bundle();\n //args.putString(ARG_PARAM1, param1);\n //args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public ProfileFragment(){}", "public WelcomeFragment() {}", "public static ForumFragment newInstance() {\n ForumFragment fragment = new ForumFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n\n return fragment;\n }", "public static NotificationFragment newInstance() {\n NotificationFragment fragment = new NotificationFragment();\n Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public progFragment() {\n }", "public HeaderFragment() {}", "public static RouteFragment newInstance() {\n RouteFragment fragment = new RouteFragment();\n Bundle args = new Bundle();\n //fragment.setArguments(args);\n return fragment;\n }", "public EmployeeFragment() {\n }", "public Fragment_Tutorial() {}", "public NewShopFragment() {\n }", "public FavoriteFragment() {\n }", "public static MyCourseFragment newInstance() {\n MyCourseFragment fragment = new MyCourseFragment();\r\n// fragment.setArguments(args);\r\n return fragment;\r\n }", "public static MessageFragment newInstance() {\n MessageFragment fragment = new MessageFragment();\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }", "public static ReservationFragment newInstance() {\n\n ReservationFragment _fragment = new ReservationFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return _fragment;\n }", "public CreateEventFragment() {\n // Required empty public constructor\n }", "public static RecipeListFragment newInstance() {\n RecipeListFragment fragment = new RecipeListFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return fragment;\n }", "public static Fragment newInstance() {\n\t\treturn new ScreenSlidePageFragment();\n\t}", "public NoteActivityFragment() {\n }", "public static WeekViewFragment newInstance(int param1, int param2) {\n WeekViewFragment fragment = new WeekViewFragment();\n //WeekViewFragment 객체 생성\n Bundle args = new Bundle();\n //Bundle 객체 생성\n args.putInt(ARG_PARAM1, param1);\n //ARG_PARAM1에 param1의 정수값 넣어서 args에 저장\n args.putInt(ARG_PARAM2, param2);\n //ARG_PARAM2에 param2의 정수값 넣어서 args에 저장\n fragment.setArguments(args);\n //args를 매개변수로 한 setArguments() 메소드 수행하여 fragment에 저장\n return fragment; //fragment 반환\n }", "public static Fragment0 newInstance(String param1, String param2) {\n Fragment0 fragment = new Fragment0();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static QueenBEmbassyF newInstance() {\n QueenBEmbassyF fragment = new QueenBEmbassyF();\n //the way to pass arguments between fragments\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }", "public static Fragment newInstance() {\n StatisticsFragment fragment = new StatisticsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public EventHistoryFragment() {\n\t}", "public HomeFragment() {}", "public PeopleFragment() {\n // Required empty public constructor\n }", "public static FeedFragment newInstance() {\n FeedFragment fragment = new FeedFragment();\n return fragment;\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public VantaggiFragment() {\n // Required empty public constructor\n }", "public AddressDetailFragment() {\n }", "public ArticleDetailFragment() { }", "public static DropboxMainFrag newInstance() {\n DropboxMainFrag fragment = new DropboxMainFrag();\n // set arguments in Bundle\n return fragment;\n }", "public RegisterFragment() {\n }", "public EmailFragment() {\n }", "public static CommentFragment newInstance() {\n CommentFragment fragment = new CommentFragment();\n\n return fragment;\n }", "public static FragmentComida newInstance(String param1) {\n FragmentComida fragment = new FragmentComida();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n\n\n }", "public static ParqueosFragment newInstance() {\n ParqueosFragment fragment = new ParqueosFragment();\n return fragment;\n }", "public ForecastFragment() {\n }", "public FExDetailFragment() {\n \t}", "public static AddressFragment newInstance(String param1) {\n AddressFragment fragment = new AddressFragment();\n\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n\n return fragment;\n }", "public TripNoteFragment() {\n }", "public ItemFragment() {\n }", "public NoteListFragment() {\n }", "public CreatePatientFragment() {\n\n }", "public DisplayFragment() {\n\n }", "public static frag4_viewcompliment newInstance(String param1, String param2) {\r\n frag4_viewcompliment fragment = new frag4_viewcompliment();\r\n Bundle args = new Bundle();\r\n args.putString(ARG_PARAM1, param1);\r\n args.putString(ARG_PARAM2, param2);\r\n fragment.setArguments(args);\r\n return fragment;\r\n }", "public static fragment_profile newInstance(String param1, String param2) {\n fragment_profile fragment = new fragment_profile();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "@Override\n\tprotected Fragment createFragment() {\n\t\treturn new FormFragment();\n\t}", "public static MainFragment newInstance() {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public ProfileFragment() {\n\n }", "public BackEndFragment() {\n }", "public CustomerFragment() {\n }", "public static FriendsFragment newInstance(int sectionNumber) {\n \tFriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }", "public ArticleDetailFragment() {\n }", "public ArticleDetailFragment() {\n }", "public ArticleDetailFragment() {\n }", "public static Fragment newInstance() {\n return new SettingsFragment();\n }", "public SummaryFragment newInstance()\n {\n return new SummaryFragment();\n }", "public PeersFragment() {\n }", "public TagsFragment() {\n }", "public static ProfileFragment newInstance() {\n ProfileFragment fragment = new ProfileFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, \"\");\n args.putString(ARG_PARAM2, \"\");\n fragment.setArguments(args);\n return fragment;\n }", "public static FriendsFragment newInstance() {\n FriendsFragment fragment = new FriendsFragment();\n\n return fragment;\n }", "public HomeSectionFragment() {\n\t}", "public static FirstFragment newInstance(String text) {\n\n FirstFragment f = new FirstFragment();\n Bundle b = new Bundle();\n b.putString(\"msg\", text);\n\n f.setArguments(b);\n\n return f;\n }", "public PersonDetailFragment() {\r\n }", "public static LogFragment newInstance(Bundle params) {\n LogFragment fragment = new LogFragment();\n fragment.setArguments(params);\n return fragment;\n }", "public RegisterFragment() {\n // Required empty public constructor\n }", "public VehicleFragment() {\r\n }", "public static Fine newInstance(String param1, String param2) {\n Fine fragment = new Fine();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static FriendsFragment newInstance(String param1, String param2) {\n FriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public static ChangesViewFragment newInstance() {\n\t\tChangesViewFragment fragment = new ChangesViewFragment();\n\t\tBundle args = new Bundle();\n\t\targs.putInt(HomeViewActivity.ARG_SECTION_NUMBER, 2);\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\t}", "public static NoteFragment newInstance(String param1, String param2) {\n NoteFragment fragment = new NoteFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MainFragment newInstance(Context context) {\n MainFragment fragment = new MainFragment();\n if(context != null)\n fragment.setVariables(context);\n return fragment;\n }", "@Override\n\tprotected Fragment createFragment() {\n\t\treturn new CrimeListFragment();\n\t}", "public static MoneyLogFragment newInstance() {\n MoneyLogFragment fragment = new MoneyLogFragment();\n return fragment;\n }", "public static ForecastFragment newInstance() {\n\n //Create new fragment\n ForecastFragment frag = new ForecastFragment();\n return(frag);\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MyTaskFragment newInstance(String param1) {\n MyTaskFragment fragment = new MyTaskFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n }", "public static MyProfileFragment newInstance(String param1, String param2) {\n MyProfileFragment fragment = new MyProfileFragment();\n return fragment;\n }", "public static MainFragment newInstance(int param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_PARAM1, param1);\n\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public PlaylistFragment() {\n }", "public static HistoryFragment newInstance() {\n HistoryFragment fragment = new HistoryFragment();\n return fragment;\n }", "public static SurvivorIncidentFormFragment newInstance(String param1, String param2) {\n// SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n// return fragment;\n\n SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n\n\n }", "public static PersonalFragment newInstance(String param1, String param2) {\n PersonalFragment fragment = new PersonalFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }" ]
[ "0.7259329", "0.72331375", "0.71140355", "0.69909847", "0.69902235", "0.6834592", "0.683074", "0.68134046", "0.6801526", "0.6801054", "0.67653185", "0.6739714", "0.6739714", "0.6727412", "0.6717231", "0.6705855", "0.6692112", "0.6691661", "0.66869426", "0.66606814", "0.6646188", "0.66410166", "0.6640725", "0.6634425", "0.66188246", "0.66140765", "0.6608169", "0.66045964", "0.65977716", "0.6592119", "0.659137", "0.65910816", "0.65830594", "0.65786606", "0.6562876", "0.65607685", "0.6557126", "0.65513307", "0.65510213", "0.65431285", "0.6540448", "0.65336084", "0.6532555", "0.6528302", "0.6524409", "0.652328", "0.6523149", "0.6516528", "0.65049976", "0.6497274", "0.6497235", "0.64949715", "0.64944136", "0.6484968", "0.6484214", "0.64805835", "0.64784926", "0.64755154", "0.64710265", "0.6466466", "0.6457089", "0.645606", "0.6454554", "0.6452161", "0.64520335", "0.6450325", "0.64488834", "0.6446765", "0.64430225", "0.64430225", "0.64430225", "0.64420956", "0.6441306", "0.64411277", "0.6438451", "0.64345145", "0.64289486", "0.64287597", "0.6423755", "0.64193285", "0.6418699", "0.6414679", "0.6412867", "0.6402168", "0.6400724", "0.6395624", "0.6395109", "0.6391252", "0.63891554", "0.63835025", "0.63788056", "0.63751805", "0.63751805", "0.63751805", "0.6374796", "0.63653135", "0.6364529", "0.6360922", "0.63538784", "0.6351111", "0.635067" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_coat_of_arms, container, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
A collection designed for holding elements prior to their execution. The collection stores elements with a firstinfirstout (FIFO) order. The interface defines methods for insertion (push), extraction (pop) and inspection (peek). The remove() method removes and returns the element at the front of the stack or throws an exception if the queue is empty. The peek() method returns the value of the element at the front of the queue, but does not remove it. A queue implementation may use a dynamically expanding storage structure that allows for an unlimited number of element or fixedlength ("bounded") queue.
public interface Queue<T> { /** * Insert item at the back of the queue. * @param item insert item at the back of the queue */ public void push(T item); /** * Remove the element at the front of the queue and return its value. * @return value of the element removed from the front of the queue. * @throws <tt>NoSuchElementException</tt> if the queue is empty. */ public T pop(); /** * Return the value of the element at the front of the queue. * @return value of element at the front of the queue. * @throws <tt>NoSuchElementException</tt> if the queue is empty. */ public T peek(); /** * Return a boolean value that indicates whether the queue is empty. Return * true if empty and false if not empty. * @return true if the queue is empty and false otherwise. */ public boolean isEmpty(); /** * Return the number of elements currently in the queue. * @return number of elements in the queue. */ public int size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Queue {\n\tpublic Set getGatheredElements();\n\tpublic Set getProcessedElements();\n\tpublic int getQueueSize(int level);\n\tpublic int getProcessedSize();\n\tpublic int getGatheredSize();\n\tpublic void setMaxElements(int elements);\n\tpublic Object pop(int level);\n\tpublic boolean push(Object task, int level);\n\tpublic void clear();\n}", "public interface Queue<E> {\n\n /**\n * \n * @return the number of elements in the queue.\n */\n int size();\n\n /**\n * \n * @return true if the queue is empty, false if not.\n */\n boolean isEmpty();\n\n /**\n * \n * Inserts an element at the rear of the queue.\n * \n * @param e\n */\n void enqueue(E e);\n\n /**\n * \n * @return the first element of the queue, but does not remove it (null if empty).\n */\n E first();\n\n /**\n * \n * @return first element of the queue and removes it (null if empty).\n */\n E dequeue();\n}", "public Object peek()\n {\n if(this.isEmpty()){throw new QueueUnderflowException();}\n return front.getData();\n }", "public interface Queue<E> {\n\n\t/** \n\t * Returns the number of elements in the queue.\n\t * @return number of elements in the queue.\n\t */\n\t public int size(); \n\t /** \n\t * Returns whether the queue is empty.\n\t * @return true if the queue is empty, false otherwise.\n\t */\n\t public boolean isEmpty(); \n\t /**\n\t * Inspects the element at the front of the queue.\n\t * @return element at the front of the queue.\n\t */\n\t public E front(); \n\t /** \n\t * Inserts an element at the rear of the queue.\n\t * @param element new element to be inserted.\n\t */\n\t public void enqueue (E element); \n\t /** \n\t * Removes the element at the front of the queue.\n\t * @return element removed.\n\t */\n\t public E dequeue(); \n}", "public interface Queue<T> {\n\n /**\n * Current queue size\n * @return size as int\n */\n int size();\n\n /**\n * Checks if the the queue is empty\n * @return true if the list is empty\n */\n boolean isEmpty();\n\n /**\n * Adding an element to the queue\n * @param t element to add\n */\n void enqueue(T t);\n\n /**\n * Return and removes the first element in the queue\n * @return the removed element\n * @throws IndexOutOfBoundsException if queue is empty\n */\n T dequeue();\n\n /**\n * Return (without removing) first element in queue\n * @return the first element in queue\n * @throws IndexOutOfBoundsException if the queue is empty\n *\n */\n T first();\n\n /**\n * Return (without removing) last element in queue\n * @return last element in queue\n * @throws IndexOutOfBoundsException if the queue is empty\n */\n T last();\n\n /**\n * Return a string representation of the queue content.\n * @return String of queue\n */\n String toString();\n\n /**\n * Element iterator.\n * @return Iterates over elements in queue\n */\n Iterator iterator();\n\n}", "public E peek(){\r\n if(isEmpty())\r\n return null;\r\n\r\n return queue[currentSize-1]; //return the object without removing it\r\n }", "public T peek() {\n if (size == 0) {\n throw new NoSuchElementException(\"The queue is empty\"\n + \". Please add data before attempting to peek.\");\n } else {\n return backingArray[front];\n }\n\n }", "public interface SimpleQueue<E> {\n\n\t/**\n\t * Adds the Object in the Queue\n\t * @param item Generic item to add to the queue\n\t */\n\tpublic void add(E item);\n\t\n\t/**\n\t * Removes the first Object from the Queue\n\t * @return the Object that was removed\n\t * @throws NoSuchElementException if object is not in the queue\n\t */\n\tpublic E remove();\n\t\n\t/**\n\t * Retrieves, but does not remove the\n\t * first object in the Queue\n\t * @return Object that was retrieved\n\t * @throws NoSuchElementException if the queue is empty\n\t */\n\tpublic E peek();\n\t\n\t/**\n\t * Checks to see if the Queue is Empty or not\n\t * @return true if the Queue is Empty, false if its not.\n\t */\n\tpublic boolean isEmpty();\n}", "public interface IDeque<T> {\n boolean isEmpty();\n int size();\n void pushLeft(T t);\n void pushRight(T t);\n T popLeft();\n T popRight();\n}", "@Override\n public E peek() {\n return (E)queue[0];\n }", "public interface Queue<E> {\r\n\r\n /**\r\n * Adds the given item to the end of the queue.\r\n * \r\n * @pre The queue is not full and the item to be added is not null\r\n * @post The item is added at the end of the queue\r\n * @param item\r\n * The item to be added to the queue\r\n */\r\n void enqueue(E item);\r\n\r\n /**\r\n * Removes and returns the item from the beginning of the queue.\r\n * \r\n * @pre The queue is not full\r\n * @post The item is removed queue\r\n * @return the item removed from the queue or null if the queue is empty\r\n */\r\n E dequeue();\r\n\r\n}", "public static void queueVsStack() {\n\n Queue<String> collection1 = new PriorityQueue<>();\n collection1.add(\"banana\");\n collection1.add(\"orange\");\n collection1.add(\"apple\");\n\n //what will be printed\n System.out.println(collection1.iterator().next());\n\n Deque<String> collection2 = new ArrayDeque<>();\n collection2.addFirst(\"banana\");\n collection2.addFirst(\"apple\");\n collection2.addFirst(\"orange\");\n\n //what will be printed\n System.out.println(collection2.iterator().next());\n\n }", "public interface IQueue {\n public void clear();\n public boolean isEmpty();\n public int length();\n public Object peek();\n public void offer(Object x) throws Exception;\n public Object poll();\n}", "public interface Queue {\n /***** Setting class functions *******/\n\n /* Add element to end of queue function\n * PRE: elem != null && queue != null\n * POST: queue[size] = elem && size` = size + 1 && other imutabled\n */\n void enqueue(Object elem);\n\n /* Delete and return first element in queue function\n * PRE: size > 0\n * POST: R = queue[0] && queue[i] = queue[i + 1] && size` = size - 1 && other imutabled\n */\n Object dequeue();\n\n /* Add element to begin of queue\n * PRE: elem != null\n * POST: queue[i] = queue[i - 1](size >= i > 0) && queue[0] = elem && size` = size + 1 && other imutabled\n */\n void push(Object elem);\n\n /* Delete and return last element in queue function\n * PRE: size > 0\n * POST: R = queue[size - 1] && size` = size - 1 && other imutabled\n */\n Object remove();\n\n /***** Getting class functions *******/\n\n /* Get first element of queue function\n * PRE: size > 0\n * POST: R = queue[0] && all elements imutabled\n */\n Object element();\n\n /* Get last element of queue function\n * PRE: size > 0\n * POST: R = queue[size - 1] && all elements imutabled\n */\n Object peek();\n\n /* Get size function\n * PRE: True\n * POST: R = size && all imutabled\n */\n int size();\n\n /* Check for empty queue function\n * PRE: True\n * POST: R = (size == 0) && all imutabled\n */\n boolean isEmpty();\n\n /* Delete all elements from queue function\n * PRE: True\n * POST: size = 0\n */\n void clear();\n\n /******* Modification *******/\n /* Create queue with elements like predicate\n * PRE: correct predicate && queue != null\n * POST: all imutabled && R = {R[0]...R[new_size] : new_size <= size && predicate(R[i]) = 1 && R - the same type of queue}\n * : && exist sequence i[0] ... i[k] (i[0] < ... < i[k]) : R[it] = queue[i[it]](0 <= it < k) && k - max\n */\n Queue filter(Predicate predicate);\n\n /* Create queue with elements like predicate\n * PRE: correct function && queue != null\n * POST: all imutabled && R = {y[i] | y[i] = function(queue[i])} size(R) = size(queue) && R is the same type of queue\n */\n Queue map(Function function);\n}", "public E dequeue() {\n return pop();\n }", "public interface ContainerList<E> {\n /**\n * Adds newElement to the queue if still has capacity.\n *\n * @param e element to be added to the queu.\n * @throws Exception If Queue is full\n */\n public void push(E e) throws Exception;\n\n /**\n * Returns the First element in the queue and removes it from the list.\n *\n * @return The First element added to the queu.\n */\n public E pop();\n\n /**\n * Checks what's the next element to be returned from the list.\n * @return\n */\n public E peek();\n public int size();\n}", "public Item peek(){\n if(isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\n return first.item;\n }", "@Test\n public void queue() {\n\n Queue<String> q = new LinkedList<>();\n q.offer(\"1\");\n q.offer(\"2\");\n q.offer(\"3\");\n System.out.println(q.offer(\"4\"));\n System.out.println(q.add(\"2\"));\n System.out.println(q.toString());\n System.out.println(\"peek \" + q.peek()); // 1, peek() means get the first element in the queue\n System.out.println(\"size \" + q.size()); // 4\n System.out.println(\"poll \" + q.poll()); // 1\n System.out.println(\"size \" + q.size()); // 3\n\n\n }", "public T peek() throws EmptyCollectionException;", "public T peek() throws EmptyCollectionException;", "public interface QueueInterface {\r\n Object dequeue() throws QueueUnderflowException;\r\n // Throws QueueUnderflowException if this queue is empty,\r\n // otherwise removes top element from this queue.\r\n \r\n \r\n boolean isEmpty();\r\n // Returns true if this queuea is empty, otherwise returns false.\r\n\r\n}", "public E dequeue();", "public void pop();", "E pop();", "E pop();", "E pop();", "@Override\n public T dequeue() {\n if (!isEmpty()) {\n return heap.remove();\n } else {\n throw new NoSuchElementException(\"Priority Queue is null\");\n }\n }", "public interface UnboundedQueue<T> {\n \n\t/**\n\t * This method inserts a generic type element to the back of the Queue, increasing the\n\t * size by one. \n\t * \n\t * @param o Generic type to be added to the back of the Queue.\n\t */\n public void insert(T o);\n \n /**\n * This method removes a generic type element from the front of the Queue thereby decreasing the\n * size by one. Throws an EmptyQueueException if the Queue is empty and there is no\n * element to remove.\n * \n * @return Object removed from the front of the Queue\n * @throws EmptyQueueException if Queue is empty and there is no object to remove\n */\n public T remove() throws EmptyQueueException;\n \n /**\n * This method makes a copy of the element at the front of the Queue. Size stays the same.\n * \n * @return copy of the element at the front of the Queue.\n * @throws EmptyQueueException thrown if the Queue is empty and there is no elment at the front\n */\n public T front() throws EmptyQueueException;\n \n /**\n * This method returns true if the Queue has a front element and therefore is \n * not empty.\n * \n * @return true if the Queue has a front element\n */\n public boolean hasFront();\n \n /**\n * This method returns the number of elements currently stored in the structure (Queue).\n * \n * \n * @return int number of elements stored in the Queue\n */\n public int size();\n\n /**\n * This method creates a String representation of the Queue.\n * \n * @return String which represents the Queue\n */\n public String toString();\n \n}", "public E pop();", "public E pop();", "public E pop();", "public E pop();", "public E pop();", "public interface IPriorityQueue {\n\n /**\n * Check whether the priority queue is empty\n * @return true if it is empty, otherwise false\n */\n Boolean isEmpty();\n\n /**\n * Add a priority and value into a list\n * @param priority priority to add to the priority queue\n * @param value value to add to the priority queue\n * @return a new priority queue with new priority and value\n */\n IPriorityQueue add(Integer priority, String value);\n\n /**\n * Gets the number of items in the priority queue.\n * @return The number of items in the priority queue.\n */\n Integer size();\n\n /**\n * returns the String at the front of the priority queue if the Queue is not empty.\n * @return The String at the front of the priority queue, if the Queue is not empty.\n * @throws EmptyPriorityQueueException EmptyPriorityQueueException if the priority queue is empty.\n */\n String peek() throws EmptyPriorityQueueException;\n\n /**\n * Removes and returns the String at the front of the priority queue if the priority queue is not empty.\n * @return A copy of the priority queue without the removed item..\n * @throws EmptyPriorityQueueException EmptyPriorityQueueException if the priority queue is empty.\n */\n IPriorityQueue pop() throws EmptyPriorityQueueException;\n\n}", "public interface FifoQueue {\n\n /**\n * Push the item to the tail of the queue.\n * @param queueName Target queue.\n * @param item Item to be added\n */\n public void push(final String queueName, final String item);\n\n /**\n * Remove the item from the queue.\n * @param queueName Queue name.\n * @param item Target item.\n * @return <code>true</code> item removed, otherwise <code>false</code>\n */\n public boolean remove(final String queueName, final String item);\n\n /**\n * Get top items.\n * @param queueName Delay queue name.\n * @param end End index.\n * @return Delayed items.\n */\n public Collection<String> pop(final String queueName, final int end);\n}", "public static Object peek() {\t \n if(queue.isEmpty()) { \n System.out.println(\"The queue is empty so we can't see the front item of the queue.\"); \n return -1;\n }\t \n else {\n System.out.println(\"The following element is the top element of the queue:\" + queue.getFirst()); \t \n }\n return queue.getFirst();\n }", "public Object peek() {\n\t\tcheckIfStackIsEmpty();\n\t\tint indexOfLastElement = collection.size() - 1;\n\t\tObject lastElement = collection.get(indexOfLastElement);\n\t\t\n\t\treturn lastElement;\n\t}", "public Object peek() {\n\t\t\n\t\t// Check: Queue is empty\n\t\tif (isEmpty()) {\n\t\t\tthrow new NoSuchElementException(\"Queue is empty. Nothing to peek at.\");\n\t\t}\n\t\t\n\t\treturn head.data;\n\t}", "@Override\r\n\tpublic E dequeueFront() {\n\t\tif(isEmpty()) return null;\r\n\t\tE value = data[frontDeque];\r\n\t\tfrontDeque = (frontDeque + 1)% CAPACITY;\r\n\t\tsizeDeque--;\r\n\t\treturn value;\r\n\t}", "public Object peek()\n {\n return queue.peekLast();\n }", "public T front() throws EmptyQueueException;", "private E remove() {\n if (startPos >= queue.length || queue[startPos] == null) throw new NoSuchElementException();\n size--;\n return (E) queue[startPos++];\n }", "public interface DequeInterface<T>\n{\n public void addFirst(T newEntry);\n\n public void addLast(T newEntry);\n\n public T removeFirst();\n\n public T removeLast();\n\n public T getFirst();\n\n public T getLast();\n\n public boolean isEmpty();\n\n public void clear();\n}", "@Override\r\n\tpublic T dequeue() {\r\n\t\tT element;\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new AssertionError(\"Queue is empty.\");\r\n\t\telement = arr[front].getData();\r\n\t\tif (front == rear) {\r\n\t\t\tfront = rear = -1;\r\n\t\t} else {\r\n\t\t\tfront++;\r\n\t\t}\r\n\t\treturn element;\r\n\t}", "@Test\n public void basicQueueOfStacksTest() {\n \n QueueOfStacks<String> tempQueue = new QueueOfStacks<String>();\n String tempCurrentElement;\n \n assertTrue(\"Element not in queue\", tempQueue.isEmpty());\n tempQueue.add(\"a\");\n assertTrue(\"Element not in queue\", !tempQueue.isEmpty());\n tempQueue.add(\"b\");\n assertTrue(\"Number of elements not correct\", tempQueue.size() == 2);\n \n tempCurrentElement = tempQueue.peek();\n assertTrue(\"Element not correct\", tempCurrentElement.equals(\"a\"));\n\n tempCurrentElement = tempQueue.remove();\n assertTrue(\"Element not correct\", tempCurrentElement.equals(\"a\") &&\n tempQueue.size() == 1);\n \n tempQueue.add(\"c\");\n assertTrue(\"Number of elements not correct\", tempQueue.size() == 2);\n \n tempCurrentElement = tempQueue.remove();\n assertTrue(\"Element not correct\", tempCurrentElement.equals(\"b\") &&\n tempQueue.size() == 1 &&\n !tempQueue.isEmpty());\n \n tempCurrentElement = tempQueue.remove();\n assertTrue(\"Element not correct\", tempCurrentElement.equals(\"c\") &&\n tempQueue.size() == 0 &&\n tempQueue.isEmpty());\n \n }", "public T pop() throws EmptyQueueException, EmptyCollectionException;", "public E dequeue() {\n\t\treturn list.removeFirst();\n\t}", "E dequeue();", "E dequeue();", "E dequeue();", "public void pop() {\n queue.remove();\n }", "public E dequeue() {\n if (size == 0){\n return null;\n }\n\n\n E result = (E) queue[0];\n queue[0] = null;\n --size;\n\n if (size != 0){\n shift();\n }\n return result;\n }", "public E element() {\n if (size == 0){\n return null;\n }\n return (E)queue[0];\n }", "public Integer dequeue() {\n\t\t // get last val in heap, copy value to index 0\n\t\t // decrease size \n\t\t // create a recursive helper, percolateDown,\n\t\t // that allows you move the removed val \n\t\t // in the right place\n\t\t \n\t\t if (size == 0) \n\t\t\t throw new EmptyStackException();\n\t int item = data[0]; \n\t data[0] = data[size - 1]; \n\t size--;\n\t percolateDown(0); \n\t return item;\n\t }", "public interface Queue<T extends Object> {\n\n\t/**\n\t * Method to return the queue iterator\n\t * \n\t * @return Queue Iterator\n\t */\n\tpublic Iterator<T> getIterator();\n\n\t/**\n\t * Method to peek the queue face\n\t * \n\t * @return front data\n\t */\n\tpublic T peek();\n\n\t/**\n\t * Method to pop from front of the queue\n\t * \n\t * @return front data\n\t */\n\tpublic T pop();\n\n\t/**\n\t * Push method for inserting Integer data at end of the queue\n\t * \n\t * @param data\n\t */\n\tpublic void push(T data);\n\n\t/**\n\t * Push method for inserting Long data at end of the queue\n\t * \n\t * @param data\n\t */\n\t// public void push(Long data);\n\n\t/**\n\t * Push method for inserting Double data at end of the queue\n\t * \n\t * @param data\n\t */\n\t// public void push(Double data);\n\n\t/**\n\t * Push method for inserting String data at end of the queue\n\t * \n\t * @param data\n\t */\n\t// public void push(String data);\n}", "public int pop() {\n int size=queue.size();\n for (int i = 0; i <size-1 ; i++) {\n int temp=queue.poll();\n queue.add(temp);\n }\n return queue.poll();\n }", "public interface MyQueue {\n\n // add to tail\n void enqueue(Object obj);\n\n // remove from head\n Object dequeue();\n\n}", "T peek(){\n if(isEmpty()){\n return null;\n }\n return (T)queueArray[0];\n }", "public E poll() {\n\t\twhile (true) {\n\t\t\tlong f = front.get();\n\t\t\tint i = (int)(f % elements.length());\n\t\t\tE x = elements.get(i);\n\t\t\t//Did front change while we were reading x?\n\t\t\tif (f != front.get())\n\t\t\t\tcontinue;\n\t\t\t//Is the queue empty?\n\t\t\tif (f == rear.get())\n\t\t\t\treturn null; //Don't retry; fail the poll.\n\n\t\t\tif (x != null) {//Is the front nonempty?\n\t\t\t\tif (elements.compareAndSet(i, x, null)) {//Try to remove an element.\n\t\t\t\t\t//Try to increment front. If we fail, other threads will\n\t\t\t\t\t//also try to increment before any further removals, so we\n\t\t\t\t\t//don't need to loop.\n\t\t\t\t\tfront.compareAndSet(f, f+1);\n\t\t\t\t\treturn x;\n\t\t\t\t}\n\t\t\t} else //front empty. Try to help other threads.\n\t\t\t\tfront.compareAndSet(f, f+1);\n\n\t\t\t//If we get here, we failed at some point. Try again.\n\t\t}\n\t}", "public T dequeue() {\n if (size == 0) {\n throw new NoSuchElementException(\"The queue is empty\"\n + \". Please add data before attempting to remove.\");\n } else if (front == backingArray.length - 1) {\n int temp = front;\n T data = backingArray[temp];\n backingArray[front] = null;\n front = 0;\n size--;\n return data;\n } else {\n int temp = front;\n T data = backingArray[temp];\n backingArray[front] = null;\n front = temp + 1;\n size--;\n return data;\n }\n }", "public E remove(){\r\n if(isEmpty())\r\n return null;\r\n \r\n //since the array is ordered, the highest priority will always be at the end of the queue\r\n //--currentSize will find the last index (highest priority) and remove it\r\n return queue[--currentSize];\r\n }", "public E pop(){\r\n\t\tObject temp = peek();\r\n\t\t/**top points to the penultimate element*/\r\n\t\ttop--;\r\n\t\treturn (E)temp;\r\n\t}", "public T peek() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//returns the top element.\n\t\treturn elements.get(elements.size()-1);\n\t}", "@Override\n public E poll() {\n E tmp = (E)queue[0];\n System.arraycopy(queue, 1, queue, 0, size - 1);\n size--;\n return tmp;\n }", "@NotNull\n public static <T> Queue<T> queue() {\n try {\n return new ArrayDeque<T>();\n } catch (NoClassDefFoundError nce) {\n return new LinkedList<T>();\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic ImmutableQueue<T> deQueue() {\r\n\t\tif (this.isEmpty())\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t\r\n\t\tif (!this.dequeueStack.isEmpty()) \r\n\t\t\treturn new ImmutableQueue<T>(this.enqueueStack, this.dequeueStack.getTail());\r\n\t\telse \t\t\t\r\n\t\t\treturn new ImmutableQueue<T>(ImmutableStack.empty(), this.enqueueStack.reverse().getTail());\r\n\t\t\r\n\t}", "public int peek() {\n // 元素必从出栈栈顶弹出\n int pop = this.pop();\n //塞回出栈栈顶\n outSt.push(pop);\n return pop;\n }", "public void demoArrayDeque() {\n System.out.println(\"***Demonstrating an ArrayDeque\");\n Deque<String> veggies = new ArrayDeque<String>();\n //Add will throw an exception if the capacity is limited and its out of room\n //Our example, is variable capacity\n veggies.add(\"tomatoes\");\n veggies.addFirst(\"peppers\");\n veggies.add(\"eggplant\");\n veggies.add(\"squash\");\n veggies.add(\"cucumbers\");\n veggies.addLast(\"broccoli\");\n //Offer returns false if it can't add because it was out of room\n //But our example ArrayDeque is variable length, so they are functionally identical to\n //the add methods.\n veggies.offer(\"green beans\");\n veggies.offerFirst(\"beets\");\n veggies.offerLast(\"carrots\");\n //As with other collections, the size() method gives the size of the deque\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //Determine if the deque contains a given object\n System.out.println(String.format(\"Veggies contains 'beets': %b\", veggies.contains(\"beets\")));\n System.out.println();\n \n //element() shows but does not remove the first item, throw exception if empty\n System.out.println(String.format(\"First veggie (element()): %s\", veggies.element()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //getFirst() same as element()\n System.out.println(String.format(\"First veggie (getFirst()): %s\", veggies.getFirst()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //getLast() gets but doesn't remove last item, throws exception if empty\n System.out.println(String.format(\"Last veggie (getLast()): %s\", veggies.getLast()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //peek() gets but does not remove the first item, returns null if empty\n System.out.println(String.format(\"First veggie (peek()): %s\", veggies.peek()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //peekFirst() gets but does not remove the first item, returns null if empty\n System.out.println(String.format(\"First veggie (peekFirst()): %s\", veggies.peekFirst()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //peekLast() gets but doesn't remove last item, returns null if empty\n System.out.println(String.format(\"Last veggie (peekLast()): %s\", veggies.peekLast()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //Java 5 and above\n System.out.println(\"--Iterating using the Enhanced for loop\");\n for(String veggie : veggies) {\n System.out.println(veggie);\n }\n System.out.println();\n \n //poll() gets the first item and removes it, returns null if empty\n System.out.println(String.format(\"First veggie (poll()): %s\", veggies.poll()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //pollFirst() gets the first item and removes it, returns null if empty\n System.out.println(String.format(\"First veggie (pollFirst()): %s\", veggies.pollFirst()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //pollLast() gets the last item and removes it, returns null if empty\n System.out.println(String.format(\"Last veggie (pollLast()): %s\", veggies.pollLast()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n System.out.println(\"--Iterating using the iterator\");\n for(Iterator<String> it = veggies.iterator(); it.hasNext();) {\n String veggie = it.next();\n System.out.println(veggie);\n }\n System.out.println();\n \n //pop() gets and removes the first item, throws an exception if empty\n System.out.println(String.format(\"First veggie (pop()): %s\", veggies.pop()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //iterates starting at the end of the deque\n System.out.println(\"--Iterating using the descending iterator\");\n for(Iterator<String> it = veggies.descendingIterator(); it.hasNext();) {\n String veggie = it.next();\n System.out.println(veggie);\n }\n System.out.println();\n\n //will throw exception for capacity restrictions\n veggies.push(\"cabbage\");\n \n //Java 8 and above\n System.out.println(\"--Iterating with forEach\");\n veggies.forEach(System.out::println);\n }", "public T dequeue() throws EmptyCollectionException;", "T pop();", "T pop();", "T pop();", "public T pop() throws EmptyCollectionException;", "@Override\n\tpublic E dequeue() {\n\t\tE temp=null;\n\t\tif(front==data.length-1){\n\t\t\ttemp=data[front];\n\t\t\tsize--;\n\t\t\tfront=(front+1)%data.length;\n\t\t}else{\n\t\t\tsize--;\n\t\t\ttemp=data[front++];\n\t\t}\n\t\treturn temp;\n\t}", "public T peek()\n\t{\n\t\tT ret = list.removeFirst();\n\t\tlist.addFirst(ret);\n\t\treturn ret;\n\t}", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public MyArrayList<E> getQueue() {\n return this.queue;\n }", "@Override\n\tpublic E dequeue() {\n\t\tif(isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tE data = queue[pos];\n\t\tqueue[pos] = null;\n\t\tpos = (pos+1) % queue.length;\n\t\tsize--;\n\t\treturn data;\n\t}", "public void pop() {\n queue.remove(0);\n }", "public void pop() {\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\twhile (!queue.isEmpty())\n\t\t\tlist.add(queue.poll());\n\t\tfor (int i = 0; i < list.size() - 1; i++)\n\t\t\tqueue.add(list.get(i));\n\t}", "public Object peek() {\n if (this.collection.size() == 0)\n throw new EmptyStackException(\"Stack is empty!\");\n\n return this.collection.get(this.collection.size()-1);\n }", "@Override\n public E dequeue() {\n if(array.isEmpty()) {\n throw new NoSuchElementException(\"Cannot dequeue from an empty queue.\");\n }\n return array.removeFirst();\n }", "public Object peek() throws QueueEmptyException {\n\n\t\tif (isEmpty()) {\n\t\t\tthrow new QueueEmptyException(\"Usage: using peek() on empty queue\");\n\t\t} else {\n\t\t\tNode N = head;\n\t\t\treturn N.item;\n\n\t\t}\n\n\t}", "public Object pop();", "T getFront() throws EmptyQueueException;", "private E element() {\n if (startPos >= queue.length || queue[startPos] == null) throw new NoSuchElementException();\n return (E) queue[startPos];\n }", "public T dequeue();", "public Object dequeue()\n {\n return queue.removeFirst();\n }", "public T poll() {\n if (size == 0) {\n return null;\n }\n\n // set returned value to queue[0]\n T value = (T) array[0];\n\n // decrease size - we are removing element\n size--;\n\n // move queue 1 place left\n System.arraycopy(array, 1, array, 0, size);\n\n // clear last element\n array[size] = null;\n\n return value;\n }", "public Object pop() {\n if (isEmpty())\n throw new EmptyStackException();\n\n Object value = peek();\n collection.remove(collection.size() - 1);\n return value;\n }", "public Object pop() {\n\t\tObject lastElement = peek();\n\t\t\n\t\tint indexOfLastElement = collection.size() - 1;\n\t\tcollection.remove(indexOfLastElement);\n\t\t\n\t\treturn lastElement;\n\t}", "public interface PQueue<T> {\n\n void add(T item, int priority) throws InterruptedException;\n\n T removeMin();\n\n}", "public int peek() {\n while(!stack.isEmpty()) container.push(stack.pop());\n int res = container.peek();\n while(!container.isEmpty()) stack.push(container.pop());\n return res;\n }" ]
[ "0.7288588", "0.72525036", "0.7181688", "0.7159896", "0.7148003", "0.7087053", "0.70357645", "0.699785", "0.6970415", "0.6965151", "0.69492143", "0.69197553", "0.69180876", "0.690289", "0.68949777", "0.6836883", "0.6834546", "0.6816494", "0.6791752", "0.6791752", "0.6781907", "0.6732019", "0.6729515", "0.67218494", "0.67218494", "0.67218494", "0.6706309", "0.67005324", "0.66927236", "0.66927236", "0.66927236", "0.66927236", "0.66927236", "0.6674342", "0.6666616", "0.6656564", "0.66499853", "0.66438353", "0.6636814", "0.66325635", "0.66309494", "0.66307575", "0.6629994", "0.6628734", "0.66016114", "0.65977746", "0.6596159", "0.65880066", "0.65880066", "0.65880066", "0.6587971", "0.6582706", "0.6582081", "0.6581315", "0.6578175", "0.6572232", "0.65676147", "0.65672016", "0.65670127", "0.6563408", "0.6554362", "0.6545506", "0.6537135", "0.6534363", "0.6533127", "0.65282935", "0.6518446", "0.65184456", "0.6511241", "0.6506431", "0.6506431", "0.6506431", "0.6494385", "0.64912957", "0.6490534", "0.64903533", "0.64903533", "0.64903533", "0.64903533", "0.64903533", "0.64903533", "0.64903533", "0.64903533", "0.64803547", "0.6479883", "0.64750665", "0.64531946", "0.6440136", "0.6440089", "0.64300406", "0.6414871", "0.64137036", "0.64107716", "0.64064765", "0.64031386", "0.6399102", "0.6397785", "0.6397286", "0.6395705", "0.6378375" ]
0.74695796
0
Insert item at the back of the queue.
public void push(T item);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RNode insertAtBack(int item) {\n if (next == null) {\n next = new RNode(item, null);\n return this;\n } else {\n next = next.insertAtBack(item);\n return this; \n }\n }", "public void enqueue(E item) {\n addLast(item);\n }", "public synchronized void enqueue(Object o) {\r\n insertAtBack(o);\r\n }", "public void insertAtBack(T insertItem) {\n\t\tNode<T> node = new Node<T>(insertItem);\n\t\t\n\t\tif (isEmpty()) // firstNode and lastNode refer to same Object\n\t\t\tfirstNode = lastNode = node;\n\t\telse { // lastNode's nextNode refers to new node\n\t\t\tlastNode.nextNode = node;\n\t\t\tlastNode = node;\n\t\t\t// you can replace the two previous lines with this line: lastNode =\n\t\t\t// lastNode.nextNode = new ListNode( insertItem );\n\t\t}\n\t\tsize++;\n\t}", "public void enqueue (T item) {\n leftStack.push(item);\n }", "void pushBack(T value) throws ListException;", "public void uncheckedPushBack(IClause c) {\n back++;\n if (back >= tab.length)\n back = 0;\n tab[back] = c;\n\n assert back + 1 != front\n && (front != 0 || back != tab.length - 1) : \"Deque is full !\";\n }", "void enqueue(T item) {\n contents.addAtTail(item);\n }", "public void insertAtBack(L insertItem){\n\t\tListNode node = new ListNode(insertItem);\n\t\tif(isEmpty()) //firstNode and lastNode refer to same Object\n\t\tfirstNode = lastNode = node;\n\t\telse{ //lastNode's nextNode refers to new node\n\t\t\tlastNode.nextNode = node;\n\t\t\tlastNode = node;\n\t\t\t//you can replace the two previous lines with this line: lastNode = lastNode.nextNode = new ListNode( insertItem );\n\t\t}\n\t}", "private void pushBack() {\n\t\tbufferLocal.insertarEnCabeza(listaTokens.get(listaTokens.size()-1));\n\t}", "public void enqueue(T pushed)\n\t{insert(pushed);}", "@Override\n public void insertBack(Item x) {\n if (size == items.length) {\n //dynamic array\n //resize array\n resize(size * RFACTOR);\n }\n items[size] = x;\n size += 1;\n }", "public void enqueue(Object value)\n {\n queue.insertLast(value);\n }", "public void push(E item) {\n if (!isFull()) {\n this.stack[top] = item;\n top++;\n } else {\n Class<?> classType = this.queue.getClass().getComponentType();\n E[] newArray = (E[]) Array.newInstance(classType, this.stack.length*2);\n System.arraycopy(stack, 0, newArray, 0, this.stack.length);\n this.stack = newArray;\n\n this.stack[top] = item;\n top++;\n }\n }", "public void enqueue(E e) {\n\t\tlist.addLast(e);\n\t}", "@Override\n public AmortizedDeque<T> pushBack(T t) {\n return new AmortizedDeque<>(head, tail.pushFront(t));\n }", "private void pushLater(Recycler.DefaultHandle<?> item, Thread thread)\r\n/* 547: */ {\r\n/* 548:589 */ Map<Stack<?>, Recycler.WeakOrderQueue> delayedRecycled = (Map)Recycler.DELAYED_RECYCLED.get();\r\n/* 549:590 */ Recycler.WeakOrderQueue queue = (Recycler.WeakOrderQueue)delayedRecycled.get(this);\r\n/* 550:591 */ if (queue == null)\r\n/* 551: */ {\r\n/* 552:592 */ if (delayedRecycled.size() >= this.maxDelayedQueues)\r\n/* 553: */ {\r\n/* 554:594 */ delayedRecycled.put(this, Recycler.WeakOrderQueue.DUMMY);\r\n/* 555:595 */ return;\r\n/* 556: */ }\r\n/* 557:598 */ if ((queue = Recycler.WeakOrderQueue.allocate(this, thread)) == null) {\r\n/* 558:600 */ return;\r\n/* 559: */ }\r\n/* 560:602 */ delayedRecycled.put(this, queue);\r\n/* 561: */ }\r\n/* 562:603 */ else if (queue == Recycler.WeakOrderQueue.DUMMY)\r\n/* 563: */ {\r\n/* 564:605 */ return;\r\n/* 565: */ }\r\n/* 566:608 */ queue.add(item);\r\n/* 567: */ }", "public void insertAtBack(T data) {\n \t//we create a new node\n Node<T> aNode = new Node<>(data);\n //and again if there is no node we make a new node as first and last node\n if (isEmpty()) {\n firstNode = lastNode = aNode;\n } \n //otherwise we set a new node as last node\n //and we assign to last node the next node of the last one\n //so the last node is new created node now\n else {\n lastNode.setNext(aNode);\n lastNode = lastNode.getNext();\n }\n }", "public void enqueue(Item item) \n {\n stack1.push(item);\n }", "public void enqueue(X item) {\n QueueNode<X> new_last = new QueueNode<X>(item);\n if (last != null)\n last.next = new_last;\n last = new_last;\n if (first == null)\n first = last;\n }", "@Override\n public E push(E item) {\n // do not allow nulls\n if (item == null) {\n return null;\n }\n\n // do not allow same item twice in a row\n if (size() > 0 && item.equals(peek())) {\n return null;\n }\n\n // okay to add item to stack\n super.push(item);\n\n // remove oldest item if stack is now larger than max size\n if (size() > maxSize) {\n remove(0);\n }\n contentsChanged();\n return item;\n }", "public void pop() {\n move();\n reverseQueue.poll();\n }", "public void push(E object) {stackList.insertAtFront(object);}", "public void queue(Object newItem){\n if(isFull()){\n System.out.println(\"queue is full\");\n return;\n }\n ArrayQueue[++rear] = newItem;\n if(front == -1)\n front = 0;\n \n }", "public void enqueue(E item) {\n Node<E> oldlast = last;\n last = new Node<E>();\n last.item = item;\n last.next = null;\n if (isEmpty()) first = last;\n else oldlast.next = last;\n n++;\n }", "public void pushBack (O o)\r\n {\r\n //create new VectorItem\r\n VectorItem<O> vi = new VectorItem<O> (o,last, null);\r\n if (isEmpty()) \r\n {\r\n last = vi;\r\n first = vi;\r\n }\r\n else \r\n {\r\n last.setNext(vi);\r\n last = vi;\r\n }\r\n count++;\r\n }", "public void push_front(T element);", "public void enqueue(T item) {\n\t\tNode<T> oldlast = last;\n\t\tlast = new Node<>();\n\t\tlast.item = item;\n\t\tlast.next = null;\n\t\tif (isEmpty()) first = last;\n\t\telse oldlast.next = last;\n\t\tN++;\n\t}", "public void enqueue (Item item){\n Node<Item> oldLast = last;\n last = new Node<Item>();\n last.item = item;\n last.next = null;\n if(isEmpty()) {first = last;}\n else oldLast.next = last;\n N++;\n }", "void push(T item);", "void push(T item);", "void enqueue(E item);", "public void addLast(Item item) {\n deck[bBack--] = item;\n }", "void pushFront(T value) throws ListException;", "@Override\n public void enqueue(E e) {\n array.addLast(e);\n }", "void push(Recycler.DefaultHandle<?> item)\r\n/* 519: */ {\r\n/* 520:554 */ Thread currentThread = Thread.currentThread();\r\n/* 521:555 */ if (this.threadRef.get() == currentThread) {\r\n/* 522:557 */ pushNow(item);\r\n/* 523: */ } else {\r\n/* 524:562 */ pushLater(item, currentThread);\r\n/* 525: */ }\r\n/* 526: */ }", "@Override\r\n public void addBack(T b) {\r\n head = head.addBack(b);\r\n }", "public void push (E item){\n this.stack.add(item);\n }", "@Override\n public void enqueue(T item) {\n if (item != null) {\n heap.add(item);\n } else {\n throw new IllegalArgumentException(\"Cant enqueue null\");\n }\n }", "public void push(E item);", "public void push(T item){\n Node<T> n;\n if(this.isEmpty()){\n n = new Node<>();\n n.setData(item);\n } else {\n n = new Node<>(item, this._top);\n }\n\n this._top = n;\n }", "public void uncheckedPushFront(IClause c) {\n tab[front--] = c;\n if (front < 0)\n front = tab.length - 1;\n\n assert back + 1 != front\n && (front != 0 || back != tab.length - 1) : \"Deque is full !\";\n }", "public void push(E item) {\n addFirst(item);\n }", "private void shift(){\n if (queue.length < 1){\n throw new Error(\"Table self destruction!\");\n }\n if (size <= 0){\n return;\n }\n\n if (queue[0] == null){\n E best = null;\n int bestAT = -1;\n for (int x = 0 ; x < queue.length; x++){\n E cur = (E)queue[x];\n if (cur == null){\n continue;\n }\n if (best == null || cur.compareTo(best) > 0){\n best = cur;\n bestAT = x;\n }\n }\n // Not put best at front;\n queue[bestAT] = null;\n queue[0] = best;\n }\n\n }", "public Item setBack (Item item) {\n if(isEmpty()) throw new NoSuchElementException(\"Failed to setBack, because DList is empty!\") ;\n // update the value of the last actual node (the last node itself is a sentinel node)\n Item oldValue = last.prev.data; \n last.prev.data = item;\n return oldValue;\n }", "public void add( int item ) \n {\n\t//queue is empty\n\tif ( queue.isEmpty() ) {\n\t queue.add( item );\n\t return;\n\t}\n\t\n\t//queue is not empty\n\telse {\n\t //find spot of insetion\n\t for ( int i = 0; i < queue.size(); i++ ) {\t\t\t \n\t\tif ( (int) queue.get(i) < item ) {\n\t\t queue.add( i, item );\n\t\t return;\n\t\t}\t\t\n\t }\n\t}\n }", "public void addToBack(UnitOfWork workUnit) {\n synchronized (addedBackWork) {\n addedBackWork.addLast(workUnit);\n }\n }", "void push(T item) {\n contents.addAtHead(item);\n }", "public void push(Object item)\r\n {\n this.top = new Node(item, this.top);\r\n }", "private void backObject() {\n\t\tif(this.curr_obj != null) {\n this.curr_obj.uMoveToBack();\n }\n\t}", "public void enqueue(Comparable item);", "public void pushRight(Item item){\n Node<Item> oldLast = last;\n last = new Node<>();\n last.item = item;\n last.next = null;\n\n if (n == 0) first = last;\n else if(oldLast!=null) oldLast.next = last;\n }", "public void enqueue(Item item){\r\n\t\tNode<Item> newNode = new Node<Item>();\r\n\t\tnewNode.item = item;\r\n\t\tnewNode.next = null;\r\n\t\tif(last == null){\r\n\t\t\tfirst = newNode;\r\n\t\t}\r\n\t\telse\r\n\t\t\tlast.next = newNode;\r\n\t\tlast = newNode;\r\n\t}", "@Override\n\tpublic void push(E item) {\n\t\t\n\t}", "public void push(T newItem);", "public void push(Item item){\n this.stack.add(item);\n\n }", "@Override\r\n\tpublic void enqueueRear(E element) {\n\t\tif(sizeDeque == CAPACITY) return;\r\n\t\tif(sizeDeque == 0) {\r\n\t\t\tdata[backDeque] = element;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tbackDeque = (backDeque + 1)%CAPACITY;\r\n\t\t\tdata[backDeque] = element;\r\n\t\t}\r\n\t\t\r\n\t\tsizeDeque++;\r\n\t}", "public void push(E value) {\n list.addLast(value);\n index++;\n }", "public void dequeue()\n\t{\n\t\tq.removeFirst();\n\t}", "public static void enqueue(Object object) {\n queue.addLast(object);\n }", "public void pop();", "public void dequeue() {\r\n saf.remove(0);\r\n }", "void moveBack()\n\t{\n\t\tif (length != 0) \n\t\t{\n\t\t\tcursor = back; \n\t\t\tindex = length - 1; //cursor will be at the back\n\t\t\t\n\t\t}\n\t}", "@Override\n public void backtrack() {\n if (!stack.isEmpty()) {\n int index = (Integer) stack.pop();\n\n if (index > arr.length) {//popping the insert function unneeded push\n insert((Integer) stack.pop());\n stack.pop();\n }\n if (index < arr.length) {//popping the delete function unneeded push\n delete(index);\n stack.pop();\n stack.pop();\n }\n System.out.println(\"backtracking performed\");\n }\n }", "private E dequeue() {\n final Object[] items = this.items;\n @SuppressWarnings(\"unchecked\")\n E x = (E) items[takeIndex];\n items[takeIndex] = null;\n if (++takeIndex == items.length) takeIndex = 0;\n count--;\n notFull.signal();\n return x;\n }", "public void push(int x) {\n queue.addLast(x);\n }", "public void pushBack(IClause c) {\n back++;\n if (back >= tab.length)\n back = 0;\n tab[back] = c;\n\n if (back + 1 == front || (front == 0 && back == tab.length - 1))\n throw new BufferOverflowException();\n }", "public void enqueue(T item) {\r\n\r\n\t\t++item_count;\r\n\t\tif(item_count==arr.length)\r\n\t\t\tdoubleArray();\r\n\t\tarr[++back%arr.length]=item;\r\n\t}", "public void reverse() {\n\t\tif (!this.isEmpty()) {\n\t\t\tT x = this.peek();\n\t\t\tthis.pop();\n\t\t\treverse();\n\t\t\tinsert_at_bottom(x);\n\t\t} else\n\t\t\treturn;\n\t}", "public void requeue() {\n\t\tenqueue(queue.removeFirst());\n\t}", "public void addToBack(T data) {\n if (data == null) {\n throw new IllegalArgumentException(\"You can't insert null\"\n + \" data in the structure.\");\n }\n if (size == 0) {\n head = new DoublyLinkedListNode<>(data);\n tail = head;\n size += 1;\n } else {\n DoublyLinkedListNode<T> newnode =\n new DoublyLinkedListNode<>(data);\n tail.setNext(newnode);\n newnode.setPrevious(tail);\n tail = newnode;\n size += 1;\n\n }\n }", "void enqueue(E newEntry);", "public void enqueue( MyTreeNode<T> treeNode ) {\n\t\tQueueNode newNode = new QueueNode(treeNode);\n\t\t// the queue is empty\n\t\tif ( tail == null ) {\n\t\t\t// the tail and the head point to the same only element in the collection\n\t\t\tthis.tail = newNode;\n\t\t\tthis.head = newNode;\n\t\t// the queue is not empty\n\t\t} else {\n\t\t\t// the second from the end item of the collection keeps track with the tail\n\t\t\tthis.tail.next = newNode;\n\t\t\t// the new element becomes the tail of the collection\n\t\t\tthis.tail = newNode;\n\t\t}\n\t}", "public void push(int x) {\n queue.addLast(x);\n }", "public void enqueue(Item item) {\n \t if (item == null) {\n \t \t throw new NullPointerException();\n \t } \n \t Node a = new Node(item);\n \t Node oldPrev = sentinel.prev.prev;\n \t oldPrev.next = a;\n \t a.next = sentinel.prev;\n \t sentinel.prev.prev = a;\n \t a.prev = oldPrev;\n \t size = size + 1;\n }", "void push(Object item);", "public void enqueue(Object data){\r\n super.insert(data, 0);//inserts it to the first index everytime (for tostring)\r\n }", "public void enqueue(T element);", "public void push(T item)\r\n\t{\r\n\t\t if (size == Stack.length) \r\n\t\t {\r\n\t\t\t doubleSize();\r\n\t }\r\n\t\tStack[size++] = item;\r\n\t}", "public void enqueue(String value)\n\t{\n\t\tq.insertLast(value);\n\t}", "private void enterToRunwayQueue() {\n\t\tqueue.insert(this);\n\t}", "public void addLast(T item) {\n if (size == 0) {\n array[rear] = item;\n size++;\n return;\n }\n\n this.checkReSizeUp();\n rear++;\n this.updatePointer();\n array[rear] = item;\n size++;\n }", "public void addLast(Item x);", "@Override\n public void enqueue(T value) {\n myQ[myLength] = value;\n myLength++;\n }", "public void insert(E item) {\n // FILL IN\n }", "T dequeue() throws RuntimeException;", "T dequeue() throws RuntimeException;", "@Override\n public Item getBack() {\n int lastActualItemIndex = size - 1;\n return items[lastActualItemIndex];\n }", "public void offerBack(E elem);", "@Override\n\tpublic void queue(T element) {\n\t\tLinkElement<T> linkElement = new LinkElement<T>(element);\n\n\t\tif ( last != null )\n\t\t\tlast.setPrevLinkElement(linkElement);\t// ensure previous last element refers to new last element.\n\t\t\n\t\tlast = linkElement;\n\t\t\n\t\tif (head == null)\n\t\t\thead = linkElement;\t// the first element on the queue, so becomes the head.\n\t}", "public void push(E element) {\r\n items.add(0, element);\r\n }", "public void enqueue(E item) throws IllegalStateException {\n if (size == arrayQueue.length) {\n throw new IllegalStateException(\"Queue is full\");\n }\n int available = (front + size) % arrayQueue.length;\n arrayQueue[available] = item;\n size++;\n }", "public void push(int x) {\n if (!reverseQueue.isEmpty()) {\n normalQueue.offer(reverseQueue.poll());\n }\n normalQueue.offer(x);\n }", "public void insertRear(int val) {\r\n\t\tif(isFull()) return;\r\n\t\t// If deque is empty, assign a valid position for both pointers to start inserting\r\n\t\telse if(isEmpty()) front = rear = 0;\r\n\t\t// Else, just increment the rear, as we are inserting at rear.\r\n\t\telse rear = (rear+1)%maxSize;\r\n\t\tarr[rear] = val;\r\n\t}", "public abstract void Enqueue (Type item);", "public Item deleteBack() {\n items[size - 1] = null;\n size -= size;\n Item itemToReturn = getBack();\n \n return itemToReturn;\n }", "public void pushBottom(Runnable r) {\n tasks[bottom] = r; // store task\n bottom++; // advance bottom\n }", "public void push(int item) {\n if(isEmpty())\n top = new Node(item);\n else\n {\n Node newNode = new Node(item, top);\n top = newNode;\n }\n sz++;\n }", "public void enqueue(Item item) {\n if (item == null) throw new NullPointerException();\n\n if (size == array.length) {\n Item[] temp = (Item[]) new Object[array.length * 2];\n System.arraycopy( array, 0, temp, 0, array.length);\n array = temp;\n temp = null;\n }\n array[size] = item;\n size++;\n if(size>1) { \n int x=StdRandom.uniform(size);\n Item temp=array[x];\n array[x]=array[size-1];\n array[size-1]=temp;\n }\n\n }", "public T dequeue();" ]
[ "0.7057123", "0.68927175", "0.6884722", "0.68709934", "0.6751838", "0.67250466", "0.6605964", "0.65737915", "0.6571392", "0.6565653", "0.6552423", "0.6526135", "0.65235144", "0.6422385", "0.641965", "0.6399514", "0.638986", "0.6386314", "0.63690615", "0.6365642", "0.63614655", "0.6356211", "0.6353949", "0.63490176", "0.6344963", "0.6342946", "0.6332057", "0.6327375", "0.63058126", "0.63057375", "0.63057375", "0.62829167", "0.6270628", "0.6221954", "0.62058496", "0.6195226", "0.6181754", "0.61797196", "0.61652845", "0.6163868", "0.6142412", "0.61387914", "0.61377686", "0.613433", "0.61264426", "0.61222535", "0.6113027", "0.6102175", "0.6095824", "0.6081379", "0.6067998", "0.60428303", "0.6023233", "0.6014971", "0.6006804", "0.6002362", "0.59988445", "0.59986436", "0.5988119", "0.5983186", "0.59615487", "0.59568596", "0.5941995", "0.594184", "0.5940448", "0.5939527", "0.5934269", "0.59313035", "0.59248203", "0.59239924", "0.5923443", "0.5917956", "0.5916637", "0.5915443", "0.59110713", "0.5908359", "0.58921933", "0.58893234", "0.58823025", "0.5879108", "0.585849", "0.585716", "0.5851659", "0.58473134", "0.5843626", "0.5842105", "0.5842105", "0.58354056", "0.58345777", "0.583012", "0.5828174", "0.5824373", "0.5818774", "0.58142936", "0.58116186", "0.5807385", "0.5806855", "0.58053964", "0.5804109", "0.5802048" ]
0.632317
28
Remove the element at the front of the queue and return its value.
public T pop();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public E remove(){\r\n if(isEmpty())\r\n return null;\r\n \r\n //since the array is ordered, the highest priority will always be at the end of the queue\r\n //--currentSize will find the last index (highest priority) and remove it\r\n return queue[--currentSize];\r\n }", "public static Object dequeue() {\t \n if(queue.isEmpty()) {\n System.out.println(\"The queue is already empty. No element can be removed from the queue.\"); \n return -1;\n }\n return queue.removeFirst();\n }", "public synchronized Object removeFirstElement() {\n return _queue.remove(0);\n }", "public long remove(){\n\t\t\r\n\t\t\tlong temp = queueArray[front]; //retrieves and stores the front element\r\n\t\t\tfront++;\r\n\t\t\tif(front == maxSize){ //To set front = 0 and use it again\r\n\t\t\t\tfront = 0;\r\n\t\t\t}\r\n\t\t\tnItems--;\r\n\t\t\treturn temp;\r\n\t\t}", "public T poll() {\n if (size == 0) {\n return null;\n }\n\n // set returned value to queue[0]\n T value = (T) array[0];\n\n // decrease size - we are removing element\n size--;\n\n // move queue 1 place left\n System.arraycopy(array, 1, array, 0, size);\n\n // clear last element\n array[size] = null;\n\n return value;\n }", "@Override\r\n\tpublic E dequeueFront() {\n\t\tif(isEmpty()) return null;\r\n\t\tE value = data[frontDeque];\r\n\t\tfrontDeque = (frontDeque + 1)% CAPACITY;\r\n\t\tsizeDeque--;\r\n\t\treturn value;\r\n\t}", "public Object dequeue()\n {\n return queue.removeFirst();\n }", "public int pop() {\n int size = queue.size();\n for (int i = 0; i < size - 1; i++) {\n Integer poll = queue.poll();\n queue.offer(poll);\n }\n return queue.poll();\n }", "public int dequeue() {\n\t\tif (isEmpty()) throw new IllegalStateException(\"\\nQueue is empty!\\n\");\n\t\tint removedItem = bq[head];\n\t\tif (head == bq.length - 1) head = 0; // wraparound\n\t\telse head++;\n\t\tsize--;\n\t\treturn removedItem;\t\n\t}", "public E dequeue() {\n if (isEmpty()) return null; //nothing to remove.\n E item = first.item;\n first = first.next; //will become null if the queue had only one item.\n n--;\n if (isEmpty()) last = null; // special case as the queue is now empty. \n return item;\n }", "@Override\n\tpublic E deQueue() {\n\t\treturn list.removeFirst();\n\t}", "Node dequeue() {\n Node n = queue.removeFirst();\n queueSet.remove(n);\n return n;\n }", "@Override\n public E removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[head];\n dequeue[head] = null;\n head = ++head % dequeue.length;\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }", "public int pop() {\n int size=queue.size();\n for (int i = 0; i <size-1 ; i++) {\n int temp=queue.poll();\n queue.add(temp);\n }\n return queue.poll();\n }", "public E dequeue() {\n\t\treturn list.removeFirst();\n\t}", "public E dequeue(){\n if (isEmpty()) return null;\n E answer = arrayQueue[front];\n arrayQueue[front] = null;\n front = (front +1) % arrayQueue.length;\n size--;\n return answer;\n }", "public T dequeue()\n\t{\n\t\tNode<T> eliminado = head;\n\t\thead = head.getNext();\n\t\tif(head == null)\n\t\t{\n\t\t\ttail = null;\n\t\t}\n\t\tsize--;\n\t\treturn eliminado.getElement();\n\t}", "public E dequeue() {\n if (size == 0){\n return null;\n }\n\n\n E result = (E) queue[0];\n queue[0] = null;\n --size;\n\n if (size != 0){\n shift();\n }\n return result;\n }", "public E pop() {\n E value = head.prev.data;\n head.prev.delete();\n if (size > 0) size--;\n return value;\n }", "public E peek(){\r\n if(isEmpty())\r\n return null;\r\n\r\n return queue[currentSize-1]; //return the object without removing it\r\n }", "public E removeFront() {\n\t\tif (count == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tE temp = head.value;\n\t\t\thead = head.next;\n\t\t\tcount--;\n\t\t\treturn temp;\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic T dequeue() {\r\n\t\tT data;\r\n\t\t\r\n\t\t// checking if queue is empty or not\r\n\t\tif (isEmtpy()) {\r\n\t\t\tthrow new AssertionError(\"Queue is empty\");\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\t// remove element\r\n\t\t\tdata = (T)(Integer)this.array[this.front];\r\n\t\t\t\r\n\t\t\t// adjust both front and rear of queue\r\n\t\t\tif (this.front == this.rear) {\r\n\t\t\t\tthis.front = this.rear = -1;\r\n\t\t\t} else {\r\n\t\t\t\tthis.front = (this.front + 1) % this.size;\r\n\t\t\t}\r\n\t\t\treturn (T)data;\r\n\t\t}\r\n\t}", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"queue is empty\");\n }\n Item a;\n a = first.item;\n first = first.next;\n if (first == null) {\n last = null;\n }\n else first.prev = null;\n size--;\n return a;\n }", "public static Object peek() {\t \n if(queue.isEmpty()) { \n System.out.println(\"The queue is empty so we can't see the front item of the queue.\"); \n return -1;\n }\t \n else {\n System.out.println(\"The following element is the top element of the queue:\" + queue.getFirst()); \t \n }\n return queue.getFirst();\n }", "public int pop() {\n return queue.poll();\n }", "public T dequeue() {\n if (size == 0) {\n throw new NoSuchElementException(\"The queue is empty\"\n + \". Please add data before attempting to remove.\");\n } else if (front == backingArray.length - 1) {\n int temp = front;\n T data = backingArray[temp];\n backingArray[front] = null;\n front = 0;\n size--;\n return data;\n } else {\n int temp = front;\n T data = backingArray[temp];\n backingArray[front] = null;\n front = temp + 1;\n size--;\n return data;\n }\n }", "private E remove() {\n if (startPos >= queue.length || queue[startPos] == null) throw new NoSuchElementException();\n size--;\n return (E) queue[startPos++];\n }", "public Integer dequeue() {\n\t\t // get last val in heap, copy value to index 0\n\t\t // decrease size \n\t\t // create a recursive helper, percolateDown,\n\t\t // that allows you move the removed val \n\t\t // in the right place\n\t\t \n\t\t if (size == 0) \n\t\t\t throw new EmptyStackException();\n\t int item = data[0]; \n\t data[0] = data[size - 1]; \n\t size--;\n\t percolateDown(0); \n\t return item;\n\t }", "public int pop() {\n int size = queue.size();\n while (size > 2) {\n queue.offer(queue.poll());\n size--;\n }\n topElem = queue.peek();\n queue.offer(queue.poll());\n return queue.poll();\n }", "public int pop() {\n return queue.removeLast();\n }", "@Override\n public E removeLast() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[tail];\n dequeue[tail] = null;\n tail--;\n if (tail == -1) {\n tail = dequeue.length - 1;\n }\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }", "public int pop() {\r\n if (queue1.size() == 0) {\r\n return -1;\r\n }\r\n int removed = top;\r\n while (queue1.peek() != removed) {\r\n top = queue1.remove();\r\n queue1.add(top);\r\n }\r\n return queue1.remove();\r\n }", "public Country removeFront() {\n\t\tCountry temp = null;\n\t\ttry {\n\t\t\tif (isEmpty()) {\n\t\t\t\tSystem.out.println(\"The queue is empty.\");\n\t\t\t} else if (front != end) {\n\t\t\t\tfront.previous = null;\n\t\t\t\ttemp = front.data;\n\t\t\t\tfront = front.next;\n\t\t\t} else {\n\t\t\t\tfront = end = null;\n\t\t\t\ttemp = front.data;\n\t\t\t}\n\t\t} catch (NullPointerException e) {\n\t\t\t;\n\t\t}\n\t\treturn temp;\n\t}", "public int pop()\n\t{\n\t\tif (isEmpty() == true)\n\t\t{\n\t\t\tthrow new NullPointerException(\"Queue is empty!\");\n\t\t}\n\t\tif (head == tail)\n\t\t{\n\t\t\ttail = null;\n\t\t}\n\t\tint value = head.value;\n\t\thead = head.next;\n\t\treturn value;\n\t}", "public int pop() {\n return queue.removeLast();\n }", "public int pop() {\n int res= q1.remove();\n if (!q1.isEmpty())\n top = q1.peek();\n return res;\n }", "public Object dequeue() {\n\t\tif(isEmpty()) throw new RuntimeException(); \n\t\tObject value = data[0];\n\t\tfor(int i = 0; i < data.length-1; i++) {\n\t\t\tdata[i] = data[i+1];\n\t\t}\n\t\tdata[size()] = null;\n\t\tindx--;\n\t\treturn value;\n\t}", "public int dequeueFront();", "public String pop() {\n if (queue.size() == 0) {\n return null;\n }\n\n String result = top();\n queue.remove(0);\n return result;\n }", "public int pop() {\n return queue.poll();\n }", "public int pop() {\n return queue.poll();\n }", "@Override\n\tpublic E dequeue() {\n\t\tif(isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tE data = queue[pos];\n\t\tqueue[pos] = null;\n\t\tpos = (pos+1) % queue.length;\n\t\tsize--;\n\t\treturn data;\n\t}", "public Object dequeue() {\n\t\t\n\t\t// Check: Queue is empty\n\t\tif (isEmpty()) {\n\t\t\tthrow new NoSuchElementException(\"Queue is empty. Cannot dequeue.\");\n\t\t}\n\t\t\n\t\t// Check: one element (tail = head)\n\t\t// If so, set tail to null\n\t\tif (tail == head) tail = null;\n\t\t\n\t\t// Save head's data to return\n\t\tObject first = head.data;\n\t\t\n\t\t// Remove head from queue and re-assign head to head.next\n\t\thead = head.next;\n\t\t\n\t\treturn first;\n\t}", "private E dequeue() {\n final Object[] items = this.items;\n @SuppressWarnings(\"unchecked\")\n E x = (E) items[takeIndex];\n items[takeIndex] = null;\n if (++takeIndex == items.length) takeIndex = 0;\n count--;\n notFull.signal();\n return x;\n }", "public E poll() {\n\t\twhile (true) {\n\t\t\tlong f = front.get();\n\t\t\tint i = (int)(f % elements.length());\n\t\t\tE x = elements.get(i);\n\t\t\t//Did front change while we were reading x?\n\t\t\tif (f != front.get())\n\t\t\t\tcontinue;\n\t\t\t//Is the queue empty?\n\t\t\tif (f == rear.get())\n\t\t\t\treturn null; //Don't retry; fail the poll.\n\n\t\t\tif (x != null) {//Is the front nonempty?\n\t\t\t\tif (elements.compareAndSet(i, x, null)) {//Try to remove an element.\n\t\t\t\t\t//Try to increment front. If we fail, other threads will\n\t\t\t\t\t//also try to increment before any further removals, so we\n\t\t\t\t\t//don't need to loop.\n\t\t\t\t\tfront.compareAndSet(f, f+1);\n\t\t\t\t\treturn x;\n\t\t\t\t}\n\t\t\t} else //front empty. Try to help other threads.\n\t\t\t\tfront.compareAndSet(f, f+1);\n\n\t\t\t//If we get here, we failed at some point. Try again.\n\t\t}\n\t}", "public int pop()\n\t{\n\t\tif (head == null)\n\t\t{\n\t\t\tthrow new NullPointerException(\"Queue is empty\");\n\t\t}\n\t\tif (head == tail)\n\t\t{\n\t\t\ttail = null;\n\t\t}\n\t\tint value = head.value;\n\t\thead = head.next;\n\t\treturn value;\n\t}", "@Override\n\tpublic E dequeue() {\n\t\tE temp=null;\n\t\tif(front==data.length-1){\n\t\t\ttemp=data[front];\n\t\t\tsize--;\n\t\t\tfront=(front+1)%data.length;\n\t\t}else{\n\t\t\tsize--;\n\t\t\ttemp=data[front++];\n\t\t}\n\t\treturn temp;\n\t}", "public int pop() {\n return queue.poll();\n }", "public int pop() {\n return queue.poll();\n }", "public T removeFromFront() {\n DoublyLinkedListNode<T> temp = head;\n if (size == 0) {\n throw new NoSuchElementException(\"The list is empty, so there\"\n + \" is nothing to get.\");\n } else {\n if (head == tail) {\n head = tail;\n tail = null;\n return temp.getData();\n } else {\n head = head.getNext();\n head.setPrevious(null);\n size -= 1;\n return temp.getData();\n }\n }\n\n\n }", "public T removeFirst(){\n\tT ret = _front.getCargo();\n\t_front = _front.getPrev();\n\t_front.setNext(null);\n\t_size--;\n\treturn ret;\n }", "public E dequeue() {\n return pop();\n }", "@Override\r\n\tpublic T dequeue() {\r\n\t\tT element;\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new AssertionError(\"Queue is empty.\");\r\n\t\telement = arr[front].getData();\r\n\t\tif (front == rear) {\r\n\t\t\tfront = rear = -1;\r\n\t\t} else {\r\n\t\t\tfront++;\r\n\t\t}\r\n\t\treturn element;\r\n\t}", "public int getFront() {\n if(isEmpty()){\n return -1;\n }\n return queue[head];\n }", "@Override\n public E poll() {\n E tmp = (E)queue[0];\n System.arraycopy(queue, 1, queue, 0, size - 1);\n size--;\n return tmp;\n }", "public process dequeue() {\n\t\treturn queue.removeFirst();\n\t}", "public T pop() {\n\t\tT value = null;\n\t\tif (!isEmpty()) {\n\t\t\ttop = top.next;\n\t\t\tvalue = top.value;\n\t\t}\n\t\treturn value; // returning popped value\n\t}", "public int pop() {\n\t return q.poll();\n\t }", "public Object deQueue()\n {\n if(this.isEmpty()){throw new QueueUnderflowException();}\n Node temp = this.front;\n front = front.getNext();\n if(this.isEmpty()){this.rear = null;}\n return temp.getData();\n }", "public T removeFront() {\n\t\tT found = start.value;\n\t\tstart = start.next;\n\t\treturn found;\n\t}", "public int pop() {\n return q.poll();\n }", "public int pop() {\n q1.remove();\n int res = top;\n if (!q1.isEmpty()) {\n top = q1.peek();\n }\n return res;\n }", "public int pop() {\n int value = top.value;\n top = top.pre;\n top.next = null;\n size--;\n return value;\n }", "public Object dequeue(){\r\n return super.remove(size()-1);\r\n }", "public O popFront()\r\n {\r\n if (!isEmpty())\r\n {\r\n VectorItem<O> l = first;\r\n first = first.getNext();\r\n \r\n count--;\r\n if (isEmpty()) last = null;\r\n else first.setPrevious(null);\r\n \r\n return l.getObject();\r\n } else\r\n return null;\r\n }", "public T dequeue(){\n T front = getFront(); // might throw exception, assumes firstNode != null\n firstNode = firstNode.getNext();\n\n if (firstNode == null){\n lastNode = null;\n } // end if\n return front;\n }", "public T dequeue() {\n if (first != null) {\n size--;\n T data = first.data;\n first = first.next;\n\n if (first == null) {\n last = null; // avoid memory leak by removing reference\n }\n\n return data;\n }\n return null;\n }", "public void pop() {\n queue.remove(0);\n }", "public int dequeue() {\n\t\tif (isEmpty()) error(\"Queue is Empty\");\n\t\tfront = (front + 1) % MAX_QUEUE_SIZE;\n\t\treturn data[front];\n\t}", "public E removeFront() {\r\n if (elem[front] == null) {\r\n throw new NoSuchElementException();\r\n } else {\r\n E temp = elem[front];\r\n elem[front] = null;\r\n front++;\r\n return temp;\r\n }\r\n }", "T poll(){\n if(isEmpty()){\n return null;\n }\n T temp = (T) queueArray[0];\n for(int i=0; i<tail-1;i++){\n queueArray[i] = queueArray[i+1];\n }\n tail--;\n return temp;\n }", "public synchronized Object dequeue() throws EmptyListException {\r\n return removeFromFront();\r\n }", "public Object peek()\n {\n if(this.isEmpty()){throw new QueueUnderflowException();}\n return front.getData();\n }", "public String dequeue()\n\t{\n\t\tif (!isEmpty())\n\t\t{\n\t\t\tcounter--;\n\t\t\tString temp = list[front];\n\t\t\tfront = next(front);\n\t\t\treturn temp;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "public E dequeue() {\n\t\tresetIterator();\n\t\tsize--;\n\t\tE temp = head.data;\n\t\thead = head.next;\n\t\treturn temp;\n\t}", "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[front];\n }\n this.checkReSizeDown();\n size--;\n front++;\n this.updatePointer();\n return array[Math.floorMod(front - 1, array.length)];\n }", "public int pop() {\r\n if (queue1.size() == 0) {\r\n return -1;\r\n }\r\n Queue<Integer> queue2 = new LinkedList();\r\n int removed = top;\r\n while (queue1.peek() != removed) {\r\n top = queue1.remove();\r\n queue2.add(top);\r\n }\r\n queue1 = queue2;\r\n return removed;\r\n }", "public int remove() {\n return priorityQueue[--counter];\n }", "public synchronized T dequeue() {\r\n\t\twhile(queue.size()==0){\r\n\t\t\ttry {\r\n\t\t\t\tthis.wait();\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\tSystem.out.println(\"Problem during dequeue\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tT ans = queue.removeFirst();\r\n\t\tthis.notifyAll();\r\n\t\treturn ans;\r\n\r\n\t}", "public static String deQueue(Queue q){ \n String front = q.names[0]; //Store the front element to be returned and printed if wanted \n if (q.queuesize != 0){ //IF the queue is not empty \n for (int i = 0; i < q.queuesize; i++){ //For the all of the non zero elements in the queue\n q.names[i] = q.names[i+1]; // Overwrite the first element to get rid of it and shove all of the others up 1\n }\n q.queuesize -=1; //Decrease the size by 1 as someone left \n }\n else{\n System.out.print(\"Empty Queue\"); //State the queue is empty and nothing can be removed\n }\n return front; //Return the element that was once in front - This can be printed \n }", "public T removeFirst() {\r\n \r\n if (size == 0) {\r\n return null;\r\n }\r\n \r\n T deleted = front.element;\r\n front = front.next;\r\n size--;\r\n \r\n return deleted;\r\n }", "public void pop() {\n queue.remove();\n }", "public T pop() \n\t//POST: First element of list removed and FCTVAL == first element in list\n\t{\n\t\tT tmp = start.value;\n\t\tremove(start.value);\n\t\treturn tmp;\n\t}", "public int top() {\n int size=queue.size();\n for (int i = 0; i < size-1; i++) {\n int temp=queue.poll();\n queue.add(temp);\n }\n int top=queue.poll();\n queue.add(top);\n return top;\n }", "public T pop()\n\t{\n\t\treturn list.removeFirst();\n\t}", "@Override\n public T dequeue() {\n if (!isEmpty()) {\n return heap.remove();\n } else {\n throw new NoSuchElementException(\"Priority Queue is null\");\n }\n }", "public E dequeue() {\r\n\t\tif (isEmpty()) {\r\n\t\t\tthrow new IndexOutOfBoundsException();\r\n\t\t}\r\n\t\t\r\n\t\tif (size() != 1) {\r\n\t\t\t//Node p = first; \r\n\t\t\tE item = first.item;\r\n\t\t\tremove(0);\r\n\t\t\t//first = p.next;\r\n\t\t\t//first.prev = null;\r\n\t\t\treturn item;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tE e = last.item;\r\n\t\t\tremove(last.item);\r\n\n\t\t\treturn e;\r\n\t\t}\n\t}", "public int peek()\n\t{\n\t\tif (isEmpty() == true)\n\t\t{\n\t\t\tthrow new NullPointerException(\"Queue is empty!\");\n\t\t}\n\t\treturn head.value;\n\t}", "public int queue_top() {\n\t\tif (isEmpty()) error(\"Queue is Empty!\");\n\t\treturn data[(front + 1) % MAX_QUEUE_SIZE];\n\t}", "@Override\r\n\tpublic Object dequeue(){\r\n\t\tcheck();\r\n\t\tNode temp = head;\r\n\t\thead = head.next;\r\n\t\tsize--;\r\n\t\treturn temp.value;\r\n\t}", "public Object popFront(){\n\t\tObject data = head.data;\n\t\thead = head.nextNode; \n\t\t--size; \n\t\t\n\t\treturn data; \n\t}", "public int pop() {\n \tif (head != null) {\n \t\tint item = head.value;\n \t\thead = head.next;\n \t\tsize--;\n \t\treturn item;\n \t}\n \treturn 0;\n }", "@Override\n public Object dequeue() throws EmptyCollectionException {\n if (isEmpty()) {\n throw new EmptyCollectionException(\"queue\");\n }\n\n T result = front.getN();\n front = front.getNext();\n count--;\n if (isEmpty()) {\n rear = null;\n }\n\n return result;\n }", "@Override\r\n\tpublic T dequeue() throws QueueUnderflowException {\r\n\r\n\t\tif (this.isEmpty()) {\r\n\t\t\tthrow new QueueUnderflowException(\"The queue is empty\");\r\n\t\t}\r\n\t\t// Remove the first element\t\t\r\n\t\treturn data.remove(0);\r\n\t}", "public int peek()\n\t{\n\t\tif (head == null)\n\t\t{\n\t\t\tthrow new NullPointerException(\"Queue is empty\");\n\t\t}\n\t\treturn head.value;\n\t}", "public T pop() {\r\n T o = get(size() - 1);\r\n remove(size() - 1);\r\n return o;\r\n\t}", "public int popFront() {\n if(head == null) {\n return Integer.MIN_VALUE;\n }\n\n Node node = head;\n head = node.next;\n\n size--;\n\n return node.val;\n }", "public Item removeFirst(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[first];\r\n\t\tlist[first++] = null;\r\n\t\tn--;\r\n\t\tprior=first-1;\r\n\t\tif(first==list.length){first=0;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}", "public int dequeue() {\n if (isEmpty()) {\n throw new IllegalStateException(\"Queue is empty\");\n }\n\n ListNode temp = front;\n\n front = front.next;\n\n // if the list becomes empty\n if (front == null) {\n rear = null;\n }\n count -= 1;\n return temp.val;\n }", "public T dequeue()\n\t{\n\t\tT end = callHead().next.data;\n\t\tdelete(end,callHead());\n\t\treturn end;\n\t}", "public Object todequeue() {\n\t\tif(rear == 0)\n\t\t\treturn null;\n\t\telse {\n\t\t\tObject to_return = arr[front];\n\t\t\tfront++;\n\t\t\tsize--;\n\t\t\treturn to_return;\n\t\t}\n\t}" ]
[ "0.78420955", "0.784065", "0.7827602", "0.7779622", "0.7743837", "0.77322", "0.77244395", "0.76594263", "0.764749", "0.7617066", "0.7604456", "0.7585826", "0.7567178", "0.7553275", "0.75452113", "0.7483475", "0.7472236", "0.7461723", "0.7457074", "0.7453139", "0.7450933", "0.7438629", "0.74329466", "0.7424055", "0.7415822", "0.74118805", "0.73831373", "0.7374934", "0.73746806", "0.7372867", "0.734912", "0.7348365", "0.73355824", "0.73348826", "0.73345506", "0.7327316", "0.7326542", "0.7326448", "0.73198754", "0.73175716", "0.73175716", "0.731238", "0.7305847", "0.73031056", "0.72951907", "0.7289909", "0.7283116", "0.72789025", "0.72789025", "0.72737217", "0.72728896", "0.72705245", "0.724846", "0.7242685", "0.7237063", "0.72253937", "0.72078", "0.7206838", "0.7197126", "0.719022", "0.7184774", "0.71824425", "0.71815366", "0.7175127", "0.7170173", "0.71532875", "0.7138642", "0.71380645", "0.7128464", "0.71252567", "0.7121699", "0.7120197", "0.7118356", "0.7118146", "0.71173024", "0.71121705", "0.7101615", "0.7095922", "0.7094518", "0.708365", "0.707847", "0.7072899", "0.7070048", "0.70675623", "0.7064486", "0.70551187", "0.7054683", "0.70492435", "0.7049116", "0.70460534", "0.7040533", "0.7039536", "0.7037524", "0.70369", "0.70326865", "0.7020469", "0.701489", "0.7012086", "0.7009345", "0.6998585", "0.69971496" ]
0.0
-1
Return the value of the element at the front of the queue.
public T peek();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getFront() {\n if(isEmpty()){\n return -1;\n }\n return queue[head];\n }", "public static Object peek() {\t \n if(queue.isEmpty()) { \n System.out.println(\"The queue is empty so we can't see the front item of the queue.\"); \n return -1;\n }\t \n else {\n System.out.println(\"The following element is the top element of the queue:\" + queue.getFirst()); \t \n }\n return queue.getFirst();\n }", "public int Front() {\n if(queue[head] == null){\n return -1;\n }else{\n return queue[head];\n }\n }", "public int Front() {\n if (isEmpty()) {\n return -1;\n }\n return queue[head];\n }", "public int Front() {\n if (this.count == 0)\n return -1;\n return this.queue[this.headIndex];\n }", "public E first(){\n if (isEmpty()) return null;\n return arrayQueue[front];\n }", "public Object getFront() throws Exception {\n if (!isEmpty()) {\n return queue[front];\n } else {\n // 对为空返回null\n return null;\n }\n }", "public int peek()\n\t{\n\t\tif (isEmpty() == true)\n\t\t{\n\t\t\tthrow new NullPointerException(\"Queue is empty!\");\n\t\t}\n\t\treturn head.value;\n\t}", "public T getFront(){\n if (isEmpty()){\n throw new EmptyQueueException();\n }\n else {\n return firstNode.getData();\n }\n }", "public int peek()\n\t{\n\t\tif (head == null)\n\t\t{\n\t\t\tthrow new NullPointerException(\"Queue is empty\");\n\t\t}\n\t\treturn head.value;\n\t}", "@Override\r\n\tpublic E dequeueFront() {\n\t\tif(isEmpty()) return null;\r\n\t\tE value = data[frontDeque];\r\n\t\tfrontDeque = (frontDeque + 1)% CAPACITY;\r\n\t\tsizeDeque--;\r\n\t\treturn value;\r\n\t}", "@Override\n\tpublic E first() {\n\t\treturn queue[pos];\n\t}", "public int queue_top() {\n\t\tif (isEmpty()) error(\"Queue is Empty!\");\n\t\treturn data[(front + 1) % MAX_QUEUE_SIZE];\n\t}", "public Object peek()\n {\n if(this.isEmpty()){throw new QueueUnderflowException();}\n return front.getData();\n }", "@Override\n public E peek() {\n return (E)queue[0];\n }", "public int getFront() {\n if (cnt == 0)\n return -1;\n return head.val;\n }", "public int peekFront() {\n int x = 0;\n if(head == null) {\n return Integer.MIN_VALUE;\n }\n\n return head.val;\n }", "T getFront() throws EmptyQueueException;", "public int peek() {\n return queue.firstElement();\n }", "public int top() {\n return queue.element();\n }", "public int getFront() {\n if (isEmpty()) {\n return -1;\n }\n return arr[front];\n }", "public Object firstElement() {\n return _queue.firstElement();\n }", "public E peek(){\r\n if(isEmpty())\r\n return null;\r\n\r\n return queue[currentSize-1]; //return the object without removing it\r\n }", "public T peek() {\n if (size == 0) {\n throw new NoSuchElementException(\"The queue is empty\"\n + \". Please add data before attempting to peek.\");\n } else {\n return backingArray[front];\n }\n\n }", "public Object peek()\n {\n return queue.peekLast();\n }", "int front()\n {\n if (isEmpty())\n return Integer.MIN_VALUE;\n return this.array[this.front];\n }", "T peek(){\n if(isEmpty()){\n return null;\n }\n return (T)queueArray[0];\n }", "public int top() {\n int size=queue.size();\n for (int i = 0; i < size-1; i++) {\n int temp=queue.poll();\n queue.add(temp);\n }\n int top=queue.poll();\n queue.add(top);\n return top;\n }", "public int getFront() {\n return !isEmpty() ? elements[last - 1] : -1;\n }", "public int top() {\n return queue.peek();\n }", "public int top() {\n return queue.peek();\n }", "int getFront()\n {\n // check whether Deque is empty or not \n if (isEmpty())\n {\n return -1 ;\n }\n return arr[front];\n }", "public int top() {\n\t\tIterator<Integer> iter = queue.iterator();\n\t\tint temp = 0;\n\t\twhile (iter.hasNext())\n\t\t\ttemp = iter.next();\n\t\treturn temp;\n\t}", "public int top() {\n return queue.peek();\n }", "public int top() {\n return queue.peek();\n }", "public int top() {\n move();\n return reverseQueue.peek();\n }", "public Object peek() {\n\t\t\n\t\t// Check: Queue is empty\n\t\tif (isEmpty()) {\n\t\t\tthrow new NoSuchElementException(\"Queue is empty. Nothing to peek at.\");\n\t\t}\n\t\t\n\t\treturn head.data;\n\t}", "public E element() {\n if (size == 0){\n return null;\n }\n return (E)queue[0];\n }", "public int peek()\n\t{\n\t\tif(isEmpty())\t\n\t\t{\n\t\t\tSystem.out.println(\"Queue Underflow\");\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\t\treturn queueArray[front];\n\t}", "public T front() throws EmptyQueueException;", "public Object element() {\n return queue.element();\n }", "public E peekFront() {\r\n if (front == rear) {\r\n throw new NoSuchElementException();\r\n } else {\r\n return elem[front];\r\n }\r\n }", "public int top() {\n if (!forReverse.isEmpty()) {\n return forReverse.peek();\n }\n \n while (queue.size() > 1) {\n forReverse.add(queue.poll());\n }\n\n int val = queue.peek();\n \n Queue<Integer> temp = queue;\n queue = forReverse;\n forReverse = temp;\n\n return val;\n }", "public int top() {\n int size = queue.size();\n for (int i = 0; i < size - 1; i++) {\n Integer poll = queue.poll();\n queue.offer(poll);\n }\n Integer poll = queue.poll();\n queue.offer(poll);\n return poll;\n }", "@Override\n public T peekFront() {\n if (isEmpty()) {\n return null;\n }\n return head.peekFront();\n }", "public int peek() {\n return queue.peek();\n }", "public process get_first() {\n\t\treturn queue.getFirst();\n\t}", "public int getFront() {\n if(size == 0) return -1;\n \n return head.next.val;\n \n}", "public int top() {\n return queue.peekLast();\n }", "@Override\n\tpublic E getFront() {\n\t\treturn data[front];\n\t}", "public String top() {\n return queue.size() == 0 ? null : queue.get(0);\n }", "public int top() {\n return queue.getLast();\n }", "public Object peek() throws QueueEmptyException {\n\n\t\tif (isEmpty()) {\n\t\t\tthrow new QueueEmptyException(\"Usage: using peek() on empty queue\");\n\t\t} else {\n\t\t\tNode N = head;\n\t\t\treturn N.item;\n\n\t\t}\n\n\t}", "public E peek() {\n\t\tif (isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\treturn apq.get(1);\n\t}", "public int top() {\n int size = q.size();\n for(int i = 1; i<size;i++){\n q.offer(q.poll());\n }\n int value = q.peek();\n q.offer(q.poll());\n \n return value;\n }", "public DVDPackage front() {\n\t\treturn queue.peek();\n\t}", "public Item peek(){\n if(isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\n return first.item;\n }", "public O popFront()\r\n {\r\n if (!isEmpty())\r\n {\r\n VectorItem<O> l = first;\r\n first = first.getNext();\r\n \r\n count--;\r\n if (isEmpty()) last = null;\r\n else first.setPrevious(null);\r\n \r\n return l.getObject();\r\n } else\r\n return null;\r\n }", "private E element() {\n if (startPos >= queue.length || queue[startPos] == null) throw new NoSuchElementException();\n return (E) queue[startPos];\n }", "public WalkIn peek() {\n if(isEmpty()) System.err.println(\"The queue is empty! Nobody is next!\");\n \n return first.getData();\n }", "public T peek() {\n if (isEmpty()) {\n throw new RuntimeException(\"Ring buffer underflow\");\n }\n return rb[first];\n // Return the first item. None of your instance variables should change.\n }", "public int peek() {\r\n if (this.stack.isEmpty()) {\r\n throw new RuntimeException(\"队列中元素为空\");\r\n }\r\n return this.stack.peek();\r\n }", "public int Front() {\n if(isEmpty()) return -1;\n return l.get(head);\n }", "public T minValue(){\r\n \tif(size > 0) {\r\n \t\treturn stack1.peek();\r\n \t}else {\r\n \t\treturn null;\r\n \t}\r\n }", "@Override\n public E getFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n return dequeue[head];\n }", "public int front() {\n return data[first];\n }", "public int top() {\n return queue1.peek();\n }", "@Override\r\n\tpublic T dequeue() {\r\n\t\tT element;\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new AssertionError(\"Queue is empty.\");\r\n\t\telement = arr[front].getData();\r\n\t\tif (front == rear) {\r\n\t\t\tfront = rear = -1;\r\n\t\t} else {\r\n\t\t\tfront++;\r\n\t\t}\r\n\t\treturn element;\r\n\t}", "public T peek() {\n if (this.size <= 0)\n return null;\n return (T) pq[0];\n }", "public T poll() {\n if (size == 0) {\n return null;\n }\n\n // set returned value to queue[0]\n T value = (T) array[0];\n\n // decrease size - we are removing element\n size--;\n\n // move queue 1 place left\n System.arraycopy(array, 1, array, 0, size);\n\n // clear last element\n array[size] = null;\n\n return value;\n }", "public String front()\n {\n\treturn head.value;\n }", "public E peek() {\n if(size == 0)\n throw new NoSuchElementException();\n return head.val;\n }", "public synchronized Object get() {\n try {\n Object obj = queue.take().getElement();\n\n // set next offset\n delayOffset = System.currentTimeMillis();\n\n return obj;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "@Override\r\n\tpublic E peek() {\r\n\t\tif (isEmpty())\r\n\t\t\treturn null;\r\n\t\treturn stack[t];\r\n\t}", "public int Front() {\n if (isEmpty())\n return -1;\n return buf[b];\n }", "public E dequeue() {\n if (size == 0){\n return null;\n }\n\n\n E result = (E) queue[0];\n queue[0] = null;\n --size;\n\n if (size != 0){\n shift();\n }\n return result;\n }", "public int popFront() {\n if(head == null) {\n return Integer.MIN_VALUE;\n }\n\n Node node = head;\n head = node.next;\n\n size--;\n\n return node.val;\n }", "public Object peek()\r\n {\n assert !this.isEmpty();\r\n return this.top.getItem();\r\n }", "public int peekFront();", "public Object getFront() throws Exception {\n\t\tif(data[front]!=null)\n\t\t\n\t\t return data[front];\n\t\treturn null;\n\t}", "public E peek(){\n return front!=rear?(E) data[(int)((front) & (max_size - 1))]:null;\n }", "public T peek() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//returns the top element.\n\t\treturn elements.get(elements.size()-1);\n\t}", "public E peek() \r\n {\r\n return list.get(getSize() - 1);\r\n }", "public T first() {\n \t\n \tT firstData = (T) this.front.data;\n \t\n \treturn firstData;\n \t\n }", "public int top() {\n if(!q1.isEmpty())return q1.peek();\n else return -1;\n }", "public Object dequeue()\n {\n return queue.removeFirst();\n }", "public Object front() {\n ListNode p = this.l.start;\n while(p.next!=null)\n {\n p = p.next;\n }\n\t\treturn (Object) p.item;\n\t}", "public T peek() {\n\t if (size==0)\n\t return null;\n\t else return (T) pq[0];\n }", "@Override\n public E poll() {\n E tmp = (E)queue[0];\n System.arraycopy(queue, 1, queue, 0, size - 1);\n size--;\n return tmp;\n }", "public int Front() {\n if (count == 0) {\n return -1;\n }\n return array[head];\n }", "public int top() {\n return q.peek();\n }", "@Override\n\tpublic T peek() {\n\t\treturn last.getValue();\n\t}", "public E top()\n {\n E topVal = stack.peekFirst();\n return topVal;\n }", "public int dequeueFront();", "public T peek() {\n\t\tif (this.l.getHead() != null)\n\t\t\treturn this.l.getHead().getData();\n\t\telse {\n\t\t\tSystem.out.println(\"No element in stack\");\n\t\t\treturn null;\n\t\t}\n\t}", "public E dequeue(){\n if (isEmpty()) return null;\n E answer = arrayQueue[front];\n arrayQueue[front] = null;\n front = (front +1) % arrayQueue.length;\n size--;\n return answer;\n }", "public E peekFront();", "@Override\r\n public CustomProcess peekBest() {\r\n if (data[0] == null || isEmpty()) {\r\n throw new NoSuchElementException(\"queue is empty\");\r\n }\r\n return data[0];\r\n }", "public E dequeue() {\n if (isEmpty()) return null; //nothing to remove.\n E item = first.item;\n first = first.next; //will become null if the queue had only one item.\n n--;\n if (isEmpty()) last = null; // special case as the queue is now empty. \n return item;\n }", "public T peek() {\n\t\treturn top.value;\n\t}", "public int pop()\n\t{\n\t\tif (isEmpty() == true)\n\t\t{\n\t\t\tthrow new NullPointerException(\"Queue is empty!\");\n\t\t}\n\t\tif (head == tail)\n\t\t{\n\t\t\ttail = null;\n\t\t}\n\t\tint value = head.value;\n\t\thead = head.next;\n\t\treturn value;\n\t}" ]
[ "0.8195384", "0.8072298", "0.7942506", "0.7940091", "0.78985083", "0.7799661", "0.773685", "0.7678359", "0.76763016", "0.76524496", "0.762616", "0.76074743", "0.757925", "0.7574413", "0.7571812", "0.7517954", "0.7497535", "0.7481589", "0.74613094", "0.74545383", "0.7446222", "0.74419457", "0.742973", "0.7411741", "0.73526406", "0.73417383", "0.7323883", "0.7306594", "0.72614837", "0.7256688", "0.7256688", "0.7236068", "0.72359276", "0.72349787", "0.72349787", "0.7209654", "0.7204128", "0.7203566", "0.71917564", "0.71821976", "0.7171317", "0.7158133", "0.7087039", "0.7075717", "0.7058983", "0.7058557", "0.70575583", "0.7043763", "0.7038516", "0.7029574", "0.7021248", "0.70125973", "0.69961125", "0.69837695", "0.69782346", "0.69602907", "0.6954952", "0.69439805", "0.6921283", "0.6919733", "0.6918853", "0.6917008", "0.69164646", "0.69087255", "0.6906629", "0.6896506", "0.6880648", "0.68620104", "0.6827918", "0.6823887", "0.68134713", "0.68104845", "0.68080133", "0.6791785", "0.6778631", "0.6766107", "0.67649317", "0.67641544", "0.6761459", "0.67568034", "0.6755496", "0.6754601", "0.67457813", "0.67380095", "0.6737914", "0.6734686", "0.67284405", "0.6712744", "0.67081606", "0.6705364", "0.670368", "0.6701436", "0.67005366", "0.6697054", "0.6694048", "0.6691174", "0.66901326", "0.66797614", "0.66759604", "0.66753185", "0.66667193" ]
0.0
-1
Return a boolean value that indicates whether the queue is empty. Return true if empty and false if not empty.
public boolean isEmpty();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean is_empty() {\n\t\tif (queue.size() <= 0) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "boolean isEmpty() {\n return queue.isEmpty();\n }", "public boolean isEmpty() {\n return this.queue.size() == 0;\n }", "public boolean isEmpty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n\t\treturn queue.isEmpty();\n\t}", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\r\n return this.queueMain.isEmpty();\r\n }", "public boolean isEmpty() {\n\t\treturn queue.isEmpty();\n\t}", "public boolean isEmpty() {\n\t\treturn queue.isEmpty();\n\t}", "public boolean isEmpty() {\n return queue.isEmpty();\n }", "public boolean isEmpty()\n {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean isEmpty(){\n\t\tif(queue.isEmpty()){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isEmpty() \n {\n\treturn queue.size() == 0;\n }", "public static boolean isEmpty() {\n System.out.println();\t \n if(queue.isEmpty()) {\t \n System.out.println(\"The queue is currently empty and has no elements.\");\t \t \t \n }\n else {\n System.out.println(\"The queue is currently not empty.\");\t \t\t \n }\n return queue.isEmpty();\n }", "public boolean isEmpty() {\r\n boolean z = false;\r\n if (!isUnconfinedQueueEmpty()) {\r\n return false;\r\n }\r\n DelayedTaskQueue delayedTaskQueue = (DelayedTaskQueue) this._delayed;\r\n if (delayedTaskQueue != null && !delayedTaskQueue.isEmpty()) {\r\n return false;\r\n }\r\n Object obj = this._queue;\r\n if (obj != null) {\r\n if (obj instanceof LockFreeTaskQueueCore) {\r\n z = ((LockFreeTaskQueueCore) obj).isEmpty();\r\n }\r\n return z;\r\n }\r\n z = true;\r\n return z;\r\n }", "public boolean isEmpty() {\n return holdingQueue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty() && forReverse.isEmpty();\n }", "public boolean empty() {\n return normalQueue.isEmpty() && reverseQueue.isEmpty();\n }", "@Override\n public boolean isEmpty() {\n return queue.isEmpty();\n }", "public boolean isEmpty()\r\n\t{\n\t\tif(backIndex<0)\r\n\t\t{\r\n\t\t\tbackIndex=-1;\r\n\t\t\tSystem.out.println(\"Queue is Empty\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean empty() {\r\n return queue1.size() == 0;\r\n }", "public boolean empty() {\r\n return queue1.size() == 0;\r\n }", "public boolean isMessageQueueEmpty() {\r\n\t\treturn this.messages.size() == 0;\r\n\t}", "public boolean queueEmpty() {\r\n\t\tif (vehiclesInQueue.size() == 0) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean empty() {\n return queueA.isEmpty() && queueB.isEmpty();\n }", "public boolean empty() {\n return queue1.isEmpty();\n }", "public boolean isFull(){\n return size == arrayQueue.length;\n }", "public static boolean isEmpty() {\n\t\treturn resultQueue.isEmpty();\n\t}", "public boolean isEmpty()\r\n {\r\n if(measurementQueue==null) return true;\r\n \r\n return measurementQueue.isEmpty();\r\n }", "public boolean isEmpty() {\n return (head == tail) && (queue[head] == null);\n }", "public boolean isEmpty() {\n return (fifoEmpty.getBoolean());\n }", "public boolean isEmpty() {\n return qSize == 0;\n }", "public boolean empty() {\n return q.isEmpty();\n }", "public boolean isQueueEmpty(Queue objQueue){\r\n\t\treturn objQueue.getRare()==-1;\r\n\t}", "public boolean isFull() {\n int nexttail = (tail + 1 == queue.length) ? 0 : tail + 1;\n return (nexttail == head) && (queue[tail] != null);\n }", "public boolean empty() {\n return q.isEmpty();\n }", "@Override\r\n\tpublic boolean isFull() {\r\n\r\n\t\treturn data.size() >= maxQueue;\r\n\t}", "public boolean isEmpty() { return (dequeSize == 0); }", "boolean isEmpty() {\n\t\t\n\t\t// array is empty if no elements can be polled from it\n\t\t// \"canPoll\" flag shows if any elements can be polled from queue\n\t\t// NOT \"canPoll\" means - empty\n\t\t\n\t\treturn !canPoll;\n\t}", "public boolean empty() {\n if (queue1.isEmpty() && queue2.isEmpty()){\n return true;\n }\n return false;\n }", "public boolean empty() {\n /**\n * 当两个栈中都没有元素时,说明队列中也没有元素\n */\n return stack.isEmpty() && otherStack.isEmpty();\n }", "public boolean queueFull() {\r\n\t\tif (vehiclesInQueue.size() > maxQueueSize) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isEmpty(){\n\t\treturn ( startQueue.isEmpty() && finishQueue.isEmpty() && completedRuns.isEmpty() );\n\t}", "public boolean empty() {\n return size <= 0;\n }", "public boolean isFull()\n\t{\n\t return (front==0 && rear==queueArray.length-1 || (front==rear+1));\n\t}", "public boolean isEmpty() {\n\t\tboolean empty = true;\n\n\t\tfor(LinkedList<Passenger> queue : queues) { // loop through each queue to see if its empty.\n\t\t\tif(!queue.isEmpty()){\n\t\t\t\tempty = false;\n\t\t\t}\n \t}\n\t\treturn empty;\n }", "public boolean empty() {\n return size == 0;\n }", "public boolean isQueueFull(Queue objQueue){\r\n\t\treturn objQueue.getRare()==objQueue.getArrOueue().length;\r\n\t}", "public boolean empty() {\n\t\treturn (size() <= 0);\n\t}", "public boolean isEmpty() {\n\t\treturn heap.isEmpty();\n\t}", "public synchronized boolean isEmpty() {\r\n return size == 0;\r\n }", "public boolean empty()\r\n\t{\r\n\t\treturn currentSize == 0;\r\n\t}", "public boolean isEmpty() {\n\t\treturn heap.size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn heap.size() == 0;\n\t}", "public boolean empty() {\r\n return size == 0;\r\n }", "public boolean isEmpty()\n {\n return heapSize == 0;\n }", "public boolean empty() {\n return push.isEmpty();\n }", "public synchronized boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean empty() {\n\t if(q.size()==0) return true;\n\t return false;\n\t }", "public boolean empty() { \t \n\t\t return size <= 0;\t \n }", "public boolean isEmpty() {\r\n return (size == 0);\r\n }", "public boolean isEmpty() {\n\t\treturn currentSize == 0;\n\t}", "public boolean isEmpty() {\n return (size == 0);\n }", "public boolean isEmpty() { return size == 0; }", "public boolean isEmpty() { return size == 0; }", "public boolean isEmpty() { return size == 0; }", "public boolean isEmpty(){\n return myHeap.getLength() == 0;\n }", "public boolean isEmpty() {\n return (this.size == 0);\n }", "public boolean isEmpty() {\n return (size == 0);\n\n }", "public boolean isEmpty() {\n\t\treturn (size == 0);\n\t}", "public boolean isEmpty() {\n return this.size == 0;\n }", "public boolean isEmpty() {\n return this.size == 0;\n }", "public boolean isEmpty(){\r\n return currentSize == 0;\r\n }", "public boolean isEmpty() {\n\t\treturn this.size == 0;\n\t}", "public boolean empty() {\r\n\t\treturn empty;\r\n\t}", "public boolean isEmpty()\n {\n return this.size == 0;\n }", "public boolean isEmpty() {\n // Write your code here\n return queue1.isEmpty() && queue2.isEmpty();\n }", "public boolean isEmpty() {\r\n return empty;\r\n }", "public boolean isEmpty() {\n return size <= 0;\n }", "public final boolean isEmpty() {\r\n\t\treturn this.size == 0;\r\n\t}", "public Boolean isEmpty() {\n \n return ( size == 0 ) ? true : false;\n \n }", "public boolean empty() {\n return rearStack.isEmpty() && frontStack.isEmpty();\n }", "public boolean isEmpty() {\r\n return size == 0;\r\n }", "public boolean isEmpty() {\r\n return size == 0;\r\n }", "public boolean isEmpty() {\r\n return size == 0;\r\n }", "public boolean isHeapEmpty() {\n\t\treturn this.head == null;\n\t}", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }" ]
[ "0.8877802", "0.8622327", "0.86033183", "0.8601467", "0.85795563", "0.85634744", "0.85634744", "0.85634744", "0.85634744", "0.85634744", "0.85634744", "0.85634744", "0.85536236", "0.8553311", "0.8553311", "0.85418934", "0.85238564", "0.8489161", "0.8489161", "0.8489161", "0.8489161", "0.8489161", "0.8479098", "0.84150785", "0.8362924", "0.8324019", "0.83135426", "0.82898366", "0.8269171", "0.8217224", "0.8215474", "0.81925666", "0.81925666", "0.8134877", "0.81287795", "0.81121725", "0.80661047", "0.8053107", "0.80244863", "0.79927385", "0.7968484", "0.7948545", "0.7940952", "0.79224986", "0.7917835", "0.78987193", "0.78669333", "0.7830281", "0.7826578", "0.7805513", "0.77798", "0.77794814", "0.77644414", "0.7750693", "0.7745091", "0.77098054", "0.76977926", "0.7695705", "0.76906645", "0.76830745", "0.76726174", "0.76700765", "0.76661944", "0.76618356", "0.76618356", "0.76559746", "0.7653512", "0.7653496", "0.7638045", "0.76318127", "0.76238173", "0.7590505", "0.75724643", "0.75644517", "0.7549479", "0.7549479", "0.7549479", "0.753481", "0.7534496", "0.7534341", "0.75305915", "0.7529834", "0.7529834", "0.75246876", "0.75193083", "0.7518195", "0.75156415", "0.7515114", "0.7515107", "0.751093", "0.7509479", "0.7505789", "0.75008154", "0.7499104", "0.7499104", "0.74943674", "0.7489872", "0.7489544", "0.7489544", "0.7489544", "0.7489544" ]
0.0
-1
Return the number of elements currently in the queue.
public int size();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int size() {\n return queue.size();\n }", "public int size() {\n\t\treturn queue.size();\n\t}", "public int size(){\r\n\t\treturn queue.size();\r\n\t}", "public int getCount() {\n return queue.size();\n }", "public int size() {\n return this.queue.size();\n }", "public int size() {\n return _queue.size();\n }", "public int queueSize() {\n\t\treturn queue.size();\t\n\t}", "public int size() \r\n {\r\n if(measurementQueue==null) return 0;\r\n \r\n return measurementQueue.size();\r\n }", "public static int size() {\n System.out.println();\n System.out.println(\"The size of the queue is: \" + queue.size());\t \n return queue.size();\n }", "int getQueueSize();", "public int size() {\n processQueue();\n return weakCache.size();\n }", "public int size() {\n\t\t//Because we're the only consumer, we know nothing will be removed while\n\t\t//we're computing the size, so we know there are at least (rear - front)\n\t\t//elements already added.\n\t\treturn (int)(rear.get() - front.get());\n\t}", "public int inputQueueSize() {\n\t\tsynchronized (inputQueue) {\n\t\t\treturn inputQueue.size();\n\t\t}\n\t}", "public int size()\n\t{\n\t\tif(isEmpty())\n\t\t\treturn 0;\n\t\tif(isFull())\n\t\t\treturn queueArray.length;\n\t\t\n\t\tint i=front;\n\t\tint sz=0;\n\t\tif(front<=rear)\n\t\t\twhile(i<=rear)\n\t\t\t{\n\t\t\t\tsz++;\n\t\t\t\ti++;\n\t\t\t}\n\t\telse\n\t\t{\n\t\t\twhile(i<=queueArray.length-1)\n\t\t\t{\n\t\t\t\tsz++;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\ti=0;\n\t\t\twhile(i<=rear)\n\t\t\t{\n\t\t\t\tsz++;\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn sz;\n\t}", "int getNumEvents() {\n int cnt = eventCount;\n for (Entry entry : queue) {\n cnt += entry.eventCount;\n }\n return cnt;\n }", "public int getQueueSize() {\r\n\t\treturn this.queue.size();\r\n\t}", "public long getQueueSize(){\n return queue.size();\n }", "public int numVehiclesInQueue() {\r\n\t\treturn vehiclesInQueue.size();\r\n\t}", "public int getRunnableCount() {\n return queue.size();\n }", "public abstract int getQueueLength();", "public int size()\n\t{\n\t\treturn requestQueue != null ? requestQueue.size() : 0;\n\t}", "public int size() {\r\n\t\treturn q.size();\r\n\t}", "public int size() {\r\n if (NumItems > Integer.MAX_VALUE) {\r\n return Integer.MAX_VALUE;\r\n }\r\n return NumItems;\r\n }", "public int queueArrayLength(){\n\t\treturn queueArray.length;\n\t}", "public synchronized int size() {\n return count;\n }", "public int size() {\n \t\n \tint i = 0;\n \t\n \twhile(this.front != null) {\n \t\ti = i+1;\n \t\tthis.front = this.front.next; \n \t}\n \t\n \treturn i;\n \t\n }", "final int getQueueSize() {\n // suppress momentarily negative values\n return Math.max(0, sp - base);\n }", "public int size() {\n\t\t// DO NOT CHANGE THIS METHOD\n\t\treturn numElements;\n\t}", "public int size() {\n\t\treturn this.elements.size();\n\t}", "public int getQueueSize() {\n return queue.getQueueSize();\n }", "public int size() {\n\t\treturn elements.size();\n\t}", "Long getNumberOfElement();", "public int size() {\r\n\t\treturn elements.size();\r\n\t}", "public int size() {\n return numOfElements;\n }", "public int size() {\n\n return elements.size();\n }", "public int getNumQueues() {\n return queues.size();\n }", "public int size() \r\n\t{\r\n\t\treturn getCounter();\r\n\t}", "public int size(){\n\t\tListUtilities start = this.returnToStart();\n\t\tint count = 1;\n\t\twhile(start.nextNum != null){\n\t\t\tcount++;\n\t\t\tstart = start.nextNum;\n\t\t}\n\t\treturn count;\n\t}", "public final int size() {\n int size = 0;\n final Iterator iterator = this.iterator();\n while (iterator.hasNext()) {\n size++;\n iterator.next();\n }\n return size;\n }", "public int queueSize() {\n return executor.getQueue().size();\n }", "public int getSize() {\n\t\treturn numElements;\n\t}", "public int size() {\n return elements.size();\n }", "public int size() {\r\n int temp = 0;\r\n for (int i = 0; i < elem.length; i++) {\r\n if (elem[i] != null) {\r\n temp++;\r\n }\r\n }\r\n return temp;\r\n }", "public int size() {\r\n assert numElements >= 0 : numElements;\r\n assert numElements <= capacity : numElements;\r\n assert numElements >= elementsByFitness.size() : numElements;\r\n return numElements;\r\n }", "public final int size()\n {\n return m_count;\n }", "public int size() {\n\t\treturn elements;\n\t}", "public int size() {\n int found = 0;\n Node<T> it = head.get();\n // Do a raw count.\n for (int i = 0; i < capacity; i++) {\n if (!it.free.get()) {\n found += 1;\n }\n it = it.next;\n }\n return found;\n }", "public int size() {\r\n\t\treturn elements;\r\n\t}", "public static int size() \r\n\t{\r\n\t\treturn m_count;\r\n }", "public int size()\r\n {\r\n return count;\r\n }", "public int size() {\n\t\treturn count;\n\t}", "public int size() {\n\t\treturn count;\n\t}", "public int size() {\n\t\treturn count;\n\t}", "public int size()\n\t{\n\t\treturn m_elements.size();\n\t}", "public int size()\r\n\t{\r\n\t\treturn count;\r\n\t}", "@Override\n public int queueLength() {\n return this.job_queue.size();\n }", "@Override\n\tpublic int size() {\n\n\t\treturn this.numOfItems;\n\t}", "public int size() {\n return count;\n }", "public int size() {\n\t\tint numElements = 0;\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tif (list[i] != null) {\n\t\t\t\tnumElements++;\n\t\t\t}\n\t\t}\n\t\treturn numElements;\n\t}", "public int size() {\n return elements;\n }", "public int size()\n {\n return count;\n }", "public int getNumOfElements() {\n return numOfElements;\n }", "public int getNumElements()\n {\n return numElements;\n }", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public void incTotalOfQueueEntries() {\n totalOfQueueEntries++;\n }", "public final int size()\r\n/* 41: */ {\r\n/* 42:215 */ long after = lvConsumerIndex();\r\n/* 43: */ for (;;)\r\n/* 44: */ {\r\n/* 45:219 */ long before = after;\r\n/* 46:220 */ long currentProducerIndex = lvProducerIndex();\r\n/* 47:221 */ after = lvConsumerIndex();\r\n/* 48:222 */ if (before == after)\r\n/* 49: */ {\r\n/* 50:224 */ long size = currentProducerIndex - after >> 1;\r\n/* 51:225 */ break;\r\n/* 52: */ }\r\n/* 53: */ }\r\n/* 54: */ long size;\r\n/* 55:230 */ if (size > 2147483647L) {\r\n/* 56:232 */ return 2147483647;\r\n/* 57: */ }\r\n/* 58:236 */ return (int)size;\r\n/* 59: */ }", "public synchronized int getSize() {\r\n\t\treturn queueManagers.size();\r\n\t}", "public int numIncoming() {\r\n int result = incoming.size();\r\n return result;\r\n }", "public int size() {\n return qSize;\n }", "public int getDequeueCount() {\n\t\treturn m_DequeueCount;\n\t}", "@Override\n public int size() {\n // Returns the number of elements stored in the heap\n return nelems;\n }", "public int getNrOfElements() {\n return this.nrOfElements;\n }", "public int size() {\n\t\treturn heap.size();\n\t}", "public int size()\r\n\t{\r\n\t\treturn numItems;\r\n\r\n\t}", "public int getNumElements() {\n return numElements;\n }", "public int getNumElements() {\n return numElements;\n }", "public int size()\n {\n return N;\n }", "public int size() {\n\t\tint result = 0;\n\t\tfor (E val: this)\n\t\t\tresult++;\n\t\treturn result;\n\t}", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int getNumElements() {\n\t\treturn numElements;\n\t}", "public int size() {\n return numItems;\n }", "public int size() {\r\n return N;\r\n }", "public int size()\r\n\t{\r\n\t\treturn heap.size();\r\n\t}", "public int size() {\n\t\tint count = 0;\n\t\tListNode current = front;\n\t\twhile (current != null) {\n\t\t\tcurrent = current.next;\n\t\t\tcount++;\n\t\t}\n\t\treturn count;\n\t}", "public int getNumberOfElements();", "public int size()\n\t\t{\n\t\treturn N;\n\t\t}", "public int size() { return dequeSize; }", "public int size()\n { \t\n \t//initialize a counter to measure the size of the list\n int sizeVar = 0;\n //create local node variable to update in while loop\n LinkedListNode<T> localNode = getFirstNode();\n \n //update counter while there are still nodes\n while(localNode != null)\n {\n sizeVar += 1;\n localNode = localNode.getNext();\n }\n \n return sizeVar;\n }", "@Override\n\tpublic int size() {\n\t\treturn this.numberOfElements;\n\t}", "int size() {\n if (this.next.equals(this)) {\n return 0;\n }\n return this.next.size(this);\n }", "public int size() {\n // DO NOT MODIFY THIS METHOD!\n return size;\n }" ]
[ "0.8363061", "0.83550394", "0.8312843", "0.83027464", "0.828576", "0.8266784", "0.79548216", "0.78513473", "0.78471047", "0.7698604", "0.7695969", "0.7694315", "0.76852775", "0.7684611", "0.7605173", "0.75597", "0.7555043", "0.7550924", "0.7453111", "0.7425351", "0.74243677", "0.7416424", "0.72666514", "0.72418004", "0.7230721", "0.7206644", "0.7199739", "0.7198489", "0.7178178", "0.71674484", "0.71348286", "0.7131808", "0.71224356", "0.710011", "0.70930123", "0.7092319", "0.7087996", "0.7084904", "0.70772254", "0.7061176", "0.7060402", "0.70569503", "0.70562583", "0.70525116", "0.70521", "0.7051663", "0.7046314", "0.7044597", "0.7044095", "0.70253694", "0.7010485", "0.7010485", "0.7010485", "0.70094955", "0.70091474", "0.7000224", "0.6997246", "0.6992774", "0.698845", "0.6978139", "0.6976907", "0.6974407", "0.69679123", "0.6964067", "0.6964067", "0.6964067", "0.6964067", "0.6964067", "0.6949579", "0.69456923", "0.69308406", "0.692803", "0.6918851", "0.6918396", "0.6913163", "0.6911638", "0.69067305", "0.69054765", "0.690355", "0.690355", "0.69025123", "0.6897951", "0.68964005", "0.68964005", "0.68964005", "0.68964005", "0.68964005", "0.68964005", "0.68964005", "0.6894637", "0.6893682", "0.6887644", "0.68826175", "0.6879665", "0.68678325", "0.68677384", "0.6867729", "0.68672484", "0.6864032", "0.6859345", "0.68590283" ]
0.0
-1
returns the adjacency list for the vertex v
public LinkedList<Vertex> getList(Vertex v){ int i=0; //find v1 adjacency list while(!aLists.get(i).get(0).equals(v) && i < aLists.length()){ i++; } return aLists.get(i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Integer> adj(int v) {\n return adj[v];\n }", "List<V> getAdjacentVertexList(V v);", "@Override\r\n public List<Vertex> getNeighbors(Vertex v) {\r\n ArrayList<Vertex> neighborsList = new ArrayList<>();\r\n neighborsList = adjacencyList.get(v);\r\n Collections.sort(neighborsList, Comparator.comparing(Vertex::getLabel));\r\n return neighborsList; //getting the list of all adjacent vertices of vertex v\r\n }", "public Iterable<Edge> adj(int v) {\n return adj[v];\n }", "public Iterable<DirectedEdge> adj(int v) \n {\n return adj[v];\n }", "public Iterable<FlowEdge> adj(int v) {\n return adj[v];\n }", "List<V> getVertexList();", "public Iterable<Integer> adj(int v)\n { return adj[v]; }", "Iterable<Long> adjacent(long v) {\n List<Node> adjNodes = adj.get(v);\n List<Long> adjVertices = new ArrayList<>();\n for (int i = 1; i < adjNodes.size(); i++) {\n adjVertices.add(adjNodes.get(i).getID());\n }\n return adjVertices;\n }", "@Override\r\n public void addVertex(Vertex v) {\r\n adjacencyList.put(v, new ArrayList<>()); //putting v into key, a new LinkedList into value for later use\r\n }", "List<Edge<V>> getIncidentEdgeList(V v);", "public Collection<Vertex> adjacentVertices(Vertex v) {\n Vertex parameterVertex = new Vertex(v.getLabel());\n if(!myGraph.containsKey(parameterVertex)){\n throw new IllegalArgumentException(\"Vertex is not valid\");\n }\n\n //create a copy of the passed in vertex to restrict any reference\n //to interals of this class\n Collection<Vertex> adjVertices = new ArrayList<Vertex>();\n\n Iterator<Edge> edges = myGraph.get(parameterVertex).iterator();\n while(edges.hasNext()) {\n adjVertices.add(edges.next().getDestination());\n }\n return adjVertices;\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic Iterable<T> adj(T v) {\n\t\treturn (Iterable<T>) adj[v].value;\r\n\t}", "Digraph(int v) {\n this.V = v;\n adj = (List<Integer>[]) new ArrayList[V];\n for (int i = 0; i < V; i++) {\n adj[i] = new ArrayList<>();\n }\n }", "public Iterable<Vertex> adjacentTo(Vertex v) {\n if (!mAdjList.containsKey(v)) return EMPTY_SET;\n return mAdjList.get(v);\n }", "DFS(int ver){\n // assign the nu,mber of vertex\n v = ver;\n // assign the number of boolean at it's vertex\n visited = new boolean[ver];\n // assisgn the array with the vertex length\n pre = new int[ver];\n // asssigning the adjList length\n adjList = new ArrayList[ver];\n\n // now going throgh the loop and adding the newList to adjList each index , in pre making all -1, and false in all visited\n for (int x=0; x<ver; x+=1){\n adjList[x] = new ArrayList();\n\n // for the visited boolean value false\n visited[x] = false;\n\n // pre \n pre[x]=-1;\n }\n }", "public LinkedList<Integer> getNeighbors(int v) {\n return adjList.get(v);\n }", "public Arestas primeiroListaAdj (int v) {\n this.pos[v] = -1; return this.proxAdj (v);\n }", "List<WeightedEdge<Vertex>> neighbors(Vertex v);", "public Iterable<K> neighbors(K v)\n {\n \tList<K> list=new ArrayList<K>();\n \tList<HashMap<K, Integer>> adj = adjLists.get(v);\n \tfor (HashMap<K,Integer> A:adj){\n \t\tfor (K vertex:A.keySet()){\n \t\t\tlist.add(vertex);\n \t\t}\n \t}\n\treturn new ArrayList<K>(list);\n }", "public int indegree(int v) {\r\n validateVertex(v);\r\n return indegree[v];\r\n }", "private List<Vertex> prepareGraphAdjacencyList() {\n\n\t\tList<Vertex> graph = new ArrayList<Vertex>();\n\t\tVertex vertexA = new Vertex(\"A\");\n\t\tVertex vertexB = new Vertex(\"B\");\n\t\tVertex vertexC = new Vertex(\"C\");\n\t\tVertex vertexD = new Vertex(\"D\");\n\t\tVertex vertexE = new Vertex(\"E\");\n\t\tVertex vertexF = new Vertex(\"F\");\n\t\tVertex vertexG = new Vertex(\"G\");\n\n\t\tList<Edge> edges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 2));\n\t\tedges.add(new Edge(vertexD, 6));\n\t\tedges.add(new Edge(vertexF, 5));\n\t\tvertexA.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 2));\n\t\tedges.add(new Edge(vertexC, 7));\n\t\tvertexB.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 7));\n\t\tedges.add(new Edge(vertexD, 9));\n\t\tedges.add(new Edge(vertexF, 1));\n\t\tvertexC.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 6));\n\t\tedges.add(new Edge(vertexC, 9));\n\t\tedges.add(new Edge(vertexE, 4));\n\t\tedges.add(new Edge(vertexG, 8));\n\t\tvertexD.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 4));\n\t\tedges.add(new Edge(vertexF, 3));\n\t\tvertexE.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 5));\n\t\tedges.add(new Edge(vertexC, 1));\n\t\tedges.add(new Edge(vertexE, 3));\n\t\tvertexF.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 8));\n\t\tvertexG.incidentEdges = edges;\n\n\t\tgraph.add(vertexA);\n\t\tgraph.add(vertexB);\n\t\tgraph.add(vertexC);\n\t\tgraph.add(vertexD);\n\t\tgraph.add(vertexE);\n\t\tgraph.add(vertexF);\n\t\tgraph.add(vertexG);\n\n\t\treturn graph;\n\t}", "Iterable<Long> adjacent(long v) {\n return nodes.get(v).adjs;\n }", "public EdgeListGraph(int V) {\n\t\t// TODO Auto-generated constructor stub\n\t\tthis.V = V;\n\t\tthis.edgeList = new ArrayList<>();\n\t}", "Graph(int v) {\n this.v = v;\n array = new ArrayList[v];\n\n // Add linkedList to array\n for (int i = 0; i < v; i++) {\n array[i] = new ArrayList<>();\n }\n }", "public ArrayList<V> getEdges(V vertex){\n return (ArrayList<V>) graph.get(vertex);\n }", "public Queue<Integer> adj(int v){\n return adj[v];\n }", "Iterable<Long> adjacent(long v) {\n return world.get(v).adj;\n }", "public int outdegree(int v) {\r\n validateVertex(v);\r\n return adj[v].size();\r\n }", "public int outdegree(int v) {\n return adj[v].size();\n }", "Graph(int v) {\n V = v;\n adj = new LinkedList[v];\n for (int i = 0; i < v; ++i)\n adj [i] = new LinkedList();\n }", "public AdjListVertex createVertex(Vertex v) {\n\t\t// check if present\n\t\tif (containsVertex(v)) return vertices.get(v.getIndex());\n\t\t\n\t\tAdjListVertex vThis = new AdjListVertex(v.getIndex());\n\t\tvertices.set(v.getIndex(), vThis);\n\t\t\n\t\t// recreate the edges to vertices present\n\t\tfor (Edge e : v.edges()) {\n\t\t\tif (containsVertex(e.getOppositeVertex(v))) {\n\t\t\t\tcreateEdge(e);\n\t\t\t}\n\t\t}\n\t\tllVertices.add(vThis);\n\t\t\n\t\tnotifyVertexCreated(v);\n\t\treturn vThis;\n\t}", "public WeightedGraph(List<K> v)\n\t{\n\t // make ourselves a private copy of the vertex set\n\t verts = new HashSet<K>(v);\n\n\t // set up empty adkacency lists for each vertex\n\t adjLists = new HashMap<K, List<HashMap<K, Integer>>>();\n\t for (K src : verts)\n\t\t{\n\t\t adjLists.put(src, new ArrayList<HashMap<K, Integer>>());\n\t\t}\n\t}", "public java.util.List<V> getVertices();", "static void addEdge(List<ArrayList<Integer>> adj, int u, int v) {\n\t\tif (!adj.get(u).contains(v)) {\n\t\t\tadj.get(u).add(v);\n\t\t}\n\t\tif (!adj.get(v).contains(u)) {\n\t\t\tadj.get(v).add(u);\n\t\t}\n\t}", "public List neighbors(int vertex) {\n// your code here\n LinkedList<Integer> result = new LinkedList<>();\n LinkedList<Edge> list = adjLists[vertex];\n for (Edge a : list) {\n result.add(a.to());\n }\n//List<Integer> list = new List<Integer>();\n return result;\n }", "public List<Integer> neighbors(int vertex) {\r\n \tArrayList<Integer> vertices = new ArrayList<Integer>();\r\n \tLinkedList<Edge> testList = myAdjLists[vertex];\r\n int counter = 0;\r\n while (counter < testList.size()) {\r\n \tvertices.add(testList.get(counter).myTo);\r\n \tcounter++;\r\n }\r\n return vertices;\r\n }", "public List neighbors(int vertex) {\n // your code here\n \tList toReturn = new ArrayList<Integer>();\n \tfor (Edge e : myAdjLists[vertex]) {\n \t\ttoReturn.add(e.to());\n \t}\n return toReturn;\n }", "public V addVertex(V v);", "ArrayList<Edge> getEdges(ArrayList<ArrayList<Vertex>> v) {\n ArrayList<Edge> all = new ArrayList<Edge>();\n for (ArrayList<Vertex> verts : v) {\n for (Vertex vt : verts) {\n for (Edge ed : vt.outEdges) {\n all.add(ed);\n }\n }\n }\n return all;\n }", "public Collection<V> getOtherVertices(V v);", "public EdgeWeightedDigraph(int V) \n {\n if (V < 0) throw new RuntimeException(\"Number of vertices must be nonnegative\");\n this.V = V;\n this.E = 0;\n adj = (ArrayList<DirectedEdge>[]) new ArrayList[V];\n for (int v = 0; v < V; v++)\n adj[v] = new ArrayList<DirectedEdge>();\n }", "List<Edge<V>> getEdgeList();", "public ArrayList< Vertex > adjacentVertices( ) {\n return adjacentVertices;\n }", "ArrayList<Edge> getAdjacencies();", "public ArrayList<ChessCoordinate> getAdjacencyList() {\n\t\tint dx, dy;\n\t\tArrayList<ChessCoordinate> adjacencyList = new ArrayList<ChessCoordinate>();\n\n\t\tfor (dx = -1; dx <= 1; dx++) {\n\t\t\tfor (dy = -1; dy <= 1; dy++) {\n\t\t\t\tif (dx == dy) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tadjacencyList.add(StandardCoordinate.make(x + dx, y + dy));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn adjacencyList;\n\t}", "@Override\r\n public List<Vertex> getVertices() {\r\n List<Vertex> verticesList = new LinkedList<>(adjacencyList.keySet()); //getting the key set of adjacencyList i.e, a list of all vertices\r\n Collections.sort(verticesList, Comparator.comparing(Vertex::getLabel));\r\n return verticesList;\r\n }", "public boolean connectsVertex(V v);", "public Set<V> getNeighbours(V vertex);", "public static int degree(Graph G, int v)\n {\n int degree = 0;\n for (int w : G.adj(v))\n degree++;\n return degree;\n }", "@Override\n public Set<T> getNeighbors(T v) {\n int index = getVInfoIndex(v);\n\n // check for an error and throw exception\n // if vertices not in graph\n if (index == -1) {\n throw new IllegalArgumentException(\"DiGraph getNeighbors(): vertex not in graph\");\n }\n HashSet<T> edgeSet = new HashSet<T>();\n VertexInfo<T> vtxInfo = vInfo.get(index);\n Iterator<Edge> iter = vtxInfo.edgeList.iterator();\n Edge e = null;\n\n while (iter.hasNext()) {\n e = iter.next();\n edgeSet.add(vInfo.get(e.dest).vertex);\n }\n\n return edgeSet;\n\n }", "public Rede(int v) {\r\n\t\tnumNos = v +1; \r\n\t\tadjList = new LinkedList[numNos];\r\n\r\n\r\n\t\t//Inicializaçao da lista de adjacencias para todos os nos\r\n\t\tfor (int i = 0; i < numNos ; i++) {\r\n\t\t\tadjList[i] = new LinkedList<>();\r\n\t\t}\r\n\r\n\t}", "public Iterable<K> neighbors(K v)\n {\n \n return adjMaps.get(v).keySet();\n }", "public ListGraph(int numV, boolean directed) {\r\n super(numV, directed);\r\n edges = new List[numV];\r\n for (int i = 0; i < numV; i++) {\r\n edges[i] = new LinkedList < Edge > ();\r\n }\r\n }", "@Override\r\n\tpublic List<Integer> getReachableVertices(GraphStructure graph,int vertex) {\r\n\t\tadjacencyList=graph.getAdjacencyList();\r\n\t\tpathList=new ArrayList<Integer>();\r\n\t\tisVisited=new boolean [graph.getNumberOfVertices()];\r\n\t\ttraverseRecursively(graph, vertex);\r\n\t\treturn pathList;\r\n\t}", "public void addVertex(Vertex v)\n {\n this.vertices.add(v);\n connections.put(v, new ArrayList<>());\n }", "void addEdge(int v, int w)\n {\n adj[v].add(w);\n }", "public V getVertex(int index);", "void addEdge(int v, int w) {\n adj [v].add(w);\n }", "void DFS(int v, boolean visited[]) {\n visited[v] = true;\n connected++;\n //LinkedList Iterator to Recursively traverse all adjacent nodes of v\n Iterator<Integer> itr = adj[v].listIterator();\n\n while(itr.hasNext()) {\n int x = itr.next();\n if(visited[x] == false)\n DFS(x,visited);\n }\n }", "public native VertexList append(VertexNode vertex);", "public Graph(int V) {\n if (V < 0) throw new RuntimeException(\"Number of vertices must be nonnegative\");\n this.V = V;\n this.E = 0;\n\n\n adj = (LinkedList<Edge>[])new LinkedList[V];\n for (int v = 0; v < V; v++) adj[v] = new LinkedList<Edge>();\n }", "void addEdge(int v,int w)\n {\n adj[v].add(w);\n }", "public abstract int[] getConnected(int vertexIndex);", "public void addEdge(int u, int v)\n {\n // Add v to u's list.\n adjList[u].add(v);\n }", "protected abstract List<Integer> getNeighbors(int vertex);", "public Set<Edge<V>> getEdges(V vertex);", "public Path dfs(Graph G, int v) {\r\n Path result = new Path();\r\n \tcount++;\r\n marked[v] = true;\r\n Iterator<Integer> it = G.getAdjList(v).iterator();\r\n while(it.hasNext()){\r\n \tint w = it.next();\r\n if (!marked[w]) {\r\n \t\t result.addPath(new Edge(v,w));\r\n result.append(dfs(G, w));\r\n \t}\r\n \t//System.out.print(v + \" \"+ w + \"\\n\");\r\n }\r\n return result;\r\n }", "public void reverseAdjList(Graph g, int V) {\n\t\tList<List<Integer>> newAdjList = new ArrayList<List<Integer>>();\n\t\tfor(int i = 0; i < V; i ++) {\n\t\t\tnewAdjList.add(i, new ArrayList<Integer>());\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < g.adjList.size(); i++) {\n\t\t\tfor(int j = 0; j < g.adjList.get(i).size(); j++) {\n\t\t\t\tif(g.adjList.get(i).get(j) != null) {\n\t\t\t\t\tnewAdjList.get(g.adjList.get(i).get(j)).add(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i < newAdjList.size(); i++) {\n\t\t\tSystem.out.print(i);\n\t\t\tfor(int j = 0; j < newAdjList.get(i).size(); j++) {\n\t\t\t\tSystem.out.print(\"--> \" + newAdjList.get(i).get(j));\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public Map<V,List<E>> adjacencyMap(){\n\t\tMap<V,List<E>> ret = new HashMap<V,List<E>>();\n\t\tfor (E e : edges){\n\t\t\tif (virtualEdges.contains(e))\n\t\t\t\tcontinue;\n\t\t\tList<E> list;\n\t\t\tif (!ret.containsKey(e.getOrigin())){\n\t\t\t\tlist = new ArrayList<E>();\n\t\t\t\tret.put(e.getOrigin(), list);\n\t\t\t}\n\t\t\telse\n\t\t\t\tlist = ret.get(e.getOrigin());\n\t\t\tlist.add(e);\n\t\t\t\n\t\t\tif (!ret.containsKey(e.getDestination())){\n\t\t\t\tlist = new ArrayList<E>();\n\t\t\t\tret.put(e.getDestination(), list);\n\t\t\t}\n\t\t\telse\n\t\t\t\tlist = ret.get(e.getDestination());\n\t\t\tlist.add(e);\n\t\t}\n\t\treturn ret;\n\t}", "boolean addVertex(V v);", "void addVertex(Vertex v, ArrayList<Vertex> neighbors, ArrayList<Double> weights) throws VertexNotInGraphException;", "Iterable<DirectedEdge> pathTo(int v)\n\t{\n\t\tStack<DirectedEdge> path=new Stack<>();\n\t\tfor(DirectedEdge e=edgeTo[v]; e!=null; e=edgeTo[e.from()])\n\t\t{\n\t\t\tpath.push(e);\n\t\t}\n\t\treturn path;\n\t}", "void DFSUtil(int v, boolean visited[]) {\n\t\t\tvisited[v] = true;\n\t\t\tSystem.out.println(v +\" \");\n\t\t\t\n\t\t\t//Recur all the vertices adjacents to this vertex\n\t\t\tIterator<Integer> i = adj[v].listIterator();\n\t\t\twhile(i.hasNext()) {\n\t\t\t\tint node = i.next();\n\t\t\t\tif(!visited[node]) {\n\t\t\t\t\tDFSUtil(node, visited);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public Set<Integer> getNeighbors(int v) {\n \tif (v > (n-1)) {\n \tthrow new IllegalArgumentException();\n }\n \t\n \treturn this.edges.get(v).keySet();\n }", "Iterable<Long> vertices() {\n //YOUR CODE HERE, this currently returns only an empty list.\n ArrayList<Long> verticesIter = new ArrayList<>();\n verticesIter.addAll(adj.keySet());\n return verticesIter;\n }", "public void addEdge(int v, int w)\n { \n adj[v].add(w);\n adj[w].add(v);\n }", "void addEdge(int v, int w) {\n\t\tadj[v].add(w);\n\t}", "void addEdge(int v, int w) {\n\t\tadj[v].add(w);\n\t}", "AdjacencyGraph(){\r\n vertices = new HashMap<>();\r\n }", "public DoublyLinkedList getAdjacencyList()\n \t{\n\t return adjacencyList ;\n \t}", "@SuppressWarnings(\"unchecked\")\n private void initAdjList()\n {\n adjList = new ArrayList[v];\n\n for(int i = 0; i < v; i++)\n {\n adjList[i] = new ArrayList<>();\n }\n }", "public Iterable<DirectedEdge> pathTo(int v){\n\t\tvalidateVertex(v);\n\t\tif(!hasPathTo(v)) return null;\n\n\t\tLinkedStack<DirectedEdge> stack=new LinkedStack<>();\n\t\twhile(edgeTo[v]!=null){\n\t\t\tstack.push(edgeTo[v]);\n\t\t\tv=edgeTo[v].from();\n\t\t}\n\t\treturn stack;\n\t}", "public void findPath(Vertex v, Graph g)\n {\n \tQueue<Vertex> q = new LinkedList<Vertex>();\n \tSet<String> visited= new HashSet<String>();\n \tSet<String> edges= new TreeSet<String>();\n \t\n \t \tq.add(v);\n \t \tvisited.add(v.name);\n \t \t\n \t \twhile(!q.isEmpty()){\n \t \t\tVertex vertex = q.poll();\n \t \t\t \n \t for(Edge adjEdge: vertex.adjEdge.values()){\n \t\t if(!visited.contains(adjEdge.adjVertex.name) && !adjEdge.adjVertex.isDown && !adjEdge.isDown){\n \t\t\t q.offer(adjEdge.adjVertex);\n \t\t\t visited.add(adjEdge.adjVertex.name);\n \t\t\t \n \t\t\t edges.add(adjEdge.adjVertex.name);\n \t\t\t \n \t\t }\n \t }\n \t \n \t }\n \t \tfor(String str: edges){\n \t\t System.out.print('\\t');\n \t\t System.out.println(str);\n \t }\n \t \t\n }", "public int getvertex() {\n\t\treturn this.v;\n\t}", "void addEdge(int v,int w)\n {\n adj[v].add(w);\n adj[w].add(v);\n }", "@Override\r\n public Iterable<V> vertices() {\r\n LinkedList<V> list = new LinkedList<>();\r\n for(V v : map.keySet())\r\n list.add(v);\r\n return list;\r\n }", "public void addEdge(int u, int v, int weight) {\n\t\t\tif (adjacencyMatrix[u][v] == 0) { // new edge\n\t\t\t\tadjacencyMatrix[u][v] = weight;\n\n\t\t\t\tif (adjacencyList.get(u) == null) {\n\t\t\t\t\tList<Integer> l = new LinkedList<>();\n\t\t\t\t\tl.add(v);\n\t\t\t\t\tadjacencyList.put(u, l);\n\t\t\t\t} else {\n\t\t\t\t\tList<Integer> l = adjacencyList.get(u);\n\t\t\t\t\tl.add(v);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void addVertex(T v) {\n map.put(v, new LinkedList<>());\n }", "@Override\r\n\tpublic ArrayList<E> getAdjacent(E key) {\r\n\t\tArrayList<E> adj = new ArrayList<>();\r\n\t\tif(containsVertex(key)) {\r\n\t\t\tfor(Edge<E> ale : adjacencyLists.get(key)) {\r\n\t\t\t\tadj.add(ale.getDst());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn adj;\r\n\t}", "public Set<V> findCyclesContainingVertex(V v)\n {\n Set<V> set = new LinkedHashSet<>();\n execute(set, v);\n\n return set;\n }", "public ArrayList<Edge> getAdjacencies(){\r\n return adjacencies;\r\n }", "public Set<Pair<V,V>> neighbourEdgesOf(V vertex);", "public int getDegree(V vertex);", "void DFSUtil(int v, boolean visited[]) {\n // Mark the current node as visited and print it\n visited [v] = true;\n System.out.print(v + \" \");\n\n // Recur for all the vertices adjacent to this vertex\n Iterator<Integer> i = adj [v].listIterator();\n while (i.hasNext()) {\n int n = i.next();\n if (!visited [n])\n DFSUtil(n, visited);\n }\n }", "public void addEdge(int v, int w){\n\t\tadj[v].add(w);\t\t\t\t\t\t\n\t}", "public Graph(int V) {\r\n \t \t\r\n if (V < 0) throw new IllegalArgumentException(\"Number of vertices in a Digraph must be nonnegative\");\r\n this.V = V;\r\n this.E = 0;\r\n this.indegree = new int[V];\r\n adj = (Bag<Edge>[]) new Bag[V];\r\n for (int v = 0; v < V; v++)\r\n adj[v] = new Bag<Edge>();\r\n }", "public void assignNeighbors(Vertex v) {\r\n\t\t\r\n\t\tif (v.y != 0) {\r\n\t\t\tv.neighbors.add(graph[v.x][v.y - 1]);\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif (v.y != (mazeSize - 1)) {\r\n\t\t\tv.neighbors.add(graph[v.x][v.y + 1]);\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif (v.x != 0) {\r\n\t\t\tv.neighbors.add(graph[v.x - 1][v.y]);\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif (v.x != mazeSize - 1) {\r\n\t\t\tv.neighbors.add(graph[v.x + 1][v.y]);\r\n\t\t}\r\n\t}", "public void addEdge(int v, int w) {\r\n adj[v].add(w);\r\n E++;\r\n }", "public static Graph<Integer,String> InducedSubgraph(Graph<Integer,String> g, int[] v){\r\n\t\t// takes a graph g and an array of integers for vertices\r\n\t\t// and returns a graph h which is the induced subgraph of g on the given vertices\r\n\t\t\r\n\t\t// Note: runtime on order of the size of the induced subgraph\r\n\t\t// IF induced subgraphs of g are obtained from removing 1 or 2 vertices\r\n\t\t// could be better to copy g to h and delete the unwanted vertices\r\n\t\t\r\n\t\tGraph<Integer,String> h = new SparseGraph<Integer,String>();\r\n\t\t\r\n\t\t// add the vertex set to h\r\n\r\n\t\tfor (int i=0; i<v.length; i++) {\r\n\t\t\th.addVertex(v[i]);\r\n\t\t\tSystem.out.print(\"added vertex \"+ v[i]+\"\\n\");\r\n\t\t}\r\n\r\n\t\t// test the edges in g amongst the given vertices, add to h when necessary\r\n\t\tfor (int i=0; i<v.length; i++){\r\n\t\t\tfor (int j=i+1; j<v.length; j++) {\r\n\t\t\t\t//System.out.print(\"testing edge \" + v[i] + v[j]+\"\\n\");\r\n\t\t\t\tif (g.isNeighbor(v[i],v[j]) == true) {\r\n\t\t\t\t\th.addEdge(\"edge:\" + v[i] + \"-\" + v[j], v[i],v[j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn h;\r\n\t}" ]
[ "0.79264206", "0.787169", "0.7590582", "0.757576", "0.7506157", "0.73275554", "0.7294886", "0.7285496", "0.72773653", "0.7269597", "0.71473414", "0.71335304", "0.7044881", "0.70167494", "0.6733354", "0.6672171", "0.66618145", "0.66331613", "0.6618232", "0.65543365", "0.6541817", "0.6504428", "0.6497627", "0.6482831", "0.6466508", "0.643477", "0.6416426", "0.6399668", "0.6375556", "0.6365699", "0.63643", "0.6332742", "0.63308775", "0.6329814", "0.63074064", "0.6288852", "0.6265886", "0.6255407", "0.6235646", "0.6210209", "0.62082356", "0.61911803", "0.61780685", "0.61763686", "0.61579686", "0.61536527", "0.6147562", "0.6145554", "0.61442816", "0.614272", "0.6132312", "0.6131484", "0.6110231", "0.60794574", "0.6077752", "0.60408044", "0.6029764", "0.6004843", "0.60046583", "0.59982485", "0.59975106", "0.5983044", "0.5980544", "0.59771943", "0.5961428", "0.5950172", "0.5946403", "0.5945121", "0.593606", "0.5932606", "0.59317106", "0.59261715", "0.5904978", "0.59025013", "0.5889597", "0.5880984", "0.5880542", "0.5870033", "0.5870033", "0.58678806", "0.5858078", "0.5841613", "0.58382785", "0.5833849", "0.5832167", "0.58320814", "0.58250475", "0.5820041", "0.5818466", "0.5806559", "0.5803338", "0.58008635", "0.5798585", "0.5796315", "0.5785176", "0.5766141", "0.57637584", "0.57615584", "0.5760453", "0.5759469" ]
0.69167554
14
Created by x on 2016/9/2.
public interface BalanceActivityView extends BaseIView { void moneybalance(BalanceBean balanceBean); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "private void m50366E() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo21877s() {\n }", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo12930a() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void mo55254a() {\n }", "public void mo21779D() {\n }", "public void mo6081a() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void init() {\n\n\t}", "public void mo12628c() {\n }", "public void mo97908d() {\n }", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public void mo21878t() {\n }", "public void mo3376r() {\n }", "static void feladat9() {\n\t}", "public void method_4270() {}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void init() {\n }", "private Rekenhulp()\n\t{\n\t}", "public void mo21825b() {\n }", "@Override\n public int describeContents() { return 0; }", "private void strin() {\n\n\t}", "public void m23075a() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "public void mo9848a() {\n }", "public void Tyre() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n public void memoria() {\n \n }", "Constructor() {\r\n\t\t \r\n\t }", "public static void listing5_14() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n void init() {\n }", "public void mo21785J() {\n }", "public void mo3749d() {\n }", "public void mo21793R() {\n }", "public void skystonePos4() {\n }", "@Override\n public int retroceder() {\n return 0;\n }", "private void init() {\n\n\n\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "static void feladat4() {\n\t}" ]
[ "0.61501", "0.60142493", "0.59929293", "0.59651726", "0.595892", "0.595892", "0.59292936", "0.59175056", "0.59141934", "0.5883701", "0.5832915", "0.5832092", "0.5824148", "0.58098453", "0.58068734", "0.5776985", "0.57727444", "0.575976", "0.5751278", "0.5743688", "0.5742279", "0.57414824", "0.57089394", "0.5689949", "0.5687063", "0.56667566", "0.56575346", "0.56334203", "0.56227815", "0.56186825", "0.56125665", "0.56125665", "0.5610178", "0.5610007", "0.5594713", "0.5593592", "0.559025", "0.559025", "0.559025", "0.559025", "0.559025", "0.559025", "0.559025", "0.5582796", "0.5582796", "0.5582796", "0.5582796", "0.5582796", "0.5575725", "0.5550074", "0.55428714", "0.5515179", "0.5507984", "0.5501403", "0.54993457", "0.54981756", "0.54876643", "0.5483929", "0.5477009", "0.5472671", "0.54692453", "0.5465189", "0.54555285", "0.5452327", "0.5452327", "0.5452327", "0.5451926", "0.5446219", "0.54422665", "0.5435177", "0.5434894", "0.54239595", "0.54193664", "0.5419277", "0.54183215", "0.54174995", "0.54149425", "0.54127896", "0.54127896", "0.54127896", "0.54064", "0.54043573", "0.54019445", "0.54019445", "0.5400712", "0.5398463", "0.5398119", "0.539702", "0.539702", "0.539702", "0.53902847", "0.53902847", "0.53885496", "0.5385124", "0.5384457", "0.5371672", "0.5361419", "0.53588724", "0.5358331", "0.5358157", "0.5356332" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { System.out.println(factorial(6)); System.out.println(fibbo(6)); }
{ "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 getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "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.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
/ access modifiers changed from: protected
public boolean onFieldChange(int i, Object obj, int i2) { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void leti() \n\t{\n\t}", "private TMCourse() {\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "protected FanisamBato(){\n\t}", "public abstract Object mo1771a();", "public abstract void m15813a();", "public void gored() {\n\t\t\n\t}", "@Override\n public void get() {}", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private Get() {}", "private Get() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "protected void init() {\n // to override and use this method\n }" ]
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.6406691", "0.6402136", "0.6400287", "0.63977665", "0.63784796", "0.6373787", "0.63716805", "0.63680965", "0.6353791", "0.63344383", "0.6327005", "0.6327005", "0.63259363", "0.63079315", "0.6279023", "0.6271251", "0.62518364", "0.62254924", "0.62218183", "0.6213994", "0.6204108", "0.6195944", "0.61826825", "0.617686", "0.6158371", "0.6138765", "0.61224854", "0.6119267", "0.6119013", "0.61006695", "0.60922325", "0.60922325", "0.6086324", "0.6083917", "0.607071", "0.6070383", "0.6067458", "0.60568124", "0.6047576", "0.6047091", "0.60342956", "0.6031699", "0.6026248", "0.6019563", "0.60169774", "0.6014913", "0.6011912", "0.59969044", "0.59951806", "0.5994921", "0.599172", "0.59913194", "0.5985337", "0.59844744", "0.59678656", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.59647757", "0.59647757", "0.59616375", "0.5956373", "0.5952514", "0.59497356", "0.59454703", "0.5941018", "0.5934147", "0.5933801", "0.59318185", "0.5931161", "0.5929297", "0.5926942", "0.5925829", "0.5924853", "0.5923296", "0.5922199", "0.59202504", "0.5918595" ]
0.0
-1
/ access modifiers changed from: protected / JADX WARNING: Removed duplicated region for block: B:77:0x00fb / JADX WARNING: Removed duplicated region for block: B:86:? A[RETURN, SYNTHETIC] / Code decompiled incorrectly, please refer to instructions dump.
public void executeBindings() { /* r28 = this; r1 = r28 monitor-enter(r28) long r2 = r1.mDirtyFlags // Catch:{ all -> 0x0132 } r4 = 0 r1.mDirtyFlags = r4 // Catch:{ all -> 0x0132 } monitor-exit(r28) // Catch:{ all -> 0x0132 } com.medscape.android.myinvites.specific.Invitation r0 = r1.mInvitation r6 = 0 r7 = 3 long r9 = r2 & r7 r12 = 4 r15 = 0 r16 = 0 int r17 = (r9 > r4 ? 1 : (r9 == r4 ? 0 : -1)) if (r17 == 0) goto L_0x00c3 if (r0 == 0) goto L_0x0031 java.lang.String r15 = r0.getDescription() boolean r6 = r0.isFeatured() java.lang.String r9 = r0.getTitle() java.lang.String r10 = r0.getCta() java.lang.String r0 = r0.getInfo() goto L_0x0035 L_0x0031: r0 = r15 r9 = r0 r10 = r9 r6 = 0 L_0x0035: if (r17 == 0) goto L_0x0048 if (r6 == 0) goto L_0x0040 r17 = 2048(0x800, double:1.0118E-320) long r2 = r2 | r17 r17 = 8192(0x2000, double:4.0474E-320) goto L_0x0046 L_0x0040: r17 = 1024(0x400, double:5.06E-321) long r2 = r2 | r17 r17 = 4096(0x1000, double:2.0237E-320) L_0x0046: long r2 = r2 | r17 L_0x0048: if (r15 == 0) goto L_0x004f boolean r17 = r15.isEmpty() goto L_0x0051 L_0x004f: r17 = 0 L_0x0051: long r18 = r2 & r7 int r20 = (r18 > r4 ? 1 : (r18 == r4 ? 0 : -1)) if (r20 == 0) goto L_0x0060 if (r17 == 0) goto L_0x005c r18 = 512(0x200, double:2.53E-321) goto L_0x005e L_0x005c: r18 = 256(0x100, double:1.265E-321) L_0x005e: long r2 = r2 | r18 L_0x0060: android.widget.TextView r11 = r1.textTitle android.content.res.Resources r11 = r11.getResources() if (r6 == 0) goto L_0x006c r14 = 2131165478(0x7f070126, float:1.7945174E38) goto L_0x006f L_0x006c: r14 = 2131165477(0x7f070125, float:1.7945172E38) L_0x006f: float r11 = r11.getDimension(r14) if (r6 == 0) goto L_0x0077 r6 = 0 goto L_0x0079 L_0x0077: r6 = 8 L_0x0079: if (r10 != 0) goto L_0x007d r14 = 1 goto L_0x007e L_0x007d: r14 = 0 L_0x007e: long r20 = r2 & r7 int r22 = (r20 > r4 ? 1 : (r20 == r4 ? 0 : -1)) if (r22 == 0) goto L_0x008c if (r14 == 0) goto L_0x008b r20 = 8 long r2 = r2 | r20 goto L_0x008c L_0x008b: long r2 = r2 | r12 L_0x008c: if (r9 == 0) goto L_0x0093 boolean r20 = r9.isEmpty() goto L_0x0095 L_0x0093: r20 = 0 L_0x0095: long r21 = r2 & r7 int r23 = (r21 > r4 ? 1 : (r21 == r4 ? 0 : -1)) if (r23 == 0) goto L_0x00a4 if (r20 == 0) goto L_0x00a0 r21 = 128(0x80, double:6.32E-322) goto L_0x00a2 L_0x00a0: r21 = 64 L_0x00a2: long r2 = r2 | r21 L_0x00a4: if (r17 == 0) goto L_0x00a9 r17 = 8 goto L_0x00ab L_0x00a9: r17 = 0 L_0x00ab: if (r20 == 0) goto L_0x00b0 r20 = 8 goto L_0x00b2 L_0x00b0: r20 = 0 L_0x00b2: r24 = r17 r25 = r20 r26 = r9 r9 = r0 r0 = r6 r6 = r11 r11 = r26 r27 = r15 r15 = r10 r10 = r27 goto L_0x00cc L_0x00c3: r9 = r15 r10 = r9 r11 = r10 r0 = 0 r14 = 0 r24 = 0 r25 = 0 L_0x00cc: long r12 = r12 & r2 int r17 = (r12 > r4 ? 1 : (r12 == r4 ? 0 : -1)) if (r17 == 0) goto L_0x00d8 if (r15 == 0) goto L_0x00d8 boolean r12 = r15.isEmpty() goto L_0x00d9 L_0x00d8: r12 = 0 L_0x00d9: long r20 = r2 & r7 int r13 = (r20 > r4 ? 1 : (r20 == r4 ? 0 : -1)) if (r13 == 0) goto L_0x00f5 if (r14 == 0) goto L_0x00e4 r18 = 1 goto L_0x00e6 L_0x00e4: r18 = r12 L_0x00e6: if (r13 == 0) goto L_0x00f0 if (r18 == 0) goto L_0x00ed r12 = 32 goto L_0x00ef L_0x00ed: r12 = 16 L_0x00ef: long r2 = r2 | r12 L_0x00f0: if (r18 == 0) goto L_0x00f5 r14 = 8 goto L_0x00f6 L_0x00f5: r14 = 0 L_0x00f6: long r2 = r2 & r7 int r7 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1)) if (r7 == 0) goto L_0x0131 android.view.View r2 = r1.lineFeatured r2.setVisibility(r0) android.widget.TextView r2 = r1.textCta androidx.databinding.adapters.TextViewBindingAdapter.setText(r2, r15) android.widget.TextView r2 = r1.textCta r2.setVisibility(r14) android.widget.TextView r2 = r1.textDescription com.medscape.android.myinvites.MyInvitationsAdapterKt.setTextToHtml(r2, r10) android.widget.TextView r2 = r1.textDescription r3 = r24 r2.setVisibility(r3) android.widget.TextView r2 = r1.textFeatured r2.setVisibility(r0) android.widget.TextView r0 = r1.textInfo com.medscape.android.myinvites.MyInvitationsAdapterKt.setTextToHtml(r0, r9) android.widget.TextView r0 = r1.textTitle androidx.databinding.adapters.ViewBindingAdapter.setPaddingTop(r0, r6) android.widget.TextView r0 = r1.textTitle com.medscape.android.myinvites.MyInvitationsAdapterKt.setTextToHtml(r0, r11) android.widget.TextView r0 = r1.textTitle r2 = r25 r0.setVisibility(r2) L_0x0131: return L_0x0132: r0 = move-exception monitor-exit(r28) // Catch:{ all -> 0x0132 } throw r0 */ throw new UnsupportedOperationException("Method not decompiled: com.medscape.android.databinding.MyInvitationsCardBindingImpl.executeBindings():void"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int c(Block parambec)\r\n/* 119: */ {\r\n/* 120:131 */ return 0;\r\n/* 121: */ }", "@Override\n public void func_104112_b() {\n \n }", "public boolean A_()\r\n/* 21: */ {\r\n/* 22:138 */ return true;\r\n/* 23: */ }", "void m1864a() {\r\n }", "public void mo23813b() {\n }", "void m5768b() throws C0841b;", "public void mo115190b() {\n }", "public int h(Block parambec)\r\n/* 29: */ {\r\n/* 30: 44 */ return F();\r\n/* 31: */ }", "private void m25427g() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19111m;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = r2.f19104f;\t Catch:{ Exception -> 0x000f }\n r0 = android.support.v4.content.C0396d.m1465a(r0);\t Catch:{ Exception -> 0x000f }\n r1 = r2.f19111m;\t Catch:{ Exception -> 0x000f }\n r0.m1468a(r1);\t Catch:{ Exception -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.w.g():void\");\n }", "void m5769c() throws C0841b;", "protected void method_2145() {\r\n // $FF: Couldn't be decompiled\r\n }", "void m5770d() throws C0841b;", "public final void mo1285b() {\n }", "public final void mo91715d() {\n }", "void m5771e() throws C0841b;", "protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }", "private void m50366E() {\n }", "public boolean c()\r\n/* 56: */ {\r\n/* 57: 77 */ return false;\r\n/* 58: */ }", "public final void mo51373a() {\n }", "private void method_7083() {\r\n // $FF: Couldn't be decompiled\r\n }", "@Override // X.AnonymousClass0PN\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public void A0D() {\n /*\n r5 = this;\n super.A0D()\n X.08d r0 = r5.A05\n X.0OQ r4 = r0.A04()\n X.0Rk r3 = r4.A00() // Catch:{ all -> 0x003d }\n X.0BK r2 = r4.A04 // Catch:{ all -> 0x0036 }\n java.lang.String r1 = \"DELETE FROM receipt_device\"\n java.lang.String r0 = \"CLEAR_TABLE_RECEIPT_DEVICE\"\n r2.A0C(r1, r0) // Catch:{ all -> 0x0036 }\n X.08m r1 = r5.A03 // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"receipt_device_migration_complete\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_index\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_retry\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n r3.A00() // Catch:{ all -> 0x0036 }\n r3.close()\n r4.close()\n java.lang.String r0 = \"ReceiptDeviceStore/ReceiptDeviceDatabaseMigration/resetMigration/done\"\n com.whatsapp.util.Log.i(r0)\n return\n L_0x0036:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x0038 }\n L_0x0038:\n r0 = move-exception\n r3.close() // Catch:{ all -> 0x003c }\n L_0x003c:\n throw r0\n L_0x003d:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x003f }\n L_0x003f:\n r0 = move-exception\n r4.close() // Catch:{ all -> 0x0043 }\n L_0x0043:\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: X.C43661yk.A0D():void\");\n }", "public final /* bridge */ /* synthetic */ void mo43569b() {\n super.mo43569b();\n }", "public void mo21779D() {\n }", "public boolean c()\r\n/* 36: */ {\r\n/* 37:51 */ return false;\r\n/* 38: */ }", "public void m23075a() {\n }", "public void method_2139() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_4270() {}", "public int c()\r\n/* 74: */ {\r\n/* 75:78 */ return this.c;\r\n/* 76: */ }", "public int g()\r\n/* 173: */ {\r\n/* 174:198 */ return 0;\r\n/* 175: */ }", "protected void method_2247() {\r\n // $FF: Couldn't be decompiled\r\n }", "public int a() {\r\n/* 63 */ return 4;\r\n/* */ }", "public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }", "public final void mo56977b() {\n /*\n r2 = this;\n com.ss.android.ugc.aweme.common.e r0 = r2.f67572c\n com.ss.android.ugc.aweme.feed.ui.masklayer2.a.i r0 = (com.p280ss.android.ugc.aweme.feed.p1238ui.masklayer2.p1239a.C28951i) r0\n if (r0 == 0) goto L_0x001a\n com.ss.android.ugc.aweme.common.a r1 = r2.f67571b\n com.ss.android.ugc.aweme.feed.ui.masklayer2.a.d r1 = (com.p280ss.android.ugc.aweme.feed.p1238ui.masklayer2.p1239a.C28944d) r1\n if (r1 == 0) goto L_0x0014\n java.lang.Object r1 = r1.getData()\n java.lang.String r1 = (java.lang.String) r1\n if (r1 != 0) goto L_0x0016\n L_0x0014:\n java.lang.String r1 = \"\"\n L_0x0016:\n r0.mo74240a(r1)\n return\n L_0x001a:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.feed.p1238ui.masklayer2.p1239a.C28946e.mo56977b():void\");\n }", "static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_1148() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2113() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2141() {\r\n // $FF: Couldn't be decompiled\r\n }", "public final /* bridge */ /* synthetic */ void mo43571c() {\n super.mo43571c();\n }", "public void mo21787L() {\n }", "public final void mo11687c() {\n }", "public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }", "public void a(IBlockAccess paramard, BlockPosition paramdt)\r\n/* 119: */ {\r\n/* 120:148 */ bdv localbdv = e(paramard, paramdt);\r\n/* 121:149 */ if (localbdv != null)\r\n/* 122: */ {\r\n/* 123:150 */ Block localbec = localbdv.b();\r\n/* 124:151 */ BlockType localatr = localbec.getType();\r\n/* 125:152 */ if ((localatr == this) || (localatr.getMaterial() == Material.air)) {\r\n/* 126:153 */ return;\r\n/* 127: */ }\r\n/* 128:156 */ float f = localbdv.a(0.0F);\r\n/* 129:157 */ if (localbdv.d()) {\r\n/* 130:158 */ f = 1.0F - f;\r\n/* 131: */ }\r\n/* 132:160 */ localatr.a(paramard, paramdt);\r\n/* 133:161 */ if ((localatr == BlockList.J) || (localatr == BlockList.F)) {\r\n/* 134:162 */ f = 0.0F;\r\n/* 135: */ }\r\n/* 136:164 */ EnumDirection localej = localbdv.e();\r\n/* 137:165 */ this.B = (localatr.z() - localej.g() * f);\r\n/* 138:166 */ this.C = (localatr.B() - localej.h() * f);\r\n/* 139:167 */ this.D = (localatr.D() - localej.i() * f);\r\n/* 140:168 */ this.E = (localatr.A() - localej.g() * f);\r\n/* 141:169 */ this.F = (localatr.C() - localej.h() * f);\r\n/* 142:170 */ this.G = (localatr.E() - localej.i() * f);\r\n/* 143: */ }\r\n/* 144: */ }", "public int g()\r\n/* 601: */ {\r\n/* 602:645 */ return 0;\r\n/* 603: */ }", "public int a()\r\n/* 64: */ {\r\n/* 65:70 */ return this.a;\r\n/* 66: */ }", "public void mo56167c() {\n }", "public void method_2046() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_7086() {\r\n // $FF: Couldn't be decompiled\r\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "public abstract void mo53562a(C18796a c18796a);", "public void mo9137b() {\n }", "static void method_2226() {\r\n // $FF: Couldn't be decompiled\r\n }", "public int p_()\r\n/* 463: */ {\r\n/* 464:477 */ return 64;\r\n/* 465: */ }", "static void method_28() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void mo3749d() {\n }", "public ItemStack func_70304_b(int par1)\n/* */ {\n/* 45 */ return null;\n/* */ }", "public void mo21825b() {\n }", "public void method_2197() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void mo21782G() {\n }", "void mo80455b();", "static void method_6338() {\r\n // $FF: Couldn't be decompiled\r\n }", "public abstract void mo70713b();", "void mo80457c();", "public /* bridge */ /* synthetic */ void mo55097d() {\n super.mo55097d();\n }", "void mo41086b();", "public int p_()\r\n/* 96: */ {\r\n/* 97:117 */ return 64;\r\n/* 98: */ }", "public void mo6944a() {\n }", "public void method_7081() {\r\n // $FF: Couldn't be decompiled\r\n }", "void mo72113b();", "public void mo21785J() {\n }", "void mo119582b();", "public void method_2250() {\r\n // $FF: Couldn't be decompiled\r\n }", "public abstract void mo27385c();", "protected void method_2045(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void mo115188a() {\n }", "public void mo9233aH() {\n }", "protected String codeBlockSource(Block block) {\n block.removeFirstOperation(); // aload_0\n block.removeFirstOperation(); // aload_1\n block.removeFirstOperation(); // iload_2\n block.removeFirstOperation(); // invokespecial <init>\n\n if (getTopBlock().getOperations().size() == 1 &&\n getTopBlock().getOperations().get(0) instanceof ReturnView) {\n return null;\n }\n\n return super.codeBlockSource(block);\n }", "public void mo38117a() {\n }", "public String b()\r\n/* 35: */ {\r\n/* 36:179 */ return a();\r\n/* 37: */ }", "public void mo21793R() {\n }", "public void mo2740a() {\n }", "public final /* bridge */ /* synthetic */ void mo43566a() {\n super.mo43566a();\n }", "@Override // X.AnonymousClass0l1\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final void A04(int r29) throws java.io.IOException {\n /*\n // Method dump skipped, instructions count: 801\n */\n throw new UnsupportedOperationException(\"Method not decompiled: X.AnonymousClass0T3.A04(int):void\");\n }", "public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }", "public void mo3287b() {\n }", "@Override // g.i.a.a\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public void a(android.view.View r18, android.content.Context r19, android.database.Cursor r20) {\n /*\n // Method dump skipped, instructions count: 441\n */\n throw new UnsupportedOperationException(\"Method not decompiled: g.b.g.t0.a(android.view.View, android.content.Context, android.database.Cursor):void\");\n }", "private final com.google.android.p306h.p307a.p308a.C5685v m26927b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 8: goto L_0x000e;\n case 18: goto L_0x0043;\n case 24: goto L_0x0054;\n case 32: goto L_0x005f;\n case 42: goto L_0x006a;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x0034 }\n switch(r2) {\n case 0: goto L_0x003c;\n case 1: goto L_0x003c;\n case 2: goto L_0x003c;\n case 3: goto L_0x003c;\n case 4: goto L_0x003c;\n case 5: goto L_0x003c;\n case 101: goto L_0x003c;\n case 102: goto L_0x003c;\n case 103: goto L_0x003c;\n case 104: goto L_0x003c;\n case 105: goto L_0x003c;\n case 106: goto L_0x003c;\n case 107: goto L_0x003c;\n case 108: goto L_0x003c;\n case 201: goto L_0x003c;\n case 202: goto L_0x003c;\n case 203: goto L_0x003c;\n case 204: goto L_0x003c;\n case 205: goto L_0x003c;\n case 206: goto L_0x003c;\n case 207: goto L_0x003c;\n case 208: goto L_0x003c;\n case 209: goto L_0x003c;\n case 301: goto L_0x003c;\n case 302: goto L_0x003c;\n case 303: goto L_0x003c;\n case 304: goto L_0x003c;\n case 305: goto L_0x003c;\n case 306: goto L_0x003c;\n case 307: goto L_0x003c;\n case 401: goto L_0x003c;\n case 402: goto L_0x003c;\n case 403: goto L_0x003c;\n case 404: goto L_0x003c;\n case 501: goto L_0x003c;\n case 502: goto L_0x003c;\n case 503: goto L_0x003c;\n case 504: goto L_0x003c;\n case 601: goto L_0x003c;\n case 602: goto L_0x003c;\n case 603: goto L_0x003c;\n case 604: goto L_0x003c;\n case 605: goto L_0x003c;\n case 606: goto L_0x003c;\n case 607: goto L_0x003c;\n case 608: goto L_0x003c;\n case 609: goto L_0x003c;\n case 610: goto L_0x003c;\n case 611: goto L_0x003c;\n case 612: goto L_0x003c;\n case 613: goto L_0x003c;\n case 614: goto L_0x003c;\n case 615: goto L_0x003c;\n case 616: goto L_0x003c;\n case 617: goto L_0x003c;\n case 618: goto L_0x003c;\n case 619: goto L_0x003c;\n case 620: goto L_0x003c;\n case 621: goto L_0x003c;\n case 622: goto L_0x003c;\n case 623: goto L_0x003c;\n case 624: goto L_0x003c;\n case 625: goto L_0x003c;\n case 626: goto L_0x003c;\n case 627: goto L_0x003c;\n case 628: goto L_0x003c;\n case 629: goto L_0x003c;\n case 630: goto L_0x003c;\n case 631: goto L_0x003c;\n case 632: goto L_0x003c;\n case 633: goto L_0x003c;\n case 634: goto L_0x003c;\n case 635: goto L_0x003c;\n case 636: goto L_0x003c;\n case 637: goto L_0x003c;\n case 638: goto L_0x003c;\n case 639: goto L_0x003c;\n case 640: goto L_0x003c;\n case 641: goto L_0x003c;\n case 701: goto L_0x003c;\n case 702: goto L_0x003c;\n case 703: goto L_0x003c;\n case 704: goto L_0x003c;\n case 705: goto L_0x003c;\n case 706: goto L_0x003c;\n case 707: goto L_0x003c;\n case 708: goto L_0x003c;\n case 709: goto L_0x003c;\n case 710: goto L_0x003c;\n case 711: goto L_0x003c;\n case 712: goto L_0x003c;\n case 713: goto L_0x003c;\n case 714: goto L_0x003c;\n case 715: goto L_0x003c;\n case 716: goto L_0x003c;\n case 717: goto L_0x003c;\n case 718: goto L_0x003c;\n case 719: goto L_0x003c;\n case 720: goto L_0x003c;\n case 721: goto L_0x003c;\n case 722: goto L_0x003c;\n case 801: goto L_0x003c;\n case 802: goto L_0x003c;\n case 803: goto L_0x003c;\n case 901: goto L_0x003c;\n case 902: goto L_0x003c;\n case 903: goto L_0x003c;\n case 904: goto L_0x003c;\n case 905: goto L_0x003c;\n case 906: goto L_0x003c;\n case 907: goto L_0x003c;\n case 908: goto L_0x003c;\n case 909: goto L_0x003c;\n case 910: goto L_0x003c;\n case 911: goto L_0x003c;\n case 912: goto L_0x003c;\n case 1001: goto L_0x003c;\n case 1002: goto L_0x003c;\n case 1003: goto L_0x003c;\n case 1004: goto L_0x003c;\n case 1005: goto L_0x003c;\n case 1006: goto L_0x003c;\n case 1101: goto L_0x003c;\n case 1102: goto L_0x003c;\n case 1201: goto L_0x003c;\n case 1301: goto L_0x003c;\n case 1302: goto L_0x003c;\n case 1303: goto L_0x003c;\n case 1304: goto L_0x003c;\n case 1305: goto L_0x003c;\n case 1306: goto L_0x003c;\n case 1307: goto L_0x003c;\n case 1308: goto L_0x003c;\n case 1309: goto L_0x003c;\n case 1310: goto L_0x003c;\n case 1311: goto L_0x003c;\n case 1312: goto L_0x003c;\n case 1313: goto L_0x003c;\n case 1314: goto L_0x003c;\n case 1315: goto L_0x003c;\n case 1316: goto L_0x003c;\n case 1317: goto L_0x003c;\n case 1318: goto L_0x003c;\n case 1319: goto L_0x003c;\n case 1320: goto L_0x003c;\n case 1321: goto L_0x003c;\n case 1322: goto L_0x003c;\n case 1323: goto L_0x003c;\n case 1324: goto L_0x003c;\n case 1325: goto L_0x003c;\n case 1326: goto L_0x003c;\n case 1327: goto L_0x003c;\n case 1328: goto L_0x003c;\n case 1329: goto L_0x003c;\n case 1330: goto L_0x003c;\n case 1331: goto L_0x003c;\n case 1332: goto L_0x003c;\n case 1333: goto L_0x003c;\n case 1334: goto L_0x003c;\n case 1335: goto L_0x003c;\n case 1336: goto L_0x003c;\n case 1337: goto L_0x003c;\n case 1338: goto L_0x003c;\n case 1339: goto L_0x003c;\n case 1340: goto L_0x003c;\n case 1341: goto L_0x003c;\n case 1342: goto L_0x003c;\n case 1343: goto L_0x003c;\n case 1344: goto L_0x003c;\n case 1345: goto L_0x003c;\n case 1346: goto L_0x003c;\n case 1347: goto L_0x003c;\n case 1401: goto L_0x003c;\n case 1402: goto L_0x003c;\n case 1403: goto L_0x003c;\n case 1404: goto L_0x003c;\n case 1405: goto L_0x003c;\n case 1406: goto L_0x003c;\n case 1407: goto L_0x003c;\n case 1408: goto L_0x003c;\n case 1409: goto L_0x003c;\n case 1410: goto L_0x003c;\n case 1411: goto L_0x003c;\n case 1412: goto L_0x003c;\n case 1413: goto L_0x003c;\n case 1414: goto L_0x003c;\n case 1415: goto L_0x003c;\n case 1416: goto L_0x003c;\n case 1417: goto L_0x003c;\n case 1418: goto L_0x003c;\n case 1419: goto L_0x003c;\n case 1420: goto L_0x003c;\n case 1421: goto L_0x003c;\n case 1422: goto L_0x003c;\n case 1423: goto L_0x003c;\n case 1424: goto L_0x003c;\n case 1425: goto L_0x003c;\n case 1426: goto L_0x003c;\n case 1427: goto L_0x003c;\n case 1601: goto L_0x003c;\n case 1602: goto L_0x003c;\n case 1603: goto L_0x003c;\n case 1604: goto L_0x003c;\n case 1605: goto L_0x003c;\n case 1606: goto L_0x003c;\n case 1607: goto L_0x003c;\n case 1608: goto L_0x003c;\n case 1609: goto L_0x003c;\n case 1610: goto L_0x003c;\n case 1611: goto L_0x003c;\n case 1612: goto L_0x003c;\n case 1613: goto L_0x003c;\n case 1614: goto L_0x003c;\n case 1615: goto L_0x003c;\n case 1616: goto L_0x003c;\n case 1617: goto L_0x003c;\n case 1618: goto L_0x003c;\n case 1619: goto L_0x003c;\n case 1620: goto L_0x003c;\n case 1621: goto L_0x003c;\n case 1622: goto L_0x003c;\n case 1623: goto L_0x003c;\n case 1624: goto L_0x003c;\n case 1625: goto L_0x003c;\n case 1626: goto L_0x003c;\n case 1627: goto L_0x003c;\n case 1628: goto L_0x003c;\n case 1629: goto L_0x003c;\n case 1630: goto L_0x003c;\n case 1631: goto L_0x003c;\n case 1632: goto L_0x003c;\n case 1633: goto L_0x003c;\n case 1634: goto L_0x003c;\n case 1635: goto L_0x003c;\n case 1636: goto L_0x003c;\n case 1637: goto L_0x003c;\n case 1638: goto L_0x003c;\n case 1639: goto L_0x003c;\n case 1640: goto L_0x003c;\n case 1641: goto L_0x003c;\n case 1642: goto L_0x003c;\n case 1643: goto L_0x003c;\n case 1644: goto L_0x003c;\n case 1645: goto L_0x003c;\n case 1646: goto L_0x003c;\n case 1647: goto L_0x003c;\n case 1648: goto L_0x003c;\n case 1649: goto L_0x003c;\n case 1650: goto L_0x003c;\n case 1651: goto L_0x003c;\n case 1652: goto L_0x003c;\n case 1653: goto L_0x003c;\n case 1654: goto L_0x003c;\n case 1655: goto L_0x003c;\n case 1656: goto L_0x003c;\n case 1657: goto L_0x003c;\n case 1658: goto L_0x003c;\n case 1659: goto L_0x003c;\n case 1660: goto L_0x003c;\n case 1801: goto L_0x003c;\n case 1802: goto L_0x003c;\n case 1803: goto L_0x003c;\n case 1804: goto L_0x003c;\n case 1805: goto L_0x003c;\n case 1806: goto L_0x003c;\n case 1807: goto L_0x003c;\n case 1808: goto L_0x003c;\n case 1809: goto L_0x003c;\n case 1810: goto L_0x003c;\n case 1811: goto L_0x003c;\n case 1812: goto L_0x003c;\n case 1813: goto L_0x003c;\n case 1814: goto L_0x003c;\n case 1815: goto L_0x003c;\n case 1816: goto L_0x003c;\n case 1817: goto L_0x003c;\n case 1901: goto L_0x003c;\n case 1902: goto L_0x003c;\n case 1903: goto L_0x003c;\n case 1904: goto L_0x003c;\n case 1905: goto L_0x003c;\n case 1906: goto L_0x003c;\n case 1907: goto L_0x003c;\n case 1908: goto L_0x003c;\n case 1909: goto L_0x003c;\n case 2001: goto L_0x003c;\n case 2101: goto L_0x003c;\n case 2102: goto L_0x003c;\n case 2103: goto L_0x003c;\n case 2104: goto L_0x003c;\n case 2105: goto L_0x003c;\n case 2106: goto L_0x003c;\n case 2107: goto L_0x003c;\n case 2108: goto L_0x003c;\n case 2109: goto L_0x003c;\n case 2110: goto L_0x003c;\n case 2111: goto L_0x003c;\n case 2112: goto L_0x003c;\n case 2113: goto L_0x003c;\n case 2114: goto L_0x003c;\n case 2115: goto L_0x003c;\n case 2116: goto L_0x003c;\n case 2117: goto L_0x003c;\n case 2118: goto L_0x003c;\n case 2119: goto L_0x003c;\n case 2120: goto L_0x003c;\n case 2121: goto L_0x003c;\n case 2122: goto L_0x003c;\n case 2123: goto L_0x003c;\n case 2124: goto L_0x003c;\n case 2201: goto L_0x003c;\n case 2202: goto L_0x003c;\n case 2203: goto L_0x003c;\n case 2204: goto L_0x003c;\n case 2205: goto L_0x003c;\n case 2206: goto L_0x003c;\n case 2207: goto L_0x003c;\n case 2208: goto L_0x003c;\n case 2209: goto L_0x003c;\n case 2210: goto L_0x003c;\n case 2211: goto L_0x003c;\n case 2212: goto L_0x003c;\n case 2213: goto L_0x003c;\n case 2214: goto L_0x003c;\n case 2215: goto L_0x003c;\n case 2301: goto L_0x003c;\n case 2302: goto L_0x003c;\n case 2303: goto L_0x003c;\n case 2304: goto L_0x003c;\n case 2401: goto L_0x003c;\n case 2402: goto L_0x003c;\n case 2501: goto L_0x003c;\n case 2502: goto L_0x003c;\n case 2503: goto L_0x003c;\n case 2504: goto L_0x003c;\n case 2505: goto L_0x003c;\n case 2506: goto L_0x003c;\n case 2507: goto L_0x003c;\n case 2508: goto L_0x003c;\n case 2509: goto L_0x003c;\n case 2510: goto L_0x003c;\n case 2511: goto L_0x003c;\n case 2512: goto L_0x003c;\n case 2513: goto L_0x003c;\n case 2514: goto L_0x003c;\n case 2515: goto L_0x003c;\n case 2516: goto L_0x003c;\n case 2517: goto L_0x003c;\n case 2518: goto L_0x003c;\n case 2519: goto L_0x003c;\n case 2601: goto L_0x003c;\n case 2602: goto L_0x003c;\n case 2701: goto L_0x003c;\n case 2702: goto L_0x003c;\n case 2703: goto L_0x003c;\n case 2704: goto L_0x003c;\n case 2705: goto L_0x003c;\n case 2706: goto L_0x003c;\n case 2707: goto L_0x003c;\n case 2801: goto L_0x003c;\n case 2802: goto L_0x003c;\n case 2803: goto L_0x003c;\n case 2804: goto L_0x003c;\n case 2805: goto L_0x003c;\n case 2806: goto L_0x003c;\n case 2807: goto L_0x003c;\n case 2808: goto L_0x003c;\n case 2809: goto L_0x003c;\n case 2810: goto L_0x003c;\n case 2811: goto L_0x003c;\n case 2812: goto L_0x003c;\n case 2813: goto L_0x003c;\n case 2814: goto L_0x003c;\n case 2815: goto L_0x003c;\n case 2816: goto L_0x003c;\n case 2817: goto L_0x003c;\n case 2818: goto L_0x003c;\n case 2819: goto L_0x003c;\n case 2820: goto L_0x003c;\n case 2821: goto L_0x003c;\n case 2822: goto L_0x003c;\n case 2823: goto L_0x003c;\n case 2824: goto L_0x003c;\n case 2825: goto L_0x003c;\n case 2826: goto L_0x003c;\n case 2901: goto L_0x003c;\n case 2902: goto L_0x003c;\n case 2903: goto L_0x003c;\n case 2904: goto L_0x003c;\n case 2905: goto L_0x003c;\n case 2906: goto L_0x003c;\n case 2907: goto L_0x003c;\n case 3001: goto L_0x003c;\n case 3002: goto L_0x003c;\n case 3003: goto L_0x003c;\n case 3004: goto L_0x003c;\n case 3005: goto L_0x003c;\n default: goto L_0x0019;\n };\t Catch:{ IllegalArgumentException -> 0x0034 }\n L_0x0019:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0034 }\n r4 = 41;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0034 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r4 = \" is not a valid enum EventType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0034 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0034 }\n L_0x0034:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x003c:\n r2 = java.lang.Integer.valueOf(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r6.f28837a = r2;\t Catch:{ IllegalArgumentException -> 0x0034 }\n goto L_0x0000;\n L_0x0043:\n r0 = r6.f28838b;\n if (r0 != 0) goto L_0x004e;\n L_0x0047:\n r0 = new com.google.android.h.a.a.u;\n r0.<init>();\n r6.f28838b = r0;\n L_0x004e:\n r0 = r6.f28838b;\n r7.a(r0);\n goto L_0x0000;\n L_0x0054:\n r0 = r7.j();\n r0 = java.lang.Long.valueOf(r0);\n r6.f28839c = r0;\n goto L_0x0000;\n L_0x005f:\n r0 = r7.j();\n r0 = java.lang.Long.valueOf(r0);\n r6.f28840d = r0;\n goto L_0x0000;\n L_0x006a:\n r0 = r6.f28841e;\n if (r0 != 0) goto L_0x0075;\n L_0x006e:\n r0 = new com.google.android.h.a.a.o;\n r0.<init>();\n r6.f28841e = r0;\n L_0x0075:\n r0 = r6.f28841e;\n r7.a(r0);\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.h.a.a.v.b(com.google.protobuf.nano.a):com.google.android.h.a.a.v\");\n }", "public synchronized void m6495a(int r6, int r7) throws fr.pcsoft.wdjava.geo.C0918i {\n /* JADX: method processing error */\n/*\nError: jadx.core.utils.exceptions.JadxRuntimeException: Exception block dominator not found, method:fr.pcsoft.wdjava.geo.a.b.a(int, int):void. bs: [B:13:0x001d, B:18:0x0027, B:23:0x0031, B:28:0x003a, B:44:0x005d, B:55:0x006c, B:64:0x0079]\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:86)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/70807318.run(Unknown Source)\n*/\n /*\n r5 = this;\n r4 = 2;\n r1 = 0;\n r0 = 1;\n monitor-enter(r5);\n r5.m6487e();\t Catch:{ all -> 0x0053 }\n switch(r6) {\n case 2: goto L_0x0089;\n case 3: goto L_0x000a;\n case 4: goto L_0x0013;\n default: goto L_0x000a;\n };\t Catch:{ all -> 0x0053 }\n L_0x000a:\n r0 = f2486z;\t Catch:{ all -> 0x0053 }\n r1 = 3;\t Catch:{ all -> 0x0053 }\n r0 = r0[r1];\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n L_0x0011:\n monitor-exit(r5);\n return;\n L_0x0013:\n r3 = new android.location.Criteria;\t Catch:{ all -> 0x0053 }\n r3.<init>();\t Catch:{ all -> 0x0053 }\n r2 = r7 & 2;\n if (r2 != r4) goto L_0x0058;\n L_0x001c:\n r2 = 1;\n r3.setAccuracy(r2);\t Catch:{ i -> 0x0056 }\n L_0x0020:\n r2 = r7 & 128;\n r4 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n if (r2 != r4) goto L_0x0065;\n L_0x0026:\n r2 = 3;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x0063 }\n L_0x002a:\n r2 = r7 & 8;\n r4 = 8;\n if (r2 != r4) goto L_0x007f;\n L_0x0030:\n r2 = r0;\n L_0x0031:\n r3.setAltitudeRequired(r2);\t Catch:{ i -> 0x0081 }\n r2 = r7 & 4;\n r4 = 4;\n if (r2 != r4) goto L_0x0083;\n L_0x0039:\n r2 = r0;\n L_0x003a:\n r3.setAltitudeRequired(r2);\t Catch:{ i -> 0x0085 }\n r2 = r7 & 16;\n r4 = 16;\n if (r2 != r4) goto L_0x0087;\n L_0x0043:\n r3.setAltitudeRequired(r0);\t Catch:{ all -> 0x0053 }\n r0 = 0;\t Catch:{ all -> 0x0053 }\n r0 = r5.m6485a(r0);\t Catch:{ all -> 0x0053 }\n r1 = 1;\t Catch:{ all -> 0x0053 }\n r0 = r0.getBestProvider(r3, r1);\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n goto L_0x0011;\n L_0x0053:\n r0 = move-exception;\n monitor-exit(r5);\n throw r0;\n L_0x0056:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0058:\n r2 = r7 & 1;\n if (r2 != r0) goto L_0x0020;\n L_0x005c:\n r2 = 2;\n r3.setAccuracy(r2);\t Catch:{ i -> 0x0061 }\n goto L_0x0020;\n L_0x0061:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0063:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0065:\n r2 = r7 & 64;\n r4 = 64;\n if (r2 != r4) goto L_0x0072;\n L_0x006b:\n r2 = 2;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x0070 }\n goto L_0x002a;\n L_0x0070:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0072:\n r2 = r7 & 32;\n r4 = 32;\n if (r2 != r4) goto L_0x002a;\n L_0x0078:\n r2 = 1;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x007d }\n goto L_0x002a;\n L_0x007d:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x007f:\n r2 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x0031;\t Catch:{ all -> 0x0053 }\n L_0x0081:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0083:\n r2 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x003a;\t Catch:{ all -> 0x0053 }\n L_0x0085:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0087:\n r0 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x0043;\t Catch:{ all -> 0x0053 }\n L_0x0089:\n r0 = f2486z;\t Catch:{ all -> 0x0053 }\n r1 = 2;\t Catch:{ all -> 0x0053 }\n r0 = r0[r1];\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n goto L_0x0011;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: fr.pcsoft.wdjava.geo.a.b.a(int, int):void\");\n }", "public ItemStack func_70301_a(int par1)\n/* */ {\n/* 25 */ return null;\n/* */ }", "public int getLiveRegion() {\n/* 1213 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "protected boolean func_70041_e_() { return false; }", "private void m50367F() {\n }", "private synchronized void m29549c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x0050 }\n if (r0 == 0) goto L_0x004b;\t Catch:{ all -> 0x0050 }\n L_0x0005:\n r0 = com.google.android.m4b.maps.cg.bx.m23056a();\t Catch:{ all -> 0x0050 }\n r1 = 0;\n r2 = r6.f24854d;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r3 = r6.f24853c;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r2 = r2.openFileInput(r3);\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n if (r2 == 0) goto L_0x0027;\n L_0x0014:\n r3 = new com.google.android.m4b.maps.ar.a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.de.af.f19891a;\t Catch:{ IOException -> 0x0036 }\n r3.<init>(r4);\t Catch:{ IOException -> 0x0036 }\n r6.f24851a = r3;\t Catch:{ IOException -> 0x0036 }\n r3 = r6.f24851a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.ap.C4655c.m20771a(r2);\t Catch:{ IOException -> 0x0036 }\n r3.m20819a(r4);\t Catch:{ IOException -> 0x0036 }\n goto L_0x0029;\t Catch:{ IOException -> 0x0036 }\n L_0x0027:\n r6.f24851a = r1;\t Catch:{ IOException -> 0x0036 }\n L_0x0029:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n L_0x002c:\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n goto L_0x004b;\n L_0x0030:\n r2 = move-exception;\n r5 = r2;\n r2 = r1;\n r1 = r5;\n goto L_0x0044;\n L_0x0035:\n r2 = r1;\n L_0x0036:\n r6.f24851a = r1;\t Catch:{ all -> 0x0043 }\n r1 = r6.f24854d;\t Catch:{ all -> 0x0043 }\n r3 = r6.f24853c;\t Catch:{ all -> 0x0043 }\n r1.deleteFile(r3);\t Catch:{ all -> 0x0043 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n goto L_0x002c;\t Catch:{ all -> 0x0050 }\n L_0x0043:\n r1 = move-exception;\t Catch:{ all -> 0x0050 }\n L_0x0044:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n throw r1;\t Catch:{ all -> 0x0050 }\n L_0x004b:\n r0 = 1;\t Catch:{ all -> 0x0050 }\n r6.f24852b = r0;\t Catch:{ all -> 0x0050 }\n monitor-exit(r6);\n return;\n L_0x0050:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.c():void\");\n }", "private boolean method_2253(class_1033 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "private synchronized void m3985g() {\n /*\n r8 = this;\n monitor-enter(r8);\n r2 = java.lang.Thread.currentThread();\t Catch:{ all -> 0x0063 }\n r3 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r3 = r3.mo1186c();\t Catch:{ all -> 0x0063 }\n r2 = r2.equals(r3);\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0021;\n L_0x0011:\n r2 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1185b();\t Catch:{ all -> 0x0063 }\n r3 = new com.google.analytics.tracking.android.aa;\t Catch:{ all -> 0x0063 }\n r3.<init>(r8);\t Catch:{ all -> 0x0063 }\n r2.add(r3);\t Catch:{ all -> 0x0063 }\n L_0x001f:\n monitor-exit(r8);\n return;\n L_0x0021:\n r2 = r8.f2122n;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x0028;\n L_0x0025:\n r8.m3999d();\t Catch:{ all -> 0x0063 }\n L_0x0028:\n r2 = com.google.analytics.tracking.android.ab.f1966a;\t Catch:{ all -> 0x0063 }\n r3 = r8.f2110b;\t Catch:{ all -> 0x0063 }\n r3 = r3.ordinal();\t Catch:{ all -> 0x0063 }\n r2 = r2[r3];\t Catch:{ all -> 0x0063 }\n switch(r2) {\n case 1: goto L_0x0036;\n case 2: goto L_0x006e;\n case 3: goto L_0x00aa;\n default: goto L_0x0035;\n };\t Catch:{ all -> 0x0063 }\n L_0x0035:\n goto L_0x001f;\n L_0x0036:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0066;\n L_0x003e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.poll();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to store\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2112d;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1197a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n goto L_0x0036;\n L_0x0063:\n r2 = move-exception;\n monitor-exit(r8);\n throw r2;\n L_0x0066:\n r2 = r8.f2121m;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x001f;\n L_0x006a:\n r8.m3987h();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x006e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x00a0;\n L_0x0076:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.peek();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to service\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2111c;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1204a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2.poll();\t Catch:{ all -> 0x0063 }\n goto L_0x006e;\n L_0x00a0:\n r2 = r8.f2123o;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1198a();\t Catch:{ all -> 0x0063 }\n r8.f2109a = r2;\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x00aa:\n r2 = \"Need to reconnect\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x001f;\n L_0x00b7:\n r8.m3991j();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.analytics.tracking.android.y.g():void\");\n }", "public abstract void mo6549b();", "private void method_7082(class_1293 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public /* bridge */ /* synthetic */ void mo55095b() {\n super.mo55095b();\n }", "public interface NoCopySpan\n/* */ {\n/* */ public static class Concrete\n/* */ implements NoCopySpan\n/* */ {\n/* */ public Concrete() {\n/* 37 */ throw new RuntimeException(\"Stub!\");\n/* */ }\n/* */ }\n/* */ }", "public void b(gy ☃) {}\r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ public void a(gy ☃) {}", "public void a() {\n block8 : {\n block9 : {\n var1_1 = this.f();\n var2_2 = false;\n if (var1_1) break block8;\n this.j.c();\n var6_3 = this.k;\n var7_4 = this.b;\n var8_5 = (l)var6_3;\n var9_6 = var8_5.a(var7_4);\n if (var9_6 != null) break block9;\n this.a(false);\n var2_2 = true;\n ** GOTO lbl30\n }\n if (var9_6 != n.b) ** GOTO lbl26\n this.a(this.g);\n var11_7 = this.k;\n var12_8 = this.b;\n var13_9 = (l)var11_7;\n try {\n block10 : {\n var2_2 = var13_9.a(var12_8).d();\n break block10;\nlbl26: // 1 sources:\n var10_10 = var9_6.d();\n var2_2 = false;\n if (!var10_10) {\n this.b();\n }\n }\n this.j.g();\n }\n finally {\n this.j.d();\n }\n }\n if ((var3_12 = this.c) == null) return;\n if (var2_2) {\n var4_13 = var3_12.iterator();\n while (var4_13.hasNext()) {\n ((d)var4_13.next()).a(this.b);\n }\n }\n e.a(this.h, this.j, this.c);\n }\n\n /*\n * Exception decompiling\n */\n public final void a(ListenableWorker.a var1_1) {\n // This method has failed to decompile. When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.\n // org.benf.cfr.reader.util.ConfusedCFRException: Tried to end blocks [4[TRYBLOCK]], but top level block is 10[WHILELOOP]\n // org.benf.cfr.reader.b.a.a.j.a(Op04StructuredStatement.java:432)\n // org.benf.cfr.reader.b.a.a.j.d(Op04StructuredStatement.java:484)\n // org.benf.cfr.reader.b.a.a.i.a(Op03SimpleStatement.java:607)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:692)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:182)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:127)\n // org.benf.cfr.reader.entities.attributes.f.c(AttributeCode.java:96)\n // org.benf.cfr.reader.entities.g.p(Method.java:396)\n // org.benf.cfr.reader.entities.d.e(ClassFile.java:890)\n // org.benf.cfr.reader.entities.d.b(ClassFile.java:792)\n // org.benf.cfr.reader.b.a(Driver.java:128)\n // org.benf.cfr.reader.a.a(CfrDriverImpl.java:63)\n // com.njlabs.showjava.decompilers.JavaExtractionWorker.decompileWithCFR(JavaExtractionWorker.kt:61)\n // com.njlabs.showjava.decompilers.JavaExtractionWorker.doWork(JavaExtractionWorker.kt:130)\n // com.njlabs.showjava.decompilers.BaseDecompiler.withAttempt(BaseDecompiler.kt:108)\n // com.njlabs.showjava.workers.DecompilerWorker$b.run(DecompilerWorker.kt:118)\n // java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)\n // java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)\n // java.lang.Thread.run(Thread.java:919)\n throw new IllegalStateException(\"Decompilation failed\");\n }\n\n public final void a(String string) {\n LinkedList linkedList = new LinkedList();\n linkedList.add((Object)string);\n while (!linkedList.isEmpty()) {\n String string2 = (String)linkedList.remove();\n if (((l)this.k).a(string2) != n.f) {\n k k2 = this.k;\n n n2 = n.d;\n String[] arrstring = new String[]{string2};\n ((l)k2).a(n2, arrstring);\n }\n linkedList.addAll((Collection)((a.i.r.p.c)this.l).a(string2));\n }\n }\n\n /*\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n */\n public final void a(boolean bl) {\n this.j.c();\n k k2 = this.j.k();\n l l2 = (l)k2;\n List list = l2.a();\n ArrayList arrayList = (ArrayList)list;\n boolean bl2 = arrayList.isEmpty();\n if (bl2) {\n f.a(this.a, RescheduleReceiver.class, false);\n }\n this.j.g();\n this.p.c((Object)bl);\n return;\n finally {\n this.j.d();\n }\n }\n\n public final void b() {\n this.j.c();\n k k2 = this.k;\n n n2 = n.a;\n String[] arrstring = new String[]{this.b};\n l l2 = (l)k2;\n l2.a(n2, arrstring);\n k k3 = this.k;\n String string = this.b;\n long l3 = System.currentTimeMillis();\n l l4 = (l)k3;\n l4.b(string, l3);\n k k4 = this.k;\n String string2 = this.b;\n l l5 = (l)k4;\n try {\n l5.a(string2, -1L);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(true);\n }\n }\n\n public final void c() {\n this.j.c();\n k k2 = this.k;\n String string = this.b;\n long l2 = System.currentTimeMillis();\n l l3 = (l)k2;\n l3.b(string, l2);\n k k3 = this.k;\n n n2 = n.a;\n String[] arrstring = new String[]{this.b};\n l l4 = (l)k3;\n l4.a(n2, arrstring);\n k k4 = this.k;\n String string2 = this.b;\n l l5 = (l)k4;\n l5.f(string2);\n k k5 = this.k;\n String string3 = this.b;\n l l6 = (l)k5;\n try {\n l6.a(string3, -1L);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(false);\n }\n }\n\n public final void d() {\n k k2 = this.k;\n String string = this.b;\n n n2 = ((l)k2).a(string);\n if (n2 == n.b) {\n h h2 = h.a();\n String string2 = s;\n Object[] arrobject = new Object[]{this.b};\n h2.a(string2, String.format((String)\"Status for %s is RUNNING;not doing any work and rescheduling for later execution\", (Object[])arrobject), new Throwable[0]);\n this.a(true);\n return;\n }\n h h4 = h.a();\n String string3 = s;\n Object[] arrobject = new Object[]{this.b, n2};\n h4.a(string3, String.format((String)\"Status for %s is %s; not doing any work\", (Object[])arrobject), new Throwable[0]);\n this.a(false);\n }\n\n public void e() {\n this.j.c();\n this.a(this.b);\n a.i.e e2 = ((ListenableWorker.a.a)this.g).a;\n k k2 = this.k;\n String string = this.b;\n l l2 = (l)k2;\n try {\n l2.a(string, e2);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(false);\n }\n }\n\n public final boolean f() {\n if (this.r) {\n h h2 = h.a();\n String string = s;\n Object[] arrobject = new Object[]{this.o};\n h2.a(string, String.format((String)\"Work interrupted for %s\", (Object[])arrobject), new Throwable[0]);\n k k2 = this.k;\n String string2 = this.b;\n n n2 = ((l)k2).a(string2);\n if (n2 == null) {\n this.a(false);\n return true;\n }\n this.a(true ^ n2.d());\n return true;\n }\n return false;\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public void run() {\n int n2;\n block42 : {\n block41 : {\n i i2;\n Cursor cursor;\n block48 : {\n block46 : {\n ListenableWorker listenableWorker;\n block47 : {\n a.i.e e2;\n block44 : {\n g g2;\n block45 : {\n block40 : {\n boolean bl;\n Iterator iterator;\n j j2;\n StringBuilder stringBuilder;\n block43 : {\n a.i.r.p.n n3 = this.m;\n String string = this.b;\n o o2 = (o)n3;\n if (o2 == null) throw null;\n n2 = 1;\n i i3 = i.a((String)\"SELECT DISTINCT tag FROM worktag WHERE work_spec_id=?\", (int)n2);\n if (string == null) {\n i3.bindNull(n2);\n } else {\n i3.bindString(n2, string);\n }\n o2.a.b();\n Cursor cursor2 = a.f.l.a.a(o2.a, (a.g.a.e)i3, false);\n ArrayList arrayList = new ArrayList(cursor2.getCount());\n while (cursor2.moveToNext()) {\n arrayList.add((Object)cursor2.getString(0));\n }\n this.n = arrayList;\n stringBuilder = new StringBuilder(\"Work [ id=\");\n stringBuilder.append(this.b);\n stringBuilder.append(\", tags={ \");\n iterator = arrayList.iterator();\n bl = true;\n break block43;\n finally {\n cursor2.close();\n i3.b();\n }\n }\n while (iterator.hasNext()) {\n String string = (String)iterator.next();\n if (bl) {\n bl = false;\n } else {\n stringBuilder.append(\", \");\n }\n stringBuilder.append(string);\n }\n stringBuilder.append(\" } ]\");\n this.o = stringBuilder.toString();\n if (this.f()) {\n return;\n }\n this.j.c();\n k k2 = this.k;\n String string = this.b;\n l l2 = (l)k2;\n this.e = j2 = l2.d(string);\n if (j2 == null) {\n h h2 = h.a();\n String string2 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.b;\n h2.b(string2, String.format((String)\"Didn't find WorkSpec for id %s\", (Object[])arrobject), new Throwable[0]);\n this.a(false);\n return;\n }\n if (j2.b != n.a) {\n this.d();\n this.j.g();\n h h4 = h.a();\n String string3 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h4.a(string3, String.format((String)\"%s is not in ENQUEUED state. Nothing more to do.\", (Object[])arrobject), new Throwable[0]);\n return;\n }\n if (j2.d() || this.e.c()) {\n long l3 = System.currentTimeMillis();\n boolean bl2 = this.e.n == 0L;\n if (!bl2 && l3 < this.e.a()) {\n h h5 = h.a();\n String string4 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h5.a(string4, String.format((String)\"Delaying execution for %s because it is being executed before schedule.\", (Object[])arrobject), new Throwable[0]);\n this.a((boolean)n2);\n return;\n }\n }\n this.j.g();\n if (!this.e.d()) break block40;\n e2 = this.e.e;\n break block44;\n }\n g2 = g.a(this.e.d);\n if (g2 != null) break block45;\n h h6 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.d;\n h6.b(string, String.format((String)\"Could not create Input Merger %s\", (Object[])arrobject), new Throwable[0]);\n break block46;\n }\n ArrayList arrayList = new ArrayList();\n arrayList.add((Object)this.e.e);\n k k3 = this.k;\n String string = this.b;\n l l4 = (l)k3;\n if (l4 == null) throw null;\n i2 = i.a((String)\"SELECT output FROM workspec WHERE id IN (SELECT prerequisite_id FROM dependency WHERE work_spec_id=?)\", (int)n2);\n if (string == null) {\n i2.bindNull(n2);\n } else {\n i2.bindString(n2, string);\n }\n l4.a.b();\n cursor = a.f.l.a.a(l4.a, (a.g.a.e)i2, false);\n ArrayList arrayList2 = new ArrayList(cursor.getCount());\n while (cursor.moveToNext()) {\n arrayList2.add((Object)a.i.e.b(cursor.getBlob(0)));\n }\n arrayList.addAll((Collection)arrayList2);\n e2 = g2.a((List<a.i.e>)arrayList);\n }\n a.i.e e3 = e2;\n UUID uUID = UUID.fromString((String)this.b);\n List<String> list = this.n;\n WorkerParameters.a a2 = this.d;\n int n5 = this.e.k;\n a.i.b b2 = this.h;\n WorkerParameters workerParameters = new WorkerParameters(uUID, e3, list, a2, n5, b2.a, this.i, b2.c);\n if (this.f == null) {\n this.f = this.h.c.a(this.a, this.e.c, workerParameters);\n }\n if ((listenableWorker = this.f) != null) break block47;\n h h7 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h7.b(string, String.format((String)\"Could not create Worker %s\", (Object[])arrobject), new Throwable[0]);\n break block46;\n }\n if (!listenableWorker.isUsed()) break block48;\n h h8 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h8.b(string, String.format((String)\"Received an already-used Worker %s; WorkerFactory should return new instances\", (Object[])arrobject), new Throwable[0]);\n }\n this.e();\n return;\n }\n this.f.setUsed();\n this.j.c();\n k k4 = this.k;\n String string = this.b;\n l l5 = (l)k4;\n if (l5.a(string) != n.a) break block41;\n k k5 = this.k;\n n n7 = n.b;\n String[] arrstring = new String[n2];\n arrstring[0] = this.b;\n l l6 = (l)k5;\n l6.a(n7, arrstring);\n k k6 = this.k;\n String string5 = this.b;\n l l7 = (l)k6;\n try {\n l7.e(string5);\n break block42;\n }\n finally {\n cursor.close();\n i2.b();\n }\n catch (Throwable throwable) {\n throw throwable;\n }\n finally {\n this.j.d();\n }\n }\n n2 = 0;\n }\n this.j.g();\n if (n2 != 0) {\n if (this.f()) {\n return;\n }\n c c2 = new c();\n ((a.i.r.q.m.b)this.i).c.execute((Runnable)new a.i.r.k(this, c2));\n c2.a((Runnable)new a.i.r.l(this, c2, this.o), ((a.i.r.q.m.b)this.i).a);\n return;\n }\n this.d();\n return;\n finally {\n this.j.d();\n }\n }\n\n public static class a {\n public Context a;\n public ListenableWorker b;\n public a.i.r.q.m.a c;\n public a.i.b d;\n public WorkDatabase e;\n public String f;\n public List<d> g;\n public WorkerParameters.a h = new WorkerParameters.a();\n\n public a(Context context, a.i.b b2, a.i.r.q.m.a a2, WorkDatabase workDatabase, String string) {\n this.a = context.getApplicationContext();\n this.c = a2;\n this.d = b2;\n this.e = workDatabase;\n this.f = string;\n }\n }\n\n}" ]
[ "0.68582827", "0.6620878", "0.6610857", "0.65470314", "0.6509625", "0.65080696", "0.64783424", "0.64740133", "0.6470899", "0.6456672", "0.6451211", "0.64384896", "0.63887", "0.63678104", "0.63494086", "0.6347781", "0.63402736", "0.6329167", "0.63145703", "0.6290253", "0.62885404", "0.6286517", "0.627975", "0.627764", "0.6255834", "0.6254432", "0.6252449", "0.62446517", "0.62420183", "0.6240503", "0.62228465", "0.6215891", "0.62137055", "0.62110865", "0.62110865", "0.6199694", "0.6186819", "0.6185589", "0.6171822", "0.6170204", "0.6168152", "0.61639446", "0.6162312", "0.6160744", "0.615288", "0.6150652", "0.6143273", "0.61425745", "0.6132855", "0.61303705", "0.6129565", "0.61241055", "0.6120755", "0.6109555", "0.6107627", "0.61055976", "0.6090116", "0.6086451", "0.60830873", "0.6060046", "0.6044952", "0.6043271", "0.6042092", "0.60402477", "0.60348177", "0.60233307", "0.6022983", "0.60207266", "0.60177624", "0.60172105", "0.60170674", "0.60133386", "0.6010747", "0.60055083", "0.60029185", "0.59979534", "0.5995997", "0.59948957", "0.5974314", "0.59659696", "0.5963569", "0.59610045", "0.5958993", "0.59578407", "0.5957493", "0.5944736", "0.59432733", "0.5942461", "0.59417975", "0.59385014", "0.5935903", "0.59307855", "0.5927985", "0.59202254", "0.5919467", "0.59185994", "0.59124416", "0.5910217", "0.59062207", "0.5899597", "0.5888963" ]
0.0
-1
Runs the application. Pairs up clients that connect.
public static void main(String[] args) throws Exception { ServerSocket listener = new ServerSocket(8102); System.out.println("Server is Running"); try { while (true) { Panel panel = new Panel(); Game game = new Game(); Object[] map = panel.generator(game); gamesArchive.add(game); Game.Player playerX = game.new Player(listener.accept(), 'X'); Game.Player playerO = game.new Player(listener.accept(), 'O'); playerX.setOpponent(playerO); playerO.setOpponent(playerX); game.thisPlayer = playerX; game.setPanel(map, panel.getLocationX(), panel.getLocationO()); playerX.start(); playerO.start(); panel.printMap(map); } } finally { listener.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void run() {\n\t\trunClient();\r\n\t}", "@Override\n\tpublic void run() \n\t{\n\t\tcommunicator = com.zeroc.Ice.Util.initialize();\n GameServerPrx clientPrx = GameServerPrx.checkedCast(\n communicator.stringToProxy(\"client:default -h 58.167.142.74 -p 10002\")).ice_twoway().ice_secure(false).ice_collocationOptimized(false).ice_compress(true);\n\n if(clientPrx == null)\n {\n //If connection is failed due to server problems\n System.err.println(\"SB Connect: \" + \"Invalid proxy\");\n return;\n }\n System.out.println(\"SB Connect: \" + \"Connected\");\n Server server = new Server();\n server.address = ServerInfo.ADDRESS;\n server.UUID = ServerInfo.UUID;\n server.port = ServerInfo.PORT;\n server.name = ServerInfo.NAME;\n server.players = (short) players;\n\t\tclientPrx.sendServerDetails(server);\n\t\tSystem.out.println(\"SB Connect: \" + \"Data sent\");\n\t}", "public static void main(String[] args) {\n new ServerControl().start();\n new UserMonitor().start();\n boolean listening = true;\n //listen for connection attempt and handle it accordingly\n try (ServerSocket socket = new ServerSocket(4044)) {\n while (listening) {\n new AwaitCommand(Singleton.addToList(socket.accept())).start();\n System.out.println(\"Connection started...\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void runProgram() {\n\n try {\n ServerSocket ss = new ServerSocket(8088);\n Dispatcher dispatcher = new Dispatcher(allmsg,allNamedPrintwriters,clientsToBeRemoved);\n Cleanup cleanup = new Cleanup(clientsToBeRemoved,allClients);\n cleanup.start();\n dispatcher.start();\n logger.initializeLogger();\n\n while (true) {\n Socket client = ss.accept();\n InputStreamReader ir = new InputStreamReader(client.getInputStream());\n PrintWriter printWriter = new PrintWriter(client.getOutputStream(),true);\n BufferedReader br = new BufferedReader(new InputStreamReader(client.getInputStream()));\n String input = br.readLine();\n System.out.println(input);\n String name = input.substring(8);\n logger.logEventInfo(name + \" has connected to the chatserver!\");\n allClients.put(name,client);\n allNamedPrintwriters.put(name,printWriter);\n ClientHandler cl = new ClientHandler(name,br, printWriter, allmsg);\n Thread t = new Thread(cl);\n t.start();\n allmsg.add(\"ONLINE#\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@SuppressWarnings(\"empty-statement\")\n public void runClient() {\n // setup MQTT Client\n String clientID = \"apto01\";\n String pass = \"1234\";\n connOpt = new MqttConnectOptions();\n\n connOpt.setCleanSession(true);\n connOpt.setKeepAliveInterval(30);\n connOpt.setUserName(\"isis2503\");\n connOpt.setPassword(pass.toCharArray());\n\n alertaLogic = new AlertLogic();\n\n // Connect to Broker\n try {\n myClient = new MqttClient(BROKER_URL, clientID);\n myClient.setCallback(this);\n myClient.connect(connOpt);\n } catch (MqttException e) {\n e.printStackTrace();\n System.exit(-1);\n }\n\n System.out.println(\"Connected to \" + BROKER_URL);\n\n // setup topic\n // topics on m2m.io are in the form <domain>/<stuff>/<thing>\n // subscribe to topic if subscriber\n if (subscriber) {\n try {\n int subQoS = 0;\n myClient.subscribe(infoInoTopic, subQoS);\n } catch (MqttException e) {\n e.printStackTrace();\n }\n }\n // disconnect\n try {\n // wait to ensure subscribed messages are delivered\n while (subscriber);\n myClient.disconnect();\n } catch (MqttException e) {\n e.printStackTrace();\n }\n }", "public void run() {\n sendMessageToClient(\"Connexion au serveur réussie\");\n\n while (isActive) {\n try {\n String input = retrieveCommandFromClient();\n handleCommand(input);\n } catch (ServerException e) {\n System.out.println(e.getMessage());\n sendMessageToClient(e.getMessage());\n } catch (ClientOfflineException e) {\n System.out.println(\"Client # \" + clientId + \" deconnecte de facon innattendue\");\n deactivate();\n }\n }\n\n close();\n }", "public void run() {\n clientLogger.info(\"Client \" + name + \" started working\");\n EventLoopGroup group = new NioEventLoopGroup();\n try {\n Bootstrap bootstrap = new Bootstrap()\n .group(group)\n .channel(NioSocketChannel.class)\n .handler(new ClientInitializer());\n Channel channel = bootstrap.connect(host, port).sync().channel();\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n while (true) {\n channel.write(in.readLine() + \"\\r\\n\");\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n group.shutdownGracefully();\n }\n clientLogger.info(\"Client \" + name + \" finished working\");\n }", "@Override\n public void run()\n {\n lock = new Lock();\n messenger = new Messenger(notifier);\n clientList = new ClientList(notifier, messenger, connectionLimit);\n publisher = new Publisher(lock, clientList);\n\n try\n {\n notifier.sendToConsole(\"Server Started\");\n LOGGER.info(\"Server Started\");\n\n // Set up networking\n socketFactory = (SSLServerSocketFactory) SSLServerSocketFactory\n .getDefault();\n serverSocket = (SSLServerSocket) socketFactory\n .createServerSocket(port);\n serverSocket.setEnabledCipherSuites(enabledCipherSuites);\n\n int idCounter = 1;\n\n // Now repeatedly listen for connections\n while (true)\n {\n // Blocks whilst waiting for an incoming connection\n socket = (SSLSocket) serverSocket.accept();\n\n conn = new ClientConnection(socket, idCounter, notifier, lock,\n publisher, clientList, password);\n new Thread((Runnable) conn).start();\n\n LOGGER.info(\"Someone connected: \" + idCounter);\n idCounter++;\n }\n\n } catch (final SocketException e)\n {\n LOGGER.severe(\"Socket Exception: Server closed?\");\n notifier.sendToConsole(\"Server Stopped\");\n } catch (final IOException e)\n {\n LOGGER.severe(e.getMessage());\n notifier.sendError(e);\n } finally\n {\n kill();\n }\n }", "@Override\n public void run() {\n try {\n logger.info(\"Starting\");\n communicator = Util.initialize();\n\n logger.info(\"Initialized\");\n\n ObjectAdapter adapter =\n communicator.createObjectAdapterWithEndpoints(\"Adapter\",\n String.format(\"tcp -h %s -p %d:udp -h %s -p %d\", hostAddress, hostPort, hostAddress, hostPort));\n\n logger.info(\"Adapter created\");\n\n com.zeroc.Ice.Object accountRegistererServant = new AccountRegistererImplementation(clients);\n com.zeroc.Ice.Object standardClientServant = new StandardManagerImplementation(clients);\n com.zeroc.Ice.Object premiumClientServant = new StandardManagerImplementation(clients);\n\n logger.info(\"Servants created\");\n\n adapter.add(accountRegistererServant, new Identity(\"accountRegistererServant\", null));\n adapter.add(standardClientServant, new Identity(\"standardClientServant\", null));\n adapter.add(premiumClientServant, new Identity(\"premiumClientServant\", null));\n\n logger.info(\"Servants added\");\n\n adapter.activate();\n\n logger.info(\"Adapter active. Waiting for termination.\");\n\n communicator.waitForShutdown();\n\n logger.info(\"Shutting down\");\n } catch (Exception e) {\n System.err.println(this.getClass().getName() + \" - ERROR: \" + e.getMessage());\n } finally {\n if (communicator != null) {\n try {\n logger.info(\"Destroying communicator\");\n communicator.destroy();\n } catch (Exception ignored) {\n // No need to handle this\n }\n }\n }\n }", "private void execute() {\n\n\t\tPropertiesParser propertiesParser = new PropertiesParser();\n\t\t\n\t\tsetupServer(propertiesParser);\n\t\ttry {\n\t\t\t\n\t\t\tThread.sleep(SERVER_AFTER_RUN_DELAY);\n\t\t\t\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tint i=0;\n\t\tfor( ; i < propertiesParser.getReadersNum() ; i++){\n\t\t\t\n\t\t\tsetupClient(propertiesParser , i,true);\n\t\t\t\n\t\t}\n\t\tfor(; i < propertiesParser.getReadersNum()+ propertiesParser.getWritersNum() ; i++){\n\t\t\t\n\t\t\tsetupClient(propertiesParser , i,false);\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\n public void run()\n {\n log(\"STARTED\");\n\n try\n {\n FileInputStream keystoreStream = new FileInputStream(keystoreFile);\n KeyStore keyStore = KeyStore.getInstance(\"JKS\");\n keyStore.load(keystoreStream, keystorePassword.toCharArray());\n CloseableUtil.close(keystoreStream);\n\n KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());\n kmf.init(keyStore, keystorePassword.toCharArray());\n\n TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());\n tmf.init(keyStore);\n\n SSLContext sslContext = SSLContext.getInstance(\"TLS\");\n sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), new SecureRandom());\n\n SSLServerSocketFactory ssf = sslContext.getServerSocketFactory();\n sslServer = (SSLServerSocket) ssf.createServerSocket(PORT);\n }\n catch (Exception e)\n {\n log(\"Exception caught. Message: \" + e.getMessage());\n }\n\n // Start a new thread for handling a client that connects\n try\n {\n log(\"Accepting new client connections...\");\n while (!isInterrupted())\n {\n SSLSocket connection = (SSLSocket) sslServer.accept();\n log(\"A new client connected: \" + connection.getInetAddress());\n new CAClientConnection(connection, callback, keystorePassword).start();\n }\n }\n catch (Exception e)\n {\n if (!e.getMessage().equals(\"socket closed\"))\n {\n log(\"Exception caught. Message: \" + e.getMessage());\n e.printStackTrace();\n }\n }\n }", "private static void startConnection_RunApplication(int port) {\n ServerSocket s1;\n Socket s2;\n int id = 1;\n ServerApplication s2_thread;\n boolean error = false;\n\n s1 = startServer(port);\n if (s1 != null) {\n // iterate almost infinitely\n while (!error) {\n try {\n // accepts connection and creates client socket\n s2 = s1.accept();\n System.out.println(\"Client [ \" + id + \" ] \" + \"connection established: \" + s2.getInetAddress());\n // starts a new thread with the new client socket\n // this way the main thread here can iterate and wait for new connections\n s2_thread = new ServerApplication(s2, id);\n s2_thread.start();\n id++;\n } catch (IOException ex) {\n System.err.println(\"Closing connection... An error has occurred during execution.\");\n error = true;\n }\n }\n try {\n s1.close();\n } catch (IOException ex) {\n System.err.println(\"Error closing server socket\");\n }\n } else {\n print_help();\n }\n }", "@Override\n\tpublic void run() {\n\n\t\tServerSocket sSocket;\n\t\ttry {\n\t\t\tsSocket = new ServerSocket(15001);\n\t\t\tSystem.out.println(\"server listening at \" + sSocket.getLocalPort());\n\t\t\twhile (true) {\n\t\t\t\t// this is an unique socket for each client\n\t\t\t\tSocket socket = sSocket.accept();\n\t\t\t\tSystem.out.println(\"Client with port number: \" + socket.getPort() + \" is connected\");\n\t\t\t\t// start a new thread for handling requests from the client\n\t\t\t\tClientRequestHandler requestHandler = new ClientRequestHandler(sketcher, socket, scene, playerMap);\n\t\t\t\tnew Thread(requestHandler).start();\n\t\t\t\t// start a new thread for handling responses for the client\n\t\t\t\tClientResponseHandler responseHandler = new ClientResponseHandler(socket, scene, playerMap);\n\t\t\t\tnew Thread(responseHandler).start();\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t}\n\t}", "public void run() {\n // Create a socket to wait for clients.\n try {\n //Set up all the security needed to run an SSLServerSocket for clients to connect to.\n SSLContext context = SSLContext.getInstance(\"TLS\");\n KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(\"SunX509\");\n KeyStore keyStore = KeyStore.getInstance(\"JKS\");\n\n keyStore.load(new FileInputStream(\"./keystore.txt\"), \"storepass\".toCharArray());\n keyManagerFactory.init(keyStore, \"keypass\".toCharArray());\n context.init(keyManagerFactory.getKeyManagers(), null, null);\n\n SSLServerSocketFactory factory = context.getServerSocketFactory();\n SSLServerSocket sslServerSocket = (SSLServerSocket) factory.createServerSocket(conf.SERVER_PORT);\n threads = new HashSet<>();\n\n while (true) {\n //Just keep running until the end of times (or until you're stopped.)\n // Wait for an incoming client-connection request (blocking).\n SSLSocket socket = (SSLSocket) sslServerSocket.accept();\n\n // When a new connection has been established, start a new thread.\n ClientThreadPC ct = new ClientThreadPC(this, socket);\n threads.add(ct);\n new Thread(ct).start();\n System.out.println(\"Num clients: \" + threads.size());\n\n // Simulate lost connections if configured.\n if (conf.doSimulateConnectionLost()) {\n DropClientThread dct = new DropClientThread(ct);\n new Thread(dct).start();\n }\n }\n } catch (IOException | KeyManagementException | KeyStoreException | UnrecoverableKeyException |\n NoSuchAlgorithmException | CertificateException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void run()\n\t{\n\t\tSocket clientSocket;\n\t\tMemoryIO serverIO;\n\t\t// Detect whether the listener is shutdown. If not, it must be running all the time to wait for potential connections from clients. 11/27/2014, Bing Li\n\t\twhile (!super.isShutdown())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Wait and accept a connecting from a possible client residing on the coordinator. 11/27/2014, Bing Li\n\t\t\t\tclientSocket = super.accept();\n\t\t\t\t// Check whether the connected server IOs exceed the upper limit. 11/27/2014, Bing Li\n\t\t\t\tif (MemoryIORegistry.REGISTRY().getIOCount() >= ServerConfig.MAX_SERVER_IO_COUNT)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t// If the upper limit is reached, the listener has to wait until an existing server IO is disposed. 11/27/2014, Bing Li\n\t\t\t\t\t\tsuper.holdOn();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (InterruptedException e)\n\t\t\t\t\t{\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If the upper limit of IOs is not reached, a server IO is initialized. A common Collaborator and the socket are the initial parameters. The shared common collaborator guarantees all of the server IOs from a certain client could notify with each other with the same lock. Then, the upper limit of server IOs is under the control. 11/27/2014, Bing Li\n//\t\t\t\tserverIO = new MemoryIO(clientSocket, super.getCollaborator(), ServerConfig.COORDINATOR_PORT_FOR_MEMORY);\n\t\t\t\tserverIO = new MemoryIO(clientSocket, super.getCollaborator());\n\t\t\t\t// Add the new created server IO into the registry for further management. 11/27/2014, Bing Li\n\t\t\t\tMemoryIORegistry.REGISTRY().addIO(serverIO);\n\t\t\t\t// Execute the new created server IO concurrently to respond the client requests in an asynchronous manner. 11/27/2014, Bing Li\n\t\t\t\tsuper.execute(serverIO);\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static void main(String args[]){\n\n createConnection();\n\n if (conn == null) {\n System.err.println(\"Failed to establish connection!\");\n }\n\n new App();\n\n }", "public static void main(String[] args) throws IOException\n {\n list = new String[] {\"Charizard\", \"Charizard\", \"Charizard\", \"Charizard\", \"Charizard\", \"Charizard\"};\n new ClientConnection(\"10.13.103.53\", list);\n }", "public static void main(String[] args) throws IOException\n {\n ServerSocket listener = new ServerSocket(PORT);\n\n while (true)\n {\n System.out.println(\"[SERVER] Waiting for connection . . . \");\n //takes in the user client sockets\n Socket client = listener.accept();\n //Announces that the user has connected\n System.out.println(\"[SERVER] Connected to client \" + client.getInetAddress());\n ClientHandler clientThread = new ClientHandler(client, clients);\n\n pool.execute(clientThread);\n }\n }", "public void run() {\n // Initial connect request comes in\n Request request = getRequest();\n\n if (request == null) {\n closeConnection();\n return;\n }\n\n if (request.getConnectRequest() == null) {\n closeConnection();\n System.err.println(\"Received invalid initial request from Remote Client.\");\n return;\n }\n\n ObjectFactory objectFactory = new ObjectFactory();\n Response responseWrapper = objectFactory.createResponse();\n responseWrapper.setId(request.getId());\n responseWrapper.setSuccess(true);\n responseWrapper.setConnectResponse(objectFactory.createConnectResponse());\n responseWrapper.getConnectResponse().setId(id);\n\n // Return connect response with our (statistically) unique ID.\n if (!sendMessage(responseWrapper)) {\n closeConnection();\n System.err.println(\"Unable to respond to connect Request from remote Client.\");\n return;\n }\n\n // register our thread with the server\n Server.register(id, this);\n\n // have handler manage the protocol until it decides it is done.\n while ((request = getRequest()) != null) {\n\n Response response = handler.process(this, request);\n\n if (response == null) {\n continue;\n }\n\n if (!sendMessage(response)) {\n break;\n }\n }\n\n // client is done so thread can be de-registered\n if (handler instanceof IShutdownHandler) {\n ((IShutdownHandler) handler).logout(Server.getState(id));\n }\n Server.unregister(id);\n\n // close communication to client.\n closeConnection();\n }", "public void run() {\n try {\n // accepts the connection request.\n SelectableChannel peerHandle = this._handle.accept();\n if (peerHandle != null) {\n // now, create a service handler object to serve the\n // the client.\n ServiceHandler handler =\n this._factory.createServiceHandler(\n this._reactor,\n peerHandle);\n if (handler != null)\n // give the service handler object a chance to initialize itself.\n handler.open();\n }\n } catch (IOException ex) {\n MDMS.ERROR(ex.getMessage());\n }\n }", "public static void runClient() {\n try // connect to server, get streams, process connection\n {\n connectToServer(); // create a Socket to make connection\n getStreams(); // get the input and output streams\n loginframe = new LoginFrame();\n loginframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n loginframe.setVisible(true);\n\n processConnection(); // process connection\n } // end try\n catch (EOFException eofException) {\n displayMessage(\"\\nClient terminated connection\");\n } // end catch\n catch (IOException ioException) {\n ioException.printStackTrace();\n } // end catch\n finally {\n closeConnection(); // close connection\n } // end finally\n }", "public static void main(String[] args) {\n (new AbaloneClient()).start();\n }", "public void runServer()\n\t{\n\t\taddText(\"Server started at \" + LocalDateTime.now());\n\t\t\n\t\tint cnt = 0;\n\t\twhile(true)\n\t\t{\n\t\t\ttry {\n\t\t\t\t// Accept a request\n\t\t\t\taddText(\"Server is waiting for connection....\");\n\t\t\t\tSocket client = server.accept();\n\t\t\t\tConnectionThread connect = new ConnectionThread(client);\n\t\t\t\t\n\t\t\t\t// Show message\n\t\t\t\taddText(\"Server is connect!\");\n\t\t\t\taddText(\"Player\" + cnt + \"'s IP address is\" + client.getInetAddress());\n\t\t\t\tcnt++;\n\t\t\t\t\n\t\t\t\t// Add to List\n\t\t\t\tconnectionPool.add(connect);\n\t\t\t\t\n\t\t\t\t// If at least two players, Start the game\n\t\t\t\taddText(\"Pool has \" + connectionPool.size() + \" connection\");\n\t\t\t\tif(connectionPool.size() >= 2)\n\t\t\t\t\tclientStart();\n\t\t\t\t\n\t\t\t\t// Start connectionThread\n\t\t\t\tconnect.start();\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void setup(){\n\t\ttry{\n\t\t\tSocket serverSocket;\n\t\t\tboolean serverRunning = true;\n\t\t\twhile(serverRunning == true){\n\t\t\t\t serverSocket = server.accept();\n\t\t\t\t System.out.println(\"Connected to the server!\");\n\t\t\t\t DungeonClient connectedClient = new DungeonClient(serverSocket, game);\n\t\t\t\t connectedClient.start();\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e){\n\t\t\tSystem.out.println(\"Sorry, there was an IOException!\");\n\t\t}\n\t}", "public void run() { wait for the launcher script to talk to us\n //\n try {\n ssocket.setSoTimeout(30 * 1000); // 30 seconds\n socket = ssocket.accept();\n socket.setSoTimeout(3 * 60 * 1000);\n socket.setTcpNoDelay(true);\n } catch (SocketTimeoutException stmo) {\n String msg = \"timeout error on initial connection from \" + execName();\n task.log(msg, Project.MSG_ERR);\n failure = new BuildException(msg);\n } catch (Exception e) {\n String err = \"error establishing communication with \" + execName();\n String msg = e.getMessage();\n if (msg != null) {\n err = err + \": \" + msg;\n } else {\n err = err + \": \" + e;\n }\n task.log(err, Project.MSG_ERR);\n failure = new BuildException(err);\n }\n }", "public void setup_connections()\n {\n setup_servers();\n setup_clients();\n }", "@Override\n\tpublic void run() {\n\n\t\treceiveClients();\n\n\t\tbeginLogging();\n\t}", "private void runServer()\n {\n int port = Integer.parseInt(properties.getProperty(\"port\"));\n String ip = properties.getProperty(\"serverIp\");\n \n Logger.getLogger(ChatServer.class.getName()).log(Level.INFO, \"Server started. Listening on: {0}, bound to: {1}\", new Object[]{port, ip});\n try\n {\n serverSocket = new ServerSocket();\n serverSocket.bind(new InetSocketAddress(ip, port));\n do\n {\n Socket socket = serverSocket.accept(); //Important Blocking call\n Logger.getLogger(ChatServer.class.getName()).log(Level.INFO, \"Connected to a client. Waiting for username...\");\n ClientHandler ch = new ClientHandler(socket, this);\n clientList.add(ch);\n ch.start();\n } while (keepRunning);\n } catch (IOException ex)\n {\n Logger.getLogger(ChatServer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (true) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tSocket socket = serverSocket.accept();\n\t\t\t\t\t\tclients.add(new Client(socket));\n\t\t\t\t\t\tSystem.out.println(\"[클라이언트 접속] \" + socket.getRemoteSocketAddress() + \": \"\n\t\t\t\t\t\t\t\t+ Thread.currentThread().getName());\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\tif (!serverSocket.isClosed()) {\n\t\t\t\t\t\t\tstopServer();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "public void setup_clients()\n {\n ClientInfo t = new ClientInfo();\n for(int i=0;i<5;i++)\n {\n // for mesh connection between clients\n // initiate connection to clients having ID > current node's ID\n if(i > my_c_id)\n {\n // get client info\n String t_ip = t.hmap.get(i).ip;\n int t_port = Integer.valueOf(t.hmap.get(i).port);\n Thread x = new Thread()\n {\n \tpublic void run()\n {\n try\n {\n Socket s = new Socket(t_ip,t_port);\n // SockHandle instance with svr_hdl false and rx_hdl false as this is the socket initiator\n // and is a connection to another client node\n SockHandle t = new SockHandle(s,my_ip,my_port,my_c_id,c_list,s_list,false,false,cnode);\n }\n catch (UnknownHostException e) \n {\n \tSystem.out.println(\"Unknown host\");\n \tSystem.exit(1);\n } \n catch (IOException e) \n {\n \tSystem.out.println(\"No I/O\");\n e.printStackTrace(); \n \tSystem.exit(1);\n }\n \t}\n };\n \n x.setDaemon(true); \t// terminate when main ends\n x.setName(\"Client_\"+my_c_id+\"_SockHandle_to_Client\"+i);\n x.start(); \t\t\t// start the thread\n }\n }\n\n // another thread to check until all connections are established ( ie. socket list size =4 )\n // then send a message to my_id+1 client to initiate its connection setup phase\n Thread y = new Thread()\n {\n public void run()\n {\n int size = 0;\n // wait till client connections are setup\n while (size != 4)\n {\n synchronized(c_list)\n {\n size = c_list.size();\n }\n }\n // if this is not the last client node (ID =4)\n // send chain init message to trigger connection setup\n // phase on the next client\n if(my_c_id != 4)\n {\n c_list.get(my_c_id+1).send_setup();\n System.out.println(\"chain setup init\");\n }\n // send the setup finish, from Client 4\n // indicating connection setup phase is complete\n else\n {\n c_list.get(0).send_setup_finish();\n }\n }\n };\n \n y.setDaemon(true); \t// terminate when main ends\n y.start(); \t\t\t// start the thread\n }", "public void run() {\n\t\tPrintWriter out = null;\r\n\t\ttry {\r\n\t\t\tout = new PrintWriter(clientSocket.getOutputStream(), true);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tBufferedReader in = null;\r\n\t\ttry {\r\n\t\t\tin = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));\r\n\t\t} catch (IOException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\tString inputLine, outputLine;\r\n\t\tProtocol kkp = new Protocol();\r\n\r\n\t\toutputLine = kkp.processInput(null);\r\n\t\tout.println(outputLine);\r\n\t\t// Leo continuamente e interactuo\r\n\t\ttry {\r\n\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n//\t\t\t\toutputLine = kkp.processInput(inputLine);\r\n\t\t\t\toutputLine = inputLine;\r\n\t\t\t\tout.println(outputLine);\r\n\t\t\t\tif (outputLine.equals(\"Bye.\")){\r\n\t\t\t\t\tbreak;\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\t// Cierro la entrada y salida\r\n\t\t\tout.close();\r\n\t\t\tin.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally{\r\n\t\t\tlog.info(\"Clientes activos: \"+ (taskExecutor.getThreadPoolExecutor().getActiveCount()-1));\t\t\t\r\n\t\t}\r\n\t}", "public void run() {\n try {\n peerBootstrap = createPeerBootStrap();\n\n peerBootstrap.setOption(\"reuseAddr\", true);\n peerBootstrap.setOption(\"child.keepAlive\", true);\n peerBootstrap.setOption(\"child.tcpNoDelay\", true);\n peerBootstrap.setOption(\"child.sendBufferSize\", Controller.SEND_BUFFER_SIZE);\n\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public void startRunning(){\r\n\t\ttry{\r\n\t\t\twhile( true ){\r\n\t\t\t\tserver = new ServerSocket(PORT);\r\n\t\t\t\ttry{\r\n\t\t\t\t\twaitForClient(1);\r\n\t\t\t\t\twaitForClient(2);\r\n\t\t\t\t\tnew ServerThread(connectionClient1, connectionClient2, this).start();\r\n\t\t\t\t}\r\n\t\t\t\tcatch( EOFException e ){\r\n\t\t\t\t\tshowMessage(\"\\nServer ended the connection\");\r\n\t\t\t\t}\r\n\t\t\t\tfinally {\r\n\t\t\t\t\tserver.close();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch( IOException e ){\r\n\t\t}\r\n\t}", "public void run()\n {\n try {\n clientSocket = serverSocket.accept();\n System.out.println(\"Client connected.\");\n clientOutputStream = new PrintWriter(clientSocket.getOutputStream(), true);\n clientInputStream = new BufferedReader( new InputStreamReader(clientSocket.getInputStream()));\n\n while(isRunning)\n {\n try {\n serverTick(clientSocket, clientOutputStream, clientInputStream);\n } catch (java.net.SocketException e)\n {\n //System.out.println(\"Network.Client closed connection. Ending server\");\n this.closeServer();\n }\n }\n } catch (Exception e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n\n /***Legacy Code for allowing multiple users. No point in spending time implementing\n * When this is just suppose to be one way communication\n\n try {\n acceptClients.join();\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n closeServer();\n */ }", "public static void main(String[] strings)\r\n {\r\n new Client().start();\r\n }", "public void run() {\n\t\trun(null, CommunicationDefaults.CONSOLE_PORT);\n\t}", "private void runServer() {\n while(true) {\n // This is a blocking call and waits until a new client is connected.\n Socket clientSocket = waitForClientConnection();\n handleClientInNewThread(clientSocket);\n } \n }", "static public void main(String[] args) throws IOException {\n port = (int) (Math.random() * ((65535 - 49152) + 1) + 49152);\n server = new ServerSocket(port);\n System.out.println(InetAddress.getLocalHost());\n System.out.println(\"Port: \" + port);\n while (true) {\n try {\n Socket socket = server.accept();\n MqttClient client = new MqttClient(socket);\n clients.add(client);\n client.start();\n } catch (IOException e) {\n System.out.println(\"Something failed.\");\n server.close();\n System.exit(0);\n }\n }\n }", "public static void main(String[] args){\n\n GameClientImpl client = new GameClientImpl();\n client.startConnection(\"127.0.0.1\", ProtocolConfiguration.PORT);\n\n }", "public void clientRunning() {\n\t\twhile (this.running) {\n\t\t\tString userInputString = textUI.getString(\"Please input (or type 'help'):\");\n\t\t\tthis.processUserInput(userInputString);\n\t\t}\n\t}", "@Override\n\tpublic void run(){\n\t\tInetAddress IPAddress = serverTcpSocket.getInetAddress();\n\t\tfor (ClientObj c: clients)\n\t\t\tif (c.getId() == client.getId()){\n\t\t\t\tSystem.out.print(IPAddress + \" Client already connected!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\ttry{\n\t\t\t// Check handshake received for correctness\n\t\t\t//(connect c->s) [herader | \"JUSTIN\\0\" | connection port] (udp)\n\t\t\t//(connect response s->c) [header | client id | port] (udp)\n\t \n\t // open the connection\n\t\t clientSocket = null;\n\t\t Socket clientListener = null;\n\t\t // wait for client connection on tcp port\n\t\t //serverTcpSocket.setSoTimeout(5000);\n\t \tSystem.out.println (\" Waiting for tcp connection.....\");\n\t \tclientSocket = serverTcpSocket.accept();\n\t \tclientListener = serverTcpSocket.accept();\n\t \tclient.setListenerSocket(clientListener);\n\t\t\tIPAddress = clientSocket.getInetAddress();\n\t\t\tint recv_port = clientSocket.getPort();\n\t\t\tSystem.out.println(IPAddress + \": Client connected @ port \" + recv_port);\n\n\t\t // handle tcp connection\n\t\t\tclientSocket.setSoTimeout(Constants.ACK_TIMEOUT);\n\t\t out = new BufferedOutputStream(clientSocket.getOutputStream());\n\t\t\tin = new BufferedInputStream(clientSocket.getInputStream());\n\t\t\tclient.setAddress(clientSocket.getInetAddress());\n\t\t\tclient.setPort(clientSocket.getPort());\n\t\t clients.add(client);\n\t\t\t\n\t\t // handle requests\n\t\t\twhile (!shutdown_normally) {\n\t\t\t\t// read just the header, then handle the req based on the info in the header\n\t\t\t\tif ((buf = Utility.readIn(in, Constants.HEADER_LEN)) == null)\n\t\t\t\t\tbreak;\n\t\t\t\tint flag = buf.getInt(0);\n\t\t\t\tint len2 = buf.getInt(4);\n\t\t\t\tint id = buf.getInt(8);\n\t\t\t\t\n\t\t\t\t// check for correctness of header\n\t\t\t\t\n\t\t\t\tif (flag < Constants.OPEN_CONNECTION || \n\t\t\t\t\t\tflag > Constants.NUM_FLAGS || \n\t\t\t\t\t\tid != client.getId() || \n\t\t\t\t\t\tlen2 < 0){\n\t\t\t\t\tout.close(); \n\t\t\t\t\tin.close(); \n\t\t\t\t\tclientSocket.close(); \n\t\t\t\t\tserverTcpSocket.close();\n\t\t\t\t\tclients.remove(client);\n\t\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\t\t\"Connection - FAILURE! (malformed header)\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// read payload\n\t\t\t\tif ((buf = Utility.readIn(in, Utility.getPaddedLength(len2))) == null)\n\t\t\t\t\tthrow new IOException(\"read failed.\");\n\t\t\t\t// update address (necessary?)\n\t\t\t\tclients.get(clients.indexOf(client)).setAddress(clientSocket.getInetAddress());\n\t\t\t\tclient.setAddress(clientSocket.getInetAddress());\n\t\t\t\tswitch (flag){\n\t\t\t\t\tcase Constants.ACK:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.VIEW_REQ:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing view request...\");\n\t\t\t\t\t\tViewFiles(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.DOWNLOAD_REQ:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing download request...\");\n\t\t\t\t\t\tDownload(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.UPLOAD_REQ:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing upload request...\");\n\t\t\t\t\t\tUpload(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.DOWNLOAD_ACK:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing download acknowledgment...\");\n\t\t\t\t\t\tDownloadCompleted(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.CLOSE_CONNECTION:\n\t\t\t\t\t\tshutdown_normally = true;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// close all open sockets\n\t\t out.close(); \n\t\t in.close(); \n\t\t clientSocket.close(); \n\t\t serverTcpSocket.close();\n\t\t} catch (SocketTimeoutException e) {\n\t\t\tSystem.err.println(IPAddress + \": Timeout waiting for response.\");\n\t\t} catch (UnknownHostException e) {\n\t\t\t// IPAdress unknown\n\t\t\tSystem.err.println(\"Don't know about host \" + IPAddress);\n\t\t} catch (IOException e) {\n\t\t\t// Error in communication\n\t\t\tSystem.err.println(\"Couldn't get I/O for the connection to \" +\n\t\t\t\t\tIPAddress);\n\t\t} catch (RuntimeException e){\n\t\t\t// Malformed Header or payload most likely\n\t\t\tSystem.err.println(IPAddress + \": Connection - FAILURE! (\" + e.getMessage() + \")\");\n\t\t} finally {\n\t\t\t// remove this client from active lists, close all (possibly) open sockets\n\t\t\tSystem.out.println(IPAddress + \": Connection - Closing!\");\n\t\t\tclients.remove(client);\n\t\t\ttry {\n\t\t\t\tSocket clientConnection = client.getListenerSocket();\n\t\t\t\tOutputStream out_c = new BufferedOutputStream(clientConnection.getOutputStream());\n\t\t\t\tbuf = Utility.addHeader(Constants.CLOSE_CONNECTION, 0, client.getId());\n\t\t\t\tout_c.write(buf.array());\n\t\t\t\tout_c.flush();\n\t\t\t\tout_c.close();\n\t\t\t\tclientConnection.close();\n\n\t\t\t\tif (out != null)\n\t\t\t\t\tout.close();\n\t\t\t\tif (in != null)\n\t\t\t\t\tin.close();\n\t\t\t\tif (!clientSocket.isClosed())\n\t\t\t\t\tclientSocket.close();\n\t\t\t\tif (!serverTcpSocket.isClosed())\n\t\t\t\t\tserverTcpSocket.close();\n\t\t\t} catch (IOException e){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n }", "public void run() {\n\t\tString choice = null;\n\t\tBufferedReader inFromClient = null;\n\t\tDataOutputStream outToClient = null;\n\t\t\n\t\ttry {\n\t\t\tinFromClient = new BufferedReader(new InputStreamReader(client.getInputStream()));\n\t\t\toutToClient = new DataOutputStream(client.getOutputStream());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\t// Loops until the client's connection is lost\n\t\t\twhile (true) {\t\n\t\t\t\t// Request that was sent from the client\n\t\t\t\tchoice = inFromClient.readLine();\n\t\t\t\tif(choice != null) {\n\t\t\t\t\tSystem.out.println(choice);\n\t\t\t\t\tswitch (choice) {\n\t\t\t\t\t\t// Calculates the next even fib by creating a new\n\t\t\t\t\t\t// thread to handle that calculation\n\t\t\t\t\t\tcase \"NEXTEVENFIB\":\n\t\t\t\t\t\t\tnew EvenFib(client).run();\n\t\t\t\t\t\t\t// Increments the fib index tracker so no duplicates\n\t\t\t\t\t\t\t// are sent\n\t\t\t\t\t\t\tServer.fib++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// Calculates the next even nextLargerRan by creating a new\n\t\t\t\t\t\t// thread to handle that calculation\n\t\t\t\t\t\tcase \"NEXTLARGERRAND\":\n\t\t\t\t\t\t\tnew NextLargeRan(client).run();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// Calculates the next prime by creating a new\n\t\t\t\t\t\t// thread to handle that calculation\n\t\t\t\t\t\tcase \"NEXTPRIME\":\n\t\t\t\t\t\t\tnew NextPrime(client).run();\n\t\t\t\t\t\t\t// Increments the prime index tracker so no duplicates\n\t\t\t\t\t\t\t// are sent\n\t\t\t\t\t\t\tServer.prime++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// Displays that the client it was connected to\n\t\t\t// has disconnected\n\t\t\tSystem.out.println(\"Client Disconnected\");\n\t\t}\n\n\t}", "public static void main(String[] args) {\n Client client = new Client();\n client.start();\n }", "protected void mainTask() {\n\ttry {\n\t socket = serverSocket.accept();\t\n\t spawnConnectionThread(socket);\n\t} catch (IOException e) {\n\t return;\n\t}\n }", "private void manageClients() {\n manage = new Thread(\"Manage\") {\n public void run() {\n //noinspection StatementWithEmptyBody\n while (running) {\n sendToAll(\"/p/server ping/e/\".getBytes());\n try {\n Thread.sleep(1500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n //noinspection ForLoopReplaceableByForEach\n for (int i = 0; i < clients.size(); i++) {\n ServerClient tempClient = clients.get(i);\n if (!clientResponse.contains(tempClient.getID())) {\n if (tempClient.getAttempt() >= MAX_ATTEMPTS)\n disconnect(tempClient.getID(), false);\n else\n tempClient.setAttempt(tempClient.getAttempt() + 1);\n } else {\n clientResponse.remove(new Integer(tempClient.getID()));\n tempClient.setAttempt(0);\n }\n }\n }\n }\n };\n manage.start();\n }", "public void runServer() {\n\t\tint i = 0;\n\n\t\tclientList = new ArrayList<>();\n\t\ttry {\n\t\t\tServerSocket listener = new ServerSocket(port);\n\n\t\t\tSocket server;\n\n\t\t\tprintDetails();\n\n\t\t\twhile ((i++ < maxConnections) || (maxConnections == 0)) {\n\n\t\t\t\tserver = listener.accept();\n\t\t\t\tSession session = new Session(server, this.storageLocation );\n\n\t\t\t\tnew Thread(session).start();\n\n\t\t\t\tString name = session.getName();\n\t\t\t\tSystem.out.printf(\"%s STARTED\\r\\n\", name );\n\t\t\t\tclientList.add( session );\n\t\t\t\tdoGC();\n\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\tSystem.out.println(\"IOException on socket listen: \" + ioe);\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}", "private static void runClient() {\n long clientStartTime = System.currentTimeMillis();\n \n // Pick a random entry point\n int entryPointId = random.nextInt(entryPointAddresses.size());\n String[] ep = entryPointAddresses.get(entryPointId);\n String entryPointCode = ep[0];\n String entryPointAddress = ep[1];\n \n // User number and id\n int userCount = COUNT.incrementAndGet();\n String userToken = (clientLocation + userCount + \"-\" + Math.abs(random.nextInt(1000)));\n User u = USER_RESOLVER.resolve(userToken);\n \n // Point the client to the entry point\n WebTarget webTarget = entryPointTarget(entryPointAddress, userToken);\n EntryPointResponse response = new EntryPointResponse(null, null);\n try {\n String responseJson = webTarget.request(MediaType.APPLICATION_JSON).get(String.class);\n response = Jsons.fromJson(responseJson, EntryPointResponse.class);\n } catch (Exception e) {\n LOG.log(Level.SEVERE, String.format(\"Could not load responses from entry point %s: %s\", ep[0], ep[1]));\n LOG.log(Level.SEVERE, \"Attempted to connect with: \" + webTarget.getUri().toString());\n }\n \n // current time after the response\n long clientEndTime = System.currentTimeMillis(); \n \n Double latency = null;\n if (response.getRedirectAddress() != null) {\n latency = latencies.get(response.getRedirectAddress());\n }\n \n writer.writeCsv(LOG_LENS, \n sdf.format(new Date()),\n clientStartTime - Main.clientStartTime,\n userCount,\n Main.clientLocation,\n entryPointCode,\n response.getSelectedCloudSiteCode(),\n clientEndTime - clientStartTime,\n latency == null ? \"null\" : String.format(\"%.2f\", latency),\n userToken,\n Arrays.toString(u.getCitizenships().toArray()),\n Arrays.toString(u.getTags().toArray()),\n response.getDefinition() == null ? \"null\" : response.getDefinition().getProviderCode(),\n response.getDefinition() == null ? \"null\" : response.getDefinition().getLocationCode(),\n response.getDefinition() == null ? \"null\" : Arrays.toString(response.getDefinition().getTags().toArray()),\n response.getDefinition() == null ? \"null\" : response.getDefinition().getCost()\n );\n //writer.flush();\n }", "public void run() {\n ServerSocketChannelFactory acceptorFactory = new OioServerSocketChannelFactory();\n ServerBootstrap server = new ServerBootstrap(acceptorFactory);\n\n // The pipelines string together handlers, we set a factory to create\n // pipelines( handlers ) to handle events.\n // For Netty is using the reactor pattern to react to data coming in\n // from the open connections.\n server.setPipelineFactory(new EchoServerPipelineFactory());\n\n server.bind(new InetSocketAddress(port));\n }", "public void start(){\n log.debug(\"Starting Host Router\");\n lobbyThread = pool.submit(new Runnable() {\n public void run() {\n waitForClients();\n }\n });\n }", "@Override\n\t\t\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tinitBroadCastClient();\n\t\t\t\t\t\t\t\t\tReceivePublicKey();\n\t\t\t\t\t\t\t\t\tReceiveEncryptPrice();\n\t\t\t\t\t\t\t\t\tgenerateEProduct();\n\t\t\t\t\t\t\t\t\tsendEProduct();\n\t\t\t\t\t\t\t\t\tGarbleCircuits();\n\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "public void startRunning() {\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tserver = new ServerSocket(6789, 100); //6789 is the port number for docking(Where to connect). 100 is backlog no, i.e how many people can wait to access it.\n\t\t\t\twhile (true) {\n\t\t\t\t\t//This will run forever.\n\t\t\t\t\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\t\n\t\t\t\t\t\twaitForConnection();\n\t\t\t\t\t\tsetupStreams();\n\t\t\t\t\t\twhileChatting();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tcatch(EOFException eofException) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tshowMessage(\"\\n The server has ended the connection!\");\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfinally {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcloseAll();\n\t\t\t\t\t\t//Housekeeping.\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tcatch(IOException ioException ) {\n\t\t\t\t\n\t\t\t\tioException.printStackTrace();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "public static void main(String[] args) throws InterruptedException {\n Constants.updateConstants(args, Constants.NodeType.ChatClient);\n\n GeneralUtils.promptUserOptions(args, Constants.NodeType.ChatClient, \"-cca\", \"-ccp\", \"-user\", \"-name\");\n\n ClientNetwork client = ClientUtils.initNetwork();\n Data db = new Data();\n\n MainChatWindowController clientInterface = ClientUtils.setupClientGUI(args);\n clientInterface.setOnClose(event -> {\n if(!client.isNetworkClosed() && !client.isConnectionLost()) {\n client.logOff();\n }\n client.setNetworkClosed(true);\n });\n ClientUtils.initInterface(clientInterface, client, db);\n\n }", "public void run() {\n Runtime.getRuntime().addShutdownHook(new MNOSManagerShutdownHook(this));\n\n OFNiciraVendorExtensions.initialize();\n\n this.startDatabase();\n\n try {\n final ServerBootstrap switchServerBootStrap = this\n .createServerBootStrap();\n\n this.setServerBootStrapParams(switchServerBootStrap);\n\n switchServerBootStrap.setPipelineFactory(this.pfact);\n final InetSocketAddress sa = this.ofHost == null ? new InetSocketAddress(\n this.ofPort) : new InetSocketAddress(this.ofHost,\n this.ofPort);\n this.sg.add(switchServerBootStrap.bind(sa));\n }catch (final Exception e){\n throw new RuntimeException(e);\n }\n\n }", "public static void main(String[] args) {\n ServerSocket serverSocket = null;\n \n /* Create the server socket */\n try {\n serverSocket = new ServerSocket(9999);\n } catch (IOException e) {\n System.out.println(\"IOException: \" + e);\n System.exit(1);\n }\n room r = new room(\"Lobby\");\n ChatServerThread.addRoom(r);\n /* In the main thread, continuously listen for new clients and spin off threads for them. */\n while (true) {\n try {\n /* Get a new client */\n Socket clientSocket = serverSocket.accept();\n \n /* Create a thread for it and start! */\n ChatServerThread clientThread = new ChatServerThread(clientSocket);\n ChatServerThread.addClient(clientThread);\n new Thread(clientThread).start();\n\n } catch (IOException e) {\n System.out.println(\"Accept failed: \" + e);\n System.exit(1);\n }\n }\n }", "public void startRunning(){\n\t\ttry{\n\t\t\tserver = new ServerSocket(6789, 100);\n\t\t\t//int Port Number int 100 connections max (backlog / queue link)\n\t\t\twhile(true){\n\t\t\t\ttry{\n\t\t\t\t\twaitForConnection();\n\t\t\t\t\tsetupStreams();\n\t\t\t\t\twhileChatting();\n\t\t\t\t\t//connect and have conversation\n\t\t\t\t}catch(EOFException eofe){\n\t\t\t\t\tshowMessage(\"\\n Punk Ass Bitch.\");\n\t\t\t\t}finally{\n\t\t\t\t\tcloseChat();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(IOException ioe){\n\t\t\tioe.printStackTrace();\n\t\t\t\n\t\t}\n\t}", "@Override\n public void run() {\n try{\n System.out.println(\"A new client is trying to connect\");\n inputFromClient = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n outputFromServer = new PrintWriter(socket.getOutputStream(),true);\n retrievingClientInformation(); // Identifies clients\n sendPreviousMessagesToClient(); // Sends last 15 messages to new comers\n while (clientConnected) // It will execute until client sends a signal to disconnect\n {\n readMessagesFromClients(); // Reads a client inputs then sends them to other clients\n }\n }catch (IOException ioException)\n {\n \tSystem.out.println(username + \" has left the chat.\"); // Announce client's disconnection on server\n }finally {\n try\n {\n socket.close();\n }catch (IOException ioException)\n {\n \tSystem.out.println(username + \" has left the chat.\"); // Announce client's disconnection on server\n }\n }\n }", "public static void main(String[] args) {\n new ClientMain();\n\n }", "public static void main(String args[]) {\n int portNumber = 2228;\r\n if (args.length < 1) {\r\n System.out.println(\"Usage: java MultiThreadChatServerSync <portNumber>\\n\"\r\n + \"Now using port number=\" + portNumber);\r\n } else {\r\n portNumber = Integer.valueOf(args[0]);\r\n }\r\n\r\n try {\r\n serverSocket = new ServerSocket(portNumber);\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n\r\n /*\r\n * Create a client socket for each connection and pass it to a new client\r\n * thread.\r\n */\r\n while (true) {\r\n try {\r\n clientSocket = serverSocket.accept();\r\n int i = 0;\r\n for (i = 0; i < maxClientsCount; i++) {\r\n if (threads[i] == null) {\r\n (threads[i] = new clientThread(clientSocket, threads, history, userList)).start();\r\n break;\r\n }\r\n }\r\n if (i == maxClientsCount) {\r\n PrintStream os = new PrintStream(clientSocket.getOutputStream());\r\n os.println(\"Server too busy. Try later.\");\r\n os.close();\r\n clientSocket.close();\r\n }\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n }\r\n }", "public void clientStart()\n\t{\n\t\tint cnt = 0;\n\t\tfor(ConnectionThread i : connectionPool)\n\t\t{\n\t\t\ti.sendMessage(\"Rock and Roll\");\n\t\t\taddText(\"send start signal to Player\" + cnt++);\n\t\t}\n\t\tchangePicture();\n\t}", "public void Connect() {\n run = new Thread(\"Connect\") {\n @Override\n public void run() {\n running = true;\n try {\n server = new ServerSocket(9080);\n waitingForConnection();\n } catch (IOException ex) {\n Logger.getLogger(Dashboard.class\n .getName()).log(Level.SEVERE, null, ex);\n }\n }\n };\n run.start();\n }", "public static void main (String[] args) {\r\n\t\tClient client = new Client(args);\r\n\t\tclient.run();\r\n\t}", "public void start() {\n // set player number\n playerNumber = clientTUI.getInt(\"set player number (2-4):\");\n while (true) {\n try {\n game = new Game();\n game.setPlayerNumber(playerNumber - 1);\n host = this.clientTUI.getString(\"server IP address:\");\n port = this.clientTUI.getInt(\"server port number:\");\n clientName = this.clientTUI.getString(\"your name:\");\n player = clientTUI.getBoolean(\"are you human (or AI): (true/false)\") ?\n new HumanPlayer(clientName) : new ComputerPlayer(clientName);\n game.join(player);\n // initialize the game\n game.init();\n while (clientName.indexOf(' ') >= 0) {\n clientName = this.clientTUI.getString(\"re-input your name without space:\");\n }\n this.createConnection();\n this.sendJoin(clientName);\n this.handleJoin();\n if (handshake) {\n run();\n } else {\n if (!this.clientTUI.getBoolean(\"Do you want to open a new connection?\")) {\n shutdown();\n break;\n }\n }\n } catch (ServerUnavailableException e) {\n clientTUI.showMessage(\"A ServerUnavailableException error occurred: \" + e.getMessage());\n if (!clientTUI.getBoolean(\"Do you want to open a new connection?\")) {\n shutdown();\n break;\n }\n }\n }\n clientTUI.showMessage(\"Exiting...\");\n }", "public static void main(String[] args){\n \n Chat m = new Chat();\n m.connectChat(new String[]{\"100.1.215.220\",\"8889\"});\n //m.runServer(new String[]{\"192.168.1.164\",\"8889\"});\n }", "@Override\n public void run() {\n String id = (identifier != \"\") ? identifier : socket.getInetAddress().toString();\n\n LOGGER.info(\"Got connection from \" + id + \".\");\n peerInput = new PeerInput(socket);\n peerInput.start();\n peerOutput = new PeerOutput(socket);\n initialized = true;\n LOGGER.info(\"Initialized connection \" + id);\n peerOutput.run();\n }", "@Override\n public void run(){\n System.out.println(clientID+\" run\");\n open();\n if(isHost){ //HostClient listening\n try{\n controller.sendHostAddress(ip, port);\n socket = hostSocket.accept();\n System.out.println(clientID+\": run: accept\");\n close(); //closes hostSocket\n connected = true;\n open(); //gets streams\n controller.sendConnect(); \n }catch(IOException e){\n System.out.println(clientID+\": run: accept: failed: IOException: \"+e);\n }\n }\n while(connected){ //interprets requests from other client\n try{\n String request = streamIn.readUTF();\n System.out.println(clientID+\": receive: \"+request);\n String response[] = request.split(\"<&>\");\n controller.interpretRequest(response);\n }catch(IOException ioe){\n System.out.println(clientID+\": receive: failed: IOException:\"+ioe);\n connected = false; \n }\n }\n }", "public void run() {\n\t\ttry {\n\t\t\ttryToConnect();\n\t\t\tif(!fromServer.equals(null) && fromServer.equals(\"VALIDATED\")){\n\t\t\t\tmsg(\"Connected Successfully and was Validated\");\n\t\t\t\tClient.updateConnectedClients(id);\n\t\t\t\tmsg(\"connectedClients array index = \" +id+ \" \" +Client.connectedClients[id]);\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tmsg(\"Waiting for another session to connect\");\n\t\t\t\twhile(!fromServer.equals(\"VALIDATED\")) tryToConnect();\n\t\t\t}\n\t\t\t\n\t\t\t//validated threads should continue\n\t\t\tfromServer = in.readLine();\n\t\t\twhile(!fromServer.equals(null)){\n\t\t\t\tif(fromServer.equals(\"sorry\"))return; //it's the end of the day, go home\n\t\t\t\tif(fromServer.equals(\"MOVIEPLAYING\")){\n\t\t\t\t\tmsg(\"Am watching movie now.\");\n\t\t\t\t}\n\t\t\t\tif(fromServer.equals(\"done\"))return;\n\t\t\t\tfromServer = in.readLine();\n\t\t\t}\n\t\t\t\t\n\t\n\t\t}catch (UnknownHostException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void run()\n\t{\n\t\t// Variables for setting up connection and communication\n\t\tSocket socket = null; // socket to connect with ServerRouter\n\n\t\tint SockNum = 5555; // port number\n\n\t\t// Tries to connect to the ServerRouter\n\t\ttry\n\t\t{\n\t\t\tif (RunningOnLocalMachine)\n\t\t\t\trouterName = \"127.0.0.1\";\n\t\t\tsocket = new Socket(routerName, SockNum, null, PortToRunOn());\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tERROR(\"Couldn't get I/O for the connection to: \" + routerName);\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\tout = new PrintWriter(socket.getOutputStream(), true);\n\t\t\tin = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\tout.println(testChoice); //initial send test choice (MUST)\n\t\t\tPRINT(\"Test choice \\'\" + testChoice + \"\\' was sent to the server router\");\n\t\t\tString fromClient = in.readLine();// initial receive from router (verification of connection)\n\t\t\tout.println(fromClient);// initial send (IP of the destination Client)\n\t\t\tPRINT(\"ServerRouter: \" + fromClient);\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\tERROR(\"Couldn't get I/O for the connection\");\n\t\t}\n\n\t\t//since connection now set up, actually run test\n\t\tRunTest(socket);\n\n\t\t//clean up socket\n\t\ttry\n\t\t{\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\tsocket.close();\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\tERROR(\"Error when closing socket\");\n\t\t}\n\t\tPRINT(\"Thread Closed\");\n\t}", "public static void main(String[] args) {//Èë¿Ú\n\t\tinitLog4j();\n\t\tlogger.info(\"Client launched successfully\");\n\t\t\n\n\t\t// Application logic\n\t\tApplicationLogic applicationLogic = new ApplicationLogic();\n\n\t\tsysReader = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str = null;\n\t\twhile (true) {\n\t\t\tSystem.out.print(\"EchoClient> \");\n\t\t\t// Read from system input\n\t\t\ttry {\n\t\t\t\tstr = sysReader.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Failed to read from system input\");\n\t\t\t\tlogger.error(\"Failed to read from system input\");\n\t\t\t}\n\t\t\tif (!str.trim().equals(\"\")) {\n\t\t\t\t// Get command\n\t\t\t\tString[] token = str.split(\" \");\n\t\t\t\tString cmd = token[0];\n\t\t\t\t// Send\n\t\t\t\tif (cmd.equals(\"send\")) {\n\t\t\t\t\tString msg = str.substring(4, str.length()).trim();\n\t\t\t\t\tif (!msg.equals(\"\")) {\n\t\t\t\t\t\tapplicationLogic.send(msg);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// connect\n\t\t\t\telse if (cmd.equals(\"connect\")) {\n\t\t\t\t\tint length = token.length;\n\t\t\t\t\tif (length == 3) {\n\t\t\t\t\t\t// Get remote server address and port\n\t\t\t\t\t\tString add = token[1];\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tint port = Integer.parseInt(token[2]);\n\t\t\t\t\t\t\tString REMOTE_IP = add;\n\t\t\t\t\t\t\tint REMOTE_PORT = port;\n\t\t\t\t\t\t\tapplicationLogic.connect(REMOTE_IP, REMOTE_PORT);\n\t\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\t\tSystem.out.println(\"Illigal port format\");\n\t\t\t\t\t\t\tlogger.warn(\"Illigal port format\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Wrong format\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Connect command should be as follow:\\nconnect <address> <port>\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// disconnect\n\t\t\t\telse if (cmd.equals(\"disconnect\")) {\n\t\t\t\t\tapplicationLogic.disconnect();\n\t\t\t\t}\n\t\t\t\t// logLevel\n\t\t\t\telse if (cmd.equals(\"logLevel\")) {\n\t\t\t\t\tint length = token.length;\n\t\t\t\t\tif (length == 2) {\n\t\t\t\t\t\t// Get logLevel\n\t\t\t\t\t\tString logLevel = token[1];\n\t\t\t\t\t\tapplicationLogic.logLevel(logLevel);\n\t\t\t\t\t}\n\t\t\t\t\t// Wrong format\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"logLevel command should be as follow:\\nlogLevel <Level> \");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// help\n\t\t\t\telse if (cmd.equals(\"help\")) {\n\t\t\t\t\tapplicationLogic.help();\n\t\t\t\t}\n\t\t\t\t// quit\n\t\t\t\telse if (cmd.equals(\"quit\")) {\n\t\t\t\t\tapplicationLogic.quit();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// other inputs\n\t\t\t\telse {\n\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.println(\"Incorrect command, please try again or input 'help'\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void run() {\n try {\n //Create the input object stream and output object stream for this client\n toClient = new ObjectOutputStream(client.getOutputStream());\n fromClient = new ObjectInputStream(client.getInputStream());\n login = false;\n\n while (!login) {/*Wait for a client to login*/\n try {\n receviedProtocol = (Protocol) fromClient.readObject();\n if (receviedProtocol.getMethod().equals(\"HELP\"))\n sendHelpMenu();\n else if (receviedProtocol.getMethod().equals(\"LOGIN\")) {\n authorize(receviedProtocol);\n login = true;\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n logout = false;\n while (!logout) {/*Keep conncetion between client and server until the client logout*/\n try{\n receviedProtocol = (Protocol)fromClient.readObject(); //Wait for client input\n startIndex = 0;//This will be used to track the starting point of next n groups to be send\n if(receviedProtocol.getMethod().equals(\"AG\"))\n allGroupHandler(receviedProtocol);\n else if(receviedProtocol.getMethod().equals(\"LOGOUT\")){\n logout();\n logout = true;\n }\n }catch (Exception e){\n e.printStackTrace();\n }\n\n }\n\n } catch (IOException e) {\n System.out.println(e);\n\n } finally {\n try {\n client.close();\n } catch (IOException e) {\n System.out.println(e);\n }\n }\n }", "@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tthis.sendMessage(Response.WELCOME_MESSAGE);\n\t\t\t// Get new command from client\n\t\t\twhile (true) {\n\t\t\t\tthis.executeCommand();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// If a exception is catch we just close the client connection\n\t\t\ttry {\n\t\t\t\tthis.close();\n\t\t\t} catch (IOException e1) {\n\t\t\t\t/// just throw the exception of the close\n\t\t\t\tthrow new RuntimeException(e1);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tClient1 win = new Client1();\n\t\twin.performCallback(3);\n\n\t}", "public static void main(String[] args) {\n\t\t/* DONE: Launch ChatClient from this main method\n\t\t *\n\t\t * Helpful link:\n\t\t * https://docs.oracle.com/javase/8/javafx/api/javafx/application/Application.html#launch-java.lang.Class-java.lang.String...-\n\t\t */\n\t\tApplication.launch(ChatClient.class, args);\n\t}", "public static void main(String[] args) {\n try {\n new Client().run(args);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n System.out.println(\"xxxx\");\n Client.runFactory();\n }", "public static void main(String[] args) throws IOException {\n ServerSocket server = new ServerSocket(8080);\n ExecutorService service = Executors.newCachedThreadPool();\n while (true) {\n Socket socket = server.accept();\n System.out.println(\"Client accept\");\n service.submit(new ClientSession(socket));\n }\n\n }", "public void run() {\n int c;\n\n // Run forever, which is common for server style services\n while (true) {\n\n // Wait until someone connects, and indicate this to the user.\n try {\n Socket clientSocket = serverSocket.accept();\n System.out.println(\"Accepted connection from client.\");\n\n // Grab the input/output streams so we can write/read directly to/from them\n OutputStream os = clientSocket.getOutputStream();\n DataInputStream is = new DataInputStream(clientSocket.getInputStream());\n\n // While there is valid input to be read...\n while ( (c = is.read()) != -1) {\n // Write that input back into the output stream, and send it all immediately.\n os.write(c);\n os.flush();\n }\n\n // Close the streams/client socket since we're done.\n System.out.println(\"Closing client connection\");\n os.close();\n is.close();\n clientSocket.close();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n public void run() {\n ApplicationInfo ai = null;\n try {\n ai = MainActivity.getAppContext().getPackageManager().getApplicationInfo(MainActivity.getAppContext().getPackageName(), PackageManager.GET_META_DATA);\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n }\n String brokerAddress = (String) ai.metaData.get(\"BROKER_ADDRESS\");\n int brokerPort = (int) ai.metaData.get(\"BROKER_PORT\");\n\n // configurazione delle proprietà del broker e avvio del server relativo\n Properties properties = new Properties();\n properties.setProperty(BrokerConstants.HOST_PROPERTY_NAME, brokerAddress);\n properties.setProperty(BrokerConstants.PORT_PROPERTY_NAME, String.valueOf(brokerPort));\n properties.setProperty(BrokerConstants.PERSISTENT_STORE_PROPERTY_NAME, Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + BrokerConstants.DEFAULT_MOQUETTE_STORE_MAP_DB_FILENAME);\n MemoryConfig memoryConfig = new MemoryConfig(properties);\n Server mqttBroker = new Server();\n try {\n mqttBroker.startServer(memoryConfig);\n } catch (IOException e) {\n e.printStackTrace();\n }\n Log.i(TAG, \"Server Started\");\n }", "public static void main(String[] args) {\n\t\tString host = \"127.0.0.1\";\n\t\tint port = 5000;\n\n\t\ttry {\n\t\t\tMonitorClient mc = new MonitorClient(host, port);\n\t\t\tMonitorClientApp ma = new MonitorClientApp(mc);\n\n\t\t\t// do stuff w/ the connection\n\t\t\tSystem.out.println(\"Creating message\");\n\t\t\tClusterMonitor msg = ma.sendDummyMessage();\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"Sending generated message\");\n\t\t\tmc.write(msg);\n\t\t\t\n\t\t\tSystem.out.println(\"\\n** exiting in 10 seconds. **\");\n\t\t\tSystem.out.flush();\n\t\t\tThread.sleep(10 * 1000);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t\n\t\t}\n\t}", "public void run() {\n running = true;\n System.out.println(\"Server started on port: \" + port);\n manageClients();\n receive();\n startConsole();\n }", "public static void main(String[] args) {\n\t\ttry {\t\t\t\t\t\n\t\t\tTerminal terminal= new Terminal(\"Client\");\t\t\n\t\t\t(new Client(terminal, DEFAULT_DST_NODE, DEFAULT_DST_PORT, DEFAULT_SRC_PORT)).start();\n\t\t\tterminal.println(\"Program completed\");\n\t\t} catch(java.lang.Exception e) {e.printStackTrace();}\n\t}", "@Override\n public void run() {\n //Create server socket\n try (ServerSocket serverSocket = new ServerSocket(serverPort))\n {\n //In loop to continuously accept connections from client\n //main thread doing this\n while (true)\n {\n System.out.println(\"Waiting for client(s) to connect..\");\n //Socket represents connection to client\n Socket clientSocket = serverSocket.accept();\n System.out.println(\"Accepted connection from \" + clientSocket);\n //Message to write to client when connected via outputstream\n OutputStream outputStream = clientSocket.getOutputStream();\n outputStream.write((\"You have connected. Please write: login <username> to login!\\n\" + \"Write <help> for list of additional commands!\\n\").getBytes());\n //Server worker, handles communication with client socket\n ServerWorker worker = new ServerWorker(this, clientSocket);\n //Adding worker to workerlist\n workerList.add(worker);\n //Starting thread worker\n worker.start();\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tgotoConnectActivity();\n\t\t\t}", "public void run() {\n\t\tTestTool.log(mPort + \"[AutoSender] waiting...\");\n\t\twhile (mUserList.size() < 2) {\n\t\t\ttry {\n\t\t\t\tmClientEvent.trigger(EE.client_command_getListUser, null);\n\t\t\t\tThread.sleep(1000);\n\t\t\t\tif (mUserList.size() >= 2) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (InterruptedException e) { e.printStackTrace(); }\n\t\t}\n\t\tTestTool.log(mPort + \"[AutoSender] ...okay\");\n\n\t\t\n\t\tint count = 0;\n\t\twhile (mIsRunning && count++ < 5) {\n\t\t\tJSONObject msg = autoCreateMessage(count);\n\t\t\tTestTool.log(mPort + \"[AutoSender: run] sending message:\", msg);\n\t\t\tmMessengerUser.addMessage(msg);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tThread.sleep((int) Math.random() * 1000);\n\t\t\t} catch (InterruptedException e) { e.printStackTrace(); }\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\r\n\t\t\r\n\t\tServerSocket serverSocket = null;\r\n\t\tSocket clientSocket = null;\r\n\t\tBufferedReader read = null;\r\n\t\tDataOutputStream write = null;\r\n\t\t\r\n\t\t// Attempt to open a server socket for inbound connections\r\n\t\ttry {\r\n\t\t\tserverSocket = new ServerSocket(SERVERPORT);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(\"Failed to open server socket\");\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\t\r\n\t\t// Wait for a client to connect \r\n\t\tSystem.out.println(\"Waiting ...\");\r\n\t\ttry {\r\n\t\t\t// This will block until someone trys to connect\r\n\t\t\tclientSocket = serverSocket.accept();\r\n\t\t\t\r\n\t\t\t// Get our input and output classes\r\n\t\t\tread = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));\r\n\t\t\twrite = new DataOutputStream(clientSocket.getOutputStream());\r\n\t\t\tSystem.out.println(\"Client connection from \" + clientSocket.getInetAddress());\r\n\t\t\t\r\n\t\t\t// This will continue until the clients types \"/quit\" or otherwise drops the connection\r\n\r\n Scanner writer = new Scanner(System.in);\r\n\r\n\t\t\twhile (true) {\r\n//\t\t\t\tString line = read.readLine();\r\n//\t\t\t\tSystem.out.println(line);\r\n//\t\t\t\tif (\"/quit\".equalsIgnoreCase(line)) {\r\n//\t\t\t\t\tSystem.out.println(\"Closing connection with \" + clientSocket.getInetAddress());\r\n//\t\t\t\t\tbreak;\r\n//\t\t\t\t}\r\n\t\t\t\tThread t = new ClientTaker(clientSocket, read, write);\r\n//\t\t\t\tSystem.out.printf(\"-> \");\r\n//\t\t\t\tline = writer.nextLine();\r\n//\t\t\t\tline += \"\\r\\n\";\r\n//\t\t\t\twrite.writeBytes(line);\r\n\t\t\t\tt.start();\r\n\t\t\t}\r\n\t\t} catch (SocketException e) {\r\n\t\t\tSystem.out.println(\"Client connection was disconnected\");\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tread.close();\r\n\t\t\twrite.close();\r\n\t\t\tserverSocket.close();\r\n\t\t}\r\n\t\t\r\n\t}", "public void run() {\n\t\ttry {\n\t\t\tinternalSocket = new Socket(\"localhost\", getPort());\n\t\t\tin = new ObjectInputStream(socket.getInputStream());\n\n\t\t\tinternalOut = new ObjectOutputStream(\n\t\t\t\t\tinternalSocket.getOutputStream());\n\t\t} catch (IOException e1) {\n\t\t\tconsoleOut(MESSAGE_ERROR_EXEC);\n\t\t\treturn;\n\t\t}\n\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tString message = in.readUTF();\n\n\t\t\t\t// take message and redirect this message to\n\t\t\t\t// second console\n\t\t\t\tsendMessage(message);\n\n\t\t\t\tif (message.equalsIgnoreCase(\"bye\")) {\n\t\t\t\t\tclose();\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} catch (Exception efEx) {\n\t\t\t\tconsoleOut(MESSAGE_ERROR_EXEC);\n\t\t\t\ttry {\n\t\t\t\t\tclose();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tconsoleOut(MESSAGE_ERROR_EXEC);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public void setUpNetworking() throws Exception {\n this.serverSock = new ServerSocket(4242);\n\n groupChats = new HashMap<String, ArrayList<String>>();\n groupMessages = new HashMap<String, ArrayList<String>>();\n groupMessages.put(\"Global\", new ArrayList<String>());\n\n int socketOn = 0;\n\n while (true) {\n\n Socket clientSocket = serverSock.accept();\n System.out.println(\"Received connection \" + clientSocket);\n\n ClientObserver writer = new ClientObserver(clientSocket.getOutputStream());\n\n Thread t = new Thread(new ClientHandler(clientSocket, writer));\n t.start();\n System.out.println(\"Connection Established\");\n socketOn = 1;\n }\n }", "public static void main(String[] args) {\n Bank bank = new Bank();\n\n bank.addAccount(new Account(\"Acc_01\", 100));\n bank.addAccount(new Account(\"Acc_02\", 120));\n bank.addAccount(new Account(\"Acc_03\", 50));\n\n Client client1 = new Client(bank, \"Acc_01\", new ArrayList<>(Arrays.asList(\"-50\", \"+20\", \"-90\", \"-50\")));\n Client client2 = new Client(bank, \"Acc_01\", new ArrayList<>(Arrays.asList(\"+10\", \"-30\", \"-45\", \"+20\")));\n\n new Thread(client1).start();\n new Thread(client2).start();\n\n }", "public void run() {\n debugOutput(\"Current working directory \" + this.currDirectory);\n try {\n // Input from client\n controlIn = new BufferedReader(new InputStreamReader(controlSocket.getInputStream()));\n\n // Output to client, automatically flushed after each print\n controlOutWriter = new PrintWriter(controlSocket.getOutputStream(), true);\n\n // Greeting\n sendMsgToClient(\"220 Welcome to the COMP4621 FTP-Server\");\n\n // Get new command from client\n while (!quitCommandLoop) {\n executeCommand(controlIn.readLine());\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n // Clean up\n try {\n controlIn.close();\n controlOutWriter.close();\n controlSocket.close();\n debugOutput(\"Sockets closed and worker stopped\");\n } catch (IOException e) {\n e.printStackTrace();\n debugOutput(\"Could not close sockets\");\n }\n }\n\n }", "public static void main(String[] args){\n\t\t/**************************************************\n\t\t * \t\t\tProcess command line arguments\n\t\t * ************************************************/\n\t\tboolean server = false;\n\t\tint nclients = 1;\n\t\tString url = null; \n\t\tint broadcastClock = DEFAULT_BROADCAST_CLK_PERIOD;\n\t\tint port = DEFAULT_PORT;\n\t\t\n\t\tfor (int i = 0; i != args.length; ++i) {\n\t\t\tif (args[i].startsWith(\"-\")) {\n\t\t\t\tString arg = args[i];\n\t\t\t\tif(arg.equals(\"-server\")) {\n\t\t\t\t\tserver = true;\n\t\t\t\t\tnclients = Integer.parseInt(args[++i]);\n\t\t\t\t} else if(arg.equals(\"-connect\")) {\n\t\t\t\t\turl = args[++i];\n\t\t\t\t}else if(arg.equals(\"-port\")) {\n\t\t\t\t\tport = Integer.parseInt(args[++i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tInetAddress address;\n\t\ttry {\n\t\t\taddress = InetAddress.getByName(DEFAULT_HOST);\n\t\t\tGame game = new Game();\n\t\t\tParser p = new Parser(game);\n\t\t\tgame = p.createGameFromFiles(1);\n\t\t\trunServer(address, DEFAULT_PORT, 1, DEFAULT_BROADCAST_CLK_PERIOD, PLAYER_UID++, game, 1);\n\t\t} catch (UnknownHostException e) {\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void run() {\r\n\t\ttry {\r\n\t\t\toutput = clientSocket.getOutputStream();\r\n\t\t\tinput = clientSocket.getInputStream();\r\n\t\t// send initial message on connect\r\n\t\t\tsendMessage(new common.messages.KVAdminMessage(\"connect\", \"CONNECT_SUCCESS\", \"\", \"\")); \r\n\r\n\t\t\r\n\t\t\twhile(isOpen) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// Receive the KV Message from Client and check if it is valid\r\n\t\t\t\t\tcommon.messages.KVMessage latestMsg = receiveMessage();\r\n\t\t\t\t\tif (latestMsg.validityCheck() == null) {\r\n\t\t\t\t\t\t// If it is valid Handle the message by calling the function in KVServer\r\n\t\t\t\t\t\tcommon.messages.KVMessage returnMsg = m_server.handleClientMessage(latestMsg);\r\n\t\t\t\t\t\tif (returnMsg.validityCheck() == null) {\r\n\t\t\t\t\t\t\t// If returned KVMessage was valid send it back to the client\r\n\t\t\t\t\t\t\tif (returnMsg.getStatus().equals(\"SERVER_STOPPED\") || returnMsg.getStatus().equals(\"SERVER_WRITE_LOCK\") || returnMsg.getStatus().equals(\"SERVER_NOT_RESPONSIBLE\")){\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Last command from client \" + latestMsg.getHeader() + \" was not processed by Server.\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Last command from client \" + latestMsg.getHeader() + \" was Successfully Processed by Server!\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tsendMessage(returnMsg);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// If returned KVMessage is not valid it will have all blank fields\r\n\t\t\t\t\t\t\tSystem.out.println(\"Last command from client \" + latestMsg + \" encountered a problem on Server side!\");\r\n\t\t\t\t\t\t\tsendMessage(returnMsg);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} \r\n\t\t\t\t\telse if (latestMsg.getHeader().trim().equals(\"\")) {\r\n\t\t\t\t\t\t//echo empty messages\r\n\t\t\t\t\t\tsendMessage(latestMsg);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t// If it is a bad message output error and echo it back to the client\r\n\t\t\t\t\t\tlogger.debug(\"Message from Client was not valid, sending errorous message back to client\");\r\n\t\t\t\t\t\tlogger.debug(latestMsg.getError());\r\n\t\t\t\t\t\tsendMessage(new common.messages.KVAdminMessage(latestMsg.getHeader(), \"FAILED\", latestMsg.getKey(), latestMsg.getValue()));\r\n\t\t\t\t\t}\r\n\t\t\t\t/* connection either terminated by the client or lost due to \r\n\t\t\t\t * network problems*/\t\r\n\t\t\t\t} catch (IOException ioe) {\r\n\t\t\t\t\tlogger.error(\"Connection lost!\");\r\n\t\t\t\t\tisOpen = false;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tlogger.error(\"Error! Connection could not be established!\", ioe);\r\n\t\t\t\r\n\t\t} finally {\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tif (clientSocket != null) {\r\n\t\t\t\t\tinput.close();\r\n\t\t\t\t\toutput.close();\r\n\t\t\t\t\tclientSocket.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException ioe) {\r\n\t\t\t\tlogger.error(\"Error! Unable to tear down connection!\", ioe);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n if(args.length != 2) {\n // Blabla throw smth\n }\n Optional<LoginTemplate> loginTemplateOpt = ClientOperations.loginTemplateFromFile(args[0]);\n if(!loginTemplateOpt.isPresent()) {\n Constants.logToStdOut(\"Startup interrupted.\");\n throw new IllegalStateException(\"LoginTemplate not present.\");\n }\n Optional<IDiscordClient> clientOpt = ClientOperations.clientFromLoginTemplate(loginTemplateOpt.get());\n if(!clientOpt.isPresent()) {\n Constants.logToStdOut((\"Startup interrupted.\"));\n throw new IllegalStateException(\"IDiscordClient not present.\");\n }\n Optional<ClientTemplate> mainTemplateOpt = ClientOperations.clientTemplateFromFile(args[1]);\n if(!mainTemplateOpt.isPresent()) {\n Constants.logToStdOut((\"Startup interrupted.\"));\n throw new IllegalStateException(\"ClientTemplate not present.\");\n }\n IDiscordClient mainClient = clientOpt.get();\n /*\n * Main BI\n */\n Optional<IDiscordClient> listeningClient = ClientOperations.withNewListener(mainClient, new MessageGuard());\n Constants.logToStdOut(\"Successful launch!\");\n\n }", "public void run() {\n\t\twhile (true) {\n\t\t\tSocket clientSocket = null;\n\t\t\ttry {\n\t\t\t\tclientSocket = server.accept();\n\t\t\t\tview.writeLog(\"New client connected\");\n\t\t\t\tClientThread client = new ClientThread(clientSocket, this);\n\t\t\t\t(new Thread(client)).start();\n\t\t\t} catch (IOException e) {e.printStackTrace();}\n\t\t}\n\t}", "public void run() {\n try {\n\n // Decorate the streams so we can send characters\n // and not just bytes.  Ensure output is flushed\n // after every newline.\n BufferedReader in = new BufferedReader(\n new InputStreamReader(socket.getInputStream()));\n PrintWriter out = new PrintWriter(socket.getOutputStream(), true);\n\n // Send a welcome message to the client.\n out.println(\"Hello, you are client #\" + clientNumber + \".\");\n out.println(\"Enter a line with only a period to quit\\n\");\n\n // Get messages from the client, line by line; return them\n // capitalized\n while (true) {\n String input = in.readLine();\n if (input == null || input.equals(\".\")) {\n break;\n }\n out.println(input.toUpperCase());\n }\n } catch (IOException e) {\n log(\"Error handling client# \" + clientNumber + \": \" + e);\n } finally {\n try {\n socket.close();\n } catch (IOException e) {\n log(\"Couldn't close a socket, what's going on?\");\n }\n log(\"Connection with client# \" + clientNumber + \" closed\");\n }\n }", "public static void main(String[] args){\r\n\t\tnew Client();\r\n\t}", "public static void main(String[] args) throws Exception {\n\t\tfinal URI url = new URI(\"ws://localhost:2222/websockets/echo\");\n\n\t\tSystem.out.println(Thread.currentThread());\n\t\tClientManager client = ClientManager.createClient();\n\t\tclient.connectToServer(EchoClient.class, url);\n\t\tlatch.await();\n\t}", "public static void main(String[] args){\n try {\n GameClient.start();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n\t\trouter = new CommandRouter();\n\t\ttry {\n\t\t\t// setup our socket connection to the tv, but don't connect yet\n\t\t\tconn = new Connection(HOST, PORT, router);\n\n\t\t\t// Tell out router which network connection to use\n\t\t\trouter.setConnection(conn);\n\n\t\t\t// setup a handler for incoming GrantedSessionCommand message\n\t\t\t// objects\n\t\t\ttry {\n\t\t\t\trouter.registerCommandSubscriber(new ICommandSubscriber() {\n\t\t\t\t\tpublic void onCommandReceived(AbstractCommand command) {\n\t\t\t\t\t\t// Filter out the messages we care about\n\t\t\t\t\t\tif (command instanceof GrantedSessionCommand) {\n\t\t\t\t\t\t\t// Print our our unique key, this will be used for\n\t\t\t\t\t\t\t// subsequent connections\n\t\t\t\t\t\t\tUtilities.log(\"Your instanceId is \" + ((GrantedSessionCommand) command).getInstanceId());\n\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t//let's make the dock show up on the TV\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_yahoo\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(2000); //sleep for 2 seconds so the animation to dock finishes\n\n\t\t\t\t\t\t\t\t// Lets do something cool, like tell the TV to navigate to the right. Then do a little dance\n\t\t\t\t\t\t\t\t// This is the same as pressing \"right\" on your remote\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_right\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t// slide to the left\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_left\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t//slide to the right\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_right\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t//take it back now, y'all\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_left\"));\n\n\t\t\t\t\t\t\t\t//cha cha cha\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_up\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_down\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_up\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_down\"));\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\tUtilities.log(\"Problem writing to the network connection\");\n\t\t\t\t\t\t\t\tconn.close();\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Notify the main thread that everything we wanted to\n\t\t\t\t\t\t\t// do is done.\n\t\t\t\t\t\t\tsynchronized (conn) {\n\t\t\t\t\t\t\t\tconn.notifyAll();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else { // print out the others for educational purposes\n\t\t\t\t\t\t\tUtilities.log(\"Received: \" + command.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic void onConnectionLost(Connection conn) {\n\t\t\t\t\t\tUtilities.log(\"Connection Lost!\");\n\t\t\t\t\t}\n\t\t\t\t}, GrantedSessionCommand.class);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t// Establish a connection\n\t\t\t\tconn.establish();\n\t\t\t\t// Since this is the first time we are connecting, we must\n\t\t\t\t// create a new session\n\t\t\t\trouter.publishCommand(new CreateSessionCommand(APP_ID, CONSUMER_KEY, SECRET, APP_NAME));\n\n\t\t\t\tString message = getUserInput(\"Code: \");\n\t\t\t\trouter.publishCommand(new AuthSessionCommand(message, conn.getPeerCertificate()));\n\n\t\t\t\t// Let's wait until everything is done. This thread will get\n\t\t\t\t// notified once we are ready to clean up\n\t\t\t\ttry {\n\t\t\t\t\tsynchronized (conn) {\n\t\t\t\t\t\tconn.wait();\n\t\t\t\t\t}\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tUtilities.log(\"Error establishing connection to \" + HOST + \":\" + PORT);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tUtilities.log(\"Error establishing connection to \" + HOST + \":\" + PORT);\n\t\t\t}\n\n\t\t\t// It is always good practice to clean up after yourself\n\t\t\tconn.close();\n\n\t\t} catch (UnknownHostException e) {\n\t\t\tUtilities.log(\"Error resolving \" + HOST);\n\t\t\tSystem.exit(-1);\n\t\t} catch (IOException e) {\n\t\t\tUtilities.log(\"Problem writing to the network connection\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\n\t\tSystem.exit(1);\n\t}", "public void run() {\n\t\ttry {\n\t\t\tout = new PrintWriter(client.getOutputStream(), true);\n\t\t\tin = new BufferedReader(new InputStreamReader(client.getInputStream()));\n\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\ts.getMessage(this, inputLine);\n\t\t\t\tSystem.out.println(inputLine);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Couldn't get I/O for the connection to host\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t}", "public static void main(String[] args) {\n//\t\tnew CluelessClient();\n\t}", "private void runServer() {\n while(true) {\n try {\n SSLSocket socket = (SSLSocket)listener.accept();\n\n this.establishClient(socket);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public static void main(String[] args) {\n new ClientExternal(args).start();\n }" ]
[ "0.6897103", "0.68856317", "0.6813211", "0.6717985", "0.671784", "0.670164", "0.6673325", "0.6646708", "0.65960515", "0.65794975", "0.65605915", "0.6536468", "0.652637", "0.6526022", "0.651778", "0.65055114", "0.64267015", "0.64052415", "0.6403692", "0.64006156", "0.6393453", "0.63921005", "0.6376073", "0.635922", "0.63457614", "0.63454276", "0.6327795", "0.6323606", "0.6314037", "0.62974244", "0.62952375", "0.62945235", "0.62917495", "0.6291359", "0.62869644", "0.6283779", "0.62807703", "0.6276048", "0.6265198", "0.62627906", "0.62613404", "0.62539715", "0.62528664", "0.62506396", "0.62473655", "0.6242447", "0.62416077", "0.6231216", "0.62168056", "0.6215985", "0.6213757", "0.6212703", "0.620484", "0.6204774", "0.6204427", "0.6202226", "0.620141", "0.62013036", "0.6199959", "0.61992335", "0.61923033", "0.61884755", "0.6188467", "0.6186397", "0.61858076", "0.6182891", "0.6177906", "0.6172477", "0.6165711", "0.61611295", "0.6159181", "0.61567354", "0.6148975", "0.6148956", "0.6148511", "0.6143882", "0.6140547", "0.61393315", "0.6132906", "0.61302847", "0.612934", "0.61213046", "0.611303", "0.6100338", "0.6100012", "0.609873", "0.60921305", "0.6086185", "0.6082276", "0.60804975", "0.6077412", "0.60736364", "0.60608876", "0.60599834", "0.6050982", "0.6049768", "0.60405767", "0.6038921", "0.60318625", "0.6031827", "0.60299987" ]
0.0
-1
move the pointer i ahead one iteration
private int advance(int[] n, int i) { i += n[i]; i%=len; while (i<0) i+=len; return i; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int moveForward(int i, int s) {\n if (i + s >= items.length) {\n return ((i + s) - items.length);\n }\n return i + s;\n }", "void moveNext()\n\t{\n\t\tif (cursor != null) \n\t\t{\n\t\t\tif (cursor == back) \n\t\t\t{\n\t\t\t\tcursor = null;\n index = -1; //added cause i was failing the test scripts and forgot to manage the indices \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursor = cursor.next; //moves cursor toward back of the list\n index++; //added cause i was failing to the test scripts and forgot to manage the indicies\n\t\t\t}\n\t\t}\n\t}", "public void moveNext() {\n\t\tcurrentElement++;\n\t}", "public void moveCursorToLine(int i) throws IndexOutOfBoundsException {\n if(i < 0 || i > size()-1)\n throw new IndexOutOfBoundsException();\n cursor = i;\n }", "public void moveFirst() {\n\t\tcurrentElement = 0;\n\t}", "MoveIterator() {\n _c = 1; _r = 1; _dir = NOWHERE;\n incr();\n }", "public int nextIndex(int i) {\n\t\treturn (i + 1) % data.length;\n\t}", "private void forward() {\n index++;\n column++;\n if(column == linecount + 1) {\n line++;\n column = 0;\n linecount = content.getColumnCount(line);\n }\n }", "private int forwardPosition() {\n\t\treturn (position + 1) % (maxPosition + 1);\n\t}", "private int moveBack(int i, int s) {\n if (i - s < 0) {\n return items.length - (s - i);\n }\n return i - s;\n }", "protected final void moveToNextIndex() {\n\t\t\t// doing the assignment && < 0 in one line shaves\n\t\t\t// 3 opcodes...\n\t\t\tif ( (_index = nextIndex()) < 0 ) { throw new NoSuchElementException(); }\n\t\t}", "private final void advance() {\n if (currentIterator == null) {\n currentIterator = intMaps[index].entrySet().iterator();\n } else {\n if (!currentIterator.hasNext()) {\n // we want advance to next iterator only when this iterator is exhausted\n if (index < intMaps.length - 1) {\n // we can advance to next iterator only if currentIterator is not the last iterator\n ++index;\n if (!fetched[index]) {\n GetAllCustomMap.this.fetchValuesForIndex(index);\n }\n currentIterator = intMaps[index].entrySet().iterator();\n } else {\n // we can not advance to next iterator because this iterator is the last iterator\n }\n } else {\n // we do not want to advance to next iterator because this iterator is not fully exhausted\n }\n }\n }", "private void moveTileItemToOther(int i) {\n if (this.mTiles.size() > this.mSpanCount * 2) {\n ((SystemUIStat) Dependency.get(SystemUIStat.class)).handleControlCenterEvent(new QuickTilesRemovedEvent(this.mTiles.get(i).spec));\n this.mQSControlCustomizer.addInTileAdapter(this.mTiles.get(i), false);\n this.mTiles.remove(i);\n notifyItemRemoved(i);\n saveSpecs(this.mHost, false);\n }\n }", "public void stepForward() {\n\t\tposition = forwardPosition();\n\t}", "private <T> void shiftArrayElements(T[] orderedArray, int i) {\n\t\tfor (int j = orderedArray.length - 1; i < j; j--) {\r\n\t\t\torderedArray[j] = orderedArray[j - 1];\r\n\t\t}\r\n\t}", "static int fixIndex(int i)\r\n {\r\n return i >= 0 ? i : -(i + 1);\r\n }", "private void reverseAfter(int i) {\n int start = i + 1;\n int end = n - 1;\n while (start < end) {\n swap(index, start, end);\n start++;\n end--;\n }\n }", "void shiftUp(int i) {\n\t while(i>1&&patients.get(parent(i)).compareTo(patients.get(i))<0){\n\t\t Patient p=patients.get(i);\n\t\t patients.set(i,patients.get(parent(i)));\n\t\t queueMap.put(patients.get(parent(i)).getName(), i);\n\t\t patients.set(parent(i),p);\n\t\t queueMap.put(p.getName(), parent(i));\n\t\t i=parent(i);\n\t }\n }", "public final int getPos() { return i; }", "private int elementNC(int i) {\n return first + i * stride;\n }", "public void nextMove(Field field) {\n for (int i = 1; i <= 9; i++) {\n if (field.setMarker(i, marker)) {\n break;\n }\n }\n }", "public SkipListNode<K> next(int i)\n {\n\treturn next.get(i);\n }", "void movePrev()\n\t{\n\t\tif (cursor != null) \n\t\t{\n\t\t\tif (cursor == front) \n\t\t\t{\n\t\t\t\tcursor = null;\n index = -1; //added this because i kept failing the test cases on the grading script\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursor = cursor.prev; //moves cursor toward front of the list\n index--; //added this because i kept failing the test cases on the grading script\n\t\t\t}\n\t\t}\n\t}", "public static int offset(int i) {\n return i + 100;\n }", "protected void trickleUp(int i) {\n\n // root cannot trickleUp\n if (i > 0) {\n T element = this.elements[i];\n int parent = this.parent(i);\n T parentElement = this.elements[parent];\n\n //if the element is less than it's parent, swap\n if (element.compareTo(parentElement) < 0) {\n this.elements[i] = parentElement;\n this.elements[parent] = element;\n\n trickleUp(parent);\n }\n }\n }", "protected void trickleDown(int i) {\n\n int left = this.leftChild(i);\n int right = this.rightChild(i);\n T element = this.elements[i];\n\n if (left < currentSize && right < currentSize) {\n int min = this.minPosition(right, left);\n\n if ( element.compareTo(this.elements[min]) > 0)\n this.swapTrickleDown(i, min);\n\n } else if (left < currentSize && element.compareTo(this.elements[left]) > 0)\n this.swapTrickleDown(i, left);\n\n }", "@Override\n public void advance() {\n if (isCurrent()) {\n prev = cursor;\n cursor = cursor.getNext();\n } else {\n throw new IllegalStateException(\"There is no current element.\");\n }\n }", "public void skip(int n)\n {\n position += n;\n }", "public void advance( )\r\n {\r\n\t if(isCurrent() != true){// Implemented by student.\r\n\t throw new IllegalStateException(\"no current element\");\r\n\t }\r\n\t else\r\n\t \t precursor = cursor;\r\n\t \t cursor = cursor.getLink(); // Implemented by student.\r\n }", "@Override // ohos.com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase\r\n public int getNextNodeIdentity(int i) {\r\n int i2 = i + 1;\r\n while (i2 >= this.m_size) {\r\n if (this.m_incrementalSAXSource == null) {\r\n return -1;\r\n }\r\n nextNode();\r\n }\r\n return i2;\r\n }", "private int plusOne(int i) {\n return (i + 1) % capacity;\n }", "private void advance() {\n assert currentItemState == ItemProcessingState.COMPLETED || currentIndex == -1\n : \"moving to next but current item wasn't completed (state: \" + currentItemState + \")\";\n currentItemState = ItemProcessingState.INITIAL;\n currentIndex = findNextNonAborted(currentIndex + 1);\n retryCounter = 0;\n requestToExecute = null;\n executionResult = null;\n assert assertInvariants(ItemProcessingState.INITIAL);\n }", "@Test\n\tpublic void forwardCopy_test2() {\n\t\tSystem.out.println(\"copy前:\" + Arrays.toString(intArr));\t\n\t\tint index = 1;\n//\t\tArrayUtil.forwardCopy(intArr, index, 2);\n//\t\t//[2, 8, 3, 6, 0, 0, 0, 0]\n//\t\tSystem.out.println(\"copy后(前移):\" + Arrays.toString(intArr));\n//\t\tint len = intArr.length;\n//\t\tfor(int i = index; i< intArr.length - 1; i++){\n//\t\t\tintArr[i] = intArr[i+1];\n//\t\t}\n//\t\t//[2, 4, 3, 6, 0, 0, 0, 0]\n\t\tSystem.out.println(\"copy后(前移):\" + Arrays.toString(intArr));\t\n\t}", "private void flip(int i) {\n int start = 0;\n while(start < i){\n int temp = toSort[start].val;\n toSort[start].val = toSort[i].val;\n toSort[i].val = temp;\n start++;\n i--;\n sorting.add(paintIntegers.deepCopy(toSort));\n }\n }", "OIterator<V> before();", "private void moveLeft(int index) {\n for (int i = index; i < dataSize; i++) {\n array[i] = array[i + 1];\n }\n\n array[dataSize] = 0;\n }", "@Override\n public void addFirst(Item i) {\n resize();\n items[nextFirst] = i;\n size += 1;\n nextFirst = moveBack(nextFirst, 1);\n }", "public int nextOffset(int curr) {\n return curr + 1;\n }", "private int leftIndex(int i) {\n return i * 2;\n }", "public abstract void move(int p_index) ;", "public void advance() {\n if( mMatches.hasNext() ) {\n setCurrent( mMatches.next() );\n }\n }", "private void goForwardOne() \n {\n if (m_bufferOffset_ < 0) {\n // we're working on the source and not normalizing. fast path.\n // note Thai pre-vowel reordering uses buffer too\n m_source_.setIndex(m_source_.getIndex() + 1);\n }\n else {\n // we are in the buffer, buffer offset will never be 0 here\n m_bufferOffset_ ++;\n }\n }", "@Override\n public int nextIndex()\n {\n return idx+1; \n }", "public int nextIndex(int ipos) {\n return getIndexDifference(ipos, this.ipos0);\n }", "public boolean MoveNext()\r\n { \r\n _index++;\r\n\r\n return _index < Count;\r\n }", "public int seekPosition(int i) {\n \t\tint min=0; int max=data.length;\n \t\twhile (min<max) {\n \t\t\tint mid=(min+max)>>1;\n \t\t\tint mi=data[mid];\n \t\t\tif (i==mi) return mid;\n \t\t\tif (i<mi) {\n \t\t\t\tmax=mid;\n \t\t\t} else {\n \t\t\t\tmin=mid+1;\n \t\t\t}\n \t\t}\n \t\treturn min;\n \t}", "public void insert(int i, K k, P p) {\n\t\tfor (int j = keyCount; j > i; j--) {\n\t\t\tkeys[j] = keys[j - 1];\n\t\t\tpointers[j] = pointers[j - 1];\n\t\t}\n\t\tkeys[i] = k;\n\t\tpointers[i] = p;\n\t\tkeyCount++;\n\t}", "private void nextMovement()\n\t{\n\t\tif(SEQUENCE.length <= 1)\n\t\t\tSEQUENCE = null;\n\t\telse\n\t\t{\n\t\t\tint[] temp = new int[SEQUENCE.length - 1];\n\t\t\tfor(int i = 1; i < SEQUENCE.length; i++)\n\t\t\t{\n\t\t\t\ttemp[i-1] = SEQUENCE[i];\n\t\t\t}\n\t\t\tSEQUENCE = temp;\n\t\t}\n\t}", "public void insert(int i) {\n\t\tif (top > -2 && top < size - 1) {\n\t\t\ttop += 1;\n\t\t\tarr[top] = i;\n\t\t} else if (top == size - 1) {\n\t\t\tsize *= 2;\n\t\t\ttop += 1;\n\t\t\tarr = Arrays.copyOf(arr, size);\n\t\t\tarr[top] = i;\n\t\t}\n\t}", "public abstract int start(int i);", "private final int m28109e(int i) {\n return i + i;\n }", "public final void d(int i) throws IOException {\n byte b2 = (byte) i;\n if (this.c == this.b) {\n StringBuilder sb = new StringBuilder(\"Out of space: position=\");\n sb.append(this.c);\n sb.append(\", limit=\");\n sb.append(this.b);\n throw new IOException(sb.toString());\n }\n byte[] bArr = this.a;\n int i2 = this.c;\n this.c = i2 + 1;\n bArr[i2] = b2;\n }", "private void advanceRow(){\n\t\tfaceBackwards();\n\t\twhile(frontIsClear()){\n\t\t\tmove();\n\t\t}\n\t\tturnRight();\n\t\tif(frontIsClear()){\n\t\t\tmove();\n\t\t\tturnRight();\n\t\t}\n\t}", "@Override\r\n\tprotected void jumpToItem(int itemIndex) throws Exception {\r\n\t\tfor (int i = 0; i < itemIndex; i++) {\r\n\t\t\treadToStartFragment();\r\n\t\t\treadToEndFragment();\r\n\t\t}\r\n\t}", "@Override\n void advance() {\n }", "private static void listIteratorMovesInBothDirections(){\n\t ArrayList<String> list = new ArrayList<String>();\n\t \n\t list.add(\"ONE\");\n\t \n\t list.add(\"TWO\");\n\t \n\t list.add(\"THREE\");\n\t \n\t list.add(\"FOUR\");\n\t \n\t //RSN NOTE ListIterator\n\t ListIterator iterator = list.listIterator();\n\t \n\t System.out.println(\"Elements in forward direction\");\n\t \n\t while (iterator.hasNext())\n\t {\n\t System.out.println(iterator.next());\n\t }\n\t \n\t System.out.println(\"Elements in backward direction\");\n\t \n\t while (iterator.hasPrevious())\n\t {\n\t System.out.println(iterator.previous());\n\t }\n\t}", "abstract public void MoveSQ(int iNext);", "public void m22271rN(int i) {\n if (i >= 0 && i < this.dLo.size()) {\n if (this.dLq >= 0 && this.dLq < this.dLo.size()) {\n View childAt = this.dLm.getChildAt(this.dLq);\n if (childAt instanceof ImageView) {\n ((ImageView) childAt).setImageResource(R.drawable.introduce_pager_dot_1);\n }\n View mN = this.dLv.mo36228mN(this.dLq);\n if (mN instanceof IntroduceItemView) {\n ((IntroduceItemView) mN).setFocusStatus(false);\n }\n }\n View childAt2 = this.dLm.getChildAt(i);\n if (childAt2 instanceof ImageView) {\n ((ImageView) childAt2).setImageResource(R.drawable.introduce_pager_dot_1_focus);\n }\n View mN2 = this.dLv.mo36228mN(i);\n if (mN2 instanceof IntroduceItemView) {\n ((IntroduceItemView) mN2).setFocusStatus(true);\n }\n this.dLq = i;\n }\n }", "protected boolean advance()\n/* */ {\n/* 66 */ while (++this.m_offset < this.m_array.length) {\n/* 67 */ if (this.m_array[this.m_offset] != null) {\n/* 68 */ return true;\n/* */ }\n/* */ }\n/* 71 */ return false;\n/* */ }", "private void m80399d(int i) {\n if (i == 0 || i == 1) {\n this.f57209a.getViewPager().setCurrentItem(i, false);\n }\n }", "private void moveToNextSplit() {\n closeCurrentSplit();\n\n if (_splits.hasNext()) {\n StashSplit split = _splits.next();\n String key = String.format(\"%s/%s\", _rootPath, split.getKey());\n _currentIterator = new StashSplitIterator(_s3, _bucket, key);\n } else {\n _currentIterator = null;\n }\n }", "public void move() {\n for (int i = 0; i < Vampiro.getNumVamp(); i++) {\n\n lista[i].move();\n }\n }", "private static int find(int i)\r\n{\n int ind = i;\r\n while (ind != ptrs[ind]) {\r\n ind = ptrs[ind];\r\n }\r\n // fix the link so that it is one hop only\r\n // note: this doesn't implement the full union-find update\r\n\r\n ptrs[i] = ind;\r\n\r\n return ind;\r\n}", "public int skipTo(int index) {\n\t\twhile(hasNext() && offset < index)\n\t\t\tnext();\n\t\treturn offset;\n\t}", "private void selectPosition(int i, View view) {\n if (i >= 0) {\n this.mAccessibilityMoving = false;\n List<TileQueryHelper.TileInfo> list = this.mTiles;\n int i2 = this.mEditIndex - 1;\n this.mEditIndex = i2;\n list.remove(i2);\n notifyItemRemoved(this.mEditIndex);\n if (i == this.mEditIndex) {\n i--;\n }\n move(this.mAccessibilityFromIndex, i, view);\n notifyDataSetChanged();\n }\n }", "private ListNode<E> hop(int i) {\n\t\tListNode<E> current = this.head;\n\t\tfor (int j = 0; j < i; j++) {\n\t\t\tcurrent = current.next;\n\t\t}\n\n\t\treturn current;\n\t}", "private void advanceToNextReader(){\r\n\t\tcurrentReader = null;\r\n\t\treaderQueueIndex++;\r\n\t}", "private final void m139909a(int i) {\n this.f101756f = getPaddingLeft();\n this.f101755e += i;\n this.f101753c++;\n }", "public SkipListNode<K> setNext(int i, SkipListNode<K> node)\n {\n\treturn next.set(i,node);\n }", "public T next(){\r\n return itrArr[position++];\r\n }", "private void moveAnts() {\n IntStream.range(currentIndex, numberOfCities - 1)\n .forEach(i -> {\n ants.forEach(ant -> ant.visitCity(currentIndex, selectNextCity(ant)));\n currentIndex++;\n });\n }", "public void skip(int val) {\n\t\t\t// pointer wala skip\n\t\t\tif (nextElement == val)\n\t\t\t\tadvance();\n\t\t\telse {\n\t\t\t\tif (!skipMap.containsKey(val)) {\n\t\t\t\t\tskipMap.put(val, 0);\n\t\t\t\t}\n\t\t\t\tskipMap.put(val, skipMap.get(val) + 1);\n\t\t\t}\n\t\t}", "private void shiftElements() {\n RadarContent[] tempArr = new RadarContent[length - 1];\n for (int i = 0; i < length - 1; i++) {\n tempArr[i] = arrProfiles[i + 1];\n }\n arrProfiles = tempArr;\n length--;\n }", "public void setIteratorBegin() {\n iter = (next > 0 ? 0 : -1);\n }", "@Override\n public E peek(int i) {\n if(!hasWork()) {\n throw new NoSuchElementException();\n }\n if(i < 0 || i >= size()) {\n throw new IndexOutOfBoundsException();\n }\n return array[(front + i) % capacity()];\n }", "public void advance(int factor)\n {\n int length = this.getMorphCount();\n this.resetTime();\n\n if (length == 0)\n {\n return;\n }\n\n this.index += factor;\n this.index = MathHelper.clamp_int(this.index, -1, length - 1);\n }", "public void incrementIndex() {\n\t\tindex++;\n\t\tif (nextItem != null) {\n\t\t\tnextItem.incrementIndex();\n\t\t}\n\t}", "public void siftUp(int i){\n int child = i;\n if (child==0){\n return;\n }else{\n int parent = (child-1) / 2;\n if(eventArray[parent].eventTime > eventArray[child].eventTime) {\n swap(child, parent);\n siftUp(parent);\n }\n }\n }", "void seekToFirst();", "@Override\n public int previousIndex()\n {\n return idx-1;\n }", "public void setCurrentItemInternal(int i, boolean z) {\n RecyclerView.Adapter adapter = getAdapter();\n if (adapter == null) {\n if (this.mPendingCurrentItem != -1) {\n this.mPendingCurrentItem = Math.max(i, 0);\n }\n } else if (adapter.getItemCount() > 0) {\n int min = Math.min(Math.max(i, 0), adapter.getItemCount() - 1);\n if (min == this.mCurrentItem && this.mScrollEventAdapter.isIdle()) {\n return;\n }\n if (min != this.mCurrentItem || !z) {\n double d = (double) this.mCurrentItem;\n this.mCurrentItem = min;\n this.mAccessibilityProvider.onSetNewCurrentItem();\n if (!this.mScrollEventAdapter.isIdle()) {\n d = this.mScrollEventAdapter.getRelativeScrollPosition();\n }\n this.mScrollEventAdapter.notifyProgrammaticScroll(min, z);\n if (!z) {\n this.mRecyclerView.scrollToPosition(min);\n return;\n }\n double d2 = (double) min;\n if (Math.abs(d2 - d) > 3.0d) {\n this.mRecyclerView.scrollToPosition(d2 > d ? min - 3 : min + 3);\n RecyclerView recyclerView = this.mRecyclerView;\n recyclerView.post(new SmoothScrollToPosition(min, recyclerView));\n return;\n }\n this.mRecyclerView.smoothScrollToPosition(min);\n }\n }\n }", "protected final int nextIndex() {\n\t\t\tif ( _expectedSize != TOrderedHashMap.this.size() ) { throw new ConcurrentModificationException(); }\n\n\t\t\tObject[] set = TOrderedHashMap.this._set;\n\t\t\tint i = _index + 1;\n\t\t\twhile (i <= _lastInsertOrderIndex &&\n\t\t\t\t(_indicesByInsertOrder[i] == EMPTY || set[_indicesByInsertOrder[i]] == TObjectHash.FREE || set[_indicesByInsertOrder[i]] == TObjectHash.REMOVED)) {\n\t\t\t\ti++;\n\t\t\t}\n\t\t\treturn i <= _lastInsertOrderIndex ? i : -1;\n\t\t}", "public void getnext9(float x[], float y[], int i, int j) {\n y[j+0] = x[i+0];\n y[j+1] = x[i-1];\n y[j+2] = x[i+1];\n y[j+3] = x[i-cols];\n y[j+4] = x[i+cols];\n y[j+5] = x[i-cols-1];\n y[j+6] = x[i-cols+1];\n y[j+7] = x[i+cols-1];\n y[j+8] = x[i+cols+1];\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic P pointer(int i) {\n\t\treturn (P) pointers[i];\n\t}", "@Override\n public IntVec3 next() {\n if(this.hasNext()){\n this.current = this.current.clone();\n } else throw new NoSuchElementException();\n if(this.current.x != this.end.x){\n this.current=this.current.incrX(this.xDir);\n } else if(this.current.y != this.end.y){\n this.current=IntVec3.get(0, this.current.y + this.yDir, this.current.z);\n } else if(this.current.z != this.end.z){\n this.current=IntVec3.get(0, 0, this.current.z + this.zDir);\n } else throw new NoSuchElementException();\n return this.current;\n }", "public void testCurrPos() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n for (int i = 0; i < 10; i++) {\n test1.next();\n }\n assertEquals(10, test1.currPos());\n }", "public void increment(int i, ArrayList<Split> s)\n\t{\n\t\tthis.iValue += i;\n\t\t\n\t\tfor(int counter = 0; counter < s.size(); counter ++)\n\t\t{\n\t\t\tthis.incrementSplit(s.get(counter));\n\t\t}\n\t}", "public MapIterator advance()\n {\n this.MapItr = this.MapItr.rest(); \n \n return this;\n }", "public abstract Position nextPosition(Position position);", "public void visit(int i) {\r\n visited[i] = visitedToken;\r\n }", "public abstract boolean prependVisibleItems(int i, boolean z);", "public void skip()\n {\n skip(1);\n }", "private int getNext(int index) {\n return index + (index & -index);\n }", "public void updateNeighbours(int i) {\n if (currentState[i] != 0) {\n int ix0 = (i - STEPX) & MASKX;\n int iy0 = (i - STEPY) & MASKY;\n int iz0 = (i - STEPZ) & MASKZ;\n\n int ix1 = (i) & MASKX;\n int iy1 = (i) & MASKY;\n int iz1 = (i) & MASKZ;\n\n int ix2 = (i + STEPX) & MASKX;\n int iy2 = (i + STEPY) & MASKY;\n int iz2 = (i + STEPZ) & MASKZ;\n\n ++nextState[ix0 | iy0 | iz0];\n ++nextState[ix0 | iy0 | iz1];\n ++nextState[ix0 | iy0 | iz2];\n ++nextState[ix0 | iy1 | iz0];\n ++nextState[ix0 | iy1 | iz1];\n ++nextState[ix0 | iy1 | iz2];\n ++nextState[ix0 | iy2 | iz0];\n ++nextState[ix0 | iy2 | iz1];\n ++nextState[ix0 | iy2 | iz2];\n\n ++nextState[ix1 | iy0 | iz0];\n ++nextState[ix1 | iy0 | iz1];\n ++nextState[ix1 | iy0 | iz2];\n ++nextState[ix1 | iy1 | iz0];\n\n //!\t\t++nextState[ix1|iy1|iz1];\n ++nextState[ix1 | iy1 | iz2];\n ++nextState[ix1 | iy2 | iz0];\n ++nextState[ix1 | iy2 | iz1];\n ++nextState[ix1 | iy2 | iz2];\n\n ++nextState[ix2 | iy0 | iz0];\n ++nextState[ix2 | iy0 | iz1];\n ++nextState[ix2 | iy0 | iz2];\n ++nextState[ix2 | iy1 | iz0];\n ++nextState[ix2 | iy1 | iz1];\n ++nextState[ix2 | iy1 | iz2];\n ++nextState[ix2 | iy2 | iz0];\n ++nextState[ix2 | iy2 | iz1];\n ++nextState[ix2 | iy2 | iz2];\n }\n }", "public interface OIterator<V> extends Iterator<V> {\n\n /**\n * Move this iterator to before the first item.\n *\n * @return This iterator for method chaining.\n */\n OIterator<V> before();\n\n /**\n * Move this iterator to after the last item.\n *\n * @return This iterator for method chaining.\n */\n OIterator<V> after();\n\n /**\n * Move this iterator to before the item at the desired index.\n *\n * @param index The index to move to.\n * @return This iterator for method chaining.\n * @throws IndexOutOfBoundsException If index is less than 0 or greater\n * than the number of elements in the underlying collection.\n */\n OIterator<V> index(final int index) throws IndexOutOfBoundsException;\n}", "public void insert(Item item, int i){\n assert (count+1<=capacity);\n\n assert (i+1>=1&&i+1<=capacity);\n\n i+=1;\n\n data[i] = item;\n count++;\n\n indexes[count] = i;\n rev[i] = count;\n\n shiftUp(count);\n }", "public void next() {\n\t\telements[(currentElement - 1)].turnOff();\n\t\tif (elements.length > currentElement) {\n\t\t\telements[currentElement].turnOn();\n\t\t\tcurrentElement++;\n\t\t} else {\n\t\t\texit();\n\t\t}\n\t}", "@Override\n\t\tpublic T next() {\n\t\t\tmoveToNextIndex();\n\t\t\treturn objectAtIndex(_indicesByInsertOrder[_index]);\n\t\t}", "public void SetPosition(int i)\n {\n SetPosition(i, 1.0);\n }", "public final synchronized void a(int i) {\n while (this.a != null && this.a.a == i) {\n SyncQueueItem syncQueueItem = this.a;\n this.a = this.a.j;\n syncQueueItem.a();\n }\n if (this.a != null) {\n SyncQueueItem syncQueueItem2 = this.a;\n SyncQueueItem a2 = syncQueueItem2.j;\n while (a2 != null) {\n SyncQueueItem a3 = a2.j;\n if (a2.a == i) {\n syncQueueItem2.j = a3;\n a2.a();\n } else {\n syncQueueItem2 = a2;\n }\n a2 = a3;\n }\n }\n }" ]
[ "0.71195465", "0.6645556", "0.65639395", "0.63908553", "0.63367647", "0.6284984", "0.62226075", "0.6189297", "0.60300606", "0.5991861", "0.5983243", "0.59645677", "0.5956091", "0.59226215", "0.5876417", "0.5871376", "0.58347595", "0.5789896", "0.57418436", "0.57371056", "0.56633025", "0.56358856", "0.5635267", "0.56296307", "0.56266063", "0.5619115", "0.5616949", "0.5616245", "0.5608407", "0.5587839", "0.5587145", "0.5574202", "0.5569812", "0.55358094", "0.5526638", "0.54950297", "0.54742116", "0.54690856", "0.5464016", "0.5448166", "0.54454213", "0.54454184", "0.5427396", "0.5421029", "0.541746", "0.54149246", "0.5414914", "0.5398469", "0.5396341", "0.53959036", "0.53754854", "0.5359134", "0.5354055", "0.5340447", "0.53381336", "0.533418", "0.5327508", "0.5317843", "0.53147495", "0.53132623", "0.5306043", "0.52988607", "0.5297798", "0.5293475", "0.5285234", "0.5272934", "0.5272571", "0.52714545", "0.52644396", "0.52589124", "0.52560663", "0.5251412", "0.52403677", "0.52378553", "0.5227161", "0.5221618", "0.52205205", "0.52186835", "0.5216933", "0.52130806", "0.5211766", "0.51999605", "0.5198114", "0.51943684", "0.51935893", "0.5191594", "0.51903224", "0.5189618", "0.5180443", "0.5178745", "0.51757467", "0.5170525", "0.51643556", "0.5164277", "0.51613224", "0.5159882", "0.5155615", "0.51539415", "0.51531667", "0.51528" ]
0.6548172
3
////////////////////////////////////////////////////////////////////////////////////////////// STATISTICAL FUNCTIONS //////////////////////////////////////////////////////////////////////////////////////////////
public static double mean(final double... values) { // Check the arguments DoubleArguments.requireNonEmpty(values); // Return the mean return Maths.sumWithoutNaN(values) / values.length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getStatus() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n public void func_104112_b() {\n \n }", "private stendhal() {\n\t}", "protected boolean func_70041_e_() { return false; }", "private void m50366E() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void method_4270() {}", "public void smell() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "public abstract void mo70713b();", "boolean internal();", "void mo57277b();", "private void kk12() {\n\n\t}", "abstract int pregnancy();", "OperationalState operationalState();", "OperationalState operationalState();", "public abstract int mo9754s();", "public final void mo51373a() {\n }", "public boolean method_2453() {\r\n return false;\r\n }", "@Override\n\tpublic void getStatus() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public abstract String mo13682d();", "@Override\n\tprotected void interr() {\n\t}", "public void mo21877s() {\n }", "public abstract String mo118046b();", "public abstract void mo56925d();", "private void verificaData() {\n\t\t\n\t}", "public boolean method_2434() {\r\n return false;\r\n }", "public boolean method_4088() {\n return false;\n }", "private void level7() {\n }", "public void mo38117a() {\n }", "public boolean func_145773_az() { return true; }", "private void poetries() {\n\n\t}", "public abstract boolean deterministic () ;", "public abstract String mo41079d();", "@Override\n public void computeSatisfaction() {\n\n }", "private void m50367F() {\n }", "private static void cajas() {\n\t\t\n\t}", "public abstract void mo27385c();", "public abstract void mo6549b();", "@Override\n\tpublic int sount() {\n\t\treturn 0;\n\t}", "private boolean Verific() {\n\r\n\treturn true;\r\n\t}", "public abstract boolean mo66253b();", "public void stg() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "public boolean method_218() {\r\n return false;\r\n }", "void mo72113b();", "public int characteristics() {\n/* 1680 */ return this.characteristics;\n/* */ }", "@Override\n public void perish() {\n \n }", "public void verliesLeven() {\r\n\t\t\r\n\t}", "public void mo21787L() {\n }", "public boolean method_4093() {\n return false;\n }", "void mo57278c();", "public abstract boolean mo9234ar();", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "final void checkForComodification() {\n\t}", "public abstract String mo11611b();", "private USI_TRLT() {}", "@Override public int describeContents() { return 0; }", "private MetallicityUtils() {\n\t\t\n\t}", "public int method_209() {\r\n return 0;\r\n }", "protected OpinionFinding() {/* intentionally empty block */}", "public int characteristics() {\n/* 1570 */ return this.characteristics;\n/* */ }", "public boolean method_4132() {\n return false;\n }", "public void mo115190b() {\n }", "private Util() { }", "public int characteristics() {\n/* 1350 */ return this.characteristics;\n/* */ }", "public boolean method_208() {\r\n return false;\r\n }", "public int method_113() {\r\n return 0;\r\n }", "void mo41083a();", "void mo41086b();", "private final boolean e() {\n /*\n r15 = this;\n r2 = 0\n r1 = 0\n dtd r0 = r15.m // Catch:{ all -> 0x008e }\n if (r0 != 0) goto L_0x000d\n dtd r0 = new dtd // Catch:{ all -> 0x008e }\n r0.<init>() // Catch:{ all -> 0x008e }\n r15.m = r0 // Catch:{ all -> 0x008e }\n L_0x000d:\n int r0 = r15.k // Catch:{ all -> 0x008e }\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x039e\n dvk r3 = r15.g // Catch:{ all -> 0x008e }\n if (r3 == 0) goto L_0x0356\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 == 0) goto L_0x0025\n int r3 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != r4) goto L_0x0032\n L_0x0025:\n r3 = 2097152(0x200000, float:2.938736E-39)\n int r3 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = new byte[r3] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r15.h = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r15.i = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0032:\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r4\n int r6 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r7 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r8 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r9 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n boolean r0 = r7.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x00ac\n r0 = 1\n L_0x0047:\n java.lang.String r3 = \"GzipInflatingBuffer is closed\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r0 = 1\n r5 = r3\n L_0x004f:\n if (r0 == 0) goto L_0x02ef\n int r3 = r6 - r5\n if (r3 <= 0) goto L_0x02ef\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.ordinal() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n switch(r0) {\n case 0: goto L_0x00ae;\n case 1: goto L_0x0148;\n case 2: goto L_0x0171;\n case 3: goto L_0x01d7;\n case 4: goto L_0x01fc;\n case 5: goto L_0x0221;\n case 6: goto L_0x0256;\n case 7: goto L_0x0289;\n case 8: goto L_0x02a2;\n case 9: goto L_0x02e9;\n default: goto L_0x005e;\n } // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x005e:\n java.lang.AssertionError r0 = new java.lang.AssertionError // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4 + 15\n java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5.<init>(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = \"Invalid state: \"\n java.lang.StringBuilder r4 = r5.append(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.StringBuilder r3 = r4.append(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = r3.toString() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0087:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x008e:\n r0 = move-exception\n if (r2 <= 0) goto L_0x00ab\n dxe r3 = r15.a\n r3.a(r2)\n dxh r3 = r15.j\n dxh r4 = defpackage.dxh.BODY\n if (r3 != r4) goto L_0x00ab\n dvk r3 = r15.g\n if (r3 == 0) goto L_0x03c9\n dzo r2 = r15.d\n long r4 = (long) r1\n r2.d(r4)\n int r2 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n L_0x00ab:\n throw r0\n L_0x00ac:\n r0 = 0\n goto L_0x0047\n L_0x00ae:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x00ba\n r0 = 0\n goto L_0x004f\n L_0x00ba:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 35615(0x8b1f, float:4.9907E-41)\n if (r0 == r3) goto L_0x00d4\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Not in GZIP format\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00cd:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x00d4:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 8\n if (r0 == r3) goto L_0x00e6\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Unsupported compression method\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00e6:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.j = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvl r4 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 6\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r10.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r10\n if (r3 <= 0) goto L_0x03d9\n r0 = 6\n int r0 = java.lang.Math.min(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r10 = r10.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r11 = r11.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r10, r11, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = 6 - r0\n r3 = r0\n L_0x0118:\n if (r3 <= 0) goto L_0x013b\n r0 = 512(0x200, float:7.175E-43)\n byte[] r10 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x011f:\n if (r0 >= r3) goto L_0x013b\n int r11 = r3 - r0\n r12 = 512(0x200, float:7.175E-43)\n int r11 = java.lang.Math.min(r11, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r12 = r12.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.a(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r12 = r12.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.update(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r11\n goto L_0x011f\n L_0x013b:\n dvk r0 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 6\n defpackage.dvk.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA_LEN // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0148:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 4\n r3 = 4\n if (r0 == r3) goto L_0x0156\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0156:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0162\n r0 = 0\n goto L_0x004f\n L_0x0162:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.k = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0171:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 >= r3) goto L_0x017e\n r0 = 0\n goto L_0x004f\n L_0x017e:\n dvl r10 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x03d6\n int r0 = java.lang.Math.min(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r11 = r11.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r12 = r12.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r11, r12, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r4 - r0\n r3 = r0\n L_0x01a8:\n if (r3 <= 0) goto L_0x01cb\n r0 = 512(0x200, float:7.175E-43)\n byte[] r11 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x01af:\n if (r0 >= r3) goto L_0x01cb\n int r12 = r3 - r0\n r13 = 512(0x200, float:7.175E-43)\n int r12 = java.lang.Math.min(r12, r13) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r13 = r13.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.a(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r13 = r13.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.update(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r12\n goto L_0x01af\n L_0x01cb:\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.b(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01d7:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 8\n r3 = 8\n if (r0 != r3) goto L_0x01f5\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x01e1:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x01f3\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x01e1\n r0 = 1\n L_0x01ee:\n if (r0 != 0) goto L_0x01f5\n r0 = 0\n goto L_0x004f\n L_0x01f3:\n r0 = 0\n goto L_0x01ee\n L_0x01f5:\n dvm r0 = defpackage.dvm.HEADER_COMMENT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01fc:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 16\n r3 = 16\n if (r0 != r3) goto L_0x021a\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0206:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x0218\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x0206\n r0 = 1\n L_0x0213:\n if (r0 != 0) goto L_0x021a\n r0 = 0\n goto L_0x004f\n L_0x0218:\n r0 = 0\n goto L_0x0213\n L_0x021a:\n dvm r0 = defpackage.dvm.HEADER_CRC // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0221:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 2\n r3 = 2\n if (r0 != r3) goto L_0x024f\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0234\n r0 = 0\n goto L_0x004f\n L_0x0234:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n long r10 = r0.getValue() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = (int) r10 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 65535(0xffff, float:9.1834E-41)\n r0 = r0 & r3\n dvl r3 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == r3) goto L_0x024f\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Corrupt GZIP header\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x024f:\n dvm r0 = defpackage.dvm.INITIALIZE_INFLATER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0256:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x027e\n java.util.zip.Inflater r0 = new java.util.zip.Inflater // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 1\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.g = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0262:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x0284\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x027b:\n r0 = 1\n goto L_0x004f\n L_0x027e:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x0262\n L_0x0284:\n dvm r0 = defpackage.dvm.INFLATER_NEEDS_INPUT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x027b\n L_0x0289:\n int r0 = r9 + r5\n int r0 = r7.a(r8, r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r5 + r0\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r4 = defpackage.dvm.TRAILER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r4) goto L_0x029e\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5 = r3\n goto L_0x004f\n L_0x029e:\n r0 = 1\n r5 = r3\n goto L_0x004f\n L_0x02a2:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == 0) goto L_0x02c7\n r0 = 1\n L_0x02a7:\n java.lang.String r3 = \"inflater is null\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x02c9\n r0 = 1\n L_0x02b3:\n java.lang.String r3 = \"inflaterInput has unconsumed bytes\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r0 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 512(0x200, float:7.175E-43)\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x02cb\n r0 = 0\n goto L_0x004f\n L_0x02c7:\n r0 = 0\n goto L_0x02a7\n L_0x02c9:\n r0 = 0\n goto L_0x02b3\n L_0x02cb:\n r3 = 0\n r7.e = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.f = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r3 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.a(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x02e9:\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x004f\n L_0x02ef:\n if (r0 == 0) goto L_0x0301\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = defpackage.dvm.HEADER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x0334\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x0334\n L_0x0301:\n r0 = 1\n L_0x0302:\n r7.n = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.l // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.l = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r2 = r2 + r3\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.m = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r1 = r1 + r3\n if (r5 != 0) goto L_0x0342\n if (r2 <= 0) goto L_0x0332\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0332\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x0336\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0332:\n r0 = 0\n L_0x0333:\n return r0\n L_0x0334:\n r0 = 0\n goto L_0x0302\n L_0x0336:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0332\n L_0x0342:\n dtd r0 = r15.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dxv r3 = defpackage.dxw.a(r3, r4, r5) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.a(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r5\n r15.i = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x000d\n L_0x0356:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n if (r3 != 0) goto L_0x0386\n if (r2 <= 0) goto L_0x0378\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0378\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x037a\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0378:\n r0 = 0\n goto L_0x0333\n L_0x037a:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0378\n L_0x0386:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ all -> 0x008e }\n int r2 = r2 + r0\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n dtd r4 = r15.n // Catch:{ all -> 0x008e }\n dxv r0 = r4.a(r0) // Catch:{ all -> 0x008e }\n dtd r0 = (defpackage.dtd) r0 // Catch:{ all -> 0x008e }\n r3.a(r0) // Catch:{ all -> 0x008e }\n goto L_0x000d\n L_0x039e:\n if (r2 <= 0) goto L_0x03ba\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x03ba\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x03bd\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x03ba:\n r0 = 1\n goto L_0x0333\n L_0x03bd:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x03ba\n L_0x03c9:\n dzo r1 = r15.d\n long r4 = (long) r2\n r1.d(r4)\n int r1 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n goto L_0x00ab\n L_0x03d6:\n r3 = r4\n goto L_0x01a8\n L_0x03d9:\n r3 = r0\n goto L_0x0118\n */\n throw new UnsupportedOperationException(\"Method not decompiled: defpackage.dxd.e():boolean\");\n }", "public abstract void mo27386d();", "public void mo4359a() {\n }", "public boolean isDirect()\r\n/* 76: */ {\r\n/* 77:111 */ return false;\r\n/* 78: */ }", "public abstract String mo9752q();", "public boolean method_109() {\r\n return true;\r\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "boolean hasS2();", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "void mo119582b();", "private Object getState() {\n\treturn null;\r\n}", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "public void mo12628c() {\n }", "private static void iterator() {\n\t\t\r\n\t}", "public abstract boolean mo36211n();", "public boolean method_1456() {\r\n return true;\r\n }", "boolean _non_existent();", "boolean mo30282b();", "void m1864a() {\r\n }", "public boolean method_4102() {\n return false;\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "public int characteristics() {\n/* 1460 */ return this.characteristics;\n/* */ }", "void mo17012c();", "public void mo6081a() {\n }" ]
[ "0.631672", "0.62125826", "0.59277415", "0.5792445", "0.56641734", "0.561537", "0.558393", "0.5583715", "0.55481625", "0.5527655", "0.548093", "0.54767954", "0.5470147", "0.5455112", "0.5448489", "0.544106", "0.544106", "0.5416326", "0.5387919", "0.53814805", "0.53810894", "0.5376059", "0.5374618", "0.5368752", "0.53513795", "0.5331409", "0.5328099", "0.53217137", "0.53169096", "0.5314685", "0.5313749", "0.53089476", "0.53076005", "0.5304552", "0.530075", "0.5286984", "0.5278534", "0.5278187", "0.5271822", "0.52635294", "0.52634835", "0.5254068", "0.5248467", "0.5247582", "0.5242661", "0.5236874", "0.52347505", "0.5234125", "0.52340156", "0.5233633", "0.5215679", "0.5212127", "0.52048993", "0.52026457", "0.5199877", "0.5199516", "0.51987576", "0.5193666", "0.51932883", "0.51932883", "0.5188054", "0.51867664", "0.5186453", "0.5186095", "0.51852185", "0.518327", "0.51767164", "0.51745516", "0.517359", "0.517106", "0.51678246", "0.51622623", "0.5156289", "0.51536435", "0.51496124", "0.5149216", "0.5148722", "0.5148031", "0.5146595", "0.51454365", "0.51447946", "0.51402", "0.5140195", "0.5139448", "0.51389635", "0.5135545", "0.5135316", "0.5124655", "0.5122906", "0.5121674", "0.51185584", "0.51184547", "0.51174176", "0.51128864", "0.5112337", "0.51120806", "0.5111253", "0.5110875", "0.51105875", "0.5109445", "0.51080674" ]
0.0
-1
disable constructor to guaranty a single instance
private HibernateUtil() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "private SingleObject(){}", "Reproducible newInstance();", "private SingleObject()\r\n {\r\n }", "private Instantiation(){}", "private MySingleton() {\r\n\t\tSystem.out.println(\"Only 1 object will be created\");\r\n\t}", "private SingleObject(){\n }", "private SingleTon() {\n\t}", "private SingletonDoubleCheck() {}", "private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }", "private Singleton() { }", "private Singleton(){}", "private SystemInfo() {\r\n // forbid object construction \r\n }", "private LazySingleton() {\n if (null != INSTANCE) {\n throw new InstantiationError(\"Instance creation not allowed\");\n }\n }", "private Singleton() {\n\t}", "private Validate(){\n //private empty constructor to prevent object initiation\n }", "private Singleton()\n\t\t{\n\t\t}", "private SingletonObject() {\n\n\t}", "@SuppressWarnings(\"unused\")\r\n\tprivate Person() {\r\n\t}", "@Override\n public boolean isInstantiable() {\n return false;\n }", "private InterpreterDependencyChecks() {\r\n\t\t// Hides default constructor\r\n\t}", "private Singleton2A(){\n\t\tif(instance != null){\n\t\t\tthrow new RuntimeException(\"One instance already created cant create other\");\n\t\t}\t\t\n\t\tSystem.out.println(\"I am private constructor\");\n\t}", "private EagerlySinleton()\n\t{\n\t}", "public Instance() {\n }", "private SingletonSample() {}", "private LazySingleton(){}", "private SerializerFactory() {\n // do nothing\n }", "private InstanceUtil() {\n }", "defaultConstructor(){}", "private Singleton() {\n if (instance != null){\n throw new RuntimeException(\"Use getInstance() to create Singleton\");\n }\n }", "private TetrisMain() {\r\n //prevents instantiation\r\n }", "private SingletonSigar(){}", "private Log()\n {\n //Hides implicit constructor.\n }", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "private Security() { }", "private Singleton(){\n }", "protected AbstractService() {\n this(false);\n }", "private A(){\n System.out.println(\"Instance created\");\n }", "public Pleasure() {\r\n\t\t}", "void DefaultConstructor(){}", "private XmlFactory() {\r\n /* no-op */\r\n }", "private ObjectFactory() { }", "private SingletonEager(){\n \n }", "private Example() {\n\t\tthrow new Error(\"no instantiation is permitted\");\n\t}", "private Settings()\n {}", "private Service() {}", "public static void copyConstructor(){\n\t}", "private CloneFactory() {\n }", "public Member() {\n //Empty constructor!\n }", "public no() {}", "private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}", "private ContactFactory() {\n throw new AssertionError();\n }", "private TemplateFactory(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }", "private TagCacheManager(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }", "private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }", "private Rekenhulp()\n\t{\n\t}", "protected Gateway(boolean noInit) {\n genClient = null;\n }", "private AirforceOne_lazy() {\n }", "public SingletonVerifier() {\n }", "private Settings() {}", "public Memory() {\n this(false);\n }", "private StreamFactory()\n {\n /*\n * nothing to do\n */\n }", "protected abstract void construct();", "private Helper() {\r\n // do nothing\r\n }", "public Member() {}", "public static synchronized void constructInstance()\n {\n SmartDashboard.putBoolean( TelemetryNames.Elbow.status, false );\n\n if ( ourInstance != null )\n {\n throw new IllegalStateException( myName + \" Already Constructed\" );\n }\n ourInstance = new ElbowSubsystem();\n\n SmartDashboard.putBoolean( TelemetryNames.Elbow.status, true );\n }", "private MApi() {}", "@Override\n public boolean isSingleton() {\n return false;\n }", "private Supervisor() {\r\n\t}", "private User() {}", "MyEncodeableWithoutPublicNoArgConstructor() {}", "public BasicSafetyCaseFactoryImpl() {\n\t\tsuper();\n\t}", "public AllDifferent()\n {\n this(0);\n }", "private ClassificationSettings() {\n throw new AssertionError();\n }", "private Verify(){\n\t\t// Private constructor to prevent instantiation\n\t}", "private RequestManager() {\n\t // no instances\n\t}", "private Ex() {\n }", "Instance createInstance();", "@SuppressWarnings(\"unused\")\n private Booking() {\n }", "private NullSafe()\n {\n super();\n }", "ConstuctorOverloading(){\n\t\tSystem.out.println(\"I am non=argument constructor\");\n\t}", "private DPSingletonLazyLoading(){\r\n\t\tthrow new RuntimeException();//You can still access private constructor by reflection and calling setAccessible(true)\r\n\t}", "public Sad() {\n }", "protected Approche() {\n }", "private EagerInitializedSingleton() {\n\t}", "private EagerInitializedSingleton() {\n\t}", "private Conf() {\n // empty hidden constructor\n }", "private Settings() { }", "@Test\n void testEmptyConstructor() {\n assertNotNull(isLockedRequest1);\n }", "private XmlStreamFactory()\n {\n /*\n * nothing to do\n */\n }", "public Preventivo() {\n\n }", "private SerializationUtils() {\n\t\tthrow new AssertionError();\n\t}", "private DarthSidious(){\n }", "@Test( expected = IllegalStateException.class )\n\tpublic void constructorShouldNotBeInstantiable() {\n\t\tnew ReflectionUtil() {\n\t\t\t// constructor is protected\n\t\t};\n\t}", "private QcTestRunner()\n\t{\n\t\t// To prevent external instantiation of this class\n\t}", "private Utility() {\n\t}", "private SingletonClass() {\n x = 10;\n }", "public Clade() {}", "public Identity() {\n\n\t}", "private ClassProxy() {\n }" ]
[ "0.71196234", "0.71057856", "0.7016783", "0.6921221", "0.69167745", "0.6823607", "0.6797366", "0.6746232", "0.66804624", "0.6672716", "0.662442", "0.6596185", "0.65686333", "0.65633756", "0.6551464", "0.6540979", "0.6507657", "0.6503602", "0.65028495", "0.64802945", "0.64546186", "0.64521503", "0.6450825", "0.6424409", "0.64223886", "0.6388686", "0.6384597", "0.6384474", "0.63801014", "0.63759226", "0.637054", "0.6367759", "0.63505596", "0.6340211", "0.63146657", "0.63049686", "0.63028514", "0.6275158", "0.62418586", "0.62303066", "0.6223639", "0.6214614", "0.61969304", "0.61937714", "0.61624855", "0.6128343", "0.61182654", "0.61154425", "0.6102617", "0.61010796", "0.60999304", "0.60884863", "0.6065794", "0.6061174", "0.60595787", "0.60592353", "0.60580087", "0.60533476", "0.6049198", "0.6029465", "0.6026779", "0.6025511", "0.60254633", "0.60225224", "0.60217196", "0.60176337", "0.60151315", "0.60145533", "0.5995263", "0.59942377", "0.5987728", "0.5985202", "0.59795815", "0.59756094", "0.597204", "0.5968131", "0.59659237", "0.59654355", "0.5955599", "0.59547925", "0.5945927", "0.5941297", "0.5921739", "0.59206516", "0.59179246", "0.5913085", "0.5913085", "0.5911247", "0.59107053", "0.5901313", "0.59005207", "0.5899435", "0.58888865", "0.58851415", "0.58833766", "0.58806974", "0.58767027", "0.5874917", "0.5868619", "0.5863793", "0.58589065" ]
0.0
-1
create one time session Factory from static block.
public synchronized static SessionFactory createSessionFactory() { if (sessionFactory == null) { LOG.debug(MODULE + "in createSessionFactory"); sessionFactory = new Configuration().configure().buildSessionFactory(); // ApplicationContext appcontext = ApplicationContextProvider.getApplicationContext(); // sessionFactory = (SessionFactory) appcontext.getBean("sessionFactory"); LOG.debug(MODULE + "sessionFactory created"); } return sessionFactory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static DefaultSessionIdentityMaker newInstance() { return new DefaultSessionIdentityMaker(); }", "private Single<SessionEntity> newSession(UserEntity userEntity) {\n return this.authApi.getToken().flatMap(requestTokenEntity ->\n this.authApi.validateToken(\n new ValidateTokenEntity(\n userEntity.getTMDBUsername(),\n userEntity.getTMDBPassword(),\n requestTokenEntity.getRequestToken()\n )\n ).doOnError((e)-> {\n updateUser(new SessionEntity(false, \"\"), userEntity);\n createUserSession();\n })\n .flatMap(validatedRequestToken ->\n this.authApi.createSession(validatedRequestToken.getRequestToken()).doOnSuccess(sessionEntity -> {\n if (!sessionEntity.isSuccess()) {\n //TODO - refreshSession few times and return guest session.\n }\n\n updateUser(sessionEntity, userEntity);\n }\n )\n ));\n }", "public void startFactory() {\n if (!isStarted) {\n logger.info(\"Starting SessionListenerFactory.\");\n APIEventBus.getInstance().subscribe(this);\n isStarted = true;\n }\n }", "private static Session getInstance() {\n return SingletonHolder.INSTANCE;\n }", "DefaultSession createSession(String id);", "synchronized public Session newSysSession() {\n\n Session session = new Session(sysSession.database,\n sysSession.getUser(), false, false,\n sessionIdCount, null, 0);\n\n session.currentSchema =\n sysSession.database.schemaManager.getDefaultSchemaHsqlName();\n\n sessionMap.put(sessionIdCount, session);\n\n sessionIdCount++;\n\n return session;\n }", "public synchronized static Session getInstance(){\n if (_instance == null) {\n _instance = new Session();\n }\n return _instance;\n }", "public Factory() {\n this(getInternalClient());\n }", "private SingletonSyncBlock() {}", "protected abstract SESSION newSessionObject() throws EX;", "protected Session createSession (ServerChannel channel) {\n return new Session (channel);\n }", "public Session create() {\n // Attempt to generate a random session 5 times then fail\n final int MAX_ATTEMPTS = 5; \n \n // Loop until we have outdone our max attempts\n for(int x = 0; x < MAX_ATTEMPTS; x++) {\n String sessionKey = randomString(SESSION_KEY_SIZE); // SESSION_KEY_SIZE characters\n\n // The session key exists\n if (exists(sessionKey))\n continue;\n\n // Create the new session\n Session session = new Session(sessionKey);\n sessions.put(sessionKey, session, POLICY, EXPIRATION_TIME, EXPIRATION_UNIT); \n return session;\n }\n\n // Failed to generate new session key\n return null;\n }", "private SingletonStatementGenerator() {\n\t}", "public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }", "public static Session createSession(SessionFactory factory){\n Session s;\n\n if((s = (Session) _sessionRef.get()) == null) {\n s = factory.openSession();\n _sessionRef.set(s);\n }\n else{\n if(!s.isConnected())s.reconnect();\n }\n\n return s; \n }", "public Session createSession() {\n\t\tSession session = new Session();\n\t\tput(session.getId(), session);\n\t\treturn session;\n\t}", "@Override\n public void postInit(KeycloakSessionFactory factory) {\n if (singleUseObjectCache == null) {\n this.singleUseObjectCache = getSingleUseObjectCache(factory.create());\n }\n }", "public static BackendFactory getInstance() {\n return INSTANCE;\n }", "public UserSession initUserSession() {\n return new UserSession(RAND_MAX, RAND_MIN, rand(RAND_MIN, RAND_MAX));\n }", "public Session() {\n\t\tLogger.log(\"Creating application session\");\n\t}", "private SingletonTextureFactory(){\n\t\tRandom rand = new Random();\n\t\tfactoryID = rand.nextInt(10000); \n\t}", "@Override\n public Single<SessionEntity> createUserSession() {\n return this.userRepository.getUser().firstOrError().flatMap(userEntity -> {\n if (!userEntity.isGuestUser()) {\n if (userEntity.getSessionId().isEmpty()) {\n return newSession(userEntity);\n }\n else if (userEntity.isHasOpenSession()) {\n return Single.just(new SessionEntity(userEntity.isHasOpenSession(), userEntity.getSessionId()));\n }\n }\n return Single.just(new SessionEntity(false, \"\"));\n });\n }", "com.google.spanner.v1.Session getSessionTemplate();", "private static BlockCipherFactory getBlockCipherFactory() {\n\t\tBlockCipherFactory[] factories = AES.factories;\n\n\t\tif (factories == null) {\n\t\t\t// A single instance of each well-known BlockCipherFactory\n\t\t\t// implementation will be initialized i.e. the attempt to initialize\n\t\t\t// BlockCipherFactory instances will be made once only.\n\t\t\tAES.factories = factories = new BlockCipherFactory[FACTORY_CLASSES.length];\n\n\t\t\tint i = 0;\n\n\t\t\tfor (Class<?> clazz : FACTORY_CLASSES) {\n\t\t\t\ttry {\n\t\t\t\t\tif (BlockCipherFactory.class.isAssignableFrom(clazz)) {\n\t\t\t\t\t\tBlockCipherFactory factory;\n\n\t\t\t\t\t\tif (BouncyCastleBlockCipherFactory.class.equals(clazz))\n\t\t\t\t\t\t\tfactory = BOUNCYCASTLE_FACTORY;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tfactory = (BlockCipherFactory) clazz.newInstance();\n\n\t\t\t\t\t\tfactories[i++] = factory;\n\t\t\t\t\t}\n\t\t\t\t} catch (Throwable t) {\n\t\t\t\t\tif (t instanceof InterruptedException)\n\t\t\t\t\t\tThread.currentThread().interrupt();\n\t\t\t\t\telse if (t instanceof ThreadDeath)\n\t\t\t\t\t\tthrow (ThreadDeath) t;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tRandom random = AES.random;\n\t\tbyte[] key = AES.key;\n\t\tbyte[] in = AES.in;\n\n\t\trandom.nextBytes(key);\n\t\trandom.nextBytes(in);\n\n\t\tCipherParameters params = new KeyParameter(key);\n\t\tint blockSize = BLOCK_SIZE;\n\t\tint inEnd = in.length - blockSize + 1;\n\t\tbyte[] out = AES.out;\n\t\tlong minTime = Long.MAX_VALUE;\n\t\tBlockCipherFactory minFactory = null;\n\n\t\tfor (int f = 0; f < factories.length; ++f) {\n\t\t\tBlockCipherFactory factory = factories[f];\n\n\t\t\ttry {\n\t\t\t\tBlockCipher cipher = factory.createBlockCipher();\n\n\t\t\t\tif (cipher == null) {\n\t\t\t\t\t// The BlockCipherFactory failed to initialize a new\n\t\t\t\t\t// BlockCipher instance. We will not use it again because\n\t\t\t\t\t// the failure may persist.\n\t\t\t\t\tfactories[f] = null;\n\t\t\t\t} else {\n\t\t\t\t\tcipher.init(true, params);\n\n\t\t\t\t\tlong startTime = System.nanoTime();\n\n\t\t\t\t\tfor (int inOff = 0; inOff < inEnd; inOff = inOff + blockSize) {\n\t\t\t\t\t\tcipher.processBlock(in, inOff, out, 0);\n\t\t\t\t\t}\n\t\t\t\t\t// We do not invoke the method BlockCipher.reset() so we do\n\t\t\t\t\t// not need to take it into account in the benchmark.\n\n\t\t\t\t\tlong endTime = System.nanoTime();\n\t\t\t\t\tlong time = endTime - startTime;\n\n\t\t\t\t\tif (time < minTime) {\n\t\t\t\t\t\tminTime = time;\n\t\t\t\t\t\tminFactory = factory;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (Throwable t) {\n\t\t\t\tif (t instanceof InterruptedException)\n\t\t\t\t\tThread.currentThread().interrupt();\n\t\t\t\telse if (t instanceof ThreadDeath)\n\t\t\t\t\tthrow (ThreadDeath) t;\n\t\t\t}\n\t\t}\n\t\treturn minFactory;\n\t}", "SessionManagerImpl() {\n }", "private void startNewSession() {\n final FragmentTransaction ft = getFragmentManager().beginTransaction();\n Fragment sessionFragment = null;\n if (mCurrentExperiment.hasSAM()) {\n sessionFragment = new SAMSessionFragment();\n }\n // if there's not hte sam, we start directly with the NASA\n else if (mCurrentExperiment.hasNASATLX()) {\n sessionFragment = new NASATLXSessionFragment();\n }\n ft.replace(R.id.main_content_frame, sessionFragment);\n ft.commit();\n }", "public interface SessionFactory {\n /**\n * Retrieves a new session. If the session isn't closed, second call from the same thread would\n * result in retrieving the same session\n *\n * @return\n */\n Session getSession();\n\n /**\n * Closes the current session associated with this transaction if present\n */\n void closeSession();\n\n /**\n * Returns true if we have connected the factory to redis\n *\n * @return\n */\n boolean isConnected();\n\n /**\n * Closes the session factory which disposes of the underlying redis pool\n */\n void close();\n}", "static void beginNewSession() {\n SESSION_ID = null;\n Prefs.INSTANCE.setEventPlatformSessionId(null);\n\n // A session refresh implies a pageview refresh, so clear runtime value of PAGEVIEW_ID.\n PAGEVIEW_ID = null;\n }", "private SessionTicket createUniqueSessionTicket() {\n String ticket = UUID.randomUUID().toString();\n SessionTicket sessionTicket = new SessionTicket();\n sessionTicket.setTicket(ticket);\n return sessionTicket;\n }", "private SingletonColorFactory() {\n\t\tRandom rand = new Random();\n\t\tfactoryID = rand.nextInt(10000);\n\t}", "public static StaticFactoryInsteadOfConstructors newInstance() {\n return new StaticFactoryInsteadOfConstructors();\n }", "BlockchainFactory getBlockchainFactory();", "Session createSession(Long courseId, Long studentId, Session session);", "public static Session openSession() {\n \treturn sessionFactory.openSession();\n }", "private DefaultSession createDefaultSession(CommandHandler commandHandler) {\n stubSocket = createTestSocket(COMMAND.getName());\n commandHandlerMap.put(commandToRegister, commandHandler);\n initializeConnectCommandHandler();\n return new DefaultSession(stubSocket, commandHandlerMap);\n }", "private PSStartServerFactory() {\n if(instance == null)\n instance = new PSStartServerFactory();\n }", "public static List<CourseSession> createSessions() {\n List<CourseSession> list = new ArrayList<CourseSession>();\n list.add(createSession(\"1\"));\n list.add(createSession(\"2\"));\n return list;\n }", "private void RecordStoreLockFactory() {\n }", "DatastoreSession createSession();", "static SecurityHandler create() {\n return DEFAULT_INSTANCE;\n }", "InternalSession createSession(String sessionId);", "private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}", "IDAOSession createNewSession();", "public Session createSession() {\n\t\treturn this.session;\n\t}", "public Session createSession(String sessionId);", "public static TimedStateMachineFactory init() {\n\t\ttry {\n\t\t\tTimedStateMachineFactory theTimedStateMachineFactory = (TimedStateMachineFactory) EPackage.Registry.INSTANCE\n\t\t\t\t\t.getEFactory(TimedStateMachinePackage.eNS_URI);\n\t\t\tif (theTimedStateMachineFactory != null) {\n\t\t\t\treturn theTimedStateMachineFactory;\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new TimedStateMachineFactoryImpl();\n\t}", "public Session createEmptySession();", "public void createSession(int uid);", "public static Session currentSession() {\n \tif (sessionFactory == null) {\n \t\tinitialize();\n \t}\n \tif (singleSessionMode) {\n \t\tif (singleSession == null) {\n \t\t\tsingleSession = sessionFactory.openSession();\n \t\t}\n \t\treturn singleSession;\n \t} else {\n\t Session s = session.get();\n\t \n\t // Open a new Session, if this Thread has none yet\n\t if (s == null || !s.isOpen()) {\n\t s = sessionFactory.openSession();\n\t session.set(s);\n\t }\n\t return s;\n \t}\n }", "public static Session getSession() {\n if(sesh == null) {\n return sesh = sf.openSession();\n }\n\n return sesh;\n }", "private SessionFactoryUtil() {\r\n\t}", "@Override\n public CreateSessionResponse createSession()\n throws EwalletException {\n return null;\n }", "public UserSession login () {\n\t\tRandom r = new Random();\n\t\tthis.session_id = Utility.md5(this.avatar + this.alias + System.currentTimeMillis() + r.nextInt());\n\t\tthis.karmaKubes = KarmaKube.find(\"byRecipient_idAndOpenedAndRejected\", this.id, false, false).fetch(1000);\n\t\tthis.lastLogin = Utility.time();\n\t\tthis.populateSuperPowerDetails();\n\t\tthis.excludedUsers = UserExclusion.excludedList(this.id);\n\t\treturn new UserSession(this, this.session_id);\n\t}", "private static void startNewSession(final long timestamp) {\n openSession();\n\n sessionId = timestamp;\n //Log.i(\"sessionId\",\"updated at startNewSession()\");\n SharedPreferences preferences = CommonUtils.getSharedPreferences(context);\n preferences.edit().putLong(Constants.Z_PREFKEY_LAST_END_SESSION_ID, sessionId).apply();\n\n logEvent(START_SESSION_EVENT, null, null, timestamp, false);\n logWorker.post(new Runnable() {\n @Override\n public void run() {\n sendEventToServer(START_SESSION_EVENT, timestamp, Constants.Z_START_SESSION_EVENT_LOG_URL, true);\n }\n });\n\n }", "public static AsteroidFactory getInstance() {\r\n\t\treturn instance;\r\n\t}", "Block createBlock();", "public abstract Thread startSession();", "Factory getFactory()\n {\n return configfile.factory;\n }", "@Override\n public SessionClient build() {\n Supplier<CompletableFuture<SessionClient>> proxyFactory = () -> CompletableFuture.completedFuture(\n new DefaultRaftSessionClient(\n primitiveName,\n primitiveType,\n serviceConfig,\n partitionId,\n DefaultRaftClient.this.protocol,\n selectorManager,\n sessionManager,\n readConsistency,\n communicationStrategy,\n threadContextFactory.createContext(),\n minTimeout,\n maxTimeout));\n\n SessionClient proxy;\n\n ThreadContext context = threadContextFactory.createContext();\n\n // If the recovery strategy is set to RECOVER, wrap the builder in a recovering proxy client.\n if (recoveryStrategy == Recovery.RECOVER) {\n proxy = new RecoveringSessionClient(\n clientId,\n partitionId,\n primitiveName,\n primitiveType,\n proxyFactory,\n context);\n } else {\n proxy = proxyFactory.get().join();\n }\n\n // If max retries is set, wrap the client in a retrying proxy client.\n if (maxRetries > 0) {\n proxy = new RetryingSessionClient(\n proxy,\n context,\n maxRetries,\n retryDelay);\n }\n return new BlockingAwareSessionClient(proxy, context);\n }", "public static Locks create() {\n\t\tString uuid = ObjectId.get().toHexString();\n\t\treturn owner( uuid );\n\t}", "InternalSession createEmptySession();", "public createsessions() {\n initComponents();\n loadlec();\n loadlec2();\n\n // subcode() ;\n loadsubname();\n loadsubname1();\n\n loadtag();\n loadtag2();\n\n loadgrpid();\n loadgrpid2();\n\n loadsubgrpid1();\n loadsubgrpid2();\n\n }", "public static StaticFactoryInsteadOfConstructors type(Object object){\n return new StaticFactoryInsteadOfConstructors();\n }", "public static VoteSession createFakeVoteSession() {\n\t\tLocalDateTime dt = LocalDateTime.now();\n return VoteSession.builder()\n \t\t.voteSessionId(faker.number().randomNumber())\n .dateTimeToStart(dt)\n .dateTimeToEnd(dt.plusMinutes(1))\n .status(\"standby\")\n .voteTopicId(VoteTopicUtils.createFakeVoteTopic())\n .build();\n \n }", "private SessionFactoryUtils() {\n super();\n }", "public static JWTLoginModuleDataHolder getInstance() {\n return instance;\n }", "private static SessionFactory buildSessionFactory() {\n\t\ttry {\n\t\t\tConfiguration config = new Configuration().configure(); \n\t\t\tServiceRegistry serviceRegistry =\n\t\t\t\t\tnew StandardServiceRegistryBuilder()\n\t\t\t.applySettings(config.getProperties()).build();\n\n\t\t\tHibernatePBEEncryptorRegistry registry = HibernatePBEEncryptorRegistry.getInstance();\n\t\t\t\n\t\t\tStandardPBEStringEncryptor myEncryptor = new StandardPBEStringEncryptor();\n\t\t\t// FIXME : this is insecure and needs to be fixed\n\t\t\tmyEncryptor.setPassword(\"123\");\n\t\t\tregistry.registerPBEStringEncryptor(\"myHibernateStringEncryptor\", myEncryptor);\n\t\t\t\n\t\t\t\n\t\t\treturn config.buildSessionFactory(serviceRegistry); \n\t\t}\n\t\tcatch (Throwable ex) {\n\t\t\t// Make sure you log the exception, as it might be swallowed\n\t\t\tSystem.err.println(\"Initial SessionFactory creation failed.\" + ex);\n\t\t\tthrow new ExceptionInInitializerError(ex);\n\t\t}\n\t}", "private void initialisation()\n\t{\n\t\tdaoFactory = new DaoFactory();\n\n\t\ttry\n\t\t{\n\t\t\tequationStandardSessions = EquationCommonContext.getContext().getGlobalProcessingEquationStandardSessions(\n\t\t\t\t\t\t\tsession.getSessionIdentifier());\n\t\t}\n\t\tcatch (Exception eQException)\n\t\t{\n\t\t\tif (LOG.isErrorEnabled())\n\t\t\t{\n\t\t\t\tStringBuilder message = new StringBuilder(\"There is a problem creating Global processing the sessions\");\n\t\t\t\tLOG.error(message.toString(), eQException);\n\t\t\t}\n\t\t}\n\t}", "AbstractJwtSessionModule() {\n jwtBuilderFactory = new JwtBuilderFactory();\n }", "public static Factory factory() {\n return ext_h::new;\n }", "@Override\n\tprotected Serializable doCreate(Session session) {\n\t\treturn null;\n\t}", "public SingleSessionFactory(Session session) {\n\t\tthis.session = session;\n\t}", "public WebServiceConfig()\n {\n// session1 = new sessionmanager(getApplicationContext);\n\n }", "public static TestAcceptFactory instance() {\n return TestAcceptFactory._instance;\n }", "public Factory() {\n\t\tsuper();\n\t}", "public SingletonSyncBlock getInstance() { // when getting a new instance, getInstance as synchronized method is\n\t\t\t\t\t\t\t\t\t\t\t\t// called\n\n\t\tif (SINGLETON_INSTANCE == null) { // if no Singleton was yet initialized, one instance will be created else,\n\t\t\t\t\t\t\t\t\t\t\t// it's returned the one already created.\n\n\t\t\tsynchronized (SingletonSyncBlock.class) { // synchronized block\n\n\t\t\t\tif (SINGLETON_INSTANCE == null) {\n\n\t\t\t\t\tSINGLETON_INSTANCE = new SingletonSyncBlock();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn SINGLETON_INSTANCE;\n\n\t}", "protected Session newSession(URI serverUri) throws QueryException {\n try {\n // The factory won't be in the cache, as a corresponding session would have already been created.\n SessionFactory sessionFactory = SessionFactoryFinder.newSessionFactory(serverUri, true);\n factoryCache.add(sessionFactory);\n // now create the session\n Session session = sessionFactory.newSession();\n sessionCache.put(serverUri, session);\n return session;\n } catch (NonRemoteSessionException nrse) {\n throw new QueryException(\"State Error: non-local URI was mapped to a local session\", nrse);\n } catch (SessionFactoryFinderException sffe) {\n throw new QueryException(\"Unable to get a session to the server\", sffe);\n }\n }", "MakeflowFactory getMakeflowFactory();", "public static SessionKeeper getInstance(){\r\n if (sessionKeeperInstance == null) sessionKeeperInstance = new SessionKeeper();\r\n return sessionKeeperInstance;\r\n }", "public static Session register(SessionFactory factory) throws IllegalStateException {\n if(_sessionRef.get() != null) {\n throw new IllegalStateException(\n \"Thread already registered with a session\");\n }\n\n Session s = factory.openSession();\n _sessionRef.set(s);\n return s;\n }", "static void startSession() {\n /*if(ZeTarget.isDebuggingOn()){\n Log.d(TAG,\"startSession() called\");\n }*/\n if (!isContextAndApiKeySet(\"startSession()\")) {\n return;\n }\n final long now = System.currentTimeMillis();\n\n runOnLogWorker(new Runnable() {\n @Override\n public void run() {\n logWorker.removeCallbacks(endSessionRunnable);\n long previousEndSessionId = getEndSessionId();\n long lastEndSessionTime = getEndSessionTime();\n if (previousEndSessionId != -1\n && now - lastEndSessionTime < Constants.Z_MIN_TIME_BETWEEN_SESSIONS_MILLIS) {\n DbHelper dbHelper = DbHelper.getDatabaseHelper(context);\n dbHelper.removeEvent(previousEndSessionId);\n }\n //startSession() can be called in every activity by developer, hence upload events and sync datastore\n // only if it is a new session\n //syncToServerIfNeeded(now);\n startNewSessionIfNeeded(now);\n\n openSession();\n\n // Update last event time\n setLastEventTime(now);\n //syncDataStore();\n //uploadEvents();\n\n }\n });\n }", "private com.google.protobuf.SingleFieldBuilder<\n com.weizhu.proto.WeizhuProtos.Session, com.weizhu.proto.WeizhuProtos.Session.Builder, com.weizhu.proto.WeizhuProtos.SessionOrBuilder> \n getSessionFieldBuilder() {\n if (sessionBuilder_ == null) {\n sessionBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n com.weizhu.proto.WeizhuProtos.Session, com.weizhu.proto.WeizhuProtos.Session.Builder, com.weizhu.proto.WeizhuProtos.SessionOrBuilder>(\n getSession(),\n getParentForChildren(),\n isClean());\n session_ = null;\n }\n return sessionBuilder_;\n }", "public Session openSession() {\r\n //Interceptor interceptor= new Interceptor();\r\n //Session regresar = sessionFactory.withOptions().interceptor(interceptor).openSession();\r\n Session regresar = sessionFactory.openSession();\r\n //interceptor.setSession(regresar);\r\n return regresar;\r\n }", "public static SessionFactory getSessionFactory() {\n \t\n \treturn sessionFactory;\n }", "protected Session buildOrObtainSession() {\r\n\t\tLOGGER.fine(\"Opening a new Session\");\r\n\t\tSession s = super.buildOrObtainSession();\r\n\r\n\t\tLOGGER.fine(\"Disabling automatic flushing of the Session\");\r\n\t\ts.setFlushMode(FlushMode.MANUAL);\r\n\r\n\t\treturn s;\r\n\t}", "public static SessionFactory getSessionFactory() {\r\n\t\t/*\r\n\t\t * Instead of a static variable, use JNDI: SessionFactory sessions =\r\n\t\t * null; try { Context ctx = new InitialContext(); String jndiName =\r\n\t\t * \"java:hibernate/HibernateFactory\"; sessions =\r\n\t\t * (SessionFactory)ctx.lookup(jndiName); } catch (NamingException ex) {\r\n\t\t * throw new InfrastructureException(ex); } return sessions;\r\n\t\t */\r\n\t\treturn sessionFactory;\r\n\t}", "public SessionFactory getFactory() {\n\t\treturn factory;\n\t}", "public static StaticFactoryInsteadOfConstructors from(Object instant) {\n return new StaticFactoryInsteadOfConstructors();\n }", "public static EsoFactory init()\r\n {\r\n try\r\n {\r\n EsoFactory theEsoFactory = (EsoFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://www.cau.de/cs/kieler/sim/eso/Eso\"); \r\n if (theEsoFactory != null)\r\n {\r\n return theEsoFactory;\r\n }\r\n }\r\n catch (Exception exception)\r\n {\r\n EcorePlugin.INSTANCE.log(exception);\r\n }\r\n return new EsoFactoryImpl();\r\n }", "public static StaticFactoryInsteadOfConstructors valueOf(Object object) {\n return new StaticFactoryInsteadOfConstructors();\n }", "private SM_INIT(byte[] publicRsaKey, byte[] blowfishKey, int sessionId) {\n super(0x00);\n this.sessionId = sessionId;\n this.publicRsaKey = publicRsaKey;\n this.blowfishKey = blowfishKey;\n }", "SimplStateMachineFactory getSimplStateMachineFactory();", "private StreamFactory()\n {\n /*\n * nothing to do\n */\n }", "public static void init() {\n startTime = System.currentTimeMillis();\n if (clientExecutorEngine == null) {\n clientExecutorEngine = new ClientExecutorEngine();\n HzClient.initClient();\n }\n }", "public static ContenedorloginviewmodelFactory init() {\r\n\t\ttry {\r\n\t\t\tContenedorloginviewmodelFactory theContenedorloginviewmodelFactory = (ContenedorloginviewmodelFactory)EPackage.Registry.INSTANCE.getEFactory(ContenedorloginviewmodelPackage.eNS_URI);\r\n\t\t\tif (theContenedorloginviewmodelFactory != null) {\r\n\t\t\t\treturn theContenedorloginviewmodelFactory;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\tEcorePlugin.INSTANCE.log(exception);\r\n\t\t}\r\n\t\treturn new ContenedorloginviewmodelFactoryImpl();\r\n\t}", "private void setupSession() {\n // TODO Retreived the cached Evernote AuthenticationResult if it exists\n// if (hasCachedEvernoteCredentials) {\n// AuthenticationResult result = new AuthenticationResult(authToken, noteStoreUrl, webApiUrlPrefix, userId);\n// session = new EvernoteSession(info, result, getTempDir());\n// }\n ConnectionUtils.connectFirstTime();\n updateUiForLoginState();\n }", "public OBStoreFactory getFactory();", "@Override\r\n public Serializable createStaticState() {\r\n return this.m_func.createStaticState();\r\n }", "public static Login getInstance(){\n if (login==null){\n login=new Login();\n }\n return login;\n }", "private Session() {\n }" ]
[ "0.58526176", "0.569183", "0.55973184", "0.55821204", "0.55708534", "0.556512", "0.5435487", "0.5424362", "0.5403803", "0.5399645", "0.53445655", "0.53187937", "0.5306859", "0.5301074", "0.5294093", "0.52426285", "0.5232778", "0.5220353", "0.52112204", "0.520828", "0.5204778", "0.5194868", "0.51940244", "0.5148843", "0.5139481", "0.51332027", "0.5132937", "0.5125372", "0.5120169", "0.5096175", "0.5092697", "0.5079291", "0.5071822", "0.5053115", "0.5045202", "0.5038944", "0.50295967", "0.5025699", "0.50215447", "0.5019462", "0.500439", "0.50006175", "0.49862596", "0.49794677", "0.4975216", "0.49727976", "0.4942014", "0.49392402", "0.4936923", "0.491488", "0.49144015", "0.49104756", "0.4906294", "0.49040467", "0.48966178", "0.48812252", "0.4866888", "0.48661894", "0.4856544", "0.48489955", "0.48484236", "0.48469353", "0.48427457", "0.48296222", "0.4828791", "0.48235646", "0.48154214", "0.48116064", "0.4810248", "0.48100877", "0.4806069", "0.48011604", "0.4800876", "0.47955665", "0.47936746", "0.47929844", "0.47896156", "0.4786164", "0.478008", "0.47710738", "0.47697684", "0.4763328", "0.47545278", "0.4752755", "0.47524878", "0.4747343", "0.47437415", "0.47427192", "0.47399053", "0.47336292", "0.4733052", "0.47318935", "0.4731729", "0.4726884", "0.47229388", "0.47220662", "0.4719861", "0.4715059", "0.47114134", "0.47101521" ]
0.5498676
6
Returns a session from the session context. If there is no session inthe context it opens a session, stores it in the context and returns it. This factory is intended to be used with a hibernate.cfg.xml including the following property thread This wouldreturn the current open session or if this does not exist, will create a new session
public static Session getCurrentSession() { //LOG.debug(MODULE + "Get CurrentSession"); /* This code is to find who has called the method only for debugging and testing purpose. try { throw new Exception("Who called Me : "); } catch (Exception e) { //LOG.debug("I was called by " + e.getStackTrace()[2].getClassName() + "." + e.getStackTrace()[2].getMethodName() + "()!"); LOG.debug("I was called by : ", e); } */ return openSession(); //return sessionFactory.getCurrentSession(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Session currentSession() {\n Session session = (Session) sessionThreadLocal.get();\n // Open a new Session, if this Thread has none yet\n try {\n if (session == null) {\n session = sessionFactory.openSession();\n sessionThreadLocal.set(session);\n }\n } catch (HibernateException e) {\n logger.error(\"Get current session error: \" + e.getMessage());\n }\n return session;\n }", "public static Session getSession() throws HException {\r\n\t\tSession s = (Session) threadSession.get();\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (s == null) {\r\n\t\t\t\tlog.debug(\"Opening new Session for this thread.\");\r\n\t\t\t\tif (getInterceptor() != null) {\r\n\t\t\t\t\t\r\n\t\t\t\t\ts = getSessionFactory().withOptions().interceptor(getInterceptor()).openSession();\r\n\t\t\t\t} else {\r\n\t\t\t\t\ts = getSessionFactory().openSession();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthreadSession.set(s);\r\n\t\t\t\tsetConnections(1);\r\n\t\t\t}\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tthrow new HException(ex);\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "public static Session currentSession() throws HibernateException {\n Session s = (Session) threadLocal.get();\n\n if (s == null) {\n try {\n\t\t\t\tif (getInterceptor() != null) {\n\t\t\t\t\tlog.debug(\"Using Interceptor: \" + getInterceptor().getClass());\n\t\t\t\t\ts = sessionFactory.openSession(getInterceptor());\n\t\t\t\t} else {\n\t\t\t\t\ts = sessionFactory.openSession();\n\t\t\t\t}\n }\n catch (HibernateException he) {\n System.err.println(\"%%%% Error Creating SessionFactory %%%%\");\n throw new RuntimeException(he);\n }\n }\n return s;\n }", "@Override\n public Session getSession() throws HibernateException {\n Session session = threadLocal.get();\n\n if (session == null || !session.isOpen()) {\n session = (sessionFactory != null) ? sessionFactory.openSession()\n : null;\n threadLocal.set(session);\n }\n return session;\n }", "public static Session currentSession() {\n \tif (sessionFactory == null) {\n \t\tinitialize();\n \t}\n \tif (singleSessionMode) {\n \t\tif (singleSession == null) {\n \t\t\tsingleSession = sessionFactory.openSession();\n \t\t}\n \t\treturn singleSession;\n \t} else {\n\t Session s = session.get();\n\t \n\t // Open a new Session, if this Thread has none yet\n\t if (s == null || !s.isOpen()) {\n\t s = sessionFactory.openSession();\n\t session.set(s);\n\t }\n\t return s;\n \t}\n }", "public Session openOrRetrieveSessionForThread() {\n Session session = THREADED_SESSION.get();\n if (session == null) {\n session = getSessionFactory().openSession();\n THREADED_SESSION.set(session);\n }\n return session;\n }", "public Session getSession() {\n\t\tSession session = this.session;\r\n\t\tif (session == null) {\r\n\t\t\t// 2. altrimenti genera una nuova sessione utilizzando la factory (e.g. Spring MVC)\r\n\t\t\tsession = this.sessionFactory.getCurrentSession();\r\n\t\t}\r\n\t\treturn session;\r\n\t}", "public static Session getSession() {\n if(sesh == null) {\n return sesh = sf.openSession();\n }\n\n return sesh;\n }", "private Session getSession() {\n\t\treturn factory.getCurrentSession();\n\t}", "protected Session getSession() {\r\n if (session == null || !session.isOpen()) {\r\n LOG.debug(\"Session is null or not open...\");\r\n return HibernateUtil.getCurrentSession();\r\n }\r\n LOG.debug(\"Session is current...\");\r\n return session;\r\n }", "public Session getSession(){\n\t\treturn sessionFactory.openSession();\n\t}", "public static Session openSession() {\n \treturn sessionFactory.openSession();\n }", "public Session getSession() {\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "public static Session getSession() {\n\n if (serverRunning.get() && !session.isClosed()) {\n return session;\n } else {\n if (session.isClosed()) {\n throw new IllegalStateException(\"Session is closed\");\n } else {\n throw new IllegalStateException(\"Cluster not running\");\n }\n }\n }", "public Session openSession() {\r\n\t\treturn sessionFactory.openSession();\r\n\t}", "public static synchronized Session getCurrentSession(Context context) {\n \tif (Session.currentSession == null) {\n Session.sessionFromCurrentSession(context);\n \t}\n\n \t\treturn Session.currentSession;\n }", "protected final Session getSession() {\n\t\treturn m_sess;\n\t}", "public Session createSession() {\n\t\treturn this.session;\n\t}", "public Session getCurrentSession() {\r\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "public static Session getCurrentSession() {\n return sessionfactory.getCurrentSession();\n }", "public /*static*/ Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "protected Session getSession() {\n return sessionUtility.getSession();\n }", "public static Session getSession() {\n return session;\n }", "protected Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "public static Session currentSession(SessionFactory fac)\n throws HibernateException {\n Session s;\n\n if((s = (Session) _sessionRef.get()) == null) {\n s = fac.openSession();\n _sessionRef.set(s);\n }\n else{\n if(!s.isConnected())s.reconnect();\n }\n\n return s;\n }", "public Session openSession() {\r\n return sessionFactory.openSession();\r\n }", "public Session getSession() {\n if (this.session == null) {\n this.logger.error(\"Sessão não iniciada.\");\n throw new IllegalStateException(\"A sessão não foi criada antes do uso do DAO\");\n }\n return this.session;\n }", "public synchronized Session getSession() throws JmsException {\n try {\n if (session == null) {\n Connection conToUse;\n if (connection == null) {\n if (sharedConnectionEnabled()) {\n conToUse = getSharedConnection();\n } else {\n connection = createConnection();\n connection.start();\n conToUse = connection;\n }\n } else {\n conToUse = connection;\n }\n session = createSession(conToUse);\n }\n return session;\n } catch (JMSException e) {\n throw convertJmsAccessException(e);\n }\n }", "protected final Session getSession() {\n return sessionTracker.getSession();\n }", "private Session openSession() {\n return sessionFactory.getCurrentSession();\n }", "public RDBMSSession getSession() {\r\n\t\treturn (RDBMSSession) session;\r\n\t}", "public Session getSession()\n\t{\n\t\treturn m_Session;\n\t}", "public Session getCurrentSession() {\r\n return sessionFactory.getCurrentSession();\r\n }", "protected Session getCurrentSession()\n \t{\n \t\treturn this.sessionFactory.getCurrentSession();\n \t}", "public Session getCurrentSession() {\r\n return sessionFactory.getCurrentSession();\r\n }", "public static Session getCurrentSession() {\n if(currentSession != null){\n return currentSession;\n } else {\n createNewSession(new Point2D(300,300));\n return getCurrentSession();\n }\n }", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "private Session getCurrentSession() {\n return sessionFactory.getCurrentSession();\n }", "protected Session getSession() {\n\n return (Session) getExtraData().get(ProcessListener.EXTRA_DATA_SESSION);\n }", "@Override\n public Session getSession() throws SQLException {\n // If we don't yet have a live transaction, start a new one\n // NOTE: a Session cannot be used until a Transaction is started.\n if (!isTransActionAlive()) {\n sessionFactory.getCurrentSession().beginTransaction();\n configureDatabaseMode();\n }\n // Return the current Hibernate Session object (Hibernate will create one if it doesn't yet exist)\n return sessionFactory.getCurrentSession();\n }", "public Session createSession() {\n\t\tSession session = new Session();\n\t\tput(session.getId(), session);\n\t\treturn session;\n\t}", "private Session getSession (String sessionID) {\n\t\tSession session;\n\t\tif (get(sessionID) != null) {\n\t\t\tsession = get(sessionID);\n\t\t} else {\n\t\t\tsession = new Session();\n\t\t\tput(session.getId(), session);\n\t\t}\n\t\treturn session;\n\t}", "public static CustomSession get() {\r\n\t\treturn (CustomSession) Session.get();\r\n\t}", "@Override\r\n\tpublic HttpSession getSession()\r\n\t{\r\n\t\t// This method was implemented as a workaround to __CR3668__ and Vignette Support ticket __247976__.\r\n\t\t// The issue seems to be due to the fact that both local and remote portlets try to retrieve\r\n\t\t// the session object in the same request. Invoking getSession during local portlets\r\n\t\t// processing results in a new session being allocated. Unfortunately, as remote portlets\r\n\t\t// use non-WebLogic thread pool for rendering, WebLogic seems to get confused and associates\r\n\t\t// the session created during local portlet processing with the portal request.\r\n\t\t// As a result none of the information stored originally in the session can be found\r\n\t\t// and this results in errors.\r\n\t\t// To work around the issue we maintain a reference to original session (captured on the\r\n\t\t// first invocation of this method during the request) and return it any time this method\r\n\t\t// is called. This seems to prevent the issue.\r\n\t\t// In addition, to isolate SPF code from the session retrieval issue performed by Axis\r\n\t\t// handlers used during WSRP request processing (e.g. StickyHandler), we also store\r\n\t\t// a reference to the session as request attribute. Newly added com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t// can then use the request attribute value instead of calling request.getSession()\r\n\t\t// which before this change resulted in new session being allocated and associated with\r\n\t\t// the portal request.\r\n\r\n\t\tif (mSession == null) {\r\n\t\t\tmSession = ((HttpServletRequest)getRequest()).getSession();\r\n\r\n\t\t\t// Store session in request attribute for com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t\tgetRequest().setAttribute(ORIGINAL_SESSION, mSession);\r\n\t\t}\r\n\r\n\t\treturn mSession;\r\n\t}", "public Session openSession() {\r\n //Interceptor interceptor= new Interceptor();\r\n //Session regresar = sessionFactory.withOptions().interceptor(interceptor).openSession();\r\n Session regresar = sessionFactory.openSession();\r\n //interceptor.setSession(regresar);\r\n return regresar;\r\n }", "public AbstractSession getSession() {\n return session;\n }", "public Session getSession()\n {\n return session;\n }", "public static SessionManager get(Context context) {\n \tif (self == null) {\n \t\tself = new SessionManager(context);\n \t}\n \treturn self;\n }", "public Session getSession() {\n return session;\n }", "public Session getSession() throws DAOException {\n // Injection fails for this non-managed class.\n DAOException ex = null;\n String pu = PERSISTENCE_UNIT;\n if(session == null || !em.isOpen()) {\n session = null;\n try {\n em = (EntityManager)new InitialContext().lookup(pu);\n } catch(Exception loopEx) {\n ex = new DAOException(loopEx);\n logger.error(\"Persistence unit JNDI name \" + pu + \" failed.\");\n }\n }\n\n getHibernateSession();\n if(ex != null) {\n ex.printStackTrace();\n }\n return session;\n }", "public Session getSession();", "private void getHibernateSession() {\n try {\n session = em.unwrap(Session.class)\n .getSessionFactory().openSession();\n\n } catch(Exception ex) {\n logger.error(\"Failed to invoke the getter to obtain the hibernate session \" + ex.getMessage());\n ex.printStackTrace();\n }\n\n if(session == null) {\n logger.error(\"Failed to find hibernate session from \" + em.toString());\n }\n }", "public Session getSafeSession()\n {\n beginSession(false);\n return session;\n }", "Session getCurrentSession();", "Session getCurrentSession();", "private Session fetchSession()\n\t{\n\t\t\tlog.info (\"******Fetching Hibernate Session\");\n\n\t\t\tSession session = HibernateFactory.currentSession();\n\n\t\t\treturn session;\n\t \n\t}", "public synchronized static Session getInstance(){\n if (_instance == null) {\n _instance = new Session();\n }\n return _instance;\n }", "protected DatabaseSession getDbSession() {\n if(dbSession == null) {\n dbSession = getServerSession();\n }\n return dbSession;\n }", "public Session getSession() { return session; }", "public Session getSession() {\n return session;\n }", "protected Session getSession() { return session; }", "public static Session currentSession() throws IllegalStateException {\n Session s;\n\n if((s = (Session) _sessionRef.get()) == null) {\n throw new IllegalStateException(\"Thread not registered with a session\");\n }\n \n if(!s.isConnected()){\n s.reconnect();\n }\n\n return s;\n }", "Session getSession();", "Session getSession();", "public Session getSysSession() {\n\n sysSession.currentSchema =\n sysSession.database.schemaManager.getDefaultSchemaHsqlName();\n sysSession.isProcessingScript = false;\n sysSession.isProcessingLog = false;\n\n sysSession.setUser(sysSession.database.getUserManager().getSysUser());\n\n return sysSession;\n }", "public static SessionFactory getSessionFactory() {\r\n\t\t/*\r\n\t\t * Instead of a static variable, use JNDI: SessionFactory sessions =\r\n\t\t * null; try { Context ctx = new InitialContext(); String jndiName =\r\n\t\t * \"java:hibernate/HibernateFactory\"; sessions =\r\n\t\t * (SessionFactory)ctx.lookup(jndiName); } catch (NamingException ex) {\r\n\t\t * throw new InfrastructureException(ex); } return sessions;\r\n\t\t */\r\n\t\treturn sessionFactory;\r\n\t}", "protected abstract SESSION getThisAsSession();", "public IHTTPSession getSession() {\n\t\treturn session;\n\t}", "final protected RobotSessionGlobals getSession() {\n return mSession;\n }", "DefaultSession getSession(String id);", "public jkt.hms.masters.business.MasSession getSession () {\n\t\treturn session;\n\t}", "protected SessionFactory getSessionFactory() {\n\t\treturn this.sessionFactory;\n\t}", "public Session session() {\n return session;\n }", "public LocalSession session() { return session; }", "synchronized Session getSession(long id) {\n return (Session) sessionMap.get(id);\n }", "public User getSession(){\n\t\treturn this.session;\n\t}", "private static Session getInstance() {\n return SingletonHolder.INSTANCE;\n }", "public Session getSession() throws LeaseException {\n return getSession(true);\n }", "public Object getObject() {\n\t\treturn this.sessionFactory;\n\t}", "public static HttpSession getSession(Boolean session) {\r\n\t\treturn (HttpSession) FacesContext.getCurrentInstance()\r\n\t\t\t\t.getExternalContext().getSession(false);\r\n\t}", "public synchronized static SessionFactory createSessionFactory() {\r\n\r\n if (sessionFactory == null) {\r\n LOG.debug(MODULE + \"in createSessionFactory\");\r\n sessionFactory = new Configuration().configure().buildSessionFactory();\r\n// ApplicationContext appcontext = ApplicationContextProvider.getApplicationContext();\r\n// sessionFactory = (SessionFactory) appcontext.getBean(\"sessionFactory\");\r\n LOG.debug(MODULE + \"sessionFactory created\");\r\n }\r\n\r\n return sessionFactory;\r\n }", "synchronized public Session newSysSession() {\n\n Session session = new Session(sysSession.database,\n sysSession.getUser(), false, false,\n sessionIdCount, null, 0);\n\n session.currentSchema =\n sysSession.database.schemaManager.getDefaultSchemaHsqlName();\n\n sessionMap.put(sessionIdCount, session);\n\n sessionIdCount++;\n\n return session;\n }", "@Override\n public synchronized SessionImpl getConnection() {\n if (Framework.getRuntime().isShuttingDown()) {\n throw new IllegalStateException(\"Cannot open connection, runtime is shutting down\");\n }\n SessionPathResolver pathResolver = new SessionPathResolver();\n Mapper mapper = newMapper(pathResolver, true);\n SessionImpl session = newSession(model, mapper);\n pathResolver.setSession(session);\n sessions.add(session);\n sessionCount.inc();\n return session;\n }", "public static Session getSessionWithKeyspace() {\n\n if (serverRunning.get() && keyspaceCreated.get() && !sessionWithKeyspace.isClosed()) {\n return sessionWithKeyspace;\n } else {\n if (sessionWithKeyspace.isClosed()) {\n throw new IllegalStateException(\"Session is closed\");\n } else {\n throw new IllegalStateException(\"Cluster not running or keyspace has not been created\");\n }\n }\n }", "public static SessionFactory getSessionFactory() {\n\t\treturn sessionFactory;\r\n\t}", "protected final SessionFactory getSessionFactory() {\n\t\tif (this.sessionFactory == null) {\n\t\t\tthrow new IllegalStateException(\"SessionFactory not initialized yet\");\n\t\t}\n\t\treturn this.sessionFactory;\n\t}", "public static Session createSession(SessionFactory factory){\n Session s;\n\n if((s = (Session) _sessionRef.get()) == null) {\n s = factory.openSession();\n _sessionRef.set(s);\n }\n else{\n if(!s.isConnected())s.reconnect();\n }\n\n return s; \n }", "public static SessionFactory getSessionFactory() {\n \t\n \treturn sessionFactory;\n }", "public static SessionFactory getSessionFactory() {\n\t\treturn sessionFactory;\n\t}", "@Override\n\tpublic Session getSession(String appKey,String contextpath, String sessionid) {\n\t\tSession session = this.sessionStore.getSession(appKey, contextpath, sessionid);\n\t\tif(session != null)\n\t\t\tsession._setSessionStore(this);\n\t\treturn session;\n\t}", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n return session_;\n }", "public static SessionFactory getSessionFactory() {\n\t\tif (sessionFactory == null) {\n\t\t\tcreateSessionFactory();\n\t\t}\n\t\treturn sessionFactory;\n\t}", "public static Session getSession(SlingHttpServletRequest request) {\n ResourceResolver resourceResolver = request.getResourceResolver();\n return resourceResolver.adaptTo(Session.class);\n }", "public SessionFactory getHibernateSessionFactory() {\n if (_hibernateTemplate == null) {\n return null;\n }\n return _hibernateTemplate.getSessionFactory();\n }", "@Override\n\tpublic Session getSession() throws Exception {\n\t\treturn null;\n\t}", "public com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder() {\n if (sessionBuilder_ != null) {\n return sessionBuilder_.getMessageOrBuilder();\n } else {\n return session_;\n }\n }" ]
[ "0.80684763", "0.79891914", "0.79841596", "0.7955727", "0.7897821", "0.7837049", "0.77233267", "0.75982183", "0.75559753", "0.7469089", "0.7465884", "0.7450184", "0.7351439", "0.73247087", "0.72234046", "0.72201955", "0.7201571", "0.71987975", "0.7197638", "0.7169647", "0.7169647", "0.71637577", "0.71310854", "0.7127006", "0.7126679", "0.71100354", "0.71042186", "0.70982", "0.709322", "0.70807445", "0.7076768", "0.70709366", "0.7070111", "0.70695287", "0.70558083", "0.7053511", "0.7047499", "0.7043284", "0.7037784", "0.7037784", "0.7037784", "0.70023054", "0.6997162", "0.6977841", "0.69728833", "0.69678754", "0.6952867", "0.69386226", "0.69003934", "0.68979615", "0.68947107", "0.6879871", "0.6875017", "0.68614817", "0.6852744", "0.6838633", "0.6802722", "0.6767186", "0.6767186", "0.674452", "0.673865", "0.6719376", "0.6718977", "0.66668236", "0.665932", "0.66412306", "0.66231537", "0.66231537", "0.66146696", "0.6588965", "0.6548653", "0.653821", "0.6527402", "0.6527377", "0.65151405", "0.6511932", "0.6510927", "0.64980334", "0.6489097", "0.6488684", "0.6485777", "0.6481629", "0.64806116", "0.64718205", "0.64703965", "0.6464084", "0.6453506", "0.64489317", "0.64325273", "0.6432083", "0.64181226", "0.63912386", "0.63836914", "0.6383237", "0.6368994", "0.6360497", "0.63572645", "0.63408655", "0.6336077", "0.63176686" ]
0.6805294
56
closes the session factory
public static void close() { if (sessionFactory != null) { sessionFactory.close(); } LOG.debug(MODULE + "SessionFactory Close"); sessionFactory = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public /*static*/ void close() {\n sessionFactory.close();\n }", "public static void close() {\r\n if (sessionFactory != null) {\r\n sessionFactory.close();\r\n }\r\n sessionFactory = null;\r\n }", "public static void close() {\r\n\t\tif (sessionFactory != null)\r\n\t\t\tsessionFactory.close();\r\n\t\tsessionFactory = null;\r\n\r\n\t}", "public static void close() {\r\n if (sessionFactory != null) {\r\n sessionFactory.close();\r\n }\r\n sessionFactory = null;\r\n }", "public static void shutdown() {\n\t\tgetSessionFactory().close();\n\t}", "void closeSession();", "void closeSession();", "void closeSessionFactory();", "private static void closeSession() {\n isSessionOpen = false;\n }", "public void close() {\n\t\tif (this.session instanceof DatabaseSession) {\n\t\t\t((DatabaseSession) this.session).logout();\n\t\t}\n\t\tthis.session.release();\n\t}", "private void doCloseSession()\n {\n if (session != null)\n {\n try\n {\n database.closeHibernateSession(session);\n }\n finally\n {\n session = null;\n }\n }\n }", "public static synchronized void destroy()\n {\n try\n {\n if (sessionFactory != null)\n {\n sessionFactory.close();\n System.out.println(\"Hibernate could destroy SessionFactory\");\n }\n } catch (Throwable t)\n {\n System.out.println(\"Hibernate could not destroy SessionFactory\");\n t.printStackTrace();\n }\n sessionFactory = null;\n }", "public static void closeSession() {\n \tif (singleSessionMode) {\n \t\tif (singleSession != null) {\n \t\t\tsingleSession.close();\n \t\t\tsingleSession = null;\n \t\t}\n \t} else {\n\t Session s = session.get();\n\t if (s != null && s.isOpen()) {\n\t try {\n\t \ts.close();\n\t } finally {\n\t \tsession.set(null); \t\n\t }\n\t }\n\t \n \t}\n }", "public void closeSession() {\n if (session != null) {\n session.close();\n session = null;\n }\n }", "@AfterClass\n\tpublic static void closeSessionFactory() {\n sessionFactory.close();\n\t}", "@PreDestroy\n protected void destroy() {\n sessionFactory.getCurrentSession().close();\n }", "synchronized void close() {\n\n closeAllSessions();\n sysSession.close();\n sysLobSession.close();\n }", "public void stop() {\n session.close(false);\n }", "protected final void closeSession() {\n Session currentSession = sessionTracker.getOpenSession();\n if (currentSession != null) {\n currentSession.close();\n }\n }", "public final void closeSession() {\n\t\t// Call the base class\n\t\tSystem.out.print(\"Session Closed\");\n\t\tsuper.closeSession();\n\n\t\tif ( m_sock != null) {\n\t\t\ttry {\n\t\t\t\tm_sock.close();\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t}\n\t\t\tm_sock = null;\n\t\t}\n\n\t\tif ( m_in != null) {\n\t\t\ttry {\n\t\t\t\tm_in.close();\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t}\n\t\t\tm_in = null;\n\t\t}\n\n\t\tif ( m_out != null) {\n\t\t\ttry {\n\t\t\t\tm_out.close();\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t}\n\t\t\tm_out = null;\n\t\t}\n\n\n\t}", "public static void close() {\n\t\tif (em != null) {\n\t\t\tem.close();\n\t\t}\n\t\tif (factory != null) {\n\t\t\tfactory.close();\n\t\t}\n\t}", "public static void closeSession() {\n Session session = (Session) sessionThreadLocal.get();\n sessionThreadLocal.set(null);\n try {\n if (session != null)\n session.close();\n } catch (HibernateException e) {\n logger.error(\"Close current session error: \" + e.getMessage());\n }\n }", "public void close() {\n\n try {\n try {\n try {\n if (exception == null) {\n flushSessions();\n }\n\n } catch (Throwable exception) {\n exception(exception);\n } finally {\n\n try {\n if (exception == null) {\n transactionContext.commit();\n }\n } catch (Throwable exception) {\n exception(exception);\n }\n transactionContext.rollback();\n }\n } catch (Throwable exception) {\n exception(exception);\n } finally {\n closeSessions();\n\n }\n } catch (Throwable exception) {\n exception(exception);\n } \n\n // rethrow the original exception if there was one\n if (exception != null) {\n if (exception instanceof Error) {\n throw (Error) exception;\n } else if (exception instanceof RuntimeException) {\n throw (RuntimeException) exception;\n }\n }\n }", "@Override\n protected void tearDown() throws Exception\n {\n if (session != null)\n {\n session.close();\n }\n \n super.tearDown();\n }", "public static void closeSession() throws HException {\r\n\t\ttry {\r\n\t\t\tcommitTransaction();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\trollbackTransaction();\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tSession s = (Session) threadSession.get();\r\n\t\t\tthreadSession.set(null);\r\n\t\t\tthreadTransaction.set(null);\r\n\t\t\tif (s != null && s.isOpen()) {\r\n\t\t\t\ts.close();\r\n\t\t\t\tsetConnections(-1);\r\n\t\t\t}\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "public void stopFactory() {\n if (isStarted) {\n logger.info(\"Stopping SessionListenerFactory.\");\n APIEventBus.getInstance().unsubscribe(this);\n isStarted = false;\n }\n }", "@Override\r\n\tpublic void dispose(IoSession session) throws Exception {\n\r\n\t}", "@OnClose\n\tpublic void close(Session session) {\n\t\tsessionHandler.removeSession(session);\n\t}", "public static void shutdown() {\n getSessionFactory().close();\n }", "@OnClose\n public void onClose(Session session) {\n }", "public static void unjoinAndClose(){\n Session s = (Session)_sessionRef.get();\n if(s != null){\n s.close();\n }\n }", "public void endSession() {\n if (sqlMngr != null) {\n sqlMngr.disconnect();\n }\n if (sc != null) {\n sc.close();\n }\n sqlMngr = null;\n sc = null;\n }", "public void closeConnection() {\n this.session.close();\n }", "public void destroy() throws HibernateException {\n\t\tlogger.info(\"Closing Hibernate SessionFactory\");\n\t\ttry {\n\t\t\tbeforeSessionFactoryDestruction();\n\t\t}\n\t\tfinally {\n\t\t\tthis.sessionFactory.close();\n\t\t}\n\t}", "public void closePrivateSession(){\n if(sqlSession != null){\n sqlSession.close();\n }\n }", "@Override\n\tpublic void dispose(IoSession session) throws Exception {\n\n\t}", "public static void closeSession() throws HibernateException {\n\t\tSession session = (Session) threadLocal.get();\n threadLocal.set(null);\n\n if (session != null && session.isOpen()) {\n session.close();\n }\n }", "public synchronized void close() {\n if (session != null) {\n if (!suspended) {\n try {\n if (transacted == Transacted.Jms) {\n if (rollbackOnly) {\n session.rollback();\n } else {\n session.commit();\n }\n afterClose();\n } else if (transacted == Transacted.Xa) {\n destroy();\n try {\n if (rollbackOnly) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Rolling back XA transaction\");\n }\n transactionManager.rollback();\n } else {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Committing XA transaction\");\n }\n transactionManager.commit();\n }\n } catch (Exception e) {\n throw new TransactionException(e);\n }\n } else if (transacted == Transacted.ClientAck) {\n if (message != null) {\n if (!rollbackOnly) {\n message.acknowledge();\n } else {\n destroyConsumer();\n }\n }\n afterClose();\n } else {\n afterClose();\n }\n } catch (JMSException e) {\n destroy();\n throw convertJmsAccessException(e);\n }\n }\n }\n }", "public void finSession(Session session){\n obtenerConexion().closeSession(session);\n }", "static void cerrarGestion(){\r\n manager.close();\r\n factory.close();\r\n }", "void sessionClosed(IMSession session, ReasonInfo reason);", "public void doLogout() {\r\n\t\tdestroy();\r\n\r\n\t\t/* ++++++ Kills the Http session ++++++ */\r\n\t\t// HttpSession s = (HttpSession)\r\n\t\t// Sessions.getCurrent().getNativeSession();\r\n\t\t// s.invalidate();\r\n\t\t/* ++++++ Kills the zk session +++++ */\r\n\t\t// Sessions.getCurrent().invalidate();\r\n\t\tExecutions.sendRedirect(\"/j_spring_logout\");\r\n\r\n\t}", "public void close() {\t\t\n\t}", "public void close() {\n\t\t\r\n\t}", "@Override\n public void closeSession() throws HibernateException {\n Session session = threadLocal.get();\n threadLocal.set(null);\n\n if (session != null) {\n session.close();\n }\n }", "public void close() {}", "public void close() {\r\n\t}", "public void close() {\n dispose();\n }", "public void closeAndReopenSession() {\n\n\t\ttry {\n\t\t\tif (getHSession() != null) {\n\t\t\t\tgetHSession().close();\n\t\t\t}\n\t\t\tsetHSession(HibernateUtil.getNewSession());\n\t\t} catch (HibernateException he) {\n\t\t\tgetLog().error(he);\n\t\t}\n\t}", "public static void closeDriver(){\n if(driverPool.get()!=null){//to be able to creat our good flow,when we use driver quit session will killed if driver is not there\n driverPool.get().quit();\n driverPool.remove();\n }\n }", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public interface SessionFactory {\n /**\n * Retrieves a new session. If the session isn't closed, second call from the same thread would\n * result in retrieving the same session\n *\n * @return\n */\n Session getSession();\n\n /**\n * Closes the current session associated with this transaction if present\n */\n void closeSession();\n\n /**\n * Returns true if we have connected the factory to redis\n *\n * @return\n */\n boolean isConnected();\n\n /**\n * Closes the session factory which disposes of the underlying redis pool\n */\n void close();\n}", "public void close() {\n\n\t}", "public void close() {\n\n\t}", "@Override\n\tpublic void sessionClosed(IoSession session) throws Exception {\n\t\tSystem.out.println(\"Client Closed :\" + session.getRemoteAddress());\n\t\tcli.delCli(session);\n\t\t/*\n\t\t * other operate\n\t\t * */\n\t}", "public void close() {\n\t\t}", "protected void closeSession(SessionImpl session) {\n sessions.remove(session);\n sessionCount.dec();\n }", "public void close() {\n\t\t\n\t}", "public void close() {\n\t\t\n\t}", "public void close() {\n\t\t\n\t}", "public void close() {\n\t}", "private void destroySession(Session session) {\n\r\n\t}", "public void close()\n {\n ServiceLocator.getInstance().shutdown();\n }", "static public void close() {\n renewalTimer.cancel();\n delegationTokens.clear();\n }", "public void close() {\n }", "public void close() {\n }", "public void close() {\n }", "public void closeSessionForThread() {\n Session session = THREADED_SESSION.get();\n THREADED_SESSION.set(null);\n THREADED_TRANSACTION.set(null);\n if (session != null) {\n if (session.isOpen()) {\n session.close();\n }\n }\n }", "@Override\n void close();", "@Override\n void close();", "@Override\n void close();", "@Override\n void close();", "public void close() {\n }", "public void close() {\n }", "public void close() {\n }", "public void close()\n\t\t{\n\t\t}", "public void closeHandler() {\n\n super.closeHandler();\n\n // Close the session socket\n if (m_sessSock != null) {\n m_sessSock.closeSocket();\n }\n }", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();" ]
[ "0.8037413", "0.7783974", "0.77673537", "0.77139926", "0.7572479", "0.7483084", "0.7483084", "0.7286603", "0.70939535", "0.69921255", "0.68487394", "0.68088454", "0.6785845", "0.67833465", "0.6741877", "0.6661791", "0.6532263", "0.65242153", "0.65110856", "0.6419734", "0.6382929", "0.6377805", "0.6366592", "0.6331068", "0.63222116", "0.63086945", "0.63034666", "0.62239", "0.6181221", "0.61773515", "0.61651975", "0.6122486", "0.6120427", "0.6099706", "0.6082259", "0.6080115", "0.60775363", "0.60537356", "0.6040282", "0.6028784", "0.6009204", "0.5996218", "0.5995959", "0.5992052", "0.5979653", "0.59676975", "0.5962463", "0.5944394", "0.5942596", "0.59386706", "0.593786", "0.593786", "0.593786", "0.593786", "0.593786", "0.593786", "0.593786", "0.593786", "0.593786", "0.593786", "0.593786", "0.593786", "0.593786", "0.593786", "0.593786", "0.59239596", "0.59004754", "0.59004754", "0.58967346", "0.58963317", "0.5893488", "0.58806324", "0.58806324", "0.58806324", "0.587855", "0.58759844", "0.58647215", "0.585287", "0.5849104", "0.5849104", "0.5849104", "0.5827265", "0.5820812", "0.5820812", "0.5820812", "0.5820812", "0.5804997", "0.5804997", "0.5804997", "0.580236", "0.5792938", "0.5792515", "0.5792515", "0.5792515", "0.5792515", "0.5792515", "0.5792515", "0.5792515", "0.5792515", "0.5792515" ]
0.7484619
5
Methods for interacting with permissions objects
public interface PermissionService { Permission createNew(Account account, User user, Role type); Iterable<Permission> getForUser(User user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public void getPermission();", "public interface Permissions\r\n{\r\n\t/**\r\n\t * Tests whether a permission has been granted\r\n\t * \r\n\t * @param capability The permission (capability) to test for\r\n\t * @return Whether the given capability is allowed\r\n\t */\r\n\tboolean has(String capability);\r\n\r\n\t/**\r\n\t * @param capability The permission to get\r\n\t * @return The permission of the given name\r\n\t */\r\n\tPermission getPermission(String capability);\r\n\r\n\t/** @return All permissions associated with this Permissions object */\r\n\tPermission [] getAllPermissions();\r\n}", "void askForPermissions();", "private PermissionHelper() {}", "public Enumeration permissions();", "List<Permission> getPermissions();", "public List<Permission> getPermissions(T object, User user);", "public interface IPermissions {\n}", "@Override\n public void checkPermission(Permission perm, Object context) {\n }", "public interface PermissionAtom\n{\n Permission insert(Permission permission);\n\n List<Permission> getAll();\n\n Permission update(Permission permission);\n\n void delete(Permission permission);\n\n Permission getPermissionByID(Long id);\n\n List<Permission> getPermissionByCode(String code, Date now);\n\n List<Permission> queryPermission(Permission permission, Date now);\n\n Page<Permission> queryValidPermissionByPage(FramePaging fp, Date now, Permission condition);\n}", "String getPermission();", "public abstract void setPermissions(PermissionIFace permissions);", "protected void doGetPermissions() throws TmplException {\r\n try {\r\n GlbPerm perm = (GlbPerm)TmplEJBLocater.getInstance().getEJBRemote(\"pt.inescporto.permissions.ejb.session.GlbPerm\");\r\n\r\n perms = perm.getFormPerms(MenuSingleton.getRole(), permFormId);\r\n }\r\n catch (java.rmi.RemoteException rex) {\r\n //can't get form perms\r\n TmplException tmplex = new TmplException(TmplMessages.NOT_DEFINED);\r\n tmplex.setDetail(rex);\r\n throw tmplex;\r\n }\r\n catch (javax.naming.NamingException nex) {\r\n //can't find GlbPerm\r\n TmplException tmplex = new TmplException(TmplMessages.NOT_DEFINED);\r\n tmplex.setDetail(nex);\r\n throw tmplex;\r\n }\r\n }", "@Override\n public void checkPermission(Permission perm) {\n }", "PermissionService getPermissionService();", "public Permission getPermission() {\n return permission;\n }", "public List<Permission> getPermissions(String objectId) throws UserManagementException;", "public void setPermissions(List<Permission> permissions)\r\n/* */ {\r\n/* 235 */ this.permissions = permissions;\r\n/* */ }", "public interface PermissionContainer {\n\n\t/**\n\t * @param permission\n\t * @return true if player has permission\n\t */\n\tboolean hasPermission(String permission);\n\n\t/**\n\t * @param permission\n\t * @return true if container has permission\n\t */\n\tboolean hasPermission(Permission permission);\n\n\t/**\n\t * Sets a desired permission\n\t * \n\t * @param perm\n\t * @param add\n\t */\n\tvoid setPermission(String perm, boolean add);\n\n\t/**\n\t * @return true if account has wildcard\n\t */\n\tboolean hasWildCard();\n\n\t/**\n\t * Adds wildcard permission\n\t */\n\tvoid addWildCard();\n\n\t/**\n\t * Removes wildcard permission\n\t */\n\tvoid removeWildCard();\n\n\t/**\n\t * @return the account's permissions\n\t */\n\tSet<String> getPermissions();\n\n\t/**\n\t * @return the account's evaded permissions\n\t */\n\tSet<String> getNonPermissions();\n\n}", "public interface PermissionsManager {\n /**\n * @param permission for which to enquire\n *\n * @return whether the permission is granted.\n */\n boolean isPermissionGranted(Permission permission);\n\n /**\n * Checks whether the permission was already granted, and if it was not, then it requests.\n *\n * @param activity to provide mContext\n * @param permission for which to enquire\n *\n * @return whether the permission was already granted.\n */\n boolean requestIfNeeded(Activity activity, Permission permission);\n}", "void requestNeededPermissions(int requestCode);", "boolean isHasPermissions();", "public void updatePermissions(IPermission[] permissions) throws AuthorizationException;", "public void doPermissions(RunData data, Context context)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState(((JetspeedRunData)data).getJs_peid());\n\n\t\t// cancel copy if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_COPY_FLAG)))\n\t\t{\n\t\t\tinitCopyContext(state);\n\t\t}\n\n\t\t// cancel move if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_MOVE_FLAG)))\n\t\t{\n\t\t\tinitMoveContext(state);\n\t\t}\n\n\t\t// should we save here?\n\t\tstate.setAttribute(STATE_LIST_SELECTIONS, new TreeSet());\n\n\t\t// get the current home collection id and the related site\n\t\tString collectionId = (String) state.getAttribute (STATE_HOME_COLLECTION_ID);\n\t\tReference ref = EntityManager.newReference(ContentHostingService.getReference(collectionId));\n\t\tString siteRef = SiteService.siteReference(ref.getContext());\n\n\t\t// setup for editing the permissions of the site for this tool, using the roles of this site, too\n\t\tstate.setAttribute(PermissionsHelper.TARGET_REF, siteRef);\n\n\t\t// ... with this description\n\t\tstate.setAttribute(PermissionsHelper.DESCRIPTION, rb.getString(\"setpermis1\")\n\t\t\t\t+ SiteService.getSiteDisplay(ref.getContext()));\n\n\t\t// ... showing only locks that are prpefixed with this\n\t\tstate.setAttribute(PermissionsHelper.PREFIX, \"content.\");\n\n\t\t// get into helper mode with this helper tool\n\t\tstartHelper(data.getRequest(), \"sakai.permissions.helper\");\n\n\t}", "public List<Permission> getPermissions()\r\n/* */ {\r\n/* 228 */ return this.permissions;\r\n/* */ }", "@Override\n public void onPermissionsGranted(int requestCode, List<String> perms) {\n }", "@Override\n public void onPermissionsGranted(int requestCode, List<String> perms) {\n }", "int getPermissionRead();", "@TargetApi(23)\r\n public void requestPermission() {\r\n ArrayList<String> arrayList;\r\n String[] strArr = this.mPermissions;\r\n for (String str : strArr) {\r\n if (this.mActivity.checkCallingOrSelfPermission(str) != 0) {\r\n if (shouldShowRequestPermissionRationale(str) || !PermissionUtils.isNeverShowEnabled(PermissionUtils.getRequestCode(str))) {\r\n if (this.normalPermissions == null) {\r\n this.normalPermissions = new ArrayList<>(this.mPermissions.length);\r\n }\r\n arrayList = this.normalPermissions;\r\n } else {\r\n if (this.settingsPermissions == null) {\r\n this.settingsPermissions = new ArrayList<>(this.mPermissions.length);\r\n }\r\n arrayList = this.settingsPermissions;\r\n }\r\n arrayList.add(str);\r\n }\r\n }\r\n Log.d(TAG, \"requestPermission() settingsPermissions:\" + this.settingsPermissions);\r\n Log.d(TAG, \"requestPermission() normalPermissions:\" + this.normalPermissions);\r\n ArrayList<String> arrayList2 = this.normalPermissions;\r\n if (arrayList2 == null || arrayList2.size() <= 0) {\r\n ArrayList<String> arrayList3 = this.settingsPermissions;\r\n if (arrayList3 == null || arrayList3.size() <= 0) {\r\n IGrantedTask iGrantedTask = this.mTask;\r\n if (iGrantedTask != null) {\r\n iGrantedTask.doTask();\r\n }\r\n } else {\r\n Activity activity = this.mActivity;\r\n PermissionUtils.showPermissionSettingsDialog(activity, activity.getResources().getString(R.string.app_name), this.settingsPermissions, true);\r\n this.settingsPermissions = null;\r\n }\r\n finishFragment();\r\n return;\r\n }\r\n requestPermissions((String[]) this.normalPermissions.toArray(new String[this.normalPermissions.size()]), 5003);\r\n this.normalPermissions = null;\r\n }", "public interface PermissionsInstance {\n\n\t/**\n\t * Check whether the specified member has permission for the following action\n\t * @param perm The permission name\n\t * @param m The member\n\t * @return True, if the member can do the action\n\t */\n\tboolean memberHasPermission(String perm, Member m);\n\t\n}", "public boolean checkPermission(Permission permission);", "public FacebookPermissionsE permission(){\n\t\treturn this.permission;\n\t}", "private void getPermissions() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE)) {\n\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n } else {\n\n // No explanation needed, we can request the permission.\n\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},\n MY_PERMISSIONS_REQUEST_READ_CONTACTS);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n }\n }", "public List<String> getPermissions() {\n return this.permissions;\n }", "public interface PermissionService {\n List<User> findRoleUsers(String roleId);\n\n void roleAssignUsers(String roleId, String assignUsers, String removeUsers);\n\n void roleAssignMenu(String roleId, String menuIds);\n\n List<Menu> findRoleMenus(String roleId);\n}", "java.util.List<java.lang.String>\n getPermissionsList();", "public interface PermissionService {\n\n List<SysPermission> queryAll();\n\n int countByName(String name);\n\n int insert(SysPermission permission);\n\n SysPermission queryById(Long id);\n\n int update(SysPermission permission);\n\n int delete(Long id);\n\n List<Long> queryPermissionIdsByRoleId(Long roleId);\n\n List<SysPermission> queryPermissionsByUser(SysUser user);\n}", "@Override\n public void onPermissionGranted() {\n }", "void permissionGranted(int requestCode);", "public void addPermission(T object, Permission permission, User user);", "@ApiModelProperty(required = true, value = \"The remote system permission of the invoking user on the file/folder.\")\n public String getPermissions() {\n return permissions;\n }", "public Boolean isPermissions() {\n return (Boolean) get(\"permissions\");\n }", "public Permission getPermission(String objectId, User user, Boolean pending) throws UserManagementException;", "public java.util.List<org.eclipse.stardust.engine.api.runtime.Permission>\n getPermissions()\n throws org.eclipse.stardust.common.error.WorkflowException;", "public String getPermission()\r\n {\r\n return permission;\r\n }", "public List<Permission> getPermissionList() {\n return permissionList;\n }", "public ArrayList<Permission> getPermissions()\r\n {\r\n return this.securityInfo.getPermissions();\r\n }", "public Permission( String objName )\n {\n this.objName = objName;\n }", "@Test\n public void testGetPermissionsRole() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"GREET_PEOPLE\");\n permissionManager.addPermission(permission);\n Permission permission2 = permissionManager.getPermissionInstance(\"ADMINISTER_DRUGS\");\n permissionManager.addPermission(permission2);\n Role role = securityService.getRoleManager().getRoleInstance(\"VET_TECH\");\n securityService.getRoleManager().addRole(role);\n ((DynamicModelManager) securityService.getModelManager()).grant(role, permission);\n PermissionSet permissions = ((DynamicRole) role).getPermissions();\n assertEquals(1, permissions.size());\n assertTrue(permissions.contains(permission));\n assertFalse(permissions.contains(permission2));\n }", "public boolean hasPermission(T object, Permission permission, User user);", "UserPermissionsType createUserPermissionsType();", "@Override\n public void onPermissionGranted() {\n }", "public gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Permissions getPermissions() {\r\n return permissions;\r\n }", "public void addPermissions(IPermission[] permissions) throws AuthorizationException;", "public Set<Permission> getPermissions() {\n return permissions;\n }", "protected void setPermissions(){\n //Set permissions\n //READ_PHONE_STATE\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.RECORD_AUDIO)\n != PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED\n ) {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.RECORD_AUDIO)) {\n //Show an explanation to the user *asynchronously* -- don't block\n //this thread waiting for the user's response! After the user\n //sees the explanation, request the permission again.\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.RECORD_AUDIO,Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.CAMERA,Manifest.permission.READ_PHONE_STATE},\n GET_PERMISSION);\n } else {\n //No explanation needed, we can request the permission.\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.RECORD_AUDIO,Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.CAMERA,Manifest.permission.READ_PHONE_STATE},\n GET_PERMISSION);\n\n //MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n //app-defined int constant. The callback method gets the\n //result of the request.\n }\n }\n }", "public interface AccessManager {\n\n /**\n * predefined action constants\n */\n public String READ_ACTION = javax.jcr.Session.ACTION_READ;\n public String REMOVE_ACTION = javax.jcr.Session.ACTION_REMOVE;\n public String ADD_NODE_ACTION = javax.jcr.Session.ACTION_ADD_NODE;\n public String SET_PROPERTY_ACTION = javax.jcr.Session.ACTION_SET_PROPERTY;\n\n public String[] READ = new String[] {READ_ACTION};\n public String[] REMOVE = new String[] {REMOVE_ACTION};\n\n /**\n * Determines whether the specified <code>permissions</code> are granted\n * on the item with the specified path.\n *\n * @param parentState The node state of the next existing ancestor.\n * @param relPath The relative path pointing to the non-existing target item.\n * @param actions An array of actions that need to be checked.\n * @return <code>true</code> if the actions are granted; otherwise <code>false</code>\n * @throws ItemNotFoundException if the target item does not exist\n * @throws RepositoryException if another error occurs\n */\n boolean isGranted(NodeState parentState, Path relPath, String[] actions) throws ItemNotFoundException, RepositoryException;\n\n /**\n * Determines whether the specified <code>permissions</code> are granted\n * on the item with the specified path.\n *\n * @param itemState\n * @param actions An array of actions that need to be checked.\n * @return <code>true</code> if the actions are granted; otherwise <code>false</code>\n * @throws ItemNotFoundException if the target item does not exist\n * @throws RepositoryException if another error occurs\n */\n boolean isGranted(ItemState itemState, String[] actions) throws ItemNotFoundException, RepositoryException;\n\n\n /**\n * Returns true if the existing item with the given <code>ItemId</code> can\n * be read.\n *\n * @param itemState\n * @return\n * @throws ItemNotFoundException\n * @throws RepositoryException\n */\n boolean canRead(ItemState itemState) throws ItemNotFoundException, RepositoryException;\n\n /**\n * Returns true if the existing item state can be removed.\n *\n * @param itemState\n * @return\n * @throws ItemNotFoundException\n * @throws RepositoryException\n */\n boolean canRemove(ItemState itemState) throws ItemNotFoundException, RepositoryException;\n\n /**\n * Determines whether the subject of the current context is granted access\n * to the given workspace.\n *\n * @param workspaceName name of workspace\n * @return <code>true</code> if the subject of the current context is\n * granted access to the given workspace; otherwise <code>false</code>.\n * @throws NoSuchWorkspaceException if a workspace with the given name does not exist.\n * @throws RepositoryException if another error occurs\n */\n boolean canAccess(String workspaceName) throws NoSuchWorkspaceException, RepositoryException;\n}", "public Permission()\n {\n }", "public interface PermissionResult {\n\n void permissionGranted();\n\n void permissionDenied();\n\n void permissionForeverDenied();\n\n}", "public interface PermissionCallbacks {\n /**\n * request successful list\n * @param requestCode\n * @param perms\n */\n void onPermissionsGranted(int requestCode, List<String> perms);\n\n /**\n * request denied list\n * @param requestCode\n * @param perms\n */\n void onPermissionsDenied(int requestCode, List<String> perms);\n}", "java.lang.String getPermissions(int index);", "public void goToPermissions(String action) {\n boolean allowed = false;\n if (selectedSubject instanceof Subject) {\n allowed = isAuthorized((Subject) selectedSubject, \"grant\".equals(action) ? Action.GRANT : Action.REVOKE);\n } else {\n allowed = isAuthorized((Role) selectedSubject, \"grant\".equals(action) ? Action.GRANT : Action.REVOKE);\n }\n if (!allowed) {\n return;\n }\n if (selectedSubject != null\n && (!selectedActions.isEmpty() || (!selectedCollectionActions.isEmpty() && isSelectedFields(selectedCarrierModel.getCollectionFields().values())))) {\n\n if (getTabEntity() instanceof Carrier) {\n goToObjectResourceManagement(action, (IdHolder<?>) selectedSubject, selectedActions, selectedCollectionActions, selectedCarrierModel, carriers);\n } else {\n if (getTabEntity() instanceof Party) {\n if (partyModel.getEntity().getId() != null) {\n List<RowModel> ret = new ArrayList<RowModel>();\n ret.add(new RowModel(partyModel.getEntity(), partyModel.isSelected(), \"Party-\" + ((Party) partyModel.getEntity()).getPartyField1() + \", \"\n + ((Party) partyModel.getEntity()).getPartyField2()));\n if (isSelected(ret)) {\n goToObjectResourceManagement(action, (IdHolder<?>) selectedSubject, selectedActions, selectedCollectionActions, partyModel, ret);\n } else {\n System.err.println(\"Select party\");\n }\n }\n } else {\n if (getTabEntity() instanceof Contact) {\n if (isSelected(contacts)) {\n goToObjectResourceManagement(action, (IdHolder<?>) selectedSubject, selectedActions, selectedCollectionActions, selectedContactModel, contacts);\n } else {\n System.err.println(\"Select contact\");\n }\n }\n }\n }\n }\n\n }", "public void addPermission(T object, Permission permission);", "public void doFolder_permissions(RunData data, Context context)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState(((JetspeedRunData)data).getJs_peid());\n\t\tParameterParser params = data.getParameters();\n\n\t\t// cancel copy if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_COPY_FLAG)))\n\t\t{\n\t\t\tinitCopyContext(state);\n\t\t}\n\n\t\t// cancel move if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_MOVE_FLAG)))\n\t\t{\n\t\t\tinitMoveContext(state);\n\t\t}\n\n\t\t// get the current collection id and the related site\n\t\tString collectionId = params.getString(\"collectionId\"); //(String) state.getAttribute (STATE_COLLECTION_ID);\n\t\tString title = \"\";\n\t\ttry\n\t\t{\n\t\t\ttitle = ContentHostingService.getProperties(collectionId).getProperty(ResourceProperties.PROP_DISPLAY_NAME);\n\t\t}\n\t\tcatch (PermissionException e)\n\t\t{\n\t\t\taddAlert(state, rb.getString(\"notread\"));\n\t\t}\n\t\tcatch (IdUnusedException e)\n\t\t{\n\t\t\taddAlert(state, rb.getString(\"notfindfol\"));\n\t\t}\n\n\t\t// the folder to edit\n\t\tReference ref = EntityManager.newReference(ContentHostingService.getReference(collectionId));\n\t\tstate.setAttribute(PermissionsHelper.TARGET_REF, ref.getReference());\n\n\t\t// use the folder's context (as a site) for roles\n\t\tString siteRef = SiteService.siteReference(ref.getContext());\n\t\tstate.setAttribute(PermissionsHelper.ROLES_REF, siteRef);\n\n\t\t// ... with this description\n\t\tstate.setAttribute(PermissionsHelper.DESCRIPTION, rb.getString(\"setpermis\") + \" \" + title);\n\n\t\t// ... showing only locks that are prpefixed with this\n\t\tstate.setAttribute(PermissionsHelper.PREFIX, \"content.\");\n\n\t\t// get into helper mode with this helper tool\n\t\tstartHelper(data.getRequest(), \"sakai.permissions.helper\");\n\n\t}", "int getPermissionWrite();", "public List<Permission> getPermissions(User user) throws UserManagementException;", "@Test\n\tpublic void testGetPermissions_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\n\t\tSet<Permission> result = fixture.getPermissions();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public IGrantSet getPermissions()\n throws OculusException;", "@Override\n public Set<String> getPermissions(Class<? extends AeroCommandBase<?>> command) {\n return permissions.get(command);\n }", "@Test\n\tpublic void testGetPermissions_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\n\t\tSet<Permission> result = fixture.getPermissions();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public Permission[] getPermissionsField() {\n\treturn super.getPermissions(null);\n }", "PermissionType createPermissionType();", "@Override\r\n\tpublic List<Permission> getAllPermissions() {\n\t\treturn null;\r\n\t}", "public void setPermissions(Set<Permission> permissions) {\n this.permissions = permissions;\n }", "public interface PermissionChecker {\n\n\t/**\n\t * Check if a permission is available on a database object. Depending on\n\t * <code>permissionRequired</code> throw an exception or return false on\n\t * failure.\n\t * \n\t * @param permission\n\t * a permission\n\t * @param dBObject\n\t * a database object\n\t * @param permissionRequired\n\t * if true throw an exception on failure else return false\n\t * @return true if the permission is available, else false\n\t * @throws T2DBException\n\t */\n\tboolean check(Permission permission, DBObject dBObject,\n\t\t\tboolean permissionRequired) throws T2DBException;\n\n\t/**\n\t * Check if a permission is available on a database object. Throw an\n\t * exception if not.\n\t * \n\t * @param permission\n\t * a permission\n\t * @param dBObject\n\t * a database object\n\t * @throws T2DBException\n\t */\n\tvoid check(Permission permission, DBObject dBObject) throws T2DBException;\n\t\n\t/**\n\t * Check if a permission is available on a database object. Depending on\n\t * <code>permissionRequired</code> throw an exception or return false on\n\t * failure.\n\t * \n\t * @param permission\n\t * a permission\n\t * @param surrogate\n\t * a surrogate identifying a database object\n\t * @param permissionRequired\n\t * if true throw an exception on failure else return false\n\t * @return true if the permission is available, else false\n\t * @throws T2DBException\n\t */\n\tboolean check(Permission permission, Surrogate surrogate, boolean permissionRequired) throws T2DBException;\n\n\t/**\n\t * Check if a permission is available on a database object. Throw an\n\t * exception if not.\n\t * \n\t * @param permission\n\t * a permission\n\t * @param surrogate\n\t * if true throw an exception on failure else return false\n\t * @throws T2DBException\n\t */\n\tvoid check(Permission permission, Surrogate surrogate) throws T2DBException;\n\t\n}", "public int getPermission(Integer resourceId);", "void checkPermission(T request) throws AuthorizationException;", "UserPermissions authenticate (Request request);", "@Override\n public void onPermissionGranted(PermissionGrantedResponse permissionGrantedResponse) {\n\n }", "public T casePermission(Permission object) {\n\t\treturn null;\n\t}", "public List<String> getPermissions() {\n AppMethodBeat.m2504i(92672);\n List permissions = this.properties.getPermissions();\n AppMethodBeat.m2505o(92672);\n return permissions;\n }", "@Override\n protected String requiredGetPermission() {\n return \"user\";\n }", "@Override\n\t\tfinal public FREObject call(FREContext context, FREObject[] args) {\n\t\t\ttry {\n\t\t\t\tif (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP_MR1) {\n\t\t\t\t\tActivity act = context.getActivity();\n\t\t\t\t\tact.overridePendingTransition(0,0);\n\t\t\t\t\t\n\t\t\t\t\tfinal FREArray array = (FREArray) args[0];\n\t\t\t\t\tfinal int lng = (int) array.getLength();\n\t\t\t\t final String[] permissions = new String[(int) array.getLength()];\n\t\t\t\t \n\t\t\t\t for (int i = 0; i < lng; i += 1) {\n\t\t\t\t \tString permission = array.getObjectAt(i).getAsString();\n\t\t\t\t \tif(permission != null) permissions[i] = permission;\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t if(PermissionsExtension.VERBOSE > 0) Log.d(PermissionsExtension.TAG, \"Checking permissions: \"+ permissions);\n\t\t\t\t \n\t\t\t\t\tfinal Intent intent = new Intent(act, PermissionsRequestActivity.class);\n\t\t\t\t\tintent.putExtra(\"permissions\", permissions);\n\t\t\t\t\tact.startActivity(intent);\n\t\t\t\t\t\n\t\t\t\t\tact.overridePendingTransition(0,0);\n\t\t\t\t\t\n\t\t\t\t\treturn FREObject.newObject(true); //true means that we should wait for callback on AS3 side\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn FREObject.newObject(false); //false means that we can continue without waiting for callback\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}", "public PermissionSet getPermissionSet() {\n return permissionSet;\n }", "public interface SecurityOptionIFace\n{\n /**\n * @return a unique name (without a security prefix) used by the security system, \n * doesn't need to be localized and is not intended to be human readable.\n */\n public abstract String getPermissionName();\n \n /**\n * @return the localized human readable title of the permission.\n */\n public abstract String getPermissionTitle();\n \n /**\n * @return a short localized description of the security option to help explain what it is.\n */\n public abstract String getShortDesc();\n \n /**\n * Return the icon that represents the task.\n * @param size use standard size (i.e. 32, 24, 20, 26)\n * @return the icon that represents the task\n */\n public abstract ImageIcon getIcon(int size);\n \n /**\n * @return a PermissionEditorIFace object that is used to set the permissions for the\n * the task.\n */\n public abstract PermissionEditorIFace getPermEditorPanel();\n \n /**\n * @return returns a permissions object\n */\n public abstract PermissionIFace getPermissions();\n \n /**\n * Sets a permission object.\n * @param permissions the object\n */\n public abstract void setPermissions(PermissionIFace permissions);\n \n /**\n * @return a list of addition Security options. These can be thought as 'sub-options'.\n */\n public abstract List<SecurityOptionIFace> getAdditionalSecurityOptions(); \n \n /**\n * @param userType the type of use, this value is implementation dependent, it can be null\n * @return the default permissions for a user type\n */\n public abstract PermissionIFace getDefaultPermissions(String userType);\n \n}", "public void setPermission(String permission)\r\n {\r\n this.permission = permission;\r\n }", "public void permission_check() {\n //Usage Permission\n if (!isAccessGranted()) {\n new LovelyStandardDialog(MainActivity.this)\n .setTopColorRes(R.color.colorPrimaryDark)\n .setIcon(R.drawable.ic_perm_device_information_white_48dp)\n .setTitle(getString(R.string.permission_check_title))\n .setMessage(getString(R.string.permission_check_message))\n .setPositiveButton(android.R.string.ok, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(android.provider.Settings.ACTION_USAGE_ACCESS_SETTINGS);\n startActivity(intent);\n }\n })\n .setNegativeButton(android.R.string.no, null)\n .show();\n }\n }", "public boolean isPermissionGranted(String permission){\n return true;\n// else\n// return false;\n }", "public interface PermissionHandlerConstants {\n\n //Permissions code\n public static final int STORAGE_PERMISSION_CODE = 1;\n public static final int CAMERA_PERMISSION_CODE = 2;\n public static final int ACCOUNTS_PERMISSION_CODE = 3;\n public static final int STORAGE_CAMERA_PERMISSION_CODE = 4; //ONE CODE CAN BE USED TO REQUEST MULTIPLE PERMISSIONS\n public static final int READ_CALENDAR_PERMISSION_CODE = 5;\n public static final int WRITE_CALENDAR_PERMISSION_CODE = 6;\n public static final int READ_CONTACTS_PERMISSION_CODE = 7;\n public static final int WRITE_CONTACTS_PERMISSION_CODE = 8;\n public static final int FINE_LOCATION_PERMISSION_CODE = 9;\n public static final int COURSE_LOCATION_PERMISSION_CODE = 10;\n public static final int RECORD_AUDIO_PERMISSION_CODE = 11;\n public static final int READ_PHONE_STATE_PERMISSION_CODE = 12;\n public static final int CALL_PHONE_PERMISSION_CODE = 13;\n public static final int READ_CALL_LOG_PERMISSION_CODE = 14;\n public static final int WRITE_CALL_LOG_PERMISSION_CODE = 15;\n public static final int ADD_VOICEMAIL_PERMISSION_CODE = 16;\n public static final int USE_SIP_PERMISSION_CODE = 17;\n public static final int PROCESS_OUTGOING_CALLS_PERMISSION_CODE = 18;\n public static final int BODY_SENSORS_PERMISSION_CODE = 19;\n public static final int SEND_SMS_PERMISSION_CODE = 20;\n public static final int RECEIVE_SMS_PERMISSION_CODE = 21;\n public static final int READ_SMS_PERMISSION_CODE = 22;\n public static final int RECEIVE_WAP_PUSH_PERMISSION_CODE = 23;\n public static final int RECEIVE_MMS_PERMISSION_CODE = 24;\n //*******************************************************************\n}", "public SetPermission() {\n initComponents();\n }", "List<BillingPermissionsProperties> permissions();", "public List<Permission> getPermissionsPending(String objectId) throws UserManagementException;", "public String getPermission() {\n return this.permission;\n }", "@Test\n\tpublic void testCheckPermissions_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tfixture.checkPermissions(permissions);\n\n\t\t// add additional test code here\n\t}", "public Permissions createPermissions() {\r\n perm = (perm == null) ? new Permissions() : perm;\r\n return perm;\r\n }", "@Test\n\tpublic void testCheckPermissions_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tfixture.checkPermissions(permissions);\n\n\t\t// add additional test code here\n\t}", "@Path(\"{uid}/\")\n @PUT\n @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})\n public void setPermissions(@PathParam(\"uid\") Long uid, JAXBElement<Permissions> jbPermissions) {\n try (Connection cn = catalogue.getConnection()) {\n try {\n LogicalData res = catalogue.getLogicalDataByUid(uid, cn);\n if (res == null) {\n throw new WebApplicationException(Response.Status.NOT_FOUND);\n }\n MyPrincipal mp = (MyPrincipal) request.getAttribute(\"myprincipal\");\n Permissions p = catalogue.getPermissions(uid, res.getOwner(), cn);\n if (!mp.canWrite(p)) {\n throw new WebApplicationException(Response.Status.UNAUTHORIZED);\n }\n Permissions permissions = jbPermissions.getValue();\n catalogue.updateOwner(uid, permissions.getOwner(), cn);\n catalogue.setPermissions(uid, permissions, cn);\n cn.commit();\n } catch (SQLException ex) {\n Logger.getLogger(PermissionsResource.class.getName()).log(Level.SEVERE, null, ex);\n cn.rollback();\n throw new WebApplicationException(Response.Status.INTERNAL_SERVER_ERROR);\n }\n } catch (SQLException ex) {\n Logger.getLogger(PermissionsResource.class.getName()).log(Level.SEVERE, null, ex);\n throw new WebApplicationException(Response.Status.INTERNAL_SERVER_ERROR);\n }\n }", "public IPermissionActivity getPermissionActivity(long id);", "public boolean [] getPermissions()\n\t{\n\t\treturn this.permissions;\n\t}", "public interface AclService<T> extends PermissionEvaluator {\n\n\t/**\n\t * Creates an acl for an object if neccessary and adds an ace for that\n\t * object with the permission specified. This adds the permission to the\n\t * currently-logged-in user\n\t * \n\t * @param object\n\t * The object for which the acl and ace are to be created.\n\t * @param permission\n\t * The permission to grant to the user on the object.\n\t */\n\tpublic void addPermission(T object, Permission permission);\n\t\n\t/**\n\t * Creates an acl for an object if neccessary and adds an ace for that\n\t * object with the permission specified for the specified user\n\t * \n\t * @param object\n\t * The object for which the acl and ace are to be created.\n\t * @param permission\n\t * The permission to grant to the user on the object.\n\t * @param user\n\t * A <code>User</code> who will be granted the permission on\n\t * the object.\n\t */\n\tpublic void addPermission(T object, Permission permission, User user);\n\n\t/**\n\t * Removes the permission of a user on an object. If the object does not\n\t * have an acl or if the ace does not exist for the object, do nothing.\n\t * \n\t * @param object\n\t * The object for which the permission is to be removed.\n\t * @param permission\n\t * The permission to remove from the user on the object.\n\t * @param user\n\t * The <code>User</code> who will lose the permission on\n\t * the object.\n\t */\n\tpublic void removePermission(T object, Permission permission, User user);\n\t\n\t/**\n\t * Gets a list of Permissions that the user has on the specified object.\n\t * \n\t * @param object\n\t * The object to retrieve the permission on.\n\t * @param user\n\t * \t\t\tThe <code>User</code> who is granted permissions on\n\t * the object.\n\t * @return A <code>Permission</code> containing the \n\t */\n\tpublic List<Permission> getPermissions(T object, User user);\n\n\t/**\n\t * Returns <code>boolean</code> true if the given <code>User</code> principle\n\t * has the given <code>Permission</code> on the give <code>Object</code>, returns\n\t * fale otherwise.\n\t */\n\tpublic boolean hasPermission(T object, Permission permission, User user);\n}" ]
[ "0.7495443", "0.7323509", "0.72369105", "0.71374047", "0.7077143", "0.70167774", "0.70031816", "0.6931674", "0.6877734", "0.68005973", "0.67669374", "0.67606646", "0.6756883", "0.67342174", "0.66748434", "0.6639412", "0.6634125", "0.6608415", "0.6527702", "0.6511545", "0.6482527", "0.64635444", "0.6440237", "0.64379007", "0.6432414", "0.6428026", "0.6428026", "0.64094645", "0.64002854", "0.6398242", "0.6395375", "0.6381844", "0.6372832", "0.6371131", "0.63597715", "0.6358271", "0.63301194", "0.6325804", "0.63243604", "0.6323113", "0.63172626", "0.6316341", "0.6315436", "0.63131547", "0.63053757", "0.63044304", "0.6280773", "0.62752247", "0.62725747", "0.62698734", "0.6261729", "0.6259571", "0.6249467", "0.6247897", "0.6237938", "0.623707", "0.62191164", "0.62046933", "0.61960536", "0.6195657", "0.6182782", "0.6179947", "0.6178797", "0.61737454", "0.61704683", "0.6168893", "0.616593", "0.6154885", "0.61453384", "0.61323124", "0.6130185", "0.61290663", "0.6112028", "0.6100336", "0.61003333", "0.60985374", "0.609781", "0.60886353", "0.60871834", "0.60831153", "0.60667926", "0.6064683", "0.60644865", "0.60606605", "0.60530066", "0.6052273", "0.6051957", "0.6047605", "0.6040877", "0.604034", "0.603108", "0.60307884", "0.60262936", "0.60196704", "0.6005691", "0.6000047", "0.5999894", "0.59989506", "0.59957755", "0.59945357" ]
0.6361911
34
Constructor Constructor of the loader
public EmptyOrganizer(Node node, ModelInstance modelInstance, IProcess parentProcess) { super(node, modelInstance, parentProcess); String emptyName = getAttribute("name"); element = (IBasicElement) modelInstance.getElement(emptyName); element.setParentProcess(parentProcess); ((IActivity)element).setName( emptyName ); String suppresed = getAttribute( ATTRIBUTE_SUPPRESED_JOIN_FAILURE ); if(suppresed == null) ((IActivity)element).useActivitySupressJoinFailure(); ((IActivity)element).setSuppressJoinFailure( Boolean.parseBoolean( suppresed ) ); empty = (IEmpty) element; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BasicLoader() {\n }", "private ClinicFileLoader() {\n\t}", "public Loader(){\n\t\tthis(PLANETS, NEIGHBOURS);\n\t}", "public LoaderInfo( ) { \n\t\tsuper( null );\n\t}", "private JarFileLoader() {\n }", "public abstract void init(ResourceLoader loader);", "public DefaultLoaderDefinition() {\n\t\t// nothing to do\n\t}", "private ClientLoader() {\r\n }", "private ImageLoader() {}", "private ModuleLoader() {\r\n }", "private TextureLoader() {\n }", "private PropertiesLoader() {\r\n\t\t// not instantiable\r\n\t}", "public JSONLoader() {}", "private NativeLibraryLoader() {\n }", "public GenericDelegatorLoader() {\n this(null, null);\n }", "public LoaderService() {\n super(TAG);\n }", "public Mapping(final ClassLoader loader) {\r\n if (loader == null) {\r\n _classLoader = getClass().getClassLoader();\r\n } else {\r\n _classLoader = loader;\r\n }\r\n }", "public RubyLoadPathMetaData() {\n\n }", "public WallLoader() {\n //Nothing to do.\n }", "public UnitSetLoader()\n\t{\n\t // Empty Constructor\n\t}", "private SupplierLoaderUtil() {\n\t}", "private void initDataLoader() {\n\t}", "public GFClassLoader(URL url) {\n super(new URL[] { url });\n this.url = url;\n }", "public JSONLoader( LoadingManager manager ) {}", "public ImageProviderPipeline(ImageLoader loader) {\n/* 74 */ this(null, loader);\n/* */ }", "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "@Override\r\n\tprotected void initLoad() {\n\r\n\t}", "protected abstract void loader() throws IOException;", "private Instantiation(){}", "public interface Loader {\n\t\tpublic void load();\n\t}", "private LoadMethodMapper ()\n {}", "public \n PluginClassLoader\n (\n PluginClassLoader childLoader, \n ClassLoader parentLoader\n ) \n {\n this(new TreeMap<String, byte[]>(childLoader.pContents), parentLoader);\n }", "public ClassLoaderValue() {}", "public LoadBasedDivision() {\n }", "public void setLoader(Loader loader)\r\n {\r\n _loader = loader;\r\n }", "public void init(){}", "private FileLoader(){\n rows =new Vector<String>();\n //tsptwinstance= new TSPTWinstance();\n }", "protected ZoneLoader(ZoneName zoneName) {\n\n this.zoneName = zoneName;\n\n }", "public \n PluginClassLoader\n (\n TreeMap<String,byte[]> contents, \n ClassLoader parentLoader\n ) \n {\n super(parentLoader == null ? getSystemClassLoader() : parentLoader);\n\n pContents = contents; \n pResources = new TreeMap<String,Long>();\n }", "public Libro() {\r\n }", "public ParamLoader(Path path) {\n\t\tparameters = new HashMap<>();\n\t\tthis.path = path;\n\t\ttry {\n\t\t\tloadParameters();\n\t\t} catch (IOException e) {\n\t\t\tthrow new Error(\"Failed to load parameters.\");\n\t\t}\n\t}", "public void init() {}", "public void init() {}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "public LibraryCache() {\n\t }", "public void init() {\n\t\t \r\n\t\t }", "JarLoader(ClassLoader parent, URL url) throws IOException\n\t{\n\t\tsuper(parent);\n\n\t\tm_url = url;\n\t\tm_entries = new HashMap();\n\t\tm_images = new HashMap();\n\n\t\t// Just having a JAR in your CLASSPATH will cause us to load it,\n\t\t// which means you need security access to it.\n\t\tJarInputStream jis = new JarInputStream(url.openStream());\n\t\tByteArrayOutputStream img = new ByteArrayOutputStream();\n\t\tbyte[] buf = new byte[1024];\n\t\tJarEntry je;\n\t\tfor (je = jis.getNextJarEntry();\n\t\t\t je != null;\n\t\t\t je = jis.getNextJarEntry())\n\t\t{\n\t\t\tif (je.isDirectory())\n\t\t\t\tcontinue;\n\t\t\tString entryName = je.getName();\n\t\t\tAttributes attr = je.getAttributes();\n\t\t\tint nBytes;\n\t\t\t\n\t\t\timg.reset();\n\t\t\twhile ((nBytes = jis.read(buf)) > 0)\n\t\t\t\timg.write(buf, 0, nBytes);\n\t\t\tjis.closeEntry();\n\t\t\t\t\n\t\t\tm_entries.put(entryName, img.toByteArray());\n\t\t}\n\t\tm_manifest = jis.getManifest();\n\t}", "protected void _init(){}", "@Override\n\tpublic void init(String file_name) { deserialize(file_name); }", "@Override public void init()\n\t\t{\n\t\t}", "public void init() { }", "public void init() { }", "public void init() {\n \n }", "public ResourceUtils() {\r\n //stub\r\n }", "@Override\r\n\tpublic void init() {}", "private JarUtils() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "public LevelLoader(GameStateManager gsm){\n\t\tsuper(gsm);\n\t}", "public static XML.ObjectLoader getLoader() {\n return new Loader();\n }", "public interface Loader {\n void loadLibrary(String str) throws Exception;\n\n void loadLibraryFromPath(String str) throws Exception;\n }", "private void init() {\n\n\t}", "public ExternalFileMgrImpl()\r\n \t{\r\n \t\t\r\n \t}", "@Override\n public void init() {}", "public Livro() {\n\n\t}", "public ImageLoader(Context context) {\r\n this(context, false);\r\n }", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public ClassBundle() {\n }", "protected void initialize() {}", "protected void initialize() {}", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "@Override\n public void init() throws Exception {\n try {\n Parameters params = getParameters();\n String filename = params.getRaw().get(0);\n this.model = new LasersModel(filename);\n this.msg=new Label(filename+\" loaded\");\n this.safeFile=filename;\n } catch (FileNotFoundException fnfe) {\n System.out.println(fnfe.getMessage());\n System.exit(-1);\n }\n this.model.addObserver(this);\n }", "public void init() {\n\t\t}", "public ProgramManager() {\n display = new DisplayManager();\n fileName = \"resources/aLargeFile\";\n try {\n fileReader = new BufferedReader(new FileReader(fileName));\n } catch (FileNotFoundException e) {\n logger.error(e.getMessage());\n }\n wordStorage = new WordStorage();\n }", "public LoadingService(String name) {\n super(name);\n }", "public TestClassLoader(URL[] urls) {\n super(new URL[0]);\n this.urls = urls;\n }", "public static void init() {}", "public void init() {\n\n }", "public void init() {\n\n }", "public void init() {\r\n\r\n\t}", "public LevelLoader(String directoryPath) {\n\t\tdirectory = TextFileReader.getDirectory(directoryPath);\n\t}", "protected void initialize() {\n // Attribute Load\n this.attributeMap.clear();\n this.attributeMap.putAll(this.loadAttribute());\n // RuleUnique Load\n this.unique = this.loadRule();\n // Marker Load\n this.marker = this.loadMarker();\n // Reference Load\n this.reference = this.loadReference();\n }", "private ResourceFactory() {\r\n\t}", "protected void initialize() { \tthePrintSystem.printWithTimestamp(getClass().getName()); \n\tthis.isDone = false;\n\t\n\ttheLoader.setSetpoint(1.5);\n\t\n }", "private FileUtility() {\r\n\t}", "protected void init() {\n }", "@Override\n public void init() {\n }", "public ClassDumper(ClassDataLoader loader) {\n super(Opcodes.ASM4);\n this.loader = loader;\n }", "public void init()\n {\n }", "protected StatDataFileReaderSpi() {\n }", "private LOCFacade() {\r\n\r\n\t}" ]
[ "0.8497327", "0.7982097", "0.7971902", "0.7958492", "0.7795432", "0.75360036", "0.7375044", "0.7354104", "0.73406756", "0.7317929", "0.729188", "0.72627485", "0.71915096", "0.7187077", "0.71071374", "0.70921946", "0.70640045", "0.7042946", "0.7017194", "0.69316244", "0.69251627", "0.6792438", "0.6740922", "0.6730155", "0.6640039", "0.6620367", "0.6583752", "0.6531146", "0.6501945", "0.6496591", "0.64945245", "0.6459191", "0.6447131", "0.64469635", "0.64421153", "0.6431647", "0.6420106", "0.63979965", "0.6376326", "0.6362722", "0.6350956", "0.6350627", "0.6349138", "0.6349138", "0.6310153", "0.6290543", "0.62881446", "0.62772167", "0.6266378", "0.62600017", "0.6255917", "0.6255314", "0.6246304", "0.6246304", "0.62459075", "0.6223813", "0.6216245", "0.62151045", "0.6211052", "0.6203096", "0.6203096", "0.6203096", "0.6203096", "0.62013924", "0.6179482", "0.61775655", "0.6171737", "0.61668265", "0.6163858", "0.6157733", "0.61565757", "0.61565", "0.61565", "0.61565", "0.6155392", "0.61550415", "0.61550415", "0.6148933", "0.6148933", "0.6148933", "0.6148933", "0.6141287", "0.6134686", "0.6133927", "0.61317384", "0.6128736", "0.6122705", "0.6120089", "0.6120089", "0.6116251", "0.6114359", "0.6113265", "0.61098254", "0.6106194", "0.610609", "0.6105958", "0.61026126", "0.6100497", "0.6096967", "0.60907954", "0.60892206" ]
0.0
-1
Returns the empty being loaded
public IEmpty getActivity( ) { return (IEmpty) element; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isLoaded(){return true;}", "boolean isLoaded();", "public boolean isLoaded();", "@Override\n\tpublic boolean isLoad() {\n\t\treturn false;\n\t}", "public boolean isLoaded() {\n\treturn loaded;\n }", "boolean isForceLoaded();", "public boolean hasBeenLoaded () {\n return loaded;\n }", "public boolean getLoaded()\n\t{\n\t\treturn loaded;\n\t}", "public boolean isLoaded() {\n return loaded;\n }", "public boolean isLoaded() \n\t{\n\t return htRecords != null ;\n\t}", "public boolean isLoaded() {\n\t\treturn started;\n\t}", "public boolean isLoaded() {\n return _id != null;\n }", "public boolean isFullyLoaded() {\n return fullyLoaded;\n }", "public boolean isLoaded() {\n\t\treturn chestsLoaded;\r\n\t}", "protected boolean isLoaded()\n {\n return m_fLoaded;\n }", "public synchronized boolean isLoaded() {\n\t\treturn _resourceData != null;\n\t}", "public boolean isAllLoaded() {\n return allLoaded;\n }", "public void loaded(){\n\t\tloaded=true;\n\t}", "public boolean hasLoadedFile() {\n return isSuccessfulFileLoad;\n }", "public String getLoaded() {\n if (isLoaded) {\n return ui.showLoaded();\n } else {\n return ui.showLoadingError();\n }\n }", "public boolean loadProgress() {\n return false;\n }", "public abstract boolean isLoadCompleted();", "public boolean isLoadedFromDisk() {\n return isLoadedFromDisk;\n }", "public boolean isLoaded()\n {\n return m_syntheticKind == JCacheSyntheticKind.JCACHE_SYNTHETHIC_LOADED;\n }", "public boolean shouldLoad() {\n return load;\n }", "public boolean isLoaded() {\n\t\treturn lib != null;\n\t}", "@Override\n\tprotected void isLoaded() throws Error {\n\t\t\n\t}", "@Override\n\tprotected void isLoaded() throws Error {\n\t\t\n\t}", "protected boolean isFullyInitialized() {\n return html == null;\n }", "public boolean waitLoading() {\n\t\t\treturn waitLoading;\n\t\t}", "@Override\n public Boolean isLoading() {\n return loadingInProgress;\n }", "public boolean isLoaded() {\n return parser != null;\n }", "@Override\n\tprotected void isLoaded() throws Error \n\t{\n\t\t\n\t}", "public String getOnLoad() {\n return onLoad;\n }", "public int getLoadingStatus() {\n return loadingStatus;\n }", "@Override\r\n\tpublic boolean isPageLoaded() {\n\t\treturn false;\r\n\t}", "public boolean isBusyLoading() {\n\t\treturn false; // return (AppStatusLine.isBusyLoading());\n\t}", "public boolean isLoaded() {\n return m_module.isLoaded();\n }", "public Object load() {\n return null;\n }", "public boolean isFinishedLoading(){ return FINISHED_LOADING; }", "@Override\n public void clear() {\n isLoaded = false;\n }", "java.util.Optional<Boolean> getLoadContents();", "public static synchronized boolean isEmpty() {\n\t\treturn ClassRegistry.dictionary.isEmpty();\n\t}", "private Container Load() {\n return null;\r\n }", "public boolean isEmpty() { return curChunker() == null; }", "private boolean isEmptyAndLoading(Cursor cursor) {\n return (cursor.getCount() == 0)\n && mRefreshManager.isMessageListRefreshing(mMailbox.mId);\n }", "public int getLoadingStatus()\n/* */ {\n/* 119 */ return this.loadingStatus;\n/* */ }", "private boolean isTextureLoaded() {\n return loaded;\n }", "public native int getLoaded() /*-{\n\t\treturn this.loaded;\n\t}-*/;", "public void setLoaded();", "public abstract void loaded();", "public static void SelfCallForLoading() {\n\t}", "public int getDataLoaded() {\r\n\t\treturn this.dataLoaded;\r\n\t}", "public boolean isDataLoaded() {\n\t\t\n\t\t return dataLoaded;\n\t }", "public LoadingStatus getLoadingStatus() {\n return loadingStatus;\n }", "public boolean isEmpty() {\n return this.cache.isEmpty();\n }", "public boolean getOnLoadFlag() {\r\n\t\treturn onLoadFlag;\r\n\t}", "public boolean isLoadData() {\n return loadData;\n }", "public boolean initialized() {\n return true;\r\n }", "@Override\n\t\tpublic boolean isReady() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean isReady() {\n\t\t\treturn false;\n\t\t}", "@Override\r\n\t\t\tpublic boolean isReady() {\n\t\t\t\treturn false;\r\n\t\t\t}", "@Override\n\tpublic boolean isReady() {\n\t\treturn false;\n\t}", "public boolean isLoadCache() {\n return mLoadCache;\n }", "@Override\r\n \tpublic File getLoadPath() {\n \t\treturn null;\r\n \t}", "public boolean isFull() { return false; }", "public boolean isEmpty() {\n return this.extMap.isEmpty();\n }", "public boolean isDataLoadedOnce() {\n return mDataLoadedOnce;\n }", "public boolean isEmpty() {\n\t\treturn classCoverageLookups.isEmpty();\n\t}", "public boolean is_empty () {\n return is_empty;\r\n }", "public boolean initializeEmptyBackend() { return true; }", "private boolean isEmpty(){\n return (numInstances() == 0);\n }", "public void loadStatus (){\n\t}", "public String getLoadInfo()\n {\n return ssProxy.getLoadInfo();\n }", "public boolean is_empty() {\n\t\treturn false;\n\t}", "public boolean is_full() {\n\t\treturn false;\n\t}", "public static boolean isLoaded() {\n\t\ttry {\n\t\t\tPlayer.getRSPlayer();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isEmpty() {\n\t\treturn callbacks.isEmpty();\n\t}", "public void unloaded(){\n\t\tloaded=false;\n\t}", "protected void onStartLoading() { forceLoad();}", "public boolean isLoading() {\n return mIsLoading;\n }", "public java.lang.String getBAGGWeightLoaded() {\r\n return BAGGWeightLoaded;\r\n }", "public static void load() {\n load(false);\n }", "boolean canLoadData();", "public boolean isFull(){\n\t\treturn false;\n\t}", "public boolean load() {\n return load(Datastore.fetchDefaultService());\n }", "static boolean isInitializing()\n\t{\n\t\treturn INITIALIZING.get();\n\t}", "public static boolean isGenomeLoaded() {\n return genomeController.isGenomeLoaded();\n }", "public boolean isFull() {\n return false;\n }", "public boolean isSourceEmpty() {\n\t\treturn getResult.isSourceEmpty();\n\t}", "public boolean getEmpty() {\n return empty;\n }", "protected abstract String getLoadingMessage();", "public boolean getEmptyOk() {\r\n return _emptyok;\r\n }", "public void clearLoaded(){\n\t\tprintStackTraceInvoke(clearMethod);\n\t}", "public boolean isClassEmpty()\r\n {\r\n return(number_of_entries == 0);\r\n }", "public int getLoad() {\n\t\treturn load;\n\t}", "public boolean isDeferredLoading() {\n/* 86 */ return this.deferred;\n/* */ }", "public boolean empty() {\r\n\t\treturn empty;\r\n\t}", "String getLoadingMessage();", "public boolean isFull() {\n\t\treturn false;\n\t}", "boolean isEmpty() {\n return contents.size() == 0;\n }" ]
[ "0.73936564", "0.71906775", "0.718803", "0.7070815", "0.70134443", "0.69976187", "0.69600296", "0.6948984", "0.6877071", "0.6838277", "0.6807412", "0.6787007", "0.6782756", "0.6664526", "0.66449106", "0.6616051", "0.6586556", "0.65493554", "0.6496227", "0.6427875", "0.64188474", "0.6416097", "0.64053905", "0.64041126", "0.6379818", "0.63723433", "0.63146937", "0.63146937", "0.6279574", "0.6269505", "0.6257468", "0.6256475", "0.62475723", "0.6220181", "0.6215423", "0.61841035", "0.61753356", "0.61636394", "0.6139577", "0.6132068", "0.60995775", "0.60951126", "0.6077486", "0.6029187", "0.6012842", "0.5994675", "0.5990527", "0.5986568", "0.5975393", "0.59703654", "0.5965918", "0.5925073", "0.5922321", "0.59222037", "0.59186095", "0.59099007", "0.59092563", "0.5907441", "0.5905574", "0.5895091", "0.5895091", "0.5894313", "0.5885228", "0.5879462", "0.5870428", "0.5822292", "0.58209", "0.58188695", "0.5806507", "0.5800085", "0.5798338", "0.5796789", "0.57888335", "0.57876915", "0.57829094", "0.5781821", "0.57794255", "0.57667357", "0.5761975", "0.5757106", "0.5728994", "0.5724036", "0.57034963", "0.57020646", "0.5694582", "0.56897557", "0.5688191", "0.5687795", "0.56848335", "0.568365", "0.5669238", "0.56569976", "0.56457525", "0.5643569", "0.56389207", "0.5635134", "0.563239", "0.5627459", "0.5626513", "0.5614559", "0.5611754" ]
0.0
-1
Loads all the empty information
public void organizeInternalStructure( ) throws LoaderException { // Fist cast the object for easier use and validation IEmpty empty = null; try { empty = ( IEmpty )element; } catch( ClassCastException e ) { throw new LoaderException( "Class does not implement IEmpty.", e ); } if(((IActivity)element).getName( )==null) throw new LoaderException("The empty element must have a name defined"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadData() {\n\t\tbookingRequestList = bookingRequestDAO.getAllBookingRequests();\n\t\tcabDetailList = cabDAO.getAllCabs();\n\t}", "protected void loadData()\n {\n }", "private void initializeInfo()\n {\n Iterator<node_info> it=this.ga.getV().iterator();\n while (it.hasNext())\n {\n it.next().setInfo(null);\n }\n }", "private void loadData(){\n\t\t \n\t\t model.getDataVector().clear();\n\t\t ArrayList<Person> personList = DataBase.getInstance().getPersonList();\n\t\t for(Person person : personList){\n\t\t\t addRow(person.toBasicInfoStringArray());\n\t\t }\n\t\t \n\t }", "private void initData() {\n requestServerToGetInformation();\n }", "public void loadData() {\n if (this.model != null) {\n\n this.dataLayout.setVisibility(View.VISIBLE);\n this.emptyText.setVisibility(View.GONE);\n\n\n if (this.model.getSolution() != null) {\n this.solutionView.setText(this.model.getSolution());\n }\n if (this.model.getArguments() != null) {\n this.argumentsView.setText(this.model.getArguments());\n }\n if (this.model.getQuestion() != null) {\n this.questionView.setText(\n String.valueOf(this.model.getQuestion().getId()));\n }\n } else {\n this.dataLayout.setVisibility(View.GONE);\n this.emptyText.setVisibility(View.VISIBLE);\n }\n }", "public void loadAllUserData(){\n\n }", "public void loadDefaultValues() {\r\n\t}", "abstract void initializeNeededData();", "public void loadFirstData() throws Exception {\n\t}", "public static void loadAllAdditionalCachedObjectList() {\n\n\t\t// TODO Completar cuando sea necesario.\n\n\t}", "public void initializeData() {\n _currentDataAll = _purityReportData.getAll();\n }", "private void Initialized_Data() {\n\t\t\r\n\t}", "@Override\n public void clear() {\n isLoaded = false;\n }", "public String detailsLoad() throws Exception {\n\t\treturn null;\n\t}", "public void initData() {\n ConnectivityManager connMgr = (ConnectivityManager)\n getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\n\n // Get details on the currently active default data network\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n\n // If there is a network connection, fetch data\n if (networkInfo != null && networkInfo.isConnected()) {\n // Get a reference to the LoaderManager, in order to interact with loaders.\n LoaderManager loaderManager = getLoaderManager();\n\n // number the loaderManager with mPage as may be requesting up to three lots of JSON for each tab\n loaderManager.initLoader(FETCH_STOCK_PICKING_LOADER_ID, null, loadStockPickingFromServerListener);\n } else {\n // Otherwise, display error\n // First, hide loading indicator so error message will be visible\n View loadingIndicator = getView().findViewById(R.id.loading_spinner);\n loadingIndicator.setVisibility(View.GONE);\n\n // Update empty state with no connection error message\n mEmptyStateTextView.setText(R.string.error_no_internet_connection);\n }\n }", "protected void fillInfo() {\n buffer.setLength(0);\n for (Food food : foods) {\n if (food != null) {\n buffer.append(food.toString());\n }\n }\n }", "private void loadData()\r\n\t{\r\n\t\taddProduct(\"Area\", \"Education\");\r\n\t\taddProduct(\"Area\", \"Environment\");\r\n\t\taddProduct(\"Area\", \"Health\");\r\n\r\n\t\taddProduct(\"Domain\", \"Documentation\");\r\n\t\taddProduct(\"Domain\", \"Project Activity\");\r\n\t\taddProduct(\"Domain\", \"Technology\");\r\n\r\n\t\taddProduct(\"City\", \"Bangalore\");\r\n\t\taddProduct(\"City\", \"Hyderabad\");\r\n\t\taddProduct(\"City\", \"Lucknow\");\r\n\r\n\t\taddProduct(\"Activity_Type\", \"Onsite\");\r\n\t\taddProduct(\"Activity_Type\", \"Offsite\");\r\n\r\n\t}", "private void loadData() {\n\t\tOptional<ServerData> loaded_data = dataSaver.load();\n\t\tif (loaded_data.isPresent()) {\n\t\t\tdata = loaded_data.get();\n\t\t} else {\n\t\t\tdata = new ServerData();\n\t\t}\n\t}", "public void clearMissing()\n\t\t{\n\t\t\tm_missingInformation.clear();\n\t\t}", "@Override\n\t\t\tprotected PaginationResponseData load() {\n\t\t\t\treturn null;\n\n\t\t\t}", "private void loadLists() {\n loadSavedCourses();\n loadSavedSchedules();\n }", "protected abstract void loadData();", "@Override\n public void clear() {\n initialize();\n }", "public void loadData () {\n // create an ObjectInputStream for the file we created before\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"DB/Guest.ser\"));\n\n int noOfOrdRecords = ois.readInt();\n Guest.setMaxID(ois.readInt());\n System.out.println(\"GuestController: \" + noOfOrdRecords + \" Entries Loaded\");\n for (int i = 0; i < noOfOrdRecords; i++) {\n guestList.add((Guest) ois.readObject());\n //orderList.get(i).getTable().setAvailable(false);\n }\n } catch (IOException | ClassNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }", "private void initData() {\n\t}", "protected void loadData() {\n refreshview.setRefreshing(true);\n //小区ID\\t帐号\\t消息类型ID\\t开始时间\\t结束时间\n // ZganLoginService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n //ZganCommunityService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n ZganCommunityService.toGetServerData(40, String.format(\"%s\\t%s\\t%s\\t%s\", PreferenceUtil.getUserName(), funcPage.gettype_id(), String.format(\"@id=22,@page_id=%s,@page=%s\",funcPage.getpage_id(),pageindex), \"22\"), handler);\n }", "private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}", "public void load() {\n\t}", "private void loadData() {\n this.financeDataList = new ArrayList<>();\n }", "void loadAll() {\n\t\tsynchronized (this) {\n\t\t\tif (isFullyLoaded) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (Entry<Integer, Supplier<ChunkMeta<?>>> generator : ChunkMetaFactory.getInstance()\n\t\t\t\t\t.getEmptyChunkFunctions()) {\n\t\t\t\tChunkMeta<?> chunk = generator.getValue().get();\n\t\t\t\tchunk.setChunkCoord(this);\n\t\t\t\tchunk.setPluginID(generator.getKey());\n\t\t\t\ttry {\n\t\t\t\t\tchunk.populate();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// need to catch everything here, otherwise we block the main thread forever\n\t\t\t\t\t// once it tries to read this\n\t\t\t\t\tCivModCorePlugin.getInstance().getLogger().log(Level.SEVERE, \n\t\t\t\t\t\t\t\"Failed to load chunk data\", e);\n\t\t\t\t}\n\t\t\t\taddChunkMeta(chunk);\n\t\t\t}\n\t\t\tisFullyLoaded = true;\n\t\t\tthis.notifyAll();\n\t\t}\n\t}", "private void loadData() {\n //load general data\n Settings.loadSettings();\n\n this.spCrawlTimeout.setValue(Settings.CRAWL_TIMEOUT / 1000);\n this.spRetryPolicy.setValue(Settings.RETRY_POLICY);\n this.spRecrawlInterval.setValue(Settings.RECRAWL_TIME / 3600000);\n this.spRecrawlCheckTime.setValue(Settings.RECRAWL_CHECK_TIME / 60000);\n }", "public void loadDefault() {\n\t\tthis.loadJTree(\"{\\\"id\\\":\\\"1\\\", \\\"name\\\":\\\"Core\\\", \\\"children\\\":[\" +\r\n\t\t\t\t\"{\\\"id\\\":\\\"2\\\", \\\"name\\\":\\\"Leaf1\\\", \\\"data\\\":[], \\\"children\\\":[]}, \" +\r\n\t\t\t\t\"{\\\"id\\\":\\\"3\\\", \\\"name\\\":\\\"Leaf2\\\", \\\"data\\\":[], \\\"children\\\":[]}\" +\r\n\t \t\t\"], \\\"data\\\":[]}\");\r\n\t\tthis.resizeTree();\r\n\t\t\r\n }", "public void loadInfo(){\n list=control.getPrgList();\n refreshpsTextField(list.size());\n populatepsListView();\n }", "public static void load() {\n load(false);\n }", "protected void initialize() {\n // Attribute Load\n this.attributeMap.clear();\n this.attributeMap.putAll(this.loadAttribute());\n // RuleUnique Load\n this.unique = this.loadRule();\n // Marker Load\n this.marker = this.loadMarker();\n // Reference Load\n this.reference = this.loadReference();\n }", "public void load() {\n handleLoad(false, false);\n }", "protected void initDataFields() {\r\n //this module doesn't require any data fields\r\n }", "private void initData() {\n }", "public void initData() {\n\t\tnotes = new ArrayList<>();\n\t\t//place to read notes e.g from file\n\t}", "private void loadTimingInformation()\n\t{\n\t\ttry\n\t\t{\n\t\t\tFile loadFile = new File(\"asdasda.save\");\n\t\t\tif(loadFile.exists())\n\t\t\t{\n\t\t\t\tqueryList.clear();\n\t\t\t\tScanner textScanner = new Scanner(loadFile);\n\t\t\t\twhile(textScanner.hasNext())\n\t\t\t\t{\n\t\t\t\t\tString query = textScanner.nextLine();\n\t\t\t\t\tlong queryTime = Long.parseLong(textScanner.nextLine());\n\t\t\t\t\tqueryList.add(new QueryInfo(query, queryTime));\n\t\t\t\t}\n\t\t\t\ttextScanner.close();\n\t\t\t\tJOptionPane.showMessageDialog(getAppFrame(), queryList.size() + \" QueryInfo objects were loaded into the application\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(getAppFrame(), \"File not present. No QueryInfo objects loaded\");\n\t\t\t}\n\t\t}\n\t\tcatch(IOException currentError)\n\t\t{\n\t\t\tdataController.displayErrors(currentError);\n\t\t}\n\t}", "public void LoadDummyData(View view) {\n /*this overwrites everything in the friends tree by inserting hashmap of dummy items*/\n loadDummyDataHashMap(friendsDatabaseReference);\n }", "@Override\n\t\tvoid loadData() throws IOException {\n\t\t\tsuper.loadData();\n\t\t}", "private void loadBlankPersonPage() {\n name.setText(\"\");\n phone.setText(\"\");\n address.setText(\"\");\n email.setText(\"\");\n groups.getChildren().clear();\n preferences.getChildren().clear();\n initBlankIcons();\n }", "private void initializeEmptyStore() throws IOException\r\n {\r\n this.keyHash.clear();\r\n\r\n if (!dataFile.isEmpty())\r\n {\r\n dataFile.reset();\r\n }\r\n }", "public void loadList() {\n // Run the query.\n nodes = mDbNodeHelper.getNodeListData();\n }", "@Override\n\tpublic List<Map<String, Object>> readAll() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Map<String, Object>> readAll() {\n\t\treturn null;\n\t}", "private void loadRecordDetails() {\n updateRecordCount();\n loadCurrentRecord();\n }", "private void loadData() {\n RetrofitHelper.getInstance().getNearbyItems(new Observer<MainItemListBean>() {\n @Override\n public void onSubscribe(Disposable d) {\n\n }\n\n @Override\n public void onNext(MainItemListBean mainItemListBean) {\n if (refreshLayout.getState() == RefreshState.Refreshing) {\n dataBeans.clear();\n }\n dataBeans.addAll(mainItemListBean.getData());\n if (dataBeans.isEmpty()) {\n emptyView.setVisibility(View.VISIBLE);\n } else {\n emptyView.setVisibility(View.GONE);\n }\n adapter.setData(dataBeans);\n }\n\n @Override\n public void onError(Throwable e) {\n e.printStackTrace();\n endLoading();\n }\n\n @Override\n public void onComplete() {\n endLoading();\n }\n }, longitude, latitude, maxDistance, page, category);\n }", "private void InitData() {\n\t}", "private void init() {\n UNIGRAM = new HashMap<>();\n }", "void loadData();", "void loadData();", "@Override\r\n\tprotected void load() {\n\t\t\r\n\t}", "public void loadData ( ) {\n\t\tinvokeSafe ( \"loadData\" );\n\t}", "private void freshTheData() {\n mData.clear();\n mData.addAll(mDataOrg);\n }", "public void clear() throws Exceptions.OsoException {\n loadedNames.clear();\n loadedContent.clear();\n ffiPolar = Ffi.get().polarNew();\n }", "private void loadDataOnFirst(){\n updateDateTimeText();\n\n mPbLoading.setVisibility(View.VISIBLE);\n mCalendarListView.setVisibility(View.GONE);\n\n // Call API to get the schedules\n mPresenter.loadAllExaminationSchedulesForSpecificDate(mMyDate.generateDateString(AppConstants.DATE_FORMAT_YYYY_MM_DD));\n }", "@Override\n public void load() {\n }", "private void loadLists() {\n }", "private void loadData() {\n\t\tlogger.trace(\"loadData() is called\");\n\t\t\n\t\ttry {\n\t\t\tFileInputStream fileIn = new FileInputStream(\"server-info.dat\");\n\t\t\tObjectInputStream in = new ObjectInputStream(fileIn);\n\t\t\tjokeFile = (String ) in.readObject();\n\t\t\tkkServerPort = (int) in.readObject();\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\tjokeFile = \"kk-jokes.txt\";\n\t\t\tkkServerPort = 5555;\n\t\t\t//e.printStackTrace();\n\t\t\tSystem.err.println(\"server-info.dat file is likely missing but it should be created automatically when this app is closed.\");\n\t\t\tlogger.info(\"server-info.dat file is likely missing but it should be created automatically when this app is closed.\");\n\t\t}\t\n\t}", "private void loadStaticData(){\n this.specialisaties = this.dbFacade.getAllSpecialisaties();\n this.jComboBoxSpecialisatie.setModel(new DefaultComboBoxModel(this.specialisaties.toArray()));\n this.SpecialisatieSitueert = this.dbFacade.getAllSitueert();\n this.jComboBoxSitueert.setModel(new DefaultComboBoxModel(this.SpecialisatieSitueert.toArray()));\n }", "private void clearSeenInfo() {\n seenInfo_ = emptyProtobufList();\n }", "public abstract void loadData();", "public abstract void loadData();", "private void loadData() {\r\n\t\talert(\"Loading data ...\\n\");\r\n \r\n // ---- categories------\r\n my.addCategory(new Category(\"1\", \"VIP\"));\r\n my.addCategory(new Category(\"2\", \"Regular\"));\r\n my.addCategory(new Category(\"3\", \"Premium\"));\r\n my.addCategory(new Category(\"4\", \"Mierder\"));\r\n \r\n my.loadData();\r\n \r\n\t }", "private void initData() {\n\t\tpages = new ArrayList<WallpaperPage>();\n\n\t}", "public void initialize() {\n setThisFacility(null);\n loadData();\n initCols();\n\n }", "public Data() {\n this.customers = new HashMap<>();\n this.orders = new HashMap<>();\n this.siteVisits = new HashMap<>();\n this.imageUploads = new HashMap<>();\n }", "@Override\r\n\tpublic void loadData() {\r\n\t\t// Get Session\r\n\r\n\t\tSession ses = HibernateUtil.getSession();\r\n\r\n\t\tQuery query = ses.createQuery(\"FROM User\");\r\n\r\n\t\tList<User> list = null;\r\n\t\tSet<PhoneNumber> phone = null;\r\n\t\tlist = query.list();\r\n\t\tfor (User u : list) {\r\n\t\t\tSystem.out.println(\"Users are \" + u);\r\n\t\t\t// Getting phones for for a particular user Id\r\n\t\t\tphone = u.getPhone();\r\n\t\t\tfor (PhoneNumber ph : phone) {\r\n\t\t\t\tSystem.out.println(\"Phones \" + ph);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "public void initData() {\n }", "public void initData() {\n }", "@Override\n\tpublic boolean isLoad() {\n\t\treturn false;\n\t}", "public static void init() {\n buildings = new HashMap<Long, JSONObject>();\n arr = new ArrayList();\n buildingOfRoom = new HashMap<Long, Long>();\n }", "public void loadData() {\n\t\tempsList.add(\"Pankaj\");\r\n\t\tempsList.add(\"Raj\");\r\n\t\tempsList.add(\"David\");\r\n\t\tempsList.add(\"Lisa\");\r\n\t}", "private void initdata() {\n\t\tProgressDialogUtil.showProgressDlg(this, \"加载数据\");\n\t\tProdDetailRequest req = new ProdDetailRequest();\n\t\treq.id = prodInfo.id+\"\";\n\t\tRequestParams params = new RequestParams();\n\t\ttry {\n\t\t\tparams.setBodyEntity(new StringEntity(req.toJson()));\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tnew HttpUtils().send(HttpMethod.POST, Api.GETGOODSDETAIL, params, new RequestCallBack<String>() {\n\t\t\t@Override\n\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\tProgressDialogUtil.dismissProgressDlg();\n\t\t\t\tT.showNetworkError(CommodityInfosActivity.this);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(ResponseInfo<String> resp) {\n\t\t\t\tProgressDialogUtil.dismissProgressDlg();\n\t\t\t\tProdDetailResponse bean = new Gson().fromJson(resp.result, ProdDetailResponse.class);\n\t\t\t\tLog.e(\"\", \"\"+resp.result);\n\t\t\t\tif(Api.SUCCEED == bean.result_code && bean.data != null) {\n\t\t\t\t\tupview(bean.data);\n\t\t\t\t\tdatas = bean.data;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void load() {\n }", "private void initData() {\n\n }", "public void clearAll() {\n bikeName = \"\";\n bikeDescription = \"\";\n bikePrice = \"\";\n street = \"\";\n zipcode = \"\";\n city = \"\";\n bikeImagePath = null;\n }", "public void clear() {\r\n init();\r\n }", "public void searchAll() {\r\n\t\tconfiguracionUoDet = new ConfiguracionUoDet();\r\n\t\tidConfiguracionUoDet = null;\r\n\t\tidBarrio = null;\r\n\t\tidCiudad = null;\r\n\t\tidCpt = null;\r\n\t\tidDpto = null;\r\n\t\tmodalidadOcupacion = null;\r\n\t\tcodigoUnidOrgDep = null;\r\n\t\tdenominacion = null;\r\n\t\tllenarListado1();\r\n\t}", "@Override\r\n\tpublic void load() {\n\t\ts.load();\r\n\r\n\t}", "@Override\r\n\tprotected void initLoad() {\n\r\n\t}", "private void loadData(){\n Dh.refresh();\n }", "@Override\n\tprotected void load() {\n\n\t}", "@Override\n\tprotected void load() {\n\n\t}", "public void load() {\n loadDisabledWorlds();\n chunks.clear();\n for (World world : ObsidianDestroyer.getInstance().getServer().getWorlds()) {\n for (Chunk chunk : world.getLoadedChunks()) {\n loadChunk(chunk);\n }\n }\n }", "@Override\r\n\tpublic void load() {\n\t}", "private void clearMetaInfo()\r\n\t{\r\n\t amiMap.clear();\r\n\t}", "private void loadRecords() {\r\n\t\tpanContent.updateContent();\r\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "private void loading(){\n mDbHelper = new DbHelper(getActivity());\n if(!(mDbHelper.getPlanCount() == 0)){\n plan_list.addAll(mDbHelper.getAllPlan());\n }\n refreshList();\n }", "private void putDefaultInformation() throws FileNotFoundException, SQLException, IOException {\n staff_name = \"Sin informacion\";\n staff_surname = \"Sin informacion\";\n id_type = \"Sin informacion\";\n id_number = \"Sin informacion\";\n putProfPic(null);\n phone_number = \"Sin informacion\";\n mobile_number = \"Sin informacion\";\n email = \"Sin informacion\";\n birthdate = GBEnvironment.getInstance().serverDate();\n gender = \"Seleccione sexo\";\n }", "@Override\n protected void loadData() {\n setUpLoadingViewVisibility(true);\n callImageList = RetrofitGenerator.createService(ApiService.class)\n .getAllPubImage();\n callImageList.enqueue(callbackImageList);\n }", "private void startLoading() {\n\t\tJSONObject obj = new JSONObject();\r\n\t\tobj.put(\"userId\", new JSONString(User.id));\r\n\t\tobj.put(\"userSID\", new JSONString(User.SID));\r\n\t\tapi.execute(RequestType.GetUserInfo, obj, this);\r\n\t}", "private void loadUserData() {\n\t\tuserData = new UserData();\n }", "@Override\r\n\tpublic void load() {\n\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}" ]
[ "0.6902998", "0.67044497", "0.6629148", "0.6402294", "0.6361719", "0.63467085", "0.63151777", "0.6291297", "0.62876993", "0.62802577", "0.62385035", "0.62339866", "0.62142444", "0.6209136", "0.61818177", "0.6173355", "0.6160848", "0.6127946", "0.6107346", "0.6089394", "0.6086367", "0.60837096", "0.60520685", "0.60470283", "0.6041743", "0.603554", "0.6028542", "0.6016239", "0.6013506", "0.6011893", "0.6010179", "0.6009356", "0.5995098", "0.59932715", "0.59846085", "0.5981791", "0.5970582", "0.59544086", "0.5949898", "0.59488314", "0.59486693", "0.594628", "0.5935752", "0.59206426", "0.59077644", "0.5900281", "0.58991224", "0.58991224", "0.5896463", "0.58944654", "0.58833015", "0.588296", "0.5876851", "0.5876851", "0.587645", "0.58732563", "0.5857729", "0.5852348", "0.5852214", "0.5843478", "0.5843204", "0.58373606", "0.58230907", "0.58225274", "0.5822037", "0.5822037", "0.581927", "0.5803519", "0.5786362", "0.5783239", "0.5782726", "0.578206", "0.578206", "0.5781875", "0.57761204", "0.5772853", "0.57717633", "0.57651174", "0.576181", "0.5760019", "0.5758415", "0.5754899", "0.5753314", "0.5752328", "0.57514304", "0.57491404", "0.57491404", "0.57472396", "0.5746113", "0.57397395", "0.5734622", "0.57271135", "0.5718607", "0.5716814", "0.5706186", "0.5704769", "0.5703468", "0.5698698", "0.56965333", "0.56965333", "0.56965333" ]
0.0
-1
/ nibble to bit map
public static void ComputeTables() { int[][] nbl2bit = { new int[]{1, 0, 0, 0}, new int[]{1, 0, 0, 1}, new int[]{1, 0, 1, 0}, new int[]{1, 0, 1, 1}, new int[]{1, 1, 0, 0}, new int[]{1, 1, 0, 1}, new int[]{1, 1, 1, 0}, new int[]{1, 1, 1, 1}, new int[]{-1, 0, 0, 0}, new int[]{-1, 0, 0, 1}, new int[]{-1, 0, 1, 0}, new int[]{-1, 0, 1, 1}, new int[]{-1, 1, 0, 0}, new int[]{-1, 1, 0, 1}, new int[]{-1, 1, 1, 0}, new int[]{-1, 1, 1, 1} }; int step, nib; /* loop over all possible steps */ for (step = 0; step <= 48; step++) { /* compute the step value */ int stepval = (int) (Math.floor(16.0 * Math.pow(11.0 / 10.0, (double) step))); /* loop over all nibbles and compute the difference */ for (nib = 0; nib < 16; nib++) { diff_lookup[step * 16 + nib] = nbl2bit[nib][0] * (stepval * nbl2bit[nib][1] + stepval / 2 * nbl2bit[nib][2] + stepval / 4 * nbl2bit[nib][3] + stepval / 8); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getIndexBits();", "public int bitAt(int i) {\n // PUT YOUR CODE HERE\n }", "int getBitAsInt(int index);", "private byte[] intToBits(int number, int n) {\n\t\tbyte[] bits = new byte[n];\n\t\t\n\t\tString bitString = Integer.toBinaryString(number);\n\t\twhile (bitString.length() < n) {\n\t\t\tbitString = \"0\" + bitString;\n\t\t}\n\t\t\n\t\tfor(int i = 0, maxLen = bits.length; i < maxLen; i++) {\n\t\t\tbits[i] = (byte) (bitString.charAt(i) == 1 ? 1 : 0);\n\t\t}\n\t\t\n\t\treturn bits;\n\t}", "public static int getBit(byte input,int position){\n return (input >> position) & 1;\n }", "int getNibble(int num, int which)\n {\n return 0b1111 & num >> (which << 2);\n }", "private byte[] bit_conversion(int i) {\n // originally integers (ints) cast into bytes\n // byte byte7 = (byte)((i & 0xFF00000000000000L) >>> 56);\n // byte byte6 = (byte)((i & 0x00FF000000000000L) >>> 48);\n // byte byte5 = (byte)((i & 0x0000FF0000000000L) >>> 40);\n // byte byte4 = (byte)((i & 0x000000FF00000000L) >>> 32);\n\n // only using 4 bytes\n byte byte3 = (byte) ((i & 0xFF000000) >>> 24); // 0\n byte byte2 = (byte) ((i & 0x00FF0000) >>> 16); // 0\n byte byte1 = (byte) ((i & 0x0000FF00) >>> 8); // 0\n byte byte0 = (byte) ((i & 0x000000FF));\n // {0,0,0,byte0} is equivalent, since all shifts >=8 will be 0\n return (new byte[] { byte3, byte2, byte1, byte0 });\n }", "private static byte toNibble(char nibble) {\n\t\tif (nibble >= 'a') {\n\t\t\tnibble = (char) (nibble - 'a' + 'A');\n\t\t}\n\n\t\tif ('0' <= nibble && nibble <= '9') {\n\t\t\treturn (byte)(nibble - '0');\n\t\t} else if ('A' <= nibble && nibble <= 'F') {\n\t\t\treturn (byte)(nibble - 'A' + 10);\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(\"Character is invalid.\");\n\t\t}\n\t}", "int nextBits(int bits);", "private static byte int2(int x) { return (byte)(x >> 16); }", "String intToBinaryNumber(int n){\n return Integer.toBinaryString(n);\n }", "public long bits() {\n\t\tlong x = n;\n\t\tif (x > 0) {\n\t\t\tlong msw = get(x - 1) & 0xffffffffL;\n\t\t\tx = (x - 1) * BPU;\n\t\t\tx = x & 0xffffffffL;\n\t\t\tlong w = BPU;\n\t\t\tdo {\n\t\t\t\tw >>= 1;\n\t\t\t\tif (msw >= ((1 << w) & 0xffffffffL)) {\n\t\t\t\t\tx += w;\n\t\t\t\t\tx = x & 0xffffffffL;\n\t\t\t\t\tmsw >>= w;\n\t\t\t\t}\n\t\t\t} while (w > 8);\n\t\t\tx += bittab[(int) msw];\n\t\t\tx = x & 0xffffffffL;\n\t\t}\n\t\treturn x;\n\t}", "boolean getBit(int index);", "private void toHex(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tStringBuilder tempsb = new StringBuilder(binary);\n\t\t\n\t\t\tfor (int i = 0;i<binary.length();i+=4){//maps each nibble to its binary value\n\t\t\t\tif (tempsb.substring(i,i+4).equals(\"0000\")) \n\t\t\t\t\tsb.append('0');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0001\"))\n\t\t\t\t\tsb.append('1');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0010\"))\n\t\t\t\t\tsb.append('2');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0011\"))\n\t\t\t\t\tsb.append('3');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0100\"))\n\t\t\t\t\tsb.append('4');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0101\"))\n\t\t\t\t\tsb.append('5');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0110\"))\n\t\t\t\t\tsb.append('6');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0111\"))\n\t\t\t\t\tsb.append('7');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1000\"))\n\t\t\t\t\tsb.append('8');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1001\"))\n\t\t\t\t\tsb.append('9');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1010\"))\n\t\t\t\t\tsb.append('A');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1011\"))\n\t\t\t\t\tsb.append('B');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1100\"))\n\t\t\t\t\tsb.append('C');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1101\"))\n\t\t\t\t\tsb.append('D');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1110\"))\n\t\t\t\t\tsb.append('E');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1111\"))\n\t\t\t\t\tsb.append('F');\n\t\t\t}\n\t\t\tsb.insert(0,\"0x\");\n\t\t\tbinary = sb.toString();\n\t}", "public static int grayToBinary(int num) {\r\n\t\tint k = (INTEGER_SIZE >>> 1);\r\n\t\tint temp = num;\r\n\t\twhile (k > 0) {\r\n\t\t\ttemp ^= (temp >>> k);\r\n\t\t\tk >>>= 1;\r\n\t\t}\r\n\t\treturn temp;\r\n\t}", "public static Integer getBit(byte input, int position){\n return ((input >> position) & 1);\n }", "public void setFlagBin(int n) {\n flagBin=Translate.decTobinN(n, 4);\n }", "public static int bit(byte[] h, int i) {\n return (h[i >> 3] >> (i & 7)) & 1;\n }", "public int bitAt(int i) {\n return Integer.parseInt(String.valueOf(lfsr1.charAt(i)));\n }", "private int getBit(int value, int k) {\r\n\t\treturn (value >> k) & 1;\r\n\t}", "BitField getLSBs(int digits);", "private int bitToInt(char bit) {\n return bit == '0' ? 0 : 1;\n }", "static void initBin(int[] binToInt)\n {\n for(int i = 0; i < 32; i++)\n {\n binToInt[i] = 0;\n }\n }", "private static int[] decodeControlByte(byte b) {\n int[] res = new int[4];\n byte slicer = 3;\n for (int i = 3; i >= 0; --i) {\n res[i] = (b & slicer) + 1;\n b >>= 2;\n }\n return res;\n }", "void setBit(int index, int value);", "public static int getBitMask(int x) {\n return (0x01 << x);\n }", "public static int binaryToGray(int num) { return (num >>> 1) ^ num; }", "public long getKey()\r\n {\r\n return bitboard + mask;\r\n }", "public abstract int getBitSize();", "public void setInBin(int n) {\n inBin=Translate.decTobinN(n, 4);\n }", "public List<Integer> grayCode(int n) {\n List<Integer> result = new ArrayList<>();\n for (int i=0;i< 1<<n;i++) {\n result.add(i ^ i>>1);\n }\n return result;\n }", "public byte getBit(int k) {\n if (this.inBitRange(k)) {\n int i = k / 8;\n int j = k % 8;\n int b = this.data.get(i);\n return (byte) ((b >> j) & 1);\n }\n return 0;\n }", "public int getBit(int columnIndex) {\n BitVector vector = (BitVector) table.getVector(columnIndex);\n return vector.get(rowNumber);\n }", "static long flippingBits(long n) {\n\n String strBinary = String.format(\"%32s\", Long.toBinaryString(n)).replace(' ', '0');\n String strBinaryFlip = \"\";\n\n for (int i = 0; i < strBinary.length(); i++) {\n if (strBinary.charAt(i) == '0') {\n strBinaryFlip = strBinaryFlip + '1';\n } else {\n strBinaryFlip = strBinaryFlip + '0';\n }\n }\n\n String result = String.format(\"%32s\", strBinaryFlip).replace(' ', '0');\n long base10 = parseLong(result,2);\n return base10;\n }", "private void bitToByte(Bitmap bmap) {\n\t\ttry {\n\t\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\t\t\tbmap.compress(Bitmap.CompressFormat.PNG, 100, bos);\n\t\t\tbytePhoto = bos.toByteArray();\n\t\t\tbos.close();\n\t\t} catch (IOException ioe) {\n\n\t\t}\n\t}", "public static int getBit(byte b,int position)\n\t{\n\t return ((b >> position) & 1);\n\t}", "public static double petaBitsToBits(double num) { return gigaBitsToBits(petaBitsToGigaBits(num)); }", "public static byte getMybit(byte val, int pos){\n return (byte) ((val >> pos) & 1);\n }", "public static int offsetBits_counter() {\n return 8;\n }", "public int reverseBits(int n) {\n int r=0;\n for(int i=0;i<32;i++){\n \tr|=((n>>i)&1)<<(31-i);\n }\n return r;\n }", "private int readbit(ByteBuffer buffer) {\n if (numberLeftInBuffer == 0) {\n loadBuffer(buffer);\n numberLeftInBuffer = 8;\n }\n int top = ((byteBuffer >> 7) & 1);\n byteBuffer <<= 1;\n numberLeftInBuffer--;\n return top;\n }", "long getCollideBits();", "public static int offsetBits_addr() {\n return 0;\n }", "private static int setBits(int n) {\r\n int highestBitValue = 1;\r\n int c = 0;\r\n\r\n while (highestBitValue < n) {\r\n highestBitValue = highestBitValue * 2;\r\n }\r\n\r\n \r\n int currentBitValue = highestBitValue;\r\n while (currentBitValue > 0) {\r\n if (currentBitValue <= n) {\r\n\r\n n -= currentBitValue;\r\n c++;\r\n }\r\n currentBitValue = currentBitValue / 2;\r\n }\r\n\r\n return c;\r\n }", "private int byteToInt(byte b) { int i = b & 0xFF; return i; }", "static String convert(String bits) {\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tstringBuilder.append(String.valueOf(hexLookUp.charAt(Integer.parseInt(bits, 2))));\n\t\tString hex = stringBuilder.toString();\n\t\treturn hex;\n\t}", "private static int charToNibble( char c ) \r\n { \r\n if ( c > 'f' ) \r\n { \r\n throw new IllegalArgumentException( \"Invalid hex character: \" + c ); \r\n } \r\n int nibble = correspondingNibble[ c ]; \r\n if ( nibble < 0 ) \r\n { \r\n throw new IllegalArgumentException( \"Invalid hex character: \" + c ); \r\n } \r\n return nibble; \r\n }", "public int reverseBits(int n) {\n /*\n StringBuilder ans = new StringBuilder();\n for(int i=0; i<32; i++)\n {\n int temp = n&1;\n ans.append(temp);\n n = n>>>1;\n }\n return Integer.parseInt(ans.toString(), 2);\n */\n \n int result = 0;\n for(int i=0; i<32; i++){\n result <<= 1;\n result += n&1;\n n >>>= 1;\n }\n \n return result;\n \n }", "int next(int bits);", "public int reverseBits2(int n) {\n int x=0;\n for(int i=0;i<32;i++)\n x=x<<1 | (n>>i)&1;\n return x;\n }", "public int reverseBits(int n) {\n int ans = 0;\n for(int i = 0; i < 32; i++){\n ans <<= 1;\n ans += n&1;\n n >>= 1;\n }\n return ans;\n }", "int getHighBitLength();", "public int reverseBits(int n) {\n int x = 0;\n for(int i=0;i<32;i++){\n x = x<<1 | (n&1);\n n=n>>1;\n }\n return x;\n }", "public byte[] i2b(int value) {\n byte[] data = new byte[4];\n data[0] = (byte) ((value >> 24) & 0xFF);\n data[1] = (byte) ((value >> 16) & 0xFF);\n data[2] = (byte) ((value >> 8) & 0xFF);\n data[3] = (byte) (value & 0xFF);\n return data;\n }", "public static byte[] intToBinary(int value)\n {\n String tmp = Integer.toBinaryString(value);\n int len = tmp.length();\n int change = 8 - (len % 8);\n\n if(change != 0) len += change;\n\n byte[] res = new byte[len];\n for(int i = 0; i < len; i++) {\n if(i < change){\n // Tag on leading zeroes if needed\n res[i] = 0x00;\n }else{\n char c = tmp.charAt(i - change);\n res[i] = (byte) (c == '0' ? 0x00 : 0x01);\n }\n }\n\n return res;\n }", "public int reverseBits(int n) {\n int res = 0;\n for (int i = 0; i < 32; i++){\n res = (res << 1) | (n & 1);\n n = (n >> 1);\n }\n\n return res;\n\n }", "static private int makeInt(int b3, int b2, int b1, int b0) {\n return (((b3 ) << 24) |\n ((b2 & 0xff) << 16) |\n ((b1 & 0xff) << 8) |\n ((b0 & 0xff) ));\n }", "private static char toHex(int nibble) {\n\t\treturn hexDigit[(nibble & 0xF)];\n\t}", "protected void setBitAt(final int bitIndex) {\n _bitMap = _setBit(_bitMap,\n \t\t\t\t (Numbers.INTEGER_WIDTH*8-1)-bitIndex-1);\n }", "public static int reverseBits(int n) {\n String binary = Integer.toBinaryString(n);\n while (binary.length() < 32) {\n binary = \"0\" + binary;\n }\n\n String reverse = \"\";\n for (int i = binary.length() - 1; i >= 0; i--) {\n reverse += binary.charAt(i);\n }\n\n return (int) Long.parseLong(reverse, 2);\n }", "static int isolateBit(int n){\n return n & (-n);\n }", "public int getBit(String columnName) {\n BitVector vector = (BitVector) table.getVector(columnName);\n return vector.get(rowNumber);\n }", "public void setBitToOne(int k) {\n if (this.inBitRange(k)) {\n int i = k / 8;\n int j = k % 8;\n int b = this.data.get(i);\n int c = 1 << (7 - j);\n b = b | c;\n byte d = (byte) b;\n this.data.set(i, d);\n }\n }", "byte[] networkMask();", "private static char toHex(int nibble)\n\t{\n\t\treturn hexDigit[(nibble & 0xF)];\n\t}", "private static int mask(int bit) {\n return MSB >>> bit;\n }", "private String toBinary(byte caracter){\n byte byteDeCaracter = (byte)caracter;\n String binario=\"\";\n for( int i = 7; i>=0; i--){\n binario += ( ( ( byteDeCaracter & ( 1<<i ) ) > 0 ) ? \"1\" : \"0\" ) ;\n }\n return binario;\n }", "byte mo25264b(int i);", "public static void main(String[] args) {\n\t\tint x = ~0;\r\n\t\tSystem.out.println(Integer.toBinaryString(x));\r\n\t\tint y = x>>>8;\r\n\t\tSystem.out.println(Integer.toBinaryString(y));\r\n\t\tSystem.out.println(x+\" \"+y);\r\n\t\t\r\n\t\tint N = 1<<31;\r\n\t\tint M = 0b11;\r\n\t\tint j=2;\r\n\t\tint i=1;\r\n\t\tSystem.out.println(Integer.toBinaryString(N));\r\n\t\tSystem.out.println(Integer.toBinaryString(M));\r\n\t\tSystem.out.println(Integer.toBinaryString(insertMIntoNFromJtoI(M, N, j, i)));\r\n\t\t\r\n\t}", "private static int batoi(byte[] inp) {\n int len = inp.length>4?4:inp.length;\n int total = 0;\n for (int i = 0; i < len; i++) {\n total += (inp[i]<0?256+inp[i]:(int)inp[i]) << (((len - 1) - i) * 8);\n }\n return total;\n }", "public int reverseBits(int n) {\n int answer = 0;\n for(int i =0;i<31;i++){\n answer |= (n&1);\n answer = answer<<1;\n n = n>>1;\n }\n answer |= (n&1);\n return answer;\n }", "public int getBit(int pos) {\r\n\t\treturn flagBits[pos];\r\n\t\t\r\n\t}", "public static int reverseBits(int n) {\n\n int res = 0;\n for (int i = 1; i <= 32; i++){\n //结果往左移一位,来空出以为放原数字的最后一位。此时res最后一位为0\n res <<= 1;\n //n&1得到n二进制位的最后一位,通过与res最后一位0进行或运算,放入到res中\n res |= n&1;\n //n向右移动一位,即丢弃已经存入res中的二进制位\n n >>= 1;\n }\n return res;\n }", "public static byte set(byte value, int bit){\n return (byte)(value|(1<<bit));\n }", "static void getIndexSetBits(int[] setBits, long board) {\n\t\tint onBits = 0;\n\t\twhile (board != 0) {\n\t\t\tsetBits[onBits] = Long.numberOfTrailingZeros(board);\n\t\t\tboard ^= (1L << setBits[onBits++]);\n\t\t}\n\t\tsetBits[onBits] = -1;\n\t}", "public int getAnalysisBits();", "public static String writeBits(byte b) {\n\n StringBuffer stringBuffer = new StringBuffer();\n int bit = 0;\n\n for (int i = 7; i >= 0; i--) {\n\n bit = (b >>> i) & 0x01;\n stringBuffer.append(bit);\n\n }\n\n return stringBuffer.toString();\n\n }", "public static int forwardScanBit(long map, int start)\n {\n if ( start < 64 )\n {\n start = Math.max(start, 0);\n long bit = 1L << start;\n\n for (int i = start; i <= 63; i++, bit <<= 1)\n {\n if ((map & bit) != 0) return i;\n }\n }\n return 64;\n }", "int getOneof1110();", "public int reverseBits(int n) {\n int a=0;\n for(int i=0;i<=31;i++){\n a=a+((1&(n>>i))<<(31-i));\n }\n return a;\n }", "public String getBinaryMnemonic(){\n\t\tswitch(this) {\n\t\tcase STOP -> \t{return \t\"00000000\";}\n\t\tcase RETTR -> \t{return \t\"00000001\";}\n\t\tcase MOVSPA -> \t{return \t\"00000010\";}\n\t\tcase MOVFLGA -> {return \t\"00000011\";}\n\t\t\n\t\tcase BR -> \t\t{return \t\"0000010\";}\n\t\tcase BRLE -> \t{return \t\"0000011\";}\n\t\tcase BRLT -> \t{return \t\"0000100\";}\n\t\tcase BREQ -> \t{return \t\"0000101\";}\n\t\tcase BRNE -> \t{return \t\"0000110\";}\n\t\tcase BRGE -> \t{return \t\"0000111\";}\n\t\tcase BRGT -> \t{return \t\"0001000\";}\n\t\tcase BRV -> \t{return \t\"0001001\";}\n\t\tcase BRC -> \t{return \t\"0001010\";}\n\t\tcase CALL -> \t{return \t\"0001011\";}\n\t\t\n\t\tcase NOTA -> \t{return \t\"00011000\";}\n\t\tcase NOTX -> \t{return \t\"00011001\";}\n\t\tcase NEGA -> \t{return \t\"00011010\";}\n\t\tcase NEGX -> \t{return \t\"00011011\";}\n\t\tcase ASLA -> \t{return \t\"00011100\";}\n\t\tcase ASLX -> \t{return \t\"00011101\";}\n\t\tcase ASRA -> \t{return \t\"00011110\";}\n\t\tcase ASRX -> \t{return \t\"00011111\";}\n\t\tcase ROLA -> \t{return \t\"00100000\";}\n\t\tcase ROLX -> \t{return \t\"00100001\";}\n\t\tcase RORA -> \t{return \t\"00100010\";}\n\t\tcase RORX -> \t{return \t\"00100011\";}\n\t\t\n\t\tcase NOP -> \t{return \t\"00101\";}\n\t\tcase DECI -> \t{return \t\"00110\";}\n\t\tcase DECO -> \t{return \t\"00111\";}\n\t\tcase STRO -> \t{return \t\"01000\";}\n\t\tcase CHARI -> \t{return \t\"01001\";}\n\t\tcase CHARO -> \t{return \t\"01010\";}\n\t\t\n//\t\tcase RETn\n\t\t\n\t\tcase ADDSP -> \t{return \t\"01100\";}\n\t\tcase SUBSP -> \t{return \t\"01101\";}\n\t\t\n\t\tcase ADDA -> \t{return \t\"0111\";}\n\t\tcase SUBA -> \t{return \t\"1000\";}\n\t\tcase ANDA -> \t{return \t\"1001\";}\n\t\tcase ORA -> \t{return \t\"1010\";}\n\t\tcase CPA -> \t{return \t\"1011\";}\n\t\tcase LDA -> \t{return \t\"1100\";}\n\t\tcase LDBYTEA -> {return \t\"1101\";}\n\t\tcase STA -> \t{return \t\"1110\";}\n\t\tcase STBYTEA -> {return \t\"1111\";}\n\t\t\n\t\tcase i -> \t{return \t\"000\";}\n\t\tcase d -> \t{return \t\"001\";}\n\t\tcase n -> \t{return \t\"010\";}\n\t\tcase s -> \t{return \t\"011\";}\n\t\tcase sf -> \t{return \t\"100\";}\n\t\tcase x -> \t{return \t\"101\";}\n\t\tcase sx -> \t{return \t\"110\";}\n\t\tcase sfx -> {return \t\"111\";}\n\t\t\n\t\tcase A -> {return \"0\";}\n\t\tcase X -> {return \"1\";}\n\t\t\n\t\tcase ADDRSS -> \t{return \"\";}\n\t\tcase ASCII -> \t{return \"\";}\n\t\tcase BLOCK -> \t{return \"\";}\n\t\tcase BURN -> \t{return \"\";}\n\t\tcase BYTE -> \t{return \"\";}\n\t\tcase END -> \t{return \"\";}\n\t\tcase EQUATE -> {return \"\";}\n\t\tcase WORD -> \t{return \"\";}\n\t\t\n\t\tdefault -> throw new IllegalArgumentException(\"This is an illegal mnemonic. \\nPlease double check your code.\");\n\t\t\n\t\t}\n\t\t\n\t}", "private static int writeBits(byte[] bytes, int value, int pos, int len) {\n assert(value > 0 && pos + len <= bytes.length * 8);\n int ind = pos / 8;\n int lastPos = 0;\n for (int i = 0; i < len; i++) {\n int bi = (pos + i) % 8;\n if ((value & (1 << (len - i - 1))) != 0) {\n bytes[ind] |= 1 << (7 - bi);\n lastPos = pos + i;\n }\n if (bi == 7) {\n ind++;\n }\n }\n return lastPos;\n }", "private static int m17785a(byte[] bArr, int i) {\n return ((bArr[i + 0] | (bArr[i + 1] << 8)) | (bArr[i + 2] << 16)) | (bArr[i + 3] << 24);\n }", "public int decToBin(int input) {\r\n\t String Binary = Integer.toBinaryString(input);\t\r\n\t\treturn Integer.valueOf(Binary);\t\t\r\n\t}", "public int reverseBits4(int n) {\n int x = 0;\n for(int i=0;i<32;i++){\n int t = n>>i&1;\n x= x | t<<(31-i);\n }\n return x;\n }", "public @UInt32 int getQuantizationBits();", "public int hexToBin(String input) {\r\n\t\treturn Integer.valueOf(new BigInteger(input, 16).toString(2));\t\t\r\n\t}", "public long getUInt() { return bb.getInt() & 0xffff_ffffL; }", "private int setNibble(int num, int data, int which, int bitsToReplace) {\n return (num & ~(bitsToReplace << (which * 4)) | (data << (which * 4)));\n }", "private void generateKeyMappings(HashMap<Integer, Integer> keys)\n {\n int count = 0;\n for (int i = 0; i < 256; i++)\n {\n byte value = (byte) i;\n int transitions = 0;\n int last = value & 1;\n for (int k = 1; k < 8; k++)\n {\n if (((value >> k) & 1) != last)\n {\n last = ((value >> k) & 1);\n transitions++;\n if (transitions > 2)\n {\n break;\n }\n }\n }\n if (transitions <= 2)\n {\n keys.put(i, count++);\n }\n }\n }", "public List<Integer> grayCode(int n) {\n\t\t\n\t\tList<Integer> ret = new ArrayList<Integer>();\n\t\tret.add(0);\n if (n==0){\n \treturn ret;\n }\n //couting loop\n for (int i=0;i<n;i++){\n \tint one = 1<<i;\n \t//picking from the last element \n \tfor (int j=ret.size()-1;j>=0;j--){\n \t\tret.add(ret.get(j)^one);\n \t}\n }\n \n return ret;\n }", "public List<Integer> grayCode2(int n) {\n // input validation\n List<Integer> res = new ArrayList();\n if (n < 0) {\n return res;\n }\n \n // use binary -> Gray conversion XOR rule\n for (int i = 0; i < (1 << n); i++) { // i < 2^n\n res.add(i ^ (i >> 1));\n }\n return res;\n }", "private static int numBytesFromBits(int bits) {\n \t\treturn (bits + 7) >> 3;\n \t}", "private static int getBit(int pack, int pos) {\n\t\treturn (pack & (1 << pos)) != 0 ? 1 : 0;\n\t}", "public int reverseBits5(int n) {\n long x = 0;\n for(int i=0;i<32;i++){\n x+= Math.pow(2,31-i)*(n>>i&1);\n }\n return (int)x;\n }", "public GenericPair<HashMap<Pair, Integer>, HashMap<Integer, Pair>> mapBitextToInt(HashMap<Pair, Integer>sd_count){\n\t\tHashMap<Pair, Integer> index = new HashMap<Pair, Integer>();\n\t\tHashMap<Integer, Pair> biword = new HashMap<Integer, Pair>();\n\t\tint i = 0;\n\t\tfor (Pair pair : sd_count.keySet()){\n\t\t\tindex.put(pair, i);\n\t\t\tbiword.put(i, pair);\n\t\t\ti++;\n\t\t}\n\t\treturn new GenericPair<HashMap<Pair, Integer>, HashMap<Integer, Pair>>(index, biword);\n\t}", "public static int offsetBits_crc() {\n return 272;\n }", "public int reverseBits(int n) {\n // 001011 -> 110100\n // get bits from right to left\n // use & and mask 1 to keep the right most bit\n // 001001 & 000001 -> 000001\n \n // unsigned integer has 32 bits \n int res = 0;\n for (int i = 0; i < 32; i++) {\n // must shift res first otherwise we will lose the first bit\n res <<= 1;\n res = res + (n & 1);\n n >>= 1;\n }\n \n return res;\n }", "public static void main(int a) {\n// System.out.println(~43);\n int bit []=new int[8];\n for (int i = 7; i >=0;){\n\n\n\n }\n\n}", "private static int createBitVector(String str) {\n\t\tint bitVector = 0;\n\t\tfor(char c : str.toCharArray()) {\n\t\t\tint x = getCharNum(c);\n\t\t\tbitVector = toggle(bitVector, x);\n\t\t}\n\t\treturn bitVector;\n\t}" ]
[ "0.64870375", "0.64184994", "0.63921237", "0.6327824", "0.6064594", "0.60564744", "0.6015448", "0.59359264", "0.5874327", "0.58586526", "0.5833007", "0.58177435", "0.57779795", "0.57695454", "0.57637805", "0.5759595", "0.57567716", "0.5747782", "0.57376975", "0.57146317", "0.57122517", "0.5678364", "0.5652367", "0.5647191", "0.56361955", "0.5629084", "0.5628083", "0.55944455", "0.5582758", "0.55758524", "0.5544873", "0.5544007", "0.5543956", "0.5534573", "0.55149585", "0.5487594", "0.5484054", "0.54630905", "0.5457897", "0.54394746", "0.543013", "0.5426509", "0.54140764", "0.54075456", "0.54028225", "0.539334", "0.53897834", "0.53896785", "0.53879696", "0.53850114", "0.53831905", "0.5381359", "0.5379736", "0.53714824", "0.536743", "0.5360342", "0.53581196", "0.5354101", "0.5352978", "0.5352234", "0.534874", "0.53414696", "0.5340997", "0.53386384", "0.53363556", "0.5328224", "0.53270924", "0.53253245", "0.53227687", "0.5321244", "0.53148746", "0.5312008", "0.5308975", "0.53040606", "0.52970576", "0.5294033", "0.52914536", "0.5285224", "0.52725554", "0.5271511", "0.5263842", "0.526021", "0.5259993", "0.52585816", "0.525526", "0.5250462", "0.5245242", "0.5233666", "0.52326876", "0.5228546", "0.522344", "0.5218183", "0.52166426", "0.5216322", "0.52135503", "0.5210018", "0.5202484", "0.5194849", "0.51937145", "0.5187427" ]
0.52341604
87
/ Reset emulation of an MSM5205compatible chip
public static void MSM5205_sh_reset() { int i; /* bail if we're not emulating sound_old */ if (Machine.sample_rate == 0) { return; } for (i = 0; i < msm5205_intf.num; i++) { MSM5205Voice voice = msm5205[i]; /* initialize work */ voice.data = 0; voice.vclk = 0; voice.reset = 0; voice.signal = 0; voice.step = 0; /* timer and bitwidth set */ MSM5205_playmode_w.handler(i, msm5205_intf.select[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void external_reset()\n {\n // Set EXTRF bit in MCUSR\n try { set_ioreg(MCUSR,get_ioreg(MCUSR) | 0x02); }\n catch (RuntimeException e) { }\n\n // TO DO: Handle an external reset\n // This happens when the RESET pin of the atmel is set low for 50 ns or more\n mClockCycles = 0;\n mMBR = mMBR2 = 0;\n mPC = 0;\n mSleeping = false;\n System.out.println(\"Atmel.external_reset\");\n }", "private void reset() throws ConnectionLostException,\n\t\t\tInterruptedException {\n\t\t\t\tLOG.info(\"Start of the BaseIOIOLooper.reset method\");\n\t\t\t\tfloat prescaleval = 25000000;\n\t\t\t\tprescaleval /= 4096;\n\t\t\t\tprescaleval /= FREQ;\n\t\t\t\tprescaleval -= 1;\n\t\t\t\tbyte prescale = (byte) Math.floor(prescaleval + 0.5);\n\t\t\t\t\n\t\t\t\twrite8(PCA9685_MODE1, (byte) 0x10); // go to sleep... prerequisite to set prescaler\n\t\t\t\twrite8(PCA9685_PRESCALE, prescale); // set the prescaler\n\t\t\t\twrite8(PCA9685_MODE1, (byte) 0x20); // Wake up and set Auto Increment\n\t\t\t}", "public synchronized void power_on_reset()\n {\n // Flush data memory\n for(int i=0;i<=DATA_MEMORY_SIZE;i++)\n this.setDataMemory(i,0x00);\n\n mPC = 0;\n mMBR = mMBR2 = 0;\n for(int i=0;i<=PROGRAM_MEMORY_SIZE;i++) \n this.setProgramMemory(i,0xFFFF);\n // Power on reset sets the PORF bit of the MCUSR\n try { set_ioreg(MCUSR,get_ioreg(MCUSR) | 0x01); }\n catch (RuntimeException e) { }\n mClockCycles = 0;\n mSleeping = false;\n }", "public void handler(int num, int reset) {\n if (num >= msm5205_intf.num) {\n logerror(\"error: MSM5205_reset_w() called with chip = %d, but only %d chips allocated\\n\", num, msm5205_intf.num);\n return;\n }\n msm5205[num].reset = reset;\n }", "public static void sleepReset()\r\n\t{\r\n\t\t//FileRegister.setDataInBank(2, Speicher.getPC() + 1);\r\n\t\t//Speicher.setPC(Speicher.getPC()+1);\r\n\t\tFileRegister.setDataInBank(1, 8, FileRegister.getBankValue(1, 8) & 0b00001111); // EECON1\r\n\t}", "@Override\n\tpublic void reset() throws SIMException\n\t{\n\t\tsuper.reset();\n\t\tArrays.fill(memory,(byte)0xff);\n\t}", "public void reset() {\n // stop motors\n Motor.A.stop();\t\n Motor.A.setPower(0);\t\n Motor.B.stop();\n Motor.B.setPower(0);\t\n Motor.C.stop();\n Motor.C.setPower(0);\t\n // passivate sensors\n Sensor.S1.passivate();\n Sensor.S2.passivate();\n Sensor.S3.passivate();\n for(int i=0;i<fSensorState.length;i++)\n fSensorState[i] = false;\n }", "private void sendReset() {\n\t\tif (hardReset) {\n\t\t\tfsmTeacher.handleAction(\"reset%hard_reset\");\n\t\t\t// System.out.println(\"hard reset\");\n\t\t} else if (semiSoftReset) {\n\t\t\tSystem.out.println(\"semi soft reset\");\n\t\t\tfsmTeacher.handleAction(\"reset%semi_soft_reset\");\n\t\t} else if (softReset) {\n\t\t\tfsmTeacher.handleAction(\"reset%soft_reset\");\n\t\t\tSystem.out.println(\"soft reset\");\n\t\t}\n\t}", "public static void resetDevice(NetSocket socket) {\n String data = \"CS01*868807049006736*0046*RESET,20200423142625I0445\";\n String deviceId = \"868807049006736\";\n send(socket, data, deviceId);\n }", "public static void reset(NetSocket socket) {\n String data = \"CS01*868807049006736*0005*RESET,20190814114414I4021\";\n String deviceId = \"868807049006736\";\n send(socket, data, deviceId);\n }", "void fullReset();", "protected void onHardReset() {\n\t\tonReset();\n\t}", "private native int reset0(byte[] atr);", "void reset() ;", "public void reset() \n {\n try \n {\n // your code here\n \tSystem.out.println(\"Resetting virtual machine '\"+vm.getName() +\"'. Please wait...\"); \n \tTask t=vm.resetVM_Task();\n \tif(t.waitForTask()== Task.SUCCESS)\n \t{\n\t \tSystem.out.println(\"Virtual machine reset.\");\n\t \tSystem.out.println(\"====================================\");\n \t}\n \telse\n \t\tSystem.out.println(\"Reset failed...\");\n } \n catch ( Exception e ) \n { \n \tSystem.out.println( e.toString() ) ; \n }\n }", "void DevClear (int boardID, short addr);", "private void reset() {\n ms = s = m = h = 0;\n actualizar();\n }", "public void reset() {\n cycles = 0;\n nextHaltCycle = GB_CYCLES_PER_FRAME;\n nextUpdateCycle = 0;\n running = false;\n timer.reset();\n \n cpu.reset();\n ram.reset();\n soundHandler.reset();\n }", "public void reset()\n {\n a = 0x0123456789ABCDEFL;\n b = 0xFEDCBA9876543210L;\n c = 0xF096A5B4C3B2E187L;\n\n xOff = 0;\n for (int i = 0; i != x.length; i++)\n {\n x[i] = 0;\n }\n\n bOff = 0;\n for (int i = 0; i != buf.length; i++)\n {\n buf[i] = 0;\n }\n\n byteCount = 0;\n }", "public void reset(){\n ioTime=0;\n waitingTime=0;\n state=\"unstarted\";\n rem=total_CPU_time;\n ioBurstTime=0;\n cpuBurstTime=0;\n remainingCPUBurstTime=null;\n }", "public final void reset() {\n\n // Reset the output buffer\n out.reset();\n\n a=0x8000;\n c=0;\n b=0;\n if(b==0xFF)\n cT=13;\n else\n cT=12;\n resetCtxts();\n nrOfWrittenBytes = -1;\n delFF = false;\n\n nSaved = 0;\n }", "void reset ();", "public void reset() {\n monitor.sendReset();\n }", "public void testSapServerResetWhileWritingApdu() {\n mContext = this.getContext();\n byte[] dummyBytes = {1, 2, 3, 4};\n int index;\n\n try {\n\n SapSequencer sequencer = new SapSequencer();\n if(rilTestModeEnabled) {\n sequencer.testModeEnable(true);\n }\n\n /* Build a default init sequence */\n buildDefaultInitSeq(sequencer);\n\n SapMessage apduReq = new SapMessage(SapMessage.ID_TRANSFER_APDU_REQ);\n apduReq.setApdu(dummyBytes);\n\n //\n // Expect no response as we send a SIM_RESET before the write APDU\n // completes.\n // TODO: Consider adding a real response, and add an optional flag.\n //\n SapMessage apduResp = null;\n index = sequencer.addStep(apduReq, apduResp);\n\n SapMessage resetReq = new SapMessage(SapMessage.ID_RESET_SIM_REQ);\n SapMessage resetResp = new SapMessage(SapMessage.ID_RESET_SIM_RESP);\n resetResp.setResultCode(SapMessage.RESULT_OK);\n sequencer.addSubStep(index, resetReq, resetResp);\n\n SapMessage statusInd = new SapMessage(SapMessage.ID_STATUS_IND);\n statusInd.setStatusChange(SapMessage.STATUS_CARD_RESET);\n sequencer.addSubStep(index, null, statusInd);\n\n assertTrue(sequencer.run());\n } catch (IOException e) {\n Log.e(TAG, \"IOException\", e);\n }\n }", "public void m9125k() {\r\n this.f6009c = null;\r\n }", "void reset()\n {\n\n }", "public static void resetModemTemperature() {\n\t\t\n\t}", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "public static\n void reset() {\n try {\n Ansi.out.write(AnsiOutputStream.RESET_CODE);\n Ansi.err.write(AnsiOutputStream.RESET_CODE);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public abstract void reset();", "public abstract void reset();", "public abstract void reset();", "public abstract void reset();", "public abstract void reset();", "public abstract void reset();", "public abstract void reset();", "public abstract void reset();", "public abstract void reset();", "public abstract void reset();", "public abstract void reset();", "public abstract void onReset();", "private void cmdReset() throws NoSystemException {\n fSession.reset();\n }", "public void resetAll() throws ConnectionLostException, InterruptedException {\n\t\t\t\tstateLedOff = false;\n\t\t\t\tServoSettings sett = RoboTarPC.this.getServoSettings();\n\t\t\t\tfor (int servo = 0; servo < 12; servo++) {\n\t\t\t\t\tsetServo(servo, sett.getInitial(servo));\n\t\t\t\t}\n\t\t\t\tturnOffFretLEDs();\n\t\t\t\tLOG.info(\"Servos in neutral position default\");\n\t\t\t}", "protected abstract void reset();", "private void resetSense() {\r\n\t\tArrays.fill(this.senseBytes, (byte)0x00);\r\n\t\tthis.updateUnitStatus();\r\n\t}", "abstract void reset();", "public void reset() {\n actionFlag = true;\n messageFlag = false;\n self.getInputBuffer().clear();\n self.getOutputBuffer().clear();\n self.setCurrentProduct(null);\n self.resetCounters();\n self.getServiceManager().init(getRandom(), template);\n syncUpdate();\n }", "public void reset () {}", "public void reset()\r\n {\r\n gameBoard.reset();\r\n fillBombs();\r\n fillBoard();\r\n scoreBoard.reset();\r\n }", "public void ResetClimbEncoders() {\n leftClamFoot.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightClamFoot.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n }", "public void reset() throws Exception;", "protected void doReset() throws FndException\n {\n }", "public void reset(){\n paycheckController.reset();\n }", "private void reset() {\n }", "public void gripReset() {\n LtUtil.log_d(\"GripSensorTestTouchIc\", \"gripReset\", \"gripReset\");\n this.RESET_FLUG = false;\n Kernel.write(Kernel.GRIP_TOUCH_SENSOR_RESET, EgisFingerprint.MAJOR_VERSION);\n }", "public void resetDevice() throws FTD2XXException {\n ensureFTStatus(ftd2xx.FT_ResetDevice(ftHandle));\n }", "void reset(int id);", "private void reset() {\n\t\tfor(int i = 0; i < 5; i++) {\n\t\t\treactantAmt[i] = 0;\n\t\t\tproductAmt[i] = 0;\n\t\t\treactantMM[i] = 0;\n\t\t\tproductMM[i] = 0;\n\t\t\treactantMoles[i] = 0;\n\t\t\tproductMoles[i] = 0;\n\t\t\tfinalMolReactant[i] = 0;\n\t\t\tfinalMolProduct[i] = 0;\n\t\t\tremove();\n\t\t}\n\t}", "public static void OPLResetChip(FM_OPL OPL) {\n int c, s;\n int i;\n /* reset chip */\n OPL.mode = 0;\n /* normal mode */\n\n OPL_STATUS_RESET(OPL, 0x7f);\n /* reset with register write */\n OPLWriteReg(OPL, 0x01, 0);\n /* wabesel disable */\n\n OPLWriteReg(OPL, 0x02, 0);\n /* Timer1 */\n\n OPLWriteReg(OPL, 0x03, 0);\n /* Timer2 */\n\n OPLWriteReg(OPL, 0x04, 0);\n /* IRQ mask clear */\n\n for (i = 0xff; i >= 0x20; i--) {\n OPLWriteReg(OPL, i, 0);\n }\n /* reset OPerator paramater */\n for (c = 0; c < OPL.max_ch; c++) {\n OPL_CH CH = OPL.P_CH[c];\n /* OPL.P_CH[c].PAN = OPN_CENTER; */\n for (s = 0; s < 2; s++) {\n /* wave table */\n CH.SLOT[s].wt_offset = 0;\n CH.SLOT[s].wavetable = SIN_TABLE;//CH->SLOT[s].wavetable = &SIN_TABLE[0];\n /* CH.SLOT[s].evm = ENV_MOD_RR; */\n CH.SLOT[s].evc = EG_OFF;\n CH.SLOT[s].eve = EG_OFF + 1;\n CH.SLOT[s].evs = 0;\n }\n }\n if ((OPL.type & OPL_TYPE_ADPCM) != 0) {\n YM_DELTAT DELTAT = OPL.deltat;\n DELTAT.freqbase = OPL.freqbase;\n DELTAT.output_pointer = outd;\n DELTAT.portshift = 5;\n DELTAT.output_range = DELTAT_MIXING_LEVEL << TL_BITS;\n YM_DELTAT_ADPCM_Reset(DELTAT, 0);\n }\n }", "protected void onReset() {\n\t\t\n\t}", "public void resetScsynth() {\n\t\tsendMessage(\"/g_freeAll\", new Object[] { 0 });\n\t\tsendMessage(\"/clearSched\");\n\t\tsendMessage(\"/g_new\", new Object[] { 1 });\n\t}", "public void reset() {\n\n }", "public static void resetSerialPort(final String moduleName) {\n\t\tLOGGER.info(\"Resetting of Serial Port USB Started...\");\n\n\t\tSafeProcess process = null;\n\t\tBufferedReader br = null;\n\t\tfinal String[] command = { CMD_PYTHON, RESET_SERIAL, moduleName };\n\n\t\ttry {\n\t\t\tprocess = ProcessUtil.exec(command);\n\t\t\tbr = new BufferedReader(new InputStreamReader(process.getInputStream()));\n\t\t\tString line = null;\n\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tif (line.contains(\"command not found\")) {\n\t\t\t\t\tLOGGER.error(\"Resetting Command Not Found\");\n\t\t\t\t\tthrow new KuraException(KuraErrorCode.OPERATION_NOT_SUPPORTED);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tLOGGER.info(\"Resetting of Serial Port USB Started...Done\");\n\t\t} catch (final Exception e) {\n\t\t\tLOGGER.error(Throwables.getStackTraceAsString(e));\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tLOGGER.debug(\"Closing Buffered Reader and destroying Process\", process);\n\t\t\t\tbr.close();\n\t\t\t\tprocess.destroy();\n\t\t\t} catch (final IOException e) {\n\t\t\t\tLOGGER.error(\"Error closing read buffer\", Throwables.getStackTraceAsString(e));\n\t\t\t}\n\t\t}\n\t}", "public void mo25050a() {\n reset();\n m18355r();\n for (AudioProcessor audioProcessor : this.f16614h) {\n audioProcessor.reset();\n }\n for (AudioProcessor audioProcessor2 : this.f16615i) {\n audioProcessor2.reset();\n }\n this.f16605Y = 0;\n this.f16604X = false;\n }", "public void reset()\n\t{\n\t}", "public void reset()\n\t{\n\t}", "private void reset () {\n this.logic = null;\n this.lastPulse = 0;\n this.pulseDelta = 0;\n }", "void Reset() {\n lq = 0;\n ls = 0;\n }", "public void reset(){\n }", "public synchronized void reset() {\n }", "public void turnOff(){\n vendingMachine = null;\n Logger.getGlobal().log(Level.INFO,\" Turning Off...\");\n }", "public void resetDataFromLMS();", "public void reset(){\n this.context.msr.setReadyForInput(false);\n emptyAllInputBuffers();\n emptyAllOutputBuffers();\n emptyEngineersConsoleBuffer();\n }", "@Override\n\tvoid reset() {\n\t\t\n\t}", "public void reset() {\n/* 138 */ if (TimeUtil.getWeek() == 1) {\n/* 139 */ LogUtil.errorLog(new Object[] { \"MentalRankService::reset begin\", Long.valueOf(TimeUtil.currentTimeMillis()) });\n/* 140 */ sendRankReward();\n/* */ } \n/* */ }", "public void unlockSimcard() {\n // if sim is locked by Pin , need to unlock it\n Xlog.d(TAG,\"unlockSimcard() ,mITelephony \" + mITelephony);\n try {\n if (mITelephony != null) {\n int simState = FeatureOption.MTK_GEMINI_SUPPORT ?\n (mITelephonyEx.getSimIndicatorState(mSlotId))\n : (mITelephony.getSimIndicatorState());\n if (PhoneConstants.SIM_INDICATOR_LOCKED == simState) {\n mCellConnMgr.handleCellConn(mSlotId, GeminiUtils.PIN1_REQUEST_CODE);\n Xlog.d(TAG,\"Data enable check change request pin , mSlotId \" + mSlotId);\n }\n }\n } catch (RemoteException e) {\n Xlog.e(TAG, \"RemoteException\");\n } catch (NullPointerException ex) {\n Xlog.e(TAG, \"NullPointerException\");\n }\n \n }", "private void hardReset() {\n softReset();\n // variables\n recordLap = 0; // force first query on database after race restart\n trackName = null;\n // ui\n recordLapTView.setText(\"--:--:---\");\n trackTView.setText(\"Track location\");\n carTView.setText(\"Car\");\n Log.d(TAG, \"HARD Reset: main menu\");\n }", "@Override\n\tpublic void reset() {\n\t\t\n\t}", "@Override\n\tpublic void reset() {\n\t\t\n\t}", "public void run() {\n\t\t\t\tString host = MixcellaneousUtil.getInstance().getMatrixIp();\n\t\t\t\tint port = MixcellaneousUtil.getInstance().getMatrixPort();\n\n\t\t\t\t// 发送给矩阵重置代码的数据包\n\t\t\t\tResetPackageUtil.getInstance().sendResetIpcPackage(host, port);\n\n\t\t\t}", "void rebootScanner(){\n\t\ttry{\n\t\t\tPowerManager pwrMgr = (PowerManager) getSystemService(Context.POWER_SERVICE);\n\t\t\tpwrMgr.reboot(null);\n\t\t}catch(Exception ex){\n\n\t\t}\n\t}" ]
[ "0.6981184", "0.6958082", "0.68571824", "0.67448723", "0.6519162", "0.6515151", "0.64400417", "0.64237547", "0.64178246", "0.6374691", "0.63575", "0.6275641", "0.62131125", "0.6207295", "0.61999696", "0.61766803", "0.6166282", "0.6106259", "0.60524863", "0.6051682", "0.60432076", "0.603217", "0.6027716", "0.6027014", "0.6017026", "0.6006068", "0.5992403", "0.5990945", "0.5990945", "0.5990945", "0.5990945", "0.5990945", "0.5990945", "0.5990945", "0.5990945", "0.5990945", "0.5990945", "0.5990945", "0.5990945", "0.5990945", "0.5990945", "0.5990945", "0.5990945", "0.5990945", "0.5990945", "0.5990945", "0.5990945", "0.5967692", "0.59496856", "0.59496856", "0.59496856", "0.59496856", "0.59496856", "0.59496856", "0.59496856", "0.59496856", "0.59496856", "0.59496856", "0.59496856", "0.5921639", "0.59200233", "0.5917892", "0.59158605", "0.59098965", "0.58968776", "0.58612764", "0.58332825", "0.58252764", "0.58234936", "0.5822635", "0.581704", "0.5812271", "0.5810875", "0.58037156", "0.5796787", "0.57879657", "0.5785741", "0.57808", "0.5778831", "0.57775366", "0.57766885", "0.57740164", "0.57636106", "0.57580435", "0.57580435", "0.57534075", "0.57468694", "0.573597", "0.5735142", "0.57305044", "0.5720533", "0.5711932", "0.5709142", "0.57042134", "0.5703274", "0.57026905", "0.56942636", "0.56942636", "0.56926495", "0.56906015" ]
0.7523624
0
/ range check the numbers
public void handler(int num, int vclk) { if (num >= msm5205_intf.num) { logerror("error: MSM5205_vclk_w() called with chip = %d, but only %d chips allocated\n", num, msm5205_intf.num); return; } if (msm5205[num].prescaler != 0) { logerror("error: MSM5205_vclk_w() called with chip = %d, but VCLK selected master mode\n", num); } else { if (msm5205[num].vclk != vclk) { msm5205[num].vclk = vclk; if (vclk == 0) { MSM5205_vclk_callback.handler(num); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int checkRange(int number,int range){\n return (number+range)%range;\n }", "static boolean checkbetween(int n) {\n if(n>9 && n<101){\n return true;\n }\n else {\n return false;\n }\n \n }", "public boolean inRange(Number n) {\n return n.compareTo(min) >= 0 && n.compareTo(max) <= 0;\n }", "public static boolean checkRange(int x) {\n\n \n if (x >= 1 && x <= 9) { //check if input is between 1 and 9, inclusive\n return (true);\n }\n else {\n System.out.print(\"You did not enter an int in [1,9]; try again: \");\n return (false);\n \n }\n\n \n\n }", "public static void main(String[] args) {\n Scanner num = new Scanner(System.in);\n int x = num.nextInt();\n if (x > -15 && x <= 12 || x > 14 && x < 17 || x >= 19 && x < Integer.MAX_VALUE) {\n System.out.println(\"True\");\n } else {\n System.out.println(\"False\");\n }\n }", "private boolean inRange(double num, double low, double high) {\n if (num >= low && num <= high)\n return true;\n\n return false;\n }", "private boolean isInsideValidRange (int value)\r\n\t{\r\n\t\treturn (value > m_lowerBounds && value <= m_upperBounds);\r\n\t}", "private boolean isNumberinRange(double needle, double haystack, double range) {\n return (((haystack - range) < needle) // greater than low bounds\n && (needle < (haystack + range))); // less than upper bounds\n }", "private boolean isInRange(int a, int b, int c) {\n return c >= a ;\n }", "public static boolean correctRange(int [] input) {\n\t\treturn (input[0] > 0) && (input[1] > 0) && (input[2] > 0);\n\t}", "private boolean validNum (int num) {\n if (num >= 0) return true;\n else return false;\n }", "private static boolean checkOccurrenceRange(int min1, int max1, int min2, int max2) {\n/* 1159 */ if (min1 >= min2 && (max2 == -1 || (max1 != -1 && max1 <= max2)))\n/* */ {\n/* */ \n/* 1162 */ return true;\n/* */ }\n/* 1164 */ return false;\n/* */ }", "private boolean rangeCheck(int i){\n return i >= 0 && i < size;\n }", "public boolean isInRange(int number){\n return (number >= min && number <= max);\n }", "public boolean in1020(int a, int b) {\n return ((a >= 10 && a <= 20) || (b >= 10 && b <= 20));\n}", "private boolean isRangeValid() {\n\n\t\tboolean valid = true;\n\n\t\tif (getRange() == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\tLong.parseLong(getRange());\n\t\t} catch (NumberFormatException nfe) {\n\t\t\tvalid = false;\n\t\t}\n\n\t\tvalid = valid || getRange().compareToIgnoreCase(CCLConstants.INDIRECT_RANGE_ALL) == 0;\n\n\t\treturn valid;\n\t}", "public static void checkMinMax() {\r\n\t\tSystem.out.println(\"Beginning min/max test (should be -6 and 17)\");\r\n\t\tSortedIntList list = new SortedIntList();\r\n\t\tlist.add(5);\r\n\t\tlist.add(-6);\r\n\t\tlist.add(17);\r\n\t\tlist.add(2);\r\n\t\tSystem.out.println(\" min = \" + list.min());\r\n\t\tSystem.out.println(\" max = \" + list.max());\r\n\t\tSystem.out.println();\r\n\t}", "protected final boolean rangeTestFailed(int value) {\n\tboolean test1 =\n\t (reqminSet && (reqminClosed? (value < reqmin): (value <= reqmin)))\n\t || (minSet && (minClosed? (value < min): (value <= min)));\n\tboolean test2 =\n\t (reqmaxSet && (reqmaxClosed? (value > reqmax): (value >= reqmax)))\n\t || (maxSet && (maxClosed? (value > max): (value >= max)));\n\treturn (test1 || test2);\n }", "static boolean checkNumber(int number) {\r\n\t\t\r\n\t\tint lastDigit= number%10;\r\n\t\tnumber/=10;\r\n\t\tboolean flag= false;\r\n\t\t\r\n\t\twhile(number>0) {\r\n\t\t\tif(lastDigit<=number%10) {\r\n\t\t\t\tflag=true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tlastDigit= number%10;\r\n\t\t\tnumber/=10;\r\n\t\t\t\t\r\n\t\t}\r\n\t\tif(flag) \r\n\t\t\treturn false;\r\n\t\telse {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static int checkInt(int low, int high)\r\n {\r\n Scanner in = new Scanner(System.in);\r\n int validNum = 0;\r\n boolean valid = false;\r\n while(!valid)\r\n {\r\n if(in.hasNextInt())\r\n {\r\n validNum = in.nextInt();\r\n if(validNum >= low && validNum <= high)\r\n valid = true;\r\n else\r\n System.err.println(\"Invalid\");\r\n } else\r\n {\r\n in.next();\r\n System.err.println(\"Invalid\");\r\n }\r\n }\r\n return validNum;\r\n }", "public boolean rangeCheck(int index) {\n\t\tif (index >= 0 && index <= 7) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean check(int[] arr){\n\t\t\n\t\tint i,max=Integer.MIN_VALUE,min=Integer.MAX_VALUE;\n\t\tfor(i=0;i< arr.length;i++){\n\t\t\tif(arr[i]>max){\n\t\t\t\tmax=arr[i];\n\t\t\t}\n\t\t\tif(arr[i] < min){\n\t\t\t\tmin = arr[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(max-min+1 != arr.length){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor(i=0;i<arr.length;i++){\n\t\t\tif(arr[Math.abs(arr[i])-min] < 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(arr[Math.abs(arr[i])-min] > 0){\n\t\t\t\tarr[Math.abs(arr[i])-min]= -arr[Math.abs(arr[i])-min]; \n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public void rangeCheck(int value) throws RangeException {\n\tSystem.out.println(\"In rangeCheck, value: \" + value);\n\tif (value < min || value > max) {\n\t throw new RangeException(min, max, value);\n\t}\n }", "private static void checkFromToBounds(int paramInt1, int paramInt2, int paramInt3) {\n/* 386 */ if (paramInt2 > paramInt3) {\n/* 387 */ throw new ArrayIndexOutOfBoundsException(\"origin(\" + paramInt2 + \") > fence(\" + paramInt3 + \")\");\n/* */ }\n/* */ \n/* 390 */ if (paramInt2 < 0) {\n/* 391 */ throw new ArrayIndexOutOfBoundsException(paramInt2);\n/* */ }\n/* 393 */ if (paramInt3 > paramInt1) {\n/* 394 */ throw new ArrayIndexOutOfBoundsException(paramInt3);\n/* */ }\n/* */ }", "public int bookInputRangeChecker(String input, int min, int max)\n {\n int num = bookInputIntChecker(input);\n while (num < min || num > max){\n System.out.println(num + \" is not in the allowed range, \" + min + \" - \" + max);\n num = bookInputIntChecker(input);\n }\n \n return num;\n }", "private boolean checkNumbers(int x, ReturnValue returnValue) {\n\t\tint localCheck = 0;\n\t\tint localPoints = 0;\n\t\tboolean localBool = false;\n\t\tfor (Integer i : intList) {\n\t\t\tif (i == x) {\n\t\t\t\tlocalCheck++;\n\t\t\t}\n\t\t}\n\t\tif (localCheck > 0) {\n\t\t\tlocalBool = true;\n\t\t\tlocalPoints = localCheck * x;\n\t\t}\n\t\treturnValue.setValue(localBool, localPoints, findBox(x));\n\t\treturn true;\n\t}", "private int inRange(int x, int y) {\n\t\tif (x > 3 && y > 3 && x < max_x - 3 && y < max_y - 3) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "static int check(int x, int a, int b) \n\t{ \n\t\t// sum of digits is 0 \n\t\tif (x == 0) \n\t\t{ \n\t\t\treturn 0; \n\t\t} \n\n\t\twhile (x > 0) \n\t\t{ \n\n\t\t\t// if any of digits in sum is \n\t\t\t// other than a and b \n\t\t\tif (x % 10 != a & x % 10 != b) \n\t\t\t{ \n\t\t\t\treturn 0; \n\t\t\t} \n\n\t\t\tx /= 10; \n\t\t} \n\n\t\treturn 1; \n\t}", "private boolean checkRange() {\n String notInRange = \"\"; //used for displaying error message\n \n double a = Double.valueOf(ampBox.getText());\n int d = Integer.valueOf(durBox.getText());\n int f = Integer.valueOf(freqBox.getText());\n int ow = Integer.valueOf(owBox.getText());\n \n if(a>8.128 || a<0) notInRange += \"Amplitude not in range [0mA,8.128mA]\\n\";\n if(d>423 || d<0) notInRange += \"Pulse duration not in range [0uS,423uS]\\n\";\n if(f>100 || f<0) notInRange += \"Frequency not in range [0Hz,100Hz]\\n\";\n if(ow>60 || ow<0) notInRange += \"ON-WAVE duration not in range [0sec,60sec]\\n\";\n \n if(notInRange.length()>0) {\n notInRange += \"\\nInput within proper ranges and try again\";\n JOptionPane.showMessageDialog(null, \n notInRange, \n \"Error\", JOptionPane.INFORMATION_MESSAGE);\n return false;\n }\n else {\n return true;\n }\n }", "@Test\n public void testIsInLimitLower() {\n Assertions.assertTrue(saab.isInLimit(.3, .9, .6));\n }", "@Override\n\tpublic boolean checkBoundary(float x) {\n\t\tif (!(x >= MINRANGE && x <= MAXRANGE)) {\n\t\t\treturn false;\n\t\t}\n\t\t// if in the range [-512.03, 511.97]\n\t\treturn true;\n\t}", "void checkRange(Long value) throws TdtTranslationException {\r\n\t\tif (hasRange) {\r\n\t\t\tif ((value.compareTo(minimum) < 0)\r\n\t\t\t\t\t|| (value.compareTo(maximum) > 0)) {\r\n\t\t\t\tthrow new TdtTranslationException(\"Value {\" + value\r\n\t\t\t\t\t\t+ \"} out of range [{\" + minimum + \"},{\" + maximum\r\n\t\t\t\t\t\t+ \"}] in field \" + getId());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32740L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.toString();\n Range range1 = Range.parseRange(\"[ 32740 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n range0.isSubRangeOf(range1);\n range1.equals(range0);\n range0.equals(\"[ 32740 .. 2147483646 ]/0B\");\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "private boolean checkRangeAddress(int address) {\r\n return (address >= startAddress && address < endAddress);\r\n }", "public boolean allInRange(int start, int end) {\n \t\tfor (int i=0; i<data.length; i++) {\n \t\t\tint a=data[i];\n \t\t\tif ((a<start)||(a>=end)) return false;\n \t\t}\n \t\treturn true;\n \t}", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n Range range0 = Range.of((-2147483648L));\n Range range1 = Range.of(1845L);\n boolean boolean0 = range0.isSubRangeOf(range1);\n assertFalse(boolean0);\n \n range0.getBegin();\n assertTrue(range0.isEmpty());\n }", "private boolean isInRange(int c) {\n switch (border) {\n case between:\n return min <= c && c <= max;\n case min:\n return min <= c;\n case max:\n return c <= max;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + border);\n }\n }", "public boolean isValid(int number)", "public static boolean between( int value, int min, int max ) {\n return value >= min && value <= max;\n }", "private static int getInRangeInt(Scanner scan, int min, int max) {\n int value = -9999;\n while (value < min || value > max) {\n System.out.println(\"Must be a integer between \" + min + \" and \" + max + \" : \");\n while (!scan.hasNextInt()) {\n System.out.println(\"Must be a integer between \" + min + \" and \" + max + \" : \");\n scan.next();\n }\n value = scan.nextInt();\n }\n return value;\n }", "@Test\n public void testGetRandomRange() {\n // XXX what should be tested?\n // bad values to the range?\n // min == max?\n Assert.assertTrue(true);\n }", "public boolean containsRange(Range range) {\n/* 317 */ if (range == null) {\n/* 318 */ return false;\n/* */ }\n/* 320 */ return (containsLong(range.getMinimumLong()) && containsLong(range.getMaximumLong()));\n/* */ }", "@Override\r\n public boolean checkElements(SequenceConstructionExpression owner) {\r\n SequenceRange self = this.getSelf();\r\n Expression rangeLower = self.getRangeLower();\r\n Expression rangeUpper = self.getRangeUpper();\r\n ElementReference rangeLowerType = rangeLower == null? null: rangeLower.getType();\r\n ElementReference rangeUpperType = rangeUpper == null? null: rangeUpper.getType();\r\n return (rangeLowerType == null || rangeLowerType.getImpl().isInteger()) && \r\n (rangeUpperType == null || rangeUpperType.getImpl().isInteger());\r\n }", "static boolean isNumberInRange(int playerValue, int minBarrier, int maxBarrier) {\n return playerValue > minBarrier && playerValue < maxBarrier;\n }", "private boolean checkRange(final int index) {\n if ((index > size) || (index < 0)) {\n return false;\n }\n return true;\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-2147483648L), 1146L);\n long long0 = range0.getBegin();\n assertEquals((-2147483648L), long0);\n \n boolean boolean0 = range0.equals(\"number of entries must be <= Integer.MAX_VALUE\");\n assertFalse(boolean0);\n \n Range range1 = Range.of((-2147483648L));\n List<Range> list0 = range1.complement(range0);\n assertEquals(0, list0.size());\n }", "private boolean acceptedValueRange(double amount){\n if(amount <= 1.0 && amount >= 0.0){\n return true;\n }\n else{\n throw new IllegalArgumentException(\"Number must be in range of [0,1]\");\n }\n }", "private void inRange(String[] arguments) {\n\t\ttry { \n\t int IDLow = Integer.parseInt(arguments[1]);\n\t int IDHigh = Integer.parseInt(arguments[2]);\n\t totalInRangeCount = 0;\n\t countInRange(root, IDLow, IDHigh);\n\t System.out.printf(\"%d\\n\",totalInRangeCount);\n\t } catch(NumberFormatException e) { \n\t System.out.println(\"Argument not an Integer\");; \n\t }\n\t\t\n\t}", "private boolean minValid(int min, int max) {\n\n boolean isValid = true;\n\n if (min <= 0 || min >= max) {\n isValid = false;\n AlartMessage.displayAlertAdd(3);\n }\n\n return isValid;\n }", "@Test\n public void testMinMaxNumber() {\n NumberValue minNumber = factory.getMinNumber();\n NumberValue maxNumber = factory.getMaxNumber();\n MatcherAssert.assertThat(minNumber + \" < \" + maxNumber, minNumber.compareTo(maxNumber), lessThan(0));\n }", "public static void main(String[] args) {\n\n\t\tint [] numbers = {1,2,3,4,5,6,7,8,9,10};\n\n\t\tint Startrange = 3;\n\t\tint Endrange = 7;\n\n\t\tfor(int i = 0; i < numbers.length; ++i) {\n\n\t\t\tif (!(numbers[i] > Startrange && numbers[i] < Endrange )){\n\t\t\t\tSystem.out.print(numbers[i] + \" \");\n\t\t\t}\t\n\n\t\t}\n\n\t}", "public static void checkRangeOfNumbers(int number, int lowestValue, int highestValue) throws NumberNotInRangeException {\n \n if(number<lowestValue || number>highestValue) throw new NumberNotInRangeException(\"Number is not in range, Lowest=\"+lowestValue+\" < Number=\"+number+\" < Highest=\"+highestValue);\n }", "public boolean nearHundred(int n) {\n return (Math.abs(n - 100) <= 10 || Math.abs(n - 200) <= 10);\n}", "public boolean inRange(int row, int col) {\n\t /*if the given row and col is less than 0 or greater than the maximum number, return false*/\n\t if(row < 0 || row >= this.row || col < 0 || col >= this.col) {\n\t\t return false;\n\t }\n\t /*return true if it's valid*/\n\t else {\n\t\t return true;\n\t }\n }", "public boolean checkNumber() {\n\t\treturn true;\n\t}", "public static boolean validate(int[] numbers) {\r\n\t\tfor (int i = 0; i < numbers.length - 1; i++) {\r\n\t\t\tif (numbers[i] > numbers[i + 1]) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private int validateNumber(int data, int defaultValue, int minValue, int maxValue)\n {\n return (data < minValue || data > maxValue) ? defaultValue : data;\n }", "public boolean isInteger(int min, int max){\n if(!isInteger()){\n return false;\n } \n //Tomo el valor del campo y lo paso a un entero\n int valor=Integer.parseInt(txt.getText());\n \n if(valor >=min && valor <= max){\n return true;\n }\n return error(\"El valor debe estra comprendido entre \"+min+\" y \"+max+\" !!\");\n }", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n Range range0 = Range.of((-2147483660L));\n assertFalse(range0.isEmpty());\n }", "@Test\n\tpublic void seperateRangeTest() {\n\n\t\tsetup();\n\t\tSystem.out.println(\"seperate range test\");\n\t\tZipCodeRange z1 = new ZipCodeRange(new ZipCode(94133), new ZipCode(94133));\n\t\tZipCodeRange z2 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94299));\n\t\tZipCodeRange z3 = new ZipCodeRange(new ZipCode(94600), new ZipCode(94699));\n\n\t\t// Testing\n\t\tZipRangeControl zrc = new ZipRangeControl();\n\t\tzrc.processNewRange(z1);\n\t\tzrc.processNewRange(z2);\n\t\tzrc.processNewRange(z3);\n\n\t\tZipCodeRange z4 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94399));\n\t\trequiredList.add(z1);\n\t\trequiredList.add(z2);\n\t\trequiredList.add(z3);\n\n\t\tZipCodeRange[] ziparray = new ZipCodeRange[requiredList.size()];\n\t\tList<ZipCodeRange> zlist = zrc.getFinalZipRanges();\n\n\t\tfor (int i = 0; i < requiredList.size(); i++) {\n\t\t\tAssert.assertThat(\"Lower Limit match failed at entry\" + i, requiredList.get(i).lower.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).lower.zipcode));\n\t\t\tAssert.assertThat(\"Upper Limit match failed at entry\" + i, requiredList.get(i).upper.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).upper.zipcode));\n\t\t}\n\t\tclimax();\n\n\t}", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n Range.Builder range_Builder1 = new Range.Builder(0L);\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n range_Builder0.shift(243L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n long long0 = 127L;\n Range range1 = Range.of((-636L), 127L);\n range1.isSubRangeOf(range0);\n // Undeclared exception!\n try { \n Range.parseRange(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "public void tensionRangeCheck(){\n if(motor.get() < 0){\n if(Bottom_Limit_Switch.get() | tenPot.pidGet()> tenPotMAX ){\n motor.set(0.0);\n }\n }else if(motor.get() > 0){\n if(Top_Limit_Switch.get() | tenPot.pidGet()< tenPotMIN){\n motor.set(0.0);\n }\n }\n }", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n Range range0 = Range.of((-1259L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n range1.getEnd();\n range1.getEnd();\n Range range2 = Range.of((-1259L), 255L);\n List<Range> list0 = range2.split(255L);\n range2.complementFrom(list0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range3 = Range.of(range_CoordinateSystem1, (-1259L), 0L);\n range3.endsBefore(range0);\n range2.getEnd(range_CoordinateSystem1);\n // Undeclared exception!\n try { \n Range.parseRange(\"[ -1259 .. 256 ]/SB\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "public static boolean isValueRange(int value, int min, int max) throws Exception {\r\n\t\t//Checks the Case:\r\n\t\tif (value >= min && value <= max) {\r\n\t\t\t//Returns Value:\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\telse {\r\n\t\t\t//Returns Value:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private static boolean checkTaskBounds(int task) {\r\n\t\t\tboolean isInBound;\r\n\t\t\t\r\n\t\t\tif ((task < 0) || (task > 7)) {\r\n\t\t\t\t//isInBound = false;\r\n\t\t\t\tif (task == -1) {\r\n\t\t\t\t\tisInBound = true;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tisInBound = false;\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tisInBound = true;\r\n\t\t\t}\r\n\t\t\treturn isInBound;\r\n\t\t}", "private boolean isValidSeam(int[] a, int len, int range)\n {\n if (a.length != len || a[0] < 0 || a[0] > range)\n return false;\n for (int i = 1; i < len; i++)\n {\n if (a[i] < Math.max(0, a[i-1] -1) || a[i] > Math.min(range, a[i-1] +1))\n return false;\n }\n return true;\n }", "public void testRanges() throws Exception {\n int num = atLeast(1000);\n for (int i = 0; i < num; i++) {\n BytesRef lowerVal = new BytesRef(TestUtil.randomUnicodeString(random()));\n BytesRef upperVal = new BytesRef(TestUtil.randomUnicodeString(random()));\n if (upperVal.compareTo(lowerVal) < 0) {\n assertSame(upperVal, lowerVal, random().nextBoolean(), random().nextBoolean());\n } else {\n assertSame(lowerVal, upperVal, random().nextBoolean(), random().nextBoolean());\n }\n }\n }", "private boolean valid_numbers(String nr)\n\t{\n\t\t// loop through the string, char by char\n\t\tfor(int i = 0; i < nr.length();i++)\n\t\t{\n\t\t\t// if the char is not a numeric value or negative\n\t\t\tif(Character.getNumericValue(nr.charAt(i)) < 0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// if it did not return false in the loop, return true\n\t\treturn true;\n\t}", "public boolean checkAcross() {\r\n\t\tif (p1[0] + p1[1] + p1[2] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p1[3] + p1[4] + p1[5] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p1[6] + p1[7] + p1[8] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p2[0] + p2[1] + p2[2] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p2[3] + p2[4] + p2[5] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p2[6] + p2[7] + p2[8] == 15)\r\n\t\t\treturn true;\r\n\r\n\t\treturn false;\r\n\t}", "@Test(timeout = 4000)\n public void test078() throws Throwable {\n Range range0 = Range.of((-2147483648L));\n boolean boolean0 = range0.equals(range0);\n assertTrue(boolean0);\n assertFalse(range0.isEmpty());\n }", "public boolean overlapsRange(Range range) {\n/* 334 */ if (range == null) {\n/* 335 */ return false;\n/* */ }\n/* 337 */ return (range.containsLong(this.min) || range.containsLong(this.max) || containsLong(range.getMinimumLong()));\n/* */ }", "private boolean between(int x1, int x2, int x3) {\n return (x1 >= x3 && x1 <= x2) || (x1 <= x3 && x1 >= x2);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n Range range0 = Range.of((-81L));\n Range range1 = Range.of((-1L));\n boolean boolean0 = range0.equals(range1);\n assertFalse(boolean0);\n \n Range.Comparators.values();\n long long0 = range0.getBegin();\n assertEquals((-81L), long0);\n \n List<Range> list0 = range1.complement(range0);\n assertFalse(range1.isEmpty());\n assertTrue(list0.contains(range1));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Range range0 = Range.of((-1264L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1264L));\n range1.getEnd();\n range1.getEnd();\n List<Range> list0 = range1.split(255L);\n range0.complementFrom(list0);\n Range range2 = Range.of(range_CoordinateSystem0, (-1264L), 0L);\n range2.endsBefore(range0);\n Long.max((-1264L), (-3100L));\n range1.equals(range0);\n Range.Comparators.values();\n range1.getEnd();\n range0.getEnd(range_CoordinateSystem0);\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = null;\n try {\n range_Builder1 = new Range.Builder(range_CoordinateSystem0, 255L, 248L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "public static void main(String[] args) {\n\t\tScanner scnr = new Scanner(System.in);\n\t\tint firstNum;\n\t\tint secondNum;\n\t\tint thirdNum;\n\t\tint lowEnd;\n\t\tint highEnd;\n\t\t\n\t\tSystem.out.println(\"Enter a number: \");\n\t\tfirstNum = scnr.nextInt();\n\t\t\n\t\tSystem.out.println(\"Enter another number: \");\n\t\tsecondNum = scnr.nextInt();\n\t\tif (firstNum < secondNum) {\n\t\t\tlowEnd = firstNum;\n\t\t\thighEnd = secondNum;\n\t\t} else {\n\t\t\tlowEnd = secondNum;\n\t\t\thighEnd = firstNum;\n\t\t}\n\t\tSystem.out.println(\"Your range is \" + lowEnd + \"-\" + highEnd + \".\");\n\t\tSystem.out.println(\"Enter a number for verification: \");\n\t\tthirdNum = scnr.nextInt();\n\t\t\n\t\tif (thirdNum >= lowEnd && thirdNum <= highEnd) {\n\t\t\tSystem.out.println(thirdNum + \" is in the range.\");\n\t\t} else {\n\t\t\tSystem.out.println(thirdNum + \" is outside the range.\");\n\t\t}\n\t\t\n\t\tscnr.close();\n\t}", "public static boolean inRange(int value, int min, int max){\n if ((value >= min) && (value <= max))\n return true;\n return false;\n }", "private void addRangeIntegers() {\r\n ent_2_i.put(\"< 0\", -1); ent_2_i.put(\"== 0\", 0); ent_2_i.put(\"== 1\", 1); ent_2_i.put(\"< 10\", 10);\r\n ent_2_i.put(\"< 100\", 100); ent_2_i.put(\"< 1K\", 1000); ent_2_i.put(\"< 10K\", 10000); ent_2_i.put(\"< 100K\", 100000);\r\n ent_2_i.put(\"> 100K\", 1000000);\r\n }", "@SuppressWarnings(\"unused\")\n public static boolean withinRange(float value, float startValue, float endValue) {\n return value == ScWidget.valueRangeLimit(value, startValue, endValue);\n }", "public boolean isInsideLimits(int value) {\n return value > lowerLimit && value < upperLimit;\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Range range0 = Range.of((-1259L));\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n long long0 = new Long((-1259L));\n range1.getEnd();\n Range range2 = range0.intersection(range1);\n List<Range> list0 = range2.split(255L);\n range2.complementFrom(list0);\n Range range3 = range1.asRange();\n String string0 = null;\n range3.intersection(range1);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range2.getEnd(range_CoordinateSystem1);\n // Undeclared exception!\n try { \n Range.parseRange(\"[ -1259 .. -1258 ]/SB\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse [ -1259 .. -1258 ]/SB into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "private boolean validMin(int min, int max) {\r\n\r\n boolean isTrue = true;\r\n\r\n if (min <= 0 || min >= max) {\r\n isTrue = false;\r\n alertDisplay(3);\r\n }\r\n\r\n return isTrue;\r\n }", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32740L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.toString();\n Range range1 = Range.parseRange(\"[ 32740 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n range1.startsBefore(range0);\n range1.equals(range0);\n range0.equals(\"[ 32740 .. 2147483646 ]/0B\");\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "@Override\n public boolean validate(long number) {\n List<Integer> digits = split(number);\n int multiplier = 1;\n int sum = 0;\n for (int digit : Lists.reverse(digits)) {\n int product = multiplier * digit;\n sum += product / BASE + product % BASE;\n multiplier = 3 - multiplier;\n }\n return sum % BASE == 0;\n }", "private void checkValues(int yMin2, int yMax2, List<XYValue> listOfValues2) {\n\t\tif(yMin2 < 0) {\n\t\t\tthrow new IllegalArgumentException(\"Number can not be negative!\");\n\t\t}\n\t\tif(yMax2 <= yMin2) {\n\t\t\tthrow new IllegalArgumentException(\"Max has to be greater than min!\");\n\t\t}\n\t\tfor(XYValue value : listOfValues2) {\n\t\t\tif(value.getY() < yMin2) {\n\t\t\t\tthrow new IllegalArgumentException(\"Found smaller y than minimum!\");\n\t\t\t}\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test00() throws Throwable {\n Range.Comparators.values();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range.of(range_CoordinateSystem0, (-5250L), 2383L);\n // Undeclared exception!\n try { \n Range.parseRange(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Range range0 = Range.of((-1264L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1264L));\n range1.getEnd();\n range1.getEnd();\n List<Range> list0 = range1.split(255L);\n range0.complementFrom(list0);\n Range range2 = Range.of(range_CoordinateSystem0, (-1264L), 0L);\n range2.endsBefore(range0);\n Long.max((-1264L), (-3100L));\n range1.equals(range0);\n Range.Comparators.values();\n range1.getEnd();\n long long0 = new Long(0L);\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = new Range.Builder(range_CoordinateSystem0, 255L, 259L);\n Range range3 = Range.of(1L);\n Range range4 = Range.of((-32768L), 0L);\n range4.equals(range2);\n range0.complement(range3);\n Range range5 = range_Builder1.build();\n assertFalse(range5.equals((Object)range4));\n }", "@Test(timeout = 4000)\n public void test047() throws Throwable {\n Range range0 = Range.ofLength(0L);\n String string0 = range0.toString();\n assertEquals(\"[ 0 .. -1 ]/0B\", string0);\n \n Object object0 = new Object();\n boolean boolean0 = range0.isSubRangeOf(range0);\n assertTrue(boolean0);\n }", "public static int checkMinMax(int value, String name, int minValue, int maxValue)\r\n\t\tthrows NumberOutOfRangeException\r\n\t{\r\n\t\tif (value < minValue || value > maxValue) throw new NumberOutOfRangeException(name, value, minValue, maxValue);\r\n\t\treturn value;\r\n\t}", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32729L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.toString();\n Range range1 = Range.parseRange(\"[ 32729 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n range1.equals(range0);\n Range.CoordinateSystem.values();\n Range.Comparators[] range_ComparatorsArray0 = Range.Comparators.values();\n assertEquals(4, range_ComparatorsArray0.length);\n }", "public boolean validateNummer() {\n\t\treturn (nummer >= 10000 && nummer <= 99999 && nummer % 2 != 0); //return true==1 oder false==0\n\t}", "private void validationInt(List<Integer> list) {\n\t\tint i=0;\n\t\tfor(i=0;i<list.size();i++) {\n\t\t\tif(!(list.get(i) > 0)){\n\t\t\t\tthrow new IntValueLessOneException(list.get(i));\n\t\t\t}\n\t\t}\n\t}", "public static void verifyInterval(double lower, double upper)\r\n/* 145: */ {\r\n/* 146:336 */ if (lower >= upper) {\r\n/* 147:337 */ throw new NumberIsTooLargeException(LocalizedFormats.ENDPOINTS_NOT_AN_INTERVAL, Double.valueOf(lower), Double.valueOf(upper), false);\r\n/* 148: */ }\r\n/* 149: */ }", "public boolean check_func(int [] land, int x, int y)\n\t{\n\t\tif ((land[0] < x && land[2] > x\n\t\t\t& (land[1] < y && land[3] > y)))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}", "private boolean contains(int from1, int to1, int from2, int to2) {\n\t\treturn from2 >= from1 && to2 <= to1;\n\t}", "private boolean isValid() {\n // If start is greater or equal to end then it's invalid\n return !(start.compareTo(end) >= 0);\n }", "public boolean in3050(int a, int b) {\n return ((a >= 30 && a <= 40) && (b >= 30 && b <= 40)) ||\n ((a >= 40 && a <= 50) && (b >= 40 && b <= 50));\n}", "public static <T extends Comparable<T>> boolean inRange(T val, T min, T max) {\n\t\tif(val.compareTo(min) >= 0 && val.compareTo(max) <= 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "private boolean isInBound(int current, int bound){\n return (current >= 0 && current < bound);\n }", "private boolean checkConnection(int x1, int x2) {\n\t\treturn (xStartValue <= x1 && xEndValue >= x1) || (xStartValue <= x2 && xEndValue >= x2) ||\n\t\t\t\t(x1 <= xStartValue && x2 >= xStartValue) || (x1 <= xEndValue && x2 >= xEndValue);\n\t\t\n\t}", "private boolean RANGE(char first, char last) {\r\n if (in >= input.length()) return false;\r\n int len = input.nextLength(in);\r\n int code = input.nextChar(in, len);\r\n if (code < first || code > last) return false;\r\n in += len;\r\n return true;\r\n }", "public static boolean numberIsBetween(int number, int min, int max) {\n\t\treturn max(number, min) == min(number, max);\n\t}" ]
[ "0.7845292", "0.75389713", "0.7205976", "0.69854635", "0.6912959", "0.6866265", "0.67698085", "0.6653748", "0.6651668", "0.6635745", "0.66118884", "0.65706205", "0.6552054", "0.65481836", "0.6534906", "0.6533676", "0.6489853", "0.6478157", "0.6429369", "0.6423339", "0.6391329", "0.6389768", "0.6384002", "0.6381151", "0.63769907", "0.63546234", "0.6339643", "0.63233924", "0.6303302", "0.62974715", "0.6294535", "0.62919515", "0.62895525", "0.6280405", "0.6277999", "0.6265507", "0.6260405", "0.6239855", "0.6220871", "0.6218774", "0.6208052", "0.61959296", "0.6188713", "0.6181177", "0.61763847", "0.6171297", "0.6167003", "0.6159361", "0.61514556", "0.61464846", "0.61304915", "0.61195433", "0.61175483", "0.6115358", "0.6112603", "0.6098609", "0.60983217", "0.6089862", "0.6080939", "0.6077275", "0.60728794", "0.6066801", "0.60659456", "0.6064717", "0.60629076", "0.6059767", "0.60568017", "0.60511655", "0.60446644", "0.6037767", "0.6035493", "0.60329705", "0.60321474", "0.60148436", "0.600948", "0.60089004", "0.5998837", "0.59983635", "0.5994128", "0.5993797", "0.5984015", "0.5979432", "0.5977228", "0.5963526", "0.5961163", "0.5941715", "0.59334195", "0.5925805", "0.59216297", "0.59168196", "0.59114546", "0.5908361", "0.5906365", "0.5878466", "0.5867288", "0.5862944", "0.5862336", "0.5860827", "0.58583283", "0.58504015", "0.58496606" ]
0.0
-1
/ range check the numbers
public void handler(int num, int reset) { if (num >= msm5205_intf.num) { logerror("error: MSM5205_reset_w() called with chip = %d, but only %d chips allocated\n", num, msm5205_intf.num); return; } msm5205[num].reset = reset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int checkRange(int number,int range){\n return (number+range)%range;\n }", "static boolean checkbetween(int n) {\n if(n>9 && n<101){\n return true;\n }\n else {\n return false;\n }\n \n }", "public boolean inRange(Number n) {\n return n.compareTo(min) >= 0 && n.compareTo(max) <= 0;\n }", "public static boolean checkRange(int x) {\n\n \n if (x >= 1 && x <= 9) { //check if input is between 1 and 9, inclusive\n return (true);\n }\n else {\n System.out.print(\"You did not enter an int in [1,9]; try again: \");\n return (false);\n \n }\n\n \n\n }", "public static void main(String[] args) {\n Scanner num = new Scanner(System.in);\n int x = num.nextInt();\n if (x > -15 && x <= 12 || x > 14 && x < 17 || x >= 19 && x < Integer.MAX_VALUE) {\n System.out.println(\"True\");\n } else {\n System.out.println(\"False\");\n }\n }", "private boolean inRange(double num, double low, double high) {\n if (num >= low && num <= high)\n return true;\n\n return false;\n }", "private boolean isInsideValidRange (int value)\r\n\t{\r\n\t\treturn (value > m_lowerBounds && value <= m_upperBounds);\r\n\t}", "private boolean isNumberinRange(double needle, double haystack, double range) {\n return (((haystack - range) < needle) // greater than low bounds\n && (needle < (haystack + range))); // less than upper bounds\n }", "private boolean isInRange(int a, int b, int c) {\n return c >= a ;\n }", "public static boolean correctRange(int [] input) {\n\t\treturn (input[0] > 0) && (input[1] > 0) && (input[2] > 0);\n\t}", "private boolean validNum (int num) {\n if (num >= 0) return true;\n else return false;\n }", "private static boolean checkOccurrenceRange(int min1, int max1, int min2, int max2) {\n/* 1159 */ if (min1 >= min2 && (max2 == -1 || (max1 != -1 && max1 <= max2)))\n/* */ {\n/* */ \n/* 1162 */ return true;\n/* */ }\n/* 1164 */ return false;\n/* */ }", "private boolean rangeCheck(int i){\n return i >= 0 && i < size;\n }", "public boolean isInRange(int number){\n return (number >= min && number <= max);\n }", "public boolean in1020(int a, int b) {\n return ((a >= 10 && a <= 20) || (b >= 10 && b <= 20));\n}", "private boolean isRangeValid() {\n\n\t\tboolean valid = true;\n\n\t\tif (getRange() == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\tLong.parseLong(getRange());\n\t\t} catch (NumberFormatException nfe) {\n\t\t\tvalid = false;\n\t\t}\n\n\t\tvalid = valid || getRange().compareToIgnoreCase(CCLConstants.INDIRECT_RANGE_ALL) == 0;\n\n\t\treturn valid;\n\t}", "public static void checkMinMax() {\r\n\t\tSystem.out.println(\"Beginning min/max test (should be -6 and 17)\");\r\n\t\tSortedIntList list = new SortedIntList();\r\n\t\tlist.add(5);\r\n\t\tlist.add(-6);\r\n\t\tlist.add(17);\r\n\t\tlist.add(2);\r\n\t\tSystem.out.println(\" min = \" + list.min());\r\n\t\tSystem.out.println(\" max = \" + list.max());\r\n\t\tSystem.out.println();\r\n\t}", "protected final boolean rangeTestFailed(int value) {\n\tboolean test1 =\n\t (reqminSet && (reqminClosed? (value < reqmin): (value <= reqmin)))\n\t || (minSet && (minClosed? (value < min): (value <= min)));\n\tboolean test2 =\n\t (reqmaxSet && (reqmaxClosed? (value > reqmax): (value >= reqmax)))\n\t || (maxSet && (maxClosed? (value > max): (value >= max)));\n\treturn (test1 || test2);\n }", "static boolean checkNumber(int number) {\r\n\t\t\r\n\t\tint lastDigit= number%10;\r\n\t\tnumber/=10;\r\n\t\tboolean flag= false;\r\n\t\t\r\n\t\twhile(number>0) {\r\n\t\t\tif(lastDigit<=number%10) {\r\n\t\t\t\tflag=true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tlastDigit= number%10;\r\n\t\t\tnumber/=10;\r\n\t\t\t\t\r\n\t\t}\r\n\t\tif(flag) \r\n\t\t\treturn false;\r\n\t\telse {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static int checkInt(int low, int high)\r\n {\r\n Scanner in = new Scanner(System.in);\r\n int validNum = 0;\r\n boolean valid = false;\r\n while(!valid)\r\n {\r\n if(in.hasNextInt())\r\n {\r\n validNum = in.nextInt();\r\n if(validNum >= low && validNum <= high)\r\n valid = true;\r\n else\r\n System.err.println(\"Invalid\");\r\n } else\r\n {\r\n in.next();\r\n System.err.println(\"Invalid\");\r\n }\r\n }\r\n return validNum;\r\n }", "public boolean rangeCheck(int index) {\n\t\tif (index >= 0 && index <= 7) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean check(int[] arr){\n\t\t\n\t\tint i,max=Integer.MIN_VALUE,min=Integer.MAX_VALUE;\n\t\tfor(i=0;i< arr.length;i++){\n\t\t\tif(arr[i]>max){\n\t\t\t\tmax=arr[i];\n\t\t\t}\n\t\t\tif(arr[i] < min){\n\t\t\t\tmin = arr[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(max-min+1 != arr.length){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor(i=0;i<arr.length;i++){\n\t\t\tif(arr[Math.abs(arr[i])-min] < 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(arr[Math.abs(arr[i])-min] > 0){\n\t\t\t\tarr[Math.abs(arr[i])-min]= -arr[Math.abs(arr[i])-min]; \n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public void rangeCheck(int value) throws RangeException {\n\tSystem.out.println(\"In rangeCheck, value: \" + value);\n\tif (value < min || value > max) {\n\t throw new RangeException(min, max, value);\n\t}\n }", "private static void checkFromToBounds(int paramInt1, int paramInt2, int paramInt3) {\n/* 386 */ if (paramInt2 > paramInt3) {\n/* 387 */ throw new ArrayIndexOutOfBoundsException(\"origin(\" + paramInt2 + \") > fence(\" + paramInt3 + \")\");\n/* */ }\n/* */ \n/* 390 */ if (paramInt2 < 0) {\n/* 391 */ throw new ArrayIndexOutOfBoundsException(paramInt2);\n/* */ }\n/* 393 */ if (paramInt3 > paramInt1) {\n/* 394 */ throw new ArrayIndexOutOfBoundsException(paramInt3);\n/* */ }\n/* */ }", "public int bookInputRangeChecker(String input, int min, int max)\n {\n int num = bookInputIntChecker(input);\n while (num < min || num > max){\n System.out.println(num + \" is not in the allowed range, \" + min + \" - \" + max);\n num = bookInputIntChecker(input);\n }\n \n return num;\n }", "private boolean checkNumbers(int x, ReturnValue returnValue) {\n\t\tint localCheck = 0;\n\t\tint localPoints = 0;\n\t\tboolean localBool = false;\n\t\tfor (Integer i : intList) {\n\t\t\tif (i == x) {\n\t\t\t\tlocalCheck++;\n\t\t\t}\n\t\t}\n\t\tif (localCheck > 0) {\n\t\t\tlocalBool = true;\n\t\t\tlocalPoints = localCheck * x;\n\t\t}\n\t\treturnValue.setValue(localBool, localPoints, findBox(x));\n\t\treturn true;\n\t}", "private int inRange(int x, int y) {\n\t\tif (x > 3 && y > 3 && x < max_x - 3 && y < max_y - 3) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "static int check(int x, int a, int b) \n\t{ \n\t\t// sum of digits is 0 \n\t\tif (x == 0) \n\t\t{ \n\t\t\treturn 0; \n\t\t} \n\n\t\twhile (x > 0) \n\t\t{ \n\n\t\t\t// if any of digits in sum is \n\t\t\t// other than a and b \n\t\t\tif (x % 10 != a & x % 10 != b) \n\t\t\t{ \n\t\t\t\treturn 0; \n\t\t\t} \n\n\t\t\tx /= 10; \n\t\t} \n\n\t\treturn 1; \n\t}", "private boolean checkRange() {\n String notInRange = \"\"; //used for displaying error message\n \n double a = Double.valueOf(ampBox.getText());\n int d = Integer.valueOf(durBox.getText());\n int f = Integer.valueOf(freqBox.getText());\n int ow = Integer.valueOf(owBox.getText());\n \n if(a>8.128 || a<0) notInRange += \"Amplitude not in range [0mA,8.128mA]\\n\";\n if(d>423 || d<0) notInRange += \"Pulse duration not in range [0uS,423uS]\\n\";\n if(f>100 || f<0) notInRange += \"Frequency not in range [0Hz,100Hz]\\n\";\n if(ow>60 || ow<0) notInRange += \"ON-WAVE duration not in range [0sec,60sec]\\n\";\n \n if(notInRange.length()>0) {\n notInRange += \"\\nInput within proper ranges and try again\";\n JOptionPane.showMessageDialog(null, \n notInRange, \n \"Error\", JOptionPane.INFORMATION_MESSAGE);\n return false;\n }\n else {\n return true;\n }\n }", "@Test\n public void testIsInLimitLower() {\n Assertions.assertTrue(saab.isInLimit(.3, .9, .6));\n }", "@Override\n\tpublic boolean checkBoundary(float x) {\n\t\tif (!(x >= MINRANGE && x <= MAXRANGE)) {\n\t\t\treturn false;\n\t\t}\n\t\t// if in the range [-512.03, 511.97]\n\t\treturn true;\n\t}", "void checkRange(Long value) throws TdtTranslationException {\r\n\t\tif (hasRange) {\r\n\t\t\tif ((value.compareTo(minimum) < 0)\r\n\t\t\t\t\t|| (value.compareTo(maximum) > 0)) {\r\n\t\t\t\tthrow new TdtTranslationException(\"Value {\" + value\r\n\t\t\t\t\t\t+ \"} out of range [{\" + minimum + \"},{\" + maximum\r\n\t\t\t\t\t\t+ \"}] in field \" + getId());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32740L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.toString();\n Range range1 = Range.parseRange(\"[ 32740 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n range0.isSubRangeOf(range1);\n range1.equals(range0);\n range0.equals(\"[ 32740 .. 2147483646 ]/0B\");\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "private boolean checkRangeAddress(int address) {\r\n return (address >= startAddress && address < endAddress);\r\n }", "public boolean allInRange(int start, int end) {\n \t\tfor (int i=0; i<data.length; i++) {\n \t\t\tint a=data[i];\n \t\t\tif ((a<start)||(a>=end)) return false;\n \t\t}\n \t\treturn true;\n \t}", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n Range range0 = Range.of((-2147483648L));\n Range range1 = Range.of(1845L);\n boolean boolean0 = range0.isSubRangeOf(range1);\n assertFalse(boolean0);\n \n range0.getBegin();\n assertTrue(range0.isEmpty());\n }", "private boolean isInRange(int c) {\n switch (border) {\n case between:\n return min <= c && c <= max;\n case min:\n return min <= c;\n case max:\n return c <= max;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + border);\n }\n }", "public boolean isValid(int number)", "public static boolean between( int value, int min, int max ) {\n return value >= min && value <= max;\n }", "private static int getInRangeInt(Scanner scan, int min, int max) {\n int value = -9999;\n while (value < min || value > max) {\n System.out.println(\"Must be a integer between \" + min + \" and \" + max + \" : \");\n while (!scan.hasNextInt()) {\n System.out.println(\"Must be a integer between \" + min + \" and \" + max + \" : \");\n scan.next();\n }\n value = scan.nextInt();\n }\n return value;\n }", "@Test\n public void testGetRandomRange() {\n // XXX what should be tested?\n // bad values to the range?\n // min == max?\n Assert.assertTrue(true);\n }", "public boolean containsRange(Range range) {\n/* 317 */ if (range == null) {\n/* 318 */ return false;\n/* */ }\n/* 320 */ return (containsLong(range.getMinimumLong()) && containsLong(range.getMaximumLong()));\n/* */ }", "@Override\r\n public boolean checkElements(SequenceConstructionExpression owner) {\r\n SequenceRange self = this.getSelf();\r\n Expression rangeLower = self.getRangeLower();\r\n Expression rangeUpper = self.getRangeUpper();\r\n ElementReference rangeLowerType = rangeLower == null? null: rangeLower.getType();\r\n ElementReference rangeUpperType = rangeUpper == null? null: rangeUpper.getType();\r\n return (rangeLowerType == null || rangeLowerType.getImpl().isInteger()) && \r\n (rangeUpperType == null || rangeUpperType.getImpl().isInteger());\r\n }", "static boolean isNumberInRange(int playerValue, int minBarrier, int maxBarrier) {\n return playerValue > minBarrier && playerValue < maxBarrier;\n }", "private boolean checkRange(final int index) {\n if ((index > size) || (index < 0)) {\n return false;\n }\n return true;\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-2147483648L), 1146L);\n long long0 = range0.getBegin();\n assertEquals((-2147483648L), long0);\n \n boolean boolean0 = range0.equals(\"number of entries must be <= Integer.MAX_VALUE\");\n assertFalse(boolean0);\n \n Range range1 = Range.of((-2147483648L));\n List<Range> list0 = range1.complement(range0);\n assertEquals(0, list0.size());\n }", "private boolean acceptedValueRange(double amount){\n if(amount <= 1.0 && amount >= 0.0){\n return true;\n }\n else{\n throw new IllegalArgumentException(\"Number must be in range of [0,1]\");\n }\n }", "private void inRange(String[] arguments) {\n\t\ttry { \n\t int IDLow = Integer.parseInt(arguments[1]);\n\t int IDHigh = Integer.parseInt(arguments[2]);\n\t totalInRangeCount = 0;\n\t countInRange(root, IDLow, IDHigh);\n\t System.out.printf(\"%d\\n\",totalInRangeCount);\n\t } catch(NumberFormatException e) { \n\t System.out.println(\"Argument not an Integer\");; \n\t }\n\t\t\n\t}", "private boolean minValid(int min, int max) {\n\n boolean isValid = true;\n\n if (min <= 0 || min >= max) {\n isValid = false;\n AlartMessage.displayAlertAdd(3);\n }\n\n return isValid;\n }", "@Test\n public void testMinMaxNumber() {\n NumberValue minNumber = factory.getMinNumber();\n NumberValue maxNumber = factory.getMaxNumber();\n MatcherAssert.assertThat(minNumber + \" < \" + maxNumber, minNumber.compareTo(maxNumber), lessThan(0));\n }", "public static void main(String[] args) {\n\n\t\tint [] numbers = {1,2,3,4,5,6,7,8,9,10};\n\n\t\tint Startrange = 3;\n\t\tint Endrange = 7;\n\n\t\tfor(int i = 0; i < numbers.length; ++i) {\n\n\t\t\tif (!(numbers[i] > Startrange && numbers[i] < Endrange )){\n\t\t\t\tSystem.out.print(numbers[i] + \" \");\n\t\t\t}\t\n\n\t\t}\n\n\t}", "public static void checkRangeOfNumbers(int number, int lowestValue, int highestValue) throws NumberNotInRangeException {\n \n if(number<lowestValue || number>highestValue) throw new NumberNotInRangeException(\"Number is not in range, Lowest=\"+lowestValue+\" < Number=\"+number+\" < Highest=\"+highestValue);\n }", "public boolean nearHundred(int n) {\n return (Math.abs(n - 100) <= 10 || Math.abs(n - 200) <= 10);\n}", "public boolean inRange(int row, int col) {\n\t /*if the given row and col is less than 0 or greater than the maximum number, return false*/\n\t if(row < 0 || row >= this.row || col < 0 || col >= this.col) {\n\t\t return false;\n\t }\n\t /*return true if it's valid*/\n\t else {\n\t\t return true;\n\t }\n }", "public boolean checkNumber() {\n\t\treturn true;\n\t}", "public static boolean validate(int[] numbers) {\r\n\t\tfor (int i = 0; i < numbers.length - 1; i++) {\r\n\t\t\tif (numbers[i] > numbers[i + 1]) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private int validateNumber(int data, int defaultValue, int minValue, int maxValue)\n {\n return (data < minValue || data > maxValue) ? defaultValue : data;\n }", "public boolean isInteger(int min, int max){\n if(!isInteger()){\n return false;\n } \n //Tomo el valor del campo y lo paso a un entero\n int valor=Integer.parseInt(txt.getText());\n \n if(valor >=min && valor <= max){\n return true;\n }\n return error(\"El valor debe estra comprendido entre \"+min+\" y \"+max+\" !!\");\n }", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n Range range0 = Range.of((-2147483660L));\n assertFalse(range0.isEmpty());\n }", "@Test\n\tpublic void seperateRangeTest() {\n\n\t\tsetup();\n\t\tSystem.out.println(\"seperate range test\");\n\t\tZipCodeRange z1 = new ZipCodeRange(new ZipCode(94133), new ZipCode(94133));\n\t\tZipCodeRange z2 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94299));\n\t\tZipCodeRange z3 = new ZipCodeRange(new ZipCode(94600), new ZipCode(94699));\n\n\t\t// Testing\n\t\tZipRangeControl zrc = new ZipRangeControl();\n\t\tzrc.processNewRange(z1);\n\t\tzrc.processNewRange(z2);\n\t\tzrc.processNewRange(z3);\n\n\t\tZipCodeRange z4 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94399));\n\t\trequiredList.add(z1);\n\t\trequiredList.add(z2);\n\t\trequiredList.add(z3);\n\n\t\tZipCodeRange[] ziparray = new ZipCodeRange[requiredList.size()];\n\t\tList<ZipCodeRange> zlist = zrc.getFinalZipRanges();\n\n\t\tfor (int i = 0; i < requiredList.size(); i++) {\n\t\t\tAssert.assertThat(\"Lower Limit match failed at entry\" + i, requiredList.get(i).lower.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).lower.zipcode));\n\t\t\tAssert.assertThat(\"Upper Limit match failed at entry\" + i, requiredList.get(i).upper.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).upper.zipcode));\n\t\t}\n\t\tclimax();\n\n\t}", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n Range.Builder range_Builder1 = new Range.Builder(0L);\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n range_Builder0.shift(243L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n long long0 = 127L;\n Range range1 = Range.of((-636L), 127L);\n range1.isSubRangeOf(range0);\n // Undeclared exception!\n try { \n Range.parseRange(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "public void tensionRangeCheck(){\n if(motor.get() < 0){\n if(Bottom_Limit_Switch.get() | tenPot.pidGet()> tenPotMAX ){\n motor.set(0.0);\n }\n }else if(motor.get() > 0){\n if(Top_Limit_Switch.get() | tenPot.pidGet()< tenPotMIN){\n motor.set(0.0);\n }\n }\n }", "public static boolean isValueRange(int value, int min, int max) throws Exception {\r\n\t\t//Checks the Case:\r\n\t\tif (value >= min && value <= max) {\r\n\t\t\t//Returns Value:\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\telse {\r\n\t\t\t//Returns Value:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n Range range0 = Range.of((-1259L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n range1.getEnd();\n range1.getEnd();\n Range range2 = Range.of((-1259L), 255L);\n List<Range> list0 = range2.split(255L);\n range2.complementFrom(list0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range3 = Range.of(range_CoordinateSystem1, (-1259L), 0L);\n range3.endsBefore(range0);\n range2.getEnd(range_CoordinateSystem1);\n // Undeclared exception!\n try { \n Range.parseRange(\"[ -1259 .. 256 ]/SB\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "private static boolean checkTaskBounds(int task) {\r\n\t\t\tboolean isInBound;\r\n\t\t\t\r\n\t\t\tif ((task < 0) || (task > 7)) {\r\n\t\t\t\t//isInBound = false;\r\n\t\t\t\tif (task == -1) {\r\n\t\t\t\t\tisInBound = true;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tisInBound = false;\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tisInBound = true;\r\n\t\t\t}\r\n\t\t\treturn isInBound;\r\n\t\t}", "private boolean isValidSeam(int[] a, int len, int range)\n {\n if (a.length != len || a[0] < 0 || a[0] > range)\n return false;\n for (int i = 1; i < len; i++)\n {\n if (a[i] < Math.max(0, a[i-1] -1) || a[i] > Math.min(range, a[i-1] +1))\n return false;\n }\n return true;\n }", "public void testRanges() throws Exception {\n int num = atLeast(1000);\n for (int i = 0; i < num; i++) {\n BytesRef lowerVal = new BytesRef(TestUtil.randomUnicodeString(random()));\n BytesRef upperVal = new BytesRef(TestUtil.randomUnicodeString(random()));\n if (upperVal.compareTo(lowerVal) < 0) {\n assertSame(upperVal, lowerVal, random().nextBoolean(), random().nextBoolean());\n } else {\n assertSame(lowerVal, upperVal, random().nextBoolean(), random().nextBoolean());\n }\n }\n }", "private boolean valid_numbers(String nr)\n\t{\n\t\t// loop through the string, char by char\n\t\tfor(int i = 0; i < nr.length();i++)\n\t\t{\n\t\t\t// if the char is not a numeric value or negative\n\t\t\tif(Character.getNumericValue(nr.charAt(i)) < 0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// if it did not return false in the loop, return true\n\t\treturn true;\n\t}", "public boolean checkAcross() {\r\n\t\tif (p1[0] + p1[1] + p1[2] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p1[3] + p1[4] + p1[5] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p1[6] + p1[7] + p1[8] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p2[0] + p2[1] + p2[2] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p2[3] + p2[4] + p2[5] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p2[6] + p2[7] + p2[8] == 15)\r\n\t\t\treturn true;\r\n\r\n\t\treturn false;\r\n\t}", "@Test(timeout = 4000)\n public void test078() throws Throwable {\n Range range0 = Range.of((-2147483648L));\n boolean boolean0 = range0.equals(range0);\n assertTrue(boolean0);\n assertFalse(range0.isEmpty());\n }", "public boolean overlapsRange(Range range) {\n/* 334 */ if (range == null) {\n/* 335 */ return false;\n/* */ }\n/* 337 */ return (range.containsLong(this.min) || range.containsLong(this.max) || containsLong(range.getMinimumLong()));\n/* */ }", "private boolean between(int x1, int x2, int x3) {\n return (x1 >= x3 && x1 <= x2) || (x1 <= x3 && x1 >= x2);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n Range range0 = Range.of((-81L));\n Range range1 = Range.of((-1L));\n boolean boolean0 = range0.equals(range1);\n assertFalse(boolean0);\n \n Range.Comparators.values();\n long long0 = range0.getBegin();\n assertEquals((-81L), long0);\n \n List<Range> list0 = range1.complement(range0);\n assertFalse(range1.isEmpty());\n assertTrue(list0.contains(range1));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Range range0 = Range.of((-1264L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1264L));\n range1.getEnd();\n range1.getEnd();\n List<Range> list0 = range1.split(255L);\n range0.complementFrom(list0);\n Range range2 = Range.of(range_CoordinateSystem0, (-1264L), 0L);\n range2.endsBefore(range0);\n Long.max((-1264L), (-3100L));\n range1.equals(range0);\n Range.Comparators.values();\n range1.getEnd();\n range0.getEnd(range_CoordinateSystem0);\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = null;\n try {\n range_Builder1 = new Range.Builder(range_CoordinateSystem0, 255L, 248L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "public static boolean inRange(int value, int min, int max){\n if ((value >= min) && (value <= max))\n return true;\n return false;\n }", "public static void main(String[] args) {\n\t\tScanner scnr = new Scanner(System.in);\n\t\tint firstNum;\n\t\tint secondNum;\n\t\tint thirdNum;\n\t\tint lowEnd;\n\t\tint highEnd;\n\t\t\n\t\tSystem.out.println(\"Enter a number: \");\n\t\tfirstNum = scnr.nextInt();\n\t\t\n\t\tSystem.out.println(\"Enter another number: \");\n\t\tsecondNum = scnr.nextInt();\n\t\tif (firstNum < secondNum) {\n\t\t\tlowEnd = firstNum;\n\t\t\thighEnd = secondNum;\n\t\t} else {\n\t\t\tlowEnd = secondNum;\n\t\t\thighEnd = firstNum;\n\t\t}\n\t\tSystem.out.println(\"Your range is \" + lowEnd + \"-\" + highEnd + \".\");\n\t\tSystem.out.println(\"Enter a number for verification: \");\n\t\tthirdNum = scnr.nextInt();\n\t\t\n\t\tif (thirdNum >= lowEnd && thirdNum <= highEnd) {\n\t\t\tSystem.out.println(thirdNum + \" is in the range.\");\n\t\t} else {\n\t\t\tSystem.out.println(thirdNum + \" is outside the range.\");\n\t\t}\n\t\t\n\t\tscnr.close();\n\t}", "@SuppressWarnings(\"unused\")\n public static boolean withinRange(float value, float startValue, float endValue) {\n return value == ScWidget.valueRangeLimit(value, startValue, endValue);\n }", "private void addRangeIntegers() {\r\n ent_2_i.put(\"< 0\", -1); ent_2_i.put(\"== 0\", 0); ent_2_i.put(\"== 1\", 1); ent_2_i.put(\"< 10\", 10);\r\n ent_2_i.put(\"< 100\", 100); ent_2_i.put(\"< 1K\", 1000); ent_2_i.put(\"< 10K\", 10000); ent_2_i.put(\"< 100K\", 100000);\r\n ent_2_i.put(\"> 100K\", 1000000);\r\n }", "public boolean isInsideLimits(int value) {\n return value > lowerLimit && value < upperLimit;\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Range range0 = Range.of((-1259L));\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n long long0 = new Long((-1259L));\n range1.getEnd();\n Range range2 = range0.intersection(range1);\n List<Range> list0 = range2.split(255L);\n range2.complementFrom(list0);\n Range range3 = range1.asRange();\n String string0 = null;\n range3.intersection(range1);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range2.getEnd(range_CoordinateSystem1);\n // Undeclared exception!\n try { \n Range.parseRange(\"[ -1259 .. -1258 ]/SB\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse [ -1259 .. -1258 ]/SB into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "private boolean validMin(int min, int max) {\r\n\r\n boolean isTrue = true;\r\n\r\n if (min <= 0 || min >= max) {\r\n isTrue = false;\r\n alertDisplay(3);\r\n }\r\n\r\n return isTrue;\r\n }", "@Override\n public boolean validate(long number) {\n List<Integer> digits = split(number);\n int multiplier = 1;\n int sum = 0;\n for (int digit : Lists.reverse(digits)) {\n int product = multiplier * digit;\n sum += product / BASE + product % BASE;\n multiplier = 3 - multiplier;\n }\n return sum % BASE == 0;\n }", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32740L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.toString();\n Range range1 = Range.parseRange(\"[ 32740 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n range1.startsBefore(range0);\n range1.equals(range0);\n range0.equals(\"[ 32740 .. 2147483646 ]/0B\");\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "private void checkValues(int yMin2, int yMax2, List<XYValue> listOfValues2) {\n\t\tif(yMin2 < 0) {\n\t\t\tthrow new IllegalArgumentException(\"Number can not be negative!\");\n\t\t}\n\t\tif(yMax2 <= yMin2) {\n\t\t\tthrow new IllegalArgumentException(\"Max has to be greater than min!\");\n\t\t}\n\t\tfor(XYValue value : listOfValues2) {\n\t\t\tif(value.getY() < yMin2) {\n\t\t\t\tthrow new IllegalArgumentException(\"Found smaller y than minimum!\");\n\t\t\t}\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test00() throws Throwable {\n Range.Comparators.values();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range.of(range_CoordinateSystem0, (-5250L), 2383L);\n // Undeclared exception!\n try { \n Range.parseRange(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Range range0 = Range.of((-1264L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1264L));\n range1.getEnd();\n range1.getEnd();\n List<Range> list0 = range1.split(255L);\n range0.complementFrom(list0);\n Range range2 = Range.of(range_CoordinateSystem0, (-1264L), 0L);\n range2.endsBefore(range0);\n Long.max((-1264L), (-3100L));\n range1.equals(range0);\n Range.Comparators.values();\n range1.getEnd();\n long long0 = new Long(0L);\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = new Range.Builder(range_CoordinateSystem0, 255L, 259L);\n Range range3 = Range.of(1L);\n Range range4 = Range.of((-32768L), 0L);\n range4.equals(range2);\n range0.complement(range3);\n Range range5 = range_Builder1.build();\n assertFalse(range5.equals((Object)range4));\n }", "@Test(timeout = 4000)\n public void test047() throws Throwable {\n Range range0 = Range.ofLength(0L);\n String string0 = range0.toString();\n assertEquals(\"[ 0 .. -1 ]/0B\", string0);\n \n Object object0 = new Object();\n boolean boolean0 = range0.isSubRangeOf(range0);\n assertTrue(boolean0);\n }", "public static int checkMinMax(int value, String name, int minValue, int maxValue)\r\n\t\tthrows NumberOutOfRangeException\r\n\t{\r\n\t\tif (value < minValue || value > maxValue) throw new NumberOutOfRangeException(name, value, minValue, maxValue);\r\n\t\treturn value;\r\n\t}", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32729L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.toString();\n Range range1 = Range.parseRange(\"[ 32729 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n range1.equals(range0);\n Range.CoordinateSystem.values();\n Range.Comparators[] range_ComparatorsArray0 = Range.Comparators.values();\n assertEquals(4, range_ComparatorsArray0.length);\n }", "public boolean validateNummer() {\n\t\treturn (nummer >= 10000 && nummer <= 99999 && nummer % 2 != 0); //return true==1 oder false==0\n\t}", "private void validationInt(List<Integer> list) {\n\t\tint i=0;\n\t\tfor(i=0;i<list.size();i++) {\n\t\t\tif(!(list.get(i) > 0)){\n\t\t\t\tthrow new IntValueLessOneException(list.get(i));\n\t\t\t}\n\t\t}\n\t}", "public boolean check_func(int [] land, int x, int y)\n\t{\n\t\tif ((land[0] < x && land[2] > x\n\t\t\t& (land[1] < y && land[3] > y)))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}", "public static void verifyInterval(double lower, double upper)\r\n/* 145: */ {\r\n/* 146:336 */ if (lower >= upper) {\r\n/* 147:337 */ throw new NumberIsTooLargeException(LocalizedFormats.ENDPOINTS_NOT_AN_INTERVAL, Double.valueOf(lower), Double.valueOf(upper), false);\r\n/* 148: */ }\r\n/* 149: */ }", "private boolean contains(int from1, int to1, int from2, int to2) {\n\t\treturn from2 >= from1 && to2 <= to1;\n\t}", "private boolean isValid() {\n // If start is greater or equal to end then it's invalid\n return !(start.compareTo(end) >= 0);\n }", "public boolean in3050(int a, int b) {\n return ((a >= 30 && a <= 40) && (b >= 30 && b <= 40)) ||\n ((a >= 40 && a <= 50) && (b >= 40 && b <= 50));\n}", "public static <T extends Comparable<T>> boolean inRange(T val, T min, T max) {\n\t\tif(val.compareTo(min) >= 0 && val.compareTo(max) <= 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "private boolean isInBound(int current, int bound){\n return (current >= 0 && current < bound);\n }", "private boolean checkConnection(int x1, int x2) {\n\t\treturn (xStartValue <= x1 && xEndValue >= x1) || (xStartValue <= x2 && xEndValue >= x2) ||\n\t\t\t\t(x1 <= xStartValue && x2 >= xStartValue) || (x1 <= xEndValue && x2 >= xEndValue);\n\t\t\n\t}", "public static boolean numberIsBetween(int number, int min, int max) {\n\t\treturn max(number, min) == min(number, max);\n\t}", "private boolean RANGE(char first, char last) {\r\n if (in >= input.length()) return false;\r\n int len = input.nextLength(in);\r\n int code = input.nextChar(in, len);\r\n if (code < first || code > last) return false;\r\n in += len;\r\n return true;\r\n }" ]
[ "0.7844707", "0.7539124", "0.720621", "0.6986465", "0.6913385", "0.6866213", "0.6769316", "0.6653419", "0.66519386", "0.6636691", "0.6613266", "0.65697116", "0.655172", "0.654876", "0.6535026", "0.6534162", "0.64891714", "0.64778656", "0.64306474", "0.642422", "0.63916165", "0.6390319", "0.6382547", "0.63798946", "0.6376637", "0.6356281", "0.6339269", "0.63248736", "0.63037187", "0.6296209", "0.6295051", "0.6290672", "0.628746", "0.62804234", "0.62783134", "0.6264463", "0.6260927", "0.6241844", "0.62208706", "0.6218543", "0.6207216", "0.6195622", "0.61885333", "0.61819464", "0.61768377", "0.6170034", "0.61669326", "0.61570776", "0.61518687", "0.6145476", "0.6129176", "0.6119181", "0.61178267", "0.61161417", "0.6114102", "0.6099975", "0.6098131", "0.60910225", "0.6079989", "0.6074843", "0.607066", "0.6067369", "0.6064787", "0.606315", "0.6062969", "0.60594356", "0.60552377", "0.6052683", "0.6045904", "0.6037213", "0.6034403", "0.6033074", "0.60307014", "0.60126007", "0.60090625", "0.6008783", "0.59982884", "0.59970564", "0.5994384", "0.59910333", "0.5984285", "0.59785944", "0.59768736", "0.5962765", "0.5958636", "0.59399384", "0.59316355", "0.5924953", "0.5919416", "0.5918111", "0.59117526", "0.59077436", "0.5906814", "0.58779794", "0.5867923", "0.5863374", "0.5862643", "0.5861568", "0.58584607", "0.5850499", "0.58501625" ]
0.0
-1
Generates order that will be seen in specified time.
public Order generateAt(int time);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static final LocalTime generateOrderTime() {\n return LocalTime.MIN.plusSeconds(RANDOM.nextLong());\n }", "public LabOrder generateOrder() {\n LabOrder order = new LabOrder();\n Random r = new Random();\n Date date = getDate(r);\n order.insertts = date; //randbetween 1388534400 <-> 1420070400\n order.ordernr = \"O\" + r.nextInt();\n order.patientnr = \"P\" + r.nextInt(10000); //1 mil / 100 = 10 000\n order.visitNr = \"V\" + r.nextInt(); //unique;\n order.specimens.add(generateSpecimen(order));\n order.specimens.add(generateSpecimen(order));\n return order;\n }", "public void timeLogic(int time){\n //Add logic to decide time increments at which tickets will be granted\n }", "List<SellOrder> findAscPendingOrdersByPriceTime(Date toTime, BigMoney price, OrderBookId orderBookId, int size);", "public void sortEventsByTime() {\n for (OrgEvent event : events) {\n event.setCompareByTime(true);\n }\n Collections.sort(events);\n }", "public Date getOrderTime();", "public void setOrdertime(Date ordertime) {\n this.ordertime = ordertime;\n }", "public void setOrderTime(Date orderTime) {\n this.orderTime = orderTime;\n }", "@Override\n public long generateNewTimeToNextContract() {\n return new Random().nextInt(5);\n }", "public void orderDay(int day){\r\n Node last = head; // istenen gunun basini bul\r\n Node sabit = null;\r\n ExperimentList temp = new ExperimentList();\r\n while( last.next != null ){\r\n if( last.next.data.day == day ){\r\n sabit = last;\r\n while( last.next.data.day == day){\r\n temp.addExp(last.next.data);\r\n last = last.next;\r\n if( last.next == null){\r\n break;\r\n }\r\n }\r\n break;\r\n }\r\n last = last.next;\r\n }\r\n ExperimentList ordered = temp.orderExperiments(); // istenilen parcayi orderExperiment le sirala.\r\n sabit.next = ordered.head; // sonra listeye bagla.\r\n Node last2 = ordered.head;\r\n while( last2.next != null ){\r\n last2 = last2.next;\r\n }\r\n last2.next = last.next;\r\n }", "double getSortTime();", "public Order generateNext();", "public Timestamp getDateOrdered();", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int orders = Integer.parseInt(in.nextLine());\n List<Node> rst = new ArrayList<Node>();\n for (int i = 1; i <= orders; i++) {\n String[] inputs = in.nextLine().split(\"\\\\s+\");\n int startTime = Integer.parseInt(inputs[0]);\n int duration = Integer.parseInt(inputs[1]);\n rst.add(new Node(i, startTime + duration));\n }\n Collections.sort(rst, new NodeComparator());\n for (Node node : rst) {\n System.out.print(node.index + \" \");\n }\n System.out.println(\"\");\n }", "@RequestMapping(value=\"/orderentry/time/{orderTime}\", method= RequestMethod.GET)\n\t@Produces(MediaType.APPLICATION_JSON)\n\t@ApiOperation(value = \"Get Order Entries based on time submitted\")\n\t@ApiResponses(value = {\n\t\t\t@ApiResponse(code = 200, message = \"Ok\"),\n\t\t\t@ApiResponse(code = 400, message = \"Bad / Invalid input\"),\n\t\t\t@ApiResponse(code = 401, message = \"Authorization failed\"),\n\t\t\t@ApiResponse(code = 404, message = \"Resource not found\"),\n\t\t\t@ApiResponse(code = 500, message = \"Server error\"),\n\t})\n\tpublic List<OrderEntry> getOrderEntriesByTime(\n\t\t\t@PathVariable(\"orderTime\") @ApiParam(\"time and date of order\") final Date orderTime) {\n\t\t\n\t\tList<OrderEntry> orderEntryList = orderEntryService.getOrderEntriesByTime(orderTime);\n\t\treturn orderEntryList;\n\t}", "@Override\n\tpublic void takeNewOrder() {\n\t\tif(customersInLine.size()>0&&wait==0){\n\t\t\tint customerSelectedIndex = 0;\n\t\t\tfor(int i=0; i<customersInLine.size(); i++){\n\t\t\t\tif(customersInLine.get(i).getTimeToPrepare()<customersInLine.get(customerSelectedIndex).getTimeToPrepare()){\n\t\t\t\t\tcustomerSelectedIndex = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetWait(customersInLine.get(customerSelectedIndex).getTimeToPrepare());\n\t\t\taddToProfit(customersInLine.get(customerSelectedIndex).getCostOfOrder());\n\t\t\tcustomersInLine.remove(customerSelectedIndex);\n\t\t\tcustomersInRestaurant--;\n\t\t}\n\t}", "@Override\r\n public LocalDateTime bake_350degrees(LocalDateTime time) {\r\n System.out.println(\"Baking \"+quantity+\" batch(es) of cookies\");\r\n for(int count = 1; count <= quantity; count++) {\r\n \t time = time.plusMinutes(20);\r\n }\r\n return time;\r\n }", "public static int checkPreparationTime() {\n\t\tint time = 0;\n\n\t\tfor (Integer i : order) {\n\t\t\tint currentOrderTime = Menu.getDishPreparationTime(i);\n\n\t\t\ttime = time + currentOrderTime;\n\t\t}\n\t\treturn time;\n\t}", "private int generateOrderId(String date) throws FlooringMasteryPersistenceException{\n \n return 0;\n \n }", "private void handleOrders()\r\n {\r\n // only 4 orders can fit on the screen, so don't do anything if there's already 4\r\n if (orders.size() < 4)\r\n {\r\n orderTimer--;\r\n \r\n if (orderTimer <= 0)\r\n {\r\n // create a new order\r\n Order nextOrder = new Order();\r\n orders.add(nextOrder);\r\n \r\n // find the position\r\n int xPos = 170 * orders.size() + 70;\r\n addObject(nextOrder, xPos, 100);\r\n \r\n // reset the order timer to a new value (between base time - variance & base time + variance)\r\n int baseFrameDelay = calcOrderDelay();\r\n int maxDelay = baseFrameDelay + orderVariance;\r\n int minDelay = baseFrameDelay - orderVariance;\r\n orderTimer = Greenfoot.getRandomNumber(maxDelay - minDelay) + minDelay;\r\n }\r\n }\r\n }", "public int nextTimeAfter(int time)\n {\n if (time < 0)\n {\n throw new IllegalArgumentException(\"Method nextTimeAfter: Invalid time\");\n }\n\n int nt = -1;\n\n if(isActive())\n {\n if (!isRepeated())\n {\n if (this.time > time) nt = this.time;\n }\n else\n {\n if (start > time) nt = start;\n\n else if (time < end) {\n int prev = start;\n int next = start + repeat;\n while (next <= end - repeat)\n {\n if (time < next)\n {\n nt = next;\n break;\n }\n else\n {\n prev = next;\n next += repeat;\n }\n }\n }\n\n }\n\n }\n\n return nt;\n }", "SortedSet<Recipe> findRecipesByCookingTime(int fromTime, int toTime) throws ServiceFailureException;", "public long getSortTime(){ \n return endTime - startTime;\n }", "static <T> void addTimeOrdered(List<T> source, TimestampSelector<T> selector, T toAdd) {\n int index = source.size() - 1;\n long timeToAdd = selector.select(toAdd);\n long last = selector.select(source.get(index));\n\n if(timeToAdd < last) {\n while(index > 0) {\n if(timeToAdd < last) {\n index--;\n last = selector.select(source.get(index));\n } else {\n index++;\n break;\n }\n }\n source.add(index, toAdd);\n } else {\n source.add(++index, toAdd);\n }\n }", "Order(int t, int l) {\n this.t = t;\n this.l = l;\n }", "public int getOrder_time()\n\t{\n\t\treturn order_time;\n\t}", "LinkedHashMap<Long, Driver> getDriversForOrder(Long time, OrderDTO orderDTO);", "public void queryOrder(){\n\t\ttry{\n\t\t\tlock.lock();\n\t\t\tSystem.out.println(Thread.currentThread().getName()+\"查询到数据:\"+System.currentTimeMillis());\n\t\t\tThread.sleep(2000);\n\t\t}catch( Exception e){\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\tlock.unlock();\n\t\t}\n\t}", "public void next( long time );", "@Override\n\tpublic int compareTo(Time t) {\n\t\tif (this.getIndex() < t.getIndex())\n\t\t\treturn 1;\n\t\telse if (this.getIndex() == t.getIndex())\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn -1;\n\t}", "public void addOccurence(final int time) {\n\t\t\toccurences.add(time);\n\t\t}", "public List<Stop> getListStopByMoreTime(Date time){\n List<Stop> items = null;\n Session session = beanHibernateUtil.getSession();\n try {\n session.beginTransaction();\n Criteria criteria = session.createCriteria(Stop.class);\n criteria.add(Restrictions.gt(\"arrivalTime\",time.getTime()-2*60*60000));//lay du lieu tu 16h hom trc toi 18h sau tranh luc giao ke hoạch 18h bi thieu 1 stop\n criteria.addOrder(Order.asc(\"arrivalTime\"));//de chuan thi phai ket hop dc ca du lieu arrivalTime va departureTime cong lai moi het dc cac truong hop\n items = criteria.list();\n session.getTransaction().commit();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n beanHibernateUtil.closeSession(session);\n }\n\n return items;\n }", "private void makeRouteMap(List<Order> orders, RouteRep routeRep) {\n orders.sort(comparing(Order::getPickUpTime));\n makeOrders(orders, routeRep, new ArrayList<>(), null);\n }", "@Override\n public long getTimeBucket(long time)\n {\n if (time < start) {\n return -1;\n }\n long diffFromStart = time - fixedStart;\n long key = diffFromStart / bucketSpanMillis;\n if (time >= end) {\n long diffInBuckets = (time - end) / bucketSpanMillis;\n long move = (diffInBuckets + 1) * bucketSpanMillis;\n start += move;\n end += move;\n // trigger purge when lower bound changes\n triggerPurge = (move > 0);\n if (triggerPurge) {\n lowestPurgeableTimeBucket = ((start - fixedStart) / bucketSpanMillis) - 2;\n }\n }\n return key;\n\n }", "public static void main(String[] args) {\n\t\tint arr[] = {20,35,-15,-15,7,55,1,-22};\n//\t\tint arr[] = {7,4,8,2};\n\n\t\tTimestamp timestamp = new Timestamp(System.currentTimeMillis());\n System.out.println(timestamp);\n\t\tfor(int gap = arr.length/2 ; gap >0 ; gap = gap/2)\n\t\t{\n\n\t\t\tfor(int i = gap ; i < arr.length;i++)\n\t\t\t{\n\t\t\t\tint key = arr[i];\n\t\t\t\tint j = i;\n\n\n\t\t\t\twhile(j>= gap && arr[j- gap] > key)\n\t\t\t\t{\n\t\t\t\t\tarr[j] = arr[j - gap];\n\t\t\t\t\tj = j- gap;\n\t\t\t\t}\n\t\t\t\tarr[j] = key;\n\t\t\t}\n\n\t\t}\n\t\tTimestamp timestamp1 = new Timestamp(System.currentTimeMillis());\n System.out.println(timestamp1);\n\t\t\n\t\tprint(arr);\n\t}", "public synchronized int setArrivalTime(){\n\t\t return random.nextInt((30-1)+1)+1;\n\n\t}", "private void insertTimeTask(TaskInfo pTaskInfo) {\n\t\t// inserted into list in time order\r\n\t\t//\r\n\t\tif (m_pTaskList == null) {\r\n\t\t\tpTaskInfo.pNext = null;\r\n\t\t\tm_pTaskList = pTaskInfo;\r\n\t\t} else if (m_pTaskList.time.next > pTaskInfo.time.next) {\r\n\t\t\tpTaskInfo.pNext = m_pTaskList;\r\n\t\t\tm_pTaskList = pTaskInfo;\r\n\t\t} else {\r\n\t\t\tTaskInfo pInfo = m_pTaskList;\r\n\t\t\twhile (pInfo != null) {\r\n\t\t\t\tif (pInfo.pNext == null) {\r\n\t\t\t\t\tpTaskInfo.pNext = null;\r\n\t\t\t\t\tpInfo.pNext = pTaskInfo;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else if (pInfo.pNext.time.next > pTaskInfo.time.next) {\r\n\t\t\t\t\tpTaskInfo.pNext = pInfo.pNext;\r\n\t\t\t\t\tpInfo.pNext = pTaskInfo;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tpInfo = pInfo.pNext;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void generateTimes() {\n\n\t\tLocalTime currentTime = PropertiesConfig.getMorningSessionBegin();\n\t\tfor (Talk talk : morningSession.getTalks()) {\n\t\t\ttalk.setTime(currentTime);\n\t\t\tcurrentTime = currentTime.plusMinutes(talk.getLength());\n\t\t}\n\n\t\tTalk lunch = new Talk(PropertiesConfig.LUNCH_TITLE);\n\t\tlunch.setTime(PropertiesConfig.getLunchBegin());\n\t\tlunchSession.addTalk(lunch);\n\n\t\tcurrentTime = PropertiesConfig.getAfternoonSessionBegin();\n\t\tfor (Talk talk : afternoonSession.getTalks()) {\n\t\t\ttalk.setTime(currentTime);\n\t\t\tcurrentTime = currentTime.plusMinutes(talk.getLength());\n\t\t}\n\n\t\tTalk meetEvent = new Talk(PropertiesConfig.MEET_EVENT_TITLE);\n\t\tmeetEvent.setTime(currentTime);\n\t\tmeetSession.addTalk(meetEvent);\n\t}", "public void addTime(long time)\r\n {\r\n listOfTimes.add(time);\r\n }", "private void addTimeEntryCache(TimeEntry timeEntry)\n {\n synchronized(timeEntries)\n {\n // insert entry into list\n int index = 0;\n while (index < timeEntries.size())\n {\n SoftReference<TimeEntry> softReference = timeEntries.get(index);\n if ((softReference != null) && softReference.get().spentOn.isBefore(timeEntry.spentOn))\n {\n break;\n }\n index++;\n }\n timeEntries.add(index,new SoftReference<TimeEntry>(timeEntry));\n }\n }", "private static List<ControllerRegistration> preventTemporalCoupling(Set<ControllerRegistration> deterministicOrder) {\n List<ControllerRegistration> randomOrder = new ArrayList<>(deterministicOrder);\n Collections.shuffle(randomOrder);\n return randomOrder;\n }", "private PointInTime findTime(float time) {\n for (int i=0;i<keyframes.size();i++){\n if (((PointInTime)keyframes.get(i)).time==time)\n return (PointInTime) keyframes.get(i);\n if (((PointInTime)keyframes.get(i)).time>time){\n PointInTime t=new PointInTime(time);\n keyframes.add(i,t);\n return t;\n }\n }\n PointInTime t=new PointInTime(time);\n keyframes.add(t);\n return t;\n }", "public Date getOrderTime() {\n return orderTime;\n }", "private void generatePopularHours() {\r\n double h = Math.random() * 10;\r\n String hrs = ((int)h) + \"\";\r\n }", "List<Share> findDistinctByUserOrderByCreateTimeDesc(User user);", "boolean hasOrderByDay();", "int order();", "List<RoutePoint> getRoutePointsForOrder(Order order);", "private void placeHour(OutOfOrderEntity outOfOrderEntity, int hourActual, int hourExpect ,String meridianState, WebElement meridianStateButton, WebElement incrementHourButton, WebElement decrementHourButton) {\n while(hourActual != hourExpect) {\n if(hourExpect > hourActual ) {\n if(!(meridianState.equals(outOfOrderEntity.getMeridian()))) {\n meridianState = outOfOrderEntity.getMeridian();\n meridianStateButton.click();\n incrementHourButton.click();\n hourActual++;\n }\n else {\n incrementHourButton.click();\n hourActual++;\n }\n }\n else {\n if(!(meridianState.equals(outOfOrderEntity.getMeridian()))) {\n meridianState = outOfOrderEntity.getMeridian();\n meridianStateButton.click();\n decrementHourButton.click();\n hourActual--;\n }\n else {\n decrementHourButton.click();\n hourActual--;\n }\n }\n }\n if(!(meridianState.equals(outOfOrderEntity.getMeridian()))) {\n meridianStateButton.click();\n }\n }", "public int compareTo(Showtime showtime) {\r\n\t\tint x = this.startTime.compareTo(showtime.startTime);\r\n\t\treturn x;\r\n\t}", "protected final void generateUsageHours() {\n //Create a treeset to store generated usage hours\n //Provide set with Timed event comparator to sort usage hours\n //according to start times\n usageHours = new TreeSet<ApplianceTimedEvent>(new TimedEventComparator());\n\n Random r = new Random();\n\n //Determine how many rules should be generated\n int numberOfRules = r.nextInt(maxNumberOfRules);\n\n\n\n //Generate rules\n for (int x = 0; x < numberOfRules; x++) {\n int useDuration = 1 + r.nextInt(duration); // at least 1 hour long\n int day = r.nextInt(7);\n Time usageStartTime = Time.random(new Time(earliestUsageStart, day), new Time(latestUsageStart, day));\n\n\n Time currentTime = universe.getUniverseTime();\n /*BUG FIX by Darius... The generated time was in the past so we need to make sure\n the new TimedEvent is in the future. I have added this code to adjust it therefore.*/\n if(usageStartTime.compare(currentTime) < 0){\n\n usageStartTime = new Time(usageStartTime.getCurrentHour(), usageStartTime.getCurrentDay());\n if(usageStartTime.compare(currentTime) < 0) usageStartTime = usageStartTime.advanceTime(new Time(0,0,1,0,0));\n }\n\n Time usageEndTime = usageStartTime.clone();\n\n usageEndTime = usageEndTime.advanceTime(new Time(useDuration, 0, 0, 0, 0));\n\n //Create timed event for usage hour\n ApplianceTimedEvent ate = new ApplianceTimedEvent(this,\n usageStartTime,\n usageEndTime,\n new ApplianceUseCommand(this),\n new Time(0, 1 + r.nextInt(6)) // random day repeat\n );\n \n //Randomly give usage hours a maximum number of runs value\n if(r.nextBoolean()) ate.setNumberOfRuns(r.nextInt(MAX_RUNS));\n //add to usage hours the generated appliance timed event\n usageHours.add(ate);\n }\n\n //If the number of rules to be generated was zero call method again\n if(usageHours.isEmpty()) generateUsageHours();\n\n }", "private void generateCheckInTimes() throws ParseException {\n \n int numToGen = (Integer)occurSpinner.getValue();\n SimpleDateFormat aSdf = Constants.CHECKIN_DATE_FORMAT;\n DefaultListModel theModel = (DefaultListModel)checkInTimeList.getModel();\n \n //Get the white listed times\n int startHour = (Integer)startHourSpinner.getValue();\n int startMinute = (Integer)startMinSpinner.getValue(); \n int endHour = (Integer)endHourSpinner.getValue(); \n int endMinute = (Integer)endMinSpinner.getValue(); \n \n //Convert to absolute times\n int startTime = startHour * 60 + startMinute;\n int endTime = endHour * 60 + endMinute;\n \n //Get the frequency\n TimeFreq freqObj = (TimeFreq)freqCombo.getSelectedItem();\n \n //Get the current date\n Calendar theCalendar = Calendar.getInstance();\n Date currentDate;\n if( theModel.isEmpty() ){\n currentDate = new Date();\n } else {\n String currentDateStr = (String)theModel.get( theModel.size() - 1 ); \n currentDate = Constants.CHECKIN_DATE_FORMAT.parse(currentDateStr);\n }\n \n //Set the time\n theCalendar.setTime( currentDate ); \n \n //If the freq is hourly then make sure the start time is after the current time\n int theFreq = freqObj.getType(); \n if( theFreq != TimeFreq.HOURLY ){\n \n //Calculate the range\n int range;\n if( endTime >= startTime ){\n\n range = endTime - startTime;\n\n } else {\n\n //If the start time is greater than the stop time then the range is\n //start to max and min to end\n range = maximumTime - startTime;\n range += endTime;\n\n }\n\n //Generate some dates\n for( int i = 0; i < numToGen; i++ ){\n\n //Get the random num\n float rand = aSR.nextFloat();\n int theRand = (int)(rand * range);\n\n //Get the new absolute time\n int newTime = theRand + startTime;\n if( newTime > maximumTime )\n newTime -= maximumTime;\n \n //Convert to hour and second\n int newHour = newTime / 60;\n int newMin = newTime % 60; \n\n //Everything but hourly\n theCalendar.set( Calendar.HOUR_OF_DAY, newHour);\n theCalendar.set( Calendar.MINUTE, newMin);\n theCalendar.add( theFreq, 1);\n \n //Add the time\n String aDate = aSdf.format( theCalendar.getTimeInMillis());\n theModel.addElement(aDate);\n }\n \n } else {\n \n int currHour = theCalendar.get( Calendar.HOUR_OF_DAY );\n int currSecond = theCalendar.get( Calendar.MINUTE );\n \n int currTime = currHour * 60 + currSecond;\n \n //Go to the next day\n //Generate some dates\n for( int i = 0; i < numToGen; i++ ){\n \n //Get the random num\n float rand = aSR.nextFloat();\n int theRand = (int)(rand * 30);\n\n if( currTime + 60 > endTime ){\n theCalendar.add( Calendar.DAY_OF_YEAR, 1);\n theCalendar.set( Calendar.HOUR_OF_DAY, startHour);\n theCalendar.set( Calendar.MINUTE, startMinute);\n } else {\n theCalendar.add( theFreq, 1); \n theCalendar.add( Calendar.MINUTE, theRand );\n }\n \n \n //Add the time\n String aDate = aSdf.format( theCalendar.getTimeInMillis());\n theModel.addElement(aDate);\n\n //Update time\n currHour = theCalendar.get( Calendar.HOUR_OF_DAY );\n currSecond = theCalendar.get( Calendar.MINUTE );\n currTime = currHour * 60 + currSecond;\n \n }\n } \n \n \n \n }", "void newOrder();", "private void timeSearch(ServerAccess sa, List<String> sports) {\r\n Collections.shuffle(sports);\r\n \r\n final long starttime = 1399986000; //13-5-2014 15:00:00\r\n final long endtime = 1431522000; //13-5-2015 15:00:00\r\n final long hourdif = 3600;\r\n final long daydif = 86400;\r\n final long weekdif = 7*daydif;\r\n \r\n final List<String> sports1 = new ArrayList<>();\r\n for (int i = 0; i < (int) Math.floor(sports.size() / 2); i++) {\r\n sports1.add(sports.get(i));\r\n }\r\n \r\n //Collections.reverse(sports1);\r\n firstSearch.add(false);\r\n final Runnable r1 = () -> timeSearchSports(1, sports1, sa, getAuth());\r\n \r\n \r\n final List<String> sports2 = new ArrayList<>();\r\n for (int i = (int) Math.floor(sports.size() / 2); i < sports.size(); i++) {\r\n sports2.add(sports.get(i));\r\n }\r\n //Collections.reverse(sports2);\r\n firstSearch.add(false);\r\n final Runnable r2 = () -> timeSearchSports(2, sports2, sa, getAuth2());\r\n \r\n final Thread t1 = new Thread(r1);\r\n final Thread t2 = new Thread(r2);\r\n t1.start();\r\n t2.start();\r\n \r\n try {\r\n t1.join();\r\n } catch (InterruptedException ex) {\r\n }\r\n try {\r\n t2.join();\r\n } catch (InterruptedException ex) {\r\n }\r\n \r\n storeRest();\r\n DBStore.getInstance().setDone();\r\n }", "private void generateNRandomTasks() {\n\t\tthis.averageServiceTime = 0;\n\t\tfor (int i = 1; i <= this.numberOfClients; i++) {\n\t\t\tRandom rand = new Random();\n\t\t\tint processingTime = 0;\n\t\t\tint arrivalTime = 0;\n\t\t\ttry {\n\t\t\t\tprocessingTime = rand.ints(minProcessingTime, maxProcessingTime).limit(1).findFirst().getAsInt();\n\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\tprocessingTime = minProcessingTime;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tarrivalTime = rand.ints(minArrivingTime, maxArrivingTime).limit(1).findFirst().getAsInt();\n\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\tarrivalTime = minArrivingTime;\n\t\t\t}\n\t\t\tTask task = new Task(arrivalTime, processingTime, i);\n\t\t\tgeneratedTasks.add(task);\n\t\t\taverageServiceTime += processingTime;\n\t\t}\n\t\t// sort tasks based on their arrival time\n\t\tCollections.sort(generatedTasks, new ArrivalTimeComparator());\n\t\taverageServiceTime /= this.numberOfClients;\n\t}", "private static void randomSim(PriorityQueue roomQueue, int totalTime, int roomNum) {\r\n\t\t//this will run a test with the user specified number of rooms\r\n\t\t//and random patient visits\r\n\t\t\r\n\t\tint currentTime = 0; //the current time in minutes - the number of minutes that have passed\r\n\t\tPriorityQueue arrivalQueue = new PriorityQueue<>(); // a queue to hold arriving patients\r\n\t\tPriorityQueue departureQueue = new PriorityQueue<>(); // a queue to hold departing patients\r\n\t\tArrayList<PatientVisit> treatedPatients = new ArrayList<PatientVisit>(); // a list to store the treated patients (will actually be deep copies of patients as their fields existed when they were moved to rooms)\t\t\r\n\t\tArrayList<ExamRoom> roomsInUse = new ArrayList<ExamRoom>(); // a list to hold rooms while they are in use\r\n\t\t\r\n\t\t//THE DATA WE WANT TO KEEP TRACK OF\r\n\t\tint totalPatients = 0;\r\n\t\tint highPriorityPatients = 0;\r\n\t\tint lowPriorityPatients = 0;\r\n\t\tdouble totalTreatmentTime = 0;\r\n\t\tdouble avgTreatmentTime;\r\n\t\tdouble highPriorityWaitTime = 0;\r\n\t\tdouble avgHighPriorityWaitTime;\r\n\t\tdouble lowPriorityWaitTime = 0;\r\n\t\tdouble avgLowPriorityWaitTime;\r\n\t\tdouble totalWaitTime = 0;\r\n\t\tdouble avgWaitTime;\r\n\t\t\r\n\t\twhile (currentTime < totalTime || departureQueue.size() > 0) { //until the time has elapsed AND all patients have finished treatment\r\n\t\t\t\r\n\t\t\tif (currentTime < totalTime) { // if the time specified by the user has not yet elapsed\r\n\t\t\t\tPatientVisit newPatient = PatientVisitGenerator.getNextRandomArrival(currentTime); //generate an arrival event\r\n\t\t\t\tarrivalQueue.insert(newPatient); //add that patient to the arrival queue\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (!arrivalQueue.isEmpty()) {\r\n\t\t\t\tarrivalQueue = new PriorityQueue<>(); // clear any future events when user specified time has elapsed\r\n\t\t\t}\r\n\t\t\t//PUT PATIENT IN ROOM IF POSSIBLE\r\n\t\t\t// if there is an available room AND there are waiting patients (who have already arrived)\r\n\t\t\twhile (!roomQueue.isEmpty() && !arrivalQueue.isEmpty() && ((PatientVisit) arrivalQueue.front()).getArrivalTime() <= currentTime) { \r\n\t\t\t\t\r\n\t\t\t\t//GRAB THE NEXT ROOM AND PATIENT IN THEIR RESPECTIVE QUEUES\r\n\t\t\t\t\r\n\t\t\t\tExamRoom room = (ExamRoom) roomQueue.remove(); // take the first room from the room list\r\n\t\t\t\tPatientVisit patient = (PatientVisit) arrivalQueue.remove(); // take the first patient from the patient list\r\n\t\t\t\t\r\n\t\t\t\t//MODIFY THE ROOM AND PATIENT AND CAPTURE SOME DATA\r\n\t\t\t\t//PATIENTS\r\n\t\t\t\tpatient.setWaitTime(currentTime - patient.getArrivalTime()); // set the time the patient waited\r\n\t\t\t\tpatient.setDepartureTime(currentTime + patient.getDuration()); // set the departure time of the patient equal to arrival time + duration of appointment\r\n\t\t\t\ttreatedPatients.add(patient.deepCopy()); // add a copy of this patient to a queue for treated patients to preserve its wait time and urgency (for data collection purposes)\r\n\t\t\t\tpatient.setUrgency(10); // set each patient to lowest priority once in treatment room (allows them to be compared based on departure time)\r\n\t\t\t\tpatient.setArrivalTime(0); // set each arrival time to 0 once in treatment room (allows them to be compared based on departure time)\r\n\t\t\t\tdepartureQueue.insert(patient); // add patient to departure queue to be sorted by departure time\r\n\t\t\t\t\r\n\t\t\t\t//ROOMS\r\n\t\t\t\troom.setInUseTime(room.getInUseTime() + patient.getDuration()); // add the duration of the patient's treatment to the in-use time of the room\r\n\t\t\t\troom.setPatientNum(room.getPatientNum() + 1); // increase the number of patients treated in the room by 1\r\n\t\t\t\troom.setDepartureTime(patient.getDepartureTime()); // set departure time of room to that of patient\r\n\t\t\t\troomsInUse.add(room); // put the rooms in a list for rooms in use\r\n\t\t\t\t\r\n\t\t\t\t//GENERAL DATA\r\n\t\t\t\ttotalPatients ++; //increment number of patients treated\t\t\t\t\r\n\t\t\t\ttotalTreatmentTime += patient.getDuration(); // add the patient's treatment time to the total\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//GO THROUGH ROOMS AND PATIENTS TO FIND THOSE WHICH ARE DONE\r\n\t\t\t//ROOMS\r\n\t\t\tfor (int i=0; i<roomsInUse.size(); i++) { // look through rooms currently in use\r\n\t\t\t\tExamRoom room = roomsInUse.get(i); // for each room\r\n\t\t\t\tif (room.getDepartureTime() <= currentTime) { // if the departure time is now or has passed\r\n\t\t\t\t\troomsInUse.remove(i); //remove that room from the list of in-use rooms\r\n\t\t\t\t\troomQueue.insert(room); // add it back to the room queue where it will be sorted according to its new in-use time\r\n\t\t\t\t\ti--; // go back one index as the list is now shorter\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//PATIENTS\t\t\r\n\t\t\twhile (!departureQueue.isEmpty() && ((PatientVisit) departureQueue.front()).getDepartureTime() <= currentTime) { // while the next patient to depart is ready to depart\r\n\t\t\t\tdepartureQueue.remove(); // remove that patient from the departure queue\r\n\t\t\t}\r\n\t\t\tcurrentTime += 1; // increment time 1 minute\r\n\t\t}\r\n\t\t\r\n\t\t//CALCULATE THE AVERAGE WAIT TIMES\r\n\t\tIterator<PatientVisit> treatedPatientsIter = treatedPatients.iterator(); //attach an iterator to the list of treated patients\r\n\t\twhile (treatedPatientsIter.hasNext()) {\r\n\t\t\tPatientVisit currentPatient = treatedPatientsIter.next(); // go through all treated patients\r\n\t\t\tif (currentPatient.getUrgency() >= 1 && currentPatient.getUrgency() <= 4) { // if the patient was high priority\r\n\t\t\t\thighPriorityPatients += 1; // add 1 to total of high priority patients\r\n\t\t\t\thighPriorityWaitTime += currentPatient.getWaitTime(); // add patient's wait time to high priority wait-time total\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse if (currentPatient.getUrgency() >= 9) { //if patient was low priority\r\n\t\t\t\tlowPriorityPatients += 1; //add 1 to total of low priority patients\r\n\t\t\t\tlowPriorityWaitTime += currentPatient.getWaitTime(); // add patient's wait time to low priority wait-time total\t\r\n\t\t\t}\r\n\t\t\ttotalWaitTime += currentPatient.getWaitTime();\r\n\t\t}\r\n\t\tavgHighPriorityWaitTime = highPriorityWaitTime/highPriorityPatients; // calculate the average for high priority patients\r\n\t\tavgLowPriorityWaitTime = lowPriorityWaitTime/lowPriorityPatients; // calculate the average for low priority patients\r\n\t\tavgWaitTime = totalWaitTime/totalPatients;\r\n\t\tavgTreatmentTime = totalTreatmentTime/totalPatients; // calculate overall average treatment time\t\r\n\t\t\r\n\t\t// PRINT THE DATA FOR THE USER\r\n\t\tSystem.out.println();\r\n\t\t//System.out.println(\"total treatment time: \" + totalTreatmentTime);\r\n\t\tSystem.out.println(\"There are \" + roomNum + \" rooms in the system.\");\r\n\t\tSystem.out.println(\"The simulation ran for \" + currentTime/60 + \" hours and \" + currentTime%60 + \" minutes.\");\r\n\t\tSystem.out.println(totalPatients + \" patients were treated in total.\");\r\n\t\tSystem.out.printf(\"The average wait time for treatment was: \" + \"%.2f\" + \" minutes.\\n\", avgWaitTime);\r\n\t\tif (highPriorityPatients > 0) {\r\n\t\t\tSystem.out.printf(\"There were \" + highPriorityPatients + \" patients with urgency 1 to 4 and their average wait time was: \" + \"%.2f\" + \" minutes.\\n\", avgHighPriorityWaitTime);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.printf(\"There were \" + highPriorityPatients + \" patients with urgency 1 to 4 and their average wait time cannot be calculated.\");\r\n\t\t}\r\n\t\tif (lowPriorityPatients > 0) {\r\n\t\t\tSystem.out.printf(\"There were \" + lowPriorityPatients + \" patients with urgency 9 to 10 and their average wait time was: \" + \"%.2f\" + \" minutes.\\n\", avgLowPriorityWaitTime);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.printf(\"There were \" + lowPriorityPatients + \" patients with urgency 9 to 10 and their average wait cannot be calculated.\\n\");\r\n\t\t}\r\n\t\tSystem.out.printf(\"The average duration of treatment was: \" + \"%.2f\" + \" minutes.\\n\", avgTreatmentTime);\r\n\t\tfor (int i=0; i<roomNum; i++) {\r\n\t\t\tExamRoom room = (ExamRoom) roomQueue.remove();\r\n\t\t\tint patientNum = room.getPatientNum();\r\n\t\t\tdouble busyTime = room.getInUseTime();\r\n\t\t\tSystem.out.println(patientNum + \" patients were treated in room \" + room.getIdent() + \".\");\r\n\t\t\tSystem.out.printf(\"Room \" + room.getIdent() + \" was busy \" + \"%.2f\" + \" percent of the time.\\n\", (busyTime/currentTime)*100);\r\n\t\t}\r\n\t\tSystem.out.println();\t\r\n\t\t\r\n\t}", "public Date getOrdertime() {\n return ordertime;\n }", "public void setTimeSort(Integer timeSort) {\n this.timeSort = timeSort;\n }", "public static Driver findFirstDriver(String time,String driverIds){\n\t\tDriver newDriver = null;\n\t\tMap<Integer,Integer> slotWrtDriverMap = new HashMap<Integer, Integer>();\n\n\t\tArrayList<Integer> slotIds = new ArrayList<Integer>();\n\t\ttry {\n\t\t\tConnection connection = DBConnection.createConnection();\n\t\t\tSQL:{\n\t\t\t\tPreparedStatement preparedStatement = null;\n\t\t\t\tResultSet resultSet = null;\n\n\t\t\t\tString sql =\"select slot_id, driver_id, time_slot_from from fapp_driver_slots where driver_id IN \"+driverIds;\n\t\t\t\ttry {\n\t\t\t\t\tpreparedStatement= connection.prepareStatement(sql);\n\t\t\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\t\t\twhile (resultSet.next() ) {\n\t\t\t\t\t\tString timeSlotFrom = resultSet.getString(\"time_slot_from\");\n\t\t\t\t\t\tint slotId = resultSet.getInt(\"slot_id\");\n\t\t\t\t\t\tint driverId = resultSet.getInt(\"driver_id\");\n\t\t\t\t\t\tslotWrtDriverMap.put(slotId, driverId);\n\n\t\t\t\t\t\tif(timeSlotFrom.startsWith(time)){\n\t\t\t\t\t\t\t//String driver = String.valueOf(slotId)+\"$\"+timeSlotFrom+\"$\"+String.valueOf(driverId);\n\t\t\t\t\t\t\tslotIds.add(slotId);\n\t\t\t\t\t\t\t//timeSlotList.add(driver);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}finally{\n\t\t\t\t\tif(preparedStatement!=null){\n\t\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tCollections.sort(slotIds);\n\t\t\tSystem.out.println(\"Priorities :: \"+slotIds);\n\t\t\t//System.out.println(timeSlotList);\n\t\t\tint slotId = 0;\n\t\t\tfor(int i=0;i<slotIds.size();i++){\n\t\t\t\tSystem.out.println(\"Priority \"+i+\" \"+slotIds.get(i));\n\t\t\t\tslotId = slotIds.get(0);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Randomly select driver\n\t\t\t */\n\t\t\tRandom rand = new java.util.Random();\n\t\t\tint r ;\n\t\t\tr = rand.nextInt(slotIds.size());\n\t\t\tslotId = slotIds.get(r);\n\n\t\t\tint boyId =0;\n\t\t\tboyId = slotWrtDriverMap.get(slotId);\n\t\t\tSystem.out.println(\"Driver data from priority::\"+boyId);\n\n\t\t\tSystem.out.println(\"boy id = \"+boyId);\n\t\t\tSQL:{\n\t\t\t\tPreparedStatement preparedStatement = null;\n\t\t\t\tResultSet resultSet = null;\n\t\t\t\tString sql =\"select delivery_boy_name,delivery_boy_phn_number,delivery_boy_user_id \"\n\t\t\t\t\t\t+ \"from vw_delivery_boy_data where delivery_boy_id=?\";\n\t\t\t\ttry {\n\t\t\t\t\tpreparedStatement=connection.prepareStatement(sql);\n\t\t\t\t\tpreparedStatement.setInt(1, boyId);\n\t\t\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\t\tString driverUserId = (resultSet.getString(\"delivery_boy_user_id\"));\n\t\t\t\t\t\tString driverName = (resultSet.getString(\"delivery_boy_name\"));\n\t\t\t\t\t\tString contactNo =(resultSet.getString(\"delivery_boy_phn_number\"));\n\t\t\t\t\t\tnewDriver = new Driver(driverName, driverUserId, contactNo);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}finally{\n\t\t\t\t\tif(preparedStatement!=null){\n\t\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t\t}\n\t\t\t\t\tif(connection!=null){\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn newDriver;\n\t}", "public String getNextTimeFromDayTime(int day,String time){\n \t\tString res = \"00:00:00\";\n //\t\tif(existDayTime(day,time)){\n //\t\t\t// SELECT time FROM time WHERE day = 0 AND ID = 1+(SELECT ID FROM time WHERE day= 0 AND time ='16:00:00')\n //\t\t\tSQLiteDatabase db= this.getReadableDatabase();\n //\t\t\tCursor c = db.rawQuery(\"SELECT time FROM time \" +\n //\t\t\t\t\t\t\t\t \"WHERE day = \"+day+\" \" +\n //\t\t\t\t\t\t\t\t \"AND ID = 1+(SELECT ID \" +\n //\t\t\t\t\t\t\t\t \t\t\t \"FROM time \" +\n //\t\t\t\t\t\t\t\t \t\t\t \"WHERE day=\"+day+\" \" +\n //\t\t\t\t\t\t\t\t \t\t\t \"AND time ='\"+time+\"')\",null);\n //\t\t\tif(c != null){\n //\t\t\t\tc.moveToFirst();\n //\t\t\t\tres = c.getString(0);\n //\t\t\t}\n //\t\t\tdb.close();\n //\t\t\treturn res;\n //\t\t} else {\n \t\t\t// TODO: else Pfad klappt immer, if nicht notwendig!\n \t\t\t// SELECT time FROM time WHERE day = 1 AND time(time) > time('18:00:00')\n \t\t\tLog.v(\"test\",\"DB-Zeit \"+time);\n \t\t\tLog.v(\"test\",\"Tag \"+String.valueOf(day));\n \t\t\tSQLiteDatabase db = this.getReadableDatabase();\n \t\t\tCursor c = db.rawQuery(\"SELECT time FROM time \" +\n \t\t\t\t\t\t\t\t \"WHERE day = \"+day+\" \" +\n \t\t\t\t\t\t\t\t \"AND time(time) > time('\"+time+\"')\",null);\n \t\t\tif(c != null){\n \t\t\t\tc.moveToFirst();\n \t\t\t\tres = c.getString(0);\n\t\t\t} else {\n\t\t\t\t// TODO: als Test, wenn Zeit fr heute nicht mehr vorhanden, nimm nchsten Tag\n\t\t\t\tres = getFirstTimeFromDay((1+day)%7);\n \t\t\t}\n \t\t\t//db.close();\n \t\t\tLog.v(\"test\",String.valueOf(res));\n \t\t\treturn res;\n //\t\t}\n \t}", "private void generateTrades() {\n\t\tSystem.out.println(\"\\nGenerating fake trade records for stock: \" + stockSymbol);\n Random rd = new Random();\n \n for (int i = 0; i < 5; i++) {\n // Create arbitrary timestamp and TradeRecord data \n \t// within the last 20 minutes\n \n int minutes = rd.nextInt(21);\n int sharesQty = rd.nextInt(100) + 1;\n boolean isBuy = rd.nextBoolean();\n double price = (rd.nextDouble() + 0.1) * 100;\n // truncate price to 2 decimal places\n String tmpPrc = String.format(Locale.ENGLISH, \"%.2f\", price);\n price = Double.parseDouble(tmpPrc);\n TradeRecordType indicator = isBuy ? TradeRecordType.BUY : TradeRecordType.SELL;\n \n Calendar cal = Calendar.getInstance();\n cal.add(Calendar.MINUTE, -minutes);\n Date date = cal.getTime();\n \n // Create and save fake trade record\n TradeRecord rec = new TradeRecord(date, sharesQty, indicator, price);\n System.out.println(rec);\n this.stockTrades.put(date, rec);\n }\n }", "private static ArrayList<Quest> sortAfterTimestamp(ArrayList<Quest> questListToSort) {\n\t\tfor (int i = 0; i < questListToSort.size() - 1; i++) {\n\t\t\tint index = i;\n\t\t\tfor (int j = i + 1; j < questListToSort.size(); j++) {\n\t\t\t\tif (questListToSort.get(j).getTimestamp() > questListToSort.get(index).getTimestamp()) {\n\t\t\t\t\tindex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tCollections.swap(questListToSort, index, i);\n\t\t}\n\t\treturn questListToSort;\n\t}", "@Override\n public void addStep(int time, GameUnit gameUnit, int supply, int supplyCap) {\n steps.add(new BuildOrderStep(time, gameUnit, supply, supplyCap));\n }", "PriorityQueue<Ride> orderRidesByPriceAscending(Map<String, Ride> rides){\n return new PriorityQueue<>(rides.values());\n }", "@Override\n\tpublic int getOrder() {\n\t\treturn Ordered.HIGHEST_PRECEDENCE + 10000;\n\t}", "private HipsterDirectedGraph<String,Long> doGraphWithTimes(Collection<RouteNode> routes) {\r\n log.info(\"Doing directed graph for defined routes. Cost based on time.\");\r\n GraphBuilder<String,Long> graphBuilder = GraphBuilder.<String,Long>create();\r\n routes.forEach(route -> {\r\n graphBuilder.connect(route.getCity()).to(route.getDestination()).withEdge(route.getCost()); \r\n });\r\n return graphBuilder.createDirectedGraph();\r\n }", "public List<Long> getAcceptanceTimes() {\n Collections.sort(acceptanceTimes);\n return acceptanceTimes;\n }", "public void arrive(String time) {\n StringBuffer arrive = new StringBuffer(getName());\n arrive.append(\" the \");\n arrive.append(this.job);\n arrive.append(\" arrives at Zoo on day \");\n arrive.append(getDay());\n arrive.append(\" at \");\n arrive.append(time);\n\n arrived = true;\n\n System.out.println(arrive);\n\n //return \"\";\n }", "public void incrementOrder() {\n mOrder++;\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tdefault EagerFutureStream<Collection<U>> batchByTime(long time, TimeUnit unit) {\n\t\n\t\tint size = this.getLastActive().list().size();\n\t\tList[] list = {new ArrayList<U>()};\n\t\tint[] count = {0};\n\t\tSimpleTimer[] timer = {new SimpleTimer()};\n\t\treturn (EagerFutureStream)this.map(next-> { \n\t\t\t\tsynchronized(timer){\n\t\t\t\t\tcount[0]++;\n\t\t\t\t\tif(unit.toNanos(time)-timer[0].getElapsedNanoseconds()>0){\n\t\t\t\t\t\t\n\t\t\t\t\t\tlist[0].add(next);\n\t\t\t\t\t} else{\n\t\t\t\t\t\tlist[0].add(next);\n\t\t\t\t\t\tList<U> result = list[0];\n\t\t\t\t\t\tlist[0] = new ArrayList<U>();\n\t\t\t\t\t\t timer[0] = new SimpleTimer();\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(count[0]==size){\n\t\t\t\t\t\tlist[0].add(next);\n\t\t\t\t\t\t\n\t\t\t\t\t\tList<U> result = list[0];\n\t\t\t\t\t\tlist[0] = new ArrayList<U>();\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\t\t\t\t\treturn new ArrayList();\n\t\t\t\t}\n\t\t\t}\t).filter(l->l.size()>0);\n\t\t\n\t}", "void reachedCashierAt(int time) {\n reachedCashier = true;\n timeSpentInQueue = time - timeCreated;\n }", "private void addOrderByItem(Object theNode) {\n getOrderByItems().add(theNode);\n }", "public static void main(String[] args) {\n Task a = new Task(\"s\", new Date(0), new Date(1000*3600*24*7), 3600);\n a.setActive(true);\n System.out.println(a.getStartTime());\n System.out.println(a.getEndTime());\n System.out.println(a.nextTimeAfter(new Date(0)));\n\n\n\n }", "public void sortByTime(View view){\n // Only allow client to book a itinerary\n if (!userInfo[0].substring(0,5).equals(\"ADMIN\")) {\n Button button = (Button) findViewById(R.id.bookButton);\n button.setEnabled(true);\n }\n EditText dateEditText = (EditText) findViewById(R.id.dateEditText);\n EditText originEditText = (EditText) findViewById(R.id.originEditText);\n EditText destinationEditText = (EditText) findViewById(R.id.destinationEditText);\n // Take search input from the user\n String date = dateEditText.getText().toString();\n String origin = originEditText.getText().toString();\n String destination = destinationEditText.getText().toString();\n\n try {\n // Display stored itineraries to the user\n ArrayList<Itinerary> itineraries;\n itineraries = system.getItineraries(date, origin, destination);\n itineraries = system.sortByTime(itineraries);\n\n String displayString = \"\";\n int counter = 0;\n for (Itinerary itin : itineraries) {\n displayString += String.valueOf(counter) + \": \" + itin.toString();\n counter++;\n }\n\n selectionItinerary = itineraries;\n\n TextView displayText = (TextView) findViewById(R.id.displayText);\n if (displayString.equals(\"\")){\n displayString = \"No itineraries found\";\n }\n displayText.setText(displayString);\n }catch (Exception e){\n // Let user know if no itineraries were found based on input\n TextView displayText = (TextView) findViewById(R.id.displayText);\n displayText.setText(\"No itineraries found\");\n Button button = (Button) findViewById(R.id.bookButton);\n button.setEnabled(false);\n }\n }", "public ArrayList<Game> getGamesByPaidTime(LocalTime time){\n return null;\n }", "@Override\r\n\tpublic List<ExecuteTask> getByTime(String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_task_id IN(SELECT task_id FROM task WHERE task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,time1,time2);\r\n\t}", "PriorityQueue<Ride> orderRidesByPriceAscending(Set<Ride> rides){\n return new PriorityQueue<>(rides);\n }", "public void testFindEmployeeOrdersWithTimer() {\n\t\tSystem.out.println(\"started test testFindEmployeeOrdersWithTimer\");\n\t\tlong start = System.currentTimeMillis();\n\t\tFlux<Order> empFoundOrders = employeeController.findEmployeeOrders(employee.getAge()).take(10);\n\t\t\n\t\tStepVerifier.withVirtualTime(() -> empFoundOrders)\n\t\t\t\t\t.expectSubscription()\n\t\t\t\t\t.thenAwait(Duration.ofHours(10))\n\t\t\t\t\t.expectNextCount(10)\n\t\t\t\t\t.verifyComplete();\n\t\tlong end = System.currentTimeMillis();\n\t\tdouble totatSeconds = (end-start)/1000;\n\t\tSystem.out.println(\"completed test testFindEmployeeOrdersWithTimer in time \"+totatSeconds);\n\t}", "public void startOrder() {\n\t\tDeck tempDeck = new Deck();\n\t\tArrayList<Player> highPlayerList = new ArrayList<Player>();\n\t\tStrategy3 testPlayer = new Strategy3();\n\t\tint temp = 0;\n\t\tfor (Player p : this.playerList) {\n\t\t\ttemp++;\n\t\t\tp.hand.add(tempDeck.dealTile());\n\t\t}\n\t\t\n\t\twhile (playerList.isEmpty() == false) {\t\n\t\t\tPlayer min = playerList.get(0);\n\t\t\tfor(Player i : playerList) {\n\t\t\t\tif (i.getHandValue() > min.getHandValue()) {min = i;}\n\t\t\t}\n\t\t\thighPlayerList.add(min);\n\t\t\tplayerList.remove(min);\n\t\t}\n\t\tthis.playerList = highPlayerList;\t\n\t\ttemp = 0; \n\t\tfor(Player p : this.playerList) {\n\t\t\ttemp++;\n\t\t}\n\t\t\n\t\tfor (Player p : playerList) {\n\t\t\tp.hand.clear();\n\t\t}\t\t\n\t}", "void timeCheck() throws Exception{\n\t\tif(arrival<time_check)\n\t\tthrow new Exception(\"Arrival time should be non-descending\");\n\t}", "public void setDateOrdered (Timestamp DateOrdered);", "public CrossoverOrder() {\n\t\tthis.randomGenerator = new Random(System.currentTimeMillis());\n\t}", "public void orderList(ArrayList<DefaultActivity> scheduleList) {\n\n }", "public int compareTo(Message other){\n if(time < other.time) {\n return -1;\n } else { // assume one comes before the other in all instances\n return 1;\n }\n }", "public static void announcePreDraw(String time) {\n\t\tfor (int index = 0; index < DRAW_TIME_ANNOUNCEMENT.length; index++) {\n\t\t\tif (time.equals(DRAW_TIME_ANNOUNCEMENT[index][0])) {\n\t\t\t\tpreDrawAnnouncement();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n Timer timer = new Timer();\r\n timer.start();\r\n \r\n /*Integer[] a = new Integer[1000000];\r\n Random rand = new Random();\r\n double d;\r\n int in;\r\n for(int x = 0; x < 1000000; x++){\r\n d = Math.random()*50;\r\n in = (int) d;\r\n a[x] = in;\r\n }*/\r\n \r\n Integer[] a = new Integer[5];\r\n a[0] = new Integer(2);\r\n a[1] = new Integer(1);\r\n a[2] = new Integer(4);\r\n a[3] = new Integer(3);\r\n\ta[4] = new Integer(8);\r\n priorityqSort(a);\r\n /*Queue<Integer> pq1 = new PriorityQueue<Integer>();\r\n for (Integer x: a){\r\n pq1.add(x);\r\n }\r\n System.out.println(\"pq1: \" + pq1);*/\r\n \r\n /*Queue<String> pq2 = new PriorityQueue<>();\r\n pq2.add(\"4\");\r\n pq2.add(\"9\");\r\n pq2.add(\"2\");\r\n pq2.add(\"1\");\r\n pq2.add(\"5\");\r\n pq2.add(\"0\");\r\n System.out.println(\"pq: \" + pq2);*/\r\n \r\n timer.end();\r\n System.out.println(timer);\r\n }", "@Override\r\n\t\t\t\tpublic int compare(twi arg0, twi arg1) {\n\t\t\t\t\tif (arg0.timestamp > arg1.timestamp) {\r\n\t\t\t\t\t\treturn -1;\r\n\t\t\t\t\t} else if (arg0.timestamp < arg1.timestamp) {\r\n\t\t\t\t\t\treturn 1;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "public void generateRandomEvents();", "public void timSort(int[] nums) {\n\t\t\t\n\t}", "private void randomTest(){\n\n int time = 5 ;\n\n test(time) ;\n }", "public static String createTimeDependentKey() {\r\n\t\tchar pad[];\r\n\t\tint padLen;\r\n\t\tStringBuilder retval = new StringBuilder(32);\r\n\t\tfinal long seed = System.currentTimeMillis();\r\n\t\tRandom rnd = new Random(seed);\r\n\t\t// 10 characters time dependent part\r\n\t\tString timePart = String.valueOf(Long.MAX_VALUE-seed);\r\n\t\tpadLen = timePart.length()-10;\r\n\t\tpad = new char[padLen];\r\n\t\tjava.util.Arrays.fill(pad, '0');\r\n\t\tretval.append(pad).append(timePart);\r\n\t\t// 6 characters sequential\r\n\t\tretval.append(Integer.toHexString(iSequence.incrementAndGet()));\r\n\t\tiSequence.compareAndSet(16777000, 1048576);\r\n\t\t// 8 characters IP dependent part\t\t\r\n\t\ttry {\r\n\t\t\tbyte[] localIPAddr = InetAddress.getLocalHost().getAddress();\r\n\t\t\tretval.append(byteToStr[((int) localIPAddr[0]) & 255]);\r\n\t\t\tretval.append(byteToStr[((int) localIPAddr[1]) & 255]);\r\n\t\t\tretval.append(byteToStr[((int) localIPAddr[2]) & 255]);\r\n\t\t\tretval.append(byteToStr[((int) localIPAddr[3]) & 255]);\r\n\t\t}\r\n\t\tcatch (UnknownHostException e) {\r\n\t\t\tretval.append(\"7f000000\");\r\n\t\t}\r\n\t\t// 8 characters random part\r\n\t\tString randomPart = String.valueOf(rnd.nextInt(Integer.MAX_VALUE));\r\n\t\tpadLen = timePart.length()-8;\r\n\t\tretval.append(randomPart).append(generateRandomId(padLen, \"0123456789abcdef\", Character.LOWERCASE_LETTER));\r\n\t\treturn retval.toString();\r\n\t}", "@Override\n public int compareTo(CacheEntry cacheEntry) {\n if (arrivalTime < cacheEntry.arrivalTime) return -1;\n else if (arrivalTime > cacheEntry.arrivalTime) return 1;\n else return 0;\n }", "public static void main(String[] args) {\n\t\tList<StatetostateDetail> list = new ArrayList<StatetostateDetail>();\n\t\tfor(int i = 1; i < 16; i++){\n\t\t\tStatetostateDetail s = new StatetostateDetail();\n\t\t\ts.setId(i);\n\t\t\ts.setStatue(0);\n\t\t\ts.setTime(System.currentTimeMillis() + (i + i * 100));\n\t\t\tlist.add(s);\n\t\t}\n\t\tlist.get(3).setStatue(1);\n\t\tlist.get(5).setStatue(1);\n\t\tlist.get(10).setStatue(1);\n\t\tlist.get(14).setStatue(1);\n\t\tlist.get(7).setStatue(2);\n\t\tlist.get(9).setStatue(2);\n\t\tSystem.out.println(\"list:\" + list);\n\t\n\t\t\n\t\tCollections.sort(list, new Comparator<StatetostateDetail>(){\n public int compare(StatetostateDetail s1, StatetostateDetail s2) {\n \tLong t1 = null;\n \tLong t2 = null;\n \ttry{\n \t\tt1 = s1.getTime();\n\t \tt2 = s2.getTime();\n \t}catch(Exception e){\n \t\te.printStackTrace();\n \t}\n \n return t2.compareTo(t1);\n }\n });\n\t\tCollections.sort(list, new Comparator<StatetostateDetail>(){\n public int compare(StatetostateDetail s1, StatetostateDetail s2) {\n \treturn s1.getStatue()>s2.getStatue()?1:(s1.getStatue()==s2.getStatue()?0:(s2.getTime()>s1.getTime()?-1:0));\n }\n });\n\t\t\n\t\tSystem.out.println(\"list:\" + list);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public void timSort(int[] nums) {\n\n\t}", "public abstract Date getNextFireTime();", "LocalDateTime calculateNextPossibleStartTime(LocalDateTime startTime);", "long getTimeUntilNextSet(Coordinates coord, double horizon, long time) throws AstrometryException;", "public void checkAddTrack() {\n this.trackList.sort();\n int time = this.timeTrankiManager.getTrackTimeOfNext();\n Date dateCorruent = this.timeTrankiManager.getTime();\n\n if (time > 0) {\n Track trackIndicated = this.trackList.getTracklessTime(time);\n if (trackIndicated != null) {\n this.trackListFinal.addTrack(dateCorruent, trackIndicated);\n this.trackList.removeTrack(trackIndicated);\n this.timeTrankiManager.addMinute(trackIndicated.getTime());\n } else {\n this.trackListFinal.addTrack(dateCorruent, \"Networking Event\");\n this.trackListFinal.addEmpityEspace();\n resetTimeTrackingManager();\n }\n \n } else if (time == -1) {\n this.trackListFinal.addTrack(dateCorruent, \"Lunch\");\n this.timeTrankiManager.addMinute(60);\n } else if (time == -2) {\n this.trackListFinal.addTrack(dateCorruent, \"Networking Event\");\n this.trackListFinal.addEmpityEspace();\n resetTimeTrackingManager();\n } else {\n this.trackListFinal.addTrack(dateCorruent, \"Networking Event\");\n resetTimeTrackingManager();\n }\n }", "private void generateDefaultTimeSlots() {\n\t\tLocalTime startTime = LocalTime.of(9, 0); // 9AM start time\n\t\tLocalTime endTime = LocalTime.of(19, 0); // 5PM end time\n\n\t\tfor (int i = 1; i <= 7; i++) {\n\t\t\tList<Timeslot> timeSlots = new ArrayList<>();\n\t\t\tLocalTime currentTime = startTime.plusMinutes(15);\n\t\t\twhile (currentTime.isBefore(endTime) && currentTime.isAfter(startTime)) {\n\t\t\t\tTimeslot newSlot = new Timeslot();\n\t\t\t\tnewSlot.setTime(currentTime);\n\t\t\t\tnewSlot = timeslotRepository.save(newSlot);\n\t\t\t\ttimeSlots.add(newSlot);\n\t\t\t\tcurrentTime = currentTime.plusHours(1); // new slot after one hour\n\t\t\t}\n\t\t\tDay newDay = new Day();\n\t\t\tnewDay.setTs(timeSlots);\n\t\t\tnewDay.setDayOfWeek(DayOfWeek.of(i));\n\t\t\tdayRepository.save(newDay);\n\t\t}\n\t}", "private int[] getRandOrder(int count){\n\t\tint[][] orderContainer = new int[count][2];\n\t\tRandom randomGenerator = new Random();\n\t\tfor(int i = 0; i < count; i++){\n\t\t\torderContainer[i][0] = i;\n\t\t\torderContainer[i][1] = randomGenerator.nextInt(count * 2);\n\t\t}\n\n\n\t\tfor(int i = 0; i < count - 1; i++){\n\t\t\tfor(int j = i + 1; j < count; j++){\n\t\t\t\tif(orderContainer[i][1] > orderContainer[j][1]){\n\t\t\t\t\tint tmp = orderContainer[i][1];\n\t\t\t\t\torderContainer[i][1] = orderContainer[j][1];\n\t\t\t\t\torderContainer[j][1] = tmp;\n\n\t\t\t\t\ttmp = orderContainer[i][0];\n\t\t\t\t\torderContainer[i][0] = orderContainer[j][0];\n\t\t\t\t\torderContainer[j][0] = tmp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint []order = new int[count];\n\t\tfor(int i = 0; i < count; i++){\n\t\t\torder[i] = orderContainer[i][0];\n\t\t}\n\t\treturn order;\n\t}" ]
[ "0.5809883", "0.55698115", "0.5447791", "0.54216164", "0.52547354", "0.5098842", "0.5028837", "0.5022729", "0.502103", "0.49948835", "0.49846768", "0.49687827", "0.4966211", "0.49293593", "0.48798758", "0.48633507", "0.48085102", "0.48020858", "0.47927314", "0.47868875", "0.47792473", "0.47770822", "0.47765955", "0.4771666", "0.4768729", "0.4750922", "0.47420335", "0.47418845", "0.47330213", "0.47049055", "0.4698112", "0.46942502", "0.46684384", "0.46637467", "0.46613365", "0.46576694", "0.46539602", "0.46475822", "0.46363252", "0.4631199", "0.46138316", "0.45992813", "0.4598395", "0.45925197", "0.45900825", "0.45796126", "0.45653078", "0.45525256", "0.4544712", "0.45366094", "0.45268795", "0.4521864", "0.4521751", "0.45205045", "0.4514672", "0.45029274", "0.4502063", "0.45004988", "0.44987172", "0.44932944", "0.44912305", "0.44867024", "0.44688663", "0.44565347", "0.44401368", "0.4437005", "0.44326243", "0.44288942", "0.44257838", "0.44256902", "0.44223055", "0.44206628", "0.4418954", "0.44102913", "0.43969098", "0.43909478", "0.43905818", "0.43905476", "0.43741107", "0.43740648", "0.43668586", "0.43643272", "0.4363317", "0.43575475", "0.43541092", "0.43385845", "0.43368927", "0.4333447", "0.43293974", "0.4325105", "0.43204144", "0.43153116", "0.4313689", "0.4311312", "0.4302232", "0.43019536", "0.42945853", "0.42872727", "0.42859203", "0.42856818" ]
0.7560373
0
Generates order that comes after last generated order according to implementation.
public Order generateNext();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic int getOrder() {\n\t\treturn Ordered.HIGHEST_PRECEDENCE + 10000;\n\t}", "public int getOrder();", "public void decrementOrder() {\n mOrder--;\n }", "@Override\n\tpublic void placeOrder() {\n\t\t\n\t}", "default int getOrder() {\n\treturn 0;\n }", "@Override\r\n\tpublic int getOrder() {\n\t\treturn 0;\r\n\t}", "int order();", "OrderExpression<T> desc();", "@Override\n public int getOrder() {\n return 0;\n }", "@Override\n\tpublic int getOrder() {\n\t\treturn 1;\n\t}", "@Override\n\tpublic int getOrder() {\n\t\treturn CoreEvent.DEFAULT_ORDER - 1;\n\t}", "void newOrder();", "Ordering<Part> getOrdering();", "public LabOrder generateOrder() {\n LabOrder order = new LabOrder();\n Random r = new Random();\n Date date = getDate(r);\n order.insertts = date; //randbetween 1388534400 <-> 1420070400\n order.ordernr = \"O\" + r.nextInt();\n order.patientnr = \"P\" + r.nextInt(10000); //1 mil / 100 = 10 000\n order.visitNr = \"V\" + r.nextInt(); //unique;\n order.specimens.add(generateSpecimen(order));\n order.specimens.add(generateSpecimen(order));\n return order;\n }", "public Integer getOrder();", "public boolean shouldPushOrderByOut() {\n return true;\n }", "Order getOrder();", "@Override\n\tpublic String getOrder() {\n\t\treturn \"zjlxdm,asc\";\n\t}", "@Override\r\n public int getOrder() {\r\n return this.order;\r\n }", "com.google.protobuf.ByteString\n getOrderByBytes();", "public void incrementOrder() {\n mOrder++;\n }", "public ApplyOrder() {\n super();\n }", "@Override\n\tpublic void postorder() {\n\n\t}", "public int getOrder() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic String getNextOrderNumber() {\n\t\t// TODO Auto-generated method stub\n\t\treturn \"ORD\"+sequenceNumberDao.findNextSequenceType(ESequenceType.ORDER);\n\t}", "public void postOrderTraversal(){\n System.out.println(\"postOrderTraversal\");\n //TODO: incomplete\n\n }", "@Override\n public int getOrder() {\n return 4;\n }", "public myList<T> my_postorder();", "@Override\r\n\tpublic List<Order> ListOrder() {\n\t\treturn null;\r\n\t}", "public int getOrder() {\n return order;\n }", "public int getOrder() {\n return order;\n }", "@Override\n\tpublic IElementsQuery addOrder(IElementsQuery iElementsQuery) {\n\t\treturn null;\n\t}", "java.lang.String getOrderBy();", "private void constructOrder(CriteriaBuilderImpl cb, CriteriaQueryImpl<?> q, Tree orderBy) {\n \t\tfinal List<Order> orders = Lists.newArrayList();\n \n \t\tfor (int i = 0; i < orderBy.getChildCount(); i++) {\n \t\t\tfinal Tree orderByItem = orderBy.getChild(i);\n \t\t\tfinal Order order = orderByItem.getChildCount() == 2 ? //\n \t\t\t\tcb.desc(this.getExpression(cb, q, orderByItem.getChild(0), null)) : //\n \t\t\t\tcb.asc(this.getExpression(cb, q, orderByItem.getChild(0), null));\n \n \t\t\torders.add(order);\n \t\t}\n \n \t\tq.orderBy(orders);\n \t}", "private static void DoOrderBy()\n\t{\n\t\tArrayList<Attribute> inAtts = new ArrayList<Attribute>();\n\t\tinAtts.add(new Attribute(\"Int\", \"n_n_nationkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"n_n_name\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"n_n_regionkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"n_n_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Int\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att4\"));\n\n\t\t// These could be more complicated expressions than simple input columns\n\t\tMap<String, String> exprsToCompute = new HashMap<String, String>();\n\t\texprsToCompute.put(\"att1\", \"n_n_nationkey\");\n\t\texprsToCompute.put(\"att2\", \"n_n_name\");\n\t\texprsToCompute.put(\"att3\", \"n_n_regionkey\");\n\t\texprsToCompute.put(\"att4\", \"n_n_comment\");\n\t\t\n\t\t// Order by region key descending then nation name ascending\n\t\tArrayList<SortKeyExpression> sortingKeys = new ArrayList<SortKeyExpression>();\n\t\tsortingKeys.add(new SortKeyExpression(\"Int\", \"n_n_regionkey\", false));\n\t\tsortingKeys.add(new SortKeyExpression(\"Str\", \"n_n_name\", true));\n\t\t\n\t\t// run the selection operation\n\t\ttry\n\t\t{\n\t\t\tnew Order(inAtts, outAtts, exprsToCompute, sortingKeys, \"nation.tbl\", \"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "void decrementOrderByOne( int nOrder, int nIdWorkflow );", "@Override\r\n\tpublic Order getOrder() {\n\t\treturn null;\r\n\t}", "public interface TravelOrderCodeGenerationStrategy\n{\n\t/**\n\t * Generates a suitable unique code and sets it against the order\n\t * \n\t * @param orderModel\n\t */\n\tvoid generateTravelOrderCode(AbstractOrderModel orderModel);\n}", "public int getOrder() {\r\n\t\treturn order;\r\n\t}", "public Integer getOrder() {\n return order;\n }", "public Integer getOrder() {\n return order;\n }", "@Override\n\tpublic Order getOrder() {\n\t\treturn null;\n\t}", "int getOrder(){\r\n\t\t\treturn this.order;\r\n\t\t}", "public Integer getOrder() {\n return order;\n }", "protected void generateOrderBy( SQLQueryModel query, LogicalModel model, List<Order> orderBy,\n DatabaseMeta databaseMeta, String locale, Map<LogicalTable, String> tableAliases, Map<String, String> columnsMap,\n Map<String, Object> parameters, boolean genAsPreparedStatement ) {\n if ( orderBy != null ) {\n for ( Order orderItem : orderBy ) {\n LogicalColumn businessColumn = orderItem.getSelection().getLogicalColumn();\n String alias = null;\n if ( columnsMap != null ) {\n // The column map is a unique mapping of Column alias to the column ID\n // Here we have the column ID and we need the alias.\n // We need to do the order by on the alias, not the column name itself.\n // For most databases, it can be both, but the alias is more standard.\n //\n // Using the column name and not the alias caused an issue on Apache Derby.\n //\n for ( String key : columnsMap.keySet() ) {\n String value = columnsMap.get( key );\n if ( value.equals( businessColumn.getId() ) ) {\n // Found it: the alias is the key\n alias = key;\n break;\n }\n }\n }\n SqlAndTables sqlAndTables =\n getBusinessColumnSQL( model, orderItem.getSelection(), tableAliases, parameters, genAsPreparedStatement,\n databaseMeta, locale );\n query.addOrderBy( sqlAndTables.getSql(), databaseMeta.quoteField( alias ), orderItem.getType() != Type.ASC\n ? OrderType.DESCENDING : null );\n }\n }\n }", "public int getOrder() {\n\t\treturn order;\n\t}", "public Order generateAt(int time);", "public int getOrder() {\n return mOrder;\n }", "public String getDefaultOrder() {\n return defaultOrder;\n }", "int getPriorityOrder();", "public String processOrder() {\n notifyAllObservers();\n\n return getOrderReport();\n }", "public String getOrder() {\n return this.Order;\n }", "@Override\n\tpublic void inorder() {\n\n\t}", "private ArrayList<String> postOrder()\n\t{\n\t\tArrayList<String> rlist = new ArrayList<String>();\n\t\tpostOrder(this,rlist);\n\t\treturn rlist;\n\t}", "private void orderSegments() {\n //insert numOrder for the db\n int i = 0;\n for(TransportSegmentLogic transportSegment: transportSegments){\n transportSegment.setOrder(i);\n i++;\n }\n\n\n\n /*int i = 0;\n int j = 1;\n\n\n TransportSegmentLogic swapSegment;\n\n while(j < transportSegments.size()){\n if(transportSegments.get(j).getOrigin().equals(transportSegments.get(i).getDestination())){\n swapSegment = transportSegments.get(j);\n transportSegments.remove(swapSegment);\n transportSegments.add(i +1, swapSegment);\n i = i + 1;\n j = i + 1;\n }\n j++;\n }\n\n j = transportSegments.size() -1;\n\n while(j > i){\n if(transportSegments.get(j).getDestination().equals(transportSegments.get(0).getOrigin())){\n swapSegment = transportSegments.get(j);\n transportSegments.remove(swapSegment);\n transportSegments.add(0, swapSegment);\n i = i + 1;\n j = transportSegments.size();\n }\n j--;\n } */\n }", "protected List<FoodType> orderFoodSandwichLast(List<FoodType> unordered) {\n ArrayList<FoodType> ordered = new ArrayList<>();\n ArrayList<Double> ord = new ArrayList<>();\n for (FoodType f : unordered) {\n if (f == FoodType.SANDWICH1) {\n ord.add(1.1);\n } else if (f == FoodType.SANDWICH2) {\n ord.add(1.2);\n } else if (f == FoodType.COOKIE) {\n ord.add(4.0);\n } else if (f == FoodType.FRUIT1) {\n ord.add(2.1);\n } else if (f == FoodType.FRUIT2) {\n ord.add(2.2);\n } else if (f == FoodType.EGG) {\n ord.add(2.0);\n } else {\n ord.add(1.0); //should never happen\n }\n }\n Collections.sort(ord, Collections.reverseOrder());\n //System.out.println(\"ordered \");\n for (Double d : ord) {\n if (d == 1.1) {\n ordered.add(FoodType.SANDWICH1);\n } else if (d == 1.2) {\n ordered.add(FoodType.SANDWICH2);\n } else if (d == 4.0) {\n ordered.add(FoodType.COOKIE);\n } else if (d == 2.1) {\n ordered.add(FoodType.FRUIT1);\n } else if (d == 2.2) {\n ordered.add(FoodType.FRUIT2);\n } else if (d == 2.0) {\n ordered.add(FoodType.EGG);\n } else {\n System.out.println(\"There is an error - this food type is invalid\");\n }\n }\n return ordered;\n }", "public BorderedStrategy() {\n\t\tsuper();\n\t}", "public String getSortOrder();", "public Integer getOrder() {\n\t\treturn order;\n\t}", "public void changeSortOrder();", "@ClassVersion(\"$Id: NewOrReplaceOrder.java 16752 2013-11-14 02:54:13Z colin $\")\r\npublic interface NewOrReplaceOrder\r\n extends OrderBase, Serializable\r\n{\r\n /**\r\n * Gets the OrderType for the Order.\r\n *\r\n * @return the order type.\r\n */\r\n OrderType getOrderType();\r\n\r\n /**\r\n * Sets the OrderType for the Order.\r\n *\r\n * @param inOrderType the order type.\r\n */\r\n void setOrderType(OrderType inOrderType);\r\n\r\n /**\r\n * Gets the time in force value for the Order. If a value\r\n * is not specified, it defaults to\r\n * {@link org.marketcetera.trade.TimeInForce#Day}.\r\n *\r\n * @return the time in force value.\r\n */\r\n TimeInForce getTimeInForce();\r\n\r\n /**\r\n * Sets the time in force value for the Order.\r\n *\r\n * @param inTimeInForce the time in force value.\r\n */\r\n void setTimeInForce(TimeInForce inTimeInForce);\r\n\r\n /**\r\n * Gets the limit price for this order. A limit price should be\r\n * specified when the OrderType is {@link OrderType#Limit}.\r\n * This value is ignored if the OrderType is not {@link OrderType#Limit}.\r\n *\r\n *\r\n * @return the limit price for the order.\r\n */\r\n BigDecimal getPrice();\r\n\r\n /**\r\n * Sets the limit price for this order. A limit price should be\r\n * specified when the OrderType is {@link OrderType#Limit}.\r\n *\r\n * @param inPrice the limit price for the order.\r\n */\r\n void setPrice(BigDecimal inPrice);\r\n\r\n /**\r\n * Gets the order capacity value for this order.\r\n *\r\n * @return the order capacity value.\r\n */\r\n OrderCapacity getOrderCapacity();\r\n\r\n /**\r\n * Sets the order capacity value for this order.\r\n *\r\n * @param inOrderCapacity the order capacity value\r\n */\r\n void setOrderCapacity(OrderCapacity inOrderCapacity);\r\n\r\n /**\r\n * Gets the position effect for this order.\r\n *\r\n * @return the position effect value.\r\n */\r\n PositionEffect getPositionEffect();\r\n\r\n /**\r\n * Sets the position effect value for this order.\r\n *\r\n * @param inPositionEffect the position effect value.\r\n */\r\n void setPositionEffect(PositionEffect inPositionEffect);\r\n \r\n /**\r\n * Gets the display quantity for the Order.\r\n *\r\n * @return the display quantity.\r\n */\r\n BigDecimal getDisplayQuantity();\r\n\r\n /**\r\n * Sets the display quantity for the Order.\r\n *\r\n * @param inDisplayQuantity the display quantity.\r\n */\r\n void setDisplayQuantity(BigDecimal inDisplayQuantity);\r\n /**\r\n * Gets the broker algo value, if any.\r\n *\r\n * @return a <code>BrokerAlgo</code> value\r\n */\r\n BrokerAlgo getBrokerAlgo();\r\n /**\r\n * Sets the broker algo value.\r\n *\r\n * @param inBrokerAlgo a <code>BrokerAlgo</code> value\r\n */\r\n void setBrokerAlgo(BrokerAlgo inBrokerAlgo);\r\n}", "@Override\n\tpublic int compareTo(OrderManagement arg0) {\n\t\tint id = ((OrderManagement) arg0).getId();\n\t\treturn this.id - id;\n\t}", "public Order getOrder() {\n return order;\n }", "public void setOrder(int order) {\n this.order = order;\n }", "public void setOrder(int order) {\n this.order = order;\n }", "public String createOrder(int typeOfTechnique, List<String> listTests) throws Exception {\n\t\treturn priorj.createOrderReport(typeOfTechnique, listTests);\n\t}", "public final Integer getOrder() {\n return this.order;\n }", "protected void processOrder( Game game )\n {\n }", "@java.lang.Deprecated\n com.google.protobuf.ByteString getOrderByBytes();", "public tudresden.ocl20.core.jmi.uml15.datatypes.OrderingKind getOrdering()\n {\n \tModelFacade instance = ModelFacade.getInstance(this.refOutermostPackage().refMofId());\n \tif (instance != null && \n \t\tinstance.isRepresentative(this.refMofId())&&\n \t\tinstance.hasRefObject(this.refMofId()))\n \t{ \t\t\n \t\treturn instance.getOrdering(this.refMofId());\n \t} \n \t\n \treturn super_getOrdering();\n \t\n\t}", "@Override\n\tpublic boolean PlaceOrder(Order order) {\n\t\treturn false;\n\t}", "private static List<SentenceForm> getTopologicalOrdering(\n\t\t\tSet<SentenceForm> forms,\n\t\t\tMultimap<SentenceForm, SentenceForm> dependencyGraph, boolean usingBase, boolean usingInput) throws InterruptedException {\n\t\t//We want each form as a key of the dependency graph to\n\t\t//follow all the forms in the dependency graph, except maybe itself\n\t\tQueue<SentenceForm> queue = new LinkedList<SentenceForm>(forms);\n\t\tList<SentenceForm> ordering = new ArrayList<SentenceForm>(forms.size());\n\t\tSet<SentenceForm> alreadyOrdered = new HashSet<SentenceForm>();\n\t\twhile(!queue.isEmpty()) {\n\t\t\tSentenceForm curForm = queue.remove();\n\t\t\tboolean readyToAdd = true;\n\t\t\t//Don't add if there are dependencies\n\t\t\tfor(SentenceForm dependency : dependencyGraph.get(curForm)) {\n\t\t\t\tif(!dependency.equals(curForm) && !alreadyOrdered.contains(dependency)) {\n\t\t\t\t\treadyToAdd = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Don't add if it's true/next/legal/does and we're waiting for base/input\n\t\t\tif(usingBase && (curForm.getName().equals(TRUE) || curForm.getName().equals(NEXT) || curForm.getName().equals(INIT))) {\n\t\t\t\t//Have we added the corresponding base sf yet?\n\t\t\t\tSentenceForm baseForm = curForm.withName(BASE);\n\t\t\t\tif(!alreadyOrdered.contains(baseForm)) {\n\t\t\t\t\treadyToAdd = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(usingInput && (curForm.getName().equals(DOES) || curForm.getName().equals(LEGAL))) {\n\t\t\t\tSentenceForm inputForm = curForm.withName(INPUT);\n\t\t\t\tif(!alreadyOrdered.contains(inputForm)) {\n\t\t\t\t\treadyToAdd = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Add it\n\t\t\tif(readyToAdd) {\n\t\t\t\tordering.add(curForm);\n\t\t\t\talreadyOrdered.add(curForm);\n\t\t\t} else {\n\t\t\t\tqueue.add(curForm);\n\t\t\t}\n\t\t\t//TODO: Add check for an infinite loop here, or stratify loops\n\n\t\t\tConcurrencyUtils.checkForInterruption();\n\t\t}\n\t\treturn ordering;\n\t}", "public static void changeOrder(String order){\n switch (order) {\n case \"delais\":\n ordered = \"delais DESC\";\n break;\n case \"date\":\n ordered = \"date_creation DESC\";\n break;\n case \"nom\":\n ordered = \"nom_annonce\";\n break;\n }\n }", "void generateTravelOrderCode(AbstractOrderModel orderModel);", "private static List<ControllerRegistration> preventTemporalCoupling(Set<ControllerRegistration> deterministicOrder) {\n List<ControllerRegistration> randomOrder = new ArrayList<>(deterministicOrder);\n Collections.shuffle(randomOrder);\n return randomOrder;\n }", "@Override\n public DomainOrder getDomainOrder() {\n return DomainOrder.ASCENDING;\n }", "@Override\n public DomainOrder getDomainOrder() {\n return DomainOrder.ASCENDING;\n }", "public interface OrderedFixture {\n\n int getOrder();\n\n}", "public int getOrder() {\n \treturn ord;\n }", "private String generateOrderNumber() {\n return OBJ_PREFIX + ID_GENERATOR.getAndIncrement();\n }", "@DISPID(14)\n\t// = 0xe. The runtime will prefer the VTID if present\n\t@VTID(25)\n\tint order();", "public void setOrder(Integer order) {\n this.order = order;\n }", "@Override\n\tpublic void openOrderEnd() {\n\t}", "@Override\n\tpublic void getOrders() {\n\t\t\n\t}", "@Test\r\n void test_check_order_properly_increased_and_decreased() {\r\n graph.addVertex(\"A\");\r\n graph.addVertex(\"C\");\r\n graph.addVertex(\"D\");\r\n graph.addVertex(\"C\");\r\n if(graph.order() != 3) {\r\n fail();\r\n } \r\n graph.removeVertex(\"A\");\r\n graph.removeVertex(\"B\");\r\n graph.removeVertex(\"C\");\r\n if(graph.order() != 1) {\r\n fail();\r\n }\r\n \r\n }", "public myList<T> my_preorder();", "public void setOrder(int value) {\n this.order = value;\n }", "public void calculatePriceOrder() {\n log.info(\"OrdersBean : calculatePriceOrder!\");\n this.priceOrder = 0;\n for (ContractsEntity c : contractsBean.getContractsEntities()\n ) {\n this.priceOrder += c.getFinalPrice();\n }\n }", "void reverseTurnOrder() {\n turnOrder *= -1;\n }", "@Override\n\tpublic ProcessorOrder getOrder() {\n\t\treturn ProcessorOrder.LOW;\n\t}", "public LinkedList descendingOrder(){\r\n\t\t\r\n\t\tLinkedList treeAsList = new LinkedList();\r\n\t\treturn descending(this, treeAsList);\r\n\t}", "public void setOrder(Integer order) {\n this.order = order;\n }", "public void setOrder(Integer order) {\n this.order = order;\n }", "@Override\n\tpublic void UpdateOrder(Order order) {\n\t\t\n\t}", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "private void validOrderResult() {\n TreeNode currentTreeNode = treeLeaf;\n TreeNode orderTreeNode = null;\n while (!(currentTreeNode instanceof SourceTreeNode)) {\n if (currentTreeNode instanceof OrderGlobalTreeNode) {\n orderTreeNode = currentTreeNode;\n break;\n } else {\n currentTreeNode = UnaryTreeNode.class.cast(currentTreeNode).getInputNode();\n }\n }\n if (null != orderTreeNode) {\n OrderGlobalTreeNode orderGlobalTreeNode = OrderGlobalTreeNode.class.cast(orderTreeNode);\n TreeNode aggTreeNode = orderTreeNode.getOutputNode();\n while (aggTreeNode != null && aggTreeNode.getNodeType() != NodeType.AGGREGATE) {\n aggTreeNode = aggTreeNode.getOutputNode();\n }\n if (null != aggTreeNode) {\n if (aggTreeNode instanceof FoldTreeNode) {\n TreeNode inputTreeNode = UnaryTreeNode.class.cast(aggTreeNode).getInputNode();\n if (inputTreeNode == orderTreeNode) {\n return;\n }\n UnaryTreeNode inputUnaryTreeNode = UnaryTreeNode.class.cast(inputTreeNode);\n if (inputUnaryTreeNode.getInputNode() == orderTreeNode &&\n (inputUnaryTreeNode instanceof EdgeVertexTreeNode &&\n EdgeVertexTreeNode.class.cast(inputUnaryTreeNode).getDirection() != Direction.BOTH)) {\n return;\n }\n String orderLabel = orderGlobalTreeNode.enableOrderFlag(labelManager);\n SelectOneTreeNode selectOneTreeNode = new SelectOneTreeNode(new SourceDelegateNode(inputUnaryTreeNode, schema), orderLabel, Pop.last, Lists.newArrayList(), schema);\n selectOneTreeNode.setConstantValueType(new ValueValueType(Message.VariantType.VT_INTEGER));\n OrderGlobalTreeNode addOrderTreeNode = new OrderGlobalTreeNode(inputUnaryTreeNode, schema,\n Lists.newArrayList(Pair.of(selectOneTreeNode, Order.incr)));\n UnaryTreeNode.class.cast(aggTreeNode).setInputNode(addOrderTreeNode);\n }\n } else {\n if (treeLeaf instanceof OrderGlobalTreeNode) {\n return;\n }\n TreeNode currTreeNode = orderTreeNode.getOutputNode();\n boolean hasSimpleShuffle = false;\n while (currTreeNode != null) {\n if (currTreeNode.getNodeType() == NodeType.FLATMAP\n || (currTreeNode instanceof PropertyNode &&\n !(UnaryTreeNode.class.cast(currTreeNode).getInputNode().getOutputValueType() instanceof EdgeValueType))) {\n hasSimpleShuffle = true;\n break;\n }\n currTreeNode = currTreeNode.getOutputNode();\n }\n if (!hasSimpleShuffle) {\n return;\n }\n\n UnaryTreeNode outputTreeNode = UnaryTreeNode.class.cast(treeLeaf);\n if (outputTreeNode.getInputNode() == orderTreeNode) {\n if (outputTreeNode instanceof EdgeVertexTreeNode &&\n EdgeVertexTreeNode.class.cast(outputTreeNode).getDirection() != Direction.BOTH) {\n return;\n }\n if (orderTreeNode.getOutputValueType() instanceof EdgeValueType && outputTreeNode instanceof PropertyNode) {\n return;\n }\n }\n String orderLabel = orderGlobalTreeNode.enableOrderFlag(labelManager);\n SelectOneTreeNode selectOneTreeNode = new SelectOneTreeNode(new SourceDelegateNode(treeLeaf, schema), orderLabel, Pop.last, Lists.newArrayList(), schema);\n selectOneTreeNode.setConstantValueType(new ValueValueType(Message.VariantType.VT_INTEGER));\n treeLeaf = new OrderGlobalTreeNode(treeLeaf, schema,\n Lists.newArrayList(Pair.of(selectOneTreeNode, Order.incr)));\n }\n }\n }", "public List<Order> getOrder() {\n return order;\n }", "@Test\n\tpublic void orderingItemsIncreasesCumulativeOrders() {\n\t\tItemQuantity itemQ1 = new ItemQuantity(101, 5);\n\t\tItemQuantity itemQ2 = new ItemQuantity(102, 10);\n\t\tList<ItemQuantity> itemQuantities = new ArrayList<ItemQuantity>();\n\t\titemQuantities.add(itemQ1);\n\t\titemQuantities.add(itemQ2);\n\t\tOrderStep step = new OrderStep(1, itemQuantities);\n\t\t\n\t\ttry {\n\t\t\titemSupplier.executeStep(step);\n\t\t} catch (OrderProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\t\t\n\t\tList<ItemQuantity> ordersPerItem = null;\n\t\ttry {\n\t\t\tordersPerItem = itemSupplier.getOrdersPerItem(supplierItemIds);\n\t\t} catch (InvalidItemException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\t\t\n\t\tfor (ItemQuantity itemQ : ordersPerItem) {\n\t\t\tif (itemQ.getItemId() == 101)\n\t\t\t\tassertEquals(5, itemQ.getQuantity());\n\t\t\tif (itemQ.getItemId() == 102)\n\t\t\t\tassertEquals(10, itemQ.getQuantity());\n\t\t\tif (itemQ.getItemId() == 103)\n\t\t\t\tassertEquals(0, itemQ.getQuantity());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Place another order\n\t\t */\n\t\titemQ1 = new ItemQuantity(101, 10);\n\t\titemQ2 = new ItemQuantity(103, 3);\n\t\titemQuantities = new ArrayList<ItemQuantity>();\n\t\titemQuantities.add(itemQ1);\n\t\titemQuantities.add(itemQ2);\n\t\tstep = new OrderStep(1, itemQuantities);\n\t\t\n\t\ttry {\n\t\t\titemSupplier.executeStep(step);\n\t\t} catch (OrderProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\t\t\n\t\tordersPerItem = null;\n\t\ttry {\n\t\t\tordersPerItem = itemSupplier.getOrdersPerItem(supplierItemIds);\n\t\t} catch (InvalidItemException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\t\t\n\t\tfor (ItemQuantity itemQ : ordersPerItem) {\n\t\t\tif (itemQ.getItemId() == 101)\n\t\t\t\tassertEquals(15, itemQ.getQuantity());\n\t\t\tif (itemQ.getItemId() == 102)\n\t\t\t\tassertEquals(10, itemQ.getQuantity());\n\t\t\tif (itemQ.getItemId() == 103)\n\t\t\t\tassertEquals(3, itemQ.getQuantity());\n\t\t}\n\t}", "public void makeComplete(Order order) {}" ]
[ "0.6196388", "0.6034015", "0.60265386", "0.5996015", "0.59674454", "0.5947964", "0.5945154", "0.5929154", "0.5926772", "0.59206784", "0.5861623", "0.58591115", "0.58399475", "0.57962346", "0.5784571", "0.57836616", "0.57778066", "0.5763083", "0.5746315", "0.5742419", "0.5738992", "0.5718599", "0.5715235", "0.5707861", "0.5648408", "0.55932873", "0.55793303", "0.5568113", "0.5523171", "0.5511315", "0.5511315", "0.55062705", "0.55020696", "0.5499995", "0.54561514", "0.5433154", "0.53926605", "0.53806657", "0.536959", "0.5315923", "0.5315923", "0.531406", "0.5296768", "0.52858996", "0.52840537", "0.5265815", "0.524499", "0.52427655", "0.5219141", "0.52165467", "0.5215959", "0.52147514", "0.5212372", "0.51873916", "0.5178764", "0.5165529", "0.5154684", "0.5153744", "0.51431674", "0.5142839", "0.51345265", "0.5130501", "0.51202154", "0.5109782", "0.5109782", "0.5094649", "0.5094161", "0.5091486", "0.50854224", "0.50790995", "0.5078871", "0.50766397", "0.50758094", "0.5070918", "0.5069718", "0.50621986", "0.50621986", "0.5059782", "0.50437844", "0.5038913", "0.5038021", "0.5036333", "0.5035141", "0.50341976", "0.50194657", "0.5014104", "0.50019306", "0.49966305", "0.49936873", "0.4985508", "0.4980271", "0.4979922", "0.4979922", "0.4975954", "0.49725455", "0.49725455", "0.4961198", "0.49540746", "0.4950812", "0.49495125" ]
0.63265276
0
Gets the plugin identifier for the PF4J module. This can return null if no external bundle is to be used, eg it uses a plugin defined within the current classloader.
@Nullable public abstract String getPf4jPluginId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract String getPluginId();", "public String getBundleId() {\n\t return PLUGIN_ID;\n\t}", "@Override\n public String getPluginId() {\n return PLUGIN_ID;\n }", "public String getPlugin() {\n\t\treturn adaptee.getPlugin();\n\t}", "public String getPluginPublicId() {\n return pluginPublicId;\n }", "public String getPluginName(){\n\t\treturn pluginName;\n\t}", "@Override\n public int getPluginId() {\n return 10202;\n }", "@Override\n public String getPluginName() {\n return null;\n }", "@Override\n public String getPluginName() {\n return null;\n }", "public int getModuleID ()\n\n {\n\n // Returns moduleID when called.\n return moduleID;\n\n }", "public int getId() {\n return m_module.getConfiguration().getId();\n }", "public Plugin getPlugin()\r\n\t{\r\n\t\treturn plugin;\r\n\t}", "ModuleIdentifier getId();", "public String getPluginIdAttr() {\n return pluginIdAttr;\n }", "public static Plugin getPlugin() {\n return plugin;\n }", "public String getPluginClass() {\n return pluginClass;\n }", "public String loadNewPlugin(final String extPointId);", "public String getPluginClass() {\n return pluginClass;\n }", "Plugin getPlugin( );", "public APlugin getPlugin() {\n return plugin;\n }", "public String getAssetModuleId();", "public Type getPluginType()\r\n\t{\r\n\t\treturn _pluginType; \r\n\t}", "public String getComponentId();", "String getModuleId();", "Plugin getPlugin();", "public JkModuleId moduleId() {\n return moduleId;\n }", "public int getModuleId() {\n return moduleId_;\n }", "protected String getModuleId() {\n\n return moduleId;\n }", "public int getModuleId() {\n return moduleId_;\n }", "public PluginComponent getPluginComponent()\n {\n return (PluginComponent) getSource();\n }", "private Plugin getPlugin(String pluginName) {\r\n PluginManager pluginManager = Bukkit.getServer().getPluginManager();\r\n for (Plugin plugin : pluginManager.getPlugins()) {\r\n if (plugin.getName().toLowerCase().equals(pluginName.toLowerCase())) {\r\n return plugin;\r\n }\r\n }\r\n return null;\r\n }", "private String getPluginName(HttpServletRequest request) {\n String url = request.getRequestURI();\n\n // /report/PluginName\n if (url.startsWith(\"//report/\")) {\n return url.substring(\"//report/\".length());\n }\n\n else if (url.startsWith(\"/report/\")) {\n return url.substring(\"/report/\".length());\n }\n\n // /report.php?plugin=PluginName\n else if (url.startsWith(\"/report.php?plugin=\")) {\n return url.substring(\"/report.php?plugin=\".length());\n }\n\n return null;\n }", "public BatchClassPluginDTO getSelectedPlugin() {\n\t\treturn selectedPlugin;\n\t}", "public String getLibraryId() {\n return getProperty(Property.LIBRARY_ID);\n }", "public interface Plugin\n{\n\tpublic String getPluginName();\n}", "public String getPluginPath() {\n return pluginPath;\n }", "public synchronized Optional<Plugin> getPluginByName(final String pluginName) {\n return pluginMetadata.values().stream()\n // Find the matching metadata\n .filter(pluginMetadata -> pluginName.equalsIgnoreCase(pluginMetadata.getName()))\n .findAny()\n // Find the canonical name for this plugin\n .map(PluginMetadata::getCanonicalName)\n // Finally, find the plugin\n .flatMap(canonicalName -> Optional.ofNullable(pluginsLoaded.get(canonicalName)));\n }", "public int getModuleId();", "public static IP_Main getPluginInstance() { return pluginInstance; }", "@Override\n\tpublic String getPluginVersion() {\n\t\treturn null;\n\t}", "public URI getClassLoaderId() {\n return classLoaderId;\n }", "public String getModuleID() { return \"\"; }", "public int getID()\n {\n return MODULE_ID;\n }", "private String getModuleName() {\n \t\t// If there is an autoconnect page then it has the module name\n \t\tif (autoconnectPage != null) {\n \t\t\treturn autoconnectPage.getSharing().getRepository();\n \t\t}\n \t\tString moduleName = modulePage.getModuleName();\n \t\tif (moduleName == null) moduleName = project.getName();\n \t\treturn moduleName;\n \t}", "public Object GetPlugin()\r\n\t{\r\n\t\tif (_isSingleton)\r\n\t\t{\r\n\t\t\tif (_singletonPlugin == null)\r\n\t\t\t{\r\n\t\t\t\ttry {\r\n\t\t\t\t\t_singletonPlugin = ClassFactory.CreateObject(_pluginType);\r\n\t\t\t\t} catch (Exception e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n if (_configuration != null && !_configuration.equals(\"\"))\r\n {\r\n \tPathUtilities.PushFilename(_filename);\r\n \ttry\r\n \t{\r\n XmlFramework.DeserializeXml(_configuration, _singletonPlugin);\r\n \t}\r\n catch(Exception e)\r\n {\r\n _singletonPlugin = null;\r\n }\r\n \tfinally\r\n \t{\r\n \t\tPathUtilities.PopFilename(_filename);\r\n \t}\r\n }\r\n\t\t\t}\r\n\t\t\treturn _singletonPlugin;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tObject plugin = null;\r\n\t\t\ttry {\r\n\t\t\t\tplugin = ClassFactory.CreateObject(_pluginType);\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n if (_configuration != null && !_configuration.equals(\"\"))\r\n {\r\n \tPathUtilities.PushFilename(_filename);\r\n try\r\n {\r\n XmlFramework.DeserializeXml(_configuration, plugin);\r\n }\r\n catch(Exception e)\r\n {\r\n plugin = null;\r\n }\r\n \tfinally\r\n \t{\r\n \tPathUtilities.PopFilename(_filename);\r\n \t}\r\n }\r\n return plugin;\r\n\t\t}\r\n\t}", "public String getBundleId() {\n return this.bundleId;\n }", "public String getModuleId() throws BaseTechnicalError, RemoteException {\n\t return JazzQAConstants.MODULE_PEDVALIDACAO;\n\t}", "public static String getPluginsLocation() {\r\n return pluginsLocation.getValue();\r\n }", "public Long getModuleId() {\n return moduleId;\n }", "private Plugin loadPlugin(String p) {\n Plugin plugin = this.getServer().getPluginManager().getPlugin(p);\n if (plugin != null && plugin.isEnabled()) {\n getLogger().info(\" Using \" + plugin.getDescription().getName() + \" (v\" + plugin.getDescription().getVersion() + \")\");\n return plugin;\n }\n return null;\n }", "public String getPluginIdAttrNs() {\n return pluginIdAttrNs;\n }", "public ModuleRevisionId getId() {\n return descriptor.getResolvedModuleRevisionId();\n }", "public native void loadPlugin(final String plugin);", "public Plugin getModulePlugin(int moduleId) throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException {\n Module module = MODULE_DAO.queryForId(moduleId);\n\n Plugin plugin = (Plugin) Class.forName(module.getPluginClass()).newInstance();\n return plugin;\n }", "public interface Plugin {\n /**\n * What is the name of this plugin?\n *\n * The framework will use this name when storing the versions\n * (code version and schema version) in the database, and, if\n * this is the Application Plugin, in the help menu, main frame\n * title bar, and other displays wherever the application name\n * is shown.\n *\n * The column used to store this in the database is 40\n * characters wide.\n *\n * @return the name of this plugin\n */\n String getName();\n\n /**\n * What is the version number of this plugin's code?\n *\n * The framework will use this name when storing the versions\n * in the database.\n *\n * @return the code version of this plugin\n */\n String getVersion();\n\n /**\n * Allow a plugin to provide any plugin-specific application\n * context files.\n *\n * Can return null or an empty list if there are none.\n * The elements of the list are paths to resources inside the\n * plugin's jar, e.g. org/devzendo/myapp/app.xml\n *\n * @return a list of any application contexts that the plugin\n * needs to add to the SpringLoader, or null, or empty list.\n */\n List<String> getApplicationContextResourcePaths();\n\n /**\n * Give the SpringLoader to the plugin, after the\n * application contexts for all plugins have been loaded\n * @param springLoader the SpringLoader\n */\n void setSpringLoader(final SpringLoader springLoader);\n\n /**\n * Obtain the SpringLoader for plugin use\n * @return the SpringLoader\n */\n SpringLoader getSpringLoader();\n\n /**\n * What is the database schema version of this plugin?\n *\n * The framework will use this name when storing the versions\n * in the database.\n *\n * @return the database schema version of this plugin\n */\n String getSchemaVersion();\n\n /**\n * Shut down the plugin, freeing any resources. Called by the\n * framework upon system shutdown.\n */\n void shutdown();\n}", "public String getId() {\n return mBundle.getString(KEY_ID);\n }", "public static String getModuleId(File f)\n {\n FileReader fr = null;\n try\n {\n fr = new FileReader(f);\n\n final XMLInputFactory xmlInputFactory = XMLInputFactory.newInstance();\n final XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(fr);\n\n while (xmlStreamReader.hasNext())\n {\n if (xmlStreamReader.next() == XMLStreamReader.START_ELEMENT\n && \"module\".equals(xmlStreamReader.getLocalName()))\n {\n for (int i = 0; i < xmlStreamReader.getAttributeCount(); i++)\n {\n String name = xmlStreamReader.getAttributeLocalName(i);\n if (\"name\".equals(name))\n {\n return xmlStreamReader.getAttributeValue(i);\n }\n }\n }\n }\n }\n catch (Exception e)\n {\n // Nothing to do\n }\n finally\n {\n if (null != fr)\n {\n try\n {\n fr.close();\n }\n catch (IOException ioe)\n {\n // Ignore\n }\n }\n }\n\n return null;\n }", "public static PerforceUIPlugin getUIPlugin() {\n return PerforceUIPlugin.getPlugin();\n }", "public static TabbedPropertyViewPlugin getPlugin() {\n return plugin;\n }", "public int getComponentID() {\n return COMPONENT_ID;\n }", "public synchronized String getCanonicalName( Plugin plugin )\n {\n for ( Map.Entry<String, Plugin> entry : pluginsLoaded.entrySet() )\n {\n if ( entry.getValue().equals( plugin ) )\n {\n return entry.getKey();\n }\n }\n return null;\n }", "public final com.francetelecom.admindm.model.Parameter getParamPID() {\n\t\treturn paramPID;\n\t}", "public static Long getPid() {\n String name = ManagementFactory.getRuntimeMXBean().getName();\n List<String> nameParts = Splitter.on('@').splitToList(name);\n if (nameParts.size() == 2) { // 12345@somewhere\n try {\n return Long.parseLong(Iterators.get(nameParts.iterator(), 0));\n } catch (NumberFormatException ex) {\n LOG.warn(\"Failed to get PID from [\" + name + \"]\", ex);\n }\n } else {\n LOG.warn(\"Don't know how to get PID from [\" + name + \"]\");\n }\n return null;\n }", "protected String getProcessId() {\n return getClass().getName();\n }", "public UUID getComponentId();", "public MusterCull getPluginInstance() {\n\t\treturn pluginInstance;\n\t}", "public String getModuleName ()\n\n {\n\n // Returns moduleName when called.\n return moduleName;\n\n }", "String getConfigurationHandlerId();", "public static NatpPlugin getDefault() {\r\n\t\treturn plugin;\r\n\t}", "private Plugin getPluginVersionFromPluginManagement( Plugin plugin )\n {\n\n if ( !isPluginManagementDefined() )\n {\n return plugin;\n }\n\n if ( isPluginVersionDefined( plugin ) )\n {\n return plugin;\n }\n\n Map<String, Plugin> plugins = getMavenProject().getPluginManagement().getPluginsAsMap();\n\n Plugin result = plugins.get( plugin.getKey() );\n if ( result == null )\n {\n return plugin;\n }\n else\n {\n return result;\n }\n }", "public static IPojoExporterPlugin getDefault() {\n\t\treturn sPlugin;\n\t}", "@Override\r\n\tpublic PIDSourceType getPIDSourceType() {\n\t\treturn null;\r\n\t}", "ManifestIdentifier getIdentifier();", "public java.lang.String getParDepId() {\r\n return localParDepId;\r\n }", "public ContextPlugin getPlug() {\n\t\treturn plug;\n\t}", "default String getPackageId() {\n return getIdentifier().getPackageId();\n }", "public interface IPluginManager {\n\tpublic BasePluginPackage initPlugin(String pluginPath);\n\n\tpublic BasePluginPackage getPluginPackage(String packageName);\n\n\tpublic Class loadPluginClass(BasePluginPackage basePluginPackage, String className);\n}", "public Map<String, String> getPluginIdentifierToNameMap() {\n\t\treturn pluginIdentifierToNameMap;\n\t}", "public long getModuleId() {\r\n throw new UnsupportedOperationException(\"please override this method in sub-class.\");\r\n }", "private static URL findPluginBaseWithoutLoadingPlugin(Plugin plugin) {\r\n \ttry {\r\n \t\tURL url = plugin.getClass().getResource(\".\");\r\n \t\ttry {\r\n \t\t\t// Plugin test with OSGi plugin need to resolve bundle resource\r\n\t\t\t\turl = FileLocator.resolve(url);\r\n\t\t\t} catch (NullPointerException e) {\r\n\t\t\t\t// junit non plugin test, OSGi plugin is not loaded\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// junit non plugin test\r\n\t\t\t}\r\n\t\t\tjava.io.File currentFile = new java.io.File(url.toURI());\t//$NON-NLS-1$\r\n\t\t\tdo {\r\n\t\t\t\tcurrentFile = currentFile.getParentFile();\r\n\t\t\t\tif (currentFile.getName().equals(\"bin\") || currentFile.getName().equals(\"src\")) {\t//$NON-NLS-1$ //$NON-NLS-2$\r\n\t\t\t\t\tif (new File(currentFile.getParentFile(), \"plugin.xml\").exists()) {\t\t//$NON-NLS-1$\r\n\t\t\t\t\t\t// Eclipse project should have plugin.xml at root\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\treturn currentFile.getParentFile().toURI().toURL();\r\n\t\t\t\t\t\t} catch (MalformedURLException e) {\r\n\t\t\t\t\t\t\t// give up and just bail out to null like before\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} while (currentFile.getParentFile() != null);\r\n\t\t} catch (URISyntaxException e) {\r\n\t\t\t// give up and just bail out to null like before\r\n\t\t\treturn null;\r\n\t\t}\r\n \treturn null;\r\n }", "public java.lang.String getOSGiServiceIdentifier();", "public java.lang.String getBeanIdentifier() {\n\t\treturn _preschoolParentLocalService.getBeanIdentifier();\n\t}", "public String getComponentId() {\n \t\treturn componentId;\n \t}", "private static String discoverPackageName( PluginDescriptor pluginDescriptor )\n {\n Map packageNames = new HashMap();\n for ( Iterator it = pluginDescriptor.getMojos().iterator(); it.hasNext(); )\n {\n MojoDescriptor descriptor = (MojoDescriptor) it.next();\n \n String impl = descriptor.getImplementation();\n if ( impl.lastIndexOf( '.' ) != -1 )\n {\n String name = impl.substring( 0, impl.lastIndexOf( '.' ) );\n if ( packageNames.get( name ) != null )\n {\n int next = ( (Integer) packageNames.get( name ) ).intValue() + 1;\n packageNames.put( name, Integer.valueOf( \"\" + next ) );\n }\n else\n {\n packageNames.put( name, Integer.valueOf( \"\" + 1 ) );\n }\n }\n else\n {\n packageNames.put( \"\", Integer.valueOf( \"\" + 1 ) );\n }\n }\n \n String packageName = \"\";\n int max = 0;\n for ( Iterator it = packageNames.keySet().iterator(); it.hasNext(); )\n {\n String key = it.next().toString();\n int value = ( (Integer) packageNames.get( key ) ).intValue();\n if ( value > max )\n {\n max = value;\n packageName = key;\n }\n }\n \n return packageName;\n }", "@Override\n\tpublic java.lang.String getBeanIdentifier() {\n\t\treturn _kpiEntryLocalService.getBeanIdentifier();\n\t}", "java.lang.String getProcessId();", "public org.apache.axis.types.Token getComponentID() {\n return componentID;\n }", "public Integer getParID() {\r\n\t\treturn parID;\r\n\t}", "public int getParId() {\n\t\treturn parId;\n\t}", "URI location() {\n if (module.isNamed() && module.getLayer() != null) {\n Configuration cf = module.getLayer().configuration();\n ModuleReference mref\n = cf.findModule(module.getName()).get().reference();\n return mref.location().orElse(null);\n }\n return null;\n }", "@Override\n\tpublic java.lang.String getBeanIdentifier() {\n\t\treturn _vanBanPhapQuyLocalService.getBeanIdentifier();\n\t}", "public String getProviderID() {\n return PROVIDER_ID;\n }", "public static String getPid() {\n\t\tString name = ManagementFactory.getRuntimeMXBean().getName(); \n\t\t// get pid \n\t\treturn name.split(\"@\")[0];\n\t}", "String getModuleVersionNumber();", "public static DepclipsePlugin getDefault() {\n\t return plugin;\n\t}", "public static APLDebugCorePlugin getDefault() {\r\n\t\tif (plugin == null) {\r\n\t\t\tthrow new NullPointerException(\"Probably in test code relying on running outside of OSGi\");\r\n\t\t}\r\n\t\treturn plugin;\r\n\t}", "public EI getPsl4_ProviderTrackingID() { \r\n\t\tEI retVal = this.getTypedField(4, 0);\r\n\t\treturn retVal;\r\n }", "public long getBundleId() {\n return m_bundleId;\n }", "public String getModuleVLHId() throws BaseTechnicalError, RemoteException {\n \treturn JazzQAConstants.MODULE_PEDVALIDACAO_VLH;\n\t}", "public String getProgramId() {\n return pathsProvider.getProgramId();\n }" ]
[ "0.69048977", "0.6900888", "0.6841851", "0.65081215", "0.607741", "0.60259926", "0.5869472", "0.58367485", "0.58367485", "0.5745281", "0.5732031", "0.5729669", "0.56942505", "0.56239754", "0.5597414", "0.5551569", "0.55295444", "0.54929394", "0.54548126", "0.54509425", "0.5445655", "0.54140496", "0.5404244", "0.5398191", "0.53866947", "0.53681284", "0.5362553", "0.53580016", "0.5348302", "0.53476685", "0.52700865", "0.5253755", "0.52499336", "0.5249552", "0.52460736", "0.5242543", "0.52341956", "0.51988095", "0.51741534", "0.51735336", "0.5169945", "0.5133228", "0.51115996", "0.50955254", "0.5082646", "0.50803804", "0.5075062", "0.5065203", "0.5064921", "0.5038795", "0.5015413", "0.5012108", "0.50078505", "0.5001889", "0.49915278", "0.498881", "0.49733263", "0.4965838", "0.49567497", "0.4955672", "0.49470156", "0.4936709", "0.49353012", "0.49298304", "0.49235588", "0.49226955", "0.49202317", "0.4911632", "0.49082318", "0.48828822", "0.4879452", "0.48736915", "0.48702702", "0.48575023", "0.48533142", "0.4850325", "0.48475122", "0.48457435", "0.48415124", "0.48336837", "0.48275265", "0.48213255", "0.4814734", "0.4812861", "0.48044327", "0.48019546", "0.48010993", "0.47988433", "0.47971594", "0.47779924", "0.4766072", "0.4765746", "0.47573715", "0.4754906", "0.4754695", "0.47541964", "0.47536913", "0.47470054", "0.47410893", "0.47385925" ]
0.74335444
0
Implementation of dynamic finders.
public interface MethodCandidate extends Ordered { /** * The default position. */ int DEFAULT_POSITION = 0; /** * Whether the given method name matches this finder. * * @param methodElement The method element. Never null. * @param matchContext The match context. Never null. * @return true if it does */ boolean isMethodMatch(@NonNull MethodElement methodElement, @NonNull MatchContext matchContext); @Override default int getOrder() { return DEFAULT_POSITION; } /** * Builds the method info. The method {@link #isMethodMatch(MethodElement, MatchContext)} should be * invoked and checked prior to calling this method. * * @param matchContext The match context * @return The method info or null if it cannot be built. If the method info cannot be built an error will be reported to * the passed {@link MethodMatchContext} */ @Nullable MethodMatchInfo buildMatchInfo(@NonNull MethodMatchContext matchContext); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n @SuppressWarnings(\"rawtypes\")\n public List dynamicQuery(DynamicQuery dynamicQuery)\n throws SystemException {\n return libroPersistence.findWithDynamicQuery(dynamicQuery);\n }", "@Override\n\tpublic <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {\n\t\treturn itemPublicacaoPersistence.findWithDynamicQuery(dynamicQuery);\n\t}", "@Override\n\tpublic <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {\n\t\treturn csclPollsChoicePersistence.findWithDynamicQuery(dynamicQuery);\n\t}", "public Faq[] findByDynamicWhere(String sql, Object[] sqlParams) throws FaqDaoException;", "public TipologiaStruttura[] findByDynamicWhere(String sql, Object[] sqlParams) throws TipologiaStrutturaDaoException;", "@Override\n\tpublic <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {\n\t\treturn monthlyTradingPersistence.findWithDynamicQuery(dynamicQuery);\n\t}", "public Ruta[] findByDynamicWhere(String sql, Object[] sqlParams) throws RutaDaoException;", "@Override\r\n\tpublic DeptBean[] findByDynamicWhere(String sql, Object[] sqlParams)\r\n\t\t\tthrows SQLException {\n\t\tList<Map<String, Object>> resultList = new ArrayList<Map<String,Object>>();\r\n\t\tdeptConn = this.getConnection();\r\n\t\tfinal String SQL = SQL_SELECT + \" WHERE \" + sql;\r\n\t\tresultList = this.executeQuery(deptConn, SQL, sqlParams);\r\n\t\tif (deptConn != null) {\r\n\t\t\tthis.closeConnection(deptConn);\r\n\t\t}\r\n\t\treturn MapToObject(resultList);\r\n\t}", "public Faq[] findByDynamicSelect(String sql, Object[] sqlParams) throws FaqDaoException;", "public Items[] findByDynamicWhere(String sql, Object[] sqlParams) throws ItemsDaoException;", "public interface LookupManager {\n\n /**\n * Look up a service instance by the service name.\n *\n * It selects one instance from a set of instances for a given service based on round robin strategy.\n *\n * @param serviceName The Service name.\n * @return The ServiceInstance.\n * @throws ServiceException\n */\n public ServiceInstance lookupInstance(String serviceName);\n\n /**\n * Look up a list of service instances for a given service.\n *\n * It returns the complete list of the service instances.\n *\n * @param serviceName The Service name.\n * @return The ServiceInstance list.\n * @throws ServiceException\n */\n public List<ServiceInstance> lookupInstances(String serviceName);\n\n /**\n * Query for a service instance based on the service name and some filtering criteria on the service metadata.\n *\n * It returns a service instance from the service instance list based on round robin selection strategy.\n * The ServiceInstance list is of the specified Service.\n *\n * @param serviceName The Service name.\n * @param query The ServiceInstanceQuery for filtering the service instances.\n * @return The ServiceInstance.\n * @throws ServiceException\n */\n public ServiceInstance queryInstanceByName(String serviceName, ServiceInstanceQuery query);\n\n /**\n * Query for all the ServiceInstances of the specified Service, which satisfy the query criteria on the service metadata.\n *\n * It returns all ServiceInstances of specified Service that satisfy the ServiceInstanceQuery.\n * The ServiceInstance list is of the specified Service.\n *\n * @param serviceName The Service name.\n * @param query The ServiceInstanceQuery for filtering the service instances.\n * @return The ServiceInstance list.\n * @throws ServiceException\n */\n public List<ServiceInstance> queryInstancesByName(String serviceName, ServiceInstanceQuery query);\n\n /**\n * Query for one the ServiceInstances which satisfy the query criteria on the service metadata.\n *\n * It returns a service instance from the service instance list based on round robin selection strategy.\n * The ServiceInstance list have different Services.\n *\n * @param query The ServiceInstanceQuery for filtering the service instances.\n * @return The ServiceInstance list.\n * @throws ServiceException\n */\n public ServiceInstance queryInstanceByKey(ServiceInstanceQuery query);\n\n /**\n * Query for all the ServiceInstances which satisfy the query criteria on the service metadata.\n *\n * It returns all ServiceInstances of different Services which satisfy the query criteria.\n *\n * @param query The ServiceInstanceQuery for filtering the service instances.\n * @return The ServiceInstance list.\n * @throws ServiceException\n */\n public List<ServiceInstance> queryInstancesByKey(ServiceInstanceQuery query);\n\n /**\n * Get a ServiceInstance.\n *\n * It returns a ServiceInstances of the Service including the ServiceInstance of OperationalStatus DOWN.\n *\n * @param serviceName\n * the service name.\n * @param instanceId\n * the istanceId\n * @return\n * the ServiceInstance.\n * @throws ServiceException\n */\n public ServiceInstance getInstance(String serviceName, String instanceId);\n\n /**\n * Get all ServiceInstance List of the target Service, including the DOWN ServiceInstance.\n *\n * It will return all ServiceInstances of the Service including the ServiceInstance of OperationalStatus DOWN.\n *\n * @param serviceName\n * the service name.\n * @return\n * the ServiceInstance List.\n * @throws ServiceException\n */\n public List<ServiceInstance> getAllInstances(String serviceName);\n\n /**\n * Get all ServiceInstances of the specified Service, including the DOWN ServiceIntance,\n * which satisfy the query criteria on the service metadata.\n *\n * It filter all ServiceInstances of the specified Service including the ServiceInstance of OperationalStatus DOWN,\n * against the ServiceInstanceQuery.\n *\n * @param serviceName\n * the Service name.\n * @param query\n * the ServiceInstanceQuery.\n * @return\n * the ServiceInstance List.\n * @throws ServiceException\n */\n public List<ServiceInstance> getAllInstances(String serviceName, ServiceInstanceQuery query);\n\n /**\n * Get all the ServiceInstances, including the DOWN ServiceInstance, which satisfy the query criteria on the service metadata.\n *\n * It filters all ServiceInstances of different Services, including the DOWN ServiceInstance,\n * which satisfy the query criteria.\n *\n * @param query\n * the ServiceInstanceQuery criteria.\n * @return\n * the ServiceInstance List.\n * @throws ServiceException\n */\n public List<ServiceInstance> getAllInstancesByKey(ServiceInstanceQuery query);\n\n /**\n * Get the all ServiceInstances in the ServiceDirectory including the DOWN ServiceInstance.\n *\n * @return\n * the ServiceInstance List.\n * @throws ServiceException\n */\n public List<ServiceInstance> getAllInstances();\n\n /**\n * Add a NotificationHandler to the Service.\n *\n * This method can check the duplicate NotificationHandler for the serviceName, if the NotificationHandler\n * already exists in the serviceName, do nothing.\n *\n * Throw IllegalArgumentException if serviceName or handler is null.\n *\n * @param serviceName\n * the service name.\n * @param handler\n * the NotificationHandler for the service.\n * @throws ServiceException\n */\n public void addNotificationHandler(String serviceName, NotificationHandler handler);\n\n /**\n * Remove the NotificationHandler from the Service.\n *\n * Throw IllegalArgumentException if serviceName or handler is null.\n *\n * @param serviceName\n * the service name.\n * @param handler\n * the NotificationHandler for the service.\n * @throws ServiceException\n */\n public void removeNotificationHandler(String serviceName, NotificationHandler handler) ;\n}", "public SgfensPedidoProducto[] findByDynamicWhere(String sql, Object[] sqlParams) throws SgfensPedidoProductoDaoException;", "@Override\n\tpublic <T> List<T> dynamicQuery(\n\t\tDynamicQuery dynamicQuery, int start, int end) {\n\n\t\treturn csclPollsChoicePersistence.findWithDynamicQuery(\n\t\t\tdynamicQuery, start, end);\n\t}", "public interface RecipeManager {\n \n /** \n * creates a recipe in DB\n * @param recipe recipe to be created\n */\n void createRecipe(Recipe recipe) throws ServiceFailureException;\n \n /**\n * deletes a recipe from DB\n * @param recipe recipe to be deleted\n */\n void deleteRecipe(Recipe recipe) throws ServiceFailureException;\n \n /**\n * edit a recipe in DB\n * @param recipe recipe to be edited \n */\n void updateRecipe(Recipe recipe) throws ServiceFailureException;\n \n /**\n * find recipe by ID\n * @param id id of the searched recipe\n * @return recipe with entered ID\n */ \n Recipe findRecipeById(Long id) throws ServiceFailureException;\n \n /**\n * find recipes, that have this substring in their names\n * @param name name of the searched recipes\n * @return set of recipes with entered substring\n */\n SortedSet<Recipe> findRecipesByName(String name) throws ServiceFailureException;\n \n /**\n * find recipes by it's type\n * @param type type of the searched recipes\n * @return set of recipes with entered type\n */\n SortedSet<Recipe> findRecipesByType(MealType type) throws ServiceFailureException;\n \n /**\n * find recipes by it's category\n * @param category category of the searched recipes\n * @return set of recipes with entered category\n */\n SortedSet<Recipe> findRecipesByCategory(MealCategory category) throws ServiceFailureException;\n \n /**\n * find recipes by it's cooking time\n * @param fromTime lower border of the searched cooking time\n * @param toTime upper border of the searched cooking time\n * @return set of recipes with cooking time between lower and upper borders\n */\n SortedSet<Recipe> findRecipesByCookingTime(int fromTime, int toTime) throws ServiceFailureException;\n SortedSet<Recipe> findRecipesUptoCookingTime(int toTime) throws ServiceFailureException;\n SortedSet<Recipe> findRecipesFromCookingTime(int fromTime) throws ServiceFailureException;\n \n /**\n * find all recipes in the recipe book\n * @return all recipes in the system\n */\n SortedSet<Recipe> findAllRecipes() throws ServiceFailureException;\n}", "public abstract T findByName(String name) ;", "public NominaPuesto[] findByDynamicWhere(String sql, Object[] sqlParams) throws NominaPuestoDaoException;", "interface BuildingRepositoryCustom {\n\n /**\n * The constant ALL_RESULTS.\n */\n int ALL_RESULTS = 0;\n\n /**\n * Find by filter text list.\n *\n * @param words the words\n * @param justIds the just ids\n * @return the list\n */\n List findByFilterText(Set<String> words, boolean justIds);\n\n /**\n * Find building coordinates by type list.\n *\n * @param type the type\n * @return the list\n */\n List<Building> findBuildingCoordinatesByType(String type);\n\n /**\n * Find by distance list.\n *\n * @param latitude the latitude\n * @param longitude the longitude\n * @param maxDistance the max distance\n * @param maxResults the max results\n * @return the list\n */\n List findByDistance(Double latitude, Double longitude, int maxDistance, int maxResults);\n}", "public interface fileSearch {\r\n /**\r\n * 根据Condition条件进行数据库的检索\r\n */\r\n List<Thing> search(Condition condition);\r\n}", "public SgfensBanco[] findByDynamicWhere(String sql, Object[] sqlParams) throws SgfensBancoDaoException;", "@Override\n public SearchEngine getSearchEngine() throws DataAccessException {\n SearchEngine searchEngine = super.getSearchEngine();\n if (searchEngine == null && hasIdentification()) {\n String query = \"select search_engine from pride_identification where identification_id=?\";\n Comparable identId = CollectionUtils.getElement(getIdentificationIds(), 0);\n String seStr = jdbcTemplate.queryForObject(query, String.class, identId);\n searchEngine = new SearchEngine(seStr);\n\n // get search engine types\n Map<Comparable, ParamGroup> params = (Map<Comparable, ParamGroup>) getCache().get(CacheCategory.PEPTIDE_TO_PARAM);\n if (params != null && !params.isEmpty()) {\n Collection<ParamGroup> paramGroups = params.values();\n ParamGroup paramGroup = CollectionUtils.getElement(paramGroups, 0);\n searchEngine.setSearchEngineTypes(DataAccessUtilities.getSearchEngineTypes(paramGroup));\n }\n getCache().store(CacheCategory.SEARCH_ENGINE_TYPE, searchEngine);\n }\n\n return searchEngine;\n }", "@Override\r\n\tpublic DeptBean[] findByDynamicSelect(String sql, Object[] sqlParams)\r\n\t\t\tthrows SQLException {\n\t\tList<Map<String, Object>> resultList = new ArrayList<Map<String,Object>>();\r\n\t\tdeptConn = this.getConnection();\r\n\t\tresultList = this.executeQuery(deptConn, sql, sqlParams);\r\n\t\tif (deptConn != null) {\r\n\t\t\tthis.closeConnection(deptConn);\r\n\t\t}\r\n\t\treturn MapToObject(resultList);\r\n\t}", "public Items[] findByDynamicSelect(String sql, Object[] sqlParams) throws ItemsDaoException;", "public Cliente[] findByDynamicWhere(String sql, Object[] sqlParams) throws ClienteDaoException;", "abstract public void search();", "@Override\n public List<Doctor> searchBySpecialization(String specialization) throws IOException, ClassNotFoundException {\n doctorList = FileSystem.readFile(file, Doctor.class);\n List<Doctor> searchList = search(doctorList, Doctor::getSpecialization, specialization);\n return searchList;\n }", "public interface FactRepository {\n\n List<Fact> find(String topic);\n}", "public interface ISearchService {\n public static final String cacheName = \"searchService\";\n\n String splitGoodsName(String goodsName);\n\n public List<Goods> sortByPrice(List<Goods> goodsList, boolean flag);\n\n public List<Goods> sortByTime(List<Goods> goodsList, boolean flag);\n\n public List<Goods> sortBySales(List<Goods> goodsList, boolean flag);\n\n List<Goods> getGoodsByWord(String goodsName);\n\n List<Goods> ascByPrice(String goodsName);\n\n List<Goods> ascBySales(String goodsName);\n\n List<Goods> ascByCreateTime(String goodsName);\n\n List<Goods> descByPrice(String goodsName);\n\n List<Goods> descBySales(String goodsName);\n\n List<Goods> descByCreateTime(String goodsName);\n}", "public TipologiaStruttura[] findByDynamicSelect(String sql, Object[] sqlParams) throws TipologiaStrutturaDaoException;", "public Ruta[] findByDynamicSelect(String sql, Object[] sqlParams) throws RutaDaoException;", "Getter<ENTITY, FK> finder();", "public <T> T getImplementation(Class<T> clazz) {\n\t\tAssertUtil.assertNotNull(\"Dynamic CDIs must be set or injected\", this.dynamicCdis);\n\t\t\n\t\t// Get the tag for the specified class\n\t\tString tagName = JuUtils.getJuPropertyChain().get(clazz.getName(), false);\n\t\t\n\t\tString defaultTagName = JuUtils.getJuPropertyChain().get(\"ju.ee.cdi.defaultDynamicCdiTag\", \"-\");\n\t\t\n\t\tlogger.debug(\"Looking for implementation of class {} (tag={}, defaultTag={})\", clazz, tagName, defaultTagName);\n\t\t\n\t\tMap<String, TypeCreator<T>> implementations = new HashMap<>();\n\t\t\n\t\tfor (DynamicCdi simulatable : dynamicCdis) {\n\t\t\t// Handle factories\n\t\t\tif (DynamicCdiFactory.class.isAssignableFrom(simulatable.getClass())) {\n\t\t\t\tfor (Method method : ReflectUtils.getDeclaredMethodsByAnnotation(simulatable.getClass(), DynamicCdiTag.class)) {\n\t\t\t\t\tif (method.getReturnType() == null || method.getParameterTypes().length > 0) {\n\t\t\t\t\t\tlogger.warn(\"Illegal DynamicCdiFactory method. Must return a type and not have arguments: \" + method);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (clazz.isAssignableFrom(method.getReturnType())) {\n\t\t\t\t\t\t\t// Found match\n\t\t\t\t\t\t\tfinal DynamicCdi factory = simulatable;\n\t\t\t\t\t\t\tfinal Method factoryMethod = method;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.addType(clazz\n\t\t\t\t\t\t\t\t\t, implementations\n\t\t\t\t\t\t\t\t\t, method.getAnnotation(DynamicCdiTag.class)\n\t\t\t\t\t\t\t\t\t, new TypeCreator<T>() {\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic T createType() {\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\t\t\t\t\t\t\tT t = (T) factoryMethod.invoke(factory, (Object[])null);\n\t\t\t\t\t\t\t\t\t\t\t\treturn t;\n\t\t\t\t\t\t\t\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t\t\t\t\t\t\t\tthrow new JuRuntimeException(\"Couldn't invoke method \" + factoryMethod, ex);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic String toString() {\n\t\t\t\t\t\t\t\t\t\t\treturn factoryMethod.toString();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (clazz.isAssignableFrom(simulatable.getClass())) {\n\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\tfinal T type = (T)simulatable;\n\t\t\t\t\t\n\t\t\t\t\tthis.addType(clazz\n\t\t\t\t\t\t\t, implementations\n\t\t\t\t\t\t\t, type.getClass().getAnnotation(DynamicCdiTag.class)\n\t\t\t\t\t\t\t, new TypeCreator<T>() {\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic T createType() {\n\t\t\t\t\t\t\t\t\treturn type;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic String toString() {\n\t\t\t\t\t\t\t\t\treturn type.getClass().getName();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (implementations.containsKey(tagName)) {\n\t\t\tlogger.debug(\"Returning intance by tag match: {}\", implementations.get(tagName));\n\t\t\treturn implementations.get(tagName).createType();\n\t\t} else if (implementations.containsKey(defaultTagName)) {\n\t\t\tlogger.debug(\"Returning default instance: {}\", implementations.get(defaultTagName));\n\t\t\treturn implementations.get(defaultTagName).createType();\n\t\t} else {\n\t\t\tthrow new JuRuntimeException(String.format(\"No dynamic implementation found for %s and tagName=%s or defaultTagName=%s\",\n\t\t\t\tclazz.getName(), tagName, defaultTagName));\n\t\t}\n\t}", "public abstract ServiceLocator find(String name);", "@Override\n\tpublic <T> java.util.List<T> dynamicQuery(\n\t\tcom.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {\n\t\treturn _weatherLocalService.dynamicQuery(dynamicQuery);\n\t}", "public DynamicMethod searchMethod(String name) {\n return searchWithCache(name).method;\n }", "protected abstract List performQuery(String[] ids);", "@Override\n\tpublic List<T> findListByQueryDinamic(String s) throws Exception {\n\t\treturn null;\n\t}", "public interface PathResolveStrategy {\r\n\tpublic Document getDocument(String id, int num);\r\n\tpublic int getNumberOfFiles(String id);\r\n}", "public SgfensPedidoProducto[] findByDynamicSelect(String sql, Object[] sqlParams) throws SgfensPedidoProductoDaoException;", "public interface SearchQuerySet extends QuerySet\n{\n\n // for AbstractSearch\n public static final int STAT_MODELS = 1;\n public static final int STAT_CLUSTERS = 2;\n public static final int STAT_GENOMES = 4;\n public static final int STAT_MODEL_CLUSTERS = 8;\n\n public String getStatsById(Collection data);\n public String getStatsByQuery(String query);\n public String getStatsById(Collection data,int stats);\n public String getStatsByQuery(String query,int stats);\n \n // for BlastSearch\n public String getBlastSearchQuery(Collection dbNames, Collection keys, KeyTypeUser.KeyType keyType);\n \n //for ClusterIDSearch\n public String getClusterIDSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for ClusterNameSearch\n public String getClusterNameSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for DescriptionSearch\n public String getDescriptionSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for GoSearch \n public String getGoSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for GoTextSearch\n public String getGoTextSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for IdSearch\n public String getIdSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for QueryCompSearch\n public String getQueryCompSearchQuery(String comp_id, String status, KeyTypeUser.KeyType keyType);\n \n // for QuerySearch\n public String getQuerySearchQuery(String queries_id, KeyTypeUser.KeyType keyType); \n \n // for SeqModelSearch\n public String getSeqModelSearchQuery(Collection model_ids, KeyTypeUser.KeyType keyType);\n \n // for UnknowclusterIdSearch\n public String getUnknownClusterIdSearchQuery(int cluster_id, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetSearch\n public String getProbeSetSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetKeySearch\n public String getProbeSetKeySearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for QueryTestSearch\n public String getQueryTestSearchQuery(String query_id, String version, String genome_id);\n \n // for QueryStatsSearch\n public String getQueryStatsSearchQuery(List query_ids,List DBs);\n \n // for PskClusterSearch\n public String getPskClusterSearchQuery(int cluster_id,KeyTypeUser.KeyType keyType);\n \n // for ClusterCorrSearch\n public String getClusterCorrSearchQuery(int cluster_id, int psk_id, KeyTypeUser.KeyType keyType);\n \n // for UnknownGenesSearch\n public String getUnknownGenesSearchQuery(Collection sources, KeyTypeUser.KeyType keyType);\n \n}", "public NominaPuesto[] findByDynamicSelect(String sql, Object[] sqlParams) throws NominaPuestoDaoException;", "public interface ItemDAO extends DSpaceObjectDAO<Item> {\n\n public Iterator<Item> findAll(Context context, boolean archived) throws SQLException;\n\n public Iterator<Item> findAll(Context context, boolean archived, boolean withdrawn) throws SQLException;\n\n public Iterator<Item> findBySubmitter(Context context, EPerson eperson) throws SQLException;\n\n public Iterator<Item> findByMetadataField(Context context, MetadataField metadataField, String value, boolean inArchive) throws SQLException;\n\n public Iterator<Item> findByAuthorityValue(Context context, MetadataField metadataField, String authority, boolean inArchive) throws SQLException;\n\n public Iterator<Item> findArchivedByCollection(Context context, Collection collection, Integer limit, Integer offset) throws SQLException;\n\n public Iterator<Item> findAllByCollection(Context context, Collection collection) throws SQLException;\n\n}", "public abstract S getSearch();", "public Tipo[] findByDynamicWhere(String sql, Object[] sqlParams)\r\n throws TipoDaoException;", "@RequestMapping(method = RequestMethod.GET)\r\n public Callable<ResponseObject> findAll() {\r\n return new Callable<ResponseObject>() {\r\n @Override\r\n public ResponseObject call() throws Exception {\r\n return candidateService.findAll();\r\n }\r\n };\r\n }", "@Override\n\tpublic List<T> findByName(String name) {\n\t\treturn baseDaoImpl.findByName(name);\n\t}", "public SgfensBanco[] findByDynamicSelect(String sql, Object[] sqlParams) throws SgfensBancoDaoException;", "public List getRuleFinders() {\n if (ruleFinders == null) {\n // when processing a plugin declaration, attempts are made to\n // find custom rules in the order in which the Finder objects\n // are added below. However this list can be modified\n ruleFinders = new LinkedList();\n ruleFinders.add(new FinderFromFile());\n ruleFinders.add(new FinderFromResource());\n ruleFinders.add(new FinderFromClass());\n ruleFinders.add(new FinderFromMethod());\n ruleFinders.add(new FinderFromDfltMethod());\n ruleFinders.add(new FinderFromDfltClass());\n ruleFinders.add(new FinderFromDfltResource());\n ruleFinders.add(new FinderFromDfltResource(\".xml\"));\n ruleFinders.add(new FinderSetProperties());\n }\n return ruleFinders;\n }", "public interface Repository<E> {\n\n\t/**\n\t * Uses mongodb bson to find stored object\n\t * @param critera name-value paired\n\t * @return generic object\n\t */\n\tpublic E find(MongoDBCritera critera);\n\t\n\t/**\n\t * Alternative for find with MongoDBCritera\n\t * @param key key to filter\n\t * @param value value to find\n\t * @return found generic object\n\t */\n\tdefault E find(String key, Object value) {\n\t\tSearchCritera searchCritera = new SearchCritera(key, value);\n\t\treturn find(() -> searchCritera);\n\t}\n\t\n\t/**\n\t * Finds all stored generic objects\n\t * @return a collection of stored objects\n\t */\n\tpublic List<E> findAll();\n\t\n\t/**\n\t * Uses $set to override old data\n\t * @param entity to override\n\t */\n\tpublic void update(E entity);\n\t\n\t/**\n\t * Inserts generic type, won't add if already exists\n\t * @param entity entity to add\n\t */\n\tpublic void add(E entity);\n\t\n\t/**\n\t * Removes generic object, alternative form below\n\t * @param critera to search upon\n\t */\n\tpublic void remove(MongoDBCritera critera);\n\t\n\t/**\n\t * Optional method for filtering objects\n\t * @param key to search on\n\t * @param value to find\n\t */\n\tdefault void remove(String key, Object value) {\n\t\tSearchCritera searchCritera = new SearchCritera(key, value);\n\t\tremove(() -> searchCritera);\n\t}\n}", "public interface RuntimeRepository extends Configurable {\r\n\r\n\t/**\r\n\t * Generates new unique script runtime id.\r\n\t * \r\n\t * @return the runtime id value\r\n\t * @throws PersistenceException\r\n\t * in case of any repository access issues\r\n\t */\r\n\tObject getNextRuntimeId() throws PersistenceException;\r\n\r\n\t/**\r\n\t * Creates runtime record in the repository.\r\n\t * \r\n\t * @param record\r\n\t * a record to save\r\n\t * @throws PersistenceException\r\n\t * in case of any repository issues\r\n\t */\r\n\tvoid createRuntimeRecord(ScriptRuntimeDTO record) throws PersistenceException;\r\n\r\n\t/**\r\n\t * Updates runtime record in the repository.\r\n\t * \r\n\t * @param record\r\n\t * a record to update\r\n\t * @throws PersistenceException\r\n\t * in case of any repository issues\r\n\t */\r\n\tvoid updateRuntimeRecord(ScriptRuntimeDTO record) throws PersistenceException;\r\n\r\n\t/**\r\n\t * Fetches runtime records by the given criteria. Result is paginated.\r\n\t * \r\n\t * @param criteria\r\n\t * query criteria\r\n\t * @param pagingOptions\r\n\t * pagination options\r\n\t * @return {@link QueryPage} instance\r\n\t * @throws PersistenceException\r\n\t * in case of any repository access issues\r\n\t */\r\n\tQueryPage<ScriptRuntimeDTO> fetch(ScriptRuntimeCriteria criteria, QueryPagingOptions pagingOptions)\r\n\t\t\tthrows PersistenceException;\r\n}", "public DatiBancari[] findByDynamicWhere(String sql, Object[] sqlParams) throws DatiBancariDaoException;", "public RelacionConceptoEmbalaje[] findByDynamicWhere(String sql, Object[] sqlParams) throws RelacionConceptoEmbalajeDaoException;", "@Override\n\tpublic <T> List<T> dynamicQuery(\n\t\tDynamicQuery dynamicQuery, int start, int end,\n\t\tOrderByComparator<T> orderByComparator) {\n\n\t\treturn csclPollsChoicePersistence.findWithDynamicQuery(\n\t\t\tdynamicQuery, start, end, orderByComparator);\n\t}", "@SelectProvider(type = BaseProvider.class, method = \"findAll\")\n List<T> findAll();", "public interface ResourceDAO {\n //通过资源信息获取id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \")\n public List<Long> findIdByResourceInfo(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId) ;\n\n //通过资源信息和可用性获取可用id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \" +\n \" AND r.state = #{state} \")\n public List<Long> findIdByResourceInfoAndState(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId,\n @Param(\"state\") int state) ;\n\n //通过ids获取资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取可用的资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.state = #{state} \",\n \" AND r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIdsAndState(@Param(\"ids\") List<Long> ids , @Param(\"state\") int state) ;\n\n //通过ids获取资源信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceInfosByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源名称\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceName \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceNameByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源可用信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.state \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithStateByIds(@Param(\"ids\") List<Long> ids) ;\n\n\n //获取所有处于某种状态下的资源信息\n @Select(\" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.state = #{state} \")\n public List<ResourceRecord> findIdsWithResourceInfoByState(@Param(\"state\") int state) ;\n\n //通过名字获取资源记录(分页)\n @Select(\" SELECT * \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \" +\n \" LIMIT ${skip},${size} \")\n public List<ResourceRecord> findByNameInPage(@Param(\"name\") String name,\n @Param(\"skip\") int skip,\n @Param(\"size\") int size);\n //通过名字获取资源数\n @Select(\" SELECT count(1) \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \")\n long getCountByName(@Param(\"name\") String name);\n\n\n //获取资源树信息\n @Select(\"SELECT r.resourceId , r.resourceName , r.parentId , r.state FROM btl_resource r\")\n public List<ResourceRecord> findAllRoleIdsWithRoleNameAndParentIdAndState() ;\n\n //添加资源\n @Insert(\" INSERT IGNORE INTO btl_resource(createTime , resourceCode , resourceName , resourceURL , resourceMethodType , systemId , state , parentId , resourceMemo) \" +\n \" VALUES(now() , #{re.resourceCode} , #{re.resourceName} , #{re.resourceURL} , #{re.resourceMethodType} , #{re.systemId} , #{re.state} , #{re.parentId} , #{re.resourceMemo}) \")\n public int insertResource(@Param(\"re\") ResourceRecord re);\n\n //删除资源\n @Delete(\"DELETE FROM btl_resource WHERE resourceId=#{resourceId}\")\n public int deleteById(@Param(\"resourceId\") long resourceId);\n\n //更新资源\n @Update(\"UPDATE btl_resource SET \" +\n \" resourceCode = #{re.resourceCode} , \" +\n \" resourceName = #{re.resourceName} , \" +\n \" resourceURL = #{re.resourceURL} , \" +\n \" resourceMethodType = #{re.resourceMethodType} , \" +\n \" systemId = #{re.systemId} , \" +\n \" state = #{re.state} , \" +\n \" parentId = #{re.parentId} , \" +\n \" resourceMemo = #{re.resourceMemo} \" +\n \" WHERE resourceId = #{re.resourceId}\")\n public int updateResource(@Param(\"re\") ResourceRecord re);\n\n}", "public <E extends Retrievable> List<E> getObjects(String sql, Class<E> clazz);", "public interface ApplianceDAO {\n /**\n * Finds all the appliances that match the given criteria\n *\n * @param criteria criteria that shall be matched in an appliance\n * @return array of appliances that match the criteria or null is criteria is invalid\n */\n Appliance[] find(Criteria[] criteria);\n}", "public interface DaoInfoFinder {\n\n /**\n * 查询dao信息\n * @param roundEnvironment\n * @param daoProxyMap\n * @param elements\n */\n void findDaoProxy(RoundEnvironment roundEnvironment, Map<String, DaoInfo> daoProxyMap, Elements elements);\n}", "public interface DataFetchingStrategy {\n \n\tpublic String fetchData(String url) throws DataFetchingException;\n}", "@Override\n public List<Doctor> searchByName(String name) throws IOException, ClassNotFoundException {\n doctorList = FileSystem.readFile(file, Doctor.class);\n List<Doctor> searchList = search(doctorList, Doctor::getName, name);\n return searchList;\n }", "public List<Record> executeNativeFinder(String queryName, Object context);", "public Cliente[] findByDynamicSelect(String sql, Object[] sqlParams) throws ClienteDaoException;", "public SmsAgendaGrupo[] findByDynamicWhere(String sql, Object[] sqlParams) throws SmsAgendaGrupoDaoException;", "protected Iterable<ConfigSearcher.Domain> getSearcherDomains ()\n {\n return ImmutableList.<ConfigSearcher.Domain>of(new ConfigSearcher.ConfigDomain(this));\n }", "@Override\n @SuppressWarnings(\"rawtypes\")\n public List dynamicQuery(DynamicQuery dynamicQuery)\n throws SystemException {\n return banking_organizationPersistence.findWithDynamicQuery(dynamicQuery);\n }", "public abstract T findByID(ID id) ;", "public CrGrupoFormulario[] findByDynamicWhere(String sql, Object[] sqlParams) throws CrGrupoFormularioDaoException;", "@Override\n\tpublic List<T> find(String hql) {\n\t\treturn hibernateTemplate.find(hql);\n\t}", "@Override\n public List<String> getFindersWhichCanBePublish(RepositoryJpaMetadata repositoryMetadata,\n ControllerMVCResponseService responseType) {\n List<String> finders = new ArrayList<String>();\n for (Pair<FinderMethod, PartTree> item : repositoryMetadata.getFindersToAddInCustom()) {\n finders.add(item.getKey().getMethodName().getSymbolName());\n }\n Collections.sort(finders);\n return finders;\n }", "public Usuario[] findByDynamicWhere(String sql, Object[] sqlParams) throws SQLException;", "public List<T> findAll() {\n\n\t\tConnection dbConnection = ConnectionFactory.getConnection();\n\t\tPreparedStatement findStatement = null;\n\t\tResultSet rs = null;\n\t\tString findStatementString = \"SELECT * FROM \" + type.getSimpleName();\n\n\t\ttry {\n\t\t\tfindStatement = dbConnection.prepareStatement(findStatementString);\n\t\t\trs = findStatement.executeQuery();\n\t\t\treturn createObjects(rs);\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.log(Level.WARNING, type.getName() + \"DAO:findAll\" + e.getMessage());\n\t\t} finally {\n\t\t\tConnectionFactory.close(rs);\n\t\t\tConnectionFactory.close(findStatement);\n\t\t\tConnectionFactory.close(dbConnection);\n\t\t}\n\t\treturn null;\n\t}", "public static DynamicExpression dynamic(CallSiteBinder binder, Class type, Iterable<Expression> expressions) { throw Extensions.todo(); }", "public interface IEngineDAO extends ISpagoBIDao{\n\t\n\t\n\t/**\n\t * Loads all detail information for an engine identified by its <code>engineID</code>. All these information,\n\t * achived by a query to the DB, are stored into an <code>engine</code> object, which is\n\t * returned.\n\t * \n\t * @param engineID The id for the engine to load\n\t * \n\t * @return An <code>engine</code> object containing all loaded information\n\t * \n\t * @throws EMFUserError If an Exception occurred\n\t */\n\tpublic Engine loadEngineByID(Integer engineID) throws EMFUserError;\n\t\n\t\n\t/**\n\t * Loads all detail information for an engine identified by its <code>engineLabel</code>. All these information,\n\t * achived by a query to the DB, are stored into an <code>engine</code> object, which is\n\t * returned.\n\t * \n\t * @param engineLabel The label for the engine to load\n\t * \n\t * @return An <code>engine</code> object containing all loaded information\n\t * \n\t * @throws EMFUserError If an Exception occurred\n\t */\n\tpublic Engine loadEngineByLabel(String engineLabel) throws EMFUserError;\n\t\n\t/**\n\t * Loads all detail information for an engine identified by its <code>driver</code>. All these information,\n\t * achived by a query to the DB, are stored into an <code>engine</code> object, which is\n\t * returned.\n\t * \n\t * @param driver The name for the engine to load\n\t * \n\t * @return An <code>engine</code> object containing all loaded information\n\t * \n\t * @throws EMFUserError If an Exception occurred\n\t */\n\tpublic Engine loadEngineByDriver(String driver) throws EMFUserError;\n\t\n\t\n\t/**\n\t * Loads all detail information for all engines. For each of them, detail\n\t * information is stored into an <code>engine</code> object. After that, all engines\n\t * are stored into a <code>List</code>, which is returned.\n\t * \n\t * @return A list containing all engine objects\n\t * \n\t * @throws EMFUserError If an Exception occurred\n\t */\n\t\n\tpublic List<Engine> loadAllEngines() throws EMFUserError;\n\t\n\t\n\t/**\n\t * Loads all detail information for all engines in paged way. For each of them, detail\n\t * information is stored into an <code>engine</code> object. After that, all engines inside the paging logic\n\t * are stored into a <code>List</code>, which is returned.\n\t * \n\t * @return A list containing all engine objects\n\t * \n\t * @throws EMFUserError If an Exception occurred\n\t */\n\t\n\tpublic List<Engine> loadPagedEnginesList(Integer offset, Integer fetchSize) throws EMFUserError;\n\t\n\t\n\t/**\n\t * Loads all detail information for all engines filtered by tenant. For each of them, detail\n\t * information is stored into an <code>engine</code> object. After that, all engines\n\t * are stored into a <code>List</code>, which is returned.\n\t * \n\t * @return A list containing all engine objects\n\t * \n\t * @throws EMFUserError If an Exception occurred\n\t */\n\t\n\tpublic List<Engine> loadAllEnginesByTenant() throws EMFUserError;\n\t/**\n\t * Loads all detail information for all engines compatible to the BIObject type specified \n\t * at input and the tenant. For each of them, detail information is stored into an <code>engine</code> object.\n\t * After that, all engines are stored into a <code>List</code>, which is returned.\n\t * \n\t * @param biobjectType the biobject type\n\t * \n\t * @return A list containing all engine objects compatible with the BIObject type passed at input\n\t * \n\t * @throws EMFUserError If an Exception occurred\n\t */\n\t\n\tpublic List<Engine> loadAllEnginesForBIObjectTypeAndTenant(String biobjectType) throws EMFUserError;\n\t/**\n\t * Loads all detail information for all engines compatible to the BIObject type specified\n\t * at input. For each of them, detail information is stored into an <code>engine</code> object.\n\t * After that, all engines are stored into a <code>List</code>, which is returned.\n\t * \n\t * @param biobjectType the biobject type\n\t * \n\t * @return A list containing all engine objects compatible with the BIObject type passed at input\n\t * \n\t * @throws EMFUserError If an Exception occurred\n\t */\n\t\n\tpublic List<Engine> loadAllEnginesForBIObjectType(String biobjectType) throws EMFUserError;\n\t/**\n\t * Implements the query to modify an engine. All information needed is stored\n\t * into the input <code>engine</code> object.\n\t * \n\t * @param aEngine The object containing all modify information\n\t * \n\t * @throws EMFUserError If an Exception occurred\n\t */\n\t\n\tpublic void modifyEngine(Engine aEngine) throws EMFUserError;\n\t\n\t/**\n\t * Implements the query to insert an engine. All information needed is stored\n\t * into the input <code>engine</code> object.\n\t * \n\t * @param aEngine The object containing all insert information\n\t * \n\t * @throws EMFUserError If an Exception occurred\n\t */\n\tpublic void insertEngine(Engine aEngine) throws EMFUserError;\n\t\n\t/**\n\t * Implements the query to erase an engine. All information needed is stored\n\t * into the input <code>engine</code> object.\n\t * \n\t * @param aEngine The object containing all delete information\n\t * \n\t * @throws EMFUserError If an Exception occurred\n\t */\n\t\n\tpublic void eraseEngine(Engine aEngine) throws EMFUserError;\n\n\t/**\n\t * Tells if an engine is associated to any\n\t * BI Object. It is useful because an engine cannot be deleted\n\t * if it is used by one or more BI Objects.\n\t * \n\t * @param engineId The engine identifier\n\t * \n\t * @return True if the engine is used by one or more\n\t * objects, else false\n\t * \n\t * @throws EMFUserError If any exception occurred\n\t */\n\tpublic boolean hasBIObjAssociated (String engineId) throws EMFUserError;\n\n\n\t/**\n\t * Get all the associated Exporters\n\t * \n\t * @param engineId The engine identifier\n\t * \n\t * @return The list of associated Exporters\n\t * \n\t * @throws EMFUserError If any exception occurred\n\t */\n\tpublic List getAssociatedExporters (Engine engineId) throws EMFUserError;\n\n\t\n\t\n\tpublic Integer countEngines() throws EMFUserError;\n\n}", "public interface IQueryResolver {\n List<Field> equalCondition = new ArrayList();\n List<Field> greaterEqualCondition = new ArrayList();\n List<Field> lesserEqualCondition = new ArrayList();\n\n String getTableName();\n}", "List<Factory> selectAll();", "public static void search() {\n\t\tList<Domain> domains = DomainService.findAll();\n\t\t\n\t\tlogger.info(\"{} domains selected to search\", domains.size());\n\t\t\n\t\tMap<String, Integer> sourceMap = getSourceMap();\n\t\tString currentDomain = \"\";\n\t\t\n\t\tMap<String, SearchResult> resultMap = new HashMap<String, SearchResult>();\n\t\t\n\t\tfor (Domain domain : domains) {\n\t\t\tcurrentDomain = domain.getName();\n\t\t\t\n\t\t\tlogger.info(\"{} domain searching started\", currentDomain);\n\t\t\t\n\t\t\t// The last search time prevents getting the same articles which were already retrieved at the last search\n\t\t\tString lastSearch = MongoService.getLastSearchTime(currentDomain);\t\t\t\n\t\t\tMongoService.setLastSearchTime(currentDomain, DatetimeUtil.getUTCDatetime());\n\t\t\t\n\t\t\tlogger.info(\"{} domain last searched {}\", currentDomain, lastSearch);\n\t\t\t\n\t\t\tList<String> domainKeywords = domain.getKeywords();\n\t\t\tList<Source> sources = domain.getSources();\n\t\t\t\n\t\t\tList<String> sourceNames = new ArrayList<String>();\n\t\t\tfor (Source source : sources) {\n\t\t\t\tsourceNames.add(source.getDomain());\n\t\t\t}\n\t\t\t\n\t\t\tList<Topic> topics = domain.getTopics();\n\t\t\t\n\t\t\t// If the domain contains any topic, get the topic keywords and merge them with the domain keywords. \n\t\t\tif (topics.size() > 0) {\n\t\t\t\tfor (Topic topic : topics) {\n\t\t\t\t\tList<String> topicKeywords = topic.getKeywords();\n\t\t\t\t\t\n\t\t\t\t\tList<String> ids = Searcher.search(sourceNames, lastSearch, domainKeywords, topicKeywords);\n\t\t\t\t\t\n\t\t\t\t\tfor (String id : ids) {\n\t\t\t\t\t\tif (resultMap.containsKey(id)) {\n\t\t\t\t\t\t\tSearchResult result = resultMap.get(id);\n\t\t\t\t\t\t\tArticle article = result.getArticle();\n\t\t\t\t\t\t\tarticle.attachTopic(topic);\n\t\t\t\t\t\t\tarticle.attachDomain(domain);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSearchResult result;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tresult = new SearchResult(id);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tArticle article = result.getArticle();\n\t\t\t\t\t\t\tArticleDocument doc = result.getDoc();\n\t\t\t\t\t\t\tarticle.attachDomain(domain);\n\t\t\t\t\t\t\tarticle.setSourceId(sourceMap.get(doc.getSource()));\n\t\t\t\t\t\t\tarticle.attachTopic(topic);\n\t\t\t\t\t\t\tresultMap.put(id, result);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tList<String> ids = Searcher.search(sourceNames, lastSearch, domainKeywords, null);\n\t\t\t\t\n\t\t\t\tfor (String id : ids) {\n\t\t\t\t\tSearchResult result;\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tresult = new SearchResult(id);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tArticle article = result.getArticle();\n\t\t\t\t\tArticleDocument doc = result.getDoc();\n\t\t\t\t\tarticle.attachDomain(domain);\n\t\t\t\t\tarticle.setSourceId(sourceMap.get(doc.getSource()));\n\t\t\t\t\tresultMap.put(id, result);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfor (Map.Entry<String, SearchResult> entry : resultMap.entrySet())\n\t\t\t{\n\t\t\t\tlogger.info(\" {} : {}\", entry.getValue().getArticle().getTitle(), entry.getValue().getArticle().getUrl());\n\t\t\t}\n\t\t}\n\t\t\n\t\tinsertArticles(resultMap);\n\t}", "public EvaluationsDegree[] findByDynamicWhere(String sql, Object[] sqlParams) throws EvaluationsDegreeDaoException;", "LazyDataModel<ReagentResult> getSearchResults();", "public interface DocumentTypeQueryService extends XmlLoader {\n\n @Cacheable(value= org.kuali.rice.kew.api.doctype.DocumentType.Cache.NAME, key=\"'{BO}' + 'documentTypeId=' + #p0\")\n public DocumentType findById(String documentTypeId);\n\n @Cacheable(value= org.kuali.rice.kew.api.doctype.DocumentType.Cache.NAME, key=\"'{BO}' + 'name=' + #p0\")\n public DocumentType findByName(String name);\n\n @Cacheable(value= org.kuali.rice.kew.api.doctype.DocumentType.Cache.NAME,\n key=\"'{BO}' + 'documentTypeId=' + #p0.getId() + '|' + 'name=' + #p0.getName() + '|' + 'label=' + #p0.getLabel() + '|' + 'active=' + #p0.isActive() +'docGroupName=' + #p1 + '|' + 'climbHierarchy=' + #p2\")\n public Collection<DocumentType> find(DocumentType documentType, String docGroupName, boolean climbHierarchy);\n\n @Cacheable(value= org.kuali.rice.kew.api.doctype.DocumentType.Cache.NAME, key=\"'{BO}{root}' + 'documentTypeId=' + #p0.getId()\")\n public DocumentType findRootDocumentType(DocumentType docType);\n \n /**\n * Returns the DocumentType of the Document with the given ID. \n * \n * @since 2.3\n */\n @Cacheable(value= org.kuali.rice.kew.api.doctype.DocumentType.Cache.NAME, key=\"'{BO}' + 'documentId=' + #p0\")\n public DocumentType findByDocumentId(String documentId);\n \n}", "DataFactory getDataFactory();", "public interface ChartRepository {\n public List<Map<String, Object>> getItems(String sql);\n public List<Map<String, Object>> getItems(String sql, Date target);\n\n public List<Object> getItemsForSnowCover(String sql);\n public List<Object> getItemsForSnowCover(String sql, Date target);\n}", "public interface EsSearchDao {\n\n EsQueryResult search(StoreURL storeURL, EsQuery esQuery);\n\n EsQueryResult searchByIds(StoreURL storeURL, EsQuery esQuery);\n\n EsQueryResult searchByFields(StoreURL storeURL, EsQuery esQuery);\n\n List<EsQueryResult> multiSearch(StoreURL storeURL, List<EsQuery> list);\n\n EsQueryResult searchByDSL(StoreURL storeURL, EsQuery esQuery);\n\n Object executeProxy(StoreURL storeURL, EsProxy esProxy);\n}", "public interface DataWarehouseRepository {\n\tList<DwPerson> searchPeople(String query);\n\n\tList<DwTerm> getTerms();\n\n\tDwPerson getPersonByLoginId(String loginId);\n\n\tDwCourse findCourse(String subjectCode, String courseNumber, String effectiveTermCode);\n\n\tList<DwCourse> searchCourses(String query);\n\n\tList<DwSection> getSectionsByTermCodeAndUniqueKeys(String termCode, List<String> uniqueKeys);\n\n\tList<DwSection> getSectionsBySubjectCodeAndYear(String subjectCode, Long year);\n\n\tList<DwSection> getSectionsBySubjectCodeAndTermCode(String subjectCode, String termCode);\n\n\tList<DwCensus> getCensusBySubjectCodeAndTermCode(String subjectCode, String termCode);\n\n\tList<DwCensus> getCensusBySubjectCodeAndCourseNumber(String subjectCode, String courseNumber);\n}", "public interface loadDataService {\n public List<Row> getComboContent( String sType,String comboType, Map<String,String[]> parameterMap , usersInfo loggedUser) throws Exception;\n public Result getGridContent(PagingObject po, String gridType,Map<String,String[]> parameterMap,String searchText , usersInfo loggedUser,String statusID,String from,String where ) throws Exception;\n public List<listInfo> loadStrukturList(String partID,long langID) throws Exception;\n public finalInfo getOrgInfo(long treeID) throws Exception;\n public categoryFinalInfo getCategoryInfo(long treeID) throws Exception;\n public carriersInfo getCariesInfo(long carryID) throws Exception;\n public carriersInfo getOrganizationInfo(long carryID) throws Exception;\n public List<contact> getOrgContacts(long treeID) throws Exception;\n public person getEmployeeInfo( long empId) throws Exception;\n public List<examples> getExamplesInfo(long exmpID,String langID) throws Exception;\n public List<contact> getPersonContact(long perID) throws Exception;\n public List<docList> loadQRphoto(Connection con, long exmplID,long picType) throws Exception;\n public List<docList> loadPhoto(Connection con, long exmplID,long picType) throws Exception;\n public List<docList> getExamplesPictures(Connection cc, long relID, long relType) throws Exception;\n public List<examples> getExamplesOperation(Connection cc, long relID, long langID) throws Exception;\n public int checkUser(String uName) throws Exception;\n public int checkDictRecord(String text, int dictType,String org,String pos) throws Exception ;\n public usersInfo loadUserInfo(String pID) throws Exception;\n public List<person> loadEmpList( int OrgID) throws Exception;\n public List<Row> getSelectContent( String type, Map<String, String[]> parameterMap , usersInfo loggedUser) throws Exception;\n public List<subjElement> getADVSearchMenuList(String partID) throws Exception;\n public String getADVInfo(String paramID,String paramVal,String val,String cond,String typ)throws Exception;\n public List<listInfo> loadComboForAdvancedSearch(String prmID,long parametr) throws Exception;\n public List<docList> loadRightPanelPhoto(long realID, int iType) throws Exception;\n public List<categoryFinalInfo> getCategoryStructure(long catID, int id) throws Exception;\n}", "public void find( Map<String, ? extends Object> filter, final DataListCallback<Qualification> callback){\n\n /**\n Call the onBefore event\n */\n callback.onBefore();\n\n\n //Definging hashMap for data conversion\n Map<String, Object> hashMapObject = new HashMap<>();\n //Now add the arguments...\n \n hashMapObject.put(\"filter\", filter);\n \n\n \n\n\n \n\n \n invokeStaticMethod(\"find\", hashMapObject, new Adapter.JsonArrayCallback() {\n @Override\n public void onError(Throwable t) {\n callback.onError(t);\n //Call the finally method..\n callback.onFinally();\n }\n\n @Override\n public void onSuccess(JSONArray response) {\n \n if(response != null){\n //Now converting jsonObject to list\n DataList<Map<String, Object>> result = (DataList) Util.fromJson(response);\n DataList<Qualification> qualificationList = new DataList<Qualification>();\n QualificationRepository qualificationRepo = getRestAdapter().createRepository(QualificationRepository.class);\n if(context != null){\n try {\n Method method = qualificationRepo.getClass().getMethod(\"addStorage\", Context.class);\n method.invoke(qualificationRepo, context);\n\n } catch (Exception e) {\n Log.e(\"Database Error\", e.toString());\n }\n }\n for (Map<String, Object> obj : result) {\n\n Qualification qualification = qualificationRepo.createObject(obj);\n\n //Add to database if persistent storage required..\n if(isSTORE_LOCALLY()){\n //http://stackoverflow.com/questions/160970/how-do-i-invoke-a-java-method-when-given-the-method-name-as-a-string\n try {\n Method method = qualification.getClass().getMethod(\"save__db\");\n method.invoke(qualification);\n\n } catch (Exception e) {\n Log.e(\"Database Error\", e.toString());\n }\n }\n\n qualificationList.add(qualification);\n }\n callback.onSuccess(qualificationList);\n }else{\n callback.onSuccess(null);\n }\n \n //Call the finally method..\n callback.onFinally();\n }\n });\n \n\n }", "protected void initDaosFromSpringBeans() {\n this.waitUntilApplicationContextIsReady();\n final String[] beanNamesToLoad = this.m_applicationContext\n .getBeanNamesForType(GenericDao.class);\n for (final String name : beanNamesToLoad) {\n if (!PatternMatchUtils.simpleMatch(this.m_daoNamePattern, name)) {\n // Doesn't match - so skip it.\n continue;\n }\n final GenericDao<?> dao = (GenericDao<?>) this.m_applicationContext.getBean(name);\n // avoid adding a DAO again\n if (!this.m_daos.values().contains(dao)) {\n this.initDao(dao);\n this.m_daos.put(dao.getPersistentClass(), dao);\n }\n }\n }", "private static Searcher createSearcher(String[] args) {\n if (args.length > 1 && \"duden\".equals(args[1])) {//Use DWDS by default, Duden only on explicit request\n return SearcherFactory.newDuden();\n } else {\n return SearcherFactory.newDwds();\n }\n }", "public interface HouseDao {\r\n\r\n\tint save(House house);\r\n\r\n\tint update(House house);\r\n\r\n\tHouse find(int id);\r\n\r\n\tList<House> findList(int landlordId, String name, DictEnum.RentState rentState, Boolean used, String sort, String order, int offset, int length);\r\n\r\n\tList<House> findList(int landlordId, String name, DictEnum.RentState rentState, Boolean used);\r\n\r\n\tList<House> findList(String name, DictEnum.RentState rentState, Boolean used);\r\n\r\n\t// 某房东房源\r\n\tList<House> findList(int landlordId);\r\n\r\n\tint count(int landlordId, String name, DictEnum.RentState rentState, Boolean used);\r\n\r\n\tint count(String name, DictEnum.RentState rentState, Boolean used);\r\n\r\n\t/* 同时查询房租相关信息 */\r\n\r\n\tList<Map<String, Object>> findListWithFee(int landlordId, String name, DictEnum.RentState rentState, Boolean used, Date date, String sort, String order, int offset, int length);\r\n\r\n\t// 不排序,不分页\r\n\tList<Map<String, Object>> findListWithFee(int landlordId, String name, DictEnum.RentState rentState, Boolean used, Date date);\r\n\r\n\t// ...根据service需要进行其它友好封装...,也可在service中传递[无效]参数\r\n\r\n\t// 页面展示需要...\r\n\tList<Map<String, Object>> findListWithFee(String name, DictEnum.RentState rentState, Boolean used, Date date);\r\n\r\n\t// 默认查询日期为当前时间\r\n\tList<Map<String, Object>> findListWithFee(String name, DictEnum.RentState rentState, Boolean used);\r\n}", "@Override\r\n\tpublic DeptBean[] findByDynamicWhereByPage(String whereSql, int page,\r\n\t\t\tint rows, Object[] array) throws SQLException {\n\t\tList<Map<String, Object>> resultList = new ArrayList<Map<String,Object>>();\r\n\t\tdeptConn = this.getConnection();\r\n\t\t// construct the SQL statement\r\n\t\tfinal String SQL = SQL_SELECT + \" WHERE 1=1 \" + whereSql;\r\n\t\r\n\t\tresultList = this.queryByPage(deptConn, SQL, page, rows, array);\r\n\t\t\r\n\t\tif (deptConn != null) {\r\n\t\t\tthis.closeConnection(deptConn);\r\n\t\t}\r\n\t\treturn MapToObject(resultList);\r\n\r\n\t}", "public interface EntityDao<E extends ControlledListEntity> {\n\n GroupingEntityCommon<? extends Hierarchy.GroupedHierarchyEntity> getGroupingEntityCommon();\n\n /**\n * Get an entity of type <E> by its unique identifier\n *\n * @param id The entity identifier\n * @return E\n */\n E getById(long id);\n\n /**\n * Retrieve an entity by its name\n *\n * @param name the name of entity to retrieve\n * @return The entity E or null\n */\n E getByName(String name);\n\n /**\n * Retrieve an entity using the given {@link Key}\n *\n * @param name the key to retrieve the entity\n * @return The entity E or null\n */\n E getByName(Key name);\n\n /**\n * Determine if an entity with the given name exists\n *\n * @param name the method or standard name to check\n * @return true if the name exists, false otherwise\n */\n boolean nameExists(Key name);\n\n /**\n * List all entities of type E. This list invocation includes any aliases as primaries\n *\n * @return List<E>\n */\n List<E> list();\n\n /**\n * List all entities of type <E> which satisfy a predicate\n *\n * @param predicate The predicate\n * @return List<E>\n */\n List<E> list(Predicate<E> predicate);\n\n /**\n * List the entities of type <E> filtered such that the field contains the search term\n *\n * @param field The name of the field used for filtering\n * @param contains The search term\n * @return A filtered list\n */\n List<E> list(String field, String contains);\n\n /**\n * Search for entities which match ANY of the given search terms.\n *\n * The nature of the search is specific to the entity. All entities will search names but specific subclasses may customise the\n * implementation, for example to search aliases, or for parameters to search CAS numbers.\n *\n * @param terms the terms to search for\n * @return a {@link List} of matching entities.\n */\n List<E> search(List<String> terms);\n\n\n /**\n * @return the set of field identifiers that are searchable for the entity <E>\n */\n Set<String> getSearchFields();\n\n /**\n * Retrieves a mashed version of the name from a cache.\n *\n * The name must exist in the cache or null will be returned.\n *\n * @param name the name by which to lookup a mash\n * @return the mashed version of the name if one is found in the cache, null otherwise\n */\n String lookupMashFromName(String name);\n\n /**\n * Retrieves a name from the cache given an exact mashed value\n * The mash must exist in the cache or null will be returned.\n *\n * @param mash a mashed version of a name (space reduced/normalised according to entity specific rules)\n * @return the proper name for the given mash if one is found in the cache, null otherwise\n */\n String lookupNameFromMash(final String mash);\n\n /**\n * A method to convert the reduce variation in name in case and spacing\n * to a standard format which acts as the key. Here so it can be overridden. The default functionality\n * is to convert to upper cases and reduce multiple spaces to a single space to create the lookup key.\n */\n String generateMash(String input);\n\n /**\n * Add a new entity of type <E>\n *\n */\n @Transactional void add(E entity);\n\n /**\n * Remove an entity of type <E>\n *\n * @param id The entity identifier\n * @throws IllegalArgumentException\n */\n @Transactional void removeById(long id) throws IllegalArgumentException;\n\n /**\n * Get the class of the entity being operated on\n */\n Class<E> getEntityClass();\n\n /**\n * Retrieve a DAO for a given DAO class\n * This is intended to allow access to the DAO's from a non-spring managed context\n *\n * @param daoClass the desired dao class\n * @return the spring managed dao for the given class\n */\n static <T extends EntityDao<? extends ControlledListEntity>> T getDao(Class<T> daoClass) {\n return SpringApplicationContextProvider.getApplicationContext().getBean(daoClass);\n }\n}", "List<T> findAll() ;", "@Override\n\tpublic <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {\n\t\treturn wfms_Position_AuditPersistence.findWithDynamicQuery(dynamicQuery);\n\t}", "public interface IPlantDAO {\n\n /**\n * Accept filter, text and return a collection of plants that contain that filter text\n * @param filter the text we want to match in our returned list of plants.\n * @return a list of plants that contain given filter text in either genus, species, cultivar or common name.\n */\n public List<PlantDTO> fetchPlants(String filter);\n\n\n}", "public interface ItemService {\n /**\n * 根据商品Id查询详情\n *\n * @param itemId 商品Id\n * @return 商品\n */\n Items queryItemById(String itemId);\n\n /**\n * 根据商品Id查询商品图片列表\n *\n * @param itemId 商品Id\n * @return 商品图片\n */\n List<ItemsImg> queryItemImageList(String itemId);\n\n /**\n * 根据商品Id查询商品规格\n *\n * @param itemId 商品Id\n * @return 商品规格\n */\n List<ItemsSpec> queryItemSpecList(String itemId);\n\n /**\n * 根据商品Id查询商品参数\n *\n * @param itemId 商品Id\n * @return 商品参数\n */\n ItemsParam queryItemParam(String itemId);\n\n /**\n * 根据商品Id查询商品评价\n *\n * @param itemId 商品Id\n * @return 商品评价\n */\n CommentLevelCountVO queryCommentCount(String itemId);\n\n /**\n * 根据商品Id查询商品的评价(分页)\n *\n * @param itemId 商品Id\n * @param level 等级\n * @return 商品评价\n */\n PagingGridVO queryPagingComment(String itemId, int level, Integer page, Integer pageSize);\n\n /**\n * 搜索商品列表\n *\n * @param keyword 关键字\n * @param sort 排序字段\n * @param page 当前页\n * @param pageSize 每页显示的记录数\n */\n PagingGridVO queryItem(String keyword, String sort, Integer page, Integer pageSize);\n\n\n /**\n * 搜索商品列表\n */\n PagingGridVO queryItem(Integer categoryId, String sort, Integer page, Integer pageSize);\n\n /**\n * 根据规格ids查询最新的购物车中的商品数据(用于刷新渲染购物车中的商品数据)\n */\n List<ShopCartVO> queryItemsBySpecIds(String specIds);\n\n /**\n * 根据商品规格Id,获取规格对象的具体信息\n *\n * @param specId 商品规格Id\n * @return 规格对象\n */\n ItemsSpec queryItemSpecById(String specId);\n\n /**\n * 根据商品Id,获得商品图片主图url\n *\n * @param itemId 商品Id\n * @return 商品图片主图url\n */\n ItemsImg queryItemMainImageById(String itemId);\n}", "private void init() throws WebserverSystemException {\r\n\r\n // setup the PolicyFinder that this PDP will use\r\n final PolicyFinder policyFinder = new PolicyFinder();\r\n databasePolicyFinder.setPolicyFinder(policyFinder);\r\n final Set<PolicyFinderModule> policyModules = new HashSet<PolicyFinderModule>();\r\n policyModules.add(this.databasePolicyFinder);\r\n policyFinder.setModules(policyModules);\r\n\r\n // now setup attribute finder modules\r\n // Setup the AttributeFinder just like we setup the PolicyFinder. Note\r\n // that unlike with the policy finder, the order matters here. See the\r\n // the javadocs for more details.\r\n final AttributeFinder attributeFinder = new AttributeFinder();\r\n final List<AttributeFinderModule> attributeModules = new ArrayList<AttributeFinderModule>();\r\n // first the standard XACML Modules\r\n attributeModules.add(new CurrentEnvModule());\r\n attributeModules.add(new SelectorModule());\r\n // now the custom escidoc Modules\r\n\r\n // the CheckProvidedAttributeFinderModule must be the first eSciDoc\r\n // specific finder module in the chain\r\n attributeModules.add(this.checkProvidedAttrFinder);\r\n\r\n attributeModules.add(this.resourceNotFoundAttrFinder);\r\n // the PartlyResolveableAttributeFinderModule must be the second eSciDoc\r\n // specific finder module in the chain\r\n attributeModules.add(this.partlyResolveableAttrFinder);\r\n attributeModules.add(this.objectTypeAttrFinder);\r\n attributeModules.add(this.tripleStoreAttrFinder);\r\n attributeModules.add(this.userAccountAttrFinder);\r\n attributeModules.add(this.userGroupAttrFinder);\r\n attributeModules.add(this.grantAttrFinder);\r\n attributeModules.add(this.lockOwnerAttributeFinderModule);\r\n attributeModules.add(this.newOuParentsAttributeFinderModule);\r\n attributeModules.add(this.resourceAttrFinder);\r\n attributeModules.add(this.roleAttrFinder);\r\n\r\n attributeModules.add(this.smAttributesFinderModule);\r\n attributeModules.add(this.resourceIdAttrFinderModule);\r\n attributeFinder.setModules(attributeModules);\r\n\r\n // Setup the FunctionFactory\r\n final FunctionFactoryProxy proxy = StandardFunctionFactory.getNewFactoryProxy();\r\n final FunctionFactory factory = proxy.getTargetFactory();\r\n factory.addFunction(new XacmlFunctionContains());\r\n factory.addFunction(new XacmlFunctionIsIn());\r\n factory.addFunction(new XacmlFunctionRoleInList());\r\n factory.addFunction(new XacmlFunctionOneAttributeInBothLists());\r\n factory.addFunction(this.xacmlFunctionRoleIsGranted);\r\n\r\n FunctionFactory.setDefaultFactory(proxy);\r\n\r\n this.pdpConfig = new PDPConfig(attributeFinder, policyFinder, null);\r\n this.pdp = new PDP(this.pdpConfig);\r\n }", "public interface BACSSettlementDataService extends BaseDataService<BACSSettlement, BACSSettlementDTO> {\r\n\r\n List<BACSSettlementDTO> findByStatus(String status);\r\n\r\n BACSSettlementDTO findBySettlementNumber(Long settlementNumber);\r\n \r\n BACSSettlementDTO findByFinancialServicesReference(Long financialServicesReferenceNumber); \r\n \r\n List<BACSSettlementDTO> findByOrderNumber(Long orderNumber);\r\n \r\n}", "public Tipo[] findByDynamicSelect(String sql, Object[] sqlParams)\r\n throws TipoDaoException;", "public interface DataAccess {\n String USER_PATH = \"user/%s\";\n String CARS_PATH = USER_PATH + \"/cars/%s\";\n String FUELENTRY_PATH = CARS_PATH + \"/fuel_entries/%s\";\n String REPAIRENTRY_PATH = CARS_PATH + \"/repair_entries/%s\";\n String OTHERENTRY_PATH = CARS_PATH + \"/other_entries/%s\";\n String REMINDERENTRY_PATH = USER_PATH + \"/reminders/%s\";\n\n\n void update(String path, Object object);\n void push(String path, Object object);\n void delete(String path);\n\n <T> void getAll(String path, MyList<T> list, Type typeOfT);\n\n String getUid();\n}", "public void test_findByNamedOfQuery() {\r\n\t\t// step 1:\r\n\t\tList personList = this.persistenceService.findByNamedOfQuery(FIND_ALL_PERSON);\r\n\t\tassertNotNull(personList);\r\n\t\tassertEquals(ALL_PERSON_COUNT, personList.size());\r\n\t\t\r\n\t\t// init again\r\n\t\tpersonList = null;\r\n\t\t// step 2:\r\n\t\tpersonList = this.persistenceService.findByNamedOfQuery(FIND_PERSON_BY_NAME_EXT, NAME_PARAM[0]);\r\n\t\tassertForFindGoingmm(personList);\r\n\t\t\r\n\t\t// init again\r\n\t\tpersonList = null;\r\n\t\t// step 3:\r\n\t\tpersonList = this.persistenceService.findByNamedOfQuery(FIND_PERSON_BY_NAME, getParamMap(1));\r\n\t\tassertForFindGoogle(personList);\r\n\t}", "public List<Driver> findDriverByType(String driverType);", "public MagicSearch createMagicSearch();", "@Override\r\n\tpublic void search() {\n\r\n\t}" ]
[ "0.56004894", "0.55185604", "0.5404805", "0.5395497", "0.5348994", "0.53488475", "0.53419834", "0.53233325", "0.5315074", "0.53089285", "0.5306409", "0.5300281", "0.529878", "0.5275116", "0.52663845", "0.52469015", "0.5231286", "0.5221265", "0.5163104", "0.5153345", "0.51420486", "0.5141295", "0.5131465", "0.51272714", "0.5096007", "0.50882936", "0.5076153", "0.5064068", "0.505277", "0.5051055", "0.50499314", "0.5030607", "0.50265247", "0.50262016", "0.5010892", "0.50099975", "0.49955565", "0.4987461", "0.49803722", "0.4980016", "0.49650759", "0.4964151", "0.49623546", "0.49611002", "0.49490187", "0.49446547", "0.49439105", "0.49435487", "0.49282998", "0.491755", "0.49173927", "0.49139884", "0.48942855", "0.48918146", "0.48876017", "0.4882709", "0.48490363", "0.4845372", "0.4841903", "0.4839652", "0.48396015", "0.48372012", "0.48343092", "0.4832701", "0.4828887", "0.48263156", "0.4823576", "0.48135898", "0.48088378", "0.48050028", "0.48003313", "0.48001146", "0.479587", "0.47949943", "0.47777072", "0.47737977", "0.4773582", "0.4769954", "0.47665226", "0.4756212", "0.4749147", "0.4749009", "0.47380552", "0.4733884", "0.47294438", "0.4728594", "0.47272575", "0.472445", "0.4722394", "0.47170633", "0.47133768", "0.47131404", "0.47105098", "0.47098172", "0.47077626", "0.46977708", "0.4697135", "0.46938854", "0.4681035", "0.46804056", "0.46791548" ]
0.0
-1
Whether the given method name matches this finder.
boolean isMethodMatch(@NonNull MethodElement methodElement, @NonNull MatchContext matchContext);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasMethod( final String name )\n {\n return getMethod( name ) != null;\n }", "boolean hasMethodName();", "boolean hasMethodName();", "boolean hasMethodName();", "private boolean findMethod(String name, MethodDescriptor[] methodDescriptors) {\n for (int i = 0; i < methodDescriptors.length; i++) {\n if (methodDescriptors[i].getName().equals(name)) {\n return true;\n }\n }\n return false;\n }", "boolean hasMethod();", "boolean hasMethod();", "boolean hasMethod();", "public static int isMethod() {\n return isNameExpr;\n }", "public int isMethod() {\n return isNameExpr;\n }", "public String isMethod() {\n return isNameExpr;\n }", "public boolean isMethod() {\n return isNameExpr;\n }", "private void isMethod() {\n if (isNameExpr != null) {\n isNameExpr.isMethod();\n isNameExpr = null;\n }\n }", "public boolean isValidMethod(String methodName) {\n\t\treturn this.validMethods.containsKey(methodName);\n\t}", "public boolean methodNameMatches(String methodName, String propertyName) {\n\t\tif (methodName.equalsIgnoreCase(propertyName)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean verifyExistsMethod(Method methodToVerify) { // ANA: mudei para public\n\n\t\tfor (Method m : arrayMethods) {\n\t\t\tif (m.getName_method() == methodToVerify.getName_method())\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean matches(Method method, Class<?> targetClass)\n/* */ {\n/* 133 */ return ((targetClass != null) && (matchesPattern(ClassUtils.getQualifiedMethodName(method, targetClass)))) || \n/* 134 */ (matchesPattern(ClassUtils.getQualifiedMethodName(method)));\n/* */ }", "public int isMethod() {\n LayoutManager isVariable = isMethod();\n if (isNameExpr == null) {\n return isNameExpr;\n }\n final View isVariable = isMethod(isIntegerConstant, isNameExpr.isMethod(), true, true);\n return isNameExpr == null ? isNameExpr : isMethod(isNameExpr);\n }", "public boolean isMethodExists(String className, String compairMethod) {\n boolean isExists = false;\n try {\n Class<?> telephonyClass = Class.forName(className);\n Class<?>[] parameter = new Class[1];\n parameter[0] = int.class;\n StringBuffer sbf = new StringBuffer();\n Method[] methodList = telephonyClass.getDeclaredMethods();\n for (int index = methodList.length - 1; index >= 0; index--) {\n sbf.append(\"\\n\\n\" + methodList[index].getName());\n if (methodList[index].getReturnType().equals(String.class)) {\n String methodName = methodList[index].getName();\n if (methodName.contains(compairMethod)) {\n Class<?>[] param = methodList[index]\n .getParameterTypes();\n if (param.length > 0) {\n if (param[0].equals(int.class)) {\n try {\n simVariant = methodName.substring(compairMethod.length(), methodName.length());\n telephonyClassName = className;\n isExists = true;\n break;\n } catch (Exception e) {\n LOGE(TAG, \"[isMethodExists] Unable to get check method\", e);\n }\n } else {\n telephonyClassName = className;\n isExists = true;\n }\n }\n }\n }\n }\n } catch (Exception e) {\n LOGE(TAG, \"[isMethodExists] Unable to get check method\", e);\n }\n return isExists;\n }", "public boolean isMethodNameKnown() {\n\t\tif (methodName == null || methodName.equals(\"<unknown>\"))\n\t\t\treturn false;\n\t\treturn true;\n\t}", "private boolean matchesMethod (final Object method, \n\t\tfinal int expectedModifiers, final int optionalModifiers, \n\t\tfinal String expectedReturnType)\n\t{\n\t\tboolean matches = false; \n\n\t\tif (method != null)\n\t\t{\n\t\t\tModel model = getModel();\n\t\t\tint modifiers = model.getModifiers(method);\n\n\t\t\tmatches = (((modifiers == expectedModifiers) || \n\t\t\t\t(modifiers == (expectedModifiers | optionalModifiers))) &&\n\t\t\t\texpectedReturnType.equals(model.getType(method)));\n\t\t}\n\n\t\treturn matches;\n\t}", "private void isMethod() {\n ArrayAdapter<String> isVariable = new ArrayAdapter<>(this, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr);\n isNameExpr.isMethod(isNameExpr);\n isNameExpr.isMethod((isParameter, isParameter, isParameter, isParameter) -> {\n isNameExpr = isNameExpr.isMethod(isNameExpr.isMethod(isNameExpr), isNameExpr);\n isMethod(isNameExpr);\n isNameExpr = isNameExpr;\n });\n }", "private static boolean matchName(@NotNull PsiMethod method, @NotNull IHasParameterInfos targetMethodInfo, @NotNull String targetMethodName, boolean isConstructor) {\n if (targetMethodName.startsWith(\"@\")) {\n IType returnType = ((IGosuMethodInfo) targetMethodInfo).getReturnType();\n if ((returnType.equals(JavaTypes.BOOLEAN()) || returnType.equals(JavaTypes.pBOOLEAN()) &&\n !method.getName().equals(\"is\" + targetMethodName.substring(1)))) {\n return true;\n }\n if (!method.getName().equals(\"get\" + targetMethodName.substring(1)) && !method.getName().equals(\"set\" + targetMethodName.substring(1))) {\n return true;\n }\n } else if (!targetMethodName.equals(method.getName()) && !(isConstructor && \"construct\".equals(method.getName()))) {\n return true;\n }\n return false;\n }", "boolean isSetMethod();", "public boolean isMethodSupported(String methodName) throws IOException;", "public static boolean isMethodDefinition(Document doc, String methodName, int offset) {\n TokenHierarchy tokenHierarchy = TokenHierarchy.get(doc);\n @SuppressWarnings(\"unchecked\")\n TokenSequence<PlsqlTokenId> ts = tokenHierarchy.tokenSequence(PlsqlTokenId.language());\n\n if (ts != null) {\n ts.move(offset);\n Token<PlsqlTokenId> token = ts.token();\n if (ts.moveNext()) {\n token = ts.token();\n PlsqlTokenId tokenID = token.id();\n\n if (tokenID == PlsqlTokenId.IDENTIFIER) {\n if (token.text().toString().equals(methodName)) {\n while (ts.movePrevious()) {\n token = ts.token();\n if (token.text().toString().equalsIgnoreCase(\"FUNCTION\")\n || token.text().toString().equalsIgnoreCase(\"PROCEDURE\")) {\n return true;\n } else if (token.id() != PlsqlTokenId.WHITESPACE) {\n break;\n }\n }\n }\n }\n }\n }\n return false;\n }", "public boolean match(String name) {\n\t\t\treturn (this.equals(directions.get(name.toUpperCase())));\n\t\t}", "public static boolean checkHasMethod(Class<?> clazz, String name, Object[] args) {\n\t\tif (!containers.containsKey(clazz)) containers.put(clazz, new DynamicMethodContainer(clazz));\n\t\treturn containers.get(clazz).containsMethod(args, name);\n\t}", "public boolean isSetMethod() {\n return this.method != null;\n }", "public boolean hasAnnotation(Method aMethod, String aFqNameToLookfor) {\n\t\treturn AnnotationsHelper.getAnnotation(aMethod, aFqNameToLookfor) != null;\n\t}", "private static boolean isUserDefinedMethod(final Method method) {\n if (!method.equals(OBJECT_EQUALS)\n && !method.equals(OBJECT_HASH_CODE)\n && !method.equals(OBJECT_GET_CLASS)\n && !method.equals(OBJECT_TO_STRING)\n && !method.equals(OBJECT_CLONE)\n && !method.equals(OBJECT_WAIT_1)\n && !method.equals(OBJECT_WAIT_2)\n && !method.equals(OBJECT_WAIT_3)\n && !method.equals(OBJECT_NOTIFY)\n && !method.equals(OBJECT_NOTIFY_ALL)\n && !method.getName().startsWith(TransformationConstants.SYNTHETIC_MEMBER_PREFIX)\n && !method.getName().startsWith(TransformationConstants.ORIGINAL_METHOD_PREFIX)\n && !method.getName().startsWith(TransformationConstants.ASPECTWERKZ_PREFIX)) {\n return true;\n } else {\n return false;\n }\n }", "public static void isMethod() throws IOException {\n isNameExpr.isMethod();\n }", "public static boolean isMethodInStack(String methodName) {\n\t\tStackTraceElement stackTraceElements[] = (new Throwable()).getStackTrace();\n\t\tfor (int i = 0; i < stackTraceElements.length; i++) {\n\t\t\tif (stackTraceElements[i].toString().contains(methodName)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean hasMethodName() {\r\n\t\t\treturn ((bitField0_ & 0x00000001) == 0x00000001);\r\n\t\t}", "public boolean hasMethod(String name, Class<?>[] parms, Class<?>[] exceptions) {\n boolean result = false;\n\n try {\n\n HashSet<Class<?>> exParm = new HashSet<Class<?>>();\n if (exceptions != null) {\n exParm.addAll(Arrays.asList(exceptions));\n }\n\n // if it isn't public, it might be protected\n Method m = null;\n try {\n m = cut.getMethod(name, parms);\n } catch (Exception e) {\n m = cut.getDeclaredMethod(name, parms);\n }\n\n HashSet<Class<?>> mexs = new HashSet<Class<?>>();\n mexs.addAll(Arrays.asList(m.getExceptionTypes()));\n\n LOGGER.trace(\"hasMethod: added exception types\");\n\n if (exParm.isEmpty() && mexs.isEmpty()) {\n LOGGER.trace(\"hasMethod: no exceptions to check\");\n result = true;\n } else {\n result = mexs.containsAll(exParm);\n if (result == false) {\n StringBuilder sb = new StringBuilder(512);\n sb.append(\"Method name: \").append(name).append(\"\\n\");\n sb.append(\"results of exception check: \").append(result).append(\"\\n\");\n sb.append(\"method exceptions: \").append(mexs).append(\"\\n\");\n sb.append(\"expected exceptions: \").append(exParm).append(\"\\n\");\n LOGGER.warn(\"hasMethod: {}\", sb);\n }\n }\n\n } catch (Exception e) {\n StringBuilder txt = new StringBuilder(128);\n txt.append(\"Could not get method: \").append(name);\n LOGGER.warn(txt.toString(), e);\n }\n\n return result;\n }", "public boolean hasMethodName() {\r\n\t\t\t\treturn ((bitField0_ & 0x00000001) == 0x00000001);\r\n\t\t\t}", "private boolean methodsMatch(Method method,\n CallStatement.CallStatementEntry entry) throws EngineException {\n if (!method.getName().equals(entry.getName())) {\n return false;\n }\n if (method.getParameterTypes().length != parameters.size()) {\n return false;\n }\n Class[] parameterTypes = method.getParameterTypes();\n for (int index = 0; index < parameters.size(); index++) {\n Class parameterType = parameterTypes[index];\n Object parameterValue = parameters.get(index);\n if (!parameterType.isAssignableFrom(parameterValue.getClass())) {\n return false;\n }\n }\n \n for (int index = 0; index < parameters.size(); index++) {\n Class parameterType = parameterTypes[index];\n Object parameterValue = parameters.get(index);\n parameters.set(index, parameterType.cast(parameterValue));\n }\n return true;\n }", "public boolean hasMethodName() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public boolean hasMethodName() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "private FamixMethod findInvokedMethodOnName(String fromClass, String fromMethod, String invokedClassName, String invokedMethodName) {\n \tFamixMethod result = null;\n\t\t/* Test Helper\n\t\tif (fromClass.equals(\"domain.direct.violating.AccessLocalVariable_SetArgumentValue\")){\n\t\t\tboolean breakpoint = true;\n\t\t} */\n\n \t// 1) If methodNameAsInInvocation matches with a method unique name, return that method. \n \tString searchKey = invokedClassName + \".\" + invokedMethodName;\n \tif (theModel.behaviouralEntities.containsKey(searchKey)) {\n \t\treturn (FamixMethod) theModel.behaviouralEntities.get(searchKey);\n \t}\n \t// 2) Find out if there are more methods with the same name of the invoked class. If only one method is found, then return this method. \n \tString methodName = invokedMethodName.substring(0, invokedMethodName.indexOf(\"(\")); // Methodname without signature\n \t searchKey = invokedClassName + \".\" + methodName;\n \tif (sequencesPerMethod.containsKey(searchKey)){\n \t\tArrayList<FamixMethod> methodsList = sequencesPerMethod.get(searchKey);\n \t\tif (methodsList.size() == 0) {\n \t\t\treturn result;\n \t\t} else if (methodsList.size() == 1) {\n \t\t\t// FamixMethod result1 = methodsList.get(0);\n \t\t\treturn methodsList.get(0);\n \t\t} else { // 3) if there are more methods with the same name, then compare the invocation arguments with the method parameters.\n \t\t\tString invocationSignature = invokedMethodName.substring(invokedMethodName.indexOf(\"(\"));;\n \t\t\tString contentsInvocationSignature = invocationSignature.substring(invocationSignature.indexOf(\"(\") + 1, invocationSignature.indexOf(\")\")); \n \t\t\tString[] invocationArguments = contentsInvocationSignature.split(\",\");\n \t\t\tint numberOfArguments = invocationArguments.length;\n \t\t\t// 3a) If there is only one method with the same number of parameters as invocationArguments, then return this method\n \t\t\tList<FamixMethod> matchingMethods1 = new ArrayList<FamixMethod>();\n\t \t\tfor (FamixMethod method : methodsList){\n\t \t\t\tif ((method.signature != null) && (!method.signature.equals(\"\"))) {\n\t\t \t\t\tString contentsmethodParameter = method.signature.substring(method.signature.indexOf(\"(\") + 1, method.signature.indexOf(\")\")); \n\t\t \t\t\tString[] methodParameters = contentsmethodParameter.split(\",\");\n\t\t \t\t\tif (methodParameters.length == numberOfArguments) {\n\t\t \t\t\t\tmatchingMethods1.add(method);\n\t\t \t\t\t}\n\t \t\t\t}\n\t \t\t} \n\t \t\tif (matchingMethods1.size() == 0)\n\t \t\t\treturn result;\n\t \t\tif (matchingMethods1.size() == 1)\n\t \t\t\treturn matchingMethods1.get(0);\n \t\t\t\n \t\t\t// 3b) If there is only one method where the first parameter type == the first argument type, then return this method \n \t\t\tList<FamixMethod> matchingMethods2 = new ArrayList<FamixMethod>();\n \t\t\tif (numberOfArguments >= 1) {\n \t\t\t\t// Replace the argument string by a type, in case of an attribute\n \t\t\t\tinvocationArguments[0] = getTypeOfAttribute(fromClass, fromMethod, invocationArguments[0]);\n \t \t\tfor (FamixMethod matchingMethod1 : matchingMethods1){\n \t \t\t\tString contentsmethodParameter = matchingMethod1.signature.substring(matchingMethod1.signature.indexOf(\"(\") + 1, matchingMethod1.signature.indexOf(\")\")); \n \t \t\t\tString[] methodParameters = contentsmethodParameter.split(\",\");\n \t \t\t\tif (methodParameters.length >= 1) {\n \t \t\t\tmethodParameters[0] = getfullPathOfDeclaredType(fromClass, methodParameters[0]);\n \t \t\t\t\tif (methodParameters[0].equals(invocationArguments[0])) {\n \t \t\t\t\t\tmatchingMethods2.add(matchingMethod1);\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t\t\n \t \t\t} \n \t \t\tif (matchingMethods2.size() == 0)\n \t \t\t\treturn result;\n \t \t\tif (matchingMethods2.size() == 1)\n \t \t\t\treturn matchingMethods2.get(0);\n \t\t\t}\n \t\t\t// If there is only one method where the second parameter type == the first argument type, then return this method \n \t\t\tif (numberOfArguments >= 2) {\n \t\t\t\tmatchingMethods1.clear();\n \t\t\t\t// Replace the argument string by a type, in case of an attribute\n \t\t\t\tinvocationArguments[1] = getTypeOfAttribute(fromClass, fromMethod, invocationArguments[1]);\n \t \t\tfor (FamixMethod matchingMethod2 : matchingMethods2){\n \t \t\t\tString contentsmethodParameter = matchingMethod2.signature.substring(matchingMethod2.signature.indexOf(\"(\") + 1, matchingMethod2.signature.indexOf(\")\")); \n \t \t\t\tString[] methodParameters = contentsmethodParameter.split(\",\");\n \t \t\t\tif (methodParameters.length >= 2) {\n \t \t\t\tmethodParameters[1] = getfullPathOfDeclaredType(fromClass, methodParameters[1]);\n \t \t\t\t\tif (methodParameters[1].equals(invocationArguments[1])) {\n \t \t\t\t\t\tmatchingMethods1.add(matchingMethod2);\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t\t\n \t \t\t} \n \t \t\tif (matchingMethods1.size() == 0)\n \t \t\t\treturn result;\n \t \t\tif (matchingMethods1.size() == 1)\n \t \t\t\treturn matchingMethods1.get(0);\n \t\t\t}\n \t\t}\n\t\t}\n \treturn result; \n }", "boolean isActionMethod(Method m) {\n Mapping mapping = m.getAnnotation(Mapping.class);\n if (mapping==null)\n return false;\n if (mapping.value().length()==0) {\n warnInvalidActionMethod(m, \"Url mapping cannot be empty.\");\n return false;\n }\n if (Modifier.isStatic(m.getModifiers())) {\n warnInvalidActionMethod(m, \"method is static.\");\n return false;\n }\n Class<?>[] argTypes = m.getParameterTypes();\n for (Class<?> argType : argTypes) {\n if (!converterFactory.canConvert(argType)) {\n warnInvalidActionMethod(m, \"unsupported parameter '\" + argType.getName() + \"'.\");\n return false;\n }\n }\n Class<?> retType = m.getReturnType();\n if (retType.equals(void.class)\n || retType.equals(String.class)\n || Renderer.class.isAssignableFrom(retType)\n )\n return true;\n warnInvalidActionMethod(m, \"unsupported return type '\" + retType.getName() + \"'.\");\n return false;\n }", "public boolean supportsCallee(SootMethod method);", "public static boolean isMethodProfiled(String className, String methodName){\r\n\r\n System.out.println(\"Class: \" + className + \",Method: \" + methodName);\r\n\r\n for (String clazz: profiledMethodMap.keySet()){\r\n if(clazz.equals(className)){\r\n for(String method: profiledMethodMap.get(clazz)){\r\n if(methodName.equals(method))\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }", "public boolean hasMethodName() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public boolean hasMethodName() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public boolean matches(String name) {\n return aliases.contains(name);\n }", "public boolean isMethodExpression() {\n return this.isMethodExpression;\n }", "boolean contains(String name);", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "private static DirInfo isMethod(String isParameter, File isParameter) {\n return isNameExpr.isMethod(isNameExpr, isNameExpr);\n }", "public static boolean matchTargetAPI(IMethod m){\r\n for(ExpensiveAPI api : Resource.targetAPIs){\r\n if(api.signature.equals(m.getName().toString()) && m.getSignature().contains(api.clsName)){\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public boolean containFunction(String name) {\n\t\tif (!global.containFunction(name)) {\r\n\t\t\treturn this.fnMap.containsKey(name);\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t}", "public boolean isDialogCreated(String method) {\n return dialogCreatingMethods.contains(method.toUpperCase());\n }", "boolean existsByName(String name);", "@Override\n public boolean evaluate(@Nonnull MethodInformation methodInformation) {\n boolean matches = namePattern.matcher(methodInformation.getName()).matches();\n final @Nonnull @NonNullableElements List<? extends VariableElement> methodParameters = methodInformation.getElement().getParameters();\n if (parameters.length == methodParameters.size()) {\n for (int i = 0; i < methodParameters.size(); i++) {\n final @Nonnull String nameOfDeclaredType = ProcessingUtility.getQualifiedName(methodParameters.get(i).asType());\n ProcessingLog.debugging(\"name of type: $\", nameOfDeclaredType);\n final @Nonnull String parameter = parameters[i];\n if (!parameter.equals(\"?\")) {\n matches = matches && nameOfDeclaredType.equals(parameter);\n }\n }\n } else {\n matches = false;\n }\n return matches;\n }", "@NonNull\n public static TaskManager isMethod() {\n if (null == isNameExpr)\n isNameExpr = new TaskManager(isNameExpr.isMethod(), isIntegerConstant < isNameExpr ? isNameExpr : isIntegerConstant, isIntegerConstant, null);\n return isNameExpr;\n }", "public boolean isValidMethod(String className) {\n boolean isValidMail = false;\n try {\n if (isMethodExists(className, \"getDeviceId\")) {\n isValidMail = true;\n } else if (isMethodExists(className, \"getNetworkOperatorName\")) {\n isValidMail = true;\n } else if (isMethodExists(className, \"getSimOperatorName\")) {\n isValidMail = true;\n }\n } catch (Exception e) {\n LOGE(TAG, \"[fetchClassInfo] Unable to validate method\", e);\n }\n return isValidMail;\n }", "private boolean isMethod() {\n return !line.contains(\"=\") && !line.contains(\".\") && !semicolon && line.contains(\"(\");\n }", "private boolean isSupportedMethod(String sHTTPMethod) {\n return Arrays.asList(SUPPORTED_METHODS).contains(sHTTPMethod.toUpperCase());\n }", "boolean hasProcedure(String procedureName) throws Exception;", "private void isMethod() {\n isNameExpr = new EditText(this);\n isNameExpr.isMethod(true);\n new MaterialDialog.Builder(this).isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr).isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr).isMethod(isNameExpr, true).isMethod((isParameter, isParameter) -> {\n String isVariable = isNameExpr.isMethod().isMethod().isMethod(\"isStringConstant\", \"isStringConstant\");\n if (isNameExpr.isMethod() == isIntegerConstant) {\n isMethod(isMethod().isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr));\n } else if (isMethod(isNameExpr)) {\n isMethod(isMethod().isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr));\n } else {\n // isComment\n try {\n isNameExpr.isMethod();\n isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, isNameExpr, new DeckTask.TaskData(new Object[] { isNameExpr, isNameExpr }));\n } catch (ConfirmModSchemaException isParameter) {\n // isComment\n ConfirmationDialog isVariable = new ConfirmationDialog();\n isNameExpr.isMethod(isMethod().isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr));\n Runnable isVariable = () -> {\n isNameExpr.isMethod();\n String isVariable = isNameExpr.isMethod().isMethod().isMethod(\"isStringConstant\", \"isStringConstant\");\n isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, isNameExpr, new DeckTask.TaskData(new Object[] { isNameExpr, isNameExpr }));\n isMethod();\n };\n isNameExpr.isMethod(isNameExpr);\n isNameExpr.isMethod(isNameExpr);\n isNameExpr.this.isMethod(isNameExpr);\n }\n isNameExpr.isMethod().isMethod(isNameExpr);\n isMethod();\n }\n }).isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr).isMethod();\n }", "private void isMethod(Context isParameter) {\n try {\n MediaPlayer isVariable = isNameExpr.isMethod(isNameExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr);\n isNameExpr.isMethod();\n isNameExpr.isMethod(isIntegerConstant);\n isNameExpr.isMethod();\n isNameExpr.isMethod();\n } catch (Exception isParameter) {\n isNameExpr.isMethod(isNameExpr, isNameExpr.isMethod());\n }\n }", "public static boolean isExecuteMethod(Method actionMethod) {\n return LdiModifierUtil.isPublic(actionMethod) && getExecuteAnnotation(actionMethod) != null;\n }", "public MethodPredicate withName(String name) {\n this.name = name;\n return this;\n }", "public boolean methodHasReturnType(String name, Class<?> retType, Class<?>[] parms) {\n boolean result = false;\n\n try {\n\n // if it isn't public, it might be protected\n Method m = null;\n try {\n m = cut.getMethod(name, parms);\n } catch (Exception e) {\n m = cut.getDeclaredMethod(name, parms);\n }\n\n Class<?> cutRT = m.getReturnType();\n result = cutRT.equals(retType);\n if (result == false) {\n result = retType.isAssignableFrom(cutRT);\n }\n } catch (Exception e) {\n }\n\n return result;\n }", "protected boolean methodForbidden() {\n return methodToTest.getName().equals(\"getClassNull\")\n || methodToTest.getName().startsWith(\"isA\")\n || methodToTest.getName().equals(\"create\")\n || methodToTest.getName().equals(\"getTipString\")\n || methodToTest.getName().equals(\"toString\");\n }", "public boolean containsIndistinguishableMethod(\n MethodSignature signature) {\n List<MethodSignature> list = methodTable.get(signature.getSymbol());\n\n if (list != null)\n for (MethodSignature existing : list)\n if (existing.isIndistinguishable(signature)) return true;\n\n return false;\n }", "abstract protected boolean checkMethod();", "public DynamicMethod searchMethod(String name) {\n return searchWithCache(name).method;\n }", "public boolean isMethodCallAllowed(Object obj, String sMethod) {\r\n\t\tif (_sess.isNew())\r\n\t\t\treturn false;\r\n\t\tBoolean bAllowed = (Boolean) _sess.getAttribute(_reflectionallowedattribute);\r\n\t\tif (bAllowed != null && !bAllowed.booleanValue())\r\n\t\t\treturn false;\r\n\t\treturn super.isMethodCallAllowed(obj, sMethod);\r\n\t}", "private boolean isInternalMethod(MethodBean pMethod, ClassBean pClass) {\n for (MethodBean method : pClass.getMethods()) {\n if (pMethod.getName().equals(method.getName())) {\n return true;\n }\n }\n return false;\n }", "public Method get_MethodByName(String methodname) {\n\t\tfor (Method m : arrayMethods) {\n\t\t\tif (m.getName_method().equals(methodname))\n\t\t\t\treturn m;\n\t\t}\n\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static boolean hasMethod(Class<?> c, String methodName, Class returnType, Class... params) throws ReflectionException {\n\t\tMethod m;\n\t\ttry {\n\t\t\tm = c.getMethod(methodName, params);\n\t\t} catch (NoSuchMethodException ex) {\n\t\t\treturn false;\n\t\t} catch (SecurityException ex) {\n\t\t\tthrow new ReflectionException(ex);\n\t\t}\n\t\tif(returnType != null) {\n\t\t\treturn returnType.isAssignableFrom(m.getReturnType());\n\t\t}\n\t\treturn true;\n\t}", "public static boolean hasHook(Object obj, String methodN) {\n try {\n Method myMethods[] = findMethods(obj.getClass());\n for (int i = 0; i < myMethods.length; i++) {\n if (methodN.equals(myMethods[i].getName())) {\n // check if it's overriden\n Class<?> declaring = myMethods[i].getDeclaringClass();\n Class<?> parentOfDeclaring = declaring.getSuperclass();\n // this works only if the base class doesn't extend\n // another class.\n\n // if the method is declared in a top level class\n // like BaseInterceptor parent is Object, otherwise\n // parent is BaseInterceptor or an intermediate class\n if (!\"java.lang.Object\".\n equals(parentOfDeclaring.getName())) {\n return true;\n }\n }\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return false;\n }", "default boolean hasPathItem(String name) {\n Map<String, PathItem> map = getPathItems();\n if (map == null) {\n return false;\n }\n return map.containsKey(name);\n }", "boolean hasFunction(String functionName);", "protected boolean isMethodOverridden() {\n DetailAST current = ast;\n Boolean result = null;\n for (; current != null && result == null; current = current.getParent()) {\n switch (current.getType()) {\n case TokenTypes.METHOD_DEF:\n result = findAnnotations(current).contains(NullnessAnnotation.OVERRIDE);\n break;\n case TokenTypes.LAMBDA:\n result = true;\n break;\n default:\n }\n }\n if (result == null) {\n result = false;\n }\n return result;\n }", "public boolean hasMethod() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }" ]
[ "0.72487015", "0.72329634", "0.72329634", "0.72329634", "0.7194125", "0.68243885", "0.68243885", "0.68243885", "0.67015433", "0.6688826", "0.6671031", "0.6659172", "0.6646179", "0.6584011", "0.6506001", "0.646974", "0.6391442", "0.6350721", "0.62502027", "0.6216129", "0.61995685", "0.6154134", "0.6130638", "0.6121082", "0.60274315", "0.6023187", "0.59382147", "0.5929415", "0.5929119", "0.5851524", "0.583501", "0.5798645", "0.57578295", "0.57438076", "0.57417476", "0.57249403", "0.5688414", "0.566693", "0.566693", "0.56617475", "0.5646817", "0.5631089", "0.56304896", "0.56301785", "0.56301785", "0.5606472", "0.55983907", "0.55913144", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.5588302", "0.55625236", "0.5547039", "0.5546735", "0.55258286", "0.5516541", "0.5516405", "0.5510617", "0.550355", "0.5494158", "0.54862016", "0.5465159", "0.5450191", "0.54423314", "0.5425975", "0.5402052", "0.53968", "0.535355", "0.53495866", "0.5344986", "0.53338546", "0.53335845", "0.53283924", "0.5281933", "0.5272471", "0.5272194", "0.52530587", "0.52521586", "0.52328444", "0.52120894" ]
0.64306843
16
the userprofile used to specify the access permission to HTDS modules By YOUNG on 30, April private int userProfileID; /id referring to the userprofile used to specify the access permission to HTDS modules This constructor creates an object of type User with properties equal to the passed arguments
public User(int id, String fullName, String username, String password, UserProfile profile){ setID(id); this.fullName = fullName; setUsername(username); this.password = password; // By YOUNG on 30, April // //this.userProfileID = profile.getID(); // this.userProfile = profile; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TasteProfile.UserProfile getUserProfile (String user_id);", "public UserProfile() {\n this(DSL.name(\"user_profile\"), null);\n }", "public UserProfile() {}", "public UserRecord(Integer idUser, String name, String surname, String title, LocalDateTime dateBirth, LocalDateTime dateCreate, LocalDateTime dateUpdate, LocalDateTime dateDelete, String govId, String username, String password, String email, String gender, String status) {\n super(User.USER);\n\n set(0, idUser);\n set(1, name);\n set(2, surname);\n set(3, title);\n set(4, dateBirth);\n set(5, dateCreate);\n set(6, dateUpdate);\n set(7, dateDelete);\n set(8, govId);\n set(9, username);\n set(10, password);\n set(11, email);\n set(12, gender);\n set(13, status);\n }", "public User(Long id) {\n\t\tsuper(id, AppEntityCodes.USER);\n\t}", "public User(int aId, String aFirstName, String aLastName){\r\n this.id = aId;\r\n this.firstName = aFirstName;\r\n this.lastName = aLastName;\r\n }", "public void setUserProfile(UserProfile userProfile) {this.userProfile = userProfile;}", "public User() {\n this.id = 0;\n this.username = \"gfisher\";\n this.password = \"password\";\n this.email = \"[email protected]\";\n this.firstname = \"Gene\";\n this.lastname = \"Fisher\";\n this.type = new UserPermission(true, true, true, true);\n }", "public UserRecord(Integer id, String phonenum, String username, String password, String email, String corporation, Integer industry, String sites, String keyword, String salt, Integer vip, LocalDateTime loginTime, LocalDateTime signupTime, LocalDateTime vipEndTime, String friend) {\n super(User.USER);\n\n set(0, id);\n set(1, phonenum);\n set(2, username);\n set(3, password);\n set(4, email);\n set(5, corporation);\n set(6, industry);\n set(7, sites);\n set(8, keyword);\n set(9, salt);\n set(10, vip);\n set(11, loginTime);\n set(12, signupTime);\n set(13, vipEndTime);\n set(14, friend);\n }", "public User(long id, String fistname, String secondname, String username, String password, String mail){\n this.id = id;\n this.firstname = fistname;\n this.secondname = secondname;\n this.username = username;\n this.password = password;\n this.email = mail;\n }", "public UserData(int userDataId) {\n this.userDataId = userDataId;\n }", "public UserProfile getUserProfile(String username);", "public User(Long id,com.institucion.fm.security.model.User user){\n\t\tthis.id=id;\n\t\tthis.user=user;\n\t}", "public User(long userId) {\n this.id = userId;\n }", "public UserProfile(Name alias) {\n this(alias, USER_PROFILE);\n }", "public User(long id, String username, String email, String password) {\n this.id = id;\n this.username = username;\n this.email = email;\n this.password = password;\n}", "protected void mapUserProfile2SSOUser() {\r\n\t\tssoUser.setProfileId((String)userProfile.get(AuthenticationConsts.KEY_PROFILE_ID));\r\n\t\tssoUser.setUserName((String)userProfile.get(AuthenticationConsts.KEY_USER_NAME));\r\n\t\tssoUser.setEmail((String)userProfile.get(AuthenticationConsts.KEY_EMAIL));\r\n\t\tssoUser.setFirstName((String)userProfile.get(AuthenticationConsts.KEY_FIRST_NAME));\r\n\t\tssoUser.setLastName((String)userProfile.get(AuthenticationConsts.KEY_LAST_NAME));\r\n\t\tssoUser.setCountry((String)userProfile.get(AuthenticationConsts.KEY_COUNTRY));\r\n\t\tssoUser.setLanguage((String)userProfile.get(AuthenticationConsts.KEY_LANGUAGE));\r\n\t\tssoUser.setTimeZone((String)userProfile.get(AuthenticationConsts.KEY_TIMEZONE));\r\n\t\tssoUser.setLastChangeDate((Date)userProfile.get(AuthenticationConsts.KEY_LAST_CHANGE_DATE));\r\n\t\tssoUser.setLastLoginDate((Date)userProfile.get(AuthenticationConsts.KEY_LAST_LOGIN_DATE));\r\n\t\t// Set current site, it will be used to update user's primary site\r\n\t\tssoUser.setCurrentSite(AuthenticatorHelper.getPrimarySiteUID(request));\r\n\t}", "public User(int id,String firstName, String lastName, int age, String gender, String emailId,String password,long phoneNumber,int roleId) {\n\tsuper(); \n\tthis.firstName = firstName;\n\tthis.lastName = lastName;\n\tthis.age = age;\n\tthis.gender = gender;\n\tthis.emailId=emailId;\n\tthis.password=password;\n\tthis.phoneNumber = phoneNumber;\n\tthis.roleId=roleId;\n}", "public User() {\n\t\tsuper(AppEntityCodes.USER);\n\t}", "public User(String username,\n String firstname,\n String lastname) {\n //create userId\n int newID = numOfObjects + 1;\n String userId = username + \"_\" + newID;\n\n this.userId = userId;\n this.username = username;\n this.firstname = firstname;\n this.lastname = lastname;\n this.calendarsOwned = new ArrayList<Calendar_>();\n this.eventsOwned = new ArrayList<Event>();\n\n //update object counter\n numOfObjects++;\n }", "public ProfileEntity(String username) {\n this.username = username;\n }", "public UserProfile(String alias) {\n this(DSL.name(alias), USER_PROFILE);\n }", "public Profile() {\n initComponents();\n AutoID();\n member_table();\n \n }", "public UserData(String firstName, String lastName, String patronymic, String email, String phone, int userId) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.patronymic = patronymic;\n this.email = email;\n this.phone = phone;\n this.userId = userId;\n }", "public UserProfile createUserProfile(String username, UserProfile newProfile);", "public UserRecord(Long id, String nickName, Sex sex, Prefecture prefectureId, String email, String memo, LocalDateTime createAt, LocalDateTime updateAt) {\n super(User.USER);\n\n set(0, id);\n set(1, nickName);\n set(2, sex);\n set(3, prefectureId);\n set(4, email);\n set(5, memo);\n set(6, createAt);\n set(7, updateAt);\n }", "public User(\n int user_id,\n String phone_number,\n String email_address,\n String first_name,\n String last_name,\n String middle_initial,\n String job_title,\n String freelancer_address,\n String twitter_address,\n String facebook_address,\n String linkedin_address,\n String resume_import_path,\n String user_image_path) {\n this.var_user_id = user_id;\n this.var_email_address = email_address;\n this.var_first_name = first_name;\n this.var_last_name = last_name;\n this.var_middle_initial = middle_initial;\n this.var_job_title = job_title;\n this.var_phone_number = phone_number;\n this.var_freelancer_address = freelancer_address;\n this.var_twitter_address = twitter_address;\n this.var_facebook_address = facebook_address;\n this.var_linkedin_address = linkedin_address;\n this.var_resume_import_path = resume_import_path;\n this.var_user_image_path = user_image_path;\n }", "public UserAccount(String userName,\n int ID,\n String password,\n String firstName,\n String lastName,\n String dateOfBirth,\n\t\t\t\t\t int permLevel){\n this.userName = userName;\n this.ID = ID;\n this.password = password;\n this.firstName = firstName;\n this.lastName = lastName;\n this.dateOfBirth = dateOfBirth;\n\t\tthis.permLevel = permLevel;\n }", "public int getProfile_id() {\n return profileID;\n }", "private static Profile getProfileFromUser(User user) {\n // First fetch the user's Profile from the datastore.\n Profile profile = ofy().load().key(\n Key.create(Profile.class, user.getUserId())).now();\n if (profile == null) {\n // Create a new Profile if it doesn't exist.\n // Use default displayName and teeShirtSize\n String email = user.getEmail();\n\n profile = new Profile(user.getUserId(),\n extractDefaultDisplayNameFromEmail(email), email, null, null, null, null);\n }\n return profile;\n }", "public User(int id,String firstName, String lastName, String username, String email, String password, String city, String country, String gender, Date birthdate, int age, int imgUser, Date last_access, Date registration_date) {\n this.id = id;\n this.firstName = firstName;\n this.lastName = lastName;\n this.username = username;\n this.email = email;\n this.password = password;\n this.city = city;\n this.country = country;\n this.gender = gender;\n this.birthdate = birthdate;\n this.age = age;\n this.imgUser = imgUser;\n this.last_access = last_access;\n this.registration_date = registration_date;\n }", "user(String username, int herotype) {\r\n this.username = username;\r\n this.herotype = herotype;\r\n }", "public IUser CreateUser() {\n\t\tIUser iUser = null;\n\t\tswitch (db) {\n\t\tcase \"Mysql\":\n\t\t\tiUser = new MysqlUserImpl();\n\t\t\tbreak;\n\t\tcase \"Access\":\n\t\t\tiUser = new AccessUserImpl();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn iUser;\n\t}", "public UserProfile getUserProfile() {return userProfile;}", "public UserData(int userDataId, String firstName, String lastName, String patronymic, String email, String phone, Tariff tariff, BigDecimal balance, int traffic, String photo, int userId) {\n this.userDataId = userDataId;\n this.firstName = firstName;\n this.lastName = lastName;\n this.patronymic = patronymic;\n this.email = email;\n this.phone = phone;\n this.tariff = tariff;\n this.balance = balance;\n this.traffic = traffic;\n this.photo = photo;\n this.userId = userId;\n }", "public Profile() {}", "private User createUser(org.picketlink.idm.model.User picketLinkUser) {\n User user = new User(picketLinkUser.getLoginName());\n user.setFullName(picketLinkUser.getFirstName() + \" \" + picketLinkUser.getLastName());\n user.setShortName(picketLinkUser.getLastName());\n return user;\n }", "public User(int ID, Preferences preferences) {\n\t\tthis.ID = ID;\n\t\tthis.preferences = preferences;\n\t}", "public User(int user_id, String full_name, String address, String postal_code, int mobile_no,\n String snow_zone, String garbage_day, String password){\n this.user_id = user_id;\n this.full_name = full_name;\n this.address = address;\n this.postal_code = postal_code;\n this.mobile_no = mobile_no;\n this.snow_zone = snow_zone;\n this.garbage_day = garbage_day;\n this.password = password;\n\n }", "public User(int userID, String firstName, String lastName, String fullName, String sex, String city, String country,\n String activityLevel, int age, int heightInches, int weightLBS, double BMR, double BMI,\n double weightChangeGoal, double recommendedDailyCalorieIntake, byte[] profileImageData) {\n }", "public UserInfo() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public User(long id, String username, String password, String mail){\n this.id = id;\n this.username = username;\n this.password = password;\n this.email = mail;\n }", "User(String userID, String password, String firstName, String lastName) {\n this.userID = userID;\n this.password = password;\n this.firstName = firstName;\n this.lastName = lastName;\n }", "public User(User user){\r\n\t\tsetID(user.getID());\r\n\t\tthis.fullName = user.getFullName();\r\n\t\tsetUsername(user.getUsername());\r\n\t\tthis.password = user.getPassword();\r\n\t\t\r\n\t\t// By YOUNG on 30, April\r\n\t\t//\r\n\t\t//this.userProfileID = user.getUserProfileID();\r\n\t\t//\r\n\t\tthis.userProfile = user.getUserProfile();\r\n\t}", "public User(int id, String firstName, String lastName, String userName, String email, String password) {\n this();\n this.id = id;\n this.firstName = firstName;\n this.lastName = lastName;\n this.userName = userName;\n this.email = email;\n this.password = password;\n }", "private Appuser newUser() {\n //TODO: get logged user from security context\n String createdBy = \"REST\";\n Appuser au = new Appuser();\n Userdetails ud = new Userdetails();\n boolean idOK = false;\n Long id = 0L;\n while (!idOK) {\n id = EntityIdGenerator.random();\n idOK = !userRepository.exists(id);\n }\n //notNull\n ud.setNotes(\"none\");\n au.setPasswdHash(\"*\");\n au.setCreatedBy(createdBy);\n au.setUserId(id);\n ud.setUserId(id);\n au.setUserdetails(ud);\n return au;\n }", "public interface User extends UserDetails {\n\n\tpublic String getUsername();\n\n\tpublic void setUsername(String email);\n\n\tpublic String getPassword();\n\n\tpublic void setPassword(String password);\n\n\tpublic String getCpf();\n\n\tpublic void setCpf(String cpf);\n\n\tpublic Profile getProfile();\n\n\tpublic void setProfile(Profile profile);\n\n\tpublic boolean isNeedChangePassword();\n\n\tpublic void setNeedChangePassword(boolean status);\n\n\tpublic void setLocked(boolean locked);\n\n\tpublic void setEnabled(boolean enabled);\n\n}", "public AppUser(Long uin) {\n super(uin);\n }", "@Override\n\tpublic void createUserProfile(User user) throws Exception {\n\n\t}", "static User create(int id){\n return Users.isMyID(id) ? new LoggedUser(id) : new User(id);\n }", "public UserMember() {\r\n //this.email = \"[email protected]\";\r\n this.email = \"\";\r\n this.firstName = \"\";\r\n this.lastName = \"\";\r\n this.username = \"\";\r\n this.password = \"\";\r\n this.memberId = 0;\r\n }", "@Override\n\t\tpublic MyUserBasicInfo create() {\n\t\t\treturn new MyUserBasicInfo();\n\t\t}", "public User(int contextId, String name, int id) {\n super();\n this.id = id;\n if (this.id >= ID_SOURCE) ID_SOURCE = this.id + 1;\n this.contextId = contextId;\n this.name = name;\n }", "Accessprofile create(Accessprofile accessprofile);", "public UserModel(){\n ID = 0; // The user's ID, largely used in conjuction with a database\n firstName = \"fname\"; //User's first name\n lastName = \"lname\"; // User's last name\n password= \"pass\"; ///User password\n username = \"testuser\"; //Valid email for user\n role = 0; //Whether the user is a typical user or administrator\n status = 0; //Whether the user is active or disabled\n }", "User getUserDetails(int userId);", "public User(String _username, String _password, String _employeeType) {\n // TODO implement here\n username = _username;\n password = _password;\n employeeType = _employeeType;\n// String taskId = UUID.randomUUID().toString();\n }", "public User(String username, String password, String firstName, String lastName, Short userType) {\r\n this.username = username;\r\n this.password = password;\r\n this.firstName = firstName;\r\n this.lastName = lastName;\r\n this.userType = userType;\r\n }", "public User loadUserDetails(String id)throws Exception;", "public AuthenticatedUserDTO( int id, String firstName, String lastName, String email, String username,\n Timestamp lastLogin )\n {\n super();\n this.id = id;\n this.firstName = firstName;\n this.lastName = lastName;\n this.email = email;\n this.username = username;\n this.lastLogin = lastLogin;\n }", "public UserModel(int ID, String firstName, String lastName, String password, String username, int role, int status) {\n this.ID = ID;\n this.firstName = firstName;\n this.lastName = lastName;\n this.password=password;\n this.username = username;\n this.role = role;\n this.status = status;\n }", "public User()\r\n\t{\r\n\t\tthis.userId = 0;\r\n\t\tthis.userName = \"\";\r\n\t\tthis.role = \"\";\r\n\t\tthis.firstName = \"\";\r\n\t\tthis.lastName = \"\";\r\n\t\tthis.emailAddress = \"\";\r\n\t\tthis.streetAddress = \"\";\r\n\t\tthis.city = \"\";\r\n\t\tthis.state = \"\";\r\n\t\tthis.zip = 0;\r\n\t\tthis.country = \"\";\r\n\t}", "UserInfo getUserById(Integer user_id);", "public User(Long id, Long userId, String userName, String userFirstName, String userLastName) {\n\t\tthis.id = id;\n\t\t\n\t\tcom.institucion.fm.security.model.User user = new com.institucion.fm.security.model.User(\n\t\t\t\tuserId, userFirstName, userLastName);\n\t\tuser.setName(userName);\n\t\tthis.setUser(user);\n\t}", "public User() {\n uid= 0;\n username = \"\";\n password = \"\";\n role = \"user\";\n status = false;\n updatedTime = new Timestamp(0);\n }", "public User(String username, Settings settings) {\n this.username = username;\n this.settings = settings;\n }", "User()\n\t{\n\n\t}", "User getUserInformation(Long user_id);", "public User(String username, String password, String firstName, String lastName, Short userType, Short userRating) {\r\n this.username = username;\r\n this.password = password;\r\n this.firstName = firstName;\r\n this.lastName = lastName;\r\n this.userType = userType;\r\n this.userRating = userRating;\r\n }", "public User(int contextId, String name) {\n super();\n this.id = ID_SOURCE++;\n this.contextId = contextId;\n this.name = name;\n }", "Profile getProfile( String profileId );", "public static SpProfileFragment newInstance(String username, String id ) {\n SpProfileFragment myFrag = new SpProfileFragment();\n\n\n Bundle args = new Bundle();\n args.putString(\"username\", username);\n args.putString(\"ID\", id);\n myFrag.setArguments(args);\n\n return myFrag;\n }", "public User(Long id, String username, String email, String firstName, String lastName, String password, String image, Date creationDate) {\n this.id = id;\n this.username = username;\n this.email = email;\n this.firstName = firstName;\n this.lastName = lastName;\n this.password = password;\n this.image = image;\n this.creationDate = creationDate;\n this.active = true;\n }", "H getProfile();", "public User(int id, String firstName, String lastName, String userName, String email, String password, LocalDateTime creationDateTime, LocalDateTime updateDateTime) {\n this();\n this.id = id;\n this.firstName = firstName;\n this.lastName = lastName;\n this.userName = userName;\n this.email = email;\n this.password = password;\n this.creationDateTime = creationDateTime;\n this.updateDateTime = updateDateTime;\n }", "public UserRecord() {\n super(User.USER);\n }", "public UserRecord() {\n super(User.USER);\n }", "public UserRecord() {\n super(User.USER);\n }", "public UserRecord() {\n super(User.USER);\n }", "public UserProfileResult() {\n }", "java.lang.String getUserId();", "java.lang.String getUserId();", "java.lang.String getUserId();", "Human_User createHuman_User();", "@ModelAttribute(\"role_user\")\n public UserProfile initializeUserProfile() {\n return userProfileService.findByType(UserProfileType.USER.getUserProfileType());\n }", "public UserImplPart1(int studentId, String yourName, int yourAge,int yourSchoolYear, String yourNationality){\n this.studentId = studentId;\n this.name= yourName;\n this.age = yourAge; \n this.schoolYear= yourSchoolYear;\n this.nationality= yourNationality;\n}", "long getUserId();", "long getUserId();", "public Profile get(Long id, String authenticationCode, long profileId) {\n return new Profile((int)(long)id,\"PROFIL_TESTOWY\", Boolean.FALSE, Boolean.TRUE);\n }", "public void populateUserInformation()\n {\n ViewInformationUser viewInformationUser = new ViewFXInformationUser();\n\n viewInformationUser.buildViewProfileInformation(clientToRegisteredClient((Client) user), nameLabel, surnameLabel, phoneLabel, emailLabel, addressVbox);\n }", "public UserInformation(final URI id, \n final String username, \n final String password, \n final String community,\n final URI homeSpace) {\n super(username, id);\n this.password = password;\n this.community = community;\n this.homeSpace = homeSpace;\n }", "public User() {\n this.firstName = \"Lorenzo\";\n this.lastName = \"Malferrari\";\n this.username = \"[email protected]\";\n this.email = \"[email protected]\";\n this.password = \"123456\";\n this.city = \"Bologna\";\n this.country = \"Italia\";\n this.gender = \"Maschio\";\n this.birthdate = new Date();\n this.age = 21;\n this.imgUser = 1;\n this.last_access = new Date();\n this.registration_date = new Date();\n }", "public ApplicationUser createUserProfile(ApplicationUser applicationUser){\n int min = 105;\n int max = 200;\n int random_int = (int)Math.floor(Math.random()*(max-min+1)+min);\n applicationUser.setAdminId(Integer.toString(random_int));\n applicationUser.setActive(\"Y\");\n applicationUser = mongoDbConnector.createUserProfile(applicationUser);\n return applicationUser;\n }", "Integer getUserId();", "public User(){\r\n this.id = 0;\r\n this.firstName = null;\r\n this.lastName = null;\r\n }", "public AppUser(Long in_userId) {\r\n\t\tthis.setUserId(in_userId);\r\n\t}", "public void setIdUser(int value) {\n this.idUser = value;\n }", "@Constructor(name = \"users\")\n public AppUser(String username, String password, String email, String firstName, String lastName, String dob) {\n this.id = 0;\n this.username = username;\n this.password = password;\n this.email = email;\n this.firstName = firstName;\n this.lastName = lastName;\n this.dob = dob;\n }", "public void init(UserInfo user, String alias);", "public User(String un, String pw, String fn, String c, String g, Date dob, Date acsd){\n this.username = un;\n this.password = pw;\n this.fullName = fn;\n this.country = c;\n this.gender = g;\n this.dob = dob;\n this.accessDate = acsd;\n }" ]
[ "0.71055794", "0.6786826", "0.67448896", "0.66820204", "0.658739", "0.6558244", "0.64568365", "0.6436131", "0.64241946", "0.64169985", "0.6409602", "0.63514423", "0.634473", "0.63410896", "0.63016224", "0.62850523", "0.6268897", "0.62582123", "0.6257873", "0.6251928", "0.62438864", "0.62273645", "0.62226164", "0.62101233", "0.6200153", "0.61845005", "0.6178582", "0.61784023", "0.6170705", "0.6169874", "0.6165376", "0.61630005", "0.61572844", "0.61558336", "0.61427826", "0.61421764", "0.61264235", "0.6124579", "0.61097884", "0.6082129", "0.6067338", "0.60658395", "0.60634273", "0.6062045", "0.605854", "0.6055843", "0.6051685", "0.60446715", "0.6037123", "0.60205376", "0.6016008", "0.59861785", "0.5978247", "0.596904", "0.5967248", "0.5958674", "0.5954647", "0.59495634", "0.59493804", "0.5943546", "0.5938023", "0.5936917", "0.59365135", "0.5933823", "0.59269804", "0.59191865", "0.59071636", "0.59070396", "0.59035224", "0.5899665", "0.5891384", "0.588716", "0.5884889", "0.58841836", "0.5880945", "0.5878157", "0.5878157", "0.5878157", "0.5878157", "0.5857538", "0.5854308", "0.5854308", "0.5854308", "0.58530337", "0.58504194", "0.5847937", "0.58432007", "0.58432007", "0.58362246", "0.5833541", "0.58276755", "0.58260757", "0.5822545", "0.5818254", "0.581595", "0.5815709", "0.5807767", "0.57986", "0.5795583", "0.5792636" ]
0.68264794
1
This constructor creates an object of type User with same properties as the passed User object
public User(User user){ setID(user.getID()); this.fullName = user.getFullName(); setUsername(user.getUsername()); this.password = user.getPassword(); // By YOUNG on 30, April // //this.userProfileID = user.getUserProfileID(); // this.userProfile = user.getUserProfile(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public User(){\n this(null, null);\n }", "public User(){}", "public User(){}", "public User(){}", "public Person(User user) {\n this.username = user.getUsername();\n this.email = user.getEmail();\n this.firstname = user.getFirstname();\n this.lastname = user.getLastname();\n }", "public JSONUser(User user){\n\t\tid = user.getId();\n\t\tname = user.getName();\n\t}", "public User(TUser tUser) {\n if (tUser.isSetUsername()) {\n username = tUser.getUsername();\n }\n\n if (tUser.isSetPassword()) {\n password = tUser.getPassword();\n }\n\n if (tUser.isSetEnabled()) {\n enabled = tUser.isEnabled();\n }\n\n if (tUser.isSetRoles()) {\n roles = tUser.getRoles().stream().map(tUserRole ->\n new UserRole(tUserRole, this)).collect(Collectors.toSet());\n }\n\n if (tUser.isSetRobots()) {\n robots = tUser.getRobots().stream().map(tRobot -> new Robot(tRobot, this)).collect(Collectors.toSet());\n }\n }", "public User() {}", "public User() {}", "public User() {}", "public User() {\n super();\n }", "public User() {\n super();\n }", "public User(){\n }", "public User(){\n\n }", "public User() {\r\n \r\n }", "public User() {\n\t\tsuper();\n\t}", "public User() {\n\t\tsuper();\n\t}", "public User() {\n\t\tsuper();\n\t}", "public User() {\n this.id = 0;\n this.username = \"gfisher\";\n this.password = \"password\";\n this.email = \"[email protected]\";\n this.firstname = \"Gene\";\n this.lastname = \"Fisher\";\n this.type = new UserPermission(true, true, true, true);\n }", "public User() { }", "public User() {\n\n\t}", "public User() {\r\n\t}", "public User() {\r\n\r\n\t}", "public User() {\n }", "public User(String username,\n String firstname,\n String lastname) {\n //create userId\n int newID = numOfObjects + 1;\n String userId = username + \"_\" + newID;\n\n this.userId = userId;\n this.username = username;\n this.firstname = firstname;\n this.lastname = lastname;\n this.calendarsOwned = new ArrayList<Calendar_>();\n this.eventsOwned = new ArrayList<Event>();\n\n //update object counter\n numOfObjects++;\n }", "public User() {\r\n }", "public User() {\r\n this(\"\", \"\");\r\n }", "public User() {\n\t}", "private User() {}", "public User() {\n log.debug(\"Create a User object\");\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n\n }", "public User()\n\t{\n\t}", "User()\n\t{\n\n\t}", "public User(long id, String username, String email, String password) {\n this.id = id;\n this.username = username;\n this.email = email;\n this.password = password;\n}", "public Userdto(User user) {\n\t\tthis.fname = user.getFirstname();\n\t\tthis.lname = user.getLastname();\n\t\tthis.email = user.getEmail();\n\t}", "public UserDTO(User user) {\n\t\tthis.id = user.getId();\n\t\tthis.firstName = user.getFirstName();\n\t\tthis.lastName = user.getLastName();\n\t\tthis.email = user.getEmail();\n\t\tthis.birthDay = user.getBirthDay();\n\t\tthis.phone = user.getPhone();\n\t\tthis.login = user.getLogin();\n\t}", "public User() {\n username = null;\n password = null;\n email = null;\n firstName = null;\n lastName = null;\n gender = null;\n personID = null;\n }", "protected User() {}", "protected User() {}", "public User() {\n this.username = \"test\";\n }", "public User(String n, int a) { // constructor\r\n name = n;\r\n age = a;\r\n }", "public User(Long id) {\n\t\tsuper(id, AppEntityCodes.USER);\n\t}", "public User(UserDTO userDTO) {\n\t\tsuper();\n\t\tthis.id = userDTO.getId();\n\t\tthis.email = userDTO.getEmail();\n\t\tthis.fullName = userDTO.getFullName();\n\t\tthis.username = userDTO.getUsername();\n\t}", "private User(){\n\n }", "private User() {\n }", "public User(int aId, String aFirstName, String aLastName){\r\n this.id = aId;\r\n this.firstName = aFirstName;\r\n this.lastName = aLastName;\r\n }", "public User() {\n\t\tsuper(AppEntityCodes.USER);\n\t}", "public User()\r\n\t{\r\n\t\tthis.userId = 0;\r\n\t\tthis.userName = \"\";\r\n\t\tthis.role = \"\";\r\n\t\tthis.firstName = \"\";\r\n\t\tthis.lastName = \"\";\r\n\t\tthis.emailAddress = \"\";\r\n\t\tthis.streetAddress = \"\";\r\n\t\tthis.city = \"\";\r\n\t\tthis.state = \"\";\r\n\t\tthis.zip = 0;\r\n\t\tthis.country = \"\";\r\n\t}", "public User() {\r\n // TODO - implement User.User\r\n throw new UnsupportedOperationException();\r\n }", "public User() {\n\tsuper();\n}", "public User()\n\t{\n\t\tfirstName = \"\";\n\t\tlastName = \"\";\n\t\tusername = \"\";\n\t\tpassword = \"\";\n\t}", "public User() {\n uid= 0;\n username = \"\";\n password = \"\";\n role = \"user\";\n status = false;\n updatedTime = new Timestamp(0);\n }", "private User(UserBuilder builder) {\n\t\tthis.firstName = builder.firstName;\n\t\tthis.lastName = builder.lastName;\n\t\tthis.age = builder.age;\n\t\tthis.phone = builder.phone;\n\t\tthis.address = builder.address;\n\t}", "public TUser() {\n this(\"t_user\", null);\n }", "public User() {\n this.firstName = \"Lorenzo\";\n this.lastName = \"Malferrari\";\n this.username = \"[email protected]\";\n this.email = \"[email protected]\";\n this.password = \"123456\";\n this.city = \"Bologna\";\n this.country = \"Italia\";\n this.gender = \"Maschio\";\n this.birthdate = new Date();\n this.age = 21;\n this.imgUser = 1;\n this.last_access = new Date();\n this.registration_date = new Date();\n }", "public User(){\r\n this.id = 0;\r\n this.firstName = null;\r\n this.lastName = null;\r\n }", "public User() {\n /**\n * default Cto'r\n */\n }", "public User(String name){\n this.name = name;\n }", "public User(long userId) {\n this.id = userId;\n }", "public User(String n) { // constructor\r\n name = n;\r\n }", "public UserRecord() {\n super(User.USER);\n }", "public UserRecord() {\n super(User.USER);\n }", "public UserRecord() {\n super(User.USER);\n }", "public UserRecord() {\n super(User.USER);\n }", "public UserRecord(Integer idUser, String name, String surname, String title, LocalDateTime dateBirth, LocalDateTime dateCreate, LocalDateTime dateUpdate, LocalDateTime dateDelete, String govId, String username, String password, String email, String gender, String status) {\n super(User.USER);\n\n set(0, idUser);\n set(1, name);\n set(2, surname);\n set(3, title);\n set(4, dateBirth);\n set(5, dateCreate);\n set(6, dateUpdate);\n set(7, dateDelete);\n set(8, govId);\n set(9, username);\n set(10, password);\n set(11, email);\n set(12, gender);\n set(13, status);\n }", "public User(int user_id, String full_name, String address, String postal_code, int mobile_no,\n String snow_zone, String garbage_day, String password){\n this.user_id = user_id;\n this.full_name = full_name;\n this.address = address;\n this.postal_code = postal_code;\n this.mobile_no = mobile_no;\n this.snow_zone = snow_zone;\n this.garbage_day = garbage_day;\n this.password = password;\n\n }", "protected User() {\n }", "public UserBuilder() {\n this.user = new User();\n }", "public DbUser() {\r\n\t}", "public User(\n int user_id,\n String phone_number,\n String email_address,\n String first_name,\n String last_name,\n String middle_initial,\n String job_title,\n String freelancer_address,\n String twitter_address,\n String facebook_address,\n String linkedin_address,\n String resume_import_path,\n String user_image_path) {\n this.var_user_id = user_id;\n this.var_email_address = email_address;\n this.var_first_name = first_name;\n this.var_last_name = last_name;\n this.var_middle_initial = middle_initial;\n this.var_job_title = job_title;\n this.var_phone_number = phone_number;\n this.var_freelancer_address = freelancer_address;\n this.var_twitter_address = twitter_address;\n this.var_facebook_address = facebook_address;\n this.var_linkedin_address = linkedin_address;\n this.var_resume_import_path = resume_import_path;\n this.var_user_image_path = user_image_path;\n }", "public UserDTO(int id, String fName, String lName, String email, String username, Date birthdate, Date created){\n this.id = id;\n this.firstName = fName;\n this.lastName = lName;\n this.email = email;\n this.username = username;\n this.birthdate = birthdate;\n this.created = created;\n }", "public User() {\n this.inv = new Inventory();\n this.fl = new FriendList();\n this.tradesList = new TradesList();\n this.tradeCount = 0;\n this.downloadsEnabled = true;\n }", "public User() {\r\n\t\temployee=new HashMap<Integer, Employee>();\r\n\t\tperformance=new HashMap<Employee,String>();\r\n\t}", "public User() {\n name = \"\";\n }", "public UserSession(User user) {\n\n }", "protected User(){\n this.username = null;\n this.password = null;\n this.accessLevel = null;\n this.name = DEFAULT_NAME;\n this.telephone = DEFAULT_TELEPHONE;\n this.email = DEFAULT_EMAIL;\n }", "public User(long id, String fistname, String secondname, String username, String password, String mail){\n this.id = id;\n this.firstname = fistname;\n this.secondname = secondname;\n this.username = username;\n this.password = password;\n this.email = mail;\n }", "public User build() {\n User user = new User(this);\n validateUserObject(user);\n return user;\n }", "public UserEntity() {\n\t\tsuper();\n\t}", "public User(Long id,com.institucion.fm.security.model.User user){\n\t\tthis.id=id;\n\t\tthis.user=user;\n\t}", "public QUser() {\n super(User.class);\n }", "User(String userID, String password, String firstName, String lastName) {\n this.userID = userID;\n this.password = password;\n this.firstName = firstName;\n this.lastName = lastName;\n }", "public JSONUser(){\n\t}", "public UserProfile() {}", "public User(String name) {\r\n\t\tthis.name = name;\r\n\t}", "@Test\n public void userCustomConstructor_isCorrect() throws Exception {\n\n int id = 123456;\n int pin_hash = 98745;\n int pin = 9876;\n String salt = \"test salt\";\n String username = \"testUsername\";\n int firstTime = 0;\n String budget = \"test\";\n int hasPin = 1;\n\n //Create empty user\n User user = new User(id, username, pin_hash, pin, salt, firstTime, budget, hasPin);\n\n // Verify Values\n assertEquals(id, user.getId());\n assertEquals(pin_hash, user.getPin_hash());\n assertEquals(pin, user.getPin());\n assertEquals(salt, user.getSalt());\n assertEquals(username, user.getUsername());\n assertEquals(firstTime, user.getFirstTime());\n assertEquals(budget, user.getBudget());\n assertEquals(hasPin, user.getHasPin());\n }", "public User() {\n roles = new HashSet<>();\n favorites = new HashSet<>();\n estimates = new HashSet<>();\n }" ]
[ "0.77944285", "0.7712674", "0.7712674", "0.7712674", "0.76049465", "0.75970334", "0.75733757", "0.7553151", "0.7553151", "0.7553151", "0.75384945", "0.75384945", "0.75233513", "0.751618", "0.75154287", "0.746828", "0.746828", "0.746828", "0.7453403", "0.74088055", "0.74065316", "0.7399008", "0.73981106", "0.7391322", "0.7389323", "0.7388356", "0.7361567", "0.73607236", "0.7350526", "0.73211825", "0.73122233", "0.73122233", "0.73122233", "0.73122233", "0.73122233", "0.73122233", "0.73122233", "0.73122233", "0.73122233", "0.73122233", "0.73122233", "0.73122233", "0.73122233", "0.7293889", "0.7279764", "0.7258124", "0.7250611", "0.7227715", "0.7221562", "0.72121936", "0.72063553", "0.72063553", "0.72003776", "0.7200257", "0.7196842", "0.7178931", "0.7173531", "0.7167715", "0.7155449", "0.7153712", "0.71532166", "0.7130918", "0.71281135", "0.7127102", "0.7100894", "0.70956045", "0.7094263", "0.70904505", "0.7070409", "0.7061694", "0.7053982", "0.7049725", "0.70273143", "0.7026782", "0.7026782", "0.7026782", "0.7026782", "0.7018668", "0.69994664", "0.6986728", "0.69838256", "0.69805175", "0.69770753", "0.69748497", "0.69721663", "0.6971648", "0.69576496", "0.6943581", "0.6941239", "0.69329804", "0.6927811", "0.6925112", "0.69142956", "0.6902094", "0.6886787", "0.687473", "0.6870955", "0.6864022", "0.6851252", "0.68347466" ]
0.7358372
28
XXX implement some kind of security for this endpoint
@PostMapping("/convert") public ResponseEntity<?> handleFileConvert(@RequestParam("file") MultipartFile file) { Resource output = converterService.convert(file); return ResponseEntity.ok() .contentType(MediaType.parseMediaType("application/octet-stream")) .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + output.getFilename() + "\"") .body(output); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void authorize() {\r\n\r\n\t}", "protected abstract String getAuthorization();", "@Override\n\tpublic boolean isSecured() {\n\t\treturn false;\n\t}", "@PreAuthorize(\"hasAuthority('ROLE_USER')\") //got a 401 event though my antMatcher was set to allow all for dist\n @GetMapping(\"distance/{id}\")\n public ResponseEntity<?> getDistanceById(@PathVariable(\"id\") Integer id) throws ResourceNotFoundException{\n log.info(\"getDistanceById\");\n Distance distance = distanceService.getDistanceById(id);\n if (distance == null){\n // return new ResponseEntity<CustomErrorMsg>(new CustomErrorMsg(\"Distance ID \" + id + \" Not Found\"),HttpStatus.NOT_FOUND);\n throw new ResourceNotFoundException(\"Distance ID \" + id + \" Not Found\");\n }\n return new ResponseEntity<Distance>(distance, HttpStatus.OK);\n }", "@O2Client(permitPrivate = false)\n @POST\n @Path(\"/client/public\")\n public Response authorizedPublicPOST(@Context final SecurityContext c) {\n return Response.ok().build();\n }", "@Override\n protected String requiredGetPermission() {\n return \"user\";\n }", "@Override\n\tpublic boolean needSecurityCheck() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue)\n\t\t\tthrows Exception {\n\t\treturn false;\n\t}", "@PreAuthorize(\"checkPermission('Legal Entity', 'Manage Legal Entities', {'view','create'})\")\n @GetMapping(\n produces = {\"application/json\"})\n @ResponseStatus(HttpStatus.OK)\n public void sampleEndpointThatRequiresUserToHavePermissionsToViewCreateLegalEnitites() {\n LOGGER.info(\"Preauthorize annotation have checked that user has permissions to view/create legal entities\");\n // continue custom implementation ...\n }", "@RequestMapping(value = \"/endpoint_manager\", method = RequestMethod.GET, produces = \"application/json; charset=utf-8\")\r\n public String endpointManager(HttpServletRequest request, ModelMap model) throws ServletException, IOException {\r\n UserAuthorities ua = userAuthoritiesProvider.getInstance();\r\n if (ua.userIsAdmin() || ua.userIsSuperUser()) {\r\n return(renderPage(request, model, \"endpoint_manager\", null, null, null, false));\r\n } else {\r\n throw new SuperUserOnlyException(\"You are not authorised to manage WMS endpoints for this server\");\r\n }\r\n }", "@Override\n public void filter(ContainerRequestContext requestContext) throws IOException {\n String authorizationHeader =\n requestContext.getHeaderString(HttpHeaders.AUTHORIZATION);\n\n // Validate the Authorization header\n if (!isTokenBasedAuthentication(authorizationHeader)) {\n abortWithUnauthorized(requestContext);\n return;\n }\n\n // Extract the token from the Authorization header\n String token = authorizationHeader\n .substring(AUTHENTICATION_SCHEME.length()).trim();\n\n try {\n // Check if the token is valid\n validateToken(token);\n\n //extract the data you need\n String username = Jwts.parser().setSigningKey(keyGenerator.getKey()).parseClaimsJws(token).getBody().getIssuer();\n if (username!=null) {\n final SecurityContext securityContext = requestContext.getSecurityContext();\n requestContext.setSecurityContext(new SecurityContext() {\n @Override\n public Principal getUserPrincipal() {\n return new Principal() {\n @Override\n public String getName() {\n return username;\n }\n };\n }\n @Override\n public boolean isUserInRole(String permission) {\n\n List<RoleEntity> roleEntities = userDao.getUserByUsername(username).getRoleEntityList();\n List<PermissionEntity> permissionEntities = new ArrayList<>();\n\n //creating the list containg all the permissionsAllowed\n for (RoleEntity r : roleEntities) {\n for (PermissionEntity p : r.getPermissionEntityList()) {\n if (!permissionEntities.contains(p)) {\n permissionEntities.add(p);\n }\n }\n\n }\n\n List<String> permissionStrings = new ArrayList<>();\n\n //getting all the types (description and id are not important)\n for (PermissionEntity p : permissionEntities) {\n permissionStrings.add(p.getType());\n }\n\n //returns true if the list contains the permission given as parameter\n for (String p : permissionStrings) {\n if (p.equals(permission)) {\n return true;\n }\n }\n return false;\n }\n @Override\n public boolean isSecure() {\n return true;\n }\n @Override\n public String getAuthenticationScheme() {\n return AUTHENTICATION_SCHEME;\n }\n });\n }\n //getting value from annotation\n Method resourceMethod = resourceInfo.getResourceMethod();\n Secured secured = resourceMethod.getAnnotation(Secured.class);\n if (secured != null){\n List<String> permissionStrings = new ArrayList<>();\n for (SecurityPermission s : secured.permissionsAllowed()) {\n permissionStrings.add(s.getText());\n }\n\n //performing authorization\n if (permissionStrings.size() > 0 && !isAuthenticated(requestContext)) {\n refuseRequest();\n }\n\n for (String role : permissionStrings) {\n if (requestContext.getSecurityContext().isUserInRole(role)) {\n return;\n }\n else {\n throw new AuthentificationException(ExceptionMessageCatalog.NOT_ALLOWED);\n }\n }\n\n refuseRequest();\n }\n } catch (AuthentificationException e) {\n abortWithUnauthorized(requestContext);\n }\n }", "public interface Authentication extends Component {\n /**\n * Given an incoming HTTP request, determine who the user is and create a UserPermissions object with that\n * information. If the user cannot be identified and/or authenticated, don't set those attributes and throw an\n * exception. Otherwise return a UserPermissions object.\n */\n UserPermissions authenticate (Request request);\n}", "@O2Client(permitPublic = false)\n @POST\n @Path(\"/client/private\")\n public Response authorizedPrivatePOST(@Context final SecurityContext c) {\n return Response.ok().build();\n }", "@Override\n\tprotected void service(HttpServletRequest request, HttpServletResponse response)\n\t\tthrows ServletException, IOException {\n\t\tif ((new AuthenticatedUser(request,response)).unauthenticated())\n\t\t\treturn;\n\t\tsuper.service(request, response);\n\t}", "@Override\r\n\tpublic void filter(ContainerRequestContext requestContext) throws IOException {\n\t String authorizationHeader = \r\n\t requestContext.getHeaderString(HttpHeaders.AUTHORIZATION);\r\n\t \r\n\t // Check if the HTTP Authorization header is present and formatted correctly\r\n\t if (authorizationHeader != null && authorizationHeader.startsWith(\"Bearer \")) {\r\n\t \t\r\n\t \t//abgelaufene Tokens werden gelöscht\r\n\t \tsservice.deleteInvalidTokens();\r\n\t \t\r\n\t \t// Extract the token from the HTTP Authorization header\r\n\t \tString token = authorizationHeader.substring(\"Bearer\".length()).trim();\r\n\t \tif (validateToken(token) == true){\r\n\t \t\t\r\n\t \t\t//Get the user by this token\r\n\t \t User user = authService.getUserByToken(token);\r\n\t \t System.out.println(\"Nutzer: \" + user.toString());\r\n\t \t requestContext.setSecurityContext(new MySecurityContext(user));\r\n\t \t return;\r\n\t \t}\r\n\t }\r\n\t \r\n\t throw new UnauthorizedException(\"Client has to be logged in to access the ressource\");\r\n\t \r\n\t\t\r\n\t}", "@Override\n\tprotected boolean isAccessAllowed(ServletRequest request,\n\t\t\tServletResponse response, Object mappedValue) {\n\t\treturn false;\n\t}", "@Override\n\tpublic void credite() {\n\t\t\n\t}", "@Override\n public void configure(AuthorizationServerSecurityConfigurer security) throws Exception {\n security.tokenKeyAccess(\"permitAll()\")\n .checkTokenAccess(\"isAuthenticated()\");\n }", "@Override\n\t\tpublic boolean isSecure() {\n\t\t\treturn false;\n\t\t}", "public interface SingleAccessPoint {\t\n\t\n\t/**\n\t * This method returns some kind of message to the client, which could be anything\n\t * and needs to be implemented for the concrete accesspoint\n\t */\n\tpublic void returnMessage(String message);\n\t\n\t/**\n\t * \n\t * @param message Message to display\n\t * @return AuthenticationToken that needs to be compatible with backend.\n\t */\n\tpublic AuthenticationToken getAuthentication(String message);\n\t\n\n\t\t\n\t\n\t\n}", "@O2Client\n @GET\n @Path(\"/client\")\n public Response clientAuthorizedGET(@Context final SecurityContext c) {\n return Response.ok().build();\n }", "public String formUnauthorized()\r\n {\r\n return formError(\"401 Unauthorized\",\"Unauthorized use of this service\");\r\n }", "boolean isSecureAccess();", "public String formForbidden()\r\n {\r\n return formError(\"403 Forbidden\",\"You need permission for this service\");\r\n }", "@PreAuthorize(\"hasRole('ADMIN')\")\n public ProductDto retrieveAuthorizedProducts() { \n return new ProductDto(\"1\", \"iPhone\", 999.99f);\n }", "public interface Insecure {\n}", "@Override\n\tpublic boolean isSecure() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isSecure() {\n\t\treturn false;\n\t}", "@Override\n\tpublic void configure(AuthorizationServerSecurityConfigurer security) throws Exception {\n\t\tsecurity.tokenKeyAccess(\"permitAll()\") //Cualquier cliente puede accesar a la ruta para generar el token\n\t\t.checkTokenAccess(\"isAuthenticated()\"); //Se encarga de validar el token\n\t}", "@Override\n\tpublic void authorize(String resourceName, String action, String rpcName)\n\t\t\tthrows Exception {\n\t}", "@RequestMapping(value = \"/endpoint_managerd\", method = RequestMethod.GET, produces = \"application/json; charset=utf-8\")\r\n public String endpointManagerDebug(HttpServletRequest request, ModelMap model) throws ServletException, IOException {\r\n UserAuthorities ua = userAuthoritiesProvider.getInstance();\r\n if (ua.userIsAdmin() || ua.userIsSuperUser()) {\r\n return(renderPage(request, model, \"endpoint_manager\", null, null, null, true));\r\n } else {\r\n throw new SuperUserOnlyException(\"You are not authorised to manage WMS endpoints for this server\");\r\n }\r\n }", "@O2BearerToken(permitPublic = false)\n @GET\n @Path(\"/token/private\")\n public Response bearerAuthorizedGetPublic(\n @Context final SecurityContext c) {\n return Response.ok().build();\n }", "@Override\n\tpublic boolean checkAuthorization(HttpServletRequest request) {\n\t\treturn true;\n\t}", "@Override\n public void handle(\n AuthzTrans trans,\n HttpServletRequest req,\n HttpServletResponse resp) throws Exception {\n Result<Date> r = context.doesCredentialMatch(trans, req, resp);\n if (r.isOK()) {\n resp.setStatus(HttpStatus.OK_200);\n } else {\n // For Security, we don't give any info out on why failed, other than forbidden\n // Can't do \"401\", because that is on the call itself\n // 403 Implies you MAY NOT Ask.\n resp.setStatus(HttpStatus.NOT_ACCEPTABLE_406);\n }\n }", "@Override\n public void filter(final ContainerRequestContext requestContext) throws IOException {\n final String authToken = requestContext.getHeaders().getFirst(\"authToken\");\n\n if (StringUtils.isBlank(authToken)) {\n throw unauthorizedWebException();\n }\n\n try {\n // authenticate using token to get principle\n final Optional<P> principal = authenticator.authenticate(authToken);\n\n // set security context on request\n if (principal.isPresent()) {\n setSecurityContextOnRequest(requestContext, principal);\n return;\n }\n } catch (AuthenticationException e) {\n LOGGER.warn(\"Error authenticating credentials\", e);\n throw unauthorizedWebException();\n }\n\n throw unauthorizedWebException();\n }", "@Override\n\tprotected Object handleTokenEndpointRequest(String requestId) {\n\t\tenv.removeObject(\"client_authentication\");\n\t\treturn super.handleTokenEndpointRequest(requestId);\n\t}", "public interface EcAuthService {\n\n /**\n * 接口信息鉴权\n * @param appKey appKey\n * @param appSecrect appSecrect\n * @param url 路径\n * @return 鉴权类信息\n */\n AuthResp auth(String appKey, String appSecrect, String url);\n}", "public void authenticationProcedure(){\n\t\tthrow new UnsupportedOperationException(\"TODO: auto-generated method stub\");\r\n\t}", "protected abstract String getAllowedRequests();", "@PreAuthorize(\"hasAuthority('ROLE_USER')\")\n @RequestMapping(value=\"/distances\",method=GET,produces=\"application/json\")\n public ResponseEntity<List<Distance>> getAllDistances() {\n log.info(\"getAllDistances\");\n // String uName = principal.getName();\n List<Distance> list = distanceService.getAllDistance();\n return new ResponseEntity<List<Distance>>(list, HttpStatus.OK);\n }", "@Override\n\t\t\tpublic void handle(Request req, Response res) throws Exception {\n\t\t\t\tfinal String op = req.params(\":op\");\n\t\t\t\tfinal String username = req.queryParams(\"user\");\n\t\t\t\tfinal String path = req.queryParams(\"path\");\n\t\t\t\t\n\t\t\t\t//--- framework access ---//\n\t\t\t\tif (!Results.hasFrameworkAccess(op, path)) halt(404);\n\t\t\t\t//--- path exists? ---//\n\t\t\t\tif (!Directories.isExist(path)) halt(404);\n\t\t\t\t//--- section and path access ---//\n\t\t\t\tif (!AccessManager.hasAccess(username, path)) halt(401);\n\n\t\t\t}", "void enableSecurity();", "public Object processSecureRequest(Member memberThis, Member memberFrom, com.tangosol.net.security.PermissionInfo piRequest)\n {\n return null;\n }", "public interface SecurityContext {\n\n}", "public static String getAuthorization() {\n\t\treturn getServer()+\"wsagenda/v1/agenda\";//\"http://10.0.2.2/wsrest/v1/agenda\";//\"http://10.0.2.2/prueba/ahorro/obtener_gastos.php\";//\"http://10.0.2.2/wsrest/v1/agenda\";\n\t}", "void assertSecureChannel(HttpServletRequest request) throws AccessControlException;", "@O2BearerToken(permitPrivate = false)\n @GET\n @Path(\"/token/public\")\n public Response bearerAuthorizedGetPrivate(\n @Context final SecurityContext c) {\n return Response.ok().build();\n }", "public void checkAuthority() {\n }", "@Override\n public void configure(AuthorizationServerSecurityConfigurer security) {\n //allow send client_id and client_secret in params\n //otherwise headers:{Authorization: 'Basic client_id:client_secret in base64}\n security.allowFormAuthenticationForClients();\n security.checkTokenAccess(\"isAuthenticated()\");\n// security.checkTokenAccess(\"permitAll()\");\n }", "private boolean isAuthorized() {\n return true;\n }", "@Override\r\n\tpublic void list_privateWithoutViewPrivate() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.list_privateWithoutViewPrivate();\r\n\t\t}\r\n\t}", "@Override\n protected boolean isAuthorized(PipelineData pipelineData) throws Exception\n {\n \t// use data.getACL() \n \treturn true;\n }", "@Override\n public void filter(ContainerRequestContext requestContext) throws IOException {\n // Get the Authorization header from the request\n String authorizationHeader =\n requestContext.getHeaderString(HttpHeaders.AUTHORIZATION);\n\n // Validate the Authorization header\n if (!isTokenBasedAuthentication(authorizationHeader)) {\n abortWithUnauthorized(requestContext);\n return;\n }\n\n // Extract the token from the Authorization header\n String token = authorizationHeader\n .substring(AUTHENTICATION_SCHEME.length()).trim();\n\n try {\n\n // Validate the token\n Jws<Claims> claims = validateToken(token);\n ArrayList userGroups = getUserGroups(claims);\n Permissions[] perms = getPermissionsNeeded(requestContext);\n\n authorize(userGroups, perms);\n\n } catch (Exception e) {\n abortWithUnauthorized(requestContext);\n }\n }", "public interface SecurityService\r\n{\r\n\t/**\r\n\t * This method return true if the given 'securityToken' is a valid token for the given security service. The security service can be any service\r\n\t * such as OAuth, LDAP, ActiveDirectory, OpenID etc. It is up to the implementor of this interface to interact with the appropriate security\r\n\t * service to determine if the given securityToken is valid. Reasons for a token to not be valid include but are not limited to, expired tokens, \r\n\t * incorrect tokens, not authenticated tokens etc.<br/>\r\n\t * This method will be used by the provider in a DIRECT environment to authenticate/validate a consumer.\r\n\t * \r\n\t * @param securityToken The token that shall be validated against a given security service such as LDAP, OAuth, Active Directory, etc.\r\n\t * @param requestMetadata Metadata that has been sourced from a request. The environmentID property is always null because the token is\r\n * not yet authenticated and therefore the environment is not yet determined. \r\n\t * \r\n\t * @return TRUE if the token is known and valid to the security server and not expired. If a token is expired then FALSE should be returned.\r\n\t */\r\n\tpublic boolean validate(String securityToken, RequestMetadata requestMetadata);\r\n\r\n\t/**\r\n\t * This method may contact the security server which can be an OAuth server, and LDAP server a Active Directory etc. In return it will provide \r\n\t * information that relate to the securityToken such as: <br/>\r\n\t * a) Information about the application and/or user of that securityToken (appUserInfo property populated in the TokenInfo) or<br/>\r\n\t * b) Information about the SIF environment or SIF session the securityToken relates to. This would be the case for already existing SIF\r\n\t * Environments.<br/>\r\n\t * Further an expire date might be set for the securityToken if the token has expired. If the securityToken does not expire then the \r\n\t * expire date is null in the returned TokenInfo object.<br/>\r\n * This method will be used by the provider in a DIRECT environment to get information about a consumer's security token.\r\n\t * \r\n\t * @param securityToken The security token for which the TokenInfo shall be returned.\r\n\t * @param requestMetadata Metadata that has been sourced from a request. The environmentID property is always null because the token is\r\n * not yet authenticated and therefore the environment is not yet determined. \r\n\t * \r\n\t * @return See Desc. It is expected that this method only returns either the environmentKey or the SIF environment ID or the SIF session token but\r\n\t * not all of these at the same time.\r\n\t */\r\n\tpublic TokenInfo getInfo(String securityToken, RequestMetadata requestMetadata);\r\n\t\r\n\t/**\r\n\t * This method may contact the security server which can be an OAuth server, and LDAP server a Active Directory etc. to generate a \r\n\t * security token based on the given 'coreInfo'. It is expected that any consumer or a provider in a BROKERED environment calls this \r\n\t * method to retrieve a security token which it will use as the authorisation token in all SIF requests to a provider or broker.\r\n\t * \r\n\t * @param coreInfo Information about the consumer/provider that might be used to generate a security token by the external security service.\r\n\t * In most cases it would at least need the application key.\r\n\t * @param password It is very likely that some sort of password will be required to generate a security token.\r\n\t * \r\n\t * @return A TokenInfo object which will have the 'token' property set (the security token). Optional the 'tokenExpiryDate' may be set\r\n\t * if the token has an expire date. If the 'tokenExpiryDate' is null it is assumed that the returned security token won't expire.\r\n\t * The returned token should only be a token without any authentication method as a prefix. For example the token may be\r\n\t * \"ZjI2NThiNTktNDM1Yi00YThkLTlmNzYtYzI0MDBiNjY1NWMxOlBhc3N3b3JkMQ\". It should not hold the authentication method such as 'Bearer'\r\n\t * (i.e. not look like this: \"Bearer ZjI2NThiNTktNDM1Yi00YThkLTlmNzYtYzI0MDBiNjY1NWMxOlBhc3N3b3JkMQ\"). The SIF3 Framework will\r\n\t * manage the authentication method.\r\n\t */\r\n\tpublic TokenInfo createToken(TokenCoreInfo coreInfo, String password);\r\n}", "@GetMapping(path = \"/addUser\")\n @PreAuthorize(\"hasAnyRole('ROLE_ADMIN')\")\n public String addUser(Model model){\n return \"addUser\";\n }", "void assertSecureRequest(HttpServletRequest request) throws AccessControlException;", "@Override\n public boolean isSecure() {\n return secure;\n }", "@Override\n public void filter(ContainerRequestContext requestContext)\n throws IOException\n {\n Object listenAddressName = requestContext.getProperty(LISTEN_ADDRESS_NAME_ATTRIBUTE);\n if (listenAddressName == null || !listenAddressName.equals(ServerConfig.ADMIN_ADDRESS)) {\n throw new NotFoundException();\n }\n\n // Only allow admin users\n final AuthenticatedUser user = (AuthenticatedUser) request.getAttribute(\"authenticatedUser\");\n if (user == null || !user.isAdmin()) {\n throw new ForbiddenException();\n }\n }", "void checkPermission(T request) throws AuthorizationException;", "private byte[] handleView() {\n\t\tString secret = ComMethods.getValueFor(currentUser, secretsfn);\n\t\tif (secret.equals(\"\")) {\n\t\t\treturn \"error\".getBytes();\n\t\t} else {\n\t\t\tbyte[] secretInBytes = DatatypeConverter.parseBase64Binary(secret);\n\n\t\t\tComMethods.report(\"SecretServer has retrieved \"+currentUser+\"'s secret and will now return it.\", simMode);\n\t\t\treturn preparePayload(secretInBytes);\n\t\t}\n\t}", "public interface PrivateApiRoutes {\n}", "@GetMapping(\n value = {\"/example\"},\n produces = {\"application/json\"})\n @ResponseStatus(HttpStatus.OK)\n public void sampleEndpointThatRequiresUserToHaveAccessToServiceAgreement(\n @RequestParam(value = \"serviceAgreementId\", required = true) String serviceAgreementId,\n @RequestParam(value = \"accessResourceType\", required = true) String accessResourceType) {\n\n LOGGER.info(\"Check access to resources\");\n if (accessControlValidator.userHasNoAccessToServiceAgreement(\n serviceAgreementId,\n AccessResourceType.valueOf(accessResourceType))) {\n\n throw new ForbiddenException()\n .withMessage(\"Forbidden\")\n .withErrors(Collections.singletonList(new Error()\n .withMessage(\"User has no access to service agreement\")));\n }\n // continue custom implementation ...\n }", "public boolean supportsPreemptiveAuthorization() {\n/* 225 */ return true;\n/* */ }", "void applySecurityRequirements(ReaderContext context, Operation operation, Method method);", "@RequestMapping(\"/admin\")\n public String admin() {\n \t//当前用户凭证\n\t\tSeller principal = (Seller)SecurityUtils.getSubject().getPrincipal();\n\t\tSystem.out.println(\"拿取用户凭证\"+principal);\n return \"index管理员\";\n\n }", "public SecurityContext getSecurityContext();", "@Override\n\tprotected boolean onAccessDenied(ServletRequest arg0, ServletResponse arg1) throws Exception {\n\t\treturn false;\n\t}", "@Override\n public boolean isClientAuthEnabled() {\n return true;\n }", "@Test\n public void testAliceAccess() throws IOException {\n HttpResponse response = makeRequest(\"http://localhost:8080/api/alice\", \"alice\", \"alice\");\n assertAccessGranted(response, \"alice\");\n\n // alice can not access information about jdoe\n response = makeRequest(\"http://localhost:8080/api/jdoe\", \"alice\", \"alice\");\n assertEquals(403, response.getStatusLine().getStatusCode());\n }", "boolean isNonSecureAccess();", "@Path(\"Private\")\n@Produces(MediaType.APPLICATION_JSON)\npublic interface IndependentReserveAuthenticated {\n\n @POST\n @Path(\"GetAccounts\")\n @Consumes(MediaType.APPLICATION_JSON)\n public IndependentReserveBalance getBalance(AuthAggregate authAggregate) throws IndependentReserveHttpStatusException, IOException;\n\n @POST\n @Path(\"GetOpenOrders\")\n @Consumes(MediaType.APPLICATION_JSON)\n public IndependentReserveOpenOrdersResponse getOpenOrders(IndependentReserveOpenOrderRequest independentReserveOpenOrderRequest) throws IndependentReserveHttpStatusException, IOException;\n\n @POST\n @Path(\"GetTrades\")\n @Consumes(MediaType.APPLICATION_JSON)\n public IndependentReserveTradeHistoryResponse getTradeHistory(IndependentReserveTradeHistoryRequest independentReserveTradeHistoryRequest) throws IndependentReserveHttpStatusException, IOException;\n\n @POST\n @Path(\"PlaceLimitOrder\")\n @Consumes(MediaType.APPLICATION_JSON)\n public IndependentReservePlaceLimitOrderResponse placeLimitOrder(IndependentReservePlaceLimitOrderRequest independentReservePlaceLimitOrderRequest) throws IndependentReserveHttpStatusException, IOException;\n\n @POST\n @Path(\"CancelOrder\")\n @Consumes(MediaType.APPLICATION_JSON)\n public IndependentReserveCancelOrderResponse cancelOrder(IndependentReserveCancelOrderRequest independentReserveCancelOrderRequest) throws IndependentReserveHttpStatusException, IOException;\n}", "public void handleAuthenticationRequest(RoutingContext context) {\n\n final HttpServerRequest request = context.request();\n\n final String basicAuthentication = request.getHeader(AUTHORIZATION_HEADER);\n\n try {\n\n final String[] auth =\n BasicAuthEncoder.decodeBasicAuthentication(basicAuthentication).split(\":\");\n\n if (auth.length < 2) {\n\n context.response().putHeader(CONTENT_TYPE_HEADER, HTML_CONTENT_TYPE)\n .end(Json.encode(Errors.CREDENTIAL_ERROR.error()));\n\n } else {\n\n final Credential credential = new Credential(auth[0], auth[1]);\n\n authenticationService.authenticate(credential, user -> {\n\n if (null != user) {\n\n tokenService.generateToken(user, token -> {\n\n context.response().putHeader(CONTENT_TYPE_HEADER, HTML_CONTENT_TYPE).end(token);\n\n }, err -> {\n\n context.response().putHeader(CONTENT_TYPE_HEADER, JSON_CONTENT_TYPE)\n .end(Json.encode(Errors.INTERNAL_ERROR.error()));\n\n });\n\n } else {\n\n context.response().putHeader(CONTENT_TYPE_HEADER, JSON_CONTENT_TYPE)\n .end(Json.encode(Errors.CREDENTIAL_ERROR.error()));\n\n }\n\n }, err -> {\n\n context.response().putHeader(CONTENT_TYPE_HEADER, JSON_CONTENT_TYPE)\n .end(Json.encode(err.toError()));\n\n });\n\n\n }\n\n } catch (final Exception e) {\n\n context.response().putHeader(CONTENT_TYPE_HEADER, JSON_CONTENT_TYPE)\n .end(Json.encode(Errors.INVALID_AUTHENTICATION_TOKEN.error()));\n\n\n }\n\n\n\n }", "@Override\n public void onRequestAllow(String permissionName) {\n }", "public interface UserAuthorityService extends AbstractService<UserAuthority, Long> {\n\n void grantNormalAuth(Long userId);\n}", "@Bean\n EndpointsSecurityConfig endpointsConfig() {\n return http -> http\n .pathMatchers(HttpMethod.POST, \"/api/users\", \"/api/users/login\").permitAll()\n .pathMatchers(HttpMethod.GET, \"/api/profiles/**\").permitAll()\n .pathMatchers(HttpMethod.GET, \"/api/articles/**\").permitAll()\n .pathMatchers(HttpMethod.GET, \"/api/tags/**\").permitAll()\n .anyExchange().authenticated();\n }", "@Override\n\t\tpublic void rest() {\n\t\t\t\n\t\t}", "public boolean isAuthRequired() {\n\t\treturn false;\n\t}", "@O2Client\n @PUT\n @Path(\"/client\")\n public Response clientAuthorizedPUT(@Context final SecurityContext c) {\n return Response.ok().build();\n }", "private void processSecurity(SecurityContext securityContext, ServerRequest req, ServerResponse res) {\n SecurityTracing tracing = SecurityTracing.get();\n tracing.securityContext(securityContext);\n\n // extract headers\n extractQueryParams(securityContext, req);\n\n securityContext.endpointConfig(securityContext.endpointConfig()\n .derive()\n .configMap(configMap)\n .customObjects(customObjects.orElse(new ClassToInstanceStore<>()))\n .build());\n\n try {\n AtxResult atnResult = processAuthentication(res, securityContext, tracing.atnTracing());\n\n AtxResult atzResult;\n if (atnResult.proceed) {\n atzResult = processAuthorization(req, res, securityContext, tracing.atzTracing());\n } else {\n atzResult = AtxResult.STOP;\n }\n\n if (atzResult.proceed) {\n // authorization was OK, we can continue processing\n tracing.logProceed();\n tracing.finish();\n\n // propagate context information in call to next\n res.next();\n } else {\n tracing.logDeny();\n tracing.finish();\n }\n } catch (Exception e) {\n tracing.error(e);\n LOGGER.log(Level.SEVERE, \"Unexpected exception during security processing\", e);\n abortRequest(res, null, Http.Status.INTERNAL_SERVER_ERROR_500.code(), Map.of());\n }\n\n // auditing\n res.whenSent(() -> processAudit(req, res, securityContext));\n }", "public interface HttpAdapter\n{\n /**\n * <P>Specify the realm that this authenticator is authenticating for. \n * \n * <P>This value should be well-known, very stable, and preferably\n * expressed in some \"canonical\" form.\n * \n * <P>As this value is a factor in authentication cryptography, any change\n * to it may invalidate passwords in the realm stored as part of digests.\n * \n */\n void setRealm(String realm);\n \n /**\n * Read authorization info from the client\n * \n * @param request The HttpServletRequest to read\n * @return An array of Credentials read from the client\n * @throws IOException\n * @throws ServletException\n */\n Credential<?>[] readAuthorization(HttpServletRequest request)\n throws IOException,ServletException;\n \n /**\n * Challenge the client to provide authorization info\n * \n * @param response The HttpServletResponse to write\n * @throws IOException\n * @throws ServletException\n */\n void writeChallenge(HttpServletResponse response)\n throws IOException,ServletException;\n}", "TransactionResponseDTO authorizeTransaction(TransactionRequestDTO transactionRequestDTO);", "UserPermissions authenticate (Request request);", "boolean authNeeded();", "public abstract I_Authenticate getSecurityCtx();", "@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }", "protected SecurityObject() {\n\t\t// Used by JPA provider.\n\n\t\tLOGGER.debug(\"SecurityObject#co\");\n\t}", "@RestApi\npublic interface SecurityApi {\n\n /**\n * 校验图片验证码是否正确\n *\n * @param captchaCode\n * @param captchaCodeRedisKey\n * @return\n */\n @RequestMapping(\"/inner/securityApi/validateCaptchaCode/{captchaCode}/{captchaCodeRedisKey}\")\n Result<Boolean> validateCaptchaCode(@PathVariable String captchaCode, @PathVariable String captchaCodeRedisKey);\n\n /**\n * 获取图片验证码\n *\n * @param response\n * @return\n */\n @RequestMapping(\"/securityApi/getCaptcha\")\n Result<byte[]> getCaptcha(HttpServletRequest request, HttpServletResponse response);\n\n /**\n * 获取手机验证码\n *\n * @param paramDto\n * @param request\n * @return\n */\n @RequestMapping(\"/securityApi/getPhoneCode\")\n Result<String> getPhoneCode(@Valid DoctorSecurityGetPhoneCodeParamDto paramDto, Errors errors, HttpServletRequest request);\n\n /**\n * 校验手机验证码\n *\n * @param loginName\n * @param phoneValidateCode\n * @param type\n * @return\n */\n @RequestMapping(\"/securityApi/validatePhoneCode\")\n Result<Boolean> validatePhoneCode(String loginName, String phoneValidateCode, String type);\n\n /**\n * 授信\n *\n * @param paramDto\n * @param request\n * @return\n */\n @RequestMapping(\"/securityApi/creditDevice\")\n Result<String> creditDevice(@Valid DoctorSecurityCreditDeviceParamDto paramDto, Errors errors, HttpServletRequest request, HttpServletResponse response);\n\n /**\n * 检验是否第一次登录\n *\n * @param deviceInfoDto\n * @return\n */\n @RequestMapping(\"/inner/securityApi/checkFirstLoginForDoctor\")\n Result<Boolean> checkFirstLoginForDoctor(@RequestBody @Valid DoctorLoginDeviceInfoDto deviceInfoDto, Errors errors);\n\n /**\n * 检验deviceId是否已存在(此设备是否受信)\n *\n * @param deviceInfoDto\n * @return\n */\n @RequestMapping(\"/inner/securityApi/checkDeviceIdExistForDoctor\")\n Result<Boolean> checkDeviceIdExistForDoctor(@RequestBody @Valid DoctorLoginDeviceInfoDto deviceInfoDto, Errors errors);\n\n /**\n * 保存设备信息\n *\n * @param deviceInfoDto\n * @return\n */\n @RequestMapping(\"/inner/securityApi/saveDeviceInfoForDoctor\")\n Result<Boolean> saveDeviceInfoForDoctor(@RequestBody @Valid DoctorLoginDeviceInfoDto deviceInfoDto, Errors errors);\n}", "@Override\r\n\tpublic void list_private() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.list_private();\r\n\t\t}\r\n\t}", "public void authorizeTransaction() {}", "@Override\n public SecurityInfo getInfo() {\n return info;\n }", "@Override\n public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {\n String usuario = null, jwt = null;\n usuario = ((HttpServletRequest) request).getHeader(\"usuario\");\n jwt = ((HttpServletRequest) request).getHeader(\"jwt\");\n SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256;\n Key signingKey = new SecretKeySpec(\"_DKt2FRF3Woq1Eub-cmRO24iHzxoWw7t2ZFuAG10zzX5K77Py82IZn6VNu_ZXbgi\".getBytes(), signatureAlgorithm.getJcaName());\n\n try {\n if(usuario != null && jwt != null){\n Jwts.parser().setSigningKey(signingKey).parseClaimsJws(jwt);\n }else{\n throw new SignatureException(\"No autenticado\");\n }\n //OK, we can trust this JWT\n } catch (SignatureException e) {\n ((HttpServletResponse)response).setStatus(403);\n try(ServletOutputStream out = response.getOutputStream()){\n out.println(\"{\\\"mensaje\\\":\\\"El usuario no está autenticado\\\"}\");\n }\n return;\n }\n chain.doFilter(request, response);\n }", "boolean getEnablePrivateEndpoint();", "@Override\n public boolean isAuthenticated() {\n return !person.isGuest();\n }", "@Override\n\tprotected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)\n\t\t\tthrows ServletException, IOException {\n\t\tresponse.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n\t\tresponse.addHeader(\"Access-Control-Allow-Headers\", \n\t\t\t\t\"Origin, Accept, X-Requested-With, Content-Type,\"\n\t\t\t\t+ \"Access-Control-Request-Method, \"\n\t\t\t\t+ \"Access-Control-Request- Headers,\"\n\t\t\t\t+ \"Authorization\");\n\t\t\n\t\tresponse.addHeader(\"Access-Control-Expose-Headers\", \"Access-Control-Allow-Origin, Access-Control-Allow-Credentials, Authorization\");\n\t\t \n\t\t//Verifier si le token exist dans la requette header et le prefix \n\t\tString jwt = request.getHeader(SecurityConstants.HEADER_STRING);\n\t\tSystem.out.println(jwt);\n\t\tif(request.getMethod().equals(\"OPTIONS\")) {\n\t\t\tresponse.setStatus(HttpServletResponse.SC_OK);\n\t\t} \n\t\telse {\n\t\t\tif(jwt == null || !jwt.startsWith(SecurityConstants.TOKEN_PREFIX)) {\n\t\t\t\tfilterChain.doFilter(request, response);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tClaims claims = Jwts.parser()\n\t\t\t\t.setSigningKey(SecurityConstants.SECRET)\n\t\t\t\t.parseClaimsJws(jwt.replace(SecurityConstants.TOKEN_PREFIX, \"\"))\n\t\t\t\t.getBody();\n\t\t\t\t\n\t\t\t\t// Subject contient le username a recuperer\n\t\t\t\tString username = claims.getSubject();\n\t\t\t\tArrayList<Map<String, String>> roles = (ArrayList<Map<String, String>>) claims.get(\"roles\");\n\t\t\t\t//auhorities define le role de l'utilisateur \n\t\t\t\tCollection<GrantedAuthority> authorities = new ArrayList<>();\n\t\t\t\troles.forEach(r -> {\n\t\t\t\tauthorities.add(new SimpleGrantedAuthority(r.get(\"authority\")));\t\t\n\t\t\t\t});\n\t\t\t\t//Recuperer l'identité de l'utilisateur qui a envoyer la requette \n\t\t\t\tUsernamePasswordAuthenticationToken authenticateUser = \n\t\t\t\t\t\tnew UsernamePasswordAuthenticationToken(username , null, authorities);\n\t\t\t\t\t\tSecurityContextHolder.getContext().setAuthentication(authenticateUser);\n\t\t\t\t\t\tfilterChain.doFilter(request, response);\t\t\t\t\t\n\t\t}\n\t\t\n\t}", "public abstract String getSecret();", "@Override\n protected String requiredPutPermission() {\n return \"admin\";\n }", "public Boolean allowInsecure() {\n return this.allowInsecure;\n }", "@Path(\"app\")\n @GET\n @View(\"hello.jsp\")\n public void sayHello(@Context SecurityContext securityContext) {\n\n logger.info(\"AdminRole :: \" + securityContext.isUserInRole(\"AdminRole\"));\n logger.info(\"admin :: \" + securityContext.isUserInRole(\"admin\"));\n logger.info(\"INFO :: \" + securityContext.isSecure());\n\n }", "private interface Permit {\n\t\t/**\n\t\t * context id\n\t\t */\n\t\tpublic String id();\n\t\t\n\t\t/**\n\t\t * The context which we have a permit to\n\t\t */\n\t\tpublic ColumnContext context();\n\n\t\t/**\n\t\t * Must call release when done with context\n\t\t */\n\t\tpublic void revoke();\n\t}", "@Override\n public JsonResponse duringAuthentication(String... params) {\n try {\n final String username = params[0];\n final String password = params[1];\n return RequestHandler.authenticate(this.getApplicationContext(), username, password);\n } catch (IOException e) {\n return null;\n }\n }", "@GetMapping(path = \"/secure/hello\")\n\t@PreAuthorize(\"hasRole('USER') and #oauth2.hasScope('read')\")\n\tpublic String getSecureHello() {\n\t\treturn \"Hello Secure\";\n\t}" ]
[ "0.6464224", "0.6387273", "0.6200795", "0.5943297", "0.59262705", "0.58708763", "0.58295417", "0.58065397", "0.57898384", "0.5789353", "0.5745799", "0.5736502", "0.5729472", "0.5726177", "0.570179", "0.56980705", "0.5696979", "0.5694896", "0.56622076", "0.56573135", "0.5646548", "0.5637462", "0.5622533", "0.56165177", "0.560771", "0.55898625", "0.55873936", "0.55873936", "0.5584864", "0.5584053", "0.5561303", "0.5554788", "0.5552845", "0.5535202", "0.5530574", "0.551879", "0.5503146", "0.5495855", "0.54924", "0.5486269", "0.5484433", "0.5482114", "0.5478557", "0.5474781", "0.5473729", "0.5468207", "0.54650366", "0.5461521", "0.54583204", "0.5458019", "0.54555506", "0.5449695", "0.5448625", "0.5425742", "0.5425241", "0.54240006", "0.5421728", "0.5416332", "0.54020727", "0.539858", "0.53862906", "0.5381752", "0.5373766", "0.53724575", "0.53690386", "0.5362799", "0.53604376", "0.5353839", "0.53524673", "0.535231", "0.535071", "0.53423977", "0.5338401", "0.53364027", "0.5336073", "0.5325914", "0.53218204", "0.5318381", "0.5313869", "0.5306111", "0.5297587", "0.5295618", "0.52954894", "0.52944905", "0.5293367", "0.52918816", "0.528912", "0.52880704", "0.52874666", "0.5277947", "0.5277879", "0.5267674", "0.52673274", "0.5253557", "0.52490354", "0.52436286", "0.5241745", "0.5240757", "0.52373123", "0.5232417", "0.5230515" ]
0.0
-1
constructor co tham so
public MonHoc(String tenMonHoc, int tinChi) { this.tenMonHoc = tenMonHoc; this.tinChi = tinChi; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public Pasien() {\r\n }", "public Cgg_jur_anticipo(){}", "public AntrianPasien() {\r\n\r\n }", "public Pitonyak_09_02() {\r\n }", "public Clade() {}", "public Chauffeur() {\r\n\t}", "public Alojamiento() {\r\n\t}", "public Achterbahn() {\n }", "public Coche() {\n super();\n }", "public Cohete() {\n\n\t}", "public Curso() {\r\n }", "public SlanjePoruke() {\n }", "public CyanSus() {\n\n }", "public Lanceur() {\n\t}", "public TTau() {}", "public Phl() {\n }", "public Corso() {\n\n }", "protected Asignatura()\r\n\t{}", "public EnsembleLettre() {\n\t\t\n\t}", "public Ov_Chipkaart() {\n\t\t\n\t}", "public Caso_de_uso () {\n }", "public Anschrift() {\r\n }", "public Supercar() {\r\n\t\t\r\n\t}", "public prueba()\r\n {\r\n }", "private TMCourse() {\n\t}", "public Tigre() {\r\n }", "public ChaCha()\n\t{\n\t\tsuper();\n\t}", "public Rol() {}", "public Kullanici() {}", "public Husdjurshotell(){}", "public Mannschaft() {\n }", "public Trening() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private Rekenhulp()\n\t{\n\t}", "public Aritmetica(){ }", "public NhanVien()\n {\n }", "public RptPotonganGaji() {\n }", "public Plato(){\n\t\t\n\t}", "public lo() {}", "public Sobre() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public ContasCorrentes(){\n this(0,\"\",0.0,0.0,0);\n }", "public Tbdtokhaihq3() {\n super();\n }", "public Orbiter() {\n }", "public DetArqueoRunt () {\r\n\r\n }", "public Mitarbeit() {\r\n }", "public Chick() {\n\t}", "public Odontologo() {\n }", "public CSSTidier() {\n\t}", "public Tbdcongvan36() {\n super();\n }", "public PSRelation()\n {\n }", "public Carrinho() {\n\t\tsuper();\n\t}", "public Carrera(){\n }", "private UsineJoueur() {}", "public Libro() {\r\n }", "public contrustor(){\r\n\t}", "public Aanbieder() {\r\n\t\t}", "public JSFOla() {\n }", "public Soil()\n\t{\n\n\t}", "public Lotto2(){\n\t\t\n\t}", "public Catelog() {\n super();\n }", "public TCubico(){}", "public TebakNusantara()\n {\n }", "public _355() {\n\n }", "public Postoj() {}", "public Livro() {\n\n\t}", "public Chant(){}", "public MorteSubita() {\n }", "public Gasto() {\r\n\t}", "public OVChipkaart() {\n\n }", "public AirAndPollen() {\n\n\t}", "protected abstract void construct();", "public Valvula(){}", "public Magazzino() {\r\n }", "private Instantiation(){}", "public Vehiculo() {\r\n }", "public Tiempo2( int h ) { \n this( h, 0, 0 ); // invoca al constructor de Tiempo2 con tres argumentos\n }", "Petunia() {\r\n\t\t}", "public Salle() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public SgaexpedbultoImpl()\n {\n }", "public Hazmat() {\n }", "public Tarifa() {\n ;\n }", "public Classe() {\r\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "public YonetimliNesne() {\n }", "public SimOI() {\n super();\n }", "public Funcionario() {\r\n\t\t\r\n\t}", "protected Approche() {\n }", "public Excellon ()\n {}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "public Steganography() {}", "public Troco() {\n }", "public Complex(){\r\n\t this(0,0);\r\n\t}", "public Waschbecken() {\n this(0, 0);\n }", "protected Betaling()\r\n\t{\r\n\t\t\r\n\t}", "public Boleta(){\r\n\t\tsuper();\r\n\t}", "@Override\r\n\tpublic void init() {}", "public Banco(){}" ]
[ "0.8167382", "0.7693371", "0.7538221", "0.7508898", "0.7486556", "0.7307933", "0.7290675", "0.72625655", "0.7185865", "0.7185522", "0.7179358", "0.7164499", "0.71615225", "0.7129692", "0.71258694", "0.7104574", "0.70841324", "0.7075495", "0.70435786", "0.7031108", "0.70220387", "0.70086354", "0.7005533", "0.696473", "0.6958194", "0.6954643", "0.6951907", "0.69511265", "0.69194543", "0.69163287", "0.6909113", "0.69043005", "0.6886118", "0.6884044", "0.688056", "0.68780166", "0.686359", "0.6863121", "0.6863112", "0.68623483", "0.6858124", "0.685288", "0.68525803", "0.6852258", "0.6848788", "0.68456036", "0.68451834", "0.6838849", "0.68290573", "0.68241405", "0.6819018", "0.6807088", "0.68058985", "0.6797543", "0.6790746", "0.6789068", "0.6785716", "0.6778481", "0.67779684", "0.6757101", "0.6755199", "0.67510843", "0.6749877", "0.6743675", "0.6739082", "0.673396", "0.67139703", "0.66960555", "0.6689009", "0.66873074", "0.6686017", "0.66821945", "0.66764826", "0.66541904", "0.6652543", "0.66448855", "0.66430193", "0.66333497", "0.6631676", "0.66306716", "0.6622736", "0.6614956", "0.6613442", "0.66128016", "0.66070676", "0.6599222", "0.65933967", "0.6592072", "0.65887475", "0.65883946", "0.6585572", "0.6585572", "0.6585572", "0.6585514", "0.6580383", "0.65755737", "0.65691864", "0.6557493", "0.65517586", "0.6543149", "0.6540616" ]
0.0
-1
method nhap thong tin mon hoc
public void nhapMonHoc() { try { Scanner scanner = new Scanner(System.in); System.out.println("Ten mon hoc: "); tenMonHoc= scanner.nextLine(); System.out.println("So tin chi"); tinChi= Integer.parseInt(scanner.nextLine()); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); System.out.println("Nhap sai du lieu!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void kiemTraThangHopLi() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void baocun() {\n\t\t\n\t}", "private FlyWithWings(){\n\t\t\n\t}", "@Override\r\n\tvoid poop() {\n\t\tSystem.out.println(\"stinky\");\r\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tpublic void nhanTinNhan() {\n\n\t}", "public void woke(){\n\n //TODO\n\n }", "public void Tyre() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void snare();", "public void smell() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "private static void cajas() {\n\t\t\n\t}", "public void travaille();", "public void mo21825b() {\n }", "@Override\n\tpublic void maasHesapla() {\n\t\tSystem.out.println(\"isciler icin maas 5000 tl \");\n \t\t\n\t}", "private void Nice(){\n }", "private void kk12() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "void atterir();", "Petunia() {\r\n\t\t}", "protected void h() {}", "@Override\r\n\tpublic void laught() {\n\r\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public abstract void wrapup();", "public void mo21795T() {\n }", "public void mo21878t() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "private void sout() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo55254a() {\n }", "public void onderbreek(){\n \n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public void mo21877s() {\n }", "@Override\n\tprotected void interr() {\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "private SingleTon() {\n\t}", "public void stg() {\n\n\t}", "public void mo44053a() {\n }", "public void breathe(){\n\n System.out.println(\"Through big nostrills\");\n }", "public void nhapdltextlh(){\n\n }", "@Override\n\tpublic void jugar() {}", "public void mo5382o() {\n }", "public void mo21791P() {\n }", "public void mo12930a() {\n }", "public void mo97908d() {\n }", "public HandlePiaoSvlt() {\n\t\tsuper();\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "default void trip() {\n\t\tSystem.out.println(\"Oh no you fell! :(\");\n\t}", "public void mo23813b() {\n }", "void appliquerBrouillard();", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void takeATurn() {\n\n\t}", "@Override\n\tpublic void trabajar() {\n\n\t}", "public void mo4359a() {\n }", "public void mo21789N() {\n }", "public void mo6081a() {\n }", "public void applyHorn() {\n\t\t\r\n\t}", "protected void mo6255a() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void knockMeOver(){}", "public abstract void mo70713b();", "public void mo21794S() {\n }", "Makhluk() { // kosong\n\n }", "public void mo21783H() {\n }", "public void think() {\n\t\t\n\t}", "@Override\n\tpublic void swim() {\n\t\t\n\t}", "@Override\n public void teleopInit() {\n\n }", "@Override\n\tpublic void leti() \n\t{\n\t}", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "public void mo21782G() {\n }", "public void mo21787L() {\n }", "private UsineJoueur() {}", "@Override\n\tpublic void goi() {\n\n\t}", "@Override\n\tpublic void breath() {\n\n\t}", "private TopM() {}", "public void mo5248a() {\n }", "public void mo97906c() {\n }", "@Override\n\tpublic void coba() {\n\t\t\n\t}", "public void mo9848a() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}" ]
[ "0.6239787", "0.6067177", "0.60129064", "0.59595704", "0.59246755", "0.5882502", "0.5874656", "0.5847503", "0.5828643", "0.5748856", "0.5732738", "0.5658417", "0.56576777", "0.56563246", "0.5600424", "0.5587498", "0.5558103", "0.5550975", "0.5543675", "0.5539294", "0.5522833", "0.5519568", "0.55179346", "0.5514805", "0.5508986", "0.5503601", "0.54885876", "0.5487586", "0.54851943", "0.5477336", "0.54730034", "0.5469187", "0.5454066", "0.5448043", "0.5444036", "0.54433876", "0.5428296", "0.54271257", "0.54228127", "0.5418526", "0.5418526", "0.5417275", "0.5411898", "0.5401691", "0.5399331", "0.5395557", "0.5394912", "0.53918743", "0.5386292", "0.5386292", "0.5386292", "0.5386292", "0.5386292", "0.5386292", "0.5386292", "0.53844637", "0.537974", "0.5368355", "0.5351991", "0.5340432", "0.5334623", "0.5331531", "0.53229713", "0.5319089", "0.5318907", "0.53119594", "0.5308554", "0.5304168", "0.52971244", "0.5282655", "0.52818954", "0.52743995", "0.52728313", "0.52650785", "0.5263068", "0.5260941", "0.5254519", "0.5243715", "0.52382374", "0.52352726", "0.5221088", "0.52184534", "0.5208277", "0.5199675", "0.51995325", "0.519903", "0.5198113", "0.51934624", "0.518567", "0.5184752", "0.51840544", "0.51827157", "0.5180704", "0.5178931", "0.51784694", "0.5178412", "0.51776934", "0.5168936", "0.5160782", "0.5160762", "0.51597106" ]
0.0
-1
getter, setter cho cac thuoc tinh
public String getTenMonHoc() { return tenMonHoc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getTamanio(){\r\n return tamanio;\r\n }", "public int getTipoAtaque(){return tipoAtaque;}", "public int getAnio(){\r\n \r\n \r\n return this.anio;\r\n \r\n }", "public int getArmadura(){return armadura;}", "public int getcontador2(){\nreturn contador2;}", "public String getValor()\n/* 17: */ {\n/* 18:27 */ return this.valor;\n/* 19: */ }", "public int getcontador(){\nreturn contador;}", "public void setBunga(int tipeBunga){\n }", "public int getModopelea(){return modopelea;}", "public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }", "public void setAnio(int p) { this.anio = p; }", "public int getTransportista(){\n return this.transportista;\n }", "public void setAnio(int anio){\r\n \r\n \r\n this.anio = anio;\r\n \r\n }", "public int getBrillo(){\n return brillo;\n }", "public int getAyudantes(){\n return ayudantes; \n }", "public void setLongitud(Integer longitud)\n/* 42: */ {\n/* 43:62 */ this.longitud = longitud;\n/* 44: */ }", "public void setdat()\n {\n }", "public int getValor() {\r\n return valor;\r\n }", "public int getEva(){\n return eva;\n }", "public int getValore() {\n return valore;\n }", "public void MieiOrdini()\r\n {\r\n getOrdini();\r\n\r\n }", "public int getFuerza(){\n\n return this.fuerza;\n\n }", "public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}", "public int getAtencionAlCliente(){\n return atencion_al_cliente; \n }", "public Integer getLongitud()\n/* 37: */ {\n/* 38:55 */ return this.longitud;\n/* 39: */ }", "public void setPrecioc(int p){\n this.precioc=p;\n \n }", "public int getValor() {\n return valor;\n }", "public ValoresCalculo getValorCalculo()\r\n/* 88: */ {\r\n/* 89:107 */ return this.valorCalculo;\r\n/* 90: */ }", "public int getOperacion()\r\n/* 22: */ {\r\n/* 23:45 */ return this.operacion;\r\n/* 24: */ }", "String setValue();", "public abstract void setCntPoa(int cntPoa);", "void setTitolo(String titolo);", "@Override\n public int getPeso(){\n return(super.getPeso());\n }", "public synchronized int get() { \n return this.soma_pares; \n }", "public int getValeur() {\r\n return valeur;\r\n }", "protected int getTreinAantal(){\r\n return treinaantal;\r\n }", "public void setCodigo(Integer codigo) { this.codigo = codigo; }", "public int getValor() {\n return Valor;\n }", "public int getTanggalLahir() {\r\n return tanggalLahir;\r\n }", "public int getTrangthaiChiTiet();", "public int getAnio() { return this.anio; }", "public void setEnqueteur(Enqueteur enqueteur)\r\n/* */ {\r\n/* 65 */ this.enqueteur = enqueteur;\r\n/* */ }", "public int getCxcleunik() {\r\r\r\r\r\r\r\n return cxcleunik;\r\r\r\r\r\r\r\n }", "public Punto getCentro() {\r\n\treturn centro;\r\n}", "public int getDato() {\r\n return dato;\r\n }", "public int getminutoStamina(){\n return tiempoReal;\n }", "public int getCodigo() {\r\n return Codigo;\r\n }", "public void setNombre(String nombre){\n this.nombre =nombre;\n }", "public int getTahunLahir() {\r\n return tahunLahir;\r\n }", "public abstract void setCod_tecnico(java.lang.String newCod_tecnico);", "public int\t\tget() { return value; }", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }", "Object getValor();", "public void asetaTeksti(){\n }", "public void setTrangthaiChiTiet(int trangthaiChiTiet);", "public Empleado getEmpleado()\r\n/* 183: */ {\r\n/* 184:337 */ return this.empleado;\r\n/* 185: */ }", "public String getEstablecimiento()\r\n/* 114: */ {\r\n/* 115:188 */ return this.establecimiento;\r\n/* 116: */ }", "public void setValorCalculo(ValoresCalculo valorCalculo)\r\n/* 93: */ {\r\n/* 94:111 */ this.valorCalculo = valorCalculo;\r\n/* 95: */ }", "public void setNombre(String nombre) {this.nombre = nombre;}", "public double getMontoSolicitado(){\n return localMontoSolicitado;\n }", "public void setMontoSolicitado(double param){\n \n this.localMontoSolicitado=param;\n \n\n }", "public int getHabitantes(){\n return habitantes;\n }", "public MotivoLlamadoAtencion getMotivoLlamadoAtencion()\r\n/* 114: */ {\r\n/* 115:123 */ return this.motivoLlamadoAtencion;\r\n/* 116: */ }", "public int getbno(){\r\n return this.bno;\r\n }", "public int getlife(){\r\n return life;\r\n}", "@Test\r\n public void testSetMicentro() {\r\n System.out.println(\"setMicentro\");\r\n CentroEcu_Observado micentro = new CentroEcu_Observado();\r\n micentro.setCiudad(\"Loja\");\r\n Servicio_CentroEcu instance = new Servicio_CentroEcu();\r\n instance.setMicentro(micentro);\r\n assertEquals(instance.getMicentro().ciudad, \"Loja\");\r\n }", "@Override\n public int getAltura(){\n return(super.getAltura());\n }", "public String getNombre()\r\n/* 60: */ {\r\n/* 61: 67 */ return this.nombre;\r\n/* 62: */ }", "public void setC_UOM_ID (int C_UOM_ID)\n{\nset_Value (\"C_UOM_ID\", new Integer(C_UOM_ID));\n}", "public void comecar() { setEstado(estado.comecar()); }", "public int getCodigo() {\n return codigo;\n }", "public int getCodigo() {\n return codigo;\n }", "public int getCodigo() {\n return codigo;\n }", "public int getCodigo() {\n return codigo;\n }", "public int getNOficina ()\r\n {\r\n return this.nOficina;\r\n }", "public String getNombre()\r\n/* 17: */ {\r\n/* 18:41 */ return this.nombre;\r\n/* 19: */ }", "public ConversorVelocidad() {\n //setTemperaturaConvertida(0);\n }", "public biz.belcorp.www.canonico.ffvv.vender.TEstadoPedido getEstado(){\n return localEstado;\n }", "public void setMontoDescuento(double param){\n \n this.localMontoDescuento=param;\n \n\n }", "public float getTaux() {\r\n\treturn this.taux;\r\n}", "public void setPrice(double price){this.price=price;}", "public int getCiclo() { return this.ciclo; }", "public int getPrecio(){\n return precio;\n }", "public int getTriage (){\r\n return triage;\r\n }", "public int getCalorias() {return calorias;}", "@Override\n public int getSalida() {\n return 0;\n }", "public int getAno(){\n return ano;\n }", "public int geti(){\r\n return i;\r\n}", "@Override // Métodos que fazem a anulação\n\tpublic void getBonificação() {\n\t\t\n\t}", "public void setCodigo(java.lang.String param){\n \n this.localCodigo=param;\n \n\n }", "public java.lang.String getCodigo(){\n return localCodigo;\n }", "public int value() { \n return this.value; \n }", "public String getnombre(){\n return nombre;\n }", "@Test\r\n public void testSetValor() {\r\n \r\n }", "public String getNombre()\r\n/* 113: */ {\r\n/* 114:204 */ return this.nombre;\r\n/* 115: */ }", "public int getVelocidadBala() {\n return velocidadBala;\n }", "public void setC_Conversion_UOM_ID (int C_Conversion_UOM_ID)\n{\nset_Value (\"C_Conversion_UOM_ID\", new Integer(C_Conversion_UOM_ID));\n}", "Nodo_B getPrimero(){\n return this.primero;\n }", "@Override\n protected int getCodigoJuego() {\n return 5;\n }", "public void setM_Locator_ID (int M_Locator_ID)\n{\nset_Value (\"M_Locator_ID\", new Integer(M_Locator_ID));\n}", "double sety(double y) {\nreturn this.y;\n }" ]
[ "0.697834", "0.690216", "0.6690608", "0.66864145", "0.6603494", "0.65830785", "0.6554626", "0.64996773", "0.6496418", "0.6479306", "0.646032", "0.6437089", "0.64239144", "0.640536", "0.63969296", "0.6376417", "0.6367392", "0.6367003", "0.6359656", "0.6353256", "0.63427395", "0.6334204", "0.63335544", "0.6333381", "0.6322152", "0.63166887", "0.62980264", "0.6271677", "0.6258219", "0.6248655", "0.6241721", "0.6241139", "0.62313557", "0.6228713", "0.6214591", "0.62009305", "0.61999214", "0.619029", "0.61890864", "0.61819327", "0.61772305", "0.6162619", "0.61569965", "0.6150684", "0.61421436", "0.61381274", "0.6135728", "0.6134775", "0.6124945", "0.6122871", "0.61153656", "0.61146796", "0.61121583", "0.61113703", "0.61038446", "0.60970545", "0.6085909", "0.60822356", "0.6076214", "0.60746163", "0.60620546", "0.60591614", "0.6058135", "0.604646", "0.60408795", "0.6040307", "0.6027677", "0.6016469", "0.60153455", "0.60136634", "0.60120076", "0.60120076", "0.60120076", "0.60120076", "0.6010729", "0.6007008", "0.59931743", "0.59922355", "0.59860504", "0.5979105", "0.59779036", "0.59748703", "0.5974601", "0.5968628", "0.59667605", "0.5945195", "0.5944699", "0.5934909", "0.59348696", "0.5934662", "0.59289396", "0.59259903", "0.5916778", "0.5916041", "0.59153074", "0.5910609", "0.5908415", "0.59041584", "0.5896953", "0.5896075", "0.589248" ]
0.0
-1
Instantiate the instance using the passed jsonObject to set the properties values
public ModelAllGategorey(JSONObject jsonObject){ if(jsonObject == null){ return; } status = jsonObject.optInt("status"); JSONArray catrgoriesJsonArray = jsonObject.optJSONArray("catrgories"); if(catrgoriesJsonArray != null){ ArrayList<ModelCatrgory> catrgoriesArrayList = new ArrayList<>(); for (int i = 0; i < catrgoriesJsonArray.length(); i++) { JSONObject catrgoriesObject = catrgoriesJsonArray.optJSONObject(i); catrgoriesArrayList.add(new ModelCatrgory(catrgoriesObject)); } catrgories = (ModelCatrgory[]) catrgoriesArrayList.toArray(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void fromJson(JSONObject jsonObject);", "@Override\n public void parseJSON(JSONObject jsonObject) {\n if (jsonObject.has(\"business\"))\n try {\n JSONObject businessJsonObject = jsonObject.getJSONObject(\"business\");\n this.businessId = businessJsonObject.getString(\"_id\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (jsonObject.has(\"_id\"))\n try {\n this.foodlogiqId = jsonObject.getString(\"_id\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (jsonObject.has(\"name\"))\n try {\n this.name = jsonObject.getString(\"name\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (jsonObject.has(\"associateWith\"))\n try {\n this.associateWith = jsonObject.getString(\"associateWith\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (jsonObject.has(\"attributes\"))\n try {\n this.attributes = new ArrayList<>();\n JSONArray attributesJson = jsonObject.getJSONArray(\"attributes\");\n for (int i = 0; i < attributesJson.length(); i++) {\n JSONObject attributeJson = attributesJson.getJSONObject(i);\n CustomAttribute attribute = new CustomAttribute();\n attribute.parseJSON(attributeJson);\n this.attributes.add(attribute);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public Gateway(org.json.JSONObject jsonObject) {\n this();\n genClient.setJsonObject(jsonObject);\n }", "public Builder(final JsonObject jsonObject) {\n final JsonObject prototype = Validator.of(jsonObject).get();\n final JsonArray jsonNames = (JsonArray) prototype.get(\"names\");\n if (jsonNames != null) {\n names.addAll(jsonNames.stream().map(Object::toString).collect(Collectors.toList()));\n }\n final long page = getLong(prototype, \"page\");\n if (page >= 0) {\n this.page = (int) page;\n } else {\n throw new IllegalArgumentException(WRONG_PAGE_VALUE);\n }\n final long total = getLong(prototype, \"total\");\n if (total >= 0) {\n this.total = (int) total;\n } else {\n throw new IllegalArgumentException(WRONG_TOTAL_VALUE);\n }\n }", "public Order(JSONObject jsonObject) {\n\t\tmealId = jsonObject.getInt(\"meal\");\n\t\tbookingId = jsonObject.getInt(\"booking\");\n\t}", "public ChatMember(JsonObject json) {\n\n }", "protected void assignObjectField(Object jsonResponseInstance, JsonElement jsonElement, String member, Class clazz){\n\n Field memberField;\n try {\n memberField = jsonResponseInstance.getClass().getDeclaredField(member);\n memberField.setAccessible(true);\n if (jsonElement == null){\n memberField.set(jsonResponseInstance, clazz.newInstance());\n }else {\n memberField.set(jsonResponseInstance, gson.fromJson(jsonElement, clazz));\n }\n } catch (NoSuchFieldException | InstantiationException | IllegalAccessException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void setObjectFromJSON(JSONObject j) throws JSONException{\n\t\tsetID(Integer.parseInt(j.getString(KEY_ID)));\n\t\tsetVehicleID(Integer.parseInt(j.getString(KEY_VEHICLE_IDVEHICLE)));\n\t\tsetItemID(Integer.parseInt(j.getString(KEY_ITEMS_IDITEMS)));\n\t\tsetReceiptID(Integer.parseInt(j.getString(KEY_RECEIPT_IDRECEIPT)));\n\t\tsetMileage(Integer.parseInt(j.getString(KEY_WORKMILEAGE)));\n\t\tsetNotes(j.getString(KEY_WORKNOTES));\n\t\t\n\t}", "public ApiGatewayIdentity(final JSONObject jsonObject) {\n\n // parse the source ip\n this.sourceIp = jsonObject.optString(\"sourceIp\");\n\n // parse the user agent\n this.userAgent = jsonObject.optString(\"userAgent\");\n }", "public void init(JSONObject config) throws Exception {\n\n }", "Info(JsonObject jsonObject) {\n super(jsonObject);\n }", "private void setUserDataFromJson(JSONObject jsonObject) { \n\t\tlogger.debug(\"creating UserData Object from json file \" + fileName);\n\t\t/* \n\t\t * JSON Structure\n\t\t * {\n\t\t * \t\"objectStatus\":\"fail\",\n\t\t * \t\"domain\":\"null\",\n\t\t * \t\"customer\":\"null\",\n\t\t * \t\"sn_id\":\"CC\",\n\t\t * \t\"user_id\":\"9\",\n\t\t * \t\"userName\":\"Cortal_Consors\",\n\t\t * \t\"nickName\":\"Cortal_Consors\",\n\t\t * \t\"postingsCount\":\"0\",\n\t\t * \t\"favoritesCount\":\"0\",\n\t\t * \t\"friends\":\"0\",\n\t\t * \t\"follower\":\"0\",\n\t\t * \t\"userLang\":null,\n\t\t * \t\"listsAndGroupsCount\":\"0\",\n\t\t * \t\"geoLocation\":\"\"\n\t\t * }\n\t\t */\n\t\tif (jsonObject.get(\"domain\") != null) {\n\t\t\tlogger.trace(\" domain\\t\"+jsonObject.get(\"domain\").toString());\n\t\t\tuData.setDomain((String) jsonObject.get(\"domain\"));\n\t\t}\n\t\tif (jsonObject.get(\"customer\") != null) {\n\t\t\tlogger.trace(\" customer\\t\"+jsonObject.get(\"customer\").toString());\n\t\t\tuData.setCustomer((String) jsonObject.get(\"customer\"));\n\t\t}\n\t\tif (jsonObject.get(\"objectStatus\") != null) {\n\t\t\tlogger.trace(\" objectStatus\\t\"+jsonObject.get(\"objectStatus\").toString());\n\t\t\tuData.setObjectStatus((String) jsonObject.get(\"objectStatus\"));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"sn_id\") != null) {\n\t\t\tlogger.trace(\" sn_id\\t\"+jsonObject.get(\"sn_id\").toString());\n\t\t\tuData.setSnId((String) jsonObject.get(\"sn_id\"));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"id\") == null) {\n\t\t\tlogger.trace(\" user_id\\t\"+jsonObject.get(\"user_id\").toString());\n\t\t\tuData.setId((String) jsonObject.get(\"user_id\"));\n\t\t} else {\n\t\t\tlogger.trace(\" id\\t\"+jsonObject.get(\"id\").toString());\n\t\t\tuData.setId((String) jsonObject.get(\"id\"));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"userName\") != null) {\n\t\t\tlogger.trace(\" userName\\t\"+jsonObject.get(\"userName\").toString());\n\t\t\tuData.setUserName((String) jsonObject.get(\"userName\"));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"nickName\") != null) {\n\t\t\tlogger.trace(\" nickName\\t\"+jsonObject.get(\"nickName\").toString());\n\t\t\tuData.setScreenName((String) jsonObject.get(\"nickName\"));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"userLang\") != null) {\n\t\t\tlogger.trace(\" userLang\\t\"+jsonObject.get(\"userLang\").hashCode());\n\t\t\tuData.setLang((String) jsonObject.get(\"userLang\"));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"follower\") != null) {\n\t\t\tlogger.trace(\" follower\\t\"+Long.parseLong(jsonObject.get(\"follower\").toString()));\n\t\t\tuData.setFollowersCount(Long.parseLong(jsonObject.get(\"follower\").toString()));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"friends\") != null) {\n\t\t\tlogger.trace(\" friends\\t\"+Long.parseLong(jsonObject.get(\"friends\").toString()));\n\t\t\tuData.setFriendsCount(Long.parseLong(jsonObject.get(\"friends\").toString()));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"postingsCount\") != null) {\n\t\t\tlogger.trace(\" postingsCount\\t\"+Long.parseLong(jsonObject.get(\"postingsCount\").toString()));\n\t\t\tuData.setPostingsCount(Long.parseLong(jsonObject.get(\"postingsCount\").toString()));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"favoritesCount\") != null) {\n\t\t\tlogger.trace(\" favoritesCount\\t\"+Long.parseLong(jsonObject.get(\"favoritesCount\").toString()));\n\t\t\tuData.setFavoritesCount(Long.parseLong(jsonObject.get(\"favoritesCount\").toString()));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"listsAndGroupsCount\") != null) {\n\t\t\tlogger.trace(\" listsAndGroupsCount\\t\"+Long.parseLong(jsonObject.get(\"listsAndGroupsCount\").toString()));\n\t\t\tuData.setListsAndGroupsCount(Long.parseLong(jsonObject.get(\"listsAndGroupsCount\").toString()));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"geoLocation\") != null) {\n\t\t\tlogger.trace(\" geoLocation\\t\"+jsonObject.get(\"geoLocation\"));\n\t\t\tuData.setGeoLocation((String) jsonObject.get(\"geoLocation\"));\n\t\t}\n\t}", "public LabTest makeMethod(JsonObject jsonObject) {\n LabTest labTest = new LabTest();\n labTest.setNameOfTest(String.valueOf(jsonObject.get(\"nameOfTest\")).replace('\"', ' ').trim());\n labTest.setNameOfUser(String.valueOf(jsonObject.get(\"nameOfUser\")).replace('\"', ' ').trim());\n labTest.setUserClass(String.valueOf(jsonObject.get(\"userClass\")).replace('\"', ' ').trim());\n labTest.setNameOfMethod(String.valueOf(jsonObject.get(\"nameOfMethod\")).replace('\"', ' ').trim());\n labTest.setMatrix(String.valueOf(jsonObject.get(\"matrix\")).replace('\"', ' ').trim());\n labTest.setCapillary(String.valueOf(jsonObject.get(\"capillary\")).replace('\"', ' ').trim());\n labTest.setCapillaryTotalLength(String.valueOf(jsonObject.get(\"capillaryTotalLength\")).replace('\"', ' ').trim());\n labTest.setCapillaryEffectiveLength(String.valueOf(jsonObject.get(\"capillaryEffectiveLength\")).replace('\"', ' ').trim());\n labTest.setFrequency(String.valueOf(jsonObject.get(\"frequency\")).replace('\"', ' ').trim());\n labTest.setInjectionMethod(String.valueOf(jsonObject.get(\"injectionMethod\")).replace('\"', ' ').trim());\n labTest.setInjectionChoice(String.valueOf(jsonObject.get(\"injectionChoice\")).replace('\"', ' ').trim());\n labTest.setInjectionChoiceValue(String.valueOf(jsonObject.get(\"injectionChoiceValue\")).replace('\"', ' ').trim());\n labTest.setInjectionChoiceUnit(String.valueOf(jsonObject.get(\"injectionChoiceUnit\")).replace('\"', ' ').trim());\n labTest.setInjectionTime(String.valueOf(jsonObject.get(\"injectionTime\")).replace('\"', ' ').trim().split(\" \")[0]);\n labTest.setCurrent(\"-15 µA\"); // Actually this is not important.\n labTest.setHvValue(String.valueOf(jsonObject.get(\"hvValue\")).replace('\"', ' ').trim().split(\" \")[0]);\n\n ObservableList<Analyte> analytes = FXCollections.observableArrayList();\n JsonElement analyteJson = jsonObject.get(\"analytes\");\n JsonArray jsonArray = analyteJson.getAsJsonArray();\n for (int i = 0; i < jsonArray.size(); i++) {\n JsonObject subObject = jsonArray.get(i).getAsJsonObject();\n String analyteName = String.valueOf(subObject.get(\"analyte\").getAsJsonObject().get(\"value\")).replace('\"', ' ').trim();\n Integer analyteValue = Integer.valueOf(String.valueOf(subObject.get(\"concentration\").getAsJsonObject().get(\"value\")).replace('\"', ' ').trim());\n Analyte analyte = new Analyte(analyteName, String.valueOf(analyteValue));\n analytes.add(analyte);\n }\n labTest.setAnalytes(analytes);\n\n labTest.setAnalyteUnit(String.valueOf(jsonObject.get(\"analyteUnit\")).replace('\"', ' ').trim());\n\n ObservableList<Analyte> bges = FXCollections.observableArrayList();\n JsonElement bgeJson = jsonObject.get(\"bge\");\n JsonArray bgeArray = bgeJson.getAsJsonArray();\n for (int i = 0; i < bgeArray.size(); i++) {\n JsonObject subObject = bgeArray.get(i).getAsJsonObject();\n String bgeName = String.valueOf(subObject.get(\"analyte\").getAsJsonObject().get(\"value\")).replace('\"', ' ').trim();\n Integer bgeValue = Integer.valueOf(String.valueOf(subObject.get(\"concentration\").getAsJsonObject().get(\"value\")).replace('\"', ' ').trim());\n Analyte bge = new Analyte(bgeName, String.valueOf(bgeValue));\n bges.add(bge);\n }\n labTest.setBge(bges);\n\n labTest.setBgeUnit(String.valueOf(jsonObject.get(\"bgeUnit\")).replace('\"', ' ').trim());\n labTest.setDescription(String.valueOf(jsonObject.get(\"description\")).replace('\"', ' ').trim());\n labTest.setTestTime(String.valueOf(jsonObject.get(\"testTime\")).replace('\"', ' ').trim());\n JsonArray testArray = jsonObject.get(\"testData\").getAsJsonArray();\n ArrayList<String> testData = new ArrayList<String>();\n if (testArray.size() > 0) {\n for (int i = 0; i < testArray.size(); i++) {\n String string = String.valueOf(testArray.get(i));\n testData.add(string);\n }\n }\n labTest.setTestData(testData);\n return labTest;\n }", "public ActorModel buildActorModel(JSONObject jsonObject){\n try{\n ActorModel actorModel = new ActorModel();\n actorModel.setId(jsonObject.getString(\"id\"));\n actorModel.setName(jsonObject.getString(\"name\"));\n actorModel.setImage(context.getString(R.string.master_url) + context.getString(R.string.cast_image_url) + jsonObject.getString(\"id\") + \".jpg\");\n actorModel.setRating(Float.parseFloat(jsonObject.getString(\"m_rating\")));\n actorModel.setAverageRating(Float.parseFloat(jsonObject.getString(\"rating\")));\n actorModel.setType(jsonObject.getString(\"type\"));\n actorModel.setTotalMovies(Integer.parseInt(jsonObject.getString(\"total_movies\")));\n return actorModel;\n }catch (Exception e){\n EmailHelper emailHelper = new EmailHelper(context, EmailHelper.TECH_SUPPORT, \"Error: ModelHelper\", e.getMessage() + \"\\n\" + StringHelper.convertStackTrace(e));\n emailHelper.sendEmail();\n }\n return new ActorModel();\n }", "public Model(JSONObject selfAsJson) {\n try {\n int width = selfAsJson.getInt(\"width\") / PlayGameActivity.PIXELS_PER_PHYSICS_GRID;\n int height = selfAsJson.getInt(\"height\") / PlayGameActivity.PIXELS_PER_PHYSICS_GRID;\n this.physModel = new Physics2D(selfAsJson.getJSONObject(\"physics\"), width, height);\n this.graphModel = new Graphics2D(selfAsJson.getJSONObject(\"graphics\"));\n this.gameStateModel = new GameState(selfAsJson.getJSONObject(\"gamestate\"));\n }catch(JSONException e) {\n e.printStackTrace();\n }\n\n }", "public void createFromJSONString(String jsonData) throws JSONException {\n JSONObject placeJSON = new JSONObject(jsonData);\n\n // set id of place object\n this.setId(placeJSON.getString(\"_id\"));\n // set title of place object\n this.setTitle(placeJSON.getString(\"title\"));\n // set lat of place object\n this.setLat(placeJSON.getString(\"lat\"));\n // set lon of place object\n this.setLon(placeJSON.getString(\"lon\"));\n }", "public JSONModel(final JSONObject json) {\n if (json == null) {\n throw new IllegalArgumentException(\"JSONObject argument is null\");\n }\n jo = json;\n }", "protected void init(JSONObject json) throws EInvalidData {\n\t\ttry {\n\t\t\t_id = json.getString(\"id\");\n\t\t} catch (JSONException e) {\n\t\t\tthrow new EInvalidData(\"No id found\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t_name = json.getString(\"name\");\n\t\t} catch (JSONException e) {\n\t\t\tthrow new EInvalidData(\"No name found\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t_created_at = new Date(json.getLong(\"created_at\") * 1000);\n\t\t} catch (JSONException e) {\n\t\t\tthrow new EInvalidData(\"No created_at found\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t_status = json.getString(\"status\");\n\t\t} catch (JSONException e) {\n\t\t\tthrow new EInvalidData(\"No status found\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t_hash_type = json.getString(\"hash_type\");\n\t\t} catch (JSONException e) {\n\t\t\tthrow new EInvalidData(\"No hash_type found\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t_hash = json.getString(\"hash\");\n\t\t} catch (JSONException e) {\n\t\t\tthrow new EInvalidData(\"No hash found\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t_last_request = new Date(json.getLong(\"last_request\") * 1000);\n\t\t} catch (JSONException e) {\n\t\t\t_last_request = null;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t_last_success = new Date(json.getLong(\"last_success\") * 1000);\n\t\t} catch (JSONException e) {\n\t\t\t_last_success = null;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t_output_type = json.getString(\"output_type\");\n\t\t} catch (JSONException e) {\n\t\t\tthrow new EInvalidData(\"No output_type found\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t_output_params.clear();\n\t\t\t_output_params.parse(json.getJSONObject(\"output_params\"));\n\t\t} catch (JSONException e) {\n\t\t\tthrow new EInvalidData(\"No valid output_params found\");\n\t\t}\n\t}", "@NonNull\n public static Step fromJson(@NonNull final JSONObject jsonObject) throws JSONException {\n int id = jsonObject.getInt(KEY_ID);\n String description = jsonObject.getString(KEY_DESCRIPTION);\n String shortDescription = jsonObject.getString(KEY_SHORT_DESCRIPTION);\n String videoUrl = jsonObject.getString(KEY_VIDEO_URL);\n String thumbnailUrl = jsonObject.getString(KEY_THUMBNAIL_URL);\n return new Step(id, description, shortDescription, videoUrl, thumbnailUrl);\n }", "@Test\n public void fromJson() throws VirgilException, WebAuthnException {\n AuthenticatorMakeCredentialOptions options = AuthenticatorMakeCredentialOptions.fromJSON(MAKE_CREDENTIAL_JSON);\n AttestationObject attObj = authenticator.makeCredential(options);\n }", "private void populateUserObjectFromJsonObject(User userObject,\n JSONObject jsonObject) throws oracle.adfmf.json.JSONException {\n HashMap<String,Object> properties = new HashMap<String,Object>();\n Iterator keys = jsonObject.keys();\n \n while (keys.hasNext()){\n String key = (String) keys.next();\n \n //write content of the default realm into Java properties\n //and all the other properties into a HashMap\n switch (key) {\n case User.USER_ID:\n userObject.setUserId(jsonObject.getString(User.USER_ID));\n break;\n case User.USER_NAME:\n userObject.setUsername(jsonObject.getString(User.USER_NAME));\n break;\n case User.FIRST_NAME:\n userObject.setFirstName(jsonObject.getString(User.FIRST_NAME));\n break;\n case User.LAST_NAME:\n userObject.setLastName(jsonObject.getString(User.LAST_NAME));\n break;\n case User.EMAIL:\n userObject.setEmail(jsonObject.getString(User.EMAIL));\n break; \n default:\n //save property into MAP\n properties.put(key, jsonObject.get(key)); \n }\n }\n \n //update user object with auxillary properties\n userObject.setProperties(properties); \n \n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Properties Map contains: \"+MapUtils.dumpObjectProperties(properties), this.getClass().getSimpleName(), \"getCurrentUserInformation\");\n }", "public JsonObject()\n\t{\n\t\tsuper(ParserUtil.OBJECT_OPEN, ParserUtil.OBJECT_CLOSE);\n\t\tsetup();\n\t}", "public JsonObject(JsonObject o)\n\t{\n\t\tsuper(o);\n\t\tsetup();\n\t\t\n\t\tvalues.putAll(o.values);\n\t}", "public static OrderPayBean newInstance(JSONObject jsonObj) throws JSONException{\n OrderPayBean bean = new OrderPayBean();\n\n bean.wx_mch_id = jsonObj.getString(\"wx_mch_id\");\n bean.wx_preid = jsonObj.getString(\"wx_preid\");\n bean.order_amount = jsonObj.getString(\"order_amount\");//\n bean.wx_key = jsonObj.getString(\"wx_key\");//\n bean.order_state = jsonObj.getString(\"order_state\");//\n bean.wx_appid = jsonObj.getString(\"wx_appid\");//appid\n bean.alipay_str = jsonObj.getString(\"alipay_str\");\n bean.order_sn = jsonObj.getString(\"order_sn\");\n\n return bean;\n }", "private void createObject(JSONObject delivery) {\n\t\t//TODO: create the Object\n\t}", "public static Tweet fromJSON(JSONObject jsonObject) throws JSONException{\n Tweet tweet = new Tweet();\n\n //extract the values from JSON\n tweet.body = jsonObject.getString(\"text\");\n tweet.uid = jsonObject.getLong(\"id\");\n tweet.createdAt = jsonObject.getString(\"created_at\");\n tweet.user = User.fromJSON(jsonObject.getJSONObject(\"user\"));\n tweet.tweetId = Long.parseLong(jsonObject.getString(\"id_str\"));\n //tweet.extendedEntities = ExtendedEntities.fromJSON\n return tweet;\n\n }", "protected <T> Object fromJson(String jsonString, Class<T> classInstance) {\n\n\t\tSystem.out.println(\"jsonString = \" + jsonString);\n\t\treturn gson.fromJson(jsonString, classInstance);\n\n\t}", "@Override\n public void parseJson(JsonObject jsonObject) throws JsonException {\n publicKeyInfo = getStringIfSet(jsonObject,\"publicKeyInfo\");\n nodeAddress = getStringIfSet(jsonObject,\"nodeAddress\");\n nodePort = getIntIfSet(jsonObject,\"nodePort\");\n mainNet = getBooleanIfSet(jsonObject,\"mainNet\");\n }", "public final void fromJson( final JSONObject jsonData )\n\t{\n\t\tthis.data = jsonData;\n\t\tthis.href = this.data.optString( \"href\" );\n\t}", "protected JsonObject(String objStr, int startIndex, boolean delayed) throws JsonParseException\n\t{\n\t\tsuper(objStr, startIndex, delayed, ParserUtil.OBJECT_OPEN, ParserUtil.OBJECT_CLOSE);\n\t}", "public static SnowInformation fromJson(JSONObject jsonObject) {\n\n double threeHoursVolume = 0.0;\n\n try {\n threeHoursVolume = jsonObject.getJSONObject(\"snow\")\n .getDouble(\"3h\");\n } catch (JSONException exception) {\n }\n\n /**\n * Obtain result object.\n */\n\n final SnowInformation resultObject = new SnowInformation.Builder()\n .setThreeHoursVolume(threeHoursVolume)\n .build();\n\n /**\n * Return result.\n */\n\n return resultObject;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic static<T> T createObjectFromJSON(final JSONObject json) throws JSONException {\n\t\tif(json.has(\"type\")) {\n\t\t\treturn (T) Helper.createItemFromJSON(json);\n\t\t} else if(json.has(\"triple_pattern\")) {\n\t\t\treturn (T) Helper.createTriplePatternFromJSON(json);\n\t\t} else if(json.has(\"histogram\")) {\n\t\t\treturn (T) Helper.createVarBucketFromJSON(json);\n\t\t} else {\n\t\t\tSystem.err.println(\"lupos.distributed.operator.format.Helper.createObjectFromJSON(...): Unknown type stored in JSON object, returning null!\");\n\t\t\treturn null;\n\t\t}\n\t}", "protected abstract JSONObject build();", "static TodoItem fromJsonObject(JsonObject json) {\n TodoItem item = new TodoItem();\n item.setId(json.get(\"id\") == null ? -1 : json.getInt(\"id\"));\n item.setDescription(json.get(\"description\") == null ? null : json.getString(\"description\"));\n item.setCreatedAt(json.get(\"createdAt\") == null ? null : OffsetDateTime.parse(json.getString(\"createdAt\")));\n item.setDone(json.get(\"done\") == null ? false : json.getBoolean(\"done\"));\n LOGGER.fine(()->\"fromJsonObject returns:\"+item);\n return item;\n }", "private User parseUser(JSONObject jsonObject) {\n int age = jsonObject.getInt(\"age\");\n String sex = jsonObject.getString(\"sex\").toUpperCase();\n int weight = jsonObject.getInt(\"weight\");\n int height = jsonObject.getInt(\"height\");\n String goalWeight = jsonObject.getString(\"goal weight\");\n String activityLevel = jsonObject.getString(\"activity level\");\n\n User user = new User(age,sex,weight,height,goalWeight);\n user.setActivityLevel(activityLevel);\n\n parseGoal(user, jsonObject);\n parseFoodLog(user, jsonObject);\n\n return user;\n }", "public Object jsonToObject(Class<?> clazz, JSONObject jsonObject) throws ClassNotFoundException, SecurityException,\n\t\t\tIllegalAccessException, InvocationTargetException, InstantiationException, JSONException {\n\n\t\tObject object = clazz.newInstance();\n\n\t\tField[] fields = clazz.getDeclaredFields();\n\n\t\tfor (Field field : fields) {\n\n\t\t\tfield.setAccessible(true);\n\n\t\t\tClass<?> typeClazz = field.getType();\n\n\t\t\tif (typeClazz.isPrimitive()) {\n\t\t\t\t/*\n\t\t\t\t * field.set(object,jsonObject.get(field.getName()));\n\t\t\t\t * \n\t\t\t\t */\n\t\t\t} else {\n\n\t\t\t\tif (String.class.isAssignableFrom(field.getType())) {\n\t\t\t\t\t\n\t\t\t\t\tfield.set(object, jsonObject.get(field.getName()));\n\n\t\t\t\t} else if (field.getType().isArray()\n\t\t\t\t\t\t&& (String.class.isAssignableFrom(field.getType().getComponentType()))) {\n\n\t\t\t\t\tJSONArray jArray = jsonObject.getJSONArray(field.getName());\n\t\t\t\t\tint len = jArray.length();\n\t\t\t\t\tString[] array = new String[len];\n\t\t\t\t\tfor (int i = 0; i < len; i++) {\n\n\t\t\t\t\t\tarray[i] = jArray.getString(i);\n\t\t\t\t\t}\n\t\t\t\t\tfield.set(object, array);\n\n\t\t\t\t} else {\n\n\t\t\t\t\tfield.set(object, jsonToObject(typeClazz, jsonObject.getJSONObject(field.getName())));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn object;\n\t}", "public Metadata(String _JSONString) {\n mJSONObject = new JSONObject();\n mJSONObject = (JSONObject) JSONValue.parse(_JSONString);\n\n // TODO: Maybe raise a 'malformed json string exception'\n if (mJSONObject == null) {\n \tLOGGER.info(\"Invalid JSON String received. new object was created, but its NULL.\");\n }\n }", "@Override\r\n\tpublic void OC_setPropsJSON(JSONObject jo)\r\n\t{\n\t\t\r\n\t}", "public HandlebarsKnotOptions(JsonObject json) {\n init();\n HandlebarsKnotOptionsConverter.fromJson(json, this);\n }", "public static Tweet fromJsonObject(JSONObject jsonObject) {\n\t\tTweet tweet = new Tweet();\n\t\ttry {\n\t\t\ttweet.text = jsonObject.getString(\"text\");\n\t\t\ttweet.uid = jsonObject.getLong(\"id\");\n\t\t\ttweet.timeStamp = jsonObject.getString(\"created_at\");\n\t\t\ttweet.reTweetCount = jsonObject.getInt(\"retweet_count\");\n\t\t\ttweet.user = User.fromJsonObject(jsonObject.getJSONObject(\"user\"));\n\t\t\ttweet.id = jsonObject.getLong(\"id\");\n\t\t} catch(JSONException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\treturn tweet;\n\t}", "public static DayTraining newInstance(String json) {\n try {\n JSONObject root = new JSONObject(json);\n return new DayTraining.Builder()\n .setRunning( root.optInt(\"t1\"), root.optInt(\"t2\"), root.optInt(\"t3\"), root.optInt(\"t2_3\"), root.optInt(\"t1_3\"), root.optInt(\"ta\"), root.optInt(\"tt\"))\n .setBreathing(root.optInt(\"gx\"), root.optInt(\"gp\"),root.optInt(\"gd\"))\n .setTrainingInfo(root.optInt(\"id_athlete\"), root.optString(\"date\"), filterJsonTotalInput(root.optString(\"description\")), root.optInt(\"texniki\"), root.optInt(\"drastiriotita\"), root.optInt(\"time\"), root.optInt(\"number\"), root.optInt(\"id_race\"))\n .build();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }", "private void initialiseFromJson(){\n try {\n\t\t\t// The type adapter is only needed if you have a CharSequence in your model. If you're just using strings\n \t// you can just use Gson gson = new Gson();\n Gson gson = new GsonBuilder().registerTypeAdapter(CharSequence.class, new CharSequenceDeserializer()).create();\n Reader reader = new InputStreamReader(getAssets().open(VARIANTS_FILE));\n BaseVariants baseVariants = gson.fromJson(reader, BaseVariants.class);\n Neanderthal.initialise(this, baseVariants.variants, baseVariants.defaultVariant);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public JSONModel(final String json) throws JSONException {\n jo = new JSONObject(json);\n }", "public void fromJSON(String json) throws JSONException;", "private Tamagotchi tamagotchiToJson(JSONObject jsonObject) {\n String name = jsonObject.getString(\"name\");\n Tamagotchi tr = new Tamagotchi(name);\n return tr;\n }", "public final void fromJson( final String jsonData )\n\t{\n\t\tthis.data = new JSONObject( jsonData );\n\t\tthis.href = this.data.optString( \"href\" );\n\t}", "public JsonFactory() { this(null); }", "public void setJSON(JSONObject json) {this.progressJSON = json;}", "public JSONModel() {\n jo = new JSONObject();\n }", "public static void initialize() {\r\n\t\tjson = new JSONFile(filePath);\t\r\n\t}", "public ClaseJson() {\n }", "public Database(JsonObject data){\n this.obj = data;\n rest = (JsonArray) obj.get(\"restaurants\");\n /* TODO \nset the memebr variable declared above.*/\n }", "protected CategoryModel createFromJSON(JSONObject json, boolean useServer) throws JSONException {\n\t\treturn CategoryModel.fromJSON(json, useServer);\n\t}", "public static Tweet fromJSON(JSONObject jsonObject) throws JSONException {\n Tweet tweet = new Tweet();\n //extract values from JSON\n tweet.body = jsonObject.getString(\"text\");\n tweet.uid = jsonObject.getLong(\"id\");\n tweet.createdAt = jsonObject.getString(\"created_at\");\n tweet.user = User.fromJSON(jsonObject.getJSONObject(\"user\"));\n tweet.retweet_count = jsonObject.getInt(\"retweet_count\");\n tweet.retweeted = jsonObject.getBoolean(\"retweeted\");\n tweet.favorite_count = jsonObject.getInt(\"favorite_count\");\n tweet.favorited = jsonObject.getBoolean(\"favorited\");\n tweet.id = jsonObject.getInt(\"id_str\");\n return tweet;\n\n }", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n }", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n }", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n }", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n }", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n }", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n }", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n }", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n }", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n }", "public static void main(String[] args) {\n String jsonString = \"{\\\"name\\\":\\\"Pourush\\\"}\";\n JsonObject jsonObject = new JsonObject(jsonString);\n jsonObject.put(\"location\",\"Utsav\");\n System.out.println(jsonObject);\n Myitem myitem = new Myitem();\n myitem.name = \"falanadhimkana\";\n myitem.description = \"some description\";\n jsonObject.put(\"Myitem\",jsonObject.mapFrom(myitem));\n System.out.println(jsonObject);\n }", "@Override\n public void parse(String json) {\n JSONObject object = new JSONObject(json);\n id = object.getInt(\"dataset id\");\n name = object.getString(\"dataset name\");\n maxNumOfLabels = object.getInt(\"maximum number of labels per instance\");\n\n JSONArray labelsJSON = object.getJSONArray(\"class labels\");\n labels = new ArrayList<>();\n for (int i = 0; i < labelsJSON.length(); i++) {\n labels.add(new Label(labelsJSON.getJSONObject(i).toString()));\n }\n\n JSONArray instancesJSON = object.getJSONArray(\"instances\");\n instances = new ArrayList<>();\n for (int i = 0; i < instancesJSON.length(); i++) {\n instances.add(new Instance(instancesJSON.getJSONObject(i).toString()));\n }\n }", "public Player(JsonObject jsonPlayer) {\n this.nickname = jsonPlayer.get(\"nickname\").getAsString();\n this.nRedAmmo = jsonPlayer.get(\"nRedAmmo\").getAsInt();\n this.nBlueAmmo = jsonPlayer.get(\"nBlueAmmo\").getAsInt();\n this.nYellowAmmo = jsonPlayer.get(\"nYellowAmmo\").getAsInt();\n this.points = jsonPlayer.get(\"points\").getAsInt();\n\n this.weaponList = new ArrayList<>();\n JsonArray jsonWeaponList = jsonPlayer.get(\"weaponList\").getAsJsonArray();\n for (int i = 0; i < jsonWeaponList.size(); i++) {\n Weapon w = new Weapon(jsonWeaponList.get(i).getAsJsonObject());\n this.weaponList.add(w);\n }\n\n this.powerUpList = new ArrayList<>();\n JsonArray jsonPowerUpList = jsonPlayer.get(\"powerUpList\").getAsJsonArray();\n for (int i = 0; i < jsonPowerUpList.size(); i++) {\n PowerUp p = new PowerUp(jsonPowerUpList.get(i).getAsJsonObject());\n this.powerUpList.add(p);\n }\n\n this.damages = new ArrayList<>();\n JsonArray jsonDamages = jsonPlayer.get(\"damages\").getAsJsonArray();\n for (int i = 0; i < jsonDamages.size(); i++) {\n String s = jsonDamages.get(i).getAsString();\n this.damages.add(s);\n }\n\n this.marks = new ArrayList<>();\n JsonArray jsonMarks = jsonPlayer.get(\"marks\").getAsJsonArray();\n for (int i = 0; i < jsonMarks.size(); i++) {\n String s = jsonMarks.get(i).getAsString();\n this.marks.add(s);\n }\n\n this.nDeaths = jsonPlayer.get(\"nDeaths\").getAsInt();\n this.xPosition = jsonPlayer.get(\"xPosition\").getAsInt();\n this.yPosition = jsonPlayer.get(\"yPosition\").getAsInt();\n this.isDead = jsonPlayer.get(\"isDead\").getAsBoolean();\n this.nMoves = jsonPlayer.get(\"nMoves\").getAsInt();\n this.nMovesBeforeGrabbing = jsonPlayer.get(\"nMovesBeforeGrabbing\").getAsInt();\n this.nMovesBeforeShooting = jsonPlayer.get(\"nMovesBeforeShooting\").getAsInt();\n this.playerStatus = new PlayerStatus(jsonPlayer.get(\"playerStatus\").getAsJsonObject());\n }", "public TestRunJsonParser(){\n }", "@Override\n public AmqpNotifyMessageStructure<JSONObject> apply(JSONObject jsonObject) {\n return AmqpNotifyMessageStructureBuilder.converter(jsonObject);\n }", "public Cause(JSONObject json) {\n\n try {\n this.id = json.getInt(ID_COLUMN);\n this.description = json.getString(DESCRIPTION_COLUMN);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n this.description = Html.fromHtml(this.description, Html.FROM_HTML_MODE_LEGACY).toString();\n } else {\n this.description = Html.fromHtml(this.description).toString();\n }\n this.money = json.getString(MONEY_COLUMN);\n this.votes = json.getString(VOTES_COLUMN);\n\n this.association = new Association(json.getJSONObject(ASSOCIATION_COLUMN));\n this.videos = parseUrlArray(json.getJSONArray(\"videos\"));\n this.documents = parseUrlArray(json.getJSONArray(JSONFields.DOCUMENTS_ARRAY_COLUMN));\n\n initializeYouTubeThumbnailLink();\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n }", "public MovieModel buildMovieModel(JSONObject jsonObject){\n try {\n MovieModel movieModel = new MovieModel();\n movieModel.setId(jsonObject.getString(\"m_id\"));\n movieModel.setName(jsonObject.getString(\"m_name\"));\n movieModel.setImage(context.getString(R.string.master_url) + context.getString(R.string.movie_image_portrait_url) + jsonObject.getString(\"m_id\") + \".jpg\");\n movieModel.setCensorRating(jsonObject.getString(\"censor\"));\n movieModel.setDuration(Integer.parseInt(jsonObject.getString(\"duration\")));\n movieModel.setRelease(jsonObject.getString(\"release\"));\n movieModel.setGenre(jsonObject.getString(\"genre\").replace(\"!~\", \",\"));\n movieModel.setStory(jsonObject.getString(\"story\"));\n movieModel.setTotalWatched(Integer.parseInt(jsonObject.getString(\"total_watched\")));\n movieModel.setTotalRatings(Integer.parseInt(jsonObject.getString(\"total_ratings\")));\n movieModel.setTotalReviews(Integer.parseInt(jsonObject.getString(\"total_reviews\")));\n movieModel.setRating(\"\" + (int)Float.parseFloat(jsonObject.getString(\"rating\")));\n movieModel.setDisplayDimension(jsonObject.getString(\"dimension\"));\n movieModel.setCast(buildCastString(jsonObject));\n movieModel.setWatched(jsonObject.getString(\"is_watched\").equals(\"1\"));\n movieModel.setAddedToWatchlist(jsonObject.getString(\"is_watchlist\").equals(\"1\"));\n movieModel.setRated(jsonObject.getString(\"is_rated\").equals(\"1\"));\n movieModel.setLanguage(jsonObject.getString(\"language\"));\n movieModel.setReviewed(jsonObject.getString(\"is_reviewed\").equals(\"1\"));\n return movieModel;\n }catch(Exception e){\n EmailHelper emailHelper = new EmailHelper(context, EmailHelper.TECH_SUPPORT, \"Error: ModelHelper\", e.getMessage() + \"\\n\" + StringHelper.convertStackTrace(e));\n emailHelper.sendEmail();\n }\n return new MovieModel();\n }", "private User getUserInfo(JSONObject jsonObject) {\n String name = jsonObject.getString(\"User Name\");\n User newUser = new User(name);\n JSONArray jsonArray = jsonObject.getJSONArray(\"Assessments\");\n for (Object json : jsonArray) {\n JSONObject nextAssessment = (JSONObject) json;\n Assessment newReadAssessment = getAssessmentInfo(nextAssessment);\n newUser.addAssessment(newReadAssessment);\n }\n return newUser;\n }", "public static Personagem fromJson(JSONObject json){\n Personagem personagem = new Personagem(\n json.getString(\"nome\"),\n json.getString(\"raca\"),\n json.getString(\"profissao\"),\n json.getInt(\"mana\"),\n json.getInt(\"ataque\"),\n json.getInt(\"ataqueMagico\"),\n json.getInt(\"defesa\"),\n json.getInt(\"defesaMagica\"),\n json.getInt(\"velocidade\"),\n json.getInt(\"destreza\"),\n json.getInt(\"experiencia\"),\n json.getInt(\"nivel\")\n\n );\n return personagem;\n }", "public Response(JSONObject<String, Object> map) {\n objectMap = map;\n }", "public JsonField() {\n }", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n\n if (json.has(\"learningCourseActivities\")) {\n learningCourseActivities = serializer.deserializeObject(json.get(\"learningCourseActivities\"), com.microsoft.graph.requests.LearningCourseActivityCollectionPage.class);\n }\n\n if (json.has(\"learningProviders\")) {\n learningProviders = serializer.deserializeObject(json.get(\"learningProviders\"), com.microsoft.graph.requests.LearningProviderCollectionPage.class);\n }\n }", "public UserModel buildUserModel(JSONObject jsonObject){\n try{\n UserModel userModel = new UserModel();\n userModel.setUserId(jsonObject.getString(\"u_id\"));\n userModel.setImage(context.getString(R.string.master_url) + context.getString(R.string.profile_image_url) + jsonObject.getString(\"u_id\") + \".jpg\");\n userModel.setName(jsonObject.getString(\"name\"));\n userModel.setEmail(jsonObject.getString(\"email\"));\n userModel.setDob(jsonObject.getString(\"dob\"));\n userModel.setCountry(jsonObject.getString(\"country\"));\n userModel.setCity(jsonObject.getString(\"city\"));\n userModel.setPhone(jsonObject.getString(\"phone\"));\n userModel.setTotalWatched(Integer.parseInt(jsonObject.getString(\"mov_watched\")));\n userModel.setTotalReviews(Integer.parseInt(jsonObject.getString(\"mov_reviewed\")));\n userModel.setFollowing(Integer.parseInt(jsonObject.getString(\"u_following\")));\n userModel.setFollowers(Integer.parseInt(jsonObject.getString(\"u_followers\")));\n userModel.setPrivacy(Integer.parseInt(jsonObject.getString(\"u_privacy\")));\n userModel.setIsFollowing(jsonObject.getString(\"is_following\").equals(\"1\"));\n return userModel;\n }catch (Exception e){\n EmailHelper emailHelper = new EmailHelper(context, EmailHelper.TECH_SUPPORT, \"Error: ModelHelper\", e.getMessage() + \"\\n\" + StringHelper.convertStackTrace(e));\n emailHelper.sendEmail();\n }\n return new UserModel();\n }", "public void setFromJsonObject(JsonObject manifestInfo) {\n itemName = manifestInfo.getAsJsonObject(\"displayProperties\").getAsJsonPrimitive(\"name\").toString().replace(\"\\\"\", \"\");\n\n itemType = manifestInfo.getAsJsonPrimitive(\"itemTypeAndTierDisplayName\").toString().replace(\"\\\"\", \"\");\n\n itemBucket = manifestInfo.getAsJsonObject(\"inventory\").getAsJsonPrimitive(\"bucketTypeHash\").toString().replace(\"\\\"\", \"\");\n\n itemElement = getElementName(manifestInfo.getAsJsonPrimitive(\"defaultDamageType\").toString().replace(\"\\\"\", \"\"));\n\n itemImgUrl = manifestInfo.getAsJsonObject(\"displayProperties\").getAsJsonPrimitive(\"icon\").toString().replace(\"\\\"\", \"\");\n\n isExotic = itemType.toLowerCase().contains(\"exotic\");\n }", "Answerable(JSONObject object) throws JSONFormatException {\n JSONSpec.testObject(jsonSpec, object);\n\n JSONObject definition = (JSONObject) object.get(\"definition\");\n this.name = (String) definition.get(\"name\");\n\n JSONArray questions = (JSONArray) definition.get(\"questions\");\n JSONArray completed = (JSONArray) object.get(\"completed\");\n questions.forEach(question -> addQuestionFromJSON((JSONObject) question));\n completed.forEach(responses -> addCompletedFromJSON((JSONArray) responses));\n }", "public JSONLoader() {}", "@Override\n public void init(String jsonString) throws PluginException {\n try {\n config = new JsonSimpleConfig(jsonString);\n reset();\n } catch (IOException e) {\n log.error(\"Error reading config: \", e);\n }\n }", "@Before\n public void init() {\n user = new User();\n user.setId(5);\n user.setUsername(\"username\");\n user.setPassword(\"password\");\n user.setName(\"name\");\n user.setSurname(\"surname\");\n user.setCityId(1);\n user.setEmail(\"[email protected]\");\n user.setPhone(\"phone...\");\n JacksonTester.initFields(this, new ObjectMapper());\n }", "void fromJson(JsonStaxParser parser) throws SyntaxException, IOException;", "private void initValues(){\n\t\tProduct p = GetMockEnitiy.getProduct();\n\t\t\n\t\tString s = JSONhelper.toJSON(p);\n\t\ttvJSON.setText(s);\n\t\t\n\t}", "Person addPerson(JSONObject person);", "public PropFileReader(String filename, String jsonFileName){\n this.ruleJsonFile=jsonFileName;\n this.filename=filename;\n this.propertyBuilder();\n }", "public ParamJson() {\n\t\n\t}", "<T> T parseToObject(Object json, Class<T> classObject);", "private static TemporaryLocationObject temporaryLocationObjectFromJson(JsonObject json) {\n TemporaryLocationObject locationObject = new TemporaryLocationObject();\n try {\n populatePojoFromJson(locationObject, json, LOCATION_MAP_LIST);\n } catch (Exception e) {\n logger.error(\"Unable to create temporary location object from json: {}\", e.getMessage());\n return null;\n }\n return locationObject;\n }", "private Field(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONUser(){\n\t}", "T fromJson(Object source);", "public static Quote createQuotesFromJsonObject(JSONObject _jsonObject) throws JSONException {\n //Parse fields\n\n int quotesQuoteId = _jsonObject.getInt(\"QuoteId\");\n int quotesMinPrice = _jsonObject.getInt(\"MinPrice\");\n boolean quotesDirect = _jsonObject.getBoolean(\"Direct\");\n JourneyLeg quotesOutboundLeg = parseJourneyLeg(_jsonObject.getJSONObject(\"OutboundLeg\"));\n JourneyLeg quotesInboundLeg = null;\n if (_jsonObject.has(\"InboundLeg\")) {\n quotesInboundLeg = parseJourneyLeg(_jsonObject.getJSONObject(\"InboundLeg\"));\n }\n String quotesQuoteDateTime = _jsonObject.getString(\"QuoteDateTime\");\n\n //Construct result\n Quote result = new Quote(quotesQuoteId, quotesMinPrice, quotesDirect, quotesOutboundLeg,\n quotesInboundLeg, quotesQuoteDateTime);\n\n return result;\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "public void mo15090a(JSONObject jSONObject) {\n }", "public void load(JSONObject obj);", "public ReviewModel buildReviewModel(JSONObject jsonObject){\n try{\n ReviewModel reviewModel = new ReviewModel();\n reviewModel.setReviewId(jsonObject.getString(\"r_id\"));\n reviewModel.setReviewText(jsonObject.getString(\"r_text\"));\n reviewModel.setLikes(Integer.parseInt(jsonObject.getString(\"upvotes\")));\n reviewModel.setUserId(jsonObject.getString(\"u_id\"));\n reviewModel.setUserName(jsonObject.getString(\"u_name\"));\n reviewModel.setMovieId(jsonObject.getString(\"m_id\"));\n reviewModel.setMovieName(jsonObject.getString(\"m_name\"));\n reviewModel.setReplies(jsonObject.getString(\"r_reply\"));\n reviewModel.setTime(jsonObject.getString(\"r_time\"));\n reviewModel.setFollowing(jsonObject.getString(\"is_following\").equals(\"1\"));\n reviewModel.setLiked(jsonObject.getString(\"is_liked\").equals(\"1\"));\n reviewModel.setUserPrivacy(Integer.parseInt(jsonObject.getString(\"u_privacy\")));\n return reviewModel;\n }catch (Exception e){\n EmailHelper emailHelper = new EmailHelper(context, EmailHelper.TECH_SUPPORT, \"Error: ModelHelper\", e.getMessage() + \"\\n\" + StringHelper.convertStackTrace(e));\n emailHelper.sendEmail();\n }\n return new ReviewModel();\n }", "public RatingsModel buildRatingsModel(JSONObject jsonObject){\n try{\n RatingsModel ratingsModel = new RatingsModel();\n ratingsModel.setRatingId(jsonObject.getString(\"r_id\"));\n ratingsModel.setUserName(jsonObject.getString(\"u_name\"));\n ratingsModel.setUserId(jsonObject.getString(\"u_id\"));\n ratingsModel.setUserRating(Float.parseFloat(jsonObject.getString(\"u_rating\")));\n ratingsModel.setFollowing(jsonObject.getString(\"is_following\").equals(\"1\"));\n return ratingsModel;\n }catch (Exception e){\n EmailHelper emailHelper = new EmailHelper(context, EmailHelper.TECH_SUPPORT, \"Error: ModelHelper\", e.getMessage() + \"\\n\" + StringHelper.convertStackTrace(e));\n emailHelper.sendEmail();\n }\n return new RatingsModel();\n }", "public static WeatherDataModel weatherFromJson(final JSONObject jsonObject) {\n WeatherDataModel model = new WeatherDataModel();\n try {\n model.mCity = jsonObject.getString(\"name\");\n model.mTime = jsonObject.getString(\"dt\") + \"000\";\n model.mDate = new Date(Long.valueOf(model.mTime));\n model.mWeatherCondition = jsonObject.getJSONArray(\"weather\").getJSONObject(0).getString(\"main\");\n model.mLongitude = jsonObject.getJSONObject(\"coord\").getString(\"lon\");\n model.mLatitude = jsonObject.getJSONObject(\"coord\").getString(\"lat\");\n model.mCurrTemp = extractTemperature(jsonObject, \"temp\");\n model.mMinTemp = extractTemperature(jsonObject, \"temp_min\");\n model.mMaxTemp = extractTemperature(jsonObject, \"temp_max\");\n } catch (JSONException e) {\n e.printStackTrace();\n model = null;\n }\n return model;\n }", "private LabWork convertJsonObjIntoLabWork(JSONObject jsonObject) throws java.text.ParseException {\n LabWork lw = new LabWork();\n // set ID\n Long newID = Long.parseLong(String.valueOf(jsonObject.get(\"id\")));\n System.out.println(newID);\n if(CollectionManager.IDChecker.contains(newID)){\n System.out.println(\"ID is duplicate, please insert valid input!\");\n }\n else {\n CollectionManager.IDChecker.add(newID);\n lw.setId(newID);\n }\n //set Name\n lw.setName((String)jsonObject.get(\"Name\"));\n System.out.println(lw.getName());\n\n // set Coordinates\n JSONObject coordinatesObj = (JSONObject) jsonObject.get(\"coordinates\");\n lw.setCoordinates(new Coordinates(Math.toIntExact(Long.parseLong(String.valueOf(coordinatesObj.get(\"x\")))), Double.parseDouble(String.valueOf(coordinatesObj.get(\"y\")))));\n\n /*\n parse String to LocalDateTime\n */\n\n// // date in String\n// String dateString = (String)jsonObject.get(\"creationDate\");\n//\n// //build formatter\n// DateTimeFormatter formatter = DateTimeFormatter.ISO_DATE_TIME;\n// //Parse String to LocalDateTime\n// LocalDateTime dateTime = LocalDateTime.parse(dateString,formatter);\n// lw.setCreationDate(dateTime);\n// //System.out.println(p.getCreationDate());\n\n // set minimalPoint\n lw.setMinimalPoint(Long.parseLong(String.valueOf(jsonObject.get(\"minpoint\"))));\n\n // set difficulty\n String difficultyString = (String)jsonObject.get(\"difficulty\");\n Difficulty difficultyEnum = Difficulty.valueOf(difficultyString);\n lw.setDifficulty(difficultyEnum);\n\n\n// set weight\n// lw.setWeight(Math.toIntExact(Long.parseLong(String.valueOf(jsonObject.get(\"weight\")))));\n\n// // set nationality\n// String countryString = (String)jsonObject.get(\"nationality\");\n// Country countryEnum = Country.valueOf(countryString);\n// lw.setNationality(countryEnum);\n //set author\n// set location\n JSONObject authorObj = (JSONObject)jsonObject.get(\"author\");\n JSONObject locationObj = (JSONObject)authorObj.get(\"location\");\n //System.out.println(locationObj);\n// lw.setLocation(new Location(\n// Math.toIntExact(Long.parseLong(String.valueOf(locationObj.get(\"x\")))),\n// Long.parseLong(String.valueOf(locationObj.get(\"y\"))),\n// (String)locationObj.get(\"name\")\n// ));\n\n lw.setAuthor(new Person(\n (String)authorObj.get(\"name\"), Double.parseDouble(String.valueOf(authorObj.get(\"weight\"))),Color.valueOf(String.valueOf(authorObj.get(\"eye color\"))),HairColor.valueOf(String.valueOf(authorObj.get(\"hair color\"))),Country.valueOf(String.valueOf(authorObj.get(\"nationality\"))), new Location(\n Integer.parseInt((String.valueOf(locationObj.get(\"x\")))),\n Long.parseLong(String.valueOf(locationObj.get(\"y\"))),\n (String)locationObj.get(\"name\")\n )\n ));\n\n\n\n return lw;\n }", "public MinecraftJson() {\n }", "public TextListItem(JSONObject json) {\n item = json;\n }" ]
[ "0.68364424", "0.63087314", "0.62833107", "0.6259894", "0.61849254", "0.60626423", "0.60599077", "0.6056844", "0.6025049", "0.60176563", "0.6006413", "0.5864783", "0.5853781", "0.5835874", "0.5834752", "0.58296645", "0.5811854", "0.57961684", "0.5778897", "0.5777196", "0.57070845", "0.5672853", "0.56473875", "0.564248", "0.5621664", "0.5615513", "0.5578377", "0.55724806", "0.55720973", "0.55588573", "0.55369365", "0.5536374", "0.55293524", "0.5514027", "0.54989445", "0.54784715", "0.54431087", "0.5436068", "0.54279417", "0.5411305", "0.54078406", "0.54031", "0.54017484", "0.5365944", "0.53609264", "0.53456336", "0.53449726", "0.5334379", "0.53178555", "0.529901", "0.52967936", "0.52942747", "0.529164", "0.52900577", "0.5272262", "0.5272262", "0.5272262", "0.5272262", "0.5272262", "0.5272262", "0.5272262", "0.5272262", "0.5272262", "0.5263799", "0.52531", "0.52500707", "0.52294356", "0.5218921", "0.52032197", "0.5201399", "0.5196503", "0.5180702", "0.5167385", "0.51626986", "0.51477486", "0.51275975", "0.5127577", "0.51256895", "0.51178694", "0.5090569", "0.50890434", "0.5079685", "0.50770336", "0.50756836", "0.5073758", "0.5071793", "0.50687164", "0.50630724", "0.50579417", "0.5057242", "0.50442547", "0.50355375", "0.50244564", "0.5024292", "0.5018484", "0.5018269", "0.5018003", "0.5011964", "0.50059634", "0.4998581", "0.49908295" ]
0.0
-1
Returns all the available property values in the form of JSONObject instance where the key is the approperiate json key and the value is the value of the corresponding field
public JSONObject toJsonObject() { JSONObject jsonObject = new JSONObject(); try { jsonObject.put("status", status); if(catrgories != null && catrgories.length > 0){ JSONArray catrgoriesJsonArray = new JSONArray(); for(ModelCatrgory catrgoriesElement : catrgories){ catrgoriesJsonArray.put(catrgoriesElement.toJsonObject()); } jsonObject.put("catrgories", catrgoriesJsonArray); } } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } return jsonObject; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Dictionary<String, Object> getProperties();", "public Map<String, Object> allFields() {\n Map<String, Object> map = new HashMap<>();\n properties.forEach((key, value) -> map.put(key, value.value()));\n return map;\n }", "@Override\n\t\tpublic Map<String, Object> getAllProperties() {\n\t\t\treturn null;\n\t\t}", "public interface JsonProperties {\n\n String ACCESS_LEVEL = \"accessLevel\";\n String ADDRESS = \"address\";\n String ASSET_ID = \"assetId\";\n String CONTENT = \"content\";\n String CREATED_BY = \"createdBy\";\n String DATA = \"data\";\n String DATA_HASH = \"dataHash\";\n String EVENT_ID = \"eventId\";\n String ID_DATA = \"idData\";\n String META_DATA = \"metadata\";\n String PERMISSIONS = \"permissions\";\n String REGISTERED_BY = \"registeredBy\";\n String REGISTERED_ON = \"registeredOn\";\n String SEQUENCE_NUMBER = \"sequenceNumber\";\n String SIGNATURE = \"signature\";\n String TIMESTAMP = \"timestamp\";\n}", "public Map<String, String> getAllProperties()\n {\n return _propertyEntries;\n }", "Map<String, Object> properties();", "Map<String, String> getProperties();", "Map<String, String> getProperties();", "Property[] getProperties();", "@Override\r\n\tpublic JSONObject OC_getPropsJSON()\r\n\t{\n\t\treturn null;\r\n\t}", "public abstract List<PropertyType> getBuiltInProperties();", "Map<String, String> properties();", "Map<String, String> properties();", "public Iterator<String> getUserDefinedProperties();", "StringMap getProperties();", "@Override\r\n\tpublic String[] updateJsonProperties() {\n\t\treturn null;\r\n\t}", "public Map getProperties();", "public List<NamedThing> getProperties() {\n // TODO this should be changed to AnyProperty type but it as impact everywhere\n List<NamedThing> properties = new ArrayList<>();\n List<Field> propertyFields = getAnyPropertyFields();\n for (Field f : propertyFields) {\n try {\n if (NamedThing.class.isAssignableFrom(f.getType())) {\n f.setAccessible(true);\n Object fValue = f.get(this);\n if (fValue != null) {\n NamedThing se = (NamedThing) fValue;\n properties.add(se);\n } // else not initalized but this is already handled in the initProperties that must be called\n // before the getProperties\n }\n } catch (IllegalAccessException e) {\n throw new TalendRuntimeException(CommonErrorCodes.UNEXPECTED_EXCEPTION, e);\n }\n }\n return properties;\n }", "default Map<String, Object> getProperties()\r\n {\r\n return emptyMap();\r\n }", "protected Map<String, String> parseSimpleJavaScriptObjectProperties(String data) {\n\t\tMap<String, String> result = new LinkedHashMap<String, String>(10);\n\t\t\n\t\tMatcher m = SIMPLE_JSON_PATTERN.matcher(data);\n\t\twhile ( m.find() ) {\n\t\t\tString attrName = m.group(1);\n\t\t\tString attrValue = m.group(2);\n\t\t\tresult.put(attrName, attrValue);\n\t\t}\n\t\t\n\t\tlog.trace(\"Parsed {} attributes from data [{}]: {}\",\n\t\t\t\tnew Object[] {result.size(), data, result});\n\t\t\n\t\treturn result;\n\t}", "public LinkedHashMap<String, LinkedHashSet<String>> getRequestedProperties()\n\t{\n\t\treturn requestedProperties;\n\t}", "@JsonAnyGetter\n public Map<String, Object> getAdditionalProperties() {\n return this.additionalProperties;\n }", "@JsonAnyGetter\n public Map<String, Object> getAdditionalProperties() {\n return this.additionalProperties;\n }", "@JsonAnyGetter\n public Map<String, Object> getAdditionalProperties() {\n return this.additionalProperties;\n }", "public final List<String> getPropertiesList()\n {\n\n List<String> allProps = new ArrayList<String>();\n Enumeration<?> e = this.fProp.propertyNames();\n\n while (e.hasMoreElements())\n {\n String key = (String) e.nextElement();\n String value = this.fProp.getProperty(key);\n allProps.add(key + \"=\" + value);\n } // end while\n\n Collections.sort(allProps);\n return allProps;\n\n }", "PropertyObject toJSONObject(PropertyArray names) throws PropertyException {\n if (names == null || names.isEmpty() || this.isEmpty()) {\n return null;\n }\n PropertyObject jo = new PropertyObject();\n for (int i = 0; i < names.length(); i += 1) {\n jo.put(names.getString(i), this.opt(i));\n }\n return jo;\n }", "List<Property<?>> getProperties(ProjectEntity entity);", "public Note[] getProperties(Object key);", "@JsonAnyGetter\n\tpublic Map<String, Object> getAdditionalProperties() {\n\t\treturn this.additionalProperties;\n\t}", "public JSONArray getJSONArray() {\n JSONArray result = new JSONArray();\n try {\n result.put(setting.ZERO.getJsonId(), setting.ZERO.getValueAsInt());\n // Strings\n result.put(setting.BLANK.getJsonId(), setting.BLANK.getValueAsString());\n result.put(setting.CHARACTERISTIC_DICE_TEST_NAME.getJsonId(), setting.CHARACTERISTIC_DICE_TEST_NAME.getValueAsString());\n\n // Numbers\n // characteristic numbers\n result.put(setting.CHARACTERISTIC_AMOUNT.getJsonId(), setting.CHARACTERISTIC_AMOUNT.getValueAsInt());\n result.put(setting.CHARACTERISTIC_MORE_AMOUNT.getJsonId(), setting.CHARACTERISTIC_MORE_AMOUNT.getValueAsInt());\n result.put(setting.CHARACTERISTIC_DICE_TEST_AMOUNT.getJsonId(), setting.CHARACTERISTIC_DICE_TEST_AMOUNT.getValueAsInt());\n\n // Option menu numbers\n result.put(setting.OPTION_MENU_ITEM_ID_SETTINGS.getJsonId(), setting.OPTION_MENU_ITEM_ID_SETTINGS.getValueAsInt());\n result.put(setting.OPTION_MENU_ITEM_ID_EDIT.getJsonId(), setting.OPTION_MENU_ITEM_ID_EDIT.getValueAsInt());\n result.put(setting.OPTION_MENU_ITEM_ORDER_IN_CATEGORY.getJsonId(), setting.OPTION_MENU_ITEM_ORDER_IN_CATEGORY.getValueAsInt());\n\n // JSON Strings\n result.put(setting.JSON_NAME.getJsonId(), setting.JSON_NAME.getValueAsString());\n result.put(setting.JSON_VALUE.getJsonId(), setting.JSON_VALUE.getValueAsString());\n\n //JSON Position Numbers\n result.put(setting.JSON_POS_CHARACTERISTICS.getJsonId(), setting.JSON_POS_CHARACTERISTICS.getValueAsInt());\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n return result;\n }", "public Hashtable getProperties() {\n PropertyHelper ph = PropertyHelper.getPropertyHelper(this);\n return ph.getProperties();\n }", "java.lang.String getProperties();", "private static Map<String, String> createPropertiesAttrib() {\r\n Map<String, String> map = new HashMap<String, String>();\r\n map.put(\"Property1\", \"Value1SA\");\r\n map.put(\"Property3\", \"Value3SA\");\r\n return map;\r\n }", "public abstract Properties getProperties();", "public static Map<String, Object> getAllKnownProperties(Environment env) {\n\t Map<String, Object> rtn = new HashMap<>();\n\t if (env instanceof ConfigurableEnvironment) {\n\t for (PropertySource<?> propertySource : ((ConfigurableEnvironment) env).getPropertySources()) {\n\t if (propertySource instanceof EnumerablePropertySource) {\n\t for (String key : ((EnumerablePropertySource) propertySource).getPropertyNames()) {\n\t rtn.put(key, propertySource.getProperty(key));\n\t }\n\t }\n\t }\n\t }\n\t return rtn;\n\t}", "@JsonAnyGetter\n public Map<String, Object> additionalProperties() {\n return this.additionalProperties;\n }", "@JsonAnyGetter\n public Map<String, Object> additionalProperties() {\n return this.additionalProperties;\n }", "@JsonAnyGetter\n public Map<String, Object> additionalProperties() {\n return this.additionalProperties;\n }", "@JsonAnyGetter\n public Map<String, Object> additionalProperties() {\n return this.additionalProperties;\n }", "@JsonAnyGetter\n public Map<String, Object> additionalProperties() {\n return this.additionalProperties;\n }", "ArrayList<PropertyMetadata> getProperties();", "public ArrayList<String> getUnRequestedProperties()\n\t{\n\t\tArrayList<String> urp = new ArrayList<String>();\n\t\tfor (Object property : super.keySet())\n\t\t\tif (!requestedProperties.containsKey(((String)property).trim()))\n\t\t\t\turp.add(((String)property).trim());\n\t\tCollections.sort(urp);\n\t\treturn urp;\n\t}", "Map<String, Map<String, String>> getAllDefinedTemplateProperties();", "Map<String, Object> getPropertiesAsMap();", "CommonProperties getProperties();", "String[] getPropertyKeys();", "public abstract AbstractProperties getProperties();", "public Hashtable getUserProperties() {\n PropertyHelper ph = PropertyHelper.getPropertyHelper(this);\n return ph.getUserProperties();\n }", "public List<PmPropertyBean> getProperties(Map paramter);", "public Map<String, String> getProperties() {\n\t\tif (propertiesReader == null) {\n\t\t\tpropertiesReader = new PropertyFileReader();\n\t\t}\n\t\tpropertyMap = propertiesReader.getPropertyMap();\n\t\tlog.info(\"fetched all properties\");\n\t\treturn propertyMap;\n\t}", "public Properties getProperties();", "private static HashMap<String, DefinedProperty> initDefinedProperties() {\n\t\tHashMap<String, DefinedProperty> newList = new HashMap<String, DefinedProperty>();\n\t\t// common properties\n\t\taddProperty(newList, \"name\", DefinedPropertyType.STRING, \"\", DefinedProperty.ANY, false, false);\n\t\taddProperty(newList, \"desc\", DefinedPropertyType.STRING, \"\", DefinedProperty.ANY, false, false);\n\t\t// implicit default properties\n\t\taddProperty(newList, \"donttest\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.ANY, false, false);\n\t\taddProperty(newList, \"dontcompare\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.ANY, false, false);\n\t\t// interface properties\n\t\taddProperty(newList, \"use_interface\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG |DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"use_new_interface\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REGSET | DefinedProperty.REG |DefinedProperty.FIELD, false, false);\n\t\t// reg + regset properties\n\t\taddProperty(newList, \"js_superset_check\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"external\", DefinedPropertyType.SPECIAL, null, DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"repcount\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.REGSET | DefinedProperty.REG, true, false); // hidden\n\t\t// regset only properties\n\t\taddProperty(newList, \"js_macro_name\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_macro_mode\", DefinedPropertyType.STRING, \"STANDARD\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_namespace\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_typedef_name\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_instance_name\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_instance_repeat\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.REGSET, false, false);\n\t\t// reg only properties\n\t\taddProperty(newList, \"category\", DefinedPropertyType.STRING, \"\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"js_attributes\", DefinedPropertyType.STRING, \"false\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"aliasedId\", DefinedPropertyType.STRING, \"false\", DefinedProperty.REG, true, false); // hidden\n\t\taddProperty(newList, \"regwidth\", DefinedPropertyType.NUMBER, \"32\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"uvmreg_is_mem\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"cppmod_prune\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"uvmreg_prune\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REG, false, false);\n\t\t// signal properties\n\t\taddProperty(newList, \"cpuif_reset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"field_reset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"activehigh\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"activelow\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"signalwidth\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.SIGNAL, false, false);\n\t\t// fieldset only properties\n\t\taddProperty(newList, \"fieldstructwidth\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.FIELDSET, false, false);\n\t\t// field properties\n\t\taddProperty(newList, \"rset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"rclr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"woclr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"woset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"we\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"wel\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swwe\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swwel\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"hwset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"hwclr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swmod\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swacc\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"sticky\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"stickybit\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"intr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"anded\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"ored\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"xored\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"counter\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"overflow\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"reset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"fieldwidth\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"singlepulse\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"underflow\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrwidth\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrwidth\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrvalue\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrvalue\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"saturate\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrsaturate\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrsaturate\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"threshold\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrthreshold\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrthreshold\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"sw\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"hw\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"precedence\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"encode\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"resetsignal\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"mask\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"enable\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"haltmask\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"haltenable\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"halt\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"next\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"nextposedge\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"nextnegedge\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"maskintrbits\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false); \n\t\taddProperty(newList, \"satoutput\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"sub_category\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"rtl_coverage\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\t\n\t\t// override allowed property set if input type is jspec\n\t\tif (Ordt.hasInputType(Ordt.InputType.JSPEC)) {\n\t\t\tputProperty(newList, \"sub_category\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG | DefinedProperty.FIELDSET | DefinedProperty.FIELD, false, false);\n\t\t\tputProperty(newList, \"category\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"js_attributes\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"regwidth\", DefinedPropertyType.NUMBER, \"32\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"address\", DefinedPropertyType.NUMBER, null, DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"arrayidx1\", DefinedPropertyType.NUMBER, null, DefinedProperty.REGSET | DefinedProperty.REG, true, false); // hidden\n\t\t\tputProperty(newList, \"addrinc\", DefinedPropertyType.NUMBER, null, DefinedProperty.REGSET | DefinedProperty.REG, true, false); // hidden\n\t\t}\t\t\n\n\t\treturn newList;\n\t}", "Map<String, Object> getValues(boolean deep);", "public Map<String, List<String>> getRequestProperties() {\n/* 337 */ return this.delegate.getRequestProperties();\n/* */ }", "PropertyValue<?, ?>[] values();", "public Collection<ModuleProperty> getProperties();", "protected java.util.Map getProperties() {\n return properties;\n }", "public ArrayList<Property> getPropertyList()\r\n {\r\n return m_values;\r\n }", "@JsonProperty(\"properties\")\n public PropertyBag getProperties() {\n return properties;\n }", "@Override\n\tpublic Map<String, Object> getProperties() {\n\t\treturn null;\n\t}", "protected List getProperties() {\n return null;\n }", "@JsonAnyGetter\n public Map<String, Object[]> otherFields() {\n return disciplineFields;\n }", "public Properties getProperties()\n {\n Properties properties = null;\n List<Props.Entry> props = this.props.getEntry();\n if ( props.size() > 0 )\n {\n properties = new Properties();\n //int size = props.size();\n for ( Props.Entry entry : props )\n {\n String key = entry.getKey();\n String val = entry.getValue();\n properties.setProperty( key, val );\n }\n }\n return properties;\n }", "public Object getJsonObject() {\n return JSONArray.toJSON(values);\n }", "@Override\r\n public List<Map<String, PrimitiveTypeProvider>> getAll() {\r\n ListenableFuture<PropertiesMessage> future = this.adampro.getProperties(\r\n EntityPropertiesMessage.newBuilder().setEntity(fromBuilder.getEntity()).build());\r\n int count = 1_000;\r\n PropertiesMessage propertiesMessage;\r\n try {\r\n propertiesMessage = future.get();\r\n } catch (InterruptedException | ExecutionException e) {\r\n LOGGER.error(\"error in getAll: {}\", LogHelper.getStackTrace(e));\r\n return new ArrayList<>(0);\r\n }\r\n try {\r\n count = Integer.parseInt(propertiesMessage.getPropertiesMap().get(\"count\"));\r\n } catch (Exception e) {\r\n LOGGER.error(\"error in getAll: {}\", LogHelper.getStackTrace(e));\r\n }\r\n return preview(count);\r\n }", "static public Vector getPropertyValues (Properties props, String propName)\n{\n String propertyDelimiterName = \"property.token.delimiter\";\n String delimiter = props.getProperty (propertyDelimiterName, \"::\");\n\n String listStartTokenName = \"list.startToken\";\n String listStartToken = props.getProperty (listStartTokenName, \"(\");\n\n String listEndTokenName = \"list.endToken\";\n String listEndToken = props.getProperty (listEndTokenName, \")\");\n\n Vector result = new Vector ();\n String propString = props.getProperty (propName);\n if (propString == null)\n return result;\n String propStringTrimmed = propString.trim ();\n String [] tokens = Misc.parseList (propStringTrimmed, listStartToken, listEndToken, delimiter);\n\n for (int i=0; i < tokens.length; i++)\n result.add (tokens [i]);\n\n return result;\n\n}", "public Map<String, Property> getProperties()\n {\n return properties;\n }", "protected Map<String, Object> getAdditionalProperties()\n {\n return additionalProperties;\n }", "public Map<String, Object> getProperties() {\n return mProperties;\n }", "public Map<String,String> getAllCustomFields(final SessionContext ctx)\n\t{\n\t\tMap<String,String> map = (Map<String,String>)getProperty( ctx, CUSTOMFIELDS);\n\t\treturn map != null ? map : Collections.EMPTY_MAP;\n\t}", "public Map<String, String> properties() {\n return this.properties;\n }", "public Map<String, Object> getProperties() {\n return properties;\n }", "public List<PropertyValidValue> getPropertyValidValues()\r\n\t{\r\n\t\treturn propertyValidValues;\r\n\t}", "Properties getProperties();", "List<Map<String, Object>> getTableValuesWithHeaders();", "public Properties getProperties() { return props; }", "@NonNull\n public Map<String, byte[]> getAdditionalProperties() {\n Map<String, byte[]> additionalProps = new HashMap<>();\n\n for (KeyValuePair pair : mProto.additionalProps) {\n byte[] value = pair.value != null ? pair.value.toByteArray() : null;\n additionalProps.put(pair.name, value);\n }\n\n return additionalProps;\n }", "EProperties getProperties();", "public Map<String, String> getProperties() {\n return properties;\n }", "public Map<String, Object> getProperties()\n {\n return m_props;\n }", "public Map<String, String> getProperties() {\n\t\treturn this.properties;\n\t}", "public Map<String, Object> getProperties() {\n return properties;\n }", "public Map<String, Object> getProperties() {\n return properties;\n }", "@Override\n\tpublic JSONObject getAll() {\n\t\treturn null;\n\t}", "public Iterable<String> getPropertyKeys();", "private StringBuilder getJSONHelper()\n\t{\n\t\tStringBuilder json = new StringBuilder();\n\t\tint n = 0;\n\t\tfor(String key : values.keySet())\n\t\t\tappendValue(json, key, n++);\n\t\treturn json;\n\t}", "public HashMap<String, String> getProperties() {\n return (HashMap<String, String>) properties.clone();\n }", "@Override\n public Map<String, String> getProperties() {\n return null;\n }", "public JSONObject toJSON()\n {\n JSONObject jsonField = new JSONObject();\n\n jsonField.put(\"name\", name);\n jsonField.put(\"type\", type);\n jsonField.put(\"visibility\", vis.name());\n\n return jsonField;\n }", "public Map<String, String> getProperties() {\n return properties;\n }", "public Map<String, String> getProperties() {\n return properties;\n }", "public HasDisplayableProperties getProperties();", "@JsonAnyGetter\n public Map<String, String> otherFields() {\n return unknownFields;\n }", "public Set<ConfigProperty> values() {\n return new HashSet<>(_properties.values());\n }", "java.util.List<org.apache.calcite.avatica.proto.Responses.DatabasePropertyElement> \n getPropsList();", "public JSONObject getJSONObject() {\n\t\tJSONObject jsonOrder = new JSONObject();\n\t\t\n\t\tjsonOrder.put(\"meal\", mealId);\n\t\tjsonOrder.put(\"booking\", bookingId);\n\t\t\n\t\treturn jsonOrder;\n\t}", "@Override\n\tpublic Map<String, Object> getProperties(ProgramWorkflow object) {\n\t\treturn Collections.emptyMap();\n\t}", "public java.util.Map<String,String> getProperties() {\n \n if (properties == null) {\n properties = new java.util.HashMap<String,String>();\n }\n return properties;\n }", "public static Properties getProperties() {\r\n return getProperties(false);\r\n }", "protected static Properties getProperties(boolean dflt) {\r\n Properties prop = new Properties();\r\n for (ConfigurationOption<?> option : OPTIONS.values()) {\r\n option.toProperties(prop, dflt);\r\n }\r\n return prop;\r\n }", "public JsonObject getPlotOptions() {\r\n JsonObject plotOptionsObject = Json.createObject(); // create a new object each time\r\n for (ShowOption showOption : ShowOption.values()) {\r\n plotOptionsObject.put(showOption.getShortName(), showOptions.get(showOption));\r\n }\r\n for (String optionKey : booleanOptions.keySet()) {\r\n Option <Boolean> option = booleanOptions.get(optionKey);\r\n plotOptionsObject.put(option.getName(), option.getValue());\r\n }\r\n for (String optionKey : stringOptions.keySet()) {\r\n Option <String> option = stringOptions.get(optionKey);\r\n plotOptionsObject.put(option.getName(), option.getValue());\r\n }\r\n return plotOptionsObject;\r\n }" ]
[ "0.6090883", "0.59363854", "0.5851887", "0.58097017", "0.5787373", "0.5763063", "0.56547153", "0.56547153", "0.5654481", "0.562318", "0.55998814", "0.55842966", "0.55842966", "0.556124", "0.55373347", "0.55251217", "0.55217075", "0.54960173", "0.54941493", "0.54431194", "0.5441904", "0.54118896", "0.54118896", "0.54118896", "0.5386254", "0.5370783", "0.5330619", "0.5327119", "0.53198993", "0.5314156", "0.5311649", "0.5304848", "0.52924097", "0.5291142", "0.5259442", "0.5259423", "0.5259423", "0.5259423", "0.5259423", "0.5259423", "0.5254414", "0.52438796", "0.52353793", "0.5234731", "0.5231104", "0.522378", "0.5217483", "0.52016705", "0.5198374", "0.5197732", "0.51743287", "0.5160765", "0.5146628", "0.51385635", "0.51271385", "0.5126433", "0.5125985", "0.5123328", "0.5119856", "0.507563", "0.50693905", "0.506633", "0.50610507", "0.50541", "0.5043482", "0.5040706", "0.5029204", "0.50287944", "0.5028731", "0.50251305", "0.50245285", "0.50214034", "0.5007303", "0.5004041", "0.49991032", "0.49968153", "0.49948496", "0.49945512", "0.49942836", "0.4990543", "0.4984398", "0.49838355", "0.49838355", "0.49836197", "0.49777249", "0.49727455", "0.49587274", "0.4953732", "0.4952527", "0.4951328", "0.4951328", "0.49445793", "0.49438733", "0.49383053", "0.49371034", "0.49356952", "0.49337497", "0.4932754", "0.49312174", "0.49296588", "0.49266595" ]
0.0
-1
This is the entry point to the program
public static void main(String[] args) { //declaring and assigning variables and objects NumberFormat formatter = NumberFormat.getPercentInstance(); formatter.setMaximumFractionDigits(3); int numTotal; int numGreater = 0; boolean inputValid = false; Scanner sc = new Scanner(System.in); int[] numMax = new int[4]; int arrayIndex = 0; int numChanger = 0; int counter = 1; //this loop ends when the user enters valid input while (inputValid == false) { inputValid = true; System.out.println("This program prints out a percentage which represents the amount of "); System.out.println("numbers between 0000 and 9999 which are greater than the number you enter"); System.out.println("Input a integer"); //this try catch catches bad input such as symbols try { numGreater = Integer.parseInt(sc.nextLine()); } catch (Exception e) { System.out.println("Incorrect input, please try again"); inputValid = false; } } //there are no numbers between 0000 and 9999 which have their sum over 36, allowing this to pass will be problematic for the formulas used later on if (numGreater>36) { System.out.println("0% of numbers between 0 and 9999 (inclusive) have their sum of digits larger or equal to " +numGreater); System.exit(0); } //assigning the value of numGreater into numChanger so the value can be used and the original value is retained numChanger = numGreater; //for loop uses formula to make the program more efficient in its looping later on for (int subtraction = 9; subtraction>=0; ){ if (numChanger == 0) { break; } if (numChanger-subtraction>=0) { numChanger-= subtraction; numMax[arrayIndex] = subtraction; arrayIndex++; } else { subtraction--; } } //for loop goes from 9999 to the specified number found in numMax (was generated before) and adds a number to the counter whenever the sum of the number's digits is over or equal to the number the user specified for (int num1 = 9; num1 >=0; num1--) { for (int num2 = 9; num2 >=0; num2--) { for (int num3 = 9; num3 >=0; num3--) { for (int num4 = 9; num4 >=0; num4--) { //loop breaks when it reaches specified number found in numMax (for efficiency) if (num1 == numMax[3] && num2 == numMax[2] && num3 == numMax[1]&& num4 == numMax[0]) { break; } numTotal = num1+num2+num3+num4; if (numTotal>=numGreater) { counter = counter+1; } } } } } //prints out the results using formatter to put the answer into a percent System.out.println(formatter.format(counter/10000.0)+ " of numbers between 0 and 9999 (inclusive) have their sum of digits larger or equal to " + numGreater); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main() {\n \n }", "public static void main()\n\t{\n\t}", "public static void main(){\n\t}", "public static void main (String []args){\n }", "public static void main(String[]args) {\n\t\n\t\t\n\n}", "public static void main(String []args){\n\n }", "public static void main() {\n }", "public static void main(String[] args) {\n \n \n \n \n }", "public static void main(String[] args) {\n \n \n \n\t}", "public static void main(String []args){\n }", "public static void main(String []args){\n }", "public static void main(String[] args) {\r\n// Use for unit testing\r\n }", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "public static void main(String[] args) {\n \n\n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args) {\n \n \n }", "public Main() {\n \n \n }", "public static void main(String[] args) {\n\t \t\n\t \t\n\t }", "public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public static void main(String[] args) {\r\n \r\n }", "public static void main(String[] args) {\r\n \r\n }", "public static void main(String[] args) {\n \r\n\t}", "public static void main(String[] args){\n\t\t\n\t\t\n \t}", "public static void main (String args[]) {\n\t\t\n }", "public static void main(String[] args) {\n \n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main (String[]args) throws IOException {\n }", "public static void main (String[] args) {\r\n\t\t \r\n\t\t}", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {}", "public static void main(String[] args) {}", "public static void main (String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n \n }", "public static void main(String[] args)\r\t{", "public static void main(String[] args) {\t\n\t\t\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main (String [] args){\n\t}", "public static void main(String[] args) {\n \n\t}", "public static void main(String[] args){\n \t\n }", "public static void main(String args[]){\n\t\t\n\t\n\t}", "public static void main(String[] args) {\n // TODO code application logic here\n // some testing? or actually we can't run it standalone??\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t}", "static void main(String[] args)\n {\n }", "public static void main(String[] args) {\n\t \t\n\t \t\n\t}", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "public static void main(String[] args) {\n \n\t\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args)\r\n {\n \r\n \r\n }", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[]args) {\n\t}", "public static void main(String[] args){\n\t\t\r\n\t}" ]
[ "0.81743574", "0.7951927", "0.7895532", "0.78206336", "0.77948105", "0.77741426", "0.77713114", "0.77414465", "0.7722977", "0.77024966", "0.77024966", "0.76830393", "0.7670592", "0.7659234", "0.7638463", "0.7638463", "0.7638463", "0.7638463", "0.7638463", "0.7638463", "0.7634567", "0.7634567", "0.76268965", "0.76153564", "0.7613761", "0.7602056", "0.7602056", "0.7584684", "0.75822914", "0.75471365", "0.7544641", "0.75288165", "0.75288165", "0.7522411", "0.75161314", "0.7507697", "0.74934417", "0.74934417", "0.74927443", "0.7488584", "0.74848425", "0.7473983", "0.7469715", "0.74679995", "0.7467453", "0.74616915", "0.74607253", "0.74605227", "0.7453477", "0.7453477", "0.7453477", "0.7453477", "0.74516654", "0.74504507", "0.74470526", "0.7444572", "0.7441698", "0.74403965", "0.74403965", "0.74403965", "0.74403965", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.7421796", "0.74216884", "0.74203086", "0.74203086", "0.74203086", "0.74203086", "0.74203086", "0.74203086", "0.74203086", "0.74203086", "0.74203086", "0.742022", "0.74200076" ]
0.0
-1
String str = "palsj"; String str = "xyz"; String str = "pals";
public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("\n\nEnter the string to find all possible arrangements (Eg : 'xyz', 'pals', 'palsj' )\n\n"); String str = scan.nextLine(); scan.close(); char[] chArr = str.toCharArray(); char[] temp1 = new char[chArr.length]; temp1 = chArr; int len = chArr.length; for (int cnt = 0; cnt < len; cnt++) { System.out.println("letter : " + temp1[0]); for (int i = 1; i < len; i++) { temp1 = printString(temp1); // to print the first swap } temp1 = moveString1(temp1, 0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String mo3176a(String str, String str2);", "void mo1329d(String str, String str2);", "void mo131986a(String str, String str2);", "void mo13161c(String str, String str2);", "void mo1342w(String str, String str2);", "void mo1886a(String str, String str2);", "int mo23353w(String str, String str2);", "public static void main(String[] args) {\n\t\tString s1 =\"Yashodhar\";//String by java string literal\r\n\t\tchar ch[] ={'y','a','s','h','o','d','h','a','r','.','s'};\r\n\t\tString s3 = new String(ch);//Creating java to string\r\n\t\tString s2= new String(\"Yash\");//creating java string by new keyword \r\n\t\tSystem.out.println(s1);\r\n\t\tSystem.out.println(s2);\r\n\t\tSystem.out.println(s3);\r\n\t\t\r\n\t\t//Immutable String in Java(Can not changed)\r\n\t\tString s4= \"YASHODSHR\";\r\n\t\ts4 =s4.concat( \"Suvarna\");\r\n\t\tSystem.out.println(\"Immutable Strin=== \"+s4);\r\n\t\t\r\n\t\t//Compare two Strings using equals\r\n\t\tString s5= \"Yash\";\t\t\r\n\t\tString s6= \"YASH\";\r\n\t\tSystem.out.println(\"Campare equal \"+s5.equals(s6));\r\n\t\tSystem.out.println(s5.equalsIgnoreCase(s6));\r\n\t\t\r\n\t\t\t\r\n\t\t String s7=\"Sachin\"; \r\n\t\t String s8=\"Sachin\"; \r\n\t\t String s9=new String(\"Sachin\"); \r\n\t\t System.out.println(s7==s8); \r\n\t\t System.out.println(s7==s9);\r\n\t\t \r\n\t\t String s10 = \"YAsh\";\r\n\t\t String s11 = \"Yash\";\r\n\t\t String s12 = new String(\"yash\");\r\n\t\t System.out.println(s10.compareTo(s11));\r\n\t\t System.out.println(s11.compareTo(s12));\r\n\t\t \r\n\t\t //SubStrings\t\t \r\n\t\t String s13=\"SachinTendulkar\"; \r\n\t\t System.out.println(s13.substring(6));\r\n\t\t System.out.println(s13.substring(0,3));\r\n\t\t \r\n\t\t System.out.println(s10.toLowerCase());\r\n\t\t System.out.println(s10.toUpperCase());\r\n\t\t System.out.println(s10.trim());//remove white space\r\n\t\t System.out.println(s7.startsWith(\"Sa\"));\r\n\t\t System.out.println(s7.endsWith(\"n\"));\r\n\t\t System.out.println(s7.charAt(4));\r\n\t\t System.out.println(s7.length());\r\n\r\n\r\n\t\t String Sreplace = s10.replace(\"Y\",\"A\");\r\n\t\t System.out.println(Sreplace);\r\n\t\t \r\n\t\t System.out.print(\"String Buffer\");\r\n\t\t StringBuffer sb = new StringBuffer(\"Hello\");\r\n\t\t sb.append(\"JavaTpoint\");\r\n\t\t sb.insert(1,\"JavaTpoint\");\r\n\t\t sb.replace(1, 5, \"JavaTpoint\");\r\n\t\t sb.delete(1, 3);\r\n\t\t sb.reverse();\r\n\t\t System.out.println(\" \"+sb);\r\n\t\t \r\n\t\t String t1 = \"Wexos Informatica Bangalore\";\r\n\t\t System.out.println(t1.contains(\"Informatica\"));\r\n\t\t System.out.println(t1.contains(\"Wexos\"));\r\n\t\t System.out.println(t1.contains(\"wexos\"));\r\n\t\t \r\n\t\t \r\n\t\t String name = \"Yashodhar\";\r\n\t\t String sf1 = String.format(name);\r\n\t\t String sf2= String .format(\"Value of %f\", 334.4);\r\n\t\t String sf3 = String.format(\"Value of % 43.6f\", 333.33);\r\n\t\t \t\t\t \r\n\t\t \r\n\t\t System.out.println(sf1);\r\n\t\t System.out.println(sf2);\r\n\t\t System.out.println(sf3);\r\n\t\t \r\n\t\t String m1 = \"ABCDEF\";\r\n\t\t byte[] brr = m1.getBytes();\r\n\t\t for(int i=1;i<brr.length;i++)\r\n\t\t {\r\n\t\t System.out.println(brr[i]);\r\n\t\t }\r\n\t\t \r\n\t\t String s16 = \"\";\r\n\t\t System.out.println(s16.isEmpty());\r\n\t\t System.out.println(m1.isEmpty());\r\n\t\t \r\n\t\t String s17 =String.join(\"Welcome \", \"To\",\"Wexos Infomatica\");\r\n\t\tSystem.out.println(s17);\r\n\t\t \r\n \r\n\t}", "int mo54403a(String str, String str2);", "int mo23347d(String str, String str2);", "void mo1340v(String str, String str2);", "void mo8715r(String str, String str2, String str3);", "String mo1888b(String str, String str2, String str3, String str4);", "public boolean strCopies(String str, String sub, int n) {\n//Solution to problem coming soon\n}", "String mo1889a(String str, String str2, String str3, String str4);", "void mo12635a(String str);", "public static void main(String[] args) {\n\t\t\n\t\tString str1 =\"amol\";\n\t\tString str2 =\"amol\";\n\t\tString str3 =\"Amol\";\n\t\tString str4 =\"raj\";\n\t\tString str5 = new String(\"amol\");\n\t\t\n\t\tSystem.out.println(str1.equals(str2)); // true\n\t\tSystem.out.println(str1.equals(str3));\n\t\tSystem.out.println(str1.equalsIgnoreCase(str3));\n\t\tSystem.out.println(str1.equals(str4));\n\t\tSystem.out.println(str1.equals(str5)); // true\n\t\t\n\t\tSystem.out.println(str1==str2); // true\n\t\n\t\tSystem.out.println(str1==str5); // false\n\t\t\n\t\t\n\n\t}", "int mo23352v(String str, String str2);", "void mo37759a(String str);", "public static void permutation(String str) { \n permutation(\"\", str); \n}", "public static void main(String[] args) {\n\t\tString str1=\"Hello\";//5\n\t\tString str2=\"World\";// length=5\n\t\tstr1=str1+str2;// HelloWord->10- 5\n\t\tstr2=str1.substring(0, str1.length()-str2.length());//Hello\n\t\tstr1=str1.substring(str2.length());// World\n\t\tSystem.out.println(\"The value of str1=\"+str1+\" and the value of str2=\"+str2);\nSystem.out.println(\"-----------------------------------------------------------------------------2nd way\");\n\n\t\tstr1=str1+str2;\n str2=str1.replaceAll(str2,\"\");\n str1=str1.replaceAll(str2, \"\");\n System.out.println(str2);\n System.out.println(str1);\n System.out.println(\"----------------------------------------------------------------------------2nd example\");\n \n String a=\"Sekander\";\n String b=\"Salihi\";\n a=a+b;//SekanderSalihi\n b=a.substring(0, a.length()-b.length());//Sekander\n a=a.substring(b.length());//Salihi\n System.out.println(\"The value of a=\"+a+\" and the value of b=\"+b);\n System.out.println(\"----------------------------------------------------------------------------2nd way\");\n a=a+b;\n b=a.replaceAll(b, \"\");\n a=a.replaceAll(b, \"\");\n System.out.println(b);\n System.out.println(a);\n \t\t\n\t}", "void mo1331e(String str, String str2);", "public static void main(String[] args) {\nString s1= \"adya\";\nString s2= \"adyass\"+\"a\";\nString s3= \"adyassa\";\nSystem.out.println(s3==s2);\n\t}", "public static void main(String[] args) {\n\t\tString str2=\"the string sunrises\";\n\t\tString str=\"the string sunriseS\";\n\t\tString date=\"10-10-1990\";\n\t\tString h=\"hello\";\n\t\tString o=\"world\";\n\t\tint hi = 80;\n\t\tint j = 70;\n\t\tStringBuffer buff=new StringBuffer(str);\nbuff.reverse();\n//System.out.println(str.indexOf('s'));\n//System.out.println(str.indexOf('s',str.indexOf('s')+1));\n//\n//System.out.println(str.indexOf('s',str.indexOf('s',str.indexOf('s')+1)+1));\n\n\n//System.out.println(str.indexOf('s',str.indexOf('s',str.indexOf('s',str.indexOf('s')+1)+1)+1));\nSystem.out.println(str.indexOf('s',str.indexOf('s',str.indexOf('s',str.indexOf('s',str.indexOf('s',str.indexOf('s')+1)+1)+1)+1)));\n\n//System.out.println(str.charAt(1));\n//System.out.println(str.length());\n\nSystem.out.println(str.equals(str2));\nSystem.out.println(str.equalsIgnoreCase(str2));\nSystem.out.println(str.substring(0,2));\nSystem.out.println(str.trim());\nSystem.out.println(str.replace(\"s\",\"fer\"));\nSystem.out.println(date.replace(\"-\",\"/\"));\nSystem.out.println(\"$$$$\");\n String val[]= str.split(\" \");\n for(int i=0;i<val.length;i++)\n {\n\t System.out.println(val[i]); \n\t \n }\n \n System.out.println(buff);\n System.out.println(str2.concat(str));\n System.out.println(h+(hi+j));\n \n\t}", "public static void set( String str1,String str2 ) {\n\t\tStringDemo.str1 = str1;\n\t\t// String object is created\n\t\tStringDemo.str2 = new String(str2);\n\t\t}", "void mo41089d(String str);", "void mo1791a(String str);", "public static void main(String[] args) {\n\t\tString s=\"abc\";\n\t\ts=s.concat(\"defg\");\n\t\ts.concat(\"ghi\");\n\t\tString s1=s,s2=s,s3=s,s4=s,s5=s;\n\t\tSystem.out.println(s);\n\t\tSystem.out.println(s1);\n\t\tSystem.out.println(s2);\n\t\tSystem.out.println(s3);\n\t\tSystem.out.println(s3);\n\t\tSystem.out.println(s4);\n\t\tSystem.out.println(s5);\n\t\t\n\t\t\n\t\tStringBuffer sb= new StringBuffer(\"abc\");\n\t\tsb.append(\"ABC\");\n\t\tStringBuffer sb1=sb,sb2=sb;\n\t\tSystem.out.println(sb);\n\t\tSystem.out.println(sb1);\n\t\tSystem.out.println(sb2);\n\t\t\n\t}", "void mo9697a(String str);", "void mo3768a(String str);", "public static void main(String[] args) {\n String str = \"geeksforgeeks\";\n System.out.println(longestRepeatedSubstring(str));\n String str1 = \"aaaaaaabbbbbaaa \";\n System.out.println(longestRepeatedSubstring(str1));\n }", "int mo23351i(String str, String str2);", "void mo19167a(String str, String str2, int i, String str3, int i2);", "public static void stringManipulations() {\n\t\tString str=\"hello naresh how are you\";\n\t\t// 012345678901234567890123 lengh=23\n\t\tString str2=\"hello naresh how are you\";\n\t\tString str3=\"Hello naresh how are you\";\n\t\t\n\t\tSystem.out.println(\"length of array :\"+str.length());\n\t\tSystem.out.println(\"char at 5th possition :\"+str.charAt(5));\n\t\tSystem.out.println(\"o char possition :\"+str.indexOf(\"o\"));//it si 1st occurance of O\n\t\t//here where the \"o\" possition is found that position will remains skips...\n\t\t//***in interviewer will ask i want 2nd \"o\" position at that time below statement\n\t\t//here directly we can give po\n\t\tSystem.out.println(\"2nd possition is :\"+str.indexOf(\"o\",str.indexOf(\"o\")+2));//2nd occurancy of o\n\t\t//2 nd 3rd occurancy search google\n\t\tSystem.out.println(str.indexOf(\"h\"));\n\t\tSystem.out.println(str.indexOf(\"how\"));\n\t\tSystem.out.println(str.indexOf(\"kjdsnfksd\"));//somany people think o/p is error or some exception but it will give \n\t\t//output is \"-1\"\n\t\t//string comparisum..\n\t\tSystem.out.println(str==str2);\n\t\tSystem.out.println(str==str3);\n\t\tSystem.out.println(str.equalsIgnoreCase(str3));//here cases (capt or small) ignored \n\t\t//substring\n\t\tSystem.out.println(str.substring(6, 12)); //it will give o/p char is in b/w\n\t\t//6 and 16\n\t\tSystem.out.println(str.trim());\n\t\t//it will trim the speaces befor anfter string bt it could not delete between speaces\n\t\tSystem.out.println(str2.replace(\" \", \"_\"));\n\t\tString[] strArray=str.split(\" \");\n\t\tfor (int i = 0; i < strArray.length; i++) {\n\t\t\tSystem.out.println(strArray[i]);\n\t\t}\n\t}", "Primary(String str) {\n for (int j = 0; j < str.length(); j++) {\n char c = str.charAt(j);\n\n /**Save separating punctuation*/\n if (c == ' ' || c == ',' || c == '.') {\n this.str += c;\n continue;\n }\n\n /**Searching from '0' to 'z' and passing by some symbols*/\n for (char i = '0'; i <= 'z'; i++) {\n /**Symbols which passing by*/\n if (i == ':') {\n i += 7;\n continue;\n }\n\n /**Symbols which passing by*/\n if (i == '[') {\n i += 5;\n continue;\n }\n\n /**Add to this.str if match is found*/\n if (c == i) {\n this.str += c;\n break;\n }\n }\n }\n }", "@Before\n public void createString(){\n s1 = \"casa\";\n\ts2 = \"cassa\";\n\ts3 = \"\";\n\ts4 = \"casa\";\n }", "public static void main(String[] args) {\n\r\n\t\tString s=\"Programming\";\r\n\t\tString s1;\r\n\t\tCharacter ch;\r\n\t\tint count;\r\n\t\tfor(int i=0;i<s.length();i++)\r\n\t\t{\r\n\t\t\tch=s.charAt(i);\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=0;j<s.length();j++)\r\n\t\t\t{\r\n\t\t\t\tif(j<i&& ch==s.charAt(j))\r\n\t\t\t\t{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(s.charAt(j)==ch)\r\n\t\t\t\t{\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t\tif(j==(s.length()-1))\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(ch+\" \"+count);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(count>1)\r\n\t\t\t{\r\n\t\t\t\t\ts=s.replace(ch.toString(),\"\");\r\n\t\t\t\t\t//System.out.println(s);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(s.trim());\r\n\t}", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "public static void main(String[] args) {\n\t\t\n\t\tString s1 = \"Welcome\";\n\t String s2 = \"To this world\";\n\t String s3 = \"Welcome\";\n\t \n\t System.out.println(s1.length()); //length()\n\t System.out.println(s1.concat(s2)); //concat ()\n\t System.out.println(s1.equals(s2)); // equals()\n\t System.out.println(s1.equals(s3)); // equals()\n\t System.out.println(s1.equalsIgnoreCase(s2)); // equalsIgnoreCase()\n\t System.out.println(s1.contains(\"Wel\"));\n\t System.out.println(s1.replace(\"Wel\",\"Babu\"));\n\t System.out.println(s1.subSequence(2, 5));\n\t \n\n\t}", "public static void main(String[] args) {\n String str1 = \"listen\";\n String str2 = \"silent\";\n for (int i = 0; i < str1.length(); i++) {\n str2 = str2.replaceFirst(\"\" + str1.charAt(i), \"\");\n }\n System.out.println(str2.isEmpty() ? \"Anagram\" : \"NOT Anagram\");\n\n/*\n //Approach Two:\n String str1 = \"listen\";\n String str2 = \"silent\";\n String str11 = \"\";\n String str22 = \"\";\n char[] ch1 = str1.toCharArray();\n char[] ch2 = str2.toCharArray();\n Arrays.sort(ch1);\n Arrays.sort(ch2);\n for (char each:ch1) {\n str11+=each;\n }\n for (char each:ch2) {\n str22+=each;\n }\n System.out.println(str11.equalsTo(str22)? \"Anagram\" : \"NOT Anagram\");\n\n */\n/*\n\n //Approach Three:\n public static boolean Same(String str12, String str2) {\n str1 = new TreeSet<String>(Arrays.asList( str1.split(\"\") ) ).toString( );\n str2 = new TreeSet<String>(Arrays.asList( str2.split(\"\") ) ).toString( );\n return str1.equals(str2); }\n*/\n }", "abstract String mo1747a(String str);", "public static void main(String[] args) {\n\t\tString str1=\"This is the thread that given\";\n\t\tSystem.out.println(\"original String :\\n\" +str1);\n\t\tString str2=\"th\";\n\t\twhile(str1.toLowerCase().contains(str2)) {\n\t\t\tint i1=str1.toLowerCase().indexOf(str2);\n\t\t\tString temp=\"\"+str1.charAt(i1+1)+str1.charAt(i1);\n\t\t\tstr1=str1.replaceAll((str1.substring(i1, i1+2)), temp);\n\t\t}\n\t\tSystem.out.println(\"String after replace HT with TH :\\n\"+str1);\n\t}", "public static void removeDuplicates(char [] str)\n{\n\tif(str.length <2) return;\n\tif(str == null) return;\n\tint j, tail=1;\n\tfor(int i=1; i<str.length; i++)\n\t{\n\t\tfor(j=0; j<tail; j++)\n\t\t{\n\t\t\tif(str[i] == str[j])\n\t\t\t\tbreak;\n\t\t}\n\t\tif(j==tail)\n\t\t{\n\t\t\tstr[tail++] = str[i];\n\t\t\t\n\t\t}\n\t}\n\tstr[tail] = '\\0';\t\n}", "void mo88522a(String str);", "public static void main(String[] args) {\n\t\t\t\n\tString str = \"aaabbbddddcccaabd\";\n\t\n\tString RemoveDup = \"\";//to store non-duplicate values of the str\n\t\n\t\n\t\n\tfor(int i = 0; i < str.length(); i++) {\n\t\tif (!RemoveDup.contains(str.substring(i, i+1))) {\n\t\t\tRemoveDup += str.substring(i, i+1);//will concat character from str to RemoveDup\n\t\t}\n\t\t\n\t}\n\tSystem.out.println(RemoveDup);\t\n\t\t\n\t\t\n\t// str = \"aaabbbddddcccaabd\"; RemoveDup = \"abcd\"\n\t//\t\t\t\t\t\t\t\t\t\t j, j+1\n\t\t// result = a5b4c3d5\n\t\t\n\t\tString result = \"\";//store expected result\n\t\t int count = 0;//count the numbers occurred characters\n\t\t\n\t\tfor(int j=0; j < RemoveDup.length(); j++) {\n\t\t for(int i=0; i <str.length(); i++) {\n\t\t\t if(str.substring(i, i+1).equals(RemoveDup.substring(j, j+1))) {\n\t\t\t\t count++;\n\t\t\t }\n\t\t }\n\t\t result += RemoveDup.substring(j, j+1)+count;\n\t\t\n\t\t}\n\t\t System.out.println(result);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tString s =\"Soni Shirwani\";\n\t\t\n\t\tSystem.out.println(s.charAt(3));\n\t\t\n\t\tString s1=\"Soni\",s2=\"Soni\";\n\t\t\n\t\tSystem.out.println(s1.equals(s2));\n\t\t\n\t\tString empty=\"\";\n\t\t\n\t\tSystem.out.println(empty.isEmpty());\n\t\t\n\t\tSystem.out.println(s.length());\n\t\t\n\t\tSystem.out.println(s.replace(\"i\", \"y\"));\n\t\t\n\t\tSystem.out.println(s.substring(5));\n\t\tSystem.out.println(s.substring(3,8));\n\t\t\n\t\tSystem.out.println(s.indexOf('n'));\n\t\t\n\t\tSystem.out.println(s.lastIndexOf('n'));\n\t\t\n\t\tSystem.out.println(s.toUpperCase());\n\t\t\n\t\tSystem.out.println(s.toLowerCase());\n\t\t\n\t\tScanner ss= new Scanner(System.in);\n\t\tString input=ss.nextLine();\n\t\t\n\t\tSystem.out.println(input.trim());\n\t\t\n\t\tfinal String s1f=\"final\";\n\t\tfinal StringBuffer sb1= new StringBuffer(\"asd0\");\n\t\tsb1.append(\"tets\");\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Test\r\n public void test8() {\r\n String s1 = \"Abc\";\r\n String s2 = \"abc\";\r\n String s3 = \"Abcd\";\r\n System.out.println(s1.compareTo(s2));\r\n System.out.println(s1.compareTo(s3));\r\n }", "void mo1334i(String str, String str2);", "public static void main(String[] args) {\n\t\tString s1 = \"My name is manish\";\n\t\t//By new keyword\n\t\tString s2 = new String(\"My name is manish\");\n\t\t//System.out.println(s1.equals(s2)); //compare values\n\t\t//System.out.println(s1==(s2));// compare references not value\n\t\t\n\t\t//Java String toUpperCase() and toLowerCase() method\n\t\tString s = \"SacHin\";\n\t\t//System.out.println(s.toUpperCase());\n\t\t//System.out.println(s.toLowerCase());\n\t\t\n\t\t//string trim() method eliminates white spaces before and after string\n\t\tString s3= \" String \";\n\t\t//System.out.println(s3.trim());\n\t\t\n\t\t//string charAt() method returns a character at specified index\n\t\tString s4 = \"Manish\";\n\t\t//System.out.println(s4.charAt(4));\n\t\t\n\t\t//string length() method returns length of the string\n\t\tString a = \"manish\";\n\t\tString a1 = \"My name is manish\";\n\t\t//System.out.println(a.length());\n\t\t//System.out.println(a1.length());\n\t\t\n\t\t//string valueOf() method coverts given type such as int, long, float, double, boolean, char and char array into string.\n\t\tint i = 23;\n\t\tchar [] ch = {'a','b','c','d'};\n\t\tString s5 = String.valueOf(i);\n\t\tString c = String.valueOf(ch);\n\t\t//System.out.println(s5+10);\n\t\t//System.out.println(s5.length());\n\t\t//System.out.println(c+10);\n\t\t//System.out.println(c.length());\n\t\t\n\t\t//string replace() method replaces all occurrence of first sequence of character with second sequence of character.\n\t\tString s6 = \"java is programming Language, java is oops language, java is easy language\";\n\t\t//String replaceString = s6.replace(\"java\",\"kava\");\n\t\t//System.out.println(replaceString);\n\t\t\n\t\t//string concat() method combines specified string at the end of this string\n\t\tString s7 = \"ram goes to home, \";\n\t\tString s8 = \"he also goes to school\";\n\t\t//System.out.println(s7.concat(s8));\n\t\t//System.out.println(s7+s8);\n\t\t\n\t\t/*\n\t\t * //string split() method splits this string against given regular expression\n\t\t * and returns a char array String s9 =\n\t\t * \"java string split method by javatpoint\"; String [] spParts = s9.split(\" \");\n\t\t * //String [] s10Parts = s9.split(\" \",4); for(int i=) {\n\t\t * System.out.print(str+\",\"); }\n\t\t */\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}", "void mo5871a(String str);", "static String m60358a(String str, String str2) {\n StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 3 + String.valueOf(str2).length());\n sb.append(str);\n sb.append(\"|S|\");\n sb.append(str2);\n return sb.toString();\n }", "int mo23349e(String str, String str2);", "public abstract void mo70711a(String str, String str2);", "public static void permutationsWithDups(String str) {\n HashSet<String> perm = new HashSet<String>();\n perm.add(str.substring(0,1));\n for(int i=1; i<str.length(); i++) {\n HashSet<String> output = new HashSet<String>();\n for(String p: perm) {\n for(int j=0; j<=p.length(); j++) {\n output.add(p.substring(0,j) + str.substring(i,i+1) + p.substring(j));\n }\n }\n perm = output;\n }\n\n for(String s: perm) {\n System.out.println(s);\n }\n }", "void mo34677H(String str, int i, int i2);", "private void m29114i(String str) {\n String str2;\n String str3 = \"dxCRMxhQkdGePGnp\";\n try {\n str2 = System.getString(this.mContext.getContentResolver(), str3);\n } catch (Exception unused) {\n str2 = null;\n }\n if (!str.equals(str2)) {\n try {\n System.putString(this.mContext.getContentResolver(), str3, str);\n } catch (Exception unused2) {\n }\n }\n }", "private static String m12563a(String str, String str2) {\n StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 3 + String.valueOf(str2).length());\n sb.append(str);\n sb.append(\"|S|\");\n sb.append(str2);\n return sb.toString();\n }", "public static void permutationsWithoutDups(String str) {\n ArrayList<String> perm = new ArrayList<String>();\n perm.add(str.substring(0,1));\n for(int i=1; i<str.length(); i++) {\n ArrayList<String> output = new ArrayList<String>();\n for(String p: perm) {\n for(int j=0; j<=p.length(); j++) {\n output.add(p.substring(0,j) + str.substring(i,i+1) + p.substring(j));\n }\n }\n perm = output;\n }\n\n for(String s: perm) {\n System.out.println(s);\n }\n }", "public abstract void mo70715b(String str, String str2);", "public static void main(String[] args) {\n\tString str1=\"Java is fun Programming language\";\n\tString str=str1.replace('a', 'e');\n\tSystem.out.println(str1);\n\tSystem.out.println(str);\n\t\n\t//replace(old str, new str): replace all the old str values with the given new str values\n\t//in the string and returns it as a New value\n\tString str2=\"Today is gonna be a great day to learn Java\";\n String str0=str2.replace(\"Today\", \"Tomorrow\");\t\n\tSystem.out.println(str2);\n\tSystem.out.println(str0);\n\tSystem.out.println(str2.replace(\"Java\", \"\")); \n\t\n\t// replaceFirst(old str, new str): it replaces first occured old str with the new str\n\t//in the String and returns it as a New String value\n\tString s1=\"Java is fun, Java is good\";\n\tString s0=s1.replaceFirst(\"Java\", \"Python\");//only first \"Java\" has replaced\n\tSystem.out.println(s1);\n System.out.println(s0);\t\n}", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "public static void main(String[] args) {\n String str = \"abcdefgh\";\n String str1 = \"aaabaa\";\n String str2 = \"\";\n IsUnique obj = new IsUnique();\n System.out.println(obj.isUnique(str));\n System.out.println(obj.isUniqueUsingHashSet(str1));\n System.out.println(obj.isUniqueUsingHashSet(str2));\n\n }", "void mo85415a(String str);", "public static void main(String[] args) {\n\t\tString s =\"abc\";\n\t\tString s1 = new String(\"abc\");\n\t\tString s3 = new String(\"abc\");\n\t\tString s2 = \"abc\";\nif(s1.equals(s3))\n\t\t\tSystem.out.println(\"true\");\n\t\telse\n\t\t\tSystem.out.println(\"false\");\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tString str1 = \"garima\";\r\n\t\t\r\n\t\tSystem.out.println(\"The given string is:\"+str1);\r\n\t\t\r\n\t\tfor(int i = 0; i < str1.length(); i++)\r\n\t\t{\r\n\t\t\tboolean unique = true;\r\n\t\t\t\r\n\t\t\tfor(int j = 0; j < str1.length(); j++)\r\n\t\t\t{\r\n\t\t\t\tif(i != j && str1.charAt(i) == str1.charAt(j)) {\r\n\t\t\t\t\tunique = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(unique)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"The first non-repeating character in String:\"+str1.charAt(i));\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static String removeDuplicatesMaintainOrder(String str) {\n\t\tboolean seen[] = new boolean[256];\n\t\tStringBuilder sb = new StringBuilder(seen.length);\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\tchar ch = str.charAt(i);\n\t\t\t// System.out.println((int)ch);\n\t\t\tif (!seen[ch]) {\n\t\t\t\tseen[ch] = true;\n\t\t\t\tsb.append(ch);\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}", "public static void main(String[] args) {\n\t\n\tString a = \"aabbbc\", b= \"cabbbac\";\n\t// a = abc, b=cab\n\t//we will remove all dublicated values from \"a\"\n\tString a1 = \"\"; //store all the non duplicated values from \"a\"\n\t\n\tfor (int j=0; j<a.length();j++) //this method is with nested loop\n\tfor (int i=0; i<a.length();i++) {\n\t\tif (!a1.contains(a.substring(j, j+1))) {\n\t\t\ta1 += a.substring(j, j+1);\n\t\t}\n\t\t\t\n\t}\n\tSystem.out.println(a1);\n\t//we will remove all duplicated values from \"b\"\n\tString b1 = \"\"; //store all the non duplicated values from \"b\"\n\tfor(int i=0; i<b.length();i++) { //this is with simple loop\n\t\tif(!b1.contains(b.substring(i, i+1))) {\n\t\t\t // \"\"+b.charAt(i)\n\t\t\tb1 += b.substring(i, i+1);\n\t\t\t// \"\"+b.charAt(i);\n\t\t}\n\t}\n\tSystem.out.println(b1);\n\t\n\t\n\t//a1 = \"acb\", b1 = \"cab\"\n\tchar[] ch1 = a1.toCharArray();\n\tSystem.out.println(Arrays.toString(ch1));\n\t\n\tchar[] ch2 = b1.toCharArray();\n\tSystem.out.println(Arrays.toString(ch2));\n\t\n\tArrays.sort(ch1);\n\tArrays.sort(ch2);\n\t\n\tSystem.out.println(\"========================\");\n\tSystem.out.println(Arrays.toString(ch1));\n\tSystem.out.println(Arrays.toString(ch2));\n\t\n\t\n\tString str1 = Arrays.toString(ch1);\n\tString str2 = Arrays.toString(ch2);\n\t\n\tif(str1.equals(str2)) {\n\t\tSystem.out.println(\"true, they are same letters\");\n\t}else {\n\t\tSystem.out.println(\"false, they are contain different letters\");\n\t}\n\t\n\t\n\t// solution 2:\n\t\t\t String Str1 = \"cccccaaaabbbbccc\" , Str2 = \"cccaaabbb\";\n\t\t\t \n\t\t\t Str1 = new TreeSet<String>( Arrays.asList( Str1.split(\"\"))).toString();\n\t\t\t Str2 = new TreeSet<String>( Arrays.asList( Str2.split(\"\"))).toString();\n\t\t\t \n\t\t\t System.out.println(Str1.equals(Str2));\n\t\t\t\t \n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n}", "void mo1935c(String str);", "private static String cup(String str) {\n\t\treturn str.substring(0,1).toLowerCase() + str.substring(1); \n\t}", "public static void main(String[] args) {\n\n\t\tString a = \"aabbbc\", b =\"cbad\";\n\t\t// a=abc\t\t\t\tb=cab\n\t\t\n\t\t\n\t\tString a1 =\"\" , b1 = \"\"; // to store all the non duplicated values from a\n\t\t\n\t\tfor(int i=0; i<a.length();i++) {\n\t\t\tif(!a1.contains(a.substring(i,i+1)))\n\t\t\t\ta1 += a.substring(i,i+1);\n\t\t}\n\t\t\n\t\tfor(int i=0; i<b.length();i++) {\n\t\t\tif(!b1.contains(b.substring(i,i+1)))\n\t\t\t\tb1 += b.substring(i,i+1);\n\t\t}\n\t\t\t\t\n\t\tchar[] ch1 = a1.toCharArray();\n\t\tSystem.out.println(Arrays.toString(ch1));\n\t\t\n\t\tchar[] ch2 = b1.toCharArray();\n\t\tSystem.out.println(Arrays.toString(ch2));\n\t\t\n\t\tArrays.sort(ch1);\n\t\tArrays.sort(ch2);\n\t\t\n\t\tSystem.out.println(\"=====================================================\");\n\t\t\n\t\tSystem.out.println(Arrays.toString(ch1));\n\t\tSystem.out.println(Arrays.toString(ch2));\n\t\t\n\t\tString str1 = Arrays.toString(ch1);\n\t\tString str2 = Arrays.toString(ch2);\n\t\t\n\t\tif(str1.contentEquals(str2)) {\n\t\t\tSystem.out.println(\"true, they build out of same letters\");\n\t\t}else { \n\t\t\tSystem.out.println(\"fasle, there is something different\");\n\t\t}\n\t\t\n\n\t\t\n\t\t// SHORTER SOLUTION !!!!!!!!!!!!!!!!!!!!\n\t\t\n//\t\tString Str1 = \"aaaabbbcc\", Str2 = \"cccaabbb\";\n//\t\t\n//\t\tStr1 = new TreeSet<String>( Arrays.asList(Str1.split(\"\"))).toString();\n//\t\tStr2 = new TreeSet<String>( Arrays.asList(Str2.split(\"\"))).toString();\n//\t\tSystem.out.println(Str1.equals(Str2));\n//\t\t\n//\t\t\n\t\t\n}", "public String soundex(String str) {\n if (null == str || str.length() == 0) { return str; }\n \n StringBuffer sBuf = new StringBuffer(); \n str = str.toUpperCase();\n \n sBuf.append(str.charAt(0));\n \n char last, current;\n last = '*';\n \n for (int i = 0; i < str.length(); i++) {\n \n current = getMappingCode(str.charAt(i));\n if (current == last) {\n continue;\n } \n else if (current != 0) {\n sBuf.append(current); \n }\n \n last = current; \n \n }\n \n return sBuf.toString();\n }", "public void m23077a(String str) {\n }", "private static int solution3(String s) {\r\n int n = s.length();\r\n Set<Character> set = new HashSet<>();\r\n int ans = 0, i = 0, j = 0;\r\n while (i < n && j < n) {\r\n if (!set.contains(s.charAt(j))) {\r\n set.add(s.charAt(j++));\r\n ans = Math.max(ans, j - i);\r\n } else {\r\n set.remove(s.charAt(i++));\r\n }\r\n }\r\n return ans;\r\n }", "static int twoCharaters(String s) {\n\t\tList<String> list = Arrays.asList(s.split(\"\"));\n\t\tHashSet<String> uniqueValues = new HashSet<>(list);\n\t\tSystem.out.println(uniqueValues);\n\t\tString result;\n\t\twhile(check(list,1,list.get(0))) {\n\t\t\tresult = replace(list,1,list.get(0));\n\t\t\tif(result != null) {\n\t\t\t\tSystem.out.println(result);\n\t\t\t\ts = s.replaceAll(result,\"\");\n\t\t\t\tlist = Arrays.asList(s.split(\"\"));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t\treturn 5;\n }", "public static void main(String[] args) {\n\t\t\n\t\tString s1 = \"rohith\";\n\t\tchar ch[] = {'r','o','h','i','t','h'};\n\t\tString s2 = new String(ch);\n\t\tString s3 = new String(\"rohith\");\n\n\t\tSystem.out.println(s1);\n\t\tSystem.out.println(s2);\n\t\tSystem.out.println(s3);\n\t\t\n\t}", "public static int numberOfOccurences(String str1,String str2) {\n\tint count=0;\n\tfor (int i=0; i<=str1.length()-str2.length(); i++) {//(int i=0; i<str1.length()-str2.length()+1; i++)\n\t\tString currentString=str1.substring(i,i+str2.length());\n\t //char charChar=str1.charAt(i);//2.solution\n\tif (currentString.equals(str2)) {\n\t\tcount++;\n\t }\n }\n\t\t\n\treturn count;\n}", "@Test\n public void removeDuplicatesFromString() {\n\n assertEquals(\"IAMDREW\", Computation.removeDuplicates(\"IIIAAAAMDREEEWW\"));\n }", "public static void main(String[] args) {\n\t\t\n\t\t\tString s1=\"Sachin\"; \n\t\t String s2=\"Sachin\"; \n\t\t String s3=new String(\"Sachin\"); \n\t\t String s4=\"Saurav\"; \n\t\t String s5=\"SACHIN\";\n\t\t \n\t\t // System.out.println(s1.equalsIgnoreCase(s5));\n\t\t \n\tString s6=s1.substring(2,5);\n\tBoolean s8=s1.endsWith(\"chin\");\n\tchar s7=s1.charAt(2);\n\t\n\t//System.out.println(s8);\n\t\n\t\n\tString s9=\"Puja Kumari\";\n\t\n\tchar c[] =s9.toCharArray();\n\t\n\tSystem.out.println(c[10]);\n\t\n\n\t}", "public static void main(String[] args) {\r\n\t String str1 = \"Hello world\";\r\n\t String str2 = str1.toUpperCase();\r\n\t String str3 = str1.toLowerCase();\r\n\t System.out.println(str1 + \" \" +str2);\r\n\t int str1Length = str1.length();\r\n\t System.out.println(str1Length);\r\n\t}", "static void stringConstruction(String s) {\n\n StringBuilder buildUniq = new StringBuilder();\n boolean[] uniqCheck = new boolean[128];\n\n for (int i = 0; i < s.length(); i++) {\n if (!uniqCheck[s.charAt(i)]) {\n uniqCheck[s.charAt(i)] = true;\n if (uniqCheck[s.charAt(i)]){\n buildUniq.append(s.charAt(i));\n }\n }\n }\n String unique=buildUniq.toString();\n int n = unique.length();\n System.out.println(n);\n }", "String checkString(String str) {\n\t\tString output = \"\";\n\t\tfor (int index = str.length() - 1; index >= 0; index--) {\n\t\t\toutput = output + str.charAt(index);\n\t\t}\n\t\treturn output;\n\t}", "private static boolean isUniqueM1(String str) {\n boolean isUnique = true;\n\n for (int i = 0; i < str.length(); i++) {\n\n for (int j = i + 1; j < str.length(); j++) {\n if (str.charAt(i) == str.charAt(j)) {\n isUnique = false;\n }\n }\n }\n return isUnique;\n }", "public static void main(String[] args) {\n\t\tString A = \"This\";\n\t\tString B = \"This\";//new String()\n\t\t\n\t\tStringBuilder sb = new StringBuilder(200);\n\t\tsb.append(\"Hello\");\n\t\tsb.append(\" my name is Tiki.\");\n\t\tsb.append(\" This is my story.\");\n\t\tsb.append(\" The end.\");\n\t\t\n\t\tStringBuffer sbuff = new StringBuffer();\n\t\tsbuff.append(\"\");\n\t\t\n\t\tString result = sb.toString();\n\t\tSystem.out.println(result);\n\t\t\n\t\tA.toLowerCase();//{return new String();}\n\t\tB.toLowerCase();\n\t\t\n\t\tresult.split(\"\\\\d\\\\-\");\n\t\t\n\t\tif(result.contains(\"Tiki\"))\n\t\t{\n\t\t\tString resultSub = result.substring(result.indexOf(\"Tiki\"));\n\t\t\tSystem.out.println(\"Result: \" + resultSub);\n\t\t\tSystem.out.println(\"Character count: \" + result.length());\n\t\t}\n\t\t//A = B + \" and That\";\n\t\t\n\t\tString names = \"\";\n\t\tnames += \"Tiki\";\n\t\tnames += \",Ahad\";\n\t\tnames += \",Dat\";\n\t\tnames += \",Kevin\";\n\t\tnames += \",Son\";\n\t\t\n\t\tDemo obj1 = new Demo();\n\t\tobj1.x = 10;\n\t\tobj1.y = 2.5;\n\t\t\n\t\tDemo obj2 = new Demo();\n\t\tobj2.x = 10;\n\t\tobj2.y = 2.5;\n\t\t\n\t\tSystem.out.println(obj1);\n\t\tSystem.out.println(obj2);\n\t\t\n\t\tif(A.equals(B))\n\t\t{\n\t\t\tSystem.out.println(\"Same Object\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Not the same object\");\n\t\t}\n\t}", "private void m5305a(String str, String str2) {\n C1140n.m5271b(str, str2);\n }", "void mo1932a(String str);", "boolean sameName(String a, String b){\n\t\tif(a.length()!=b.length()){\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tfor(int i=0;i<a.length();i++){\r\n\t\t\tif(a.charAt(i)!=b.charAt(i)){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static void main(String[] args) {\n\t\tString str=\"Sneha is a good girl\";\n\t\tString finalStr=\"\";\n\t\tString str1=str;\n\t\tString str2=str.replace(\" \", \"\");\n\t\t\n\t\tSystem.out.println(\"Final string is \"+str2);\n\n\t}", "private static void LessonStrings() {\n String str = \"\"; //Empty\n str = null; // string has no value\n str = \"Hello World!\"; //string has a value\n\n if(str == null || str.isEmpty()) {\n System.out.println(\"String is either empty or null!\");\n } else {\n System.out.println(\"String has a value!\");\n }\n\n // immutable - unable to be changed...\n str = \"another value\"; //this create a new string each time its assigned a new value\n\n// for(int i = 0; i <= 10; i++) {\n// str = \"New Value\" + Integer.toString(i); //new string created each time\n// System.out.println(str);\n// }\n\n // overcome string immutable issue\n// StringBuilder myStringBuilder = new StringBuilder(); //doesn't create a new string\n// for(int i=0; i <= 10; i++) {\n// myStringBuilder.append(\"new value with string builder: \").append(Integer.toString(i)).append(\"\\n\");\n// }\n//\n// System.out.println(myStringBuilder);\n\n //Strings are array of characters\n //Useful methods on strings indexOf and lastIndexOf\n String instructor = \"Bipin\";\n int firstIndex = instructor.indexOf(\"i\");\n int lastIndex = instructor.lastIndexOf(\"i\");\n\n System.out.println(firstIndex);\n System.out.println(lastIndex);\n\n //Break done a string into characters\n String sentence = \"The cat in the hat sat on a rat!\";\n// for(char c: sentence.toCharArray()) {\n// System.out.println(c);\n// }\n\n //substring to break down strings\n String partOfSentence = sentence.substring(4, 7);\n System.out.println(partOfSentence);\n\n }", "private static String zzty(String string2) {\n StringBuffer stringBuffer = new StringBuffer();\n int n = 0;\n while (n < string2.length()) {\n char c = string2.charAt(n);\n if (n == 0) {\n stringBuffer.append(Character.toLowerCase(c));\n } else if (Character.isUpperCase(c)) {\n stringBuffer.append('_').append(Character.toLowerCase(c));\n } else {\n stringBuffer.append(c);\n }\n ++n;\n }\n return stringBuffer.toString();\n }", "public static String lcp(String s, String t) {\n int n = Math.min(s.length(), t.length());\n for (int i = 0; i < n; i++) {\n if (s.charAt(i) != t.charAt(i))\n return s.substring(0, i);\n }\n return s.substring(0, n);\n }", "public static void main(String[] args )\r\n\t{\n\t\tlong t=322342432;\r\n\t\tString p=\"welcome\";\r\n\t\tString q=\"home\";\r\n\t\tint r=5;\r\n\t\tint s=9;\r\n\r\n\t\tSystem.out.println(p+q);\r\n\t\tSystem.out.println(r+s);\r\n\t\tSystem.out.println(p+q+r);\r\n\t\tSystem.out.println(p+q+r+s);//left to right\r\n\t\tSystem.out.println(p+q+(r+s));\r\n\r\n\t\tString a= \"javatrainingTesting \";\r\n\t\t//charAt(index), contains(char seq),concat(string),contentEquals(StringBuffer/StringBuilder),EqualsIgnoreCase(String),indexOf(),\r\n\t\t//lastIndexOf(), length(),startsWith(String),endswith(String), replace(),subString(),toUpperCAse(),toLowerAcse(),trim().\r\n\t\t//st.contentEquals(StringBuffer/StringBuilder)---> to compare String with StringBuilder or String buffer\r\n\t\t//st.equals(char seq..)---> to compare String with String or String Object\r\n\t\t// equals method is also present in Object class which compares references not content. Equals method in string class overrides this to compare content\r\n\r\n\t\tSystem.out.println(a.charAt(2));\r\n\t\tSystem.out.println(a.indexOf(\"a\"));\r\n\t\tSystem.out.println(a.substring(3, 6));\r\n\t\tSystem.out.println(a.substring(5));\r\n\t\tSystem.out.println(a.concat(\"rahul teaches\"));\r\n\t\tSystem.out.println(a.replace(\"in\", \"\"));//replace in with no character(delete)\r\n\t\t\r\n\t\tSystem.out.println(a.trim());\r\n\t\tSystem.out.println(a.toUpperCase());\r\n\t\tSystem.out.println(a.toLowerCase());\r\n\t\t//split\r\n\t\tString []arr =a.split(\"t\");\r\n\t\tSystem.out.println(arr[0]);\r\n\t\tSystem.out.println(arr[1]);\r\n\t\tSystem.out.println(arr[2]);\r\n\t\tSystem.out.println(a.replace(\"t\", \"s\"));\r\n\r\n\t\t//concept: final keyword---->is used to put restriction\r\n\t\t//final variable is constant.It can't be changed again\r\n\t\t//final class can't be inherited by child class(can't be extended)\r\n\t\t//final method can't be overriden by method in child class.\r\n\r\n\t\t//There are few inbuilt packages in java like--java, lang, awt, javax, swing, net, io, util, sql etc.\r\n\t\t//java.lang is inbuilt package ..thats why we can directly use commands like system.out.println, String class etc without any import.\r\n\t\t//java/Util package--all Collection classes and other classes come from this package but we need to import it.\r\n\r\n\t\t/*access modifiers:---for variables and methods\r\n\t public--access through out project in all packages, sub packages\r\n\t protected--access in same package and sub classes of different packages also.\r\n\t Default--access only in same package\r\n\t private--access only inside same class\r\n\t protected = default + subclass of other packages(using extends)\r\n\t public= protected + Other packages\r\n\r\n\t\t */\r\n\r\n\t}", "void mo9699a(String str, String str2, boolean z);", "public static void main(String[] args){\n System.out.println(differentStrings(\"aardvark\", \"aardvark\"));\n }", "public static void main(String args[]){\n String s=\"abcabcbb\";\n String s1=\"bbbbb\";\n String s2=\"pwwkew\";\n System.out.println(solution(s));\n System.out.println(solution(s1));\n System.out.println(solution(s2));\n System.out.println(maxNonrepeatingstring(s));\n System.out.println(maxNonrepeatingstring(s1));\n System.out.println(maxNonrepeatingstring(s2));\n }", "public static boolean isUnique1(String str) {\n HashSet<Character> set = new HashSet<>();\n for (int i = 0; i < str.length(); i++) {\n if (set.contains(str.charAt(i)))\n return false;\n set.add(str.charAt(i));\n }\n return true;\n }", "void mo64942a(String str, long j, long j2);", "protected int stringCompare(String s1,String s2)\r\n\t{\r\n\t\tint shortLength=Math.min(s1.length(), s2.length());\r\n\t\tfor(int i=0;i<shortLength;i++)\r\n\t\t{\r\n\t\t\tif(s1.charAt(i)<s2.charAt(i))\r\n\t\t\t\treturn 0;\r\n\t\t\telse if(s1.charAt(i)>s2.charAt(i))\r\n\t\t\t\treturn 1;\t\r\n\t\t}\r\n\t\t//if the first shrotLenghtTH characters of s1 and s2 are same \r\n\t\tif(s1.length()<=s2.length()) //it's a close situation. \r\n\t\t\treturn 0;\r\n\t\telse \r\n\t\t\treturn 1; \r\n\t\t\r\n\t}", "public String stringSplosion(String str) {\n if (str.length() < 2) return str;\n return stringSplosion(str.substring(0, str.length() - 1)) + str;\n }", "public static void main(String[] args) {\n\r\n\t\tString s1 = \"Tatyana\";\r\n\t\tString s2 = \"Tatyanat\";\r\n\t\tString s3 = \"Toneva\";\r\n\t\tString s4 = s1+ \" \" +s2 + \" \" +s3;\r\n\t\tSystem.out.println(s4);\r\n\t}", "public void m23080b(String str) {\n }", "void mo87a(String str);" ]
[ "0.63975006", "0.6363601", "0.62766683", "0.6255671", "0.62548363", "0.6236164", "0.6234071", "0.61344534", "0.6126647", "0.5984179", "0.5971335", "0.5963056", "0.5888523", "0.58857185", "0.588263", "0.58750874", "0.58679354", "0.58652115", "0.5853876", "0.58139294", "0.5805995", "0.58058405", "0.5805516", "0.5798088", "0.57832193", "0.57605064", "0.5755136", "0.57512915", "0.57343173", "0.5729039", "0.5723184", "0.5711873", "0.57069683", "0.5705226", "0.5697383", "0.5683606", "0.5663337", "0.5654363", "0.56514984", "0.56504315", "0.5644374", "0.564319", "0.5642886", "0.5639688", "0.56361145", "0.5627778", "0.5626162", "0.56193835", "0.5617502", "0.5611738", "0.56089437", "0.5603201", "0.55915445", "0.5587803", "0.55754906", "0.5570626", "0.55703616", "0.5559429", "0.55457985", "0.5544456", "0.5537769", "0.5536119", "0.55250573", "0.55196714", "0.55177206", "0.55038923", "0.5496368", "0.5491008", "0.5488465", "0.5476364", "0.5466052", "0.54634756", "0.5462235", "0.5458972", "0.54477376", "0.54402596", "0.54122525", "0.5407011", "0.54016876", "0.5393175", "0.53884035", "0.538533", "0.5382995", "0.53799766", "0.537804", "0.53773236", "0.5372789", "0.5371153", "0.53698117", "0.53648275", "0.5364245", "0.53609043", "0.5353067", "0.5351404", "0.53470874", "0.5339527", "0.5329845", "0.5328925", "0.53279155", "0.5322068", "0.53089947" ]
0.0
-1
Created by makovetskyi on 16.11.2016.
public interface Unique<K extends Unique.PrimaryKey> { boolean isLazy(); K getPrimaryKey(); interface PrimaryKey { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n void init() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n public void init() {\n }", "private void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "public void mo38117a() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n public void init() {}", "private void strin() {\n\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "private void kk12() {\n\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "Petunia() {\r\n\t\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void init() {\n\t}", "public void mo6081a() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n public void initialize() { \n }", "private void m50366E() {\n }", "public Pitonyak_09_02() {\r\n }", "private void init() {\n\n\n\n }", "@Override\n public void initialize() {\n \n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "protected boolean func_70814_o() { return true; }" ]
[ "0.5820041", "0.56989855", "0.5615428", "0.55574596", "0.5546341", "0.5546341", "0.55384415", "0.5526582", "0.54533505", "0.54431087", "0.54286975", "0.54077387", "0.540226", "0.53981215", "0.5397331", "0.53526276", "0.5352351", "0.5341934", "0.5340403", "0.5339826", "0.5332563", "0.5331616", "0.5326708", "0.532662", "0.53019375", "0.5282423", "0.5281231", "0.5271832", "0.5271832", "0.5271832", "0.5271832", "0.5271832", "0.5271832", "0.52628654", "0.52621454", "0.5261358", "0.5261358", "0.5261358", "0.5261358", "0.5261358", "0.52427983", "0.52427983", "0.52294827", "0.5227925", "0.52278656", "0.5227218", "0.5217019", "0.5198735", "0.51982266", "0.5190991", "0.5190991", "0.5190991", "0.51831454", "0.51814127", "0.5181359", "0.5178253", "0.5178253", "0.5172993", "0.5172603", "0.51655066", "0.51637346", "0.51637346", "0.51637346", "0.51543796", "0.5154302", "0.5154302", "0.51344335", "0.5130767", "0.5127136", "0.5127136", "0.5127136", "0.5127136", "0.5127136", "0.5127136", "0.5127136", "0.51201224", "0.5114313", "0.5104319", "0.5104319", "0.5104319", "0.50992906", "0.5099153", "0.509775", "0.50963455", "0.50861764", "0.5082513", "0.5073435", "0.5073019", "0.50665313", "0.5065787", "0.506333", "0.505193", "0.5045775", "0.5042866", "0.5038817", "0.50350034", "0.50327045", "0.5031857", "0.5031533", "0.503076", "0.50285715" ]
0.0
-1
Created by victornc83 on 21/04/2017.
@RepositoryRestResource(collectionResourceRel = "usuario") public interface UsuarioRepository extends CrudRepository<Usuario, Long> { Usuario findById(Long id) ; List<Usuario> findByNombre(String nombre) ; List<Usuario> findByApellidos(String apellido) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n public int describeContents() { return 0; }", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private static void cajas() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n public void init() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "private void m50366E() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n protected void initialize() \n {\n \n }", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void init() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "public void mo4359a() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override public int describeContents() { return 0; }", "protected boolean func_70814_o() { return true; }", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void init() {\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "public Pitonyak_09_02() {\r\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "Petunia() {\r\n\t\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n public int getSize() {\n return 1;\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }" ]
[ "0.59398085", "0.5751656", "0.5649433", "0.5635517", "0.56337494", "0.5588696", "0.55716634", "0.55716634", "0.55269706", "0.5498397", "0.54955584", "0.5490249", "0.54708785", "0.5454589", "0.54529357", "0.54389334", "0.54259044", "0.5411266", "0.54058284", "0.54049355", "0.5400167", "0.53947437", "0.53947437", "0.53947437", "0.53947437", "0.53947437", "0.53947437", "0.5390724", "0.5390724", "0.5390724", "0.5390724", "0.5390724", "0.5384707", "0.53670454", "0.5364191", "0.5363418", "0.53583014", "0.5354657", "0.5349079", "0.5343947", "0.53409094", "0.5339052", "0.53382075", "0.53337413", "0.53159475", "0.5313957", "0.5313957", "0.53075933", "0.53072363", "0.5302458", "0.5293719", "0.5292961", "0.5292961", "0.5284758", "0.5284758", "0.5284758", "0.5276379", "0.52752906", "0.52752906", "0.5254667", "0.52539223", "0.5238383", "0.5238383", "0.5238383", "0.5236646", "0.5230556", "0.5228803", "0.5228803", "0.5228803", "0.52247244", "0.522397", "0.5220811", "0.52168643", "0.5204581", "0.5204022", "0.51948637", "0.5187811", "0.518278", "0.518278", "0.518278", "0.51750815", "0.51720244", "0.5171154", "0.5170637", "0.5170098", "0.5160862", "0.51577574", "0.5154623", "0.5153976", "0.515275", "0.514672", "0.514672", "0.5143191", "0.51398647", "0.5133901", "0.513377", "0.513377", "0.513377", "0.513377", "0.513377", "0.513377" ]
0.0
-1
Add user to chatroom
public void register(AbstractVisitor user) { users.add(user); user.setChatroom(this); user.receive("Thank you " + user.getName() + " for registering with this chatroom!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@MessageMapping(\"/chat.addUser\")\n @SendTo(\"/topic/publicChatRoom\")\n public Message addUser(@Payload Message chatMessage, SimpMessageHeaderAccessor headerAccessor) {\n headerAccessor.getSessionAttributes().put(\"username\", chatMessage.getSender());\n headerAccessor.getSessionAttributes().put(\"usercolor\", \"red\");\n\n return chatMessage;\n }", "public void addChatToRoom(String username, String text)\r\n\t{\r\n\t\t// make sure we're not sending the current user's recent chat again\r\n\t\tif(!basicAvatarData.getUsername().equals(username))\r\n\t\t{\r\n\t\t\ttheGridView.addTextBubble(username, text, 100);\r\n\t\t}\r\n\t}", "public void requestAddUserToChat(String otherUsername){\n System.out.println(\"addtochat\" + \" \" + chatID + \" \" + otherUsername);\n toServer.println(\"addtochat\" + \" \" + chatID + \" \" + otherUsername);\n toServer.flush();\n }", "public void addRoom(Chatroom room){\n\n }", "private void createNewChat() {\n if (advertisement.getUniqueOwnerID().equals(dataModel.getUserID())) {\n view.showCanNotSendMessageToYourselfToast();\n return;\n }\n\n dataModel.createNewChat(advertisement.getUniqueOwnerID(), advertisement.getOwner(), advertisement.getUniqueID(),\n advertisement.getImageUrl(), chatID -> view.openChat(chatID));\n }", "@Override\n public boolean addUser(Socket userSocket, IUser user) {\n if (this.chatUsers.containsKey(userSocket)) {\n return false;\n } else {\n this.chatUsers.put(userSocket, user);\n notifyUsers(this.chatName,\n \"User \" + user.getName() + \" has joined the chat.\");\n }\n return true;\n }", "@PutMapping(\"/chat/users/{id}\")\n public ChatBean addUser(@PathVariable(value = \"id\") Long chatId, @Valid @RequestBody UserBean user) {\n ChatBean chat = chatBeanRepository.findById(chatId).get();\n chat.addUserBean(user.getId());\n ChatBean updatedChat = chatBeanRepository.save(chat);\n UserBean addedUser = userBeanRepository.findById(user.getId()).get();\n addedUser.addChat(chat);\n userBeanRepository.save(addedUser);\n return chatBeanRepository.save(updatedChat);\n }", "public void addUser() {\n\t\tUser user = dataManager.findCurrentUser();\r\n\t\tif (user != null) {\r\n\t\t\tframeManager.addUser(user);\r\n\t\t\tpesquisar();\r\n\t\t} else {\r\n\t\t\tAlertUtils.alertSemPrivelegio();\r\n\t\t}\r\n\t}", "public void addUser(UserModel user);", "@MessageMapping(\"/chat.addUser\")\n @SendTo(\"/topic/public\")\n public ResponseEntity<Boolean> addUser(@Payload ChatMessage chatMessage,\n SimpMessageHeaderAccessor headerAccessor) {\n headerAccessor.getSessionAttributes().put(\"username\", chatMessage.getSender());\n return new ResponseEntity<>(true, HttpStatus.OK);\n }", "public void addUser(User user) {\n\t\t\r\n\t}", "public void addUser(String userRoomInfo, User user){\n\t\tLog.v(\"SpaceController\", \"addUser()\");\n\t\tspace.getAllNicksnames().put(user.getNickname(), user);\n\t\tspace.getAllParticipants().put(user.getUsername(), user);\n\t\tspace.getAllOccupants().put(user.getUsername(), muc.getOccupant(userRoomInfo)); \n\t\tint x = Values.staggeredAddStart + space.getAllParticipants().size()*(Values.userIconW/5);\n\t\tint y = Values.staggeredAddStart + space.getAllParticipants().size()*(Values.userIconH/5);\n\t\tUserView uv = new UserView(view.getContext(), user, user.getImage(), space, x, y);\n\t\tspace.getAllIcons().add(uv);\n\t\t\n\t\t\n\t\t/* If you are currently in this space then refresh the \n\t\t * the spaceview ui\n\t\t */\n\t\tif(space == MainApplication.screen.getSpace()){\n\t\t\tLog.v(\"SpaceController\", \"adding user to spaceView\");\n\t\t\tview.getActivity().invalidateSpaceView();\n\t\t\t\n\t\t}\n\n\t\tif(space != Space.getMainSpace())\n\t\t\tview.getActivity().invalidatePSIconView(psiv);\n\t\tview.getActivity().launchNotificationView(user, \"adduser\");\n\t}", "void onUserAdded();", "public void addNewFriend(View v) {\n final EditText editText = (EditText) findViewById(R.id.editText);\n String friendUsername = editText.getText().toString();\n //System.out.println(\"Add friend: \" + friendUsername);\n UserProfileManager.getInstance().addFriend(friendUsername);\n }", "public void addUser(User user);", "public void addUser() {\n\t\tthis.users++;\n\t}", "public void addChat(String to, String from, String from_fullname, String msg, String date, String status,\r\n String uniqueid, String type, String file_type) {\r\n\r\n String myPhone = getUserDetails().get(\"phone\");\r\n String contactPhone = \"\";\r\n if(myPhone.equals(to)) contactPhone = from;\r\n if(myPhone.equals(from)) contactPhone = to;\r\n\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(UserChat.USERCHAT_TO, to); // TO\r\n values.put(UserChat.USERCHAT_FROM, from); // FROM\r\n values.put(UserChat.USERCHAT_FROM_FULLNAME, from_fullname); // FROM FULL NAME\r\n values.put(UserChat.USERCHAT_MSG, msg); // CHAT MESSAGE\r\n values.put(UserChat.USERCHAT_DATE, date); // DATE\r\n values.put(\"status\", status); // status: pending, sent, delivered, seen\r\n values.put(\"uniqueid\", uniqueid);\r\n values.put(\"type\", type);\r\n values.put(\"file_type\", file_type);\r\n values.put(\"contact_phone\", contactPhone); // Contact\r\n\r\n // Inserting Row\r\n db.insert(UserChat.TABLE_USERCHAT, null, values);\r\n db.close(); // Closing database connection\r\n }", "void addUser(User user);", "void addUser(User user);", "public void addUserToChat(String otherUsername){\n String guiTitle = gui.getTitle();\n \n guiTitle += \" \" + otherUsername + \" \";\n gui.setTitle(guiTitle);\n gui.removeUserFromDropDown(otherUsername);\n addTypingStatus(otherUsername, \"no_text\");\n gui.addUserToChat(otherUsername);\n }", "ResponseMessage addUser(User user);", "@Override\r\n\t\t\tpublic void Message(TranObject msg) {\n\t\t\t\tif(msg.getObjStr()!=null){\r\n\t\t\t\t\tString objStr=msg.getObjStr();\r\n\t\t\t\t\tUser addUser=gson.fromJson(objStr,new TypeToken<User>(){}.getType());\r\n\t\t\t\t\tboolean hasUser=false;\r\n\t\t\t\t\tfor(Category cate:user.getCategorys()){\r\n\t\t\t\t\t\tfor(User u:cate.getMembers()){\r\n\t\t\t\t\t\t\tif(u.getId()==addUser.getId()){\r\n\t\t\t\t\t\t\t\thasUser=true;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(hasUser){\r\n\t\t\t\t\t\tDisplay.getDefault().syncExec(new Runnable() {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\tList<User> l=new ArrayList<User>();\r\n\t\t\t\t\t\t\t\ttv.setInput(l);\r\n\t\t\t\t\t\t\t\tMessageDialog.openWarning(Display.getDefault().getActiveShell(), \"wain\", \"you already has this friend\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tDisplay.getDefault().syncExec(new Runnable() {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\tList<User> l=new ArrayList<User>();\r\n\t\t\t\t\t\t\t\tl.add(addUser);\r\n\t\t\t\t\t\t\t\ttv.setInput(l);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tDisplay.getDefault().syncExec(new Runnable() {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\tList<User> l=new ArrayList<User>();\r\n\t\t\t\t\t\t\ttv.setInput(l);\r\n\t\t\t\t\t\t\tMessageDialog.openWarning(Display.getDefault().getActiveShell(), \"wain\", \"Without this user \");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}", "public void addUserBtn(){\n\t\t\n\t\t// TODO: ERROR CHECK\n\t\t\n\t\tUserEntry user = new UserEntry(nameTF.getText(), (String)usertypeCB.getValue(), emailTF.getText());\n\t\tAdminController.userEntryList.add(user);\n\t\t\n\t\t\n\t\t// Create a UserEntry and add it to the observable list\n\t\tAdminController.userList.add(user);\t\t\n\t\t\n\t //AdminController.adminTV.setItems(AdminController.userList);\n\t\t\n\t\t//Close current stage\n\t\tAdminController.addUserStage.close();\n\t\t\n\t}", "public void addUser(User user){\r\n users.add(user);\r\n }", "public void writeUserMessage(String room, String name, String message) {\n ((GroupChatPanel)grouptabs.get(room)).writeUserMessage(name,message);\n }", "public void onConnect(){\n\t\t String jsonstring = \"{'command': 'addUser','name': '\"+name+\"'}\";\n\t\t this.send(jsonstring);\n\t}", "private void registerUserOnServer() throws IOException {\r\n\t\tdataSending.sendMessage(Server.REGISTER+\" \"+userName, Long.toString(userModel.ID));\r\n\t}", "@Override\n public void onClick(View v) {\n\n String Id = FCMdatabase.push().getKey();\n residentUser user = new residentUser(Id.toString(), txtusername.getText().toString(), txtpassword.getText().toString(), \"\");\n FCMdatabase.child(Id).setValue(user);\n Toast.makeText(getContext(), \"user added successfully\", Toast.LENGTH_SHORT).show();\n }", "public void newUserAdded(String userID);", "private void createMemberInvitation(User user, Chatroom chatroom) {\n\t\tList<Chatroom> chatrooms = user.getChatroomInvites();\n\t\tList<User> users = chatroom.getMemberInvitees();\n\t\t// create the relation\n\t\tchatrooms.add(chatroom);\n\t\tusers.add(user);\n\t\t// save the chatroom, and its relations\n\t\tchatroomRepository.save(chatroom);\n\t}", "private void individualSend(UserLogic t) {\n if(t != UserLogic.this && t != null && ((String)UI.getContacts().getSelectedValue()).equals(t.username)){\r\n if(((String)t.UI.getContacts().getSelectedValue()).equals(username)) { //If both users are directly communicating\r\n t.UI.getProperList().addElement(username + \"> \" + UI.getMessage().getText()); //Send message\r\n t.UI.getContacts().setCellRenderer(clearNotification); //Remove notification\r\n }\r\n else{ //If the user are not directly communicating\r\n t.UI.getContacts().setCellRenderer(setNotification); //Set notification\r\n }\r\n if(t.chats.containsKey(username)){ //Store chats in other users database (When database exists)\r\n ArrayList<String> arrayList = t.chats.get(username); //Get data\r\n arrayList.add(username + \"> \" + UI.getMessage().getText()); //Add new message to the database\r\n t.chats.put(username, arrayList); //Store data\r\n }\r\n else { //When database doesn't exist\r\n ArrayList<String> arrayList = new ArrayList<>(); //create new database\r\n arrayList.add(username + \"> \" + UI.getMessage().getText()); //Add new message to the database\r\n t.chats.put(username, arrayList); //Store data\r\n }\r\n }\r\n //This writes on my screen\r\n if(t == UserLogic.this && t!=null){ //On the current user side\r\n UI.getProperList().addElement(\"Me> \" + UI.getMessage().getText()); //Write message to screen\r\n String currentChat = (String) UI.getContacts().getSelectedValue(); //Get selected user\r\n if(chats.containsKey(currentChat)){ //check if database exists\r\n ArrayList<String> arrayList = chats.get(currentChat);\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(currentChat, arrayList);\r\n }\r\n else { //When database doesn't exist\r\n ArrayList<String> arrayList = new ArrayList<>();\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(currentChat, arrayList);\r\n }\r\n }\r\n }", "public void newUser(User user) {\n users.add(user);\n }", "private synchronized void addMessage(String user, String message) {\n\t\tchatData.addElement(new ChatMessage(user, message));\n\t\tif (chatData.size() > 20)\n\t\t\tchatData.removeElementAt(0);\n\t}", "@Override\n public void add(ChatMessage object) {\n chatMessageList.add(object);\n super.add(object);\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n dbHelper.addNewUser( user );\n\n // Get new FirebaseUser\n dbHelper.fetchCurrentUser();\n\n // Add the new user to a new chat containing only the new user\n String chatID = dbHelper.getNewChildKey( dbHelper.getChatUserPath() );\n String userID = dbHelper.getAuth().getUid();\n String displayName = dbHelper.getAuthUserDisplayName();\n\n dbHelper.addToChatUser( chatID, userID, displayName );\n dbHelper.addToUserChat( userID, chatID );\n\n String messageOneID = dbHelper.getNewChildKey(dbHelper.getMessagePath());\n String timestampOne = dbHelper.getNewTimestamp();\n String messageOne = \"COUCH POTATOES:\\nWelcome to Couch Potatoes!\"\n + \"\\nEnjoy meeting new people with similar interests!\";\n\n dbHelper.addToMessage( messageOneID, userID, \"COUCH POTATOES\", chatID, timestampOne, messageOne );\n\n String messageTwoID = dbHelper.getNewChildKey(dbHelper.getMessagePath());\n String timestampTwo = dbHelper.getNewTimestamp();\n String messageTwo = \"COUCH POTATOES:\\nThis chat is your space. Feel free to experiment with the chat here.\";\n\n dbHelper.addToMessage( messageTwoID, userID, \"COUCH POTATOES\", chatID, timestampTwo, messageTwo );\n\n // Registration complete. Redirect the new user the the main activity.\n startActivity( new Intent( getApplicationContext(), MainActivity.class ) );\n finish();\n }", "void addRealmToUser(final String username, final String realm);", "public void addActiveUser(Socket socket) {\r\n\t\tif (!activeClients.contains(socket))\r\n\t\t\tactiveClients.add(socket);\r\n\t}", "public void acceptUser(long id, List<String> args) {\n\tif (!roomMembers.contains(id))\n\t roomMembers.add(id);\n }", "public void writeIdChatAtSpecificUserInDatabase(@NonNull ChatMessage chat) {\n mDatabaseReference.child(\"users\").child(chat.getSender()).child(\"chats\").\n child(chat.getIdChat()).setValue(chat.getReceiver());\n mDatabaseReference.child(\"users\").child(chat.getReceiver()).child(\"chats\").\n child(chat.getIdChat()).setValue(chat.getSender());\n }", "void addUser(String page, String userId, String uid);", "@Override\n\tpublic void addClient(Client c, String msg) throws RemoteException {\n\t\tif(!users.contains(c)){\n\t\t\tusers.add(c);\n\t\t\tfor(int i=0;i<users.size();i++) {\t \n\t //sendMessage((Client)users.get(i),msg);\n\t\t\t\tSystem.out.println(users.get(i).getName());\n\t }\n\t //users.add(c);\n\t }\n\t}", "public void addParticipant(String uid) {\n\r\n if (!participants.contains(uid))\r\n participants.add(uid);\r\n }", "public void addUser(User user) {\n\t\tSystem.out.println(\"adding user :\"+user.toString());\n\t\tuserList.add(user);\n\t}", "public void addUser(String u, String p) {\n \t//users.put(\"admin\",\"12345\");\n users.put(u, p);\n }", "private void createAdminInvitation(User user, Chatroom chatroom) {\n\t\tList<Chatroom> chatrooms = user.getChatroomAdminInvites();\n\t\tList<User> users = chatroom.getAdminInvitees();\n\t\t// create the relation\n\t\tchatrooms.add(chatroom);\n\t\tusers.add(user);\n\t\t// save the chatroom, and its relations\n\t\tchatroomRepository.save(chatroom);\n\t}", "public void createAndAddUser(String fName, String lName){\n ModelPlayer user = new ModelPlayer(fName, lName);\n user.setUserID(this.generateNewId());\n userListCtrl.addUser(user);\n }", "public void register() {\n int index = requestFromList(getUserTypes(), true);\n if (index == -1) {\n guestPresenter.returnToMainMenu();\n return;\n }\n UserManager.UserType type;\n if (index == 0) {\n type = UserManager.UserType.ATTENDEE;\n } else if (index == 1) {\n type = UserManager.UserType.ORGANIZER;\n } else {\n type = UserManager.UserType.SPEAKER;\n }\n String name = requestString(\"name\");\n char[] password = requestString(\"password\").toCharArray();\n boolean vip = false;\n if(type == UserManager.UserType.ATTENDEE) {\n vip = requestBoolean(\"vip\");\n }\n List<Object> list = guestManager.register(type, name, password, vip);\n int id = (int)list.get(0);\n updater.addCredentials((byte[])list.get(1), (byte[])list.get(2));\n updater.addUser(id, type, name, vip);\n guestPresenter.printSuccessRegistration(id);\n }", "void addUserpan(String userid,String username,String userpwd);", "void addUser(String uid, String firstname, String lastname, String pseudo);", "@Override\r\n\tpublic void add(User user) {\n\r\n\t}", "public void addMessage(ChatMessage message) {\n Log.w(TAG, \"addMessage to chat\");\n chatMessages.add(message);\n adapter.notifyDataSetChanged();\n }", "@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tUser myUser = new User(username.getText(), password.getText());\r\n\t\t\t\tmyUsers.add(myUser);\r\n\t\t\t\tSystem.out.println(\"new user added\");\r\n\t\t\t\t\r\n\t\t\t}", "public synchronized void insertUser(String username) {\n \n if(this.capacity < max_capacity) {\n \n /* Genero la coda dei messaggi offline */\n BlockingQueue<Message> messageQueue = new LinkedBlockingQueue<Message>();\n \n /* Inserisco utente e la sua coda nella HashMap */\n usersList.put(username, messageQueue);\n \n /* Nuovo utente servito */\n capacity++;\n \n System.out.println(\"GOSSIP System: \"+username+\" assigned to Proxy \"+\n id+\"@\"+address+\":\"+port+\" [Capacity: \"+max_capacity+\n \"][Available: \"+(max_capacity-capacity)+\"]\");\n }\n }", "public void appendUser(String str) {\n\t\tDefaultListModel<String> listModel = (DefaultListModel<String>) userList.getModel();\n\t\tlistModel.addElement(str);\n\t}", "@PostMapping(value=\"/private\")\n\t\tpublic Long newLobby(@RequestBody User user) {\n\t\t\tlong id = lastId.incrementAndGet();\n\t\t\tLobby lob = new Lobby(user,true);\n\t\t\tlobbies.put(id, lob);\n\t\t\tChat chat = new Chat(user.getUserName()+\" se ha conectado.\",\"SERVER\");\n\t \tlobbies.get(id).addChat(chat);\n\t\t\treturn id;\n\t\t}", "private void createAdminRelation(User user, Chatroom chatroom) {\n\t\tList<Chatroom> chatrooms = user.getAdminOfChatrooms();\n\t\tList<User> users = chatroom.getAdministrators();\n\n\t\tchatrooms.add(chatroom);\n\t\tusers.add(user);\n\t\t// save the chatroom, and its relations\n\t\tchatroomRepository.save(chatroom);\n\t}", "protected void addMember() {\n\t\tString mPhoneNumber = phoneEditView.getText().toString();\n\t\t\n\t\tApiProxy apiProxy = new ApiProxy(this);\n\t\tapiProxy.addMember(mPhoneNumber);\n\t\t\n\t\tgoToFriendListPage();\n\t}", "public static void addUser(String name)\n {\n userList.add(name);\n }", "@Override\r\n public String addMember(String room, String user, String value) {\r\n Objects.requireNonNull(room);\r\n Objects.requireNonNull(user);\r\n Objects.requireNonNull(value);\r\n Map<String, String> roomMembers = this.members.get(room);\r\n if(roomMembers == null) {\r\n roomMembers = new ConcurrentHashMap<>();\r\n this.members.put(room, roomMembers);\r\n }\r\n final String previous = roomMembers.put(user, value);\r\n LOG.debug(\"After adding. Member: {}, value: {}, room: {}, room members: {}\", \r\n user, value, room, roomMembers);\r\n return previous;\r\n }", "@PutMapping(value=\"/chat/{id}/{userName}/{sentence}\")\n\t\tpublic ResponseEntity<Chat> newChat (@PathVariable long id, @PathVariable String userName, @PathVariable String sentence) {\n\t\t\tif(lobbies.get(id)!=null) {\n\t\t\t\tif(lobbies.get(id).getUser1()!=null) {\n\t\t\t\t\tif(lobbies.get(id).getUser1().getUserName().equals(userName)) {\n\t\t\t\t\t\t//Añadir el chat al lobby que se solicita\n\t\t\t\t\t\tChat chat = new Chat(sentence,userName);\n\t\t\t\t\t\tif(lobbies.get(id).getMummy().equals(userName)) {\n\t\t\t\t\t\t\tchat.setCharacter(\"Mummy\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(lobbies.get(id).getPharaoh().equals(userName)) {\n\t\t\t\t\t\t\tchat.setCharacter(\"Pharaoh\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlobbies.get(id).addChat(chat);\n\t\t\t\t\t\n\t\t\t\t\treturn new ResponseEntity<>(chat, HttpStatus.OK);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(lobbies.get(id).getUser2()!=null) {\n\t\t\t\t\tif(lobbies.get(id).getUser2().getUserName().equals(userName)) {\n\t\t\t\t\t\t//Añadir el chat al lobby que se solicita\n\t\t\t\t\t\tChat chat = new Chat(sentence,userName);\n\t\t\t\t\t\tif(lobbies.get(id).getMummy().equals(userName)) {\n\t\t\t\t\t\t\tchat.setCharacter(\"Mummy\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(lobbies.get(id).getPharaoh().equals(userName)) {\n\t\t\t\t\t\t\tchat.setCharacter(\"Pharaoh\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlobbies.get(id).addChat(chat);\n\t\t\t\t\t\n\t\t\t\t\treturn new ResponseEntity<>(chat, HttpStatus.OK);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\t}else {\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\t}\n\t\t}", "private void createMemberRelation(User user, Chatroom chatroom) {\n\t\tList<Chatroom> chatrooms = user.getMemberOfChatrooms();\n\t\tList<User> users = chatroom.getMembers();\n\t\tList<Membership> memberships = user.getMemberships();\n\n\t\t// add the chatroom to user's list of chatrooms he is member of\n\t\tchatrooms.add(chatroom);\n\t\t// add user to chatrooms list of members\n\t\tusers.add(user);\n\t\t// create a membership relation entity for the user\n\t\tMembership membership = new Membership(user, chatroom);\n\t\tmemberships.add(membership);\n\n\t\t// save the chatroom, and its relations\n\t\tchatroomRepository.save(chatroom);\n\t\t// save the user to preserve relations\n\t\tuserRepository.save(user);\n\t}", "private void addToUsers(final int id, String username) {\n UserRequests.AddUserModel addUserModel = new UserRequests.AddUserModel(id, username);\n\n Response.Listener<UserRecord> responseListener = new Response.Listener<UserRecord>() {\n @Override\n public void onResponse(UserRecord response) {\n progressDialog.cancel();\n if (response != null && response.getId() == id) {\n showResults();\n } else {\n Log.d(TAG, \"Error\");\n }\n }\n };\n\n Response.ErrorListener errorListener = new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.cancel();\n if (error != null) {\n String err = (error.getMessage() == null) ? \"error message null\" : error.getMessage();\n Log.d(TAG, err);\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(RegisterActivity.this);\n alertDialog.setTitle(getString(R.string.error_title_signup));\n alertDialog.setMessage(getString(R.string.error_message_network)).setCancelable(false)\n .setPositiveButton(getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n alertDialog.show();\n }\n }\n };\n\n progressDialog.setMessage(getString(R.string.progress_dialog_message_add_user));\n UserRequests addUserRequest = UserRequests.addUser(this,\n addUserModel, responseListener, errorListener);\n if (addUserRequest != null) addUserRequest.setTag(CANCEL_TAG);\n VolleyRequest.getInstance(this.getApplicationContext()).addToRequestQueue(addUserRequest);\n }", "public AddToChat(Point point,Controller c,user user) {\n initComponents();\n setLocation(point);\n controller=c;\n client=user;\n contacts=controller.getContactList(user);\n UsersName=new Vector<String>();\n for(int i=0;i<contacts.size();i++){\n UsersName.add(contacts.get(i).getUserName());\n }\n contactsList.setListData(UsersName);\n setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n setSize(278, 382);\n setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n setResizable(false);\n setVisible(true);\n \n }", "private void addUser(){\r\n\t\ttry{\r\n\t\t\tSystem.out.println(\"Adding a new user\");\r\n\r\n\t\t\tfor(int i = 0; i < commandList.size(); i++){//go through command list\r\n\t\t\t\tSystem.out.print(commandList.get(i) + \"\\t\");//print out the command and params\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\r\n\t\t\t//build SQL statement\r\n\t\t\tString sqlCmd = \"INSERT INTO users VALUES ('\" + commandList.get(1) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(2) + \"', '\" + commandList.get(3) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(4) + \"', '\" + commandList.get(5) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(6) + \"');\";\r\n\t\t\tSystem.out.println(\"sending command:\" + sqlCmd);//print SQL command to console\r\n\t\t\tstmt.executeUpdate(sqlCmd);//send command\r\n\r\n\t\t} catch(SQLException se){\r\n\t\t\t//Handle errors for JDBC\r\n\t\t\terror = true;\r\n\t\t\tse.printStackTrace();\r\n\t\t\tout.println(se.getMessage());//return error message\r\n\t\t} catch(Exception e){\r\n\t\t\t//general error case, Class.forName\r\n\t\t\terror = true;\r\n\t\t\te.printStackTrace();\r\n\t\t\tout.println(e.getMessage());\r\n\t\t} \r\n\t\tif(error == false)\r\n\t\t\tout.println(\"true\");//end try\r\n\t}", "public void writeThrough(User user) {\n Entity userEntity = new Entity(\"chat-users\", user.getId().toString());\n userEntity.setProperty(\"uuid\", user.getId().toString());\n userEntity.setProperty(\"username\", user.getName());\n userEntity.setProperty(\"password\", user.getPassword());\n userEntity.setProperty(\"creation_time\", user.getCreationTime().toString());\n userEntity.setProperty(\"blocked\", Boolean.toString(user.isBlocked()));\n datastore.put(userEntity);\n }", "public void add(User user) {\r\n this.UserList.add(user);\r\n }", "@SuppressWarnings({ \"unchecked\", \"unused\" })\n\tprivate void addUser(TextField nameField, TextField passwordField) {\n\t\t\n\t\tString name = nameField.getText();\n\t\tString password = passwordField.getText();\n\t\tname.trim();\n\t\tpassword.trim();\n\t\t\n\t\tif(name.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user name!\");\n\t\t}\n\t\telse if(password.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user password!\");\n\t\t}\n\t\telse if(admin == null) {\n\t\t\tAlertMe alert = new AlertMe(\"You must select an account type!\");\n\t\t}\n\t\telse {\n\t\t\tArrayList<Student> students = JukeBox.getUsers();\n\t\t\t\n\t\t\tif(JukeBox.locateUser(name) != -1) {\n\t\t\t\tAlertMe alert = new AlertMe(\"User \" + name + \" already exists!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tStudent newStudent;\n\t\t\t\tif(admin) {\n\t\t\t\t\tnewStudent = new Student(name, password, true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewStudent = new Student(name, password, false);\n\t\t\t\t}\n\t\t\t\tstudents.add(newStudent);\n\t\t\t\t\n\t\t\t\tnameField.setText(\"\");\n\t\t\t\tpasswordField.setText(\"\");\n\t\t\t\t\n\t\t\t\tusers.setItems(null); \n\t\t\t\tusers.layout(); \n\n\t\t\t\tObservableList<Student> data = FXCollections.observableArrayList(JukeBox.getUsers());\n\t\t\t\tusers.setItems(data);\n\t\t\t}\n\t\t}\n\t}", "public void createChatRoom(String name) throws RemoteException {\n\n\t\ttry {\n\t\t\tIChatServer chatStub;\n\t\t\t// make a new chatroom with supplied name\n\t\t\tIChatroom newRoom = new Chatroom(name);\n\t\t\tview.append(\"Make new ChatRoom: \" + newRoom.getName() + \"\\n\");\n\t\t\t// make a new chatserver stub for user in the newchatroom\n\t\t\tIChatServer newChatServer = new ChatServer(user, newRoom);\n\t\t\tview.append(\"Make new ChatServer: <User:\" + newChatServer.getUser().getName() + \", ChatServer: \"\n\t\t\t\t\t+ newChatServer.getChatroom().getName() + \">\\n\");\n\t\t\t//get a chatstub for new chatserver \n\t\t\tchatStub = (IChatServer) UnicastRemoteObject.exportObject(newChatServer, IChatServer.BOUND_PORT);\n\t\t\tregistry.rebind(IChatServer.BOUND_NAME + newRoom.hashCode(), chatStub);\n\t\t\tview.append(\"Make new ChatServer Stub for chatserver.\\n\");\n\t\t\t//add chatstub to newRoom\n\t\t\tnewRoom.addChatServer(chatStub);\n\t\t\tview.append(\"Add new ChatServer Stub to newRoom.\\n\");\n\t\t\t//add newchatroom to the user chatroom lists\n\t\t\tuser.addRoom(newRoom);\n\t\t\tview.append(\"Add new chatroom <\" + newRoom.getName() + \"> to user <\" + user.getName() + \">\\n\");\n\t\t\t//add all chatservers in that room to hashset\n\t\t\tHashSet<IChatServer> proxy = new HashSet<IChatServer>();\n\t\t\tfor (IChatServer item : newChatServer.getChatroom().getChatServers()) {\n\t\t\t\tIChatServer proxyChatServer = new ProxyIChatServer(item);\n\t\t\t\tproxy.add(proxyChatServer);\n\t\t\t}\n\t\t\tIMain2MiniAdpt miniMVCAdpt = view.makeMini(newChatServer, proxy);\n\t\t\tminiMVCAdpts.put(newRoom, miniMVCAdpt);\n\t\t\tcountRoom++;\n\t\t} catch (Exception e) {\n\t\t\tview.append(\"Error creating chatroom!\");\n\t\t}\n\n\t}", "public void addUserUI() throws IOException {\n System.out.println(\"Add user: id;surname;first name;username;password\");\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n User user = new User(a[1], a[2], a[3], a[4], \" \");\n user.setId(Long.parseLong(a[0]));\n try\n {\n User newUser = service.addUser(user);\n if(newUser != null)\n System.out.println(\"ID already exists for \" + user.toString());\n else\n System.out.println(\"User added successfully!\");\n }\n catch (ValidationException ex)\n {\n System.out.println(ex.getMessage());\n }\n catch (IllegalArgumentException ex)\n {\n System.out.println(ex.getMessage());\n }\n }", "private void addUser() {\n\t\t//check for the user limit, and if it is reached, return an error.\n\t\tif(!(users[users.length-1].equals(\"\"))) {\n\t\t\terror(USER_LIMIT_REACHED);\n\t\t\tProgramGUI.this.dispose();\n\t\t}\n\t\telse {\n\t\t\tProgramGUI.this.dispose();\n\t\t\tindex = nextUserIndex();\n\t\t\tframe = new JFrame(\"Adding user #\" + (index+1));\n\t\t\tframe.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\t\tframe.setLocationRelativeTo(null);\n\t\t\tframe.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\tJPanel panel = new JPanel();\n\t\t\tpanel.setLayout(new GridLayout(2, 2));\n\t\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));\n\t\t\tpanel.add(new JLabel(\"Enter Username: \"));\n\t\t\tuser = new JTextField();\n\t\t\tpanel.add(user);\n\t\t\tpanel.add(new JLabel(\"Enter Password: \"));\n\t\t\tpass = new JPasswordField();\n\t\t\tpanel.add(pass);\n\t\t\tframe.add(panel, BorderLayout.NORTH);\n\t\t\tJPanel button = new JPanel();\n\t\t\tJButton ok = new JButton(\"Confirm User\");\n\t\t\tok.addActionListener(new AddListener());\n\t\t\tJButton cancel = new JButton(\"Cancel\");\n\t\t\tcancel.addActionListener(new ButtonListener());\n\t\t\tbutton.add(ok);\n\t\t\tbutton.add(cancel);\n\t\t\tframe.add(button, BorderLayout.SOUTH);\n\t\t\tframe.setVisible(true);\n\t\t}\n\t}", "void addUser(User user, AsyncCallback<User> callback);", "@Override\n\tpublic void onUserJoinedRoom(RoomData arg0, String arg1) {\n\t\t\n\t}", "@Override\n\tpublic void afterConnectionEstablished(WebSocketSession session) throws Exception {\n\t\tusers.add(session);\n\t\t//\n\t}", "public void addLocal(String user, String email, String role){\n //Add user to signed in\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"Username\", user);\n editor.putString(\"Email\", email);\n editor.putString(\"Role\", role);\n editor.apply();\n\n //Send to appropriate page\n if(role.equals(\"Child\")) {\n Intent intent = new Intent(this, childView.class);\n startActivity(intent);\n }else if(role.equals(\"Parent\")){\n Intent intent = new Intent(this, parentView.class);\n startActivity(intent);\n }\n }", "public void addUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk addUser\");\r\n\t}", "public void addMessage(String username, String message) {\n messagesArea.append(\"\\n\" + \"[\" + username + \"] \" + message);\n messagesArea.setCaretPosition(messagesArea.getDocument().getLength());\n }", "User addUser(IDAOSession session, String fullName, String userName,\n\t\t\tString password);", "void addRealmToUserAccount(final String userId, final String realm);", "public String add() {\r\n\t\tuserAdd = new User();\r\n\t\treturn \"add\";\r\n\t}", "void addUser(User user) {\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_utilizador, user.getUser()); // Contact Name\n values.put(KEY_pass, user.getPass()); // Contact Phone\n values.put(KEY_Escola, user.getEscola());\n db.insert(tabela, null, values);\n db.close(); // Closing database connection\n }", "Room updateOrAddRoom(String username, Room room);", "@Override\r\n\tpublic void onAddUser(BmobInvitation message) {\n\t\trefreshInvite(message);\r\n\t}", "@Override\n public void onClick(View view) {\n ChatMessage Message = new\n ChatMessage(mMessageEditText.getText().toString(),\n mUsername,\n null, dateAndTime);\n mFirebaseDatabaseReference.child(chatRoomPath)\n .push().setValue(Message);\n mMessageEditText.setText(\"\");\n\n }", "public void addMessage(String text) {\n\t\tchatMessages.add(text);\n\t\tlstChatMessages.setItems(getChatMessages());\n\t\tlstChatMessages.scrollTo(text);\n\t}", "private void addFriend() {\n \tif (!friend.getText().equals(\"\")) {\n\t\t\tif (currentProfile != null) {\n\t\t\t\tif (!database.containsProfile(friend.getText())) {\n\t\t\t\t\tcanvas.showMessage(friend.getText() + \" profile does not exists\");\n\t\t\t\t} else if (isfriendsBefore()) {\n\t\t\t\t\tcanvas.showMessage(friend.getText() + \" is already a friend\");\n\t\t\t\t} else {\n\t\t\t\t\tmakeTheTwoFriends();\n\t\t\t\t\tcanvas.displayProfile(currentProfile);\n\t\t\t\t\tcanvas.showMessage(friend.getText() + \" added as friend\");\n\t\t\t\t}\n\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcanvas.showMessage(\"Select a profile to add friends\");\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tUser myUser = new User();\r\n\t\t\t\tmyUsers.add(myUser);\r\n\t\t\t\tSystem.out.println(\"guest added\");\r\n\t\t\t\t\r\n\t\t\t}", "public void addUser(String name)\r\n\t{\r\n\t\tperson= new User(name);\r\n\t\tusers.put(name, person);\r\n\t}", "private void groupChatSend(UserLogic t) {\n if(((String) UI.getContacts().getSelectedValue()).equals( groupChat)){\r\n if (t != UserLogic.this && t != null) { //Sending to other users chat\r\n if(((String)t.UI.getContacts().getSelectedValue()).equals(groupChat)) {\r\n t.UI.getProperList().addElement(username + \"> \" + UI.getMessage().getText());\r\n t.UI.getContacts().setCellRenderer(clearNotification);\r\n }\r\n else{\r\n t.UI.getContacts().setCellRenderer(setNotification);\r\n }\r\n if(t.chats.containsKey(groupChat)){\r\n ArrayList<String> arrayList = t.chats.get(groupChat);\r\n arrayList.add(username + \"> \" + UI.getMessage().getText());\r\n t.chats.put(groupChat, arrayList);\r\n }\r\n else {\r\n ArrayList<String> arrayList = new ArrayList<>();\r\n arrayList.add(username + \"> \" + UI.getMessage().getText());\r\n t.chats.put(groupChat, arrayList);\r\n }\r\n }\r\n\r\n if(t == UserLogic.this && t!=null){ //Send to my screen\r\n UI.getProperList().addElement(\"Me> \" + UI.getMessage().getText());\r\n if(chats.containsKey(groupChat)){ //Database group chat exists\r\n ArrayList<String> arrayList = chats.get(groupChat);\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(groupChat, arrayList);\r\n }\r\n else {\r\n ArrayList<String> arrayList = new ArrayList<>();\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(groupChat, arrayList);\r\n }\r\n }\r\n }\r\n }", "public void PlayerJoinsGame(String user)\n\t\t{\n\t\t\tplayer_queue.add(user);\n\t\t}", "private void sendMessage(final String send, final String receive, String message){\n\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference();\n final String[] sendName = {\"\"};\n final String[] receiveName = {\"\"};\n\n HashMap<String,Object> hashMap = new HashMap<>();\n\n DatabaseReference userRef = FirebaseDatabase.getInstance().getReference(\"Users\");\n userRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for(DataSnapshot ds : dataSnapshot.getChildren()) {\n String uid = ds.getKey();\n if(uid.equals(send)) sendName[0] = ds.getValue(User.class).getName();\n else if(uid.equals(receive)) receiveName[0] = ds.getValue(User.class).getName();\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n\n Chat message1 = new Chat(send, sendName[0], receive, receiveName[0], message);\n\n ref.child(\"chats\").push().setValue(message1);\n }", "public void requestChat(String otherUsername) {\n System.out.println(\"Requesting chat with \" + otherUsername);\n toServer.println(\"newchat\" + \" \" + username + \" \" + otherUsername);\n toServer.flush();\n }", "public void addUser(User user) {\n\t\tuserList.addUser(user);\n\t}", "void addUserToGroup(final String userId, final String groupId);", "public void onAddParticipant() {\n ParticipantDialog participantDialog = ParticipantDialog.getNewInstance();\n Optional<Participant> result = participantDialog.showAndWait();\n if (!result.isPresent()) {\n return;\n }\n\n if (controller.addParticipant(result.get())) {\n return;\n }\n\n AlertHelper.showError(LanguageKey.ERROR_PARTICIPANT_ADD, null);\n }", "void addRoleToUser(int userID,int roleID);", "private void addPrivilegedUser(ActionEvent actionEvent) {\n if (addUserMenu.getSelectionModel().getSelectedItem() != null) {\n for (User user : server.getUser()) {\n if (user.getName().equals(addUserMenu.getSelectionModel().getSelectedItem())) {\n selectedAddUser = user;\n }\n }\n // set selected user to channel as privileged\n channel.withPrivilegedUsers(selectedAddUser);\n // update addMenu\n addUserMenu.getItems().clear();\n for (User user : server.getUser()) {\n if (!user.getPrivileged().contains(channel)) {\n addUserMenu.getItems().add(user.getName());\n }\n }\n // update removeMenu\n removeUserMenu.getItems().clear();\n for (User user : server.getUser()) {\n if (user.getPrivileged().contains(channel)) {\n removeUserMenu.getItems().add(user.getName());\n }\n }\n channelPrivilegedUserUpdate();\n }\n }", "public void enter_chat_room(String line) {\n int start = line.indexOf(\" \") +1;\n String chat_name = line.substring(start);\n HashMap new_chat_room = null;\n\n try{\n if(chat_room.containsKey(chat_name)) {\n \n synchronized(chat_room) {\n cur_chat_room.remove(client_ID);\n new_chat_room = (HashMap)chat_room.get(chat_name);\n cur_chat_room = new_chat_room;\n new_chat_room.put(client_ID,client_PW);\n }\n \n clearScreen(client_PW);\n client_PW.println(\"Entered to \" + chat_name);\n readchat(chat_name);\n client_PW.flush();\n } else {\n client_PW.println(\"Invalid chat room\");\n client_PW.flush();\n }\n } catch (Exception e) {\n client_PW.println(e);\n }\n }", "private void userMessageEvent(){\n message = UI.getMessage(); //Get object\r\n message.addKeyListener(new KeyListener() {\r\n @Override\r\n public void keyTyped(KeyEvent e) {}\r\n\r\n @Override\r\n public void keyPressed(KeyEvent e) {\r\n if(e.getKeyCode() == KeyEvent.VK_ENTER){ //Check if enter button is pressed\r\n if(!UI.getMessage().getText().equalsIgnoreCase(\"\")){ //If the message is not empty\r\n for (UserLogic t : threads) { //Go through users\r\n if(((String)UI.getContacts().getSelectedValue()).equals(groupChat)) { //If the chat is a group chat\r\n groupChatSend(t);\r\n }\r\n else { //Current User\r\n individualSend(t);\r\n }\r\n }\r\n UI.getMessage().setText(\"\"); //Clear message\r\n }\r\n }\r\n }\r\n\r\n @Override\r\n public void keyReleased(KeyEvent e) {}\r\n });\r\n }", "void AddUserListener(String uid, final UserResult result);", "@Override\n\tpublic void addUserToTourney(String username, int tourneyId, String status) {\n\t\tString sql = \"insert into users_tournaments (user_id, tourney_id, status) \"\n\t\t\t\t+ \"values ((select user_id from users where username = ?), ?, ?)\";\n\t\t\n\t\tjdbcTemplate.update(sql, username, tourneyId, status);\n\t\t\n\t}" ]
[ "0.7286719", "0.718335", "0.7117518", "0.7096197", "0.6878588", "0.6728528", "0.6666286", "0.6660372", "0.6644097", "0.6580157", "0.65691113", "0.65648746", "0.6563921", "0.6554175", "0.6550262", "0.65356374", "0.65235895", "0.6510532", "0.6510532", "0.65080506", "0.6499142", "0.6455957", "0.6455271", "0.6450787", "0.6438599", "0.6437731", "0.64361805", "0.6417345", "0.641544", "0.6407255", "0.6372913", "0.6369725", "0.63537526", "0.6344182", "0.63377947", "0.6322337", "0.63179606", "0.6314592", "0.6281731", "0.62210953", "0.6205239", "0.62031895", "0.61997706", "0.61974496", "0.61833644", "0.6178122", "0.6172815", "0.61704814", "0.6151509", "0.61491454", "0.6120382", "0.60949844", "0.6094879", "0.60941726", "0.6092273", "0.6091853", "0.6068421", "0.60515577", "0.6044405", "0.6029899", "0.60144174", "0.60135376", "0.60109746", "0.5999621", "0.5997588", "0.59936965", "0.5992419", "0.59903663", "0.59661394", "0.5964731", "0.59518373", "0.5940484", "0.5935953", "0.5930467", "0.5926081", "0.5925091", "0.59232414", "0.5917326", "0.59166634", "0.59083223", "0.5904633", "0.5902192", "0.58991075", "0.5897027", "0.5894692", "0.58914876", "0.58855516", "0.5883394", "0.58722174", "0.587104", "0.5861775", "0.5855232", "0.58536947", "0.58502704", "0.5847304", "0.5843018", "0.5839383", "0.5831957", "0.5830039", "0.58299696" ]
0.72810787
1
Forwards message from one user to the whole group, with appropriate names
public void send(String raw_msg, AbstractVisitor sender) { for(AbstractVisitor user : users) { if(sender != user) { user.receive("From " + sender.getName() + " to " + user.getName() + ": " + raw_msg); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sendGroupMessage(String message){\n\n\t\tObject[] userIDs = chatInstanceMap.keySet().toArray();\n\n\t\tfor(int i = 0; i < userIDs.length; i++ ){\n\n\t\t\tsendMessage((String) userIDs[i], message);\n\t\t}\n\t}", "public void action() {\n for (int i = 0; i < myAgent.friends.size(); ++i) {\n SendRequestToFriend(myAgent.friends.get(i));\n }\n\n // Crée un filtre pour lire d'abord les messages des amis et des leaders des amis\n MessageTemplate temp = MessageTemplate.MatchReceiver(myfriends);\n MessageTemplate temp2 = MessageTemplate.MatchReceiver(friendsLeader);\n MessageTemplate tempFinal = MessageTemplate.or(temp, temp2);\n\n // Réception des messages\n ACLMessage messageFriendly = myAgent.receive(tempFinal);\n // si on n'est pas dans un groupe\n if (messageFriendly != null && !inGroup) {\n \t// s'il reçoit une proposition d'un amis/ leader d'un ami, il accepte, peu importe le poste et s econsidère dans le groupe\n if (messageFriendly.getPerformative() == ACLMessage.PROPOSE) {\n AcceptProposal(messageFriendly, Group.Role.valueOf(messageFriendly.getContent()));\n inGroup = true;\n }\n // s'il reçoit un CONFIRM, il enregistre le leader\n else if (messageFriendly.getPerformative() == ACLMessage.CONFIRM) {\n myLeader = messageFriendly.getSender();\n }\n // s'il reçoit un INFORM, il enregistre l'AID du leader de son ami afin de recevoir ses messages et lui demande son poste préféré\n else if (messageFriendly.getPerformative() == ACLMessage.INFORM) {\n AddFriendsLeaderToList(messageFriendly);\n AnswerByAskingPreferedJob(messageFriendly);\n }\n // sinon, il renvoie une erreur\n else {\n System.out.println( \"Friendly received unexpected message: \" + messageFriendly );\n }\n }\n // si on est dans un groupe\n else if (messageFriendly != null && inGroup) { \n \t// s'il reçoit une requete et qu'il est déjà dans un groupe, il renvoir l'AID de son leader à son ami\n if (messageFriendly.getPerformative() == ACLMessage.REQUEST) {\n SendLeaderAID(messageFriendly);\n }\n // s'il reçoit un DISCONFIRM, il se remet en quete de job\n else if (messageFriendly.getPerformative() == ACLMessage.DISCONFIRM) {\n inGroup = false;\n AnswerByAskingPreferedJob(messageFriendly);\n }\n else {\n \t// sinon, il refuse tout offre\n RefuseOffer(messageFriendly);\n }\n }\n else {\n \t// on check ensuite les messages des inconnus, une fois ceux des amis triés\n ACLMessage messageFromInconnu = myAgent.receive();\n \n // si on n'est pas dans un groupe\n if (messageFromInconnu != null && !inGroup) {\n \n boolean offerPreferedJob = messageFromInconnu.getPerformative() == ACLMessage.PROPOSE && messageFromInconnu.getContent().equals((\"\\\"\" + myAgent.preferedRole.toString() + \"\\\"\"));\n boolean offerNotPreferedJob = messageFromInconnu.getPerformative() == ACLMessage.PROPOSE && messageFromInconnu.getContent() != (\"\\\"\" + myAgent.preferedRole.toString() + \"\\\"\" );\n \n //on accepte l offre s'il s'agit de notre role préféré\n if (offerPreferedJob){\n AcceptProposal(messageFromInconnu, myAgent.preferedRole);\n }\n // on refuse s'il ne s'agit pas de notre offre favorite en redemandant notre job préféré\n else if (offerNotPreferedJob){\n RefuseOffer(messageFromInconnu);\n }\n // si on reçoit une confimation, on se considère dans un groupe et on enregistre notre leader\n else if (messageFromInconnu.getPerformative() == ACLMessage.CONFIRM){\n inGroup = true;\n myLeader = messageFromInconnu.getSender();\n }\n // sinon, il s'agit d'une erreure\n else {\n System.out.println( \"Friendly received unexpected message: \" + messageFromInconnu );\n }\n }\n // si on est dans un groupe\n else if (messageFromInconnu != null && inGroup) {\n \t// si on reçoit une requete, on renvoie à notre leader\n if (messageFromInconnu.getPerformative() == ACLMessage.REQUEST) {\n SendLeaderAID(messageFromInconnu);\n }\n // si on reçoit un DISCONFIRM, on repart en quete de job\n else if (messageFromInconnu.getPerformative() == ACLMessage.DISCONFIRM) {\n inGroup = false;\n AnswerByAskingPreferedJob(messageFromInconnu);\n }\n // sinon on refuse\n else {\n RefuseOffer(messageFromInconnu);\n }\n }\n // si le message est vide, on bloque le flux\n else {\n block();\n }\n }\n }", "@Override\n\tpublic void sendMessageGroup(Client cm, String msg) throws RemoteException {\n\t\tif(!users.contains(cm)) {\n\t\t\tusers.add(cm); \n\t\t\t} \t\t\t\n\t\t//envoyes les message vers tous les utilisateur\n\t\ttry {\n\t\t\tfor (Client c : users) {\n\t\t\n\t\t\t// 回调远程客户端方法\n\t\t\tString user=cm.getName(); \n\t if(user==null || user==\"\") {\n\t \t user = \"anonymous\";\n\t }\t \n\t c.afficherMessage(user + \" : \" + msg);\n\t //c.showDialog(msg);\n\t\t\t}\n\t\t} catch (RemoteException ex) {\n\t\t\tusers.remove(cm);\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t/*\n\t\t for(int i=0;i<users.size();i++)\n\t\t {\n\t\t String user=c.getName(); \n\t\t if(user==null || user==\"\")\n\t\t user = \"anonymous\";\n\t\t ( (Client) users.get(i)).sendMessage(user + \" : \" + msg);\n\t\t }*/\n }", "protected void processNewMessage(String user, CfAction action){\n\t\tif (shouldTakeActionOnMessage(action)){\n\t\t\tsendToAllAgents(user, action);\t\n\t\t}\n\t}", "private void groupChatSend(UserLogic t) {\n if(((String) UI.getContacts().getSelectedValue()).equals( groupChat)){\r\n if (t != UserLogic.this && t != null) { //Sending to other users chat\r\n if(((String)t.UI.getContacts().getSelectedValue()).equals(groupChat)) {\r\n t.UI.getProperList().addElement(username + \"> \" + UI.getMessage().getText());\r\n t.UI.getContacts().setCellRenderer(clearNotification);\r\n }\r\n else{\r\n t.UI.getContacts().setCellRenderer(setNotification);\r\n }\r\n if(t.chats.containsKey(groupChat)){\r\n ArrayList<String> arrayList = t.chats.get(groupChat);\r\n arrayList.add(username + \"> \" + UI.getMessage().getText());\r\n t.chats.put(groupChat, arrayList);\r\n }\r\n else {\r\n ArrayList<String> arrayList = new ArrayList<>();\r\n arrayList.add(username + \"> \" + UI.getMessage().getText());\r\n t.chats.put(groupChat, arrayList);\r\n }\r\n }\r\n\r\n if(t == UserLogic.this && t!=null){ //Send to my screen\r\n UI.getProperList().addElement(\"Me> \" + UI.getMessage().getText());\r\n if(chats.containsKey(groupChat)){ //Database group chat exists\r\n ArrayList<String> arrayList = chats.get(groupChat);\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(groupChat, arrayList);\r\n }\r\n else {\r\n ArrayList<String> arrayList = new ArrayList<>();\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(groupChat, arrayList);\r\n }\r\n }\r\n }\r\n }", "private void handlemsg(String[] tokens) throws IOException {\n String sendto = tokens[1];\n String body = tokens[2];\n boolean istopic = (sendto.charAt(0) == '#'); //if hash then mssg is being sent to group\n List<ServerHelper> helperList = server.getList();\n for (ServerHelper helper : helperList) {\n if (istopic) { //if group mssg\n if (helper.isMember(sendto)) {\n helper.notify(\"msg \"+login + \" in \" + sendto + \":\" + body + \"\\n\");\n\n }\n } else { //if individual msg\n if (sendto.equalsIgnoreCase(helper.login)) {\n helper.notify(\"msg \"+login + \" : \" + body + \"\\n\");\n }\n }\n }\n }", "private void userMessageEvent(){\n message = UI.getMessage(); //Get object\r\n message.addKeyListener(new KeyListener() {\r\n @Override\r\n public void keyTyped(KeyEvent e) {}\r\n\r\n @Override\r\n public void keyPressed(KeyEvent e) {\r\n if(e.getKeyCode() == KeyEvent.VK_ENTER){ //Check if enter button is pressed\r\n if(!UI.getMessage().getText().equalsIgnoreCase(\"\")){ //If the message is not empty\r\n for (UserLogic t : threads) { //Go through users\r\n if(((String)UI.getContacts().getSelectedValue()).equals(groupChat)) { //If the chat is a group chat\r\n groupChatSend(t);\r\n }\r\n else { //Current User\r\n individualSend(t);\r\n }\r\n }\r\n UI.getMessage().setText(\"\"); //Clear message\r\n }\r\n }\r\n }\r\n\r\n @Override\r\n public void keyReleased(KeyEvent e) {}\r\n });\r\n }", "private void forwardMessageToAll(Message m) {\n for (GuestToken tok: guestTokens.values())\n {\n tok.sendMessage(m);\n }\n for (EmployeeToken tok: employeeTokens.values())\n {\n tok.sendMessage(m);\n }\n }", "private void handleMangerKickUserOut() {\n String userName = EventMessageParser.extractUserName(this.message);\n SocketConnection targetConnection = SocketManager.getInstance()\n .getUserConnection(userName);\n targetConnection.send(this.message);\n }", "public void sendMessage(User user, Group group, String message) {\r\n\t\tChatRoom.showMessage(this, group, message);\r\n\t}", "public void doChatMessage(GameServer gameServer, User user, String name, String message) {\n if (message.startsWith(\"/\")) {\n String toSend = \"\";\n if (message.startsWith(\"/help\")) {\n //Todo: do help\n toSend = \"List of all inner chat commands:\\n\" +\n \"/help (Command) --> Gets help for that command\\n\" +\n \"/list [all, online, RankName, lobby, clients, propertys] --> get a list of users that meet the criteria\\n\" +\n \"/ping --> Pong!\";\n }\n if (message.startsWith(\"/list all\")) {\n List<String> toSendList = Authenticate.getUserList();\n //toSend = Authenticate.getUserList();\n for (String string: toSendList) {\n toSend += string + \"\\n\";\n }\n }\n else if (message.startsWith(\"/ping\")) {\n toSend = \"Pong\";\n }\n else if (message.startsWith(\"/list lobby\")) {\n Lobby lobby = user.getCurrentLobby();\n if (lobby != null) {\n List<User> users = lobby.getUsers();\n for (User u: users) {\n toSend += u.chatFormatDisplay() + \"\\n\";\n }\n }\n }\n else if (message.startsWith(\"/list clients\")) {\n if (Authenticate.checkRank(user.getRank(), Rank.Op)) {\n for (ClientWorker w: gameServer.getClients()) {\n toSend += w.toString() + \"\\n\";\n }\n }\n }\n else if (message.startsWith(\"/list propertys\")) {\n if (Authenticate.checkRank(user.getRank(), Rank.Op)) {\n toSend = Settings.listPropertys();\n }\n }\n else if (message.startsWith(\"/changeproperty\")) {\n if (Authenticate.checkRank(user.getRank(), Rank.Op)) {\n String[] split = message.split(\" \");\n Settings.setProperty(split[1], split[2]);\n toSend = \"Changed property: \" + split[1] + \" to \" + split[2] + \".\\n\" + Settings.listPropertys();\n }\n }\n else if (message.startsWith(\"/loadpropertys\")) {\n if (Authenticate.checkRank(user.getRank(), Rank.Op)) {\n Settings.load();\n toSend = \"Loaded propertys.\\n\" + Settings.listPropertys();\n }\n }\n\n else if (message.startsWith(\"/snake\")) {\n if (user.getCurrentLobby() == null) {\n SingleUserChatContext chatContext = new SingleUserChatContext(user, \"Snake-->\" + user.getName(), \"Snake\");\n addNewContext(chatContext);\n SnakeLobby snakeLobby = new SnakeLobby(user, chatContext);\n user.setCurrentLobby(snakeLobby);\n gameServer.lobbys.addNewLobby(snakeLobby);\n snakeLobby.start();\n }\n }\n\n else if (message.startsWith(\"/statesnake\")) {\n if (user.getCurrentLobby() == null) {\n SingleUserChatContext chatContext = new SingleUserChatContext(user, \"Snake-->\" + user.getName(), \"Snake\");\n addNewContext(chatContext);\n StateSnakeLobby snakeLobby = new StateSnakeLobby(user, chatContext);\n user.setCurrentLobby(snakeLobby);\n gameServer.lobbys.addNewLobby(snakeLobby);\n snakeLobby.start();\n }\n }\n\n else if (message.startsWith(\"/leavelobby\")) {\n Lobby lobby = user.getCurrentLobby();\n if (lobby != null) {\n gameServer.lobbys.removeUser(lobby, user);\n toSend = \"Left the lobby\";\n }\n }\n\n// else if (message.startsWith(\"/load\")) {\n// String[] split = message.split(\" \");\n// File file = new File(split[1]);\n// System.out.println(file.exists());\n// if (file.exists()) {\n// try {\n// String in = \"\";\n// BufferedReader reader = new BufferedReader(new FileReader(file));\n// while ((in = reader.readLine()) != null) {toSend += in + \"\\n\";}\n// reader.close();\n// //toSend = in;\n// //Get the chat context, if it exists send the chat message\n// ChatContext chatContext = getContext(name);\n// if (chatContext == null) return;\n// chatContext.sendMessage(toSend);\n// toSend = \"\";\n// }\n// catch (Exception e) {\n// e.printStackTrace();\n// }\n// }\n// }\n\n if (!toSend.isEmpty()) {\n StringWriter stringWriter = new StringWriter();\n new JSONWriter(stringWriter).object()\n .key(\"argument\").value(\"chatmessage\")\n .key(\"name\").value(\"Server-->\" + user.getName())\n .key(\"displayname\").value(\"Server\")\n .key(\"message\").value(toSend)\n .endObject();\n user.clientWorker.sendMessage(stringWriter.toString());\n }\n\n }\n else {\n //Get the chat context, if it exists send the chat message\n ChatContext chatContext = getContext(name);\n if (chatContext == null) return;\n chatContext.sendMessage(user.chatFormatDisplay() + \" \" + message);\n }\n }", "private void sendMessage() {\n\n // Get the right Prefix\n String prefix = null;\n\n if ( !messageGroup.getPrefix().equalsIgnoreCase(\"\") ) {\n prefix = messageGroup.getPrefix();\n } else {\n prefix = Announcer.getInstance().getConfig().getString(\"Settings.Prefix\");\n }\n\n Announcer.getInstance().getCaller().sendAnnouncment( messageGroup, prefix, counter);\n\n counter();\n\n }", "public abstract void groupChatCreatedMessage(Message m);", "public void writeUserMessage(String room, String name, String message) {\n ((GroupChatPanel)grouptabs.get(room)).writeUserMessage(name,message);\n }", "private void receiveMessage() {\n ParseQuery<ParseObject> refreshQuery = ParseQuery.getQuery(\"Group\");\n\n refreshQuery.getInBackground(mGroupId, new GetCallback<ParseObject>() {\n @Override\n public void done(ParseObject parseObject, ParseException e) {\n if (e == null) {\n chatMessageArray = parseObject.getList(\"groupMessageArray\");\n\n messageArrayList.clear();\n messageArrayList.addAll(chatMessageArray);\n chatListAdapter.notifyDataSetChanged();\n chatLV.invalidate();\n } else {\n System.out.println(e.getMessage());\n }\n }\n });\n }", "@Override\n\tpublic void onEnterToChatDetails() {\n\t\tEMGroup group = EMClient.getInstance().groupManager()\n\t\t\t\t.getGroup(toChatUsername);\n\t\tif (group == null) {\n\t\t\tToast.makeText(getActivity(), R.string.gorup_not_found, 0).show();\n\t\t\treturn;\n\t\t}\n\t\tstartActivityForResult(\n\t\t\t\t(new Intent(getActivity(), CircleDetailActivity.class).putExtra(\n\t\t\t\t\t\t\"groupid\", toChatUsername)), REQUEST_CODE_GROUP_DETAIL);\n\t}", "public void sendMessage() {\n\t\tString myPosition=this.agent.getCurrentPosition();\n\t\tif (myPosition!=null){\n\t\t\t\n\t\t\tList<String> wumpusPos = ((CustomAgent)this.myAgent).getStenchs();\n\t\t\t\n\t\t\tif(!wumpusPos.isEmpty()) {\n\t\t\t\tList<String> agents =this.agent.getYellowpage().getOtherAgents(this.agent);\n\t\t\t\t\n\t\t\t\tACLMessage msg=new ACLMessage(ACLMessage.INFORM);\n\t\t\t\tmsg.setSender(this.myAgent.getAID());\n\t\t\t\tmsg.setProtocol(\"WumpusPos\");\n\t\t\t\tmsg.setContent(wumpusPos.get(0)+\",\"+myPosition);\n\t\t\t\t\n\t\t\t\tfor(String a:agents) {\n\t\t\t\t\tif(this.agent.getConversationID(a)>=0) {\n\t\t\t\t\t\tif(a!=null) msg.addReceiver(new AID(a,AID.ISLOCALNAME));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.agent.sendMessage(msg);\n\t\t\t\tthis.lastPos=myPosition;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}", "static synchronized void SendMessage(String message, ClientHandler user, boolean same) throws IOException\r\n {\r\n String mes = message;\r\n if(!same)\r\n mes = user.username + \": \" + mes;\r\n //System.out.println(mes);\r\n\r\n chatLogWriter.write(mes + \"\\n\");\r\n chatLogWriter.flush();\r\n\r\n for (ClientHandler ch : users)\r\n {\r\n if(!ch.equals(user))\r\n ch.WriteCypherMessage(mes);\r\n else if(same)\r\n ch.WriteCypherMessage(message);\r\n }\r\n }", "private void sendMessagetoRespectivePlayer(int num) {\n Message msg1;\n if(flag == \"player1\"){\n prevP1 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p1Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p1Handler.obtainMessage(4);\n }\n else{\n msg1 = p1Handler.obtainMessage(5);\n }\n p1Handler.sendMessage(msg1);\n }\n else{\n prevP2 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p2Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p2Handler.obtainMessage(4);\n }\n else{\n msg1 = p2Handler.obtainMessage(5);\n }\n p2Handler.sendMessage(msg1);\n }\n }", "public void process(Client user, Login msg) throws IOException, Exception {\n\n synchronized (user) {\n String userName = msg.getMessage();\n\n if (!usersConnected.containsKey(userName)) {\n user.setName(userName);\n user.setConnected(true);\n usersConnected.put(userName, user);\n bradcast(new Login(userName));\n } else {\n user.sendMessage(new Logout(Destination.SERVER.name(), userName));\n user.close();\n }\n }\n\n if (user.isConnected()) {\n user.sendMessage(new UserList(Destination.SERVER.name(), user.getName(), Type.USER_LIST, getClientUsersMap()));\n }\n }", "default void onMessageReceived(Group group, Message message, Ordering ordering) {}", "public static void privateMessage(Player fromPlayer, Player toPlayer, String[] message) {\n PlayerDataObject fromPDO = PlayerManager.getPlayerDataObject(fromPlayer);\n PlayerDataObject toPDO = PlayerManager.getPlayerDataObject(toPlayer);\n //target.sendMessage(ChatColor.DARK_GRAY + \"[\" + player.getFriendlyName() + ChatColor.DARK_GRAY + \" > you]: \" + ChatColor.WHITE + String.join(\" \", Arrays.copyOfRange(arg3, 1, arg3.length)).trim());\n //player.sendMessage(ChatColor.DARK_GRAY + \"[You > \" + target.getDisplayName() + ChatColor.DARK_GRAY + \"]: \" + ChatColor.WHITE + String.join(\" \", Arrays.copyOfRange(arg3, 1, arg3.length)).trim());\n ComponentBuilder toComp = new ComponentBuilder(ChatColor.DARK_GRAY + \"[\" + fromPDO.getFriendlyName() + ChatColor.DARK_GRAY + \" > you]\" + ChatColor.WHITE + \":\");\n toComp.event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(\"PM \" + fromPDO.getPlainNick()).create()));\n toComp.event(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, \"/pm \" + fromPDO.getName() + \" \"));\n toComp.append(\" \").reset();\n \n ComponentBuilder fromComp = new ComponentBuilder(ChatColor.DARK_GRAY + \"[You > \" + toPDO.getDisplayName() + ChatColor.DARK_GRAY + \"]\" + ChatColor.WHITE + \":\");\n fromComp.event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(\"PM \" + toPDO.getPlainNick()).create()));\n fromComp.event(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, \"/pm \" + toPDO.getName() + \" \"));\n fromComp.append(\" \").reset();\n \n TextComponent messageComp = new TextComponent();\n for (String part : message) {\n if (part.matches(\"^.*(https?)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|].*$\")) {\n messageComp.addExtra(assembleURLComponent(part));\n messageComp.addExtra(\" \");\n } else {\n messageComp.addExtra(part + \" \");\n }\n }\n \n BaseComponent[] toMSG = toComp\n .append(messageComp)\n .create();\n BaseComponent[] fromMsg = fromComp\n .append(messageComp)\n .create();\n \n toPDO.sendMessageIf(toMSG);\n fromPDO.sendMessageIf(fromMsg);\n }", "public abstract void leftChatMemberMessage(Message m);", "public void sendGroupCommand(CommandMessage command){\n\n\t\tMessageCreator mc = new MessageCreator(command);\n\n\t\tsendGroupMessage(mc.toXML());\n\n\t}", "public void sendNameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDNM\" + lobby.getNameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}", "public void contact(User seller, String form){\n Contact contact = new Contact(this.user, seller);\n Message message = new Message(contact, form);\n //when other user sees message\n message.setMessageRead();\n }", "public void sendToManager(){\n String receiveMessage;\n while((receiveMessage=receiveFrom(messageReader)) != null){\n manager.manage(receiveMessage);\n }\n }", "@Override\r\n\t\t\tpublic void Message(TranObject msg) {\n\t\t\t\tif(msg.getObjStr()!=null){\r\n\t\t\t\t\tString objStr=msg.getObjStr();\r\n\t\t\t\t\tUser addUser=gson.fromJson(objStr,new TypeToken<User>(){}.getType());\r\n\t\t\t\t\tboolean hasUser=false;\r\n\t\t\t\t\tfor(Category cate:user.getCategorys()){\r\n\t\t\t\t\t\tfor(User u:cate.getMembers()){\r\n\t\t\t\t\t\t\tif(u.getId()==addUser.getId()){\r\n\t\t\t\t\t\t\t\thasUser=true;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(hasUser){\r\n\t\t\t\t\t\tDisplay.getDefault().syncExec(new Runnable() {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\tList<User> l=new ArrayList<User>();\r\n\t\t\t\t\t\t\t\ttv.setInput(l);\r\n\t\t\t\t\t\t\t\tMessageDialog.openWarning(Display.getDefault().getActiveShell(), \"wain\", \"you already has this friend\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tDisplay.getDefault().syncExec(new Runnable() {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\tList<User> l=new ArrayList<User>();\r\n\t\t\t\t\t\t\t\tl.add(addUser);\r\n\t\t\t\t\t\t\t\ttv.setInput(l);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tDisplay.getDefault().syncExec(new Runnable() {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\tList<User> l=new ArrayList<User>();\r\n\t\t\t\t\t\t\ttv.setInput(l);\r\n\t\t\t\t\t\t\tMessageDialog.openWarning(Display.getDefault().getActiveShell(), \"wain\", \"Without this user \");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}", "private void forwardRoomMessage(EcologyMessage message) {\n String targetRoomName = null;\n try {\n targetRoomName = (String) message.fetchArgument();\n } catch (ClassCastException | IndexOutOfBoundsException e) {\n //throw new IllegalArgumentException(\"Unrecognized message format.\");\n Log.e(TAG, \"Exception \" + e.getMessage());\n }\n\n Room room = rooms.get(targetRoomName);\n if (room != null) {\n room.onMessage(message);\n }\n }", "@Override\r\n public void onPrivmsg(User user, Channel channel, String message) {\r\n if (channel == null || !channel.getName().equals(\"#it06\")) {\r\n return;\r\n }\r\n for (String s : message.split(\" \")) {\r\n /* check if the message contains a username, if so: change the message */\r\n /* to something in the blacklist */\r\n for (User u : channel.getUsers().keySet()) {\r\n if (s.contains(u.getNickname())) {\r\n s = \"hej\";\r\n }\r\n }\r\n \r\n /* if the message is in the blacklist, go to the next one */\r\n if (blackList.contains(s)) {\r\n continue;\r\n }\r\n \r\n /* do we have this word in our \"vocabulary\" (old), else we check google */\r\n String t;\r\n if (old.containsKey(s)) {\r\n t = old.get(s);\r\n } else {\r\n t = getSuggestion(s);\r\n }\r\n old.put(s, t);\r\n \r\n /* if we have found a suggestion, print it to the channel */\r\n if (t != null) {\r\n channel.sendPrivmsg(t);\r\n }\r\n }\r\n }", "public void join() {\n FacesContext fc = FacesContext.getCurrentInstance();\n try {\n UbikeUser current = (UbikeUser) BaseBean.getSessionAttribute(\"user\");\n ExternalContext exctx = fc.getExternalContext();\n HttpServletRequest request = (HttpServletRequest) exctx.getRequest();\n long groupId = Long.parseLong(request.getParameter(\"groupId\"));\n long userId = current.getId();\n MemberShip m = memberShipService.getMemberShip(userId, groupId);\n\n if (m != null) {\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_ERROR,\n \"You are already member of this group\",\n \"You are already member of this group\"));\n return;\n }\n\n UbikeGroup group = groupService.find(groupId);\n m = new MemberShip(current, group, Role.Member);\n memberShipService.create(m);\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_INFO,\n \"You joined the group \" + group.getName() + \" successfully\",\n \"You joined the group \" + group.getName() + \" successfully\"));\n\n List<MemberShip> members = (List<MemberShip>) BaseBean.getSessionAttribute(\"tmp_members\");\n if (members == null) {\n members = new ArrayList<MemberShip>();\n BaseBean.setSessionAttribute(\"tmp_members\", members);\n }\n members.add(m);\n } catch (Exception exp) {\n logger.log(Level.SEVERE, \"An error occurs while joinning group\", exp);\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_ERROR,\n \"An error occurs while processing your request\",\n \"An error occurs while processing your request\"));\n }\n }", "void addOneToOneSpamMessage(ChatMessage msg);", "@Override\n public void getMessages(Username user, StreamObserver<MessageText> responseObserver) {\n while (isRunning) {\n synchronized (newMessageMutex) {\n try {\n newMessageMutex.wait();\n } catch (Exception e) {\n e.printStackTrace();\n responseObserver.onCompleted();\n }\n Message lastMsg = userManager.getLastMessage();\n\n System.out.println(\"Sending message to everyone: '\" + lastMsg.getText() + \"' for \" + user.getName());\n responseObserver.onNext(MessageText.newBuilder()\n .setSender(lastMsg.getSender())\n .setText(lastMsg.getText()).build());\n }\n }\n }", "public void sendTo(P2PUser dest, Object msg) throws IOException;", "@Override\n\tpublic void onMessageReceive(String clientName, String message) {\n\t\tlog.log(Level.INFO, \"Last Messenger: \" + lastMessName);\n\t\tif (lastMessUser != null && lastMessName != null) {\n\t\t\tlastMessUser.setBackground(Color.lightGray);\n\t\t\tlastMessUser.setOpaque(false);\n\t\t}\n\t\tIterator<User> iter = users.iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tUser u = iter.next();\n\t\t\tif (u.getName().equals(clientName)) {\n\t\t\t\tmessUser = u;\n\t\t\t\tmessName = clientName;\n\t\t\t}\n\t\t}\n\t\tmessUser.setBackground(Color.orange);\n\t\tmessUser.setOpaque(true);\n\n\t\tlog.log(Level.INFO, \"Current Messenger: \" + messName + \", Last Messenger: \" + lastMessName);\n\t\tlastMessUser = messUser;\n\t\tlastMessName = messName;\n\n\t\tlog.log(Level.INFO, String.format(\"%s: %s\", clientName, message));\n\t\tself.addMessage(String.format(\"%s: %s\", clientName, message));\n\t}", "private void individualSend(UserLogic t) {\n if(t != UserLogic.this && t != null && ((String)UI.getContacts().getSelectedValue()).equals(t.username)){\r\n if(((String)t.UI.getContacts().getSelectedValue()).equals(username)) { //If both users are directly communicating\r\n t.UI.getProperList().addElement(username + \"> \" + UI.getMessage().getText()); //Send message\r\n t.UI.getContacts().setCellRenderer(clearNotification); //Remove notification\r\n }\r\n else{ //If the user are not directly communicating\r\n t.UI.getContacts().setCellRenderer(setNotification); //Set notification\r\n }\r\n if(t.chats.containsKey(username)){ //Store chats in other users database (When database exists)\r\n ArrayList<String> arrayList = t.chats.get(username); //Get data\r\n arrayList.add(username + \"> \" + UI.getMessage().getText()); //Add new message to the database\r\n t.chats.put(username, arrayList); //Store data\r\n }\r\n else { //When database doesn't exist\r\n ArrayList<String> arrayList = new ArrayList<>(); //create new database\r\n arrayList.add(username + \"> \" + UI.getMessage().getText()); //Add new message to the database\r\n t.chats.put(username, arrayList); //Store data\r\n }\r\n }\r\n //This writes on my screen\r\n if(t == UserLogic.this && t!=null){ //On the current user side\r\n UI.getProperList().addElement(\"Me> \" + UI.getMessage().getText()); //Write message to screen\r\n String currentChat = (String) UI.getContacts().getSelectedValue(); //Get selected user\r\n if(chats.containsKey(currentChat)){ //check if database exists\r\n ArrayList<String> arrayList = chats.get(currentChat);\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(currentChat, arrayList);\r\n }\r\n else { //When database doesn't exist\r\n ArrayList<String> arrayList = new ArrayList<>();\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(currentChat, arrayList);\r\n }\r\n }\r\n }", "public void actionPerformed(ActionEvent e) {\n try {\r\n if (roomOrUser == 1) {\r\n // send message to a room\r\n sock.executeCommand(new RoomMessageCommand(new LongInteger(name), textArea_1.getText()\r\n .getBytes()));\r\n textArea_2.setText(textArea_2.getText() + textField.getText() + \": \" + textArea_1.getText()\r\n + \"\\n\");\r\n } else if (roomOrUser == 2) {\r\n // send message to a user\r\n sock.executeCommand(new UserMessageCommand(new LongInteger(name), textArea_1.getText()\r\n .getBytes(), true));\r\n textArea_2.setText(textArea_2.getText() + textField.getText() + \": \" + textArea_1.getText()\r\n + \"\\n\");\r\n }\r\n } catch (InvalidCommandException ex) {\r\n JOptionPane.showMessageDialog(null, \"Unable to join or leave room.\", \"alert\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "void forwardToAll(String text, NodeInfo senderInfo)\n {\n for (CommunicationLink node : allNodes.values())\n {\n NodeInfo nodeInfo = node.getInfo();\n if (nodeInfo.hashCode() != senderInfo.hashCode())\n {\n node.sendMessage(new Message(text, nodeInfo, senderInfo, CHAT));\n try\n {\n node.readMessage();\n } catch (IOException e)\n {\n handleNodeDeath(nodeInfo);\n logger.error(\"Node \" + myInfo + \"\\n - Failed to forward message to: \" +\n nodeInfo.getName() + \", they disconnected unexpectedly.\");\n }\n }\n }\n }", "public void sendMessage(Message message)\r\n {\r\n message.setGroup(this);\r\n for(int i = 0; i < getEndpoints().size(); i++)\r\n {\r\n getEndpoints().get(i).sendMessage(message);\r\n }\r\n }", "private void openMemberMessage (int position) {\n // Chuyen sang man hinh message neu khong click vao minh\n UserInfo selectedUserInfo = OnlineManager.getInstance().mTourList.get(tourOrder).getmTourMember().get(position).getUserInfo();\n if (OnlineManager.getInstance().userInfo.getUserId() != selectedUserInfo.getUserId()) {\n Intent intent = new Intent(TourTabsActivity.this, MessageActivity.class);\n // Gan so thu tu hoi thoai\n intent.putExtra(\"ConversationOrder\", ConversationManager.findConversationOrderByMemberInfo(selectedUserInfo));\n // Chuyen activity\n TourTabsActivity.this.startActivity(intent);\n }\n }", "public void wisper(String userSend, String userRec, String message) {\n\t\tint val = 0;\n\n\t\t// Check if user exists\n\t\tfor (HandleClient c : clients) {\n\t\t\tif (c.getUserName().equals(userRec)) {\n\t\t\t\tval = 1;\n\t\t\t}\n\t\t}\n\n\t\tif (userSend.compareTo(userRec) == 0) {\n\t\t\tval = 2;\n\t\t}\n\n\t\t// User Does exist\n\t\tif (val == 0) {\n\t\t\tfor (HandleClient c : clients) {\n\t\t\t\tif (c.getUserName().equals(userSend)) {\n\t\t\t\t\tc.sendMessage(3, userSend, userRec);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// User sends private message to himself\n\t\telse if (val == 2) {\n\t\t\tfor (HandleClient c : clients) {\n\t\t\t\tif (c.getUserName().equals(userRec)) {\n\t\t\t\t\tc.sendMessage(5, userSend, message);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// User Does not exist\n\t\telse {\n\t\t\tfor (HandleClient c : clients) {\n\t\t\t\tif (c.getUserName().equals(userRec)) {\n\t\t\t\t\tc.sendMessage(2, userSend, message);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void sendGameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDGM\" + lobby.getGameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}", "public abstract void newChatMembersMessage(Message m);", "public void sendMessageToGroup(String messagePath, List<Player> receivers, Map<String,String> replacings, boolean singular)\n {\n String message = composeMessage(messagePath, replacings, singular);\n\n for (Player player : receivers) {\n sendRaw(message, player);\n }\n }", "void onPrivMsg(TwitchUser sender, TwitchMessage message);", "public void tellEveryone(String message) \r\n\t{\r\n\t\tIterator it = Output_Streams_Client.iterator();\r\n\t\twhile (it.hasNext()) \r\n\t\t{\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tPrintWriter writer = (PrintWriter) it.next();\r\n\t\t\t\twriter.println(message);\r\n\t\t\t\tChat.append(\"Sending : \" + message + \"\\n\");\r\n\t\t\t\twriter.flush();\r\n\t\t\t\tChat.setCaretPosition(Chat.getDocument().getLength());\r\n\r\n\t\t\t} \r\n\t\t\tcatch (Exception ex) \r\n\t\t\t{\r\n\t\t\t\tChat.append(\"Mistake to tell everyone \\n\");\r\n\t\t\t}\r\n\t\t} \r\n\t}", "private final void getUsersOfChoosenGroup()\n {\n final LinkedList<User> members= MyApplication.currentGroup.getMembers();\n\n // Get RecipientID's of members\n ParseQuery<ParseUser> query = ParseUser.getQuery();\n query.whereNotEqualTo(\"objectId\", currentUserId);\n query.findInBackground(new FindCallback<ParseUser>() {\n public void done(List<ParseUser> userList, com.parse.ParseException e) {\n if (e == null) {\n for (int i = 0; i < userList.size(); i++) {\n for(int j=0; j < members.size();j++)\n {\n if ( userList.get(i).getUsername().equals(members.get(j).getUsername()))\n {\n recipientsIds.add(userList.get(i).getObjectId());\n Log.v(\"recipientId\",userList.get(i).getObjectId());\n break;\n }\n\n }\n\n }\n }\n populateMessageHistory();\n }\n });\n }", "public void sendMessageToGroup(String messagePath, List<Player> receivers, Map<String,String> replacings)\n {\n sendMessageToGroup(messagePath, receivers, replacings, false);\n }", "void addIncomingGroupChatMessage(String chatId, ChatMessage msg, boolean imdnDisplayedRequested);", "public void sendMessage(String content, String toUser) throws IOException, BadLocationException{\r\n\t\tdataSending.sendMessage(content, toUser);\r\n\t\tuserModel.getArchive().getArchiveWriter().addNewTalk(toUser,\"Messeage sent to user\" +toUser + System.lineSeparator() + content);\r\n\t\tclientView.addNewMesseage(content, \"sent to user: \"+toUser);\r\n\t\t\r\n\t}", "private static void performMessageExchange(List<Integer> users, int dosIDForHour){\n // For all pairs of users, send messages from one queue to the other with queue constraints in mind.\n MobyUser mobyUser1, mobyUser2;\n Collections.sort(users);\n for (int u1 : users) {\n mobyUser1 = mobyUserHashMap.get(u1);\n mobyUser1.performDosExchangeForHour(dosIDForHour, dosNumber);\n for (int u2 : users) {\n mobyUser2 = mobyUserHashMap.get(u2);\n mobyUser1.performMessageExchangeTailDrop(mobyUser2, dosNumber, dosIDForHour);\n }\n }\n\n }", "@Override\n public void messageArrived(IChatMessage msg) {\n try { \n if (msg.getText().matches(\"JOIN .*\")) {\n //Obtenir el canal on s'ha unit.\n IChatChannel channel = server.getChannel(conf.getChannelName()); \n //Crear el missatge per a donar la benvinguda al usuari\n IChatMessage message = new ChatMessage(user, channel,\n \"Benvingut, \" + msg.getText().substring(ChatChannel.JOIN.length() + 1));\n //Enviar el missatge\n channel.sendMessage(message);\n }\n } catch (RemoteException e) {\n \n }\n }", "@Override\n public void notifyUsers(String authorName, String messageContent) {\n if (!messageContent.equals(IChat.SEND_MESSAGE_COMMAND)) {\n Message message = new Message(authorName, messageContent);\n this.chatMessages.add(message);\n for (Socket socket : getChatUsers()) {\n try {\n PrintWriter messageOut = new PrintWriter(socket.getOutputStream(), true);\n messageOut.println(message.toString());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "public\tvoid\tuserJoined(UIRosterEntry user)\n\t{\n\t\t\n\t\tNewChatPanel panel = this.getDiscussionPanel();\n\t\n\t\tString joinedUserName = user.getDisplayName();\n\t\tString joinedUserId = user.getUserId();\n\t\t\n\t\tString senderId = this.rosterModel.getCurrentActivePresenter().getUserId();\n\t\tString senderName = this.rosterModel.getCurrentActivePresenter().getDisplayName();\n\t\t\n\t\t//Window.alert(\"senderId = \"+senderId+\":senderName:\"+senderName);\n\t\t//Window.alert(\"User Joined:joinedUserName :\"+joinedUserName+\":joinedUser Status:\"+user.getJoinedStatus());\n\t\t//Window.alert(\"lastUserJoined = \"+lastUserJoined);\n\t\tif((joinedUserId != senderId ) && (joinedUserId != lastUserJoined ) && (senderName != \"Not Available\") && (joinedUserId != me.getUserId()) && (!user.getJoinedStatus()))\n\t\t{\n\t\t//\tpanel.receiveChatMessage(\"\", sender,joinedUser + \" has joined the conference\");\n\t \t String s = ConferenceGlobals.getDisplayString(\"user_joined_message\",\"has joined the dimdim web meeting.\");\n\t \t //Window.alert(\"adding \"+s);\n\t\t\tpanel.receiveWelcomeMessage(joinedUserName + \" \"+s);\n\t\t\tlastUserJoined = joinedUserId;\n\t\t}\n\t\telse if((joinedUserId == senderId) && lastUserJoined == null && (joinedUserId != lastUserJoined))\n\t\t{\n\t \t String s = ConferenceGlobals.getDisplayString(\"user_welcome_message\",\"Welcome to the Dimdim Web Meeting.\");\n\t \t //Window.alert(\"adding welcom message...\");\n\t\t\tpanel.receiveWelcomeMessage(s);\n\t\t\tlastUserJoined = joinedUserId;\n\t\t}\n\t}", "@Override\n\tpublic void sendMessage(Message message) {\n\t\tterminal.println(\"Sending Message to: \" + message.getUserTo());\n\t\tDatagramPacket packet = null;\n\t\tString routerDestination = table.getRouterToSendTo(message.getUserTo());\n\t\tRouter routerToSendTo = null;\n\t\tfor(Router routerToSend: listOfRouters) {\n\t\t\tif(routerToSend.getName().equals(routerDestination)) {\n\t\t\t\trouterToSendTo = routerToSend;\n\t\t\t}\n\t\t}\n\n\t\tif(routerToSendTo == null) {\n\t\t\tterminal.println(\"User not found on network.\");\n\t\t}\telse {\n\t\t\t/*\n\t\t\t * need to change the message to include the router that needs to receive the message as well!!!!!!!!!!!!!!\n\t\t\t */\n\t\t\tInetSocketAddress dstAddress = new InetSocketAddress(DEFAULT_DST_NODE, routerToSendTo.getPort());\n\t\t\tpacket = message.toDatagramPacket();\n\t\t\tpacket.setSocketAddress(dstAddress);\n\t\t\ttry {\n\t\t\t\tsocket.send(packet);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n Intent gintent = new Intent(\"custom-message\");\n Toast.makeText(context, \"Don't click me\", Toast.LENGTH_SHORT).show();\n gintent.putExtra(\"groupName\",groupTitle);\n LocalBroadcastManager.getInstance(context).sendBroadcast(gintent);\n\n }", "@Override\n\tpublic void enteradoCambioMensaje(EventObject event) {\n\t\tList<MensajeWhatsApp> newMsgs = ((MensajeEvent) event).getNewMensajes();\n\t\tList<MensajeWhatsApp> oldMsgs = ((MensajeEvent) event).getOldMensajes();\n\t\t// Makes no sense to identify the contact as the person's actual name!\n\t\tif (!newMsgs.equals(oldMsgs)) {\n\t\t\tOptional<MensajeWhatsApp> WAmsg = newMsgs.stream()\n\t\t\t\t\t.filter(msg -> !msg.getAutor().equals(currentUser.getName())).findFirst();\n\t\t\tif (WAmsg != null) {\n\t\t\t\tString contactName = WAmsg.get().getAutor();\n\t\t\t\tOptional<Contacto> contact = currentUser.getContacts().stream()\n\t\t\t\t\t\t.filter(c -> c.getName().equals(contactName)).findFirst();\n\t\t\t\tif (contact.isPresent()) {\n\t\t\t\t\tnewMsgs.stream().forEach(msg -> {\n\t\t\t\t\t\tint speakerId = 0;\n\t\t\t\t\t\tif (msg.getAutor().equals(currentUser.getName()))\n\t\t\t\t\t\t\tspeakerId = currentUser.getId();\n\t\t\t\t\t\telse if (msg.getAutor().equals(contactName))\n\t\t\t\t\t\t\tspeakerId = contact.get().getId();\n\t\t\t\t\t\tif (speakerId != 0) {\n\t\t\t\t\t\t\taddMessage(msg.getTexto(), 0, contact.get());\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void sendMessageToGroup(String messagePath, List<Player> receivers)\n {\n sendMessageToGroup(messagePath, receivers, new LinkedHashMap<>());\n }", "@Override\n protected void execute(CommandSender sender, List<String> args) throws InsufficientArgumentException, UserNotFoundException, InsufficientArgumentTypeException, TrackNotFoundException, TrackGroupNotDefinedException, TrackEndReachedException, TrackNoGroupsDefinedException, TrackStartReachedException {\n\n if (args.size() >= 1) {\n\n User user = UserManager.getUser(args.get(0));\n Track track = null;\n\n // If no track is supplied, use the default track\n // Otherwise, match a track to the name provided\n if (args.size() == 1) {\n for (Track t : GroupManager.getTracks()) {\n if (t.isDefaultTrack()) {\n track = t;\n break;\n }\n }\n } else if (args.size() == 2) {\n track = GroupManager.getTrack(args.get(1));\n }\n\n // Ensures the user exists\n if (user != null) {\n\n // Ensures the track exists\n if (track != null) {\n\n // Loops through the player's current groups, looking for the one in the specified track\n // This is the group the player will be moved from\n Group toChange = null;\n for (Group group : user.getGroups()) {\n if (group.isDefault()) continue;\n if (track.getGroups().contains(group)) {\n if (toChange != null) {\n // The user belong to multiple groups in the same track, so demotion cannot happen automatically.\n sender.sendMessage(\"§c§l[MP] §c§n\" + user.getName() + \"§c belongs to multiple groups in §n\" + track.getName() + \"§c.\");\n return;\n }\n toChange = group;\n }\n }\n\n // A group to change has been found\n if (toChange != null) {\n\n // Get the group before this one in the track and remove the current group\n Group previous = track.getPrevious(toChange);\n\n UserMembershipManipulationEvent evt = new UserMembershipManipulationEvent(user, previous, UserMembershipManipulationEvent.GroupAction.ADD);\n Bukkit.getPluginManager().callEvent(evt);\n\n if (evt.isCancelled()) {\n sender.sendMessage(\"§c§l[MP] §cGroup manipulation prevented by 3rd party plugin.\");\n return;\n }\n\n previous = evt.getGroup();\n\n evt = new UserMembershipManipulationEvent(user, toChange, UserMembershipManipulationEvent.GroupAction.REMOVE);\n Bukkit.getPluginManager().callEvent(evt);\n\n if (evt.isCancelled()) {\n sender.sendMessage(\"§c§l[MP] §cGroup manipulation prevented by 3rd party plugin.\");\n return;\n }\n\n toChange = evt.getGroup();\n\n user.getGroups().remove(toChange);\n\n // If the one before it isn't default, add them to it\n if (!previous.isDefault()) {\n user.getGroups().add(previous);\n }\n\n sender.sendMessage(\"§a§l[MP] §a§n\" + user.getName() + \"§a was demoted to §n\" + previous.getName() + \"§a from §n\" + toChange.getName() + \"§a.\");\n\n // Save the user\n final User finalUser = user;\n MelonPerms.doAsync(() -> MelonPerms.getDataStore().saveUser(finalUser));\n\n } else {\n sender.sendMessage(\"§c§l[MP] §c§n\" + user.getName() + \"§c doesn't belong to any groups in §n\" + track.getName() + \"§c.\");\n }\n\n } else {\n if (args.size() == 2) {\n throw new TrackNotFoundException(args.get(1));\n } else {\n sender.sendMessage(\"§c§l[MP]§c You have no default track, please specify one.\");\n }\n }\n\n } else {\n throw new UserNotFoundException(args.get(0));\n }\n\n } else {\n throw new InsufficientArgumentException(1);\n }\n\n }", "public final void rule__Move__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:4566:1: ( ( 'to' ) )\r\n // InternalDroneScript.g:4567:1: ( 'to' )\r\n {\r\n // InternalDroneScript.g:4567:1: ( 'to' )\r\n // InternalDroneScript.g:4568:2: 'to'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getMoveAccess().getToKeyword_1()); \r\n }\r\n match(input,63,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getMoveAccess().getToKeyword_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public abstract void sendPrivateMessage(String nickname, String message);", "protected boolean processPersonalTell(String username, String titles, String message){return false;}", "public void onMessage(A3Message message){\r\n\t\ttry{\r\n\t\tswitch(message.reason){\r\n\r\n\t\tcase Constants.HIERARCHY:\r\n\r\n\t\t\t/* This message is like\r\n\t\t\t * \"senderAddress Constants.HIERARCHY numberOfSubgroups name1 name2 ...\"\r\n\t\t\t * or \"Constants.HIERARCHY numberOfSubgroups\", if the hierarchy is empty.\r\n\t\t\t * \r\n\t\t\t * If I receive this message, I am the channel.\r\n\t\t\t * This message is the supervisor's answer to the hierarchy request I made when I joined the session:\r\n\t\t\t * I set my hierarchy as the one received by the supervisor.\r\n\t\t\t */\r\n\t\t\thierarchy = new ArrayList<String>();\r\n\r\n\t\t\tif(!message.object.equals(\"\")){\r\n\r\n\t\t\t\tString[] splittedHierarchy = message.object.split(Constants.A3_SEPARATOR);\r\n\t\t\t\tnumberOfSplittedGroups = Integer.valueOf(splittedHierarchy[0]);\r\n\t\t\t\t\r\n\t\t\t\tfor(int i = 1; i < splittedHierarchy.length; i++)\r\n\t\t\t\t\thierarchy.add(splittedHierarchy[i]);\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tcase Constants.ADD_TO_HIERARCHY:\r\n\r\n\t\t\t/* This message is like\r\n\t\t\t * \"senderAddress Constants.ADD_TO_HIERARCHY groupName\".\r\n\t\t\t * \r\n\t\t\t * It is sent by the node on which the supervisor resides,\r\n\t\t\t * to notify that my group has another parent group.\r\n\t\t\t * \r\n\t\t\t * I add the new parent group's information to my hierarchy.\r\n\t\t\t */\r\n\t\t\tsynchronized(hierarchy){\r\n\t\t\t\thierarchy.add(message.object);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase Constants.REMOVE_FROM_HIERARCHY:\r\n\r\n\t\t\t/* This message is like\r\n\t\t\t * \"senderAddress Constants.REMOVE_FROM_HIERARCHY groupName\".\r\n\t\t\t * \r\n\t\t\t * It is sent by the node on which the supervisor resides,\r\n\t\t\t * to notify that the group \"groupName\" is no longer parent of my group.\r\n\t\t\t * \r\n\t\t\t * I remove the \"groupName\" group's information from my hierarchy.\r\n\t\t\t */\r\n\t\t\tsynchronized(hierarchy){\r\n\t\t\t\thierarchy.remove(message.object);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t} catch (Exception e) {}\r\n\t}", "@Override\n public void onGroupJoined(final String nickname, String groupCode, String username) {\n ServerAPI.joinGroup(groupCode, username, prefs.getDeviceID(), new RequestHandler<Group>() {\n @Override\n public void callback(Group joined) {\n if (joined == null) {\n Toast.makeText(context, \"Incorrect group code! Please try again.\", Toast.LENGTH_LONG).show();\n return;\n }\n savedGroups.add(new Pair<String, Group>(nickname, joined));\n populateListView();\n saveGroups();//Save list to the SharedPreferences\n }\n });\n }", "public void requestAddUserToChat(String otherUsername){\n System.out.println(\"addtochat\" + \" \" + chatID + \" \" + otherUsername);\n toServer.println(\"addtochat\" + \" \" + chatID + \" \" + otherUsername);\n toServer.flush();\n }", "public void userAction (String action, User user) {\n for (ChatContext chatContext: chatContexts) {\n if (chatContext.isGeneral) chatContext.userAction(action, user);\n }\n }", "private void processMessages(String[] messageParts) {\r\n\r\n\t\tboolean add = true;\r\n\t\tUser fromUser = null;\r\n\r\n\t\tString[] messages = messageParts[2].split(SEPARATOR2);\r\n\r\n\t\t// Check if there is any message\r\n\t\tif(!messages[0].equals(\"\")){\r\n\r\n\t\t\tfor (int i = 0; i < messages.length; i++) {\r\n\t\t\t\t// Separate message USERNAME+MESSAGE\r\n\t\t\t\tString[] aMessage = messages[i].split(SEPARATOR3);\r\n\t\t\t\tadd = true;\r\n\t\t\t\tfor (User user: controller.getModel().getUsers()) {\t\t\t\t\t\r\n\t\t\t\t\tif(user.getUserName().equals(aMessage[0])) {\r\n\t\t\t\t\t\tadd = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\tif (add){\r\n\r\n\t\t\t\t\t// if user doesn't exist already create it\r\n\t\t\t\t\tSystem.out.println(\"ADD USER \"+ aMessage[0]);\r\n\t\t\t\t\tfromUser = new User(aMessage[0]);\r\n\t\t\t\t\tcontroller.getModel().addUser(fromUser);\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\t// If user exist store it in the fromUser variable\r\n\t\t\t\t\tfor (User user: controller.getModel().getUsers()) {\t\t\t\t\t\r\n\t\t\t\t\t\tif(user.getUserName().equals(aMessage[0])) {\r\n\t\t\t\t\t\t\tfromUser = user;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Add message to user \r\n\t\t\t\tfromUser.addMessage(new Message(fromUser.getUserName(),aMessage[1]));\r\n\r\n\t\t\t\t// Print message to users Document\r\n\t\t\t\tfromUser.update();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void onMessageReceived(List<EMMessage> messages) {\n for (EMMessage message : messages) {\n String username = null;\n // group message\n if (message.getChatType() == ChatType.GroupChat || message.getChatType() == ChatType.ChatRoom) {\n username = message.getTo();\n } else {\n // single chat message\n username = message.getFrom();\n }\n // if the message is for current conversation\n if (username.equals(toChatUsername) || message.getTo().equals(toChatUsername) || message.conversationId().equals(toChatUsername)) {\n messageList.refreshSelectLast();\n EaseUI.getInstance().getNotifier().vibrateAndPlayTone(message);\n conversation.markMessageAsRead(message.getMsgId());\n } else {\n EaseUI.getInstance().getNotifier().onNewMsg(message);\n }\n }\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n Intent intent = new Intent(ProfileActivity.this, InviteRoom.class);\n intent.putExtra(\"USERNAME\", userName);\n intent.putExtra(\"MULTI\", \"1\");\n// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP|Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n dialogInterface.dismiss();\n\n }", "public void relay(Message msg) {\n if (roles.containsKey(msg.dst)) {\n roles.get(msg.dst).deliver(msg);\n //System.out.println(msg.print());\n } else {\n if (debug) {\n System.out.print(\"\\nServer: \" + index + \": Dst not found: \" + msg.print());\n }\n }\n }", "@Override\r\n\t\tpublic void buddyGroupAction(ItemAction arg0, BuddyGroup arg1) {\n\t\t\t\r\n\t\t}", "public void sendMessage() {\n String userMessage = textMessage.getText();\n if (!userMessage.isBlank()) {//проверяю а есть ли что то в текстовом поле\n textMessage.clear();//очищаю текстовое поле на форме\n\n //пока оставлю\n //sb.append(userMessage).append(\"\\n\");\n\n //в общее поле добавляю сообщение\n areaMessage.appendText(userMessage+\"\\n\");\n }\n\n }", "private void sendHelloMessage(String uName){\n HelloMessage hello = new HelloMessage(uName);\n ni.performSendHello(hello);\n Logger.log(\"Sending Hello to everyone \");\n\n }", "public void recMsgPassed(String msgLabel, String sender) {\n\t\t\n\t}", "protected void addSecondUserToTestGroup() {\n try {\n IGroupInfo group = AbstractUserManagementFactory.createDefault().\n getGroupInfo(TestKeyProvider.getInstance().getUserID(),\n GROUPNAME);\n IUserInfo user2 = AbstractUserManagementFactory.createDefault().\n getUserInfo(TestKeyProvider.getInstance().getUser2ID());\n group.getMembers().add(user2);\n AbstractUserManagementFactory.createDefault().modifyGroup(\n TestKeyProvider.getInstance().getUserID(), group);\n } catch (UserNotFoundException e) {\n fail(\"Test user does not exist in backend\");\n } catch (PermissionException e) {\n fail(\"Test group is not accessible\");\n }\n }", "private void returnToSender(ClientMessage m) {\n\n if (m.returnToSender) {\n // should never happen!\n // System.out.println(\"**** Returning to sender says EEK\");\n return;\n }\n\n // System.out.println(\"**** Returning to sender says her I go!\");\n m.returnToSender = true;\n forward(m, true);\n }", "public void sendFollowingRequest (String username) {\n communicator.getDB()\n .collection(\"users\")\n .whereEqualTo(\"username\",username)\n .limit(1)\n .get()\n .addOnCompleteListener(task -> {\n if (task.getResult() != null) {\n if (!(task.getResult().isEmpty())){\n for (QueryDocumentSnapshot document : task.getResult()) {\n String UID = document.getId();\n addRequestToMailBox(UID);\n }\n }\n }\n });\n }", "protected boolean processChannelTell(String username, String titles, int channelNumber, String message){return false;}", "public static void notify(String name, String msg) {\n\n\t\tPlayer player = Bukkit.getServer().getPlayerExact(name);\n\n\t\tfor (Player test : Bukkit.getServer().getOnlinePlayers()) {\n\t\t\tif (!test.equals(player)) {\n\t\t\t\tif (test.hasPermission(\"groupmanager.notify.other\"))\n\t\t\t\t\ttest.sendMessage(\"§7[ §aGizemliOyuncu §7] §e\" + ChatColor.YELLOW + name + \" §eAdlı Oyuncunun Yeni Yetki Grubu: §b\" + msg);\n\t\t\t} else if ((player != null) && ((player.hasPermission(\"groupmanager.notify.self\")) || (player.hasPermission(\"groupmanager.notify.other\"))))\n\t\t\t\tplayer.sendMessage(\"§7[ §aGizemliOyuncu §7] §eYetki Grubun: §b\" + msg);\n\t\t}\n\n\t}", "private void autoAcceptGroupChat(Context context,\n Intent invitation) {\n Logger.v(TAG, \"autoAcceptGroupChat entry\");\n ArrayList<ChatMessage> messages = new ArrayList<ChatMessage>();\n ChatMessage msg = invitation\n .getParcelableExtra(FIRST_MESSAGE);\n if (msg != null) {\n messages.add(msg);\n }\n invitation.putParcelableArrayListExtra(MESSAGES, messages);\n ModelImpl.getInstance().handleNewGroupInvitation(invitation,\n false);\n Logger.v(TAG, \"autoAcceptGroupChat exit\");\n }", "@Test\n public void getAllMessages() {\n IUser userOne = new User(\"UserOne\", \"password\");\n IUser userTwo = new User(\"UserTwo\", \"password\");\n\n IMessageContent textMessageOne = new MessageContent(\"Hello my friends\", MessageType.TEXT);\n IMessageContent textMessageTwo = new MessageContent(\"Hi how are you?\", MessageType.TEXT);\n\n IMessage messageOne = new Message(userOne,textMessageOne);\n IMessage messageTwo = new Message(userTwo,textMessageTwo);\n\n //User needs to be a part of channel to send message\n channel.join(userOne);\n channel.join(userTwo);\n\n channel.sendMessage(messageOne);\n channel.sendMessage(messageTwo);\n\n\n //2 sent messages, 2 join message from base user joining.\n assertTrue(channel.getAllMessages().size() == 4);\n\n }", "public void nouveauMessage(String message, Integer groupe) throws RemoteException;", "void onAction(TwitchUser sender, TwitchMessage message);", "private void messageHandler(Message message, ArrayList<Message> from,\t\n\t\t\tArrayList<Message> to) {\n\t\tassert (message != null);\n\t\tassert (from != null);\n\t\tassert (to != null);\n\t\tif (from.size() > 0) {\n\t\t\tMessage responderMessage = from.remove(0);\n\t\t\ttry {\n\t\t\t\tchannel.sendMessage(\n\t\t\t\t\t\tnew Message(Message.Type.Assigned, message.getInfo(),\n\t\t\t\t\t\t\t\tresponderMessage.getClientID()).toString(),\n\t\t\t\t\t\tresponderMessage.getClientID());\n \n\t\t\t\tchannel.sendMessage(new Message(Message.Type.Assigned,\n\t\t\t\t\t\tresponderMessage.getInfo(), message.getClientID())\n\t\t\t\t\t\t.toString(), message.getClientID());\n\t\t\t\tmethods.add(responderMessage.getType().toString()); // adds the type of request to the methods array to store it \n\t\t\t \n\t\t\t\t\n\t\t\t\n\t\t\t} catch (ChannelException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t} else {\n\t\t\tto.add(message);\n\t\t\ttry {\n\t\t\t\tchannel.sendMessage(new Message(Message.Type.Searching, \"\",\n\t\t\t\t\t\tmessage.getClientID()).toString(), message\n\t\t\t\t\t\t.getClientID());\n\t\t\t} catch (ChannelException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t}", "public void doSendMsg() {\n FacesContext fctx = FacesContext.getCurrentInstance();\n HttpSession sess = (HttpSession) fctx.getExternalContext().getSession(false);\n SEHRMessagingListener chatHdl = (SEHRMessagingListener) sess.getAttribute(\"ChatHandler\");\n if (chatHdl.isSession()) {\n //TODO implement chat via sehr.xnet.DOMAIN.chat to all...\n if (room.equalsIgnoreCase(\"public\")) {\n //send public inside zone\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PUBLIC, moduleCtrl.getLocalZoneID(), -1, -1);\n } else {\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PRIVATE_USER, moduleCtrl.getLocalZoneID(), -1, curUserToChat.getUsrid());\n }\n this.text = \"\";\n }\n //return \"pm:vwChatRoom\";\n }", "ReadResponseMessage fetchMessagesFromUserToUser(String fromUser, String toUser);", "public void messageToAll(String s) {\n\t\tfor(ClientThread player: players) {\n\t\t\tplayer.send(new Package(\"MESSAGE\",s));\n\t\t}\n\t\t\n\t}", "void addIncomingOneToOneChatMessage(ChatMessage msg, boolean imdnDisplayedRequested);", "@Override\n\tpublic void visitEntry(User user) {\n\t\t\n\t\tObservableList<String> messages = user.getFeed().getItems();\n\t\tString currentMessage;\n\t\t\n\t\tfor(int i = 0; i < messages.size(); i++) {\n\t\t\t\n\t\t\tcurrentMessage = messages.get(i);\n\t\t\t\n\t\t\t//Only count the messages sent by the user\n\t\t\tif(currentMessage.startsWith(\" - You\")) {\n\t\t\t\t\n\t\t\t\tmessageCount++;\n\t\t\t\t\n\t\t\t\t//Criteria for a positive message\n\t\t\t\tif(currentMessage.contains(\"cool\") || currentMessage.contains(\"awesome\") || currentMessage.contains(\"happy\") || \n\t\t\t\t currentMessage.contains(\"fun\") || currentMessage.contains(\"exciting\"))\n\t\t\t\t{\n\t\t\t\t\tpositiveCount++;\n\t\t\t\t\t\n\t\t\t\t}//end if\n\t\t\t\t\n\t\t\t}//end if\n\t\t\t\n\t\t}//end for\n\t\t\n\t}", "public void listGroup() {\r\n List<Group> groupList = groups;\r\n EventMessage evm = new EventMessage(\r\n EventMessage.EventAction.FIND_MULTIPLE,\r\n EventMessage.EventType.OK,\r\n EventMessage.EventTarget.GROUP,\r\n groupList);\r\n notifyObservers(evm);\r\n }", "@Override\n public void onItemClick(int position) {\n Intent intent = new Intent(getApplicationContext(), GroupChatActivity.class);\n intent.putExtra(\"groupName\", aList.get(position));\n startActivity(intent);\n }", "public void requestChat(String otherUsername) {\n System.out.println(\"Requesting chat with \" + otherUsername);\n toServer.println(\"newchat\" + \" \" + username + \" \" + otherUsername);\n toServer.flush();\n }", "@Override\n\tpublic void onMessageReceived(MessageReceivedEvent e) {\n\t\tMessage objMsg = e.getMessage();\n\t\tMessageChannel objChannel = e.getChannel();\n\t\tUser objUser = e.getAuthor();\n \n\t\t//Responds to any user who says \"hello\"\n\t\tif (objMsg.getContentRaw().equals(\"hello\")) {\n\t\t\tobjChannel.sendMessage(\"Hello, \" + objUser.getAsMention() +\"!\").queue();\n\t\t}\n \n\t}", "@Override\n\tpublic void procesareMesajChat(MesajChat mesaj) {\n\t\tif(mesaj.getDestinatie(). isEmpty() || mesaj.getDestinatie().equals(\"@Everyoane\")) {\n\t\t\tif(this.next!=null)\n\t\t\t\tthis.next.procesareMesajChat(mesaj);\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//procesare mesaj privat\n\t\t\tSystem.out.println(String.format(\"Mesaj privat pentru %s = %s\",\n\t\t\t\t\tmesaj.getDestinatie(), mesaj.getContinut()));\n\t\t}\n\t}", "private void join(String address)\n\t{\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tif (stdGroup.groupExist() == null)\n\t\t\t\t{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tstdGroup.createPeerGroup(WatchDog.PIPEIDSTR);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\tlog.severe(\"I cannot create standard chat group! Bye...\");\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (StdChatException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tstdGroup.join(address);\n\t\t\t} catch (StdChatException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t} catch (PeerGroupException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"I cannot create standard chat group! Bye...\");\n\t\t\tSystem.exit(0);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "public void serverSendMessageToAllUsers(String message) {\r\n \t\tServerCommand serverCommand = new MessageServerCommand(message, \"server\", null);\r\n \r\n \t\tthis.sendCommandToClient(this.clients.getClients(), serverCommand);\r\n \t}", "public void leave() {\n FacesContext fc = FacesContext.getCurrentInstance();\n try {\n UbikeUser current = (UbikeUser) BaseBean.getSessionAttribute(\"user\");\n ExternalContext exctx = fc.getExternalContext();\n HttpServletRequest request = (HttpServletRequest) exctx.getRequest();\n long groupId = Long.parseLong(request.getParameter(\"groupId\"));\n long userId = current.getId();\n MemberShip memberShip = memberShipService.getMemberShip(userId, groupId);\n\n if (memberShip == null) {\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_ERROR,\n \"You are not member of this group yet\",\n \"You are not member of this group yet\"));\n return;\n }\n\n memberShipService.remove(memberShip.getId());\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_INFO,\n \"You leaved the group successfully!\",\n \"You leaved the group successfully!\"));\n\n List<MemberShip> members = (List<MemberShip>) BaseBean.getSessionAttribute(\"tmp_members\");\n members.remove(memberShip);\n\n } catch (Exception exp) {\n logger.log(Level.SEVERE, \"An error occurs while leaving group\", exp);\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_ERROR,\n \"An error occurs while processing your request\",\n \"An error occurs while processing your request\"));\n }\n }", "@Override\r\n\tprotected void okPressed() {\n\t\t\r\n\t\tfor(TableItem item:tv.getTable().getItems()){\r\n\t\t\tUser friend=(User) item.getData();\r\n\t\t\tTranObject<User> msg=new TranObject<User>(TranObjectType.CLIENT_TO_SEVER);\r\n\t\t\tmsg.setFromUser(user.getId());\r\n\t\t\tmsg.setToUser(friend.getId());\r\n\t\t\t//msg.setObject(user);\r\n\t\t\tmsg.setObjStr(gson.toJson(user));\r\n\t\t\tmsg.setRequest(ClientRequest.ADD_FRIEND);\r\n\t\t\tc.getWriteThread().setMsg(msg);\r\n//\t\t\tString category_name=combo.getText();\r\n//\t\t\tCategory new_category=null;\r\n//\t\t\tfor(Category category:user.getCategorys()){\r\n//\t\t\t\tif(category.getKey().equals(category_name)){\r\n//\t\t\t\t\tnew_category=category;\r\n//\t\t\t\t\tbreak;\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t\tif(new_category==null){\r\n//\t\t\t\tnew_category=new Category();\r\n//\t\t\t\tnew_category.setKey(category_name);\r\n//\t\t\t\tuser.getCategorys().add(new_category);\r\n//\t\t\t}\r\n//\t\t\tnew_category.getMembers().add(friend);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tsuper.okPressed();\r\n\t}", "private EntityResponseToUser replyToCampaignMessage(String userId,\n String campaignUid,\n String priorMessageUid,\n CampaignActionType action,\n String userResponse) {\n log.info(\"### Initiating campaign reply sequence message for action type {}, user response {}, campaign ID: {}\", action, userResponse, campaignUid);\n if (action == null) {\n log.error(\"Null action type received, curious, return empty response\");\n return EntityResponseToUser.cannotRespond(JpaEntityType.CAMPAIGN, campaignUid);\n }\n\n // note: this action is what the user selected based on prior menu / prompt, i.e., JOIN_GROUP does not mean ask them if they want to join,\n // but means they have chosen to join, and sequence is roughly as it is usually present to user\n switch (action) {\n case SIGN_PETITION: campaignBroker.signPetition(campaignUid, userId, UserInterfaceType.WHATSAPP); break;\n case JOIN_GROUP: campaignBroker.addUserToCampaignMasterGroup(campaignUid, userId, UserInterfaceType.WHATSAPP); break;\n case TAG_ME: campaignBroker.setUserJoinTopic(campaignUid, userId, userResponse, UserInterfaceType.WHATSAPP); break;\n case SHARE_SEND: campaignBroker.sendShareMessage(campaignUid, userId, userResponse, null, UserInterfaceType.WHATSAPP); break;\n case RECORD_MEDIA: campaignBroker.recordUserSentMedia(campaignUid, userId, UserInterfaceType.WHATSAPP); break;\n default: log.info(\"No action possible for incoming user action {}, just returning message\", action); break;\n }\n\n // so this message must be set as the one for _after_ the user has decided to take the action (NB).\n List<CampaignMessage> nextMsgs = new ArrayList<>();\n // todo : move lower logic into else branch\n if (!NO_RESPONSE_CAMPAIGN_ACTIONS.contains(action)) {\n nextMsgs = campaignBroker.findCampaignMessage(campaignUid, action, null, UserInterfaceType.WHATSAPP);\n if (nextMsgs == null || nextMsgs.isEmpty()) {\n log.info(\"Could not find message from action, tracing from prior, prior uid: {}\", priorMessageUid);\n nextMsgs = Collections.singletonList(campaignBroker.findCampaignMessage(campaignUid, priorMessageUid, action));\n }\n log.info(\"Next campaign messages found: {}\", nextMsgs);\n }\n\n List<String> messageTexts = nextMsgs.stream().map(CampaignMessage::getMessage).collect(Collectors.toList());\n LinkedHashMap<String, String> actionOptions = nextMsgs.stream().filter(CampaignMessage::hasMenuOptions).findFirst()\n .map(this::getMenuFromMessage).orElse(new LinkedHashMap<>());\n messageTexts.addAll(actionOptions.values());\n\n RequestDataType requestDataType = RequestDataType.NONE;\n\n // if we have no menu, then cycle through last questions : note, really need to make this cleaner, and also\n // think of how to make it configurable (probably via next msg logic, but with a default skipping if user already set)\n log.info(\"No menu with options left, so see what can come next\");\n if (actionOptions.isEmpty()) {\n requestDataType = handleEndOfFlowStdRequests(userId, campaignUid, action, messageTexts, actionOptions);\n }\n\n return EntityResponseToUser.builder()\n .entityType(JpaEntityType.CAMPAIGN)\n .entityUid(campaignUid)\n .requestDataType(requestDataType)\n .messages(messageTexts)\n .menu(actionOptions)\n .build();\n }", "@Override\n public void handleMessage(@NonNull Message msg) {\n super.handleMessage(msg);\n// Log.i(TAG, \"handleMessage: hit second handler\");\n if(msg.what == 1){\n StringJoiner sj = new StringJoiner(\", \");\n for(Tornado t : tornados){\n sj.add(t.getName());\n }\n\n// ((TextView) findViewById(R.id.textUsername)).setText(sj.toString());\n recyclerView.getAdapter().notifyDataSetChanged();\n }\n }" ]
[ "0.68593174", "0.6766295", "0.63565254", "0.61903673", "0.6137737", "0.61241525", "0.6106584", "0.60697615", "0.603206", "0.5966176", "0.5934441", "0.58424914", "0.58312243", "0.5812147", "0.57503605", "0.574747", "0.569822", "0.56677055", "0.5655003", "0.56502056", "0.564681", "0.56443334", "0.56366175", "0.5632962", "0.56185824", "0.5589789", "0.55727404", "0.5569468", "0.55674815", "0.55647796", "0.5563455", "0.55559444", "0.5549813", "0.5517209", "0.5513162", "0.5480652", "0.5473017", "0.54707557", "0.5460024", "0.54500884", "0.5442929", "0.5438916", "0.54295", "0.54207397", "0.5407544", "0.5394037", "0.53939074", "0.538914", "0.5388817", "0.5377431", "0.5374523", "0.53684855", "0.53613275", "0.5359516", "0.53583", "0.5354191", "0.5352774", "0.5342976", "0.534021", "0.5329367", "0.53281206", "0.53214014", "0.5306099", "0.52927077", "0.5279591", "0.52732646", "0.52687544", "0.5264798", "0.52633893", "0.5261997", "0.5261892", "0.52595276", "0.52582586", "0.52546686", "0.52485067", "0.52448475", "0.5244181", "0.5241236", "0.5237693", "0.5236787", "0.52367556", "0.5234869", "0.5221917", "0.5214896", "0.5211463", "0.5194879", "0.5175478", "0.51752126", "0.5173494", "0.5172679", "0.5172516", "0.51702034", "0.5162469", "0.5161564", "0.5160464", "0.5154709", "0.51518005", "0.5141361", "0.51399106", "0.51366985" ]
0.6138145
4
Check that the divisor is not 0
@Override protected void checkFurther(final JsonNode schema, final ValidationReport report) throws JsonValidationFailureException { final BigDecimal divisor = schema.get(keyword).getDecimalValue(); if (BigDecimal.ZERO.compareTo(divisor) != 0) return; report.fail("divisor is 0"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tvoid testWhenDenominatorIsZero() {\n\t\ttry {\n\t\t\tcalculator.divide(1, 0);\n\t\t} catch (Exception e) {\n\t\t\tassertNotNull(e);\n\t\t\tassertEquals(ArithmeticException.class,e.getClass());\n\t\t}\n\t\n\t}", "private boolean checkDivisibility(int year, int num) {\n\t\treturn (year%num==0);\n\t}", "public abstract void isDIVRejection(long ms);", "public boolean quotientIsZero(int[] input) {\n\t\tboolean isZero = false;\n\t\tfor(int i = 0; i < input.length; i+=2) {\n\t\t\tint generator = input[i];\n\t\t\tif( (getRelations().get(generator) != null) && (input[i+1] >= getRelations().get(generator)) ) {\n\t\t\t\tisZero = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isZero;\n\t}", "public static boolean isValidPercentage(int input) {\n return input >= 0;\n }", "@Test\n\tpublic void testDivision() {\n\t\tdouble tmpRndVal = 0.0;\n\t\tdouble tmpRndVal2 = 0.0;\n\t\tdouble tmpResult = 0.0;\n\t\t\n\t\t//testing with negative numbers\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\ttmpRndVal = doubleRandomNegativeNumbers();\n\t\t\ttmpRndVal2 = doubleRandomNegativeNumbers();\n\t\t\ttmpResult = tmpRndVal / tmpRndVal2;\n\t\t\t//assertEquals(bc.division(tmpRndVal, tmpRndVal2), tmpResult);\n\t\t\tassertTrue((tmpResult == bc.division(tmpRndVal, tmpRndVal2)));\n\t\t}\n\t\t\n\t\t//testing with positive numbers\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\ttmpRndVal = doubleRandomPositiveNumbers();\n\t\t\ttmpRndVal2 = doubleRandomPositiveNumbers();\n\t\t\ttmpResult = tmpRndVal / tmpRndVal2;\n\t\t\t//assertEquals(bc.division(tmpRndVal, tmpRndVal2), tmpResult);\n\t\t\tassertTrue((tmpResult == bc.division(tmpRndVal, tmpRndVal2)));\n\t\t}\n\t\t\n\t\t//testing with zero\n\t\tdouble zero = 0.0;\n\t\tdouble stdReturn = -0.123456789;\n\t\tint tmpVal = 7;\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tassertTrue( ((bc.division(tmpVal, zero) == zero) \n\t\t\t\t\t|| (bc.division(tmpVal, zero) == stdReturn) \n\t\t\t\t\t|| (bc.division(zero, zero) == zero)\n\t\t\t\t\t|| (bc.division(zero, tmpVal) == zero) ));\n\t\t}\n\t\t\n\t}", "public static int divide_naive(int dividend, int divisor) {\n \tboolean flag = ((new Long(dividend)>0) && (new Long(divisor)>0)) || ((new Long(dividend)<0) && (new Long(divisor)<0)) ? true : false;\n// \tSystem.out.println(\"flag=\"+flag);\n \tlong r = 0;\n \tlong dividend_abs = Math.abs(new Long(dividend));\n// \tSystem.out.println(\"dividend_abs=\"+dividend_abs);\n \tlong divisor_abs = Math.abs(new Long(divisor));\n \twhile(dividend_abs>=divisor_abs) {\n \t\tdividend_abs-=divisor_abs;\n \t\t++r;\n \t}\n// \tSystem.out.println(\"r=\"+r);\n \tif (r>Integer.MAX_VALUE || r<Integer.MIN_VALUE)\n \t\tr = Integer.MAX_VALUE;\n \treturn flag?new Long(r).intValue():-new Long(r).intValue();\n }", "public boolean almostZero(double a);", "@Test(expected = ArithmeticException.class)\n\tpublic void divisionByZeroTest() {\n\t\tMathOperation division = new Division();\n\t\tdivision.operator(TWENTY, ZERO);\n\t}", "public boolean isDivisible(int number, int divisor) \r\n\t{\r\n\t\treturn number % divisor == 0;\r\n\t}", "private boolean isDivisibleBy100(int year) {\n\t\treturn checkDivisibility(year, 100);\n\t}", "@Override\n\tpublic double dividir(double numerador, double denominador) throws ArithmeticException {\n\t\treturn 0;\n\t}", "@Override\n\tpublic double DivideOperation(double dividend, double divisor) {\n\t\treturn 0;\n\t}", "public boolean isPrime()\n\t{\n\t\treturn ! exactDivision;\n\t}", "static void myMethod(){\r\n\t\t\r\n\t\tSystem.out.println(\"enter a divisor : \");\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tint value = sc.nextInt();\r\n\t\tif(value==0){\r\n\t\t\ttry {\r\n\t\t\t\tthrow new DivideByZeroException();\r\n\t\t\t} catch (DivideByZeroException e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\tSystem.out.println(\"Divisor cant be 0.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tSystem.out.println(10/value);\r\n\t\t}\r\n\t}", "@Test\n public void checkDivisibilityByHundred() {\n LeapYear leapYear = new LeapYear();\n boolean flag = leapYear.isItDivisibleByHundred(1600);\n assertTrue(flag);\n }", "@Test\r\n\tpublic void testGetNumGoalsForDivisionError() {\r\n\t\tint numGoalsDivError = -1;\r\n\t\tassertEquals(numGoalsDivError, stats.getNumGoalsForDivision(\"By Zero Division\"));\r\n\t}", "public boolean isDivisibleBy(int x, int y)\n\t{\n\t\tif(x % y == 0){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\t//System.out.println(\"isDivisibleBy NOT IMPLEMENTED\");\n\t\t\treturn false;\n\t\t}\n\n\t}", "public static boolean isDivisibleBy(int number, int factor) {\n\t\tif(factor == 0) {\r\n\t\t\tthrow new IllegalArgumentException(\"cannot divide by 0\");\r\n\t\t}\r\n\t\treturn(number % factor == 0);\r\n\r\n\t}", "@Override\n public boolean test(Long o) {\n Double sqrt = Math.sqrt(o.doubleValue());\n return LongStream.rangeClosed(2, sqrt.intValue()).noneMatch(i -> o % i == 0);\n }", "@Override\n\tpublic int div(int val1, int val2) throws ZeroDiv {\n\t\tif (val2 == 0){\n\t\t\tZeroDiv e = new ZeroDiv(\"probleme\");\n\t\t\tthrow e;\n\t\t}\n\t\telse\n\t\t\treturn val1/val2;\n\t}", "public static void devidebyzero_mitigation() {\n\t\tint b = 0;\n\t\tint c = 10;\n\t\tint a = 0;\n\t\tif(b!=0) {\n\t\t a = c/b;\n\t\t}\n\t\tSystem.out.println(\"The value of a in mitigationstrategy Example = \" +a);\n\t}", "boolean isZero();", "public boolean isDivisible(BigInteger dividend, BigInteger divisor) {\n\n\t\tBigInteger remainder = dividend.divideAndRemainder(divisor)[1];\n\t\tif(remainder.compareTo(new BigInteger(\"0\"))==0) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "@Test\n public void testDivisao() {\n System.out.println(\"divisao\");\n float num1 = 0;\n float num2 = 0;\n float expResult = 0;\n float result = Calculadora_teste.divisao(num1, num2);\n assertEquals(expResult, result, 0);\n }", "@Test\n public void testZeroPuncturePoint(){\n assertTrue(\n \"Test [x = 0.0]: zero value puncture point\",\n Double.isNaN(systemFunctions.calculate(0))\n );\n }", "@Test\n public void testZeroPuncturePoint(){\n assertTrue(\n \"Test [x = 0.0]: zero value puncture point\",\n Double.isNaN(systemFunctions.calculate(0))\n );\n }", "@Override\r\n\tpublic int div() {\n\t\treturn 0;\r\n\t}", "static int check(int x, int a, int b) \n\t{ \n\t\t// sum of digits is 0 \n\t\tif (x == 0) \n\t\t{ \n\t\t\treturn 0; \n\t\t} \n\n\t\twhile (x > 0) \n\t\t{ \n\n\t\t\t// if any of digits in sum is \n\t\t\t// other than a and b \n\t\t\tif (x % 10 != a & x % 10 != b) \n\t\t\t{ \n\t\t\t\treturn 0; \n\t\t\t} \n\n\t\t\tx /= 10; \n\t\t} \n\n\t\treturn 1; \n\t}", "public static void main(String[] args) {\n double valueTwenty = 20.00d;\n double valueEighty = 80.00d;\n double totalValue = (valueEighty+valueTwenty)*100.00d;\n double remainderValue = totalValue % 40.00d;\n boolean isZero = (remainderValue == 0) ? true : false;\n if(!isZero){\n System.out.println(\"Got Some Remainder\");\n }\n\n }", "public boolean divisorGame(int N) {\n return (N & 1) == 0;\n }", "public void testDivide() {\r\n System.out.println(\"Divide\");\r\n Double [][] n = new Double[][]{{-3., -2.5, -1., 0., 1., 2., 3.4, 3.5, 1.1E100, -1.1E100}, \r\n {-3., 2.5, 0., 0., 1., -2., 3., 3.7, 1.1E100, 1.1E100}, \r\n {1., -1., 0., 0., 1., -1., 1.133333, 0.945945, 1., -1.}};\r\n for(int i = 0; i < 10; i++){\r\n try{\r\n Double x = n[0][i];\r\n Double y = n[1][i];\r\n double expResult = n[2][i];\r\n double result = MathOp.Divide(x, y);\r\n assertEquals(expResult, result, 0.001);\r\n }\r\n catch(DividedByZeroException e){\r\n assertTrue(e instanceof DividedByZeroException);\r\n }\r\n }\r\n }", "public static boolean dividesEvenly(int a, int b) {\n if ((a % b) == 0) {\n return true;\n } else {\n return false;\n }\n }", "public static boolean checkDiv11 (int n) \n {\n boolean flag=true; \n int sum=calcul(n, flag); //call the private calculation method\n if (sum>10||sum<-10) //there's other calculations, it's not a single digit number\n return checkDiv11(sum);\n return sum==0; //check if the calculation ended at zero and if so return true, otherwise false\n }", "public static double div() {\n System.out.println(\"Enter dividend\");\n double a = getNumber();\n System.out.println(\"Enter divisor\");\n double b = getNumber();\n\n return a / b;\n }", "public boolean checkPerfectNumber(int num) {\n //num == 1 is special case.\n if(num == 1) return false;\n int sum = 1;\n for(int i = 2; i <= Math.sqrt(num); i++){\n if(num%i == 0){\n if(i == num/i) sum+=i;\n else sum = sum+i+num/i;\n }\n }\n return sum == num;\n }", "@Test(expected = ArithmeticException.class)\r\n\tpublic void testDivPorCero() {\r\n\t\tSystem.out.println(\" Ejecutando Test: testDivPorCero()\");\r\n\t\tint result = calc.div(5, 0);\r\n\t}", "private static boolean gcd(int a, int b) {\n while (b > 0) {\n int temp = b;\n b = a % b;\n a = temp;\n }\n return a == 1;\n }", "public void testNonZeroModGs() {\n\tdouble[] nzModG = trseScheme.getNonZeroModGs();\n\n\tassertEquals(13, nzModG.length);\n\n\tfor (int i = 0; i < 7; i++) {\n\t assertEquals(0.039887, nzModG[i], 1E-8);\n\t}\n\n\tfor (int i = 0; i < 6; i++) {\n\t assertEquals(0.012614, nzModG[i+7], 1E-8);\n\t}\n\n\t\n }", "private boolean validNum (int num) {\n if (num >= 0) return true;\n else return false;\n }", "public static void test(){\n int[] a = {3,6,9, 12,81,72};\n int n = 648;\n boolean flag = areFactors(n, a);\n if(flag == true){\n System.out.println(n +\" is divisible by all elements of array.\");\n }\n else{\n System.out.println(n + \" fails the test.\");\n }\n }", "private boolean dividingByZero(String operator){\n if (numStack.peek() == 0 && operator.equals(\"/\")){\n return true;\n }\n return false;\n }", "boolean hasPercentage();", "public boolean isAPrimeNumber(int x){\n for(int i = 1; i <= x;i++){\n\n //if the mod = 0 then it is a divisor\n if(x % i == 0) {\n\n //increment count\n count++;\n\n }\n //if count is greater than 2 we return true because prime numbers\n //Can only be divisble by 1 and itself\n if(count > 2){\n\n return false;\n }\n\n\n\n }\n\n //If the entire loop finishes then we return true\n return true;\n }", "public static void primeCheck(int num){\n \n boolean divisible = false;\n for(int i = 2;i<num;i++){\n if(num%i==0&&num!=i){\n divisible = true;\n }\n }\n if(divisible==true){\n System.out.println(\"The number is not a prime.\");\n }\n else{\n System.out.println(\"The number is a prime.\");\n }\n }", "public int divide(int dividend, int divisor) {\n\t\tif(divisor == Integer.MIN_VALUE) {\n\t\t\tif(dividend == Integer.MIN_VALUE) return 1;\n\t\t\telse return 0;\n\t\t}\n\t\tboolean neg = (dividend < 0) ^ (divisor < 0), minVal = false;\n\t\tif(dividend < 0) {\n\t\t\tif(dividend == Integer.MIN_VALUE){\n\t\t\t\tminVal = true;\n\t\t\t\tdividend++;\n\t\t\t}\n\t\t\tdividend = -dividend;\n\t\t}\n\t\tif(divisor < 0) divisor = -divisor;\n\t\tint temp = divisor, exp = 1, ans = 0;\n\t\t\n\t\twhile(temp <= dividend / 2){\n\t\t\ttemp = temp << 1;\n\t\t\texp = exp << 1;\t\n\t\t}\n\t\t\n\t\twhile(exp > 0){\n\t\t\tif(dividend >= temp){\n\t\t\t\tans += exp;\n\t\t\t\tdividend -= temp;\n\t\t\t}\n\t\t\ttemp = temp >> 1;\n\t\t\texp = exp >> 1;\n\t\t}\n\t\t\n\t\tif(minVal && dividend + 1 >= divisor) ans++;\n\t\t\n\t\tif(neg) return -ans;\n\t\telse return ans;\n\t}", "public double divide(double a, double b, boolean rem){ return rem? a%b: a/b; }", "public static double divide(double num1,double num2){\n\n // return num1/num2 ;\n\n if(num2==0){\n return 0 ;\n } else {\n return num1/num2 ;\n }\n }", "public double divide(double firstNumber, double secondNUmber){\n\t\tdouble result=0.0;\n\t\t\n\t\t\tresult = firstNumber / secondNUmber;\n\t\t\n\t\t\tSystem.out.println(\"hej \");\n\t\t\n\t\tif (Double.isInfinite(result)){\n\t\t\tSystem.out.println(\"7767878\");\n\t\t\treturn -1111.1111;\n\t\t}\t\t\n\t\t\n\t\t\n\t\treturn result;\n\t}", "private boolean isPrime(int x) {\n for (int i = 2; i <= x / i; i++) {\n if (x % i == 0) {\n return false;\n }\n }\n return true;\n }", "@Test\n public void checkDivisibilityByFourHundred() {\n LeapYear leapYear = new LeapYear();\n boolean flag = leapYear.isItDivisibleByFourHundred(1600);\n assertTrue(flag);\n }", "public int stoerrelse();", "public int dividir(int a, int b) throws ExececaoCalculo{\n \n if(b==0){\n //ExececaoCalculo é uma class que esta nesse pacote atual\n throw new ExececaoCalculo(a, b);\n }\n return a/b;\n }", "public void setIsPrime()\n\t{\n\t\tint divisor = 2;\n\t\tdo\n\t\t{\n\t\t\tif (number % divisor == noRemainder)\n\t\t\t{\n\t\t\t\texactDivision = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\texactDivision = false;\n\t\t\t}\n\t\t\tdivisor++;\n\t\t} while (divisor < number && exactDivision == false);\n\t}", "public static boolean evenlyDivisible (int num1, int num2) {\r\n if(num1 % num2 == 0) {\r\n return true;\r\n } \r\n return false;\r\n }", "@Override\r\n\tpublic int divNo(int a, int b) throws ArithmeticException {\n\t\tif(b==0)\r\n\t\t\tthrow new ArithmeticException();\r\n\t\treturn a/b;\r\n\t}", "public static boolean isDivisibleBy(int j, int i) {\n\t\tif (j%i==0) { //use mod to achieve no remainder--meaning completely divisible\r\n\t\treturn true;\t//return true\r\n\t\t} else {\r\n\t\treturn false;\t//return false\r\n\t\t}\r\n\t}", "@Test(expected=ArithmeticException.class)\n public void testSplitOnZero() {\n Money money = new Money(new BigDecimal(\"50.00\"));\n money.split(0);\n fail(\"Can't split by 0\");\n }", "private static void div(int[] numbers) {\n\t\tint sum=-1;\n\t\ttry {\n\t\t\tsum = numbers[0] / numbers[1];\n\t\t\tSystem.out.println(sum);\n\t\t} catch (ArithmeticException ex) {\n\t\t\tSystem.out.println(\"Sie dürfen um gottes Willen nicht durch NULL dividieren!\");\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t}", "public static int countMults(int[] nums, int divisibility){\n int total = 0;\n for(int num : nums){\n if(num % divisibility == 0){\n total ++;\n }\n }\n// System.out.println(\"Should return 3 \" + total);\n return total;\n }", "private boolean isValidValue(double value) {\r\n\t\treturn (value > 0);\r\n\t}", "@Test\n\tpublic void testPotencia0() {\n\t\tdouble resultado=Producto.potencia(0, 8);\n\t\tdouble esperado=0;\n\t\t\n\t\tassertEquals(esperado,resultado);\n\t}", "public static int p_div(){\n Scanner keyboard = new Scanner(System.in);\n System.out.println(\"please put the first number that you want to divide:\");\n int v_div_number_1 = keyboard.nextInt();\n System.out.println(\"please put the second number that you want to divide:\");\n int v_div_number_2 = keyboard.nextInt();\n int v_total_div= v_div_number_1/v_div_number_2;\n return v_total_div;\n }", "public boolean isPrime(){\r\n\t\tfor (int i = 2; i<value; i++){\r\n\t\t\tif(value/i==0){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private boolean isOddPrime(int t) // Not the most efficient method, but it will serve\n {\n int test = 3;\n boolean foundFactor = false;\n while(test*test < t && !foundFactor)\n {\n foundFactor = (t%test == 0); // is it divisible by test\n test += 2;\n }\n\n return !foundFactor;\n }", "public int divide(int dividend, int divisor) {\n if (divisor == 0) {\n return Integer.MAX_VALUE;\n }\n if (divisor == -1 && dividend == Integer.MIN_VALUE) {\n return Integer.MAX_VALUE;\n }\n\n long pDividend = Math.abs(dividend);\n long pDivisor = Math.abs(divisor);\n\n int result = 0;\n\n while (pDividend >= pDivisor) {\n int numShift = 0;\n while (pDividend >= (pDivisor << numShift)) {\n numShift++;\n }\n result += 1<<(numShift-1);\n pDividend -= pDivisor<<(numShift-1);\n }\n\n if ((dividend > 0 && divisor > 0) || (dividend < 0 || divisor < 0)) {\n return result;\n }\n return -result;\n }", "public boolean isZero() {return false;}", "public boolean throwsArithmeticException() {\n\t// conservatively assume that any division or mod may throw\n\t// ArithmeticException this is NOT true-- floats and doubles don't\n\t// throw any exceptions ever...\n\treturn op == DIV || op == MOD;\n }", "Proof notDivides(int n, int m) {\n return introduceNotExists(var(\"z\"), notDivides(n, m, var(\"z\")));\n }", "@Test\n public void testModulo() {\n System.out.println(\"modulo\");\n int x = 0;\n int y = 0;\n int expResult = 0;\n int result = utilsHill.modulo(x, y);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "boolean isNilFractionalMinimum();", "@Test\n public void testFractionImplZeroDivisionException() {\n assertThrows(ArithmeticException.class, () -> {\n new FractionImpl(1,0);\n });\n //Valid string fraction but division by zero\n assertThrows(ArithmeticException.class, () -> {\n new FractionImpl(\"1/0\");\n });\n //Test inverse method resulting in denominator = 0\n assertThrows(ArithmeticException.class, () -> {\n zeroTenth.inverse();\n });\n }", "public Boolean IsAbnormally() {\n Random r = new Random();\n int k = r.nextInt(100);\n //1%\n if (k <= 1) {\n abnormally++;\n return true;\n }\n return false;\n }", "public static boolean check(double arg) {\n if (!(Double.isInfinite(arg))) {\n return true;\n } else {\n System.out.println(\"Warring! You have entered a very large number!\");\n return false;\n }\n }", "public static int divide(int dividend, int divisor) {\n\t\tint result = 0;\n\t\tboolean sign = true;\n\t\tif ((dividend < 0 && divisor > 0) || (dividend > 0 && divisor < 0)) {\n\t\t\tsign = false;\n\t\t}\n\t\t/*\n\t\t * long a = dividend; long b = divisor; if (a < 0) a = -a; if (b < 0) b\n\t\t * = -b;\n\t\t */\n\t\tlong a = Math.abs((long)dividend);\n\t\tlong b = Math.abs((long)divisor);\n\t\t// divisor multiply.\n\t\twhile (a >= b) {\n\t\t\tint mult = 1;\n\t\t\tlong temp = b;\n\t\t\twhile (a >= temp) {\n\t\t\t\ta -= temp;\n\t\t\t\tresult += mult;\n\t\t\t\ttemp += temp;\n\t\t\t\tmult += mult;\n\t\t\t}\n\t\t}\n\t\tif (!sign) {\n\t\t\treturn -result;\n\t\t} else {\n\t\t\treturn result;\n\t\t}\n\t}", "public void visitDDIV(DDIV o){\n\t\tif (stack().peek() != Type.DOUBLE){\n\t\t\tconstraintViolated(o, \"The value at the stack top is not of type 'double', but of type '\"+stack().peek()+\"'.\");\n\t\t}\n\t\tif (stack().peek(1) != Type.DOUBLE){\n\t\t\tconstraintViolated(o, \"The value at the stack next-to-top is not of type 'double', but of type '\"+stack().peek(1)+\"'.\");\n\t\t}\n\t}", "public static void divisores(int n){\n for(int i=1;i<=n;i++){\n if(n%i==0){System.out.println(i+\" es divisor\");}\n }\n }", "public int gcd(){\n\tint min;\n\tint max;\n\tint stor;\n\tif ((numerator == 0) || (denominator == 0)){\n\t return 0;\n\t}\n\telse {\n\t if ( numerator >= denominator ) {\n\t\tmax = numerator;\n\t\tmin = denominator;\n\t }\n\t else {\n\t\tmax = denominator;\n\t\tmin = numerator;\n\t }\n\t while (min != 0){\n\t stor = min;\n\t\tmin = max % min;\n\t\tmax = stor;\n\t }\n\t return max;\n\t}\n }", "public int divide(int dividend, int divisor) {\n if(divisor == 0 || (dividend == Integer.MIN_VALUE && divisor == -1)) return Integer.MAX_VALUE;\n \n //use XOR to get sign value. If both neg or pos, neg will be false, otherwise it will be true\n boolean neg = (dividend < 0) ^ (divisor <0);\n \n //to be clear with calculation, we will convert inputs to pos, but the built-in abs() will output the \n //same data type as the input, so, to avoid overflow, we will case input to long\n long abs_dividend = Math.abs( (long) dividend);\n long abs_divisor = Math.abs( (long) divisor);\n int result = 0;\n \n //Differed from general division, here each time we will try to increase the divisor by 2 times\n //where in general division, we can increase the divisor by 1 - 9 times. Then we will decrease \n //the dividend, and redo the operations\n while(abs_dividend >= abs_divisor){\n //temp is the temp result from increase the divisor by 2 times\n long temp = abs_divisor, multiply = 1;\n //we will try to get the max value smaller than abs_dividend by increasing temp 2 times each time\n while(abs_dividend >= (temp <<1)){\n temp <<= 1;\n multiply <<= 1;\n }\n \n abs_dividend -= temp;\n result += multiply;\n }\n \n return neg? -result : result;\n }", "private static boolean isDivisibeby3or5(int a){\n\t\treturn a%3 == 0 || a%5 == 0;\n\t}", "public static boolean isNumberRatio(Object val) throws BaseException\n {\n \tif(val instanceof Number && (NumberUtil.toDouble(val) >= 0 && NumberUtil.toDouble(val) <= 100))\n \t{\n \t return true;\n \t}\n \treturn false;\n }", "public int divide(int dividend, int divisor) {\n long a=Math.abs((long )dividend);\n long b=Math.abs((long )divisor);\n boolean negative=false; \n if(dividend<0) negative=!negative; \n if(divisor<0) negative=!negative; \n int result=0;\n while(a>=b)\n {\n long c=b; \n for(int i=0; a>=c ; i++, c<<=1 )\n {\n a-=c; \n result+=1<<i;\n }\n }\n return negative? -result: result; \n }", "public static boolean checkOdious(int num) {\n\t\tint numberOfOnes = 0;\n\t\tint numberOfZeros = 0;\n\n\t\t// See how many 1s and 0s in number\n\t\twhile (num != 0) {\n\t\t\tif (num % 2 == 1) {\n\t\t\t\tnumberOfOnes++;\n\t\t\t} else {\n\t\t\t\tnumberOfZeros++;\n\t\t\t}\n\t\t\tnum = num / 2;\n\t\t}\n\n\t\t// Check if there is an odd number of 1s\n\t\tif (numberOfOnes % 2 == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private static boolean isPrime(int x) {\n if (x<=1)\n return false;\n else\n return !isDivisible(x, 2);\n }", "@Test\n\tpublic void whenNumberZeroFactrialOne() {\n\t\tFactorial fact = new Factorial();\n\t\tassertTrue(fact.calc(0) == 1);\n\t}", "boolean isSetFractionalMinimum();", "public boolean validateNummer() {\n\t\treturn (nummer >= 10000 && nummer <= 99999 && nummer % 2 != 0); //return true==1 oder false==0\n\t}", "public Boolean verifyTheValueSubtotalIsInZero() {\n\t\tSystem.out.println(\"Starting to verify if Subtotal is equal to 0.00.\");\n\t\treturn verifyIfSomeStringContainsZeroDotZeroZeroValueInside(getTextByLocator(body_value_subtotal));\n\t}", "public static int check() {\r\n\t\tint num = 0;\r\n\t\tboolean check = true;\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tnum = input.nextInt();\r\n\t\t\t\tif (num < 0) {\r\n\t\t\t\t\tnum = Math.abs(num);\r\n\t\t\t\t}\r\n\t\t\t\tcheck = false;\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\t\t\t\t\t\t// hvatanje greske i ispis da je unos pogresan\r\n\t\t\t\tSystem.out.println(\"You know it's wrong input, try again mate:\");\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t}\r\n\t\t} while (check);\r\n\t\treturn num;\r\n\t}", "private boolean validarNumDistanc(double value) {\n\n String msjeError;\n if (value < 0) {\n\n msjeError = \"Valor No Aceptado\";\n this.jLabelError.setText(msjeError);\n this.jLabelError.setForeground(Color.RED);\n this.jLabelError.setVisible(true);\n\n this.jLabel5.setForeground(Color.red);\n return false;\n } else {\n\n this.jLabel5.setForeground(jlabelColor);\n this.jLabelError.setVisible(false);\n return true;\n }\n }", "static int greatestDenominator(int a, int b) {\n int denominator = 0;\n\n // Loops from 0 to max(a, b) to test denominators\n for (int i = 1; i < Math.max(a, b); i++) {\n if (a % i == 0 && b % i == 0) {\n denominator = i;\n }\n }\n\n return denominator;\n }", "private boolean esPrimo(int pNumero)\r\n\t{\r\n\t\tboolean esPrimo = true;\r\n\t\tfor(int i=2; i<=pNumero/2 && esPrimo;i++)\r\n\t\t{\r\n\t\t\tif(pNumero%i == 0)\r\n\t\t\t{\r\n\t\t\t\tesPrimo = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn esPrimo;\r\n\t}", "private static boolean checkZero(int[] count) {\n\t\tfor (int i = 0; i < count.length; i++) {\n\t\t\tif (count[i] != 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public static long unsignedDiv( long dividend, long divisor ) {\r\n if ( divisor < 0 ) { // i.e., divisor >= 2^63:\r\n if ( compare( dividend, divisor ) < 0 ) {\r\n return 0; // dividend < divisor\r\n } else {\r\n return 1; // dividend >= divisor\r\n }\r\n }\r\n\r\n // Optimization - use signed division if dividend < 2^63\r\n if ( dividend >= 0 ) {\r\n return dividend / divisor;\r\n }\r\n\r\n /*\r\n * Otherwise, approximate the quotient, check, and correct if necessary. Our approximation is\r\n * guaranteed to be either exact or one less than the correct value. This follows from fact\r\n * that floor(floor(x)/i) == floor(x/i) for any real x and integer i != 0. The proof is not\r\n * quite trivial.\r\n */\r\n long quotient = ((dividend >>> 1) / divisor) << 1;\r\n long rem = dividend - quotient * divisor;\r\n return quotient + (compare( rem, divisor ) >= 0 ? 1 : 0);\r\n }", "public static void abc(int a, int b) throws DivideByZero {\n\t\t\n\t\tif(b == 0) {\n\t\t\tDivideByZero er = new DivideByZero();\n\t\t\tthrow er;\n\t\t}\n\t\t\n\t\tdouble c = a/b;\n\t\t\n\t}", "@Test\n\tpublic void priorsAreReasonable() {\n\t\tdouble tot = 0;\n\t\tboolean zeroPrior = false;\n\t\tfor(NewsGroup g: groups) {\n\t\t\tdouble p = g.getPrior();\n\t\t\ttot+=p;\n\t\t\tif(p == 0.0) {\n\t\t\t\tzeroPrior = true;\n\t\t\t}\n\t\t}\n\t\tassertTrue((tot == 1) && !zeroPrior);\n\t}", "@Test //expected exception assertThrows.\n\t@EnabledOnOs(OS.LINUX) //used on method/class, \n\tvoid testDivideByZero() {\n\t\tSystem.out.println(\"Test divide by zero, should not run\");\n\t\tassertThrows(ArithmeticException.class, ()-> mathUtils.divide(4, 0));\n\t}", "@Test\r\n\tpublic void testGetNumDivisions() {\r\n\t\tint numDivisions = 2;\r\n\t\tassertEquals(numDivisions, stats.getNumDivisions());\r\n\t}", "public static void main(String[] args) {\n\n double doubleVariable = 20.00d;\n double secondDouble = 80.00d;\n\n double total = doubleVariable + secondDouble * 100d;\n System.out.println(total);\n\n\n double remainder = total % 40.00d;\n\n System.out.println(remainder);\n\n boolean isRemainderZero = remainder == 0 ? true : false;\n\n System.out.println(isRemainderZero);\n\n if(!isRemainderZero){\n System.out.println(\"Got some remainder\");\n }\n\n\n }", "private void reduce() {\n /** The fraction is equal to 0. The numerator is 0 in this case */\n if(this.numerator == 0)\n this.denominator = 1;\n /** The numerator and denominator are not equal */\n else if (this.numerator != this.denominator) {\n\n /** The greatest common divisor of the numerator and denominator of this fraction */\n int gcd = getGCD(Math.abs(this.numerator), Math.abs(this.denominator));\n\n /** There is a greatest common divisor greater than 1 */\n if (gcd > 1) {\n this.numerator /= gcd;\n this.denominator /= gcd;\n }\n } \n /** The fraction is equal to 1 */\n else {\n this.numerator = 1;\n this.denominator = 1;\n }\n }" ]
[ "0.6707049", "0.6703714", "0.6431811", "0.63317806", "0.62737453", "0.6252939", "0.6217555", "0.6149237", "0.6076265", "0.60527796", "0.5956496", "0.59422046", "0.5910097", "0.5900166", "0.587896", "0.58352906", "0.5830698", "0.57982165", "0.5796018", "0.5723515", "0.57198787", "0.5718952", "0.57133985", "0.5701451", "0.57003534", "0.56659", "0.56659", "0.56460017", "0.56390417", "0.5604723", "0.5576291", "0.55698144", "0.55694646", "0.5561897", "0.5557591", "0.5556484", "0.5554675", "0.5538039", "0.55365884", "0.5534046", "0.5529369", "0.55158186", "0.5491645", "0.54886067", "0.546132", "0.54510725", "0.5442324", "0.5438975", "0.54387283", "0.5435096", "0.5434346", "0.5430841", "0.5426082", "0.5425406", "0.54227483", "0.5422402", "0.54172367", "0.53997856", "0.5399622", "0.53965247", "0.5395849", "0.53915375", "0.538427", "0.53815484", "0.5366339", "0.5356806", "0.5348545", "0.53430456", "0.5341821", "0.5341302", "0.5339421", "0.532361", "0.53211665", "0.53149486", "0.5314446", "0.53065634", "0.53046715", "0.5303137", "0.5299951", "0.52905697", "0.52889395", "0.5286674", "0.5284265", "0.5277377", "0.52751386", "0.5274509", "0.5271797", "0.52704", "0.52650476", "0.52630657", "0.525501", "0.5246227", "0.5239324", "0.52328175", "0.523182", "0.5228158", "0.52247584", "0.521594", "0.5213392", "0.5206021" ]
0.5364011
65
lv.q C000.q, 0($s3) vsat0.q C000.q, C000.q viim.s S010.s, 0x00FF vscl.q C000.q, C000.q, S010.s vf2iz.q C000.q, C000.q, 23 vi2uc.q S000.s, C000.q mfv.s $a1, S000.s
static public void float2int(int source, int result) { int addr = getRegisterValue((source >> 21) & 31) + (int) (short) (source & 0xFFFC); int value1 = (int) (Float.intBitsToFloat(getMemory().read32(addr)) * 255f); value1 = Math.min(255, Math.max(0, value1)); int value2 = (int) (Float.intBitsToFloat(getMemory().read32(addr + 4)) * 255f); value2 = Math.min(255, Math.max(0, value2)); int value3 = (int) (Float.intBitsToFloat(getMemory().read32(addr + 8)) * 255f); value3 = Math.min(255, Math.max(0, value3)); int value4 = (int) (Float.intBitsToFloat(getMemory().read32(addr + 12)) * 255f); value4 = Math.min(255, Math.max(0, value4)); int value = value1 | (value2 << 8) | (value3 << 16) | (value4 << 24); setRegisterValue((result >> 16) & 31, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo54413a(int i, C20254v vVar);", "protected void engineReset()\r\n/* 79: */ {\r\n/* 80:143 */ this.V00 = IV[0];\r\n/* 81:144 */ this.V01 = IV[1];\r\n/* 82:145 */ this.V02 = IV[2];\r\n/* 83:146 */ this.V03 = IV[3];\r\n/* 84:147 */ this.V04 = IV[4];\r\n/* 85:148 */ this.V05 = IV[5];\r\n/* 86:149 */ this.V06 = IV[6];\r\n/* 87:150 */ this.V07 = IV[7];\r\n/* 88:151 */ this.V10 = IV[8];\r\n/* 89:152 */ this.V11 = IV[9];\r\n/* 90:153 */ this.V12 = IV[10];\r\n/* 91:154 */ this.V13 = IV[11];\r\n/* 92:155 */ this.V14 = IV[12];\r\n/* 93:156 */ this.V15 = IV[13];\r\n/* 94:157 */ this.V16 = IV[14];\r\n/* 95:158 */ this.V17 = IV[15];\r\n/* 96:159 */ this.V20 = IV[16];\r\n/* 97:160 */ this.V21 = IV[17];\r\n/* 98:161 */ this.V22 = IV[18];\r\n/* 99:162 */ this.V23 = IV[19];\r\n/* 100:163 */ this.V24 = IV[20];\r\n/* 101:164 */ this.V25 = IV[21];\r\n/* 102:165 */ this.V26 = IV[22];\r\n/* 103:166 */ this.V27 = IV[23];\r\n/* 104: */ }", "public V mo3404i(int i) {\n V[] vArr = this.f2826c;\n int i2 = i << 1;\n V v = vArr[i2 + 1];\n int i3 = this.f2827d;\n int i4 = 0;\n if (i3 <= 1) {\n m2105c(this.f2825b, vArr, i3);\n this.f2825b = C0453f4.f2093a;\n this.f2826c = C0453f4.f2095c;\n } else {\n int i5 = i3 - 1;\n int[] iArr = this.f2825b;\n int i6 = 8;\n if (iArr.length <= 8 || i3 >= iArr.length / 3) {\n if (i < i5) {\n int i7 = i + 1;\n int i8 = i5 - i;\n System.arraycopy(iArr, i7, iArr, i, i8);\n Object[] objArr = this.f2826c;\n System.arraycopy(objArr, i7 << 1, objArr, i2, i8 << 1);\n }\n Object[] objArr2 = this.f2826c;\n int i9 = i5 << 1;\n objArr2[i9] = null;\n objArr2[i9 + 1] = null;\n } else {\n if (i3 > 8) {\n i6 = i3 + (i3 >> 1);\n }\n mo3390a(i6);\n if (i3 == this.f2827d) {\n if (i > 0) {\n System.arraycopy(iArr, 0, this.f2825b, 0, i);\n System.arraycopy(vArr, 0, this.f2826c, 0, i2);\n }\n if (i < i5) {\n int i10 = i + 1;\n int i11 = i5 - i;\n System.arraycopy(iArr, i10, this.f2825b, i, i11);\n System.arraycopy(vArr, i10 << 1, this.f2826c, i2, i11 << 1);\n }\n } else {\n throw new ConcurrentModificationException();\n }\n }\n i4 = i5;\n }\n if (i3 == this.f2827d) {\n this.f2827d = i4;\n return v;\n }\n throw new ConcurrentModificationException();\n }", "C1458cs mo7613iS();", "@Override\n public void apply$mcVI$sp (int arg0)\n {\n\n }", "private void m3999b(C0820v vVar, C0788a0 a0Var, int i, int i2) {\n C0820v vVar2 = vVar;\n C0788a0 a0Var2 = a0Var;\n if (a0Var.mo4537h() && mo4732e() != 0 && !a0Var.mo4536g() && mo3811E()) {\n List<C0794d0> f = vVar.mo4825f();\n int size = f.size();\n int l = mo4749l(mo4729d(0));\n int i3 = 0;\n int i4 = 0;\n for (int i5 = 0; i5 < size; i5++) {\n C0794d0 d0Var = (C0794d0) f.get(i5);\n if (!d0Var.isRemoved()) {\n char c = 1;\n if ((d0Var.getLayoutPosition() < l) != this.f3143x) {\n c = 65535;\n }\n if (c == 65535) {\n i3 += this.f3140u.mo5113b(d0Var.itemView);\n } else {\n i4 += this.f3140u.mo5113b(d0Var.itemView);\n }\n }\n }\n this.f3139t.f3165k = f;\n if (i3 > 0) {\n m4005h(mo4749l(m3984P()), i);\n C0784c cVar = this.f3139t;\n cVar.f3162h = i3;\n cVar.f3157c = 0;\n cVar.mo4356a();\n mo4326a(vVar2, this.f3139t, a0Var2, false);\n }\n if (i4 > 0) {\n mo4305g(mo4749l(m3983O()), i2);\n C0784c cVar2 = this.f3139t;\n cVar2.f3162h = i4;\n cVar2.f3157c = 0;\n cVar2.mo4356a();\n mo4326a(vVar2, this.f3139t, a0Var2, false);\n }\n this.f3139t.f3165k = null;\n }\n }", "private static double fds_h(Vec v) { return 2*ASTMad.mad(new Frame(v), null, 1.4826)*Math.pow(v.length(),-1./3.); }", "public void mo4300a(C0820v vVar, C0788a0 a0Var, C0782a aVar, int i) {\n }", "public void mo4301a(C0820v vVar, C0788a0 a0Var, C0784c cVar, C0783b bVar) {\n int i;\n int i2;\n int i3;\n int i4;\n int i5;\n int i6;\n int i7;\n int i8;\n boolean z;\n C0820v vVar2 = vVar;\n C0788a0 a0Var2 = a0Var;\n C0784c cVar2 = cVar;\n C0783b bVar2 = bVar;\n int e = this.f3140u.mo5118e();\n boolean z2 = e != 1073741824;\n int i9 = mo4732e() > 0 ? this.f3121J[this.f3120I] : 0;\n if (z2) {\n m3935R();\n }\n boolean z3 = cVar2.f3159e == 1;\n int i10 = this.f3120I;\n if (!z3) {\n i10 = m3942b(vVar2, a0Var2, cVar2.f3158d) + m3944c(vVar2, a0Var2, cVar2.f3158d);\n }\n int i11 = 0;\n int i12 = 0;\n while (i12 < this.f3120I && cVar2.mo4358a(a0Var2) && i10 > 0) {\n int i13 = cVar2.f3158d;\n int c = m3944c(vVar2, a0Var2, i13);\n if (c <= this.f3120I) {\n i10 -= c;\n if (i10 < 0) {\n break;\n }\n View a = cVar2.mo4355a(vVar2);\n if (a == null) {\n break;\n }\n i11 += c;\n this.f3122K[i12] = a;\n i12++;\n } else {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Item at position \");\n sb.append(i13);\n sb.append(\" requires \");\n sb.append(c);\n sb.append(\" spans but GridLayoutManager has only \");\n sb.append(this.f3120I);\n sb.append(\" spans.\");\n throw new IllegalArgumentException(sb.toString());\n }\n }\n if (i12 == 0) {\n bVar2.f3152b = true;\n return;\n }\n float f = 0.0f;\n int i14 = i12;\n m3940a(vVar, a0Var, i12, i11, z3);\n int i15 = 0;\n for (int i16 = 0; i16 < i14; i16++) {\n View view = this.f3122K[i16];\n if (cVar2.f3165k != null) {\n z = false;\n if (z3) {\n mo4690a(view);\n } else {\n mo4691a(view, 0);\n }\n } else if (z3) {\n mo4716b(view);\n z = false;\n } else {\n z = false;\n mo4717b(view, 0);\n }\n mo4695a(view, this.f3126O);\n m3939a(view, e, z);\n int b = this.f3140u.mo5113b(view);\n if (b > i15) {\n i15 = b;\n }\n float c2 = (((float) this.f3140u.mo5115c(view)) * 1.0f) / ((float) ((C0780b) view.getLayoutParams()).f3128f);\n if (c2 > f) {\n f = c2;\n }\n }\n if (z2) {\n m3937a(f, i9);\n i15 = 0;\n for (int i17 = 0; i17 < i14; i17++) {\n View view2 = this.f3122K[i17];\n m3939a(view2, 1073741824, true);\n int b2 = this.f3140u.mo5113b(view2);\n if (b2 > i15) {\n i15 = b2;\n }\n }\n }\n for (int i18 = 0; i18 < i14; i18++) {\n View view3 = this.f3122K[i18];\n if (this.f3140u.mo5113b(view3) != i15) {\n C0780b bVar3 = (C0780b) view3.getLayoutParams();\n Rect rect = bVar3.f3317b;\n int i19 = rect.top + rect.bottom + bVar3.topMargin + bVar3.bottomMargin;\n int i20 = rect.left + rect.right + bVar3.leftMargin + bVar3.rightMargin;\n int g = mo4305g(bVar3.f3127e, bVar3.f3128f);\n if (this.f3138s == 1) {\n i8 = C0808o.m4304a(g, 1073741824, i20, bVar3.width, false);\n i7 = MeasureSpec.makeMeasureSpec(i15 - i19, 1073741824);\n } else {\n int makeMeasureSpec = MeasureSpec.makeMeasureSpec(i15 - i20, 1073741824);\n i7 = C0808o.m4304a(g, 1073741824, i19, bVar3.height, false);\n i8 = makeMeasureSpec;\n }\n m3938a(view3, i8, i7, true);\n }\n }\n int i21 = 0;\n bVar2.f3151a = i15;\n if (this.f3138s == 1) {\n if (cVar2.f3160f == -1) {\n int i22 = cVar2.f3156b;\n i = i22;\n i2 = i22 - i15;\n } else {\n int i23 = cVar2.f3156b;\n i2 = i23;\n i = i15 + i23;\n }\n i4 = 0;\n i3 = 0;\n } else if (cVar2.f3160f == -1) {\n int i24 = cVar2.f3156b;\n i2 = 0;\n i = 0;\n int i25 = i24 - i15;\n i3 = i24;\n i4 = i25;\n } else {\n i4 = cVar2.f3156b;\n i3 = i15 + i4;\n i2 = 0;\n i = 0;\n }\n while (i21 < i14) {\n View view4 = this.f3122K[i21];\n C0780b bVar4 = (C0780b) view4.getLayoutParams();\n if (this.f3138s != 1) {\n i2 = mo4757q() + this.f3121J[bVar4.f3127e];\n i = this.f3140u.mo5115c(view4) + i2;\n } else if (mo4323M()) {\n int o = mo4754o() + this.f3121J[this.f3120I - bVar4.f3127e];\n i5 = o;\n i6 = o - this.f3140u.mo5115c(view4);\n int i26 = i2;\n int i27 = i;\n mo4693a(view4, i6, i26, i5, i27);\n if (!bVar4.mo4774d() || bVar4.mo4773c()) {\n bVar2.f3153c = true;\n }\n bVar2.f3154d |= view4.hasFocusable();\n i21++;\n i4 = i6;\n i2 = i26;\n i3 = i5;\n i = i27;\n } else {\n i4 = mo4754o() + this.f3121J[bVar4.f3127e];\n i3 = this.f3140u.mo5115c(view4) + i4;\n }\n i6 = i4;\n i5 = i3;\n int i262 = i2;\n int i272 = i;\n mo4693a(view4, i6, i262, i5, i272);\n if (!bVar4.mo4774d()) {\n }\n bVar2.f3153c = true;\n bVar2.f3154d |= view4.hasFocusable();\n i21++;\n i4 = i6;\n i2 = i262;\n i3 = i5;\n i = i272;\n }\n Arrays.fill(this.f3122K, null);\n }", "private int m15033c(C1085v vVar, int i) {\n if ((i & 3) != 0) {\n int i2 = 2;\n int i3 = this.f13670i > 0.0f ? 2 : 1;\n VelocityTracker velocityTracker = this.f13681t;\n if (velocityTracker != null && this.f13673l > -1) {\n C5319g gVar = this.f13674m;\n float f = this.f13668g;\n gVar.mo12728b(f);\n velocityTracker.computeCurrentVelocity(C8733j.DEFAULT_IMAGE_TIMEOUT_MS, f);\n float xVelocity = this.f13681t.getXVelocity(this.f13673l);\n float yVelocity = this.f13681t.getYVelocity(this.f13673l);\n if (yVelocity <= 0.0f) {\n i2 = 1;\n }\n float abs = Math.abs(yVelocity);\n if ((i2 & i) != 0 && i2 == i3) {\n C5319g gVar2 = this.f13674m;\n float f2 = this.f13667f;\n gVar2.mo12718a(f2);\n if (abs >= f2 && abs > Math.abs(xVelocity)) {\n return i2;\n }\n }\n }\n float height = ((float) this.f13679r.getHeight()) * this.f13674m.mo12693b(vVar);\n if ((i & i3) != 0 && Math.abs(this.f13670i) > height) {\n return i3;\n }\n }\n return 0;\n }", "public void mo4301a(C0820v vVar, C0788a0 a0Var, C0784c cVar, C0783b bVar) {\n int i;\n int i2;\n int i3;\n int i4;\n int i5;\n View a = cVar.mo4355a(vVar);\n if (a == null) {\n bVar.f3152b = true;\n return;\n }\n C0813p pVar = (C0813p) a.getLayoutParams();\n if (cVar.f3165k == null) {\n if (this.f3143x == (cVar.f3160f == -1)) {\n mo4716b(a);\n } else {\n mo4717b(a, 0);\n }\n } else {\n if (this.f3143x == (cVar.f3160f == -1)) {\n mo4690a(a);\n } else {\n mo4691a(a, 0);\n }\n }\n mo4692a(a, 0, 0);\n bVar.f3151a = this.f3140u.mo5113b(a);\n if (this.f3138s == 1) {\n if (mo4323M()) {\n i5 = mo4758r() - mo4756p();\n i4 = i5 - this.f3140u.mo5115c(a);\n } else {\n i4 = mo4754o();\n i5 = this.f3140u.mo5115c(a) + i4;\n }\n if (cVar.f3160f == -1) {\n int i6 = cVar.f3156b;\n i = i6;\n i2 = i5;\n i3 = i6 - bVar.f3151a;\n } else {\n int i7 = cVar.f3156b;\n i3 = i7;\n i2 = i5;\n i = bVar.f3151a + i7;\n }\n } else {\n int q = mo4757q();\n int c = this.f3140u.mo5115c(a) + q;\n if (cVar.f3160f == -1) {\n int i8 = cVar.f3156b;\n i2 = i8;\n i3 = q;\n i = c;\n i4 = i8 - bVar.f3151a;\n } else {\n int i9 = cVar.f3156b;\n i3 = q;\n i2 = bVar.f3151a + i9;\n i = c;\n i4 = i9;\n }\n }\n mo4693a(a, i4, i3, i2, i);\n if (pVar.mo4774d() || pVar.mo4773c()) {\n bVar.f3153c = true;\n }\n bVar.f3154d = a.hasFocusable();\n }", "public abstract void mo12694b(C1085v vVar, int i);", "private int m15032b(C1085v vVar, int i) {\n if ((i & 12) != 0) {\n int i2 = 8;\n int i3 = this.f13669h > 0.0f ? 8 : 4;\n VelocityTracker velocityTracker = this.f13681t;\n if (velocityTracker != null && this.f13673l > -1) {\n C5319g gVar = this.f13674m;\n float f = this.f13668g;\n gVar.mo12728b(f);\n velocityTracker.computeCurrentVelocity(C8733j.DEFAULT_IMAGE_TIMEOUT_MS, f);\n float xVelocity = this.f13681t.getXVelocity(this.f13673l);\n float yVelocity = this.f13681t.getYVelocity(this.f13673l);\n if (xVelocity <= 0.0f) {\n i2 = 4;\n }\n float abs = Math.abs(xVelocity);\n if ((i2 & i) != 0 && i3 == i2) {\n C5319g gVar2 = this.f13674m;\n float f2 = this.f13667f;\n gVar2.mo12718a(f2);\n if (abs >= f2 && abs > Math.abs(yVelocity)) {\n return i2;\n }\n }\n }\n float width = ((float) this.f13679r.getWidth()) * this.f13674m.mo12693b(vVar);\n if ((i & i3) != 0 && Math.abs(this.f13669h) > width) {\n return i3;\n }\n }\n return 0;\n }", "public void mo3895e(C0820v vVar, C0788a0 a0Var) {\n int i;\n int i2;\n int i3;\n int i4;\n int i5;\n int i6;\n int i7;\n int i8;\n int i9 = -1;\n if (!(this.f3134D == null && this.f3131A == -1) && a0Var.mo4531b() == 0) {\n mo3876b(vVar);\n return;\n }\n C0785d dVar = this.f3134D;\n if (dVar != null && dVar.mo4360X()) {\n this.f3131A = this.f3134D.f3169c;\n }\n mo4317G();\n this.f3139t.f3155a = false;\n m3985Q();\n View g = mo4739g();\n if (!this.f3135E.f3150e || this.f3131A != -1 || this.f3134D != null) {\n this.f3135E.mo4351b();\n C0782a aVar = this.f3135E;\n aVar.f3149d = this.f3143x ^ this.f3144y;\n m4000b(vVar, a0Var, aVar);\n this.f3135E.f3150e = true;\n } else if (g != null && (this.f3140u.mo5117d(g) >= this.f3140u.mo5112b() || this.f3140u.mo5110a(g) <= this.f3140u.mo5120f())) {\n this.f3135E.mo4352b(g, mo4749l(g));\n }\n int h = mo4343h(a0Var);\n if (this.f3139t.f3164j >= 0) {\n i = h;\n h = 0;\n } else {\n i = 0;\n }\n int f = h + this.f3140u.mo5120f();\n int c = i + this.f3140u.mo5114c();\n if (a0Var.mo4536g()) {\n int i10 = this.f3131A;\n if (!(i10 == -1 || this.f3132B == Integer.MIN_VALUE)) {\n View c2 = mo4337c(i10);\n if (c2 != null) {\n if (this.f3143x) {\n i7 = this.f3140u.mo5112b() - this.f3140u.mo5110a(c2);\n i8 = this.f3132B;\n } else {\n i8 = this.f3140u.mo5117d(c2) - this.f3140u.mo5120f();\n i7 = this.f3132B;\n }\n int i11 = i7 - i8;\n if (i11 > 0) {\n f += i11;\n } else {\n c -= i11;\n }\n }\n }\n }\n if (!this.f3135E.f3149d ? !this.f3143x : this.f3143x) {\n i9 = 1;\n }\n mo4300a(vVar, a0Var, this.f3135E, i9);\n mo4699a(vVar);\n this.f3139t.f3166l = mo4324N();\n this.f3139t.f3163i = a0Var.mo4536g();\n C0782a aVar2 = this.f3135E;\n if (aVar2.f3149d) {\n m3997b(aVar2);\n C0784c cVar = this.f3139t;\n cVar.f3162h = f;\n mo4326a(vVar, cVar, a0Var, false);\n C0784c cVar2 = this.f3139t;\n i3 = cVar2.f3156b;\n int i12 = cVar2.f3158d;\n int i13 = cVar2.f3157c;\n if (i13 > 0) {\n c += i13;\n }\n m3989a(this.f3135E);\n C0784c cVar3 = this.f3139t;\n cVar3.f3162h = c;\n cVar3.f3158d += cVar3.f3159e;\n mo4326a(vVar, cVar3, a0Var, false);\n C0784c cVar4 = this.f3139t;\n i2 = cVar4.f3156b;\n int i14 = cVar4.f3157c;\n if (i14 > 0) {\n m4005h(i12, i3);\n C0784c cVar5 = this.f3139t;\n cVar5.f3162h = i14;\n mo4326a(vVar, cVar5, a0Var, false);\n i3 = this.f3139t.f3156b;\n }\n } else {\n m3989a(aVar2);\n C0784c cVar6 = this.f3139t;\n cVar6.f3162h = c;\n mo4326a(vVar, cVar6, a0Var, false);\n C0784c cVar7 = this.f3139t;\n i2 = cVar7.f3156b;\n int i15 = cVar7.f3158d;\n int i16 = cVar7.f3157c;\n if (i16 > 0) {\n f += i16;\n }\n m3997b(this.f3135E);\n C0784c cVar8 = this.f3139t;\n cVar8.f3162h = f;\n cVar8.f3158d += cVar8.f3159e;\n mo4326a(vVar, cVar8, a0Var, false);\n C0784c cVar9 = this.f3139t;\n i3 = cVar9.f3156b;\n int i17 = cVar9.f3157c;\n if (i17 > 0) {\n mo4305g(i15, i2);\n C0784c cVar10 = this.f3139t;\n cVar10.f3162h = i17;\n mo4326a(vVar, cVar10, a0Var, false);\n i2 = this.f3139t.f3156b;\n }\n }\n if (mo4732e() > 0) {\n if (this.f3143x ^ this.f3144y) {\n int a = m3986a(i2, vVar, a0Var, true);\n i5 = i3 + a;\n i4 = i2 + a;\n i6 = m3995b(i5, vVar, a0Var, false);\n } else {\n int b = m3995b(i3, vVar, a0Var, true);\n i5 = i3 + b;\n i4 = i2 + b;\n i6 = m3986a(i4, vVar, a0Var, false);\n }\n i3 = i5 + i6;\n i2 = i4 + i6;\n }\n m3999b(vVar, a0Var, i3, i2);\n if (!a0Var.mo4536g()) {\n this.f3140u.mo5124i();\n } else {\n this.f3135E.mo4351b();\n }\n this.f3141v = this.f3144y;\n }", "C20254v mo54454s(int i);", "public static void printVHSV(FqImage imh){\n\t\tint\ti,j;\r\n\t\tfor( i = 0 ; i < imh.width ; i++ ){\r\n\t\t\tfor( j = 0 ; j < imh.height ; j++ ){\r\n\t\t\t\tSystem.out.print(\"v\"+imh.points[i][j].getVHSV() );\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t}", "static void perform_mvi(String passed){\n\t\tint type = type_of_mvi(passed);\n\t\tif(type==1)\n\t\t\tmvi_to_reg(passed);\n\t\telse if(type==2)\n\t\t\tmvi_to_mem(passed);\n\t}", "void mo8280a(int i, int i2, C1207m c1207m);", "public abstract void mo9805a(int i, C3706s0 s0Var, C3625g1 g1Var);", "public void mo21880v() {\n }", "void mo7355c(C1655s sVar);", "public MVSR() {\n clg = \"MVSR\";\n cmax = 10000;\n mmax = 12000;\n eemax = 13033;\n emax = 18520;\n imax = 20204;\n }", "public abstract float mo12693b(C1085v vVar);", "private void m128166i() {\n boolean z;\n this.f104211a.f104243o = this.f104201K;\n this.f104211a.mo99796a(this.f104213c);\n this.f104211a.f104244p = this.f104200J;\n MvChoosePhotoFragment mvChoosePhotoFragment = this.f104211a;\n boolean z2 = false;\n if (this.f104224n == 1) {\n z = true;\n } else {\n z = false;\n }\n mvChoosePhotoFragment.f104144m = z;\n this.f104212b.mo99796a(this.f104214d);\n this.f104212b.f104151q = this.f104199I;\n this.f104212b.f104153s = this.f104202L;\n MvChoosePhotoFragment mvChoosePhotoFragment2 = this.f104211a;\n if (this.f104224n == 1) {\n z2 = true;\n }\n mvChoosePhotoFragment2.f104144m = z2;\n ArrayList arrayList = new ArrayList();\n if (this.f104195E == 2) {\n Intent intent = getIntent();\n if (intent != null) {\n arrayList.addAll(intent.getStringArrayListExtra(\"key_selected_video_path\"));\n }\n this.f104212b.mo99798a((List<String>) arrayList);\n this.f104211a.mo99798a((List<String>) arrayList);\n }\n this.f104233w.setText(getResources().getString(R.string.hs));\n Fragment a = getSupportFragmentManager().mo2644a(\"album_Fragment\");\n if (a == null) {\n this.f104235y = new MvChooseAlbumFragment();\n getSupportFragmentManager().mo2645a().mo2586a(R.id.aoy, this.f104235y, \"album_Fragment\").mo2604c();\n } else {\n this.f104235y = (MvChooseAlbumFragment) a;\n }\n Bundle bundle = new Bundle();\n bundle.putInt(\"key_support_flag\", this.f104198H);\n this.f104235y.setArguments(bundle);\n findViewById(R.id.us).setOnClickListener(new C40143p(this));\n this.f104235y.f104178g = new C40144q(this);\n m128167j();\n if (this.f104195E != 2) {\n this.f104212b.mo99803a((C40108b) new C40145r(this));\n }\n if (C40173d.f104443a.mo99939a(this.f104225o)) {\n m128160c((List<String>) arrayList);\n }\n }", "public void s_()\r\n/* 117: */ {\r\n/* 118:128 */ this.P = this.s;\r\n/* 119:129 */ this.Q = this.t;\r\n/* 120:130 */ this.R = this.u;\r\n/* 121:131 */ super.s_();\r\n/* 122:133 */ if (this.b > 0) {\r\n/* 123:134 */ this.b -= 1;\r\n/* 124: */ }\r\n/* 125:137 */ if (this.a)\r\n/* 126: */ {\r\n/* 127:138 */ if (this.o.p(new dt(this.c, this.d, this.e)).c() == this.f)\r\n/* 128: */ {\r\n/* 129:139 */ this.i += 1;\r\n/* 130:140 */ if (this.i == 1200) {\r\n/* 131:141 */ J();\r\n/* 132: */ }\r\n/* 133:143 */ return;\r\n/* 134: */ }\r\n/* 135:145 */ this.a = false;\r\n/* 136: */ \r\n/* 137:147 */ this.v *= this.V.nextFloat() * 0.2F;\r\n/* 138:148 */ this.w *= this.V.nextFloat() * 0.2F;\r\n/* 139:149 */ this.x *= this.V.nextFloat() * 0.2F;\r\n/* 140:150 */ this.i = 0;\r\n/* 141:151 */ this.ap = 0;\r\n/* 142: */ }\r\n/* 143: */ else\r\n/* 144: */ {\r\n/* 145:154 */ this.ap += 1;\r\n/* 146: */ }\r\n/* 147:157 */ brw localbrw1 = new brw(this.s, this.t, this.u);\r\n/* 148:158 */ brw localbrw2 = new brw(this.s + this.v, this.t + this.w, this.u + this.x);\r\n/* 149:159 */ bru localbru1 = this.o.a(localbrw1, localbrw2);\r\n/* 150: */ \r\n/* 151:161 */ localbrw1 = new brw(this.s, this.t, this.u);\r\n/* 152:162 */ localbrw2 = new brw(this.s + this.v, this.t + this.w, this.u + this.x);\r\n/* 153:163 */ if (localbru1 != null) {\r\n/* 154:164 */ localbrw2 = new brw(localbru1.c.a, localbru1.c.b, localbru1.c.c);\r\n/* 155: */ }\r\n/* 156:167 */ if (!this.o.D)\r\n/* 157: */ {\r\n/* 158:168 */ Object localObject = null;\r\n/* 159:169 */ List localList = this.o.b(this, aQ().a(this.v, this.w, this.x).b(1.0D, 1.0D, 1.0D));\r\n/* 160:170 */ double d1 = 0.0D;\r\n/* 161:171 */ xm localxm = n();\r\n/* 162:172 */ for (int k = 0; k < localList.size(); k++)\r\n/* 163: */ {\r\n/* 164:173 */ wv localwv = (wv)localList.get(k);\r\n/* 165:174 */ if ((localwv.ad()) && ((localwv != localxm) || (this.ap >= 5)))\r\n/* 166: */ {\r\n/* 167:178 */ float f5 = 0.3F;\r\n/* 168:179 */ brt localbrt = localwv.aQ().b(f5, f5, f5);\r\n/* 169:180 */ bru localbru2 = localbrt.a(localbrw1, localbrw2);\r\n/* 170:181 */ if (localbru2 != null)\r\n/* 171: */ {\r\n/* 172:182 */ double d2 = localbrw1.f(localbru2.c);\r\n/* 173:183 */ if ((d2 < d1) || (d1 == 0.0D))\r\n/* 174: */ {\r\n/* 175:184 */ localObject = localwv;\r\n/* 176:185 */ d1 = d2;\r\n/* 177: */ }\r\n/* 178: */ }\r\n/* 179: */ }\r\n/* 180: */ }\r\n/* 181:190 */ if (localObject != null) {\r\n/* 182:191 */ localbru1 = new bru(localObject);\r\n/* 183: */ }\r\n/* 184: */ }\r\n/* 185:195 */ if (localbru1 != null) {\r\n/* 186:196 */ if ((localbru1.a == brv.b) && (this.o.p(localbru1.a()).c() == aty.aY)) {\r\n/* 187:197 */ aq();\r\n/* 188: */ } else {\r\n/* 189:199 */ a(localbru1);\r\n/* 190: */ }\r\n/* 191: */ }\r\n/* 192:202 */ this.s += this.v;\r\n/* 193:203 */ this.t += this.w;\r\n/* 194:204 */ this.u += this.x;\r\n/* 195: */ \r\n/* 196:206 */ float f1 = uv.a(this.v * this.v + this.x * this.x);\r\n/* 197:207 */ this.y = ((float)(Math.atan2(this.v, this.x) * 180.0D / 3.141592741012573D));\r\n/* 198:208 */ this.z = ((float)(Math.atan2(this.w, f1) * 180.0D / 3.141592741012573D));\r\n/* 199:210 */ while (this.z - this.B < -180.0F) {\r\n/* 200:211 */ this.B -= 360.0F;\r\n/* 201: */ }\r\n/* 202:213 */ while (this.z - this.B >= 180.0F) {\r\n/* 203:214 */ this.B += 360.0F;\r\n/* 204: */ }\r\n/* 205:217 */ while (this.y - this.A < -180.0F) {\r\n/* 206:218 */ this.A -= 360.0F;\r\n/* 207: */ }\r\n/* 208:220 */ while (this.y - this.A >= 180.0F) {\r\n/* 209:221 */ this.A += 360.0F;\r\n/* 210: */ }\r\n/* 211:224 */ this.z = (this.B + (this.z - this.B) * 0.2F);\r\n/* 212:225 */ this.y = (this.A + (this.y - this.A) * 0.2F);\r\n/* 213: */ \r\n/* 214:227 */ float f2 = 0.99F;\r\n/* 215:228 */ float f3 = m();\r\n/* 216:230 */ if (V())\r\n/* 217: */ {\r\n/* 218:231 */ for (int j = 0; j < 4; j++)\r\n/* 219: */ {\r\n/* 220:232 */ float f4 = 0.25F;\r\n/* 221:233 */ this.o.a(ew.e, this.s - this.v * f4, this.t - this.w * f4, this.u - this.x * f4, this.v, this.w, this.x, new int[0]);\r\n/* 222: */ }\r\n/* 223:235 */ f2 = 0.8F;\r\n/* 224: */ }\r\n/* 225:238 */ this.v *= f2;\r\n/* 226:239 */ this.w *= f2;\r\n/* 227:240 */ this.x *= f2;\r\n/* 228:241 */ this.w -= f3;\r\n/* 229: */ \r\n/* 230:243 */ b(this.s, this.t, this.u);\r\n/* 231: */ }", "private void m1247a(LinearSystem eVar, boolean z, SolverVariable hVar, SolverVariable hVar2, EnumC0282a aVar, boolean z2, ConstraintAnchor eVar2, ConstraintAnchor eVar3, int i, int i2, int i3, int i4, float f, boolean z3, boolean z4, int i5, int i6, int i7, float f2, boolean z5) {\n SolverVariable hVar3;\n boolean z6;\n int i8;\n int i9;\n SolverVariable hVar4;\n SolverVariable hVar5;\n int i10;\n int i11;\n int i12;\n int i13;\n int i14;\n SolverVariable hVar6;\n boolean z7;\n int i15;\n SolverVariable hVar7;\n boolean z8;\n boolean z9;\n SolverVariable hVar8;\n SolverVariable hVar9;\n int i16;\n int i17;\n boolean z10;\n int i18;\n boolean z11;\n int i19;\n int i20;\n int i21;\n int i22;\n int i23;\n boolean z12;\n int i24;\n int i25;\n SolverVariable hVar10;\n SolverVariable hVar11;\n int i26;\n SolverVariable a = eVar.mo3927a(eVar2);\n SolverVariable a2 = eVar.mo3927a(eVar3);\n SolverVariable a3 = eVar.mo3927a(eVar2.mo3761g());\n SolverVariable a4 = eVar.mo3927a(eVar3.mo3761g());\n if (eVar.f1585c && eVar2.mo3751a().f1561i == 1 && eVar3.mo3751a().f1561i == 1) {\n if (LinearSystem.m1445a() != null) {\n LinearSystem.m1445a().f1621s++;\n }\n eVar2.mo3751a().mo3877a(eVar);\n eVar3.mo3751a().mo3877a(eVar);\n if (!z4 && z) {\n eVar.mo3935a(hVar2, a2, 0, 6);\n return;\n }\n return;\n }\n if (LinearSystem.m1445a() != null) {\n hVar3 = a4;\n LinearSystem.m1445a().f1600B++;\n } else {\n hVar3 = a4;\n }\n boolean j = eVar2.mo3764j();\n boolean j2 = eVar3.mo3764j();\n boolean j3 = this.f1497z.mo3764j();\n int i27 = j ? 1 : 0;\n if (j2) {\n i27++;\n }\n if (j3) {\n i27++;\n }\n int i28 = z3 ? 3 : i5;\n switch (aVar) {\n case FIXED:\n z6 = false;\n break;\n case WRAP_CONTENT:\n z6 = false;\n break;\n case MATCH_PARENT:\n z6 = false;\n break;\n case MATCH_CONSTRAINT:\n if (i28 != 4) {\n z6 = true;\n break;\n } else {\n z6 = false;\n break;\n }\n default:\n z6 = false;\n break;\n }\n if (this.f1470as == 8) {\n i8 = 0;\n z6 = false;\n } else {\n i8 = i2;\n }\n if (z5) {\n if (!j && !j2 && !j3) {\n eVar.mo3933a(a, i);\n } else if (j && !j2) {\n eVar.mo3943c(a, a3, eVar2.mo3759e(), 6);\n }\n }\n if (!z6) {\n if (z2) {\n eVar.mo3943c(a2, a, 0, 3);\n if (i3 > 0) {\n i26 = 6;\n eVar.mo3935a(a2, a, i3, 6);\n } else {\n i26 = 6;\n }\n if (i4 < Integer.MAX_VALUE) {\n eVar.mo3940b(a2, a, i4, i26);\n }\n } else {\n eVar.mo3943c(a2, a, i8, 6);\n }\n i11 = i6;\n i9 = i28;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i7;\n } else {\n if (i6 == -2) {\n i20 = i7;\n i21 = i8;\n } else {\n i21 = i6;\n i20 = i7;\n }\n if (i20 == -2) {\n i20 = i8;\n }\n if (i21 > 0) {\n i22 = 6;\n eVar.mo3935a(a2, a, i21, 6);\n i8 = Math.max(i8, i21);\n } else {\n i22 = 6;\n }\n if (i20 > 0) {\n eVar.mo3940b(a2, a, i20, i22);\n i8 = Math.min(i8, i20);\n i23 = 1;\n } else {\n i23 = 1;\n }\n if (i28 == i23) {\n if (z) {\n eVar.mo3943c(a2, a, i8, 6);\n i9 = i28;\n i11 = i21;\n i24 = i8;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i20;\n } else if (z4) {\n eVar.mo3943c(a2, a, i8, 4);\n i11 = i21;\n i24 = i8;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i20;\n i9 = i28;\n } else {\n eVar.mo3943c(a2, a, i8, 1);\n i11 = i21;\n i24 = i8;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i20;\n i9 = i28;\n }\n } else if (i28 == 2) {\n if (eVar2.mo3758d() == ConstraintAnchor.EnumC0280c.TOP || eVar2.mo3758d() == ConstraintAnchor.EnumC0280c.BOTTOM) {\n hVar10 = eVar.mo3927a(this.f1429D.mo3776a(ConstraintAnchor.EnumC0280c.TOP));\n hVar11 = eVar.mo3927a(this.f1429D.mo3776a(ConstraintAnchor.EnumC0280c.BOTTOM));\n } else {\n hVar10 = eVar.mo3927a(this.f1429D.mo3776a(ConstraintAnchor.EnumC0280c.LEFT));\n hVar11 = eVar.mo3927a(this.f1429D.mo3776a(ConstraintAnchor.EnumC0280c.RIGHT));\n }\n i11 = i21;\n i24 = i8;\n hVar5 = a3;\n i12 = i20;\n i9 = i28;\n i10 = i27;\n hVar4 = hVar3;\n eVar.mo3929a(eVar.mo3942c().mo3906a(a2, a, hVar11, hVar10, f2));\n z12 = false;\n if (z12 || i10 == 2 || z3) {\n z6 = z12;\n } else {\n int max = Math.max(i11, i24);\n if (i12 > 0) {\n max = Math.min(i12, max);\n i25 = 6;\n } else {\n i25 = 6;\n }\n eVar.mo3943c(a2, a, max, i25);\n z6 = false;\n }\n } else {\n i11 = i21;\n i24 = i8;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i20;\n i9 = i28;\n }\n z12 = z6;\n if (z12) {\n }\n z6 = z12;\n }\n if (z5 && !z4) {\n if (j || j2 || j3) {\n if (!j || j2) {\n if (!j && j2) {\n eVar.mo3943c(a2, hVar4, -eVar3.mo3759e(), 6);\n if (z) {\n eVar.mo3935a(a, hVar, 0, 5);\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n } else {\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n }\n } else if (!j || !j2) {\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n } else {\n if (z6) {\n if (z && i3 == 0) {\n eVar.mo3935a(a2, a, 0, 6);\n }\n if (i9 == 0) {\n if (i12 > 0 || i11 > 0) {\n i19 = 4;\n z11 = true;\n } else {\n i19 = 6;\n z11 = false;\n }\n hVar7 = hVar5;\n eVar.mo3943c(a, hVar7, eVar2.mo3759e(), i19);\n eVar.mo3943c(a2, hVar4, -eVar3.mo3759e(), i19);\n z8 = i12 > 0 || i11 > 0;\n z7 = z11;\n i15 = 5;\n } else {\n hVar7 = hVar5;\n if (i9 == 1) {\n z8 = true;\n i15 = 6;\n z7 = true;\n } else if (i9 == 3) {\n if (!z3) {\n if (this.f1487p != -1 && i12 <= 0) {\n i18 = 6;\n eVar.mo3943c(a, hVar7, eVar2.mo3759e(), i18);\n eVar.mo3943c(a2, hVar4, -eVar3.mo3759e(), i18);\n z8 = true;\n i15 = 5;\n z7 = true;\n }\n }\n i18 = 4;\n eVar.mo3943c(a, hVar7, eVar2.mo3759e(), i18);\n eVar.mo3943c(a2, hVar4, -eVar3.mo3759e(), i18);\n z8 = true;\n i15 = 5;\n z7 = true;\n } else {\n z8 = false;\n i15 = 5;\n z7 = false;\n }\n }\n } else {\n hVar7 = hVar5;\n z8 = true;\n i15 = 5;\n z7 = false;\n }\n if (z8) {\n hVar9 = hVar4;\n hVar8 = hVar7;\n hVar6 = a2;\n eVar.mo3934a(a, hVar7, eVar2.mo3759e(), f, hVar4, a2, eVar3.mo3759e(), i15);\n boolean z13 = eVar2.f1416c.f1414a instanceof Barrier;\n boolean z14 = eVar3.f1416c.f1414a instanceof Barrier;\n if (z13 && !z14) {\n z9 = z;\n z10 = true;\n i17 = 5;\n i16 = 6;\n if (z7) {\n }\n eVar.mo3935a(a, hVar8, eVar2.mo3759e(), i17);\n eVar.mo3940b(hVar6, hVar9, -eVar3.mo3759e(), i16);\n if (z) {\n }\n } else if (!z13 && z14) {\n z10 = z;\n i17 = 6;\n i16 = 5;\n z9 = true;\n if (z7) {\n i17 = 6;\n i16 = 6;\n }\n if ((!z6 && z9) || z7) {\n eVar.mo3935a(a, hVar8, eVar2.mo3759e(), i17);\n }\n if ((!z6 && z10) || z7) {\n eVar.mo3940b(hVar6, hVar9, -eVar3.mo3759e(), i16);\n }\n if (z) {\n i14 = 0;\n i13 = 6;\n eVar.mo3935a(a, hVar, 0, 6);\n } else {\n i14 = 0;\n i13 = 6;\n }\n }\n } else {\n hVar8 = hVar7;\n hVar9 = hVar4;\n hVar6 = a2;\n }\n z10 = z;\n z9 = z10;\n i17 = 5;\n i16 = 5;\n if (z7) {\n }\n eVar.mo3935a(a, hVar8, eVar2.mo3759e(), i17);\n eVar.mo3940b(hVar6, hVar9, -eVar3.mo3759e(), i16);\n if (z) {\n }\n }\n } else if (z) {\n eVar.mo3935a(hVar2, a2, 0, 5);\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n } else {\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n }\n } else if (z) {\n eVar.mo3935a(hVar2, a2, 0, 5);\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n } else {\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n }\n if (z) {\n eVar.mo3935a(hVar2, hVar6, i14, i13);\n }\n } else if (i10 < 2 && z) {\n eVar.mo3935a(a, hVar, 0, 6);\n eVar.mo3935a(hVar2, a2, 0, 6);\n }\n }", "private double calculateUvi(){\n if ( uva != Integer.MAX_VALUE\n && uvb != Integer.MAX_VALUE\n && uvd != Integer.MAX_VALUE\n && uvcomp1 != Integer.MAX_VALUE\n && uvcomp2 != Integer.MAX_VALUE\n )\n {\n // These equations came from the \"Designing the VEML6075 into an Application\" document from Vishay\n double uvacomp = (uva - uvd) - VEML_A_COEF * (uvcomp1 - uvd) - VEML_B_COEF * (uvcomp2 - uvd);\n double uvbcomp = (uvb - uvd) - VEML_C_COEF * (uvcomp1 - uvd) - VEML_D_COEF * (uvcomp2 - uvd);\n\n return ( (uvbcomp * VEML_UVB_RESP) + (uvacomp * VEML_UVA_RESP) ) / 2.0;\n }\n\n return Double.NaN;\n }", "public void mo3811g() {\n this.f1490s.mo3763i();\n this.f1491t.mo3763i();\n this.f1492u.mo3763i();\n this.f1493v.mo3763i();\n this.f1494w.mo3763i();\n this.f1495x.mo3763i();\n this.f1496y.mo3763i();\n this.f1497z.mo3763i();\n this.f1429D = null;\n this.f1461aj = 0.0f;\n this.f1430E = 0;\n this.f1431F = 0;\n this.f1432G = 0.0f;\n this.f1433H = -1;\n this.f1434I = 0;\n this.f1435J = 0;\n this.f1462ak = 0;\n this.f1463al = 0;\n this.f1464am = 0;\n this.f1465an = 0;\n this.f1438M = 0;\n this.f1439N = 0;\n this.f1440O = 0;\n this.f1441P = 0;\n this.f1442Q = 0;\n this.f1466ao = 0;\n this.f1467ap = 0;\n float f = f1425R;\n this.f1443S = f;\n this.f1444T = f;\n this.f1428C[0] = EnumC0282a.FIXED;\n this.f1428C[1] = EnumC0282a.FIXED;\n this.f1468aq = null;\n this.f1469ar = 0;\n this.f1470as = 0;\n this.f1472au = null;\n this.f1445U = false;\n this.f1446V = false;\n this.f1450Z = 0;\n this.f1452aa = 0;\n this.f1453ab = false;\n this.f1454ac = false;\n float[] fArr = this.f1455ad;\n fArr[0] = -1.0f;\n fArr[1] = -1.0f;\n this.f1451a = -1;\n this.f1473b = -1;\n int[] iArr = this.f1460ai;\n iArr[0] = Integer.MAX_VALUE;\n iArr[1] = Integer.MAX_VALUE;\n this.f1476e = 0;\n this.f1477f = 0;\n this.f1481j = 1.0f;\n this.f1484m = 1.0f;\n this.f1480i = Integer.MAX_VALUE;\n this.f1483l = Integer.MAX_VALUE;\n this.f1479h = 0;\n this.f1482k = 0;\n this.f1487p = -1;\n this.f1488q = 1.0f;\n ResolutionDimension nVar = this.f1474c;\n if (nVar != null) {\n nVar.mo3878b();\n }\n ResolutionDimension nVar2 = this.f1475d;\n if (nVar2 != null) {\n nVar2.mo3878b();\n }\n this.f1489r = null;\n this.f1447W = false;\n this.f1448X = false;\n this.f1449Y = false;\n }", "public int mo3833a(int i, C0820v vVar, C0788a0 a0Var) {\n m3935R();\n m3934Q();\n return super.mo3833a(i, vVar, a0Var);\n }", "public final void zzy(int i) throws zzlm {\n zznu zznu;\n int i2;\n int i3 = 0;\n if (i != 160) {\n if (i == 174) {\n String str = this.zzbal.zzaor;\n if (\"V_VP8\".equals(str) || \"V_VP9\".equals(str) || \"V_MPEG2\".equals(str) || \"V_MPEG4/ISO/SP\".equals(str) || \"V_MPEG4/ISO/ASP\".equals(str) || \"V_MPEG4/ISO/AP\".equals(str) || \"V_MPEG4/ISO/AVC\".equals(str) || \"V_MPEGH/ISO/HEVC\".equals(str) || \"V_MS/VFW/FOURCC\".equals(str) || \"V_THEORA\".equals(str) || \"A_OPUS\".equals(str) || \"A_VORBIS\".equals(str) || \"A_AAC\".equals(str) || \"A_MPEG/L2\".equals(str) || \"A_MPEG/L3\".equals(str) || \"A_AC3\".equals(str) || \"A_EAC3\".equals(str) || \"A_TRUEHD\".equals(str) || \"A_DTS\".equals(str) || \"A_DTS/EXPRESS\".equals(str) || \"A_DTS/LOSSLESS\".equals(str) || \"A_FLAC\".equals(str) || \"A_MS/ACM\".equals(str) || \"A_PCM/INT/LIT\".equals(str) || \"S_TEXT/UTF8\".equals(str) || \"S_VOBSUB\".equals(str) || \"S_HDMV/PGS\".equals(str) || \"S_DVBSUB\".equals(str)) {\n i3 = 1;\n }\n if (i3 != 0) {\n this.zzbal.zza(this.zzbbf, this.zzbal.number);\n this.zzazy.put(this.zzbal.number, this.zzbal);\n }\n this.zzbal = null;\n } else if (i != 19899) {\n if (i != 25152) {\n if (i != 28032) {\n if (i == 357149030) {\n if (this.zzanu == C1470C.TIME_UNSET) {\n this.zzanu = 1000000;\n }\n if (this.zzbak != C1470C.TIME_UNSET) {\n this.zzack = zzdw(this.zzbak);\n }\n } else if (i != 374648427) {\n if (i == 475249515 && !this.zzbam) {\n zznp zznp = this.zzbbf;\n if (this.zzans == -1 || this.zzack == C1470C.TIME_UNSET || this.zzban == null || this.zzban.size() == 0 || this.zzbao == null || this.zzbao.size() != this.zzban.size()) {\n this.zzban = null;\n this.zzbao = null;\n zznu = new zznv(this.zzack);\n } else {\n int size = this.zzban.size();\n int[] iArr = new int[size];\n long[] jArr = new long[size];\n long[] jArr2 = new long[size];\n long[] jArr3 = new long[size];\n for (int i4 = 0; i4 < size; i4++) {\n jArr3[i4] = this.zzban.get(i4);\n jArr[i4] = this.zzans + this.zzbao.get(i4);\n }\n while (true) {\n i2 = size - 1;\n if (i3 >= i2) {\n break;\n }\n int i5 = i3 + 1;\n iArr[i3] = (int) (jArr[i5] - jArr[i3]);\n jArr2[i3] = jArr3[i5] - jArr3[i3];\n i3 = i5;\n }\n iArr[i2] = (int) ((this.zzans + this.zzant) - jArr[i2]);\n jArr2[i2] = this.zzack - jArr3[i2];\n this.zzban = null;\n this.zzbao = null;\n zznu = new zznl(iArr, jArr, jArr2, jArr3);\n }\n zznp.zza(zznu);\n this.zzbam = true;\n }\n } else if (this.zzazy.size() != 0) {\n this.zzbbf.zzfi();\n } else {\n throw new zzlm(\"No valid tracks were found\");\n }\n } else if (this.zzbal.zzaos && this.zzbal.zzbbi != null) {\n throw new zzlm(\"Combining encryption and compression is not supported\");\n }\n } else if (!this.zzbal.zzaos) {\n } else {\n if (this.zzbal.zzbbj != null) {\n this.zzbal.zzatr = new zzne(new zzne.zza(zzkt.zzarg, MimeTypes.VIDEO_WEBM, this.zzbal.zzbbj.zzazq));\n return;\n }\n throw new zzlm(\"Encrypted Track found but ContentEncKeyID was not found\");\n }\n } else if (this.zzanz == -1 || this.zzaoa == -1) {\n throw new zzlm(\"Mandatory element SeekID or SeekPosition not found\");\n } else if (this.zzanz == 475249515) {\n this.zzaoc = this.zzaoa;\n }\n } else if (this.zzbap == 2) {\n if (!this.zzaop) {\n this.zzbax |= 1;\n }\n zza(this.zzazy.get(this.zzbav), this.zzbaq);\n this.zzbap = 0;\n }\n }", "int ibonl (int ud, int v);", "public static void c0_vl() {\n\t}", "public abstract void mo102585a(VH vh, int i);", "C11316t5 mo29022j0();", "public abstract void mo9804a(int i, C3706s0 s0Var);", "@Test\n @Tag(\"slow\")\n public void testSCFXM3() {\n CuteNetlibCase.doTest(\"SCFXM3.SIF\", \"54901.2545497515\", null, NumberContext.of(7, 4));\n }", "private String getUpdatedVValue(String line,Dimension texdim)\n {\n Double factor = reftexsize/texdim.getHeight();\n if(texdim.getHeight()==texdim.getWidth())\n {\n factor = reftexsize/texdim.getHeight();\n }\n dtexv = getTextureV(line);\n\n dtexv[0]*=factor;\n dtexv[1]*=factor;\n dtexv[2]*=factor;\n\n return \" TextureV \"+dtexv[0]+\",\"+dtexv[1]+\",\"+dtexv[2];\n }", "public int mo3833a(int i, C0820v vVar, C0788a0 a0Var) {\n if (this.f3138s == 1) {\n return 0;\n }\n return mo4335c(i, vVar, a0Var);\n }", "public void m21417a(as asVar, bc bcVar) throws bv {\n asVar.mo7186f();\n while (true) {\n ap h = asVar.mo7188h();\n if (h.f18595b == (byte) 0) {\n asVar.mo7187g();\n bcVar.m21466o();\n return;\n }\n int i;\n switch (h.f18596c) {\n case (short) 1:\n if (h.f18595b != (byte) 13) {\n at.m21234a(asVar, h.f18595b);\n break;\n }\n ar j = asVar.mo7190j();\n bcVar.f18795a = new HashMap(j.f18601c * 2);\n for (i = 0; i < j.f18601c; i++) {\n String v = asVar.mo7202v();\n bb bbVar = new bb();\n bbVar.mo7211a(asVar);\n bcVar.f18795a.put(v, bbVar);\n }\n asVar.mo7191k();\n bcVar.m21448a(true);\n break;\n case (short) 2:\n if (h.f18595b != Ascii.SI) {\n at.m21234a(asVar, h.f18595b);\n break;\n }\n aq l = asVar.mo7192l();\n bcVar.f18796b = new ArrayList(l.f18598b);\n for (i = 0; i < l.f18598b; i++) {\n ba baVar = new ba();\n baVar.mo7211a(asVar);\n bcVar.f18796b.add(baVar);\n }\n asVar.mo7193m();\n bcVar.m21452b(true);\n break;\n case (short) 3:\n if (h.f18595b != Ascii.VT) {\n at.m21234a(asVar, h.f18595b);\n break;\n }\n bcVar.f18797c = asVar.mo7202v();\n bcVar.m21454c(true);\n break;\n default:\n at.m21234a(asVar, h.f18595b);\n break;\n }\n asVar.mo7189i();\n }\n }", "static void vectorTable() {\r\n\t\tUS.ASM(\"b 0xf8\"); // jump to reset method (0x100 - 8 - 0)\r\n\t\tUS.ASM(\"b 0x7f4\"); // undefined instruction (0x800 - 8 - 4)\r\n\t\tUS.ASM(\"b 0x1f0\"); // jump to supervisor call (0x200 - 8 - 8)\r\n\t\tUS.ASM(\"b 0x8ec\"); // prefetch abort, stop here (0x900 - 8 - 0xc)\r\n\t\tUS.ASM(\"b 0x9e8\"); // data abort, stop here (0xa00 - 8 - 0x10)\r\n\t\tUS.ASM(\"b -8\"); // not used, stop here\r\n\t\tUS.ASM(\"b 0x3e0\"); // jump to IRQ interrupt (0x400 - 8 - 0x18)\r\n\t\tUS.ASM(\"b -8\"); // FIQ, stop here\r\n\t}", "void mo7358f(C1655s sVar);", "C5537g mo4096b(int i);", "public final void mo23206tL(int i) {\n AppMethodBeat.m2504i(18979);\n C11486d.this.kIr = false;\n C9638aw.m17190ZK();\n C7580z Ry = C18628c.m29072Ry();\n C11486d.this.kIv = System.currentTimeMillis();\n if (i == 0) {\n Ry.setLong(237569, C11486d.this.kIv);\n if (z) {\n C11486d.this.kIw = C11486d.this.kIw + 1;\n } else {\n C11486d.this.kIw = 0;\n }\n Ry.setInt(237570, C11486d.this.kIw);\n } else {\n if (i != 1) {\n Ry.setLong(237569, C11486d.this.kIv);\n if (z) {\n C11486d.this.kIw = 10;\n Ry.setInt(237570, C11486d.this.kIw);\n }\n }\n AppMethodBeat.m2505o(18979);\n }\n Ry.dsb();\n AppMethodBeat.m2505o(18979);\n }", "private int m3423z(int i, int i2) {\n int i3;\n int i4;\n for (int size = this.f4373c.size() - 1; size >= 0; size--) {\n C0933b bVar = this.f4373c.get(size);\n int i5 = bVar.f4379a;\n if (i5 == 8) {\n int i6 = bVar.f4380b;\n int i7 = bVar.f4382d;\n if (i6 < i7) {\n i4 = i6;\n i3 = i7;\n } else {\n i3 = i6;\n i4 = i7;\n }\n if (i < i4 || i > i3) {\n if (i < i6) {\n if (i2 == 1) {\n bVar.f4380b = i6 + 1;\n bVar.f4382d = i7 + 1;\n } else if (i2 == 2) {\n bVar.f4380b = i6 - 1;\n bVar.f4382d = i7 - 1;\n }\n }\n } else if (i4 == i6) {\n if (i2 == 1) {\n bVar.f4382d = i7 + 1;\n } else if (i2 == 2) {\n bVar.f4382d = i7 - 1;\n }\n i++;\n } else {\n if (i2 == 1) {\n bVar.f4380b = i6 + 1;\n } else if (i2 == 2) {\n bVar.f4380b = i6 - 1;\n }\n i--;\n }\n } else {\n int i8 = bVar.f4380b;\n if (i8 <= i) {\n if (i5 == 1) {\n i -= bVar.f4382d;\n } else if (i5 == 2) {\n i += bVar.f4382d;\n }\n } else if (i2 == 1) {\n bVar.f4380b = i8 + 1;\n } else if (i2 == 2) {\n bVar.f4380b = i8 - 1;\n }\n }\n }\n for (int size2 = this.f4373c.size() - 1; size2 >= 0; size2--) {\n C0933b bVar2 = this.f4373c.get(size2);\n if (bVar2.f4379a == 8) {\n int i9 = bVar2.f4382d;\n if (i9 == bVar2.f4380b || i9 < 0) {\n this.f4373c.remove(size2);\n mo7620a(bVar2);\n }\n } else if (bVar2.f4382d <= 0) {\n this.f4373c.remove(size2);\n mo7620a(bVar2);\n }\n }\n return i;\n }", "private void m3988a(int i, int i2, boolean z, C0788a0 a0Var) {\n int i3;\n this.f3139t.f3166l = mo4324N();\n this.f3139t.f3162h = mo4343h(a0Var);\n C0784c cVar = this.f3139t;\n cVar.f3160f = i;\n int i4 = -1;\n if (i == 1) {\n cVar.f3162h += this.f3140u.mo5114c();\n View O = m3983O();\n C0784c cVar2 = this.f3139t;\n if (!this.f3143x) {\n i4 = 1;\n }\n cVar2.f3159e = i4;\n C0784c cVar3 = this.f3139t;\n int l = mo4749l(O);\n C0784c cVar4 = this.f3139t;\n cVar3.f3158d = l + cVar4.f3159e;\n cVar4.f3156b = this.f3140u.mo5110a(O);\n i3 = this.f3140u.mo5110a(O) - this.f3140u.mo5112b();\n } else {\n View P = m3984P();\n this.f3139t.f3162h += this.f3140u.mo5120f();\n C0784c cVar5 = this.f3139t;\n if (this.f3143x) {\n i4 = 1;\n }\n cVar5.f3159e = i4;\n C0784c cVar6 = this.f3139t;\n int l2 = mo4749l(P);\n C0784c cVar7 = this.f3139t;\n cVar6.f3158d = l2 + cVar7.f3159e;\n cVar7.f3156b = this.f3140u.mo5117d(P);\n i3 = (-this.f3140u.mo5117d(P)) + this.f3140u.mo5120f();\n }\n C0784c cVar8 = this.f3139t;\n cVar8.f3157c = i2;\n if (z) {\n cVar8.f3157c -= i3;\n }\n this.f3139t.f3161g = i3;\n }", "private static float[] qinv(float[] d, float[] s) {\n \td[0] = s[0];\n \td[1] = -s[1];\n \td[2] = -s[2];\n \td[3] = -s[3];\n \treturn(d);\n }", "public interface C11859a {\n void bvs();\n }", "void mo7356d(C1655s sVar);", "public void mo21797V() {\n this.f24532d.mo21926U();\n }", "boolean mo25263a(String str, String str2, boolean z, int i, int i2, int i3, boolean z2, C4619b bVar, boolean z3);", "private boolean aYV() {\n /*\n r4 = this;\n r3 = 1;\n r2 = 0;\n r0 = com.android.common.custom.C0421M.dC();\n r0 = r0.dD();\n r0 = r0.bU();\n if (r0 != 0) goto L_0x001d;\n L_0x0010:\n r0 = r4.aiG;\n r0 = r0.SY();\n r0 = r0.tx();\n if (r0 == 0) goto L_0x001d;\n L_0x001c:\n return r2;\n L_0x001d:\n r0 = r4.aIO;\n if (r0 == 0) goto L_0x0041;\n L_0x0021:\n r0 = r4.aiG;\n r0 = r0.Td();\n r0 = r0.NF();\n if (r0 != 0) goto L_0x0041;\n L_0x002d:\n r0 = r4.aiG;\n r0 = r0.TE();\n r0 = r0.Ll();\n if (r0 == 0) goto L_0x0041;\n L_0x0039:\n r0 = r4.asP();\n r1 = com.android.common.camerastate.UIState.CAMERA_FAMILY;\n if (r0 != r1) goto L_0x0042;\n L_0x0041:\n return r2;\n L_0x0042:\n r0 = r4.aiG;\n r0 = r0.Td();\n r0 = r0.NP();\n if (r0 != 0) goto L_0x0041;\n L_0x004e:\n r0 = r4.asJ();\n r1 = com.android.common.camerastate.DeviceState.SNAPSHOT_IN_PROGRESS;\n if (r0 == r1) goto L_0x0041;\n L_0x0056:\n r0 = r4.aiG;\n r0 = r0.SQ();\n r1 = com.android.common.cameradevice.C0384o.Jr();\n r1 = r1.Jt();\n if (r0 != r1) goto L_0x0067;\n L_0x0066:\n return r2;\n L_0x0067:\n r0 = r4.aiG;\n r0 = r0.To();\n switch(r0) {\n case 0: goto L_0x0073;\n case 90: goto L_0x0084;\n case 180: goto L_0x0073;\n case 270: goto L_0x0084;\n default: goto L_0x0070;\n };\n L_0x0070:\n r0 = r4.aID;\n return r0;\n L_0x0073:\n r0 = r4.aIK;\n r0 = java.lang.Math.abs(r0);\n r1 = r4.aIJ;\n r1 = java.lang.Math.abs(r1);\n if (r0 <= r1) goto L_0x0070;\n L_0x0081:\n r4.aID = r3;\n goto L_0x0070;\n L_0x0084:\n r0 = r4.aIJ;\n r0 = java.lang.Math.abs(r0);\n r1 = r4.aIK;\n r1 = java.lang.Math.abs(r1);\n if (r0 <= r1) goto L_0x0070;\n L_0x0092:\n r4.aID = r3;\n goto L_0x0070;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.camera.Camera.aYV():boolean\");\n }", "private final void asx() {\n /*\n r12 = this;\n r0 = r12.cFE;\n if (r0 == 0) goto L_0x0073;\n L_0x0004:\n r1 = r12.cxs;\n if (r1 == 0) goto L_0x0073;\n L_0x0008:\n r1 = r12.ayL;\n if (r1 != 0) goto L_0x000d;\n L_0x000c:\n goto L_0x0073;\n L_0x000d:\n r2 = 0;\n if (r1 == 0) goto L_0x0027;\n L_0x0010:\n r1 = r1.Km();\n if (r1 == 0) goto L_0x0027;\n L_0x0016:\n r1 = r1.aar();\n if (r1 == 0) goto L_0x0027;\n L_0x001c:\n r3 = r0.getName();\n r1 = r1.get(r3);\n r1 = (java.util.ArrayList) r1;\n goto L_0x0028;\n L_0x0027:\n r1 = r2;\n L_0x0028:\n if (r1 == 0) goto L_0x0051;\n L_0x002a:\n r1 = (java.lang.Iterable) r1;\n r1 = kotlin.collections.u.Z(r1);\n if (r1 == 0) goto L_0x0051;\n L_0x0032:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$1;\n r3.<init>(r12);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.b(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x003f:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$2;\n r3.<init>(r0);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.f(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x004c:\n r1 = kotlin.sequences.n.f(r1);\n goto L_0x0052;\n L_0x0051:\n r1 = r2;\n L_0x0052:\n r3 = r12.asr();\n if (r1 == 0) goto L_0x0059;\n L_0x0058:\n goto L_0x005d;\n L_0x0059:\n r1 = kotlin.collections.m.emptyList();\n L_0x005d:\n r4 = r12.bub;\n if (r4 == 0) goto L_0x006d;\n L_0x0061:\n r5 = 0;\n r6 = 0;\n r7 = 1;\n r8 = 0;\n r9 = 0;\n r10 = 19;\n r11 = 0;\n r2 = com.iqoption.core.util.e.a(r4, r5, r6, r7, r8, r9, r10, r11);\n L_0x006d:\n r3.c(r1, r2);\n r12.d(r0);\n L_0x0073:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.asx():void\");\n }", "void mo7357e(C1655s sVar);", "void mo7354b(C1655s sVar);", "@Override\n public void apply$mcVD$sp (double arg0)\n {\n\n }", "public static void vu0Start() { }", "private List<C1085v> m15035c(C1085v vVar) {\n C1085v vVar2 = vVar;\n List<C1085v> list = this.f13682u;\n if (list == null) {\n this.f13682u = new ArrayList();\n this.f13683v = new ArrayList();\n } else {\n list.clear();\n this.f13683v.clear();\n }\n int a = this.f13674m.mo12720a();\n int round = Math.round(this.f13671j + this.f13669h) - a;\n int round2 = Math.round(this.f13672k + this.f13670i) - a;\n int i = a * 2;\n int width = vVar2.itemView.getWidth() + round + i;\n int height = vVar2.itemView.getHeight() + round2 + i;\n int i2 = (round + width) / 2;\n int i3 = (round2 + height) / 2;\n LayoutManager layoutManager = this.f13679r.getLayoutManager();\n int e = layoutManager.mo5278e();\n int i4 = 0;\n while (i4 < e) {\n View c = layoutManager.mo5265c(i4);\n if (c != vVar2.itemView && c.getBottom() >= round2 && c.getTop() <= height && c.getRight() >= round && c.getLeft() <= width) {\n C1085v g = this.f13679r.mo5094g(c);\n if (this.f13674m.mo12727a(this.f13679r, this.f13664c, g)) {\n int abs = Math.abs(i2 - ((c.getLeft() + c.getRight()) / 2));\n int abs2 = Math.abs(i3 - ((c.getTop() + c.getBottom()) / 2));\n int i5 = (abs * abs) + (abs2 * abs2);\n int size = this.f13682u.size();\n int i6 = 0;\n int i7 = 0;\n while (i6 < size && i5 > ((Integer) this.f13683v.get(i6)).intValue()) {\n i7++;\n i6++;\n C1085v vVar3 = vVar;\n }\n this.f13682u.add(i7, g);\n this.f13683v.add(i7, Integer.valueOf(i5));\n }\n }\n i4++;\n vVar2 = vVar;\n }\n return this.f13682u;\n }", "void mo7351a(C1655s sVar);", "void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);", "protected void o()\r\n/* 156: */ {\r\n/* 157:179 */ int i = 15 - aib.b(this);\r\n/* 158:180 */ float f = 0.98F + i * 0.001F;\r\n/* 159: */ \r\n/* 160:182 */ this.xVelocity *= f;\r\n/* 161:183 */ this.yVelocity *= 0.0D;\r\n/* 162:184 */ this.zVelocity *= f;\r\n/* 163: */ }", "public void mo7778r() {\n C1617m mVar;\n C1680l lVar;\n long j;\n C1605b c = this.f5559c.mo7539c(C1613i.f5305hP);\n if (c instanceof C1604a) {\n C1604a aVar = (C1604a) c;\n C1604a aVar2 = (C1604a) this.f5559c.mo7539c(C1613i.f5122ds);\n if (aVar2 == null) {\n aVar2 = new C1604a();\n aVar2.mo7490a((C1605b) C1612h.f4886a);\n aVar2.mo7490a(this.f5559c.mo7539c(C1613i.f5288gz));\n }\n ArrayList arrayList = new ArrayList();\n Iterator<C1605b> it = aVar2.iterator();\n while (true) {\n if (!it.hasNext()) {\n break;\n }\n long b = ((C1612h) it.next()).mo7585b();\n int c2 = ((C1612h) it.next()).mo7586c();\n for (int i = 0; i < c2; i++) {\n arrayList.add(Long.valueOf(((long) i) + b));\n }\n }\n Iterator it2 = arrayList.iterator();\n int c3 = aVar.mo7498c(0);\n int c4 = aVar.mo7498c(1);\n int c5 = aVar.mo7498c(2);\n int i2 = c3 + c4 + c5;\n while (!this.f5510a.mo7797d() && it2.hasNext()) {\n byte[] bArr = new byte[i2];\n this.f5510a.mo7789a(bArr);\n int i3 = 0;\n for (int i4 = 0; i4 < c3; i4++) {\n i3 += (bArr[i4] & 255) << (((c3 - i4) - 1) * 8);\n }\n Long l = (Long) it2.next();\n switch (i3) {\n case 1:\n int i5 = 0;\n for (int i6 = 0; i6 < c4; i6++) {\n i5 += (bArr[i6 + c3] & 255) << (((c4 - i6) - 1) * 8);\n }\n int i7 = 0;\n for (int i8 = 0; i8 < c5; i8++) {\n i7 += (bArr[(i8 + c3) + c4] & 255) << (((c5 - i8) - 1) * 8);\n }\n mVar = new C1617m(l.longValue(), i7);\n lVar = this.f5560d;\n j = (long) i5;\n break;\n case 2:\n int i9 = 0;\n for (int i10 = 0; i10 < c4; i10++) {\n i9 += (bArr[i10 + c3] & 255) << (((c4 - i10) - 1) * 8);\n }\n mVar = new C1617m(l.longValue(), 0);\n lVar = this.f5560d;\n j = (long) (-i9);\n break;\n }\n lVar.mo7812a(mVar, j);\n }\n return;\n }\n throw new IOException(\"/W array is missing in Xref stream\");\n }", "void mo1487a(C0254m0 m0Var);", "public final void mo9814c(int i) {\n if (!C3670m.f9104c || C3609d.m8184a() || mo9797a() < 5) {\n while ((i & -128) != 0) {\n byte[] bArr = this.f9110d;\n int i2 = this.f9112f;\n this.f9112f = i2 + 1;\n bArr[i2] = (byte) ((i & 127) | 128);\n i >>>= 7;\n }\n try {\n byte[] bArr2 = this.f9110d;\n int i3 = this.f9112f;\n this.f9112f = i3 + 1;\n bArr2[i3] = (byte) i;\n } catch (IndexOutOfBoundsException e) {\n throw new C3674d(String.format(\"Pos: %d, limit: %d, len: %d\", new Object[]{Integer.valueOf(this.f9112f), Integer.valueOf(this.f9111e), Integer.valueOf(1)}), e);\n }\n } else if ((i & -128) == 0) {\n byte[] bArr3 = this.f9110d;\n int i4 = this.f9112f;\n this.f9112f = i4 + 1;\n C3691q1.m8815a(bArr3, (long) i4, (byte) i);\n } else {\n byte[] bArr4 = this.f9110d;\n int i5 = this.f9112f;\n this.f9112f = i5 + 1;\n C3691q1.m8815a(bArr4, (long) i5, (byte) (i | 128));\n int i6 = i >>> 7;\n if ((i6 & -128) == 0) {\n byte[] bArr5 = this.f9110d;\n int i7 = this.f9112f;\n this.f9112f = i7 + 1;\n C3691q1.m8815a(bArr5, (long) i7, (byte) i6);\n return;\n }\n byte[] bArr6 = this.f9110d;\n int i8 = this.f9112f;\n this.f9112f = i8 + 1;\n C3691q1.m8815a(bArr6, (long) i8, (byte) (i6 | 128));\n int i9 = i6 >>> 7;\n if ((i9 & -128) == 0) {\n byte[] bArr7 = this.f9110d;\n int i10 = this.f9112f;\n this.f9112f = i10 + 1;\n C3691q1.m8815a(bArr7, (long) i10, (byte) i9);\n return;\n }\n byte[] bArr8 = this.f9110d;\n int i11 = this.f9112f;\n this.f9112f = i11 + 1;\n C3691q1.m8815a(bArr8, (long) i11, (byte) (i9 | 128));\n int i12 = i9 >>> 7;\n if ((i12 & -128) == 0) {\n byte[] bArr9 = this.f9110d;\n int i13 = this.f9112f;\n this.f9112f = i13 + 1;\n C3691q1.m8815a(bArr9, (long) i13, (byte) i12);\n return;\n }\n byte[] bArr10 = this.f9110d;\n int i14 = this.f9112f;\n this.f9112f = i14 + 1;\n C3691q1.m8815a(bArr10, (long) i14, (byte) (i12 | 128));\n int i15 = i12 >>> 7;\n byte[] bArr11 = this.f9110d;\n int i16 = this.f9112f;\n this.f9112f = i16 + 1;\n C3691q1.m8815a(bArr11, (long) i16, (byte) i15);\n }\n }", "private void init(myVector[] _initSt, SnowGlobeWin.SolverType _solv) {\n\t\tcurIDX = 0;\t\t\t\t\t\t\t\t\t//cycling ptr to idx in arrays of current sim values\n\t\t\n\t\taPosition = new myVector[szAcc];\n\t\taLinMomentum = new myVector[szAcc];\n\t\taAngMomentum = new myVector[szAcc];\n\t\taForceAcc = new myVector[szAcc];\n\t\taTorqueAcc = new myVector[szAcc];\n\t\taOldPos = new myVector[szAcc];\n\t\taOldLinMmnt = new myVector[szAcc];\n\t\taOldAngMmnt = new myVector[szAcc];\n\t\taOldForceAcc = new myVector[szAcc];\n\t\taOldTorqueAcc = new myVector[szAcc];\n\t\t\n\t\tfor(int i=0;i<szAcc;++i){\n\t\t\taPosition[i] = new myVector();\n\t\t\taLinMomentum[i] = new myVector();\n\t\t\taAngMomentum[i] = new myVector();\n\t\t\taForceAcc[i] = new myVector();\n\t\t\taTorqueAcc[i] = new myVector();\n\t\t\taOldPos[i] = new myVector();\n\t\t\taOldLinMmnt[i] = new myVector();\n\t\t\taOldAngMmnt[i] = new myVector();\n\t\t\taOldForceAcc[i] = new myVector();\n\t\t\taOldTorqueAcc[i] = new myVector();\n\t\t}\n//\t\taPosition[0].set(_pos);\n//\t\taLinMomentum[0].set(_velocity);\n//\t\taAngMomentum[0].set(_velocity);\n//\t\taForceAcc[0].set(_forceAcc);\n//\t\taTorqueAcc.set(_forceAcc);\n//\t\taOldPos[0].set(_pos);\n//\t\taOldLinMmnt[0].set(_velocity);\n//\t\taOldAngMmnt[0].set(_velocity);\n//\t\taOldForceAcc[0].set(_forceAcc);\n//\t\taOldTorqueAcc[0].set(_forceAcc);\n\t\t\n\t\tsetOrigMass(mass);\n//\t\tinitPos = new myVector(_pos);\n//\t\tinitVel = new myVector(_velocity);\n\t\tsolveType = _solv;\n\t\tsolver = new mySolver( _solv);\n\t}", "void mo12647a(C3333i iVar);", "public static String[][] m3427b() {\n Vector vector = new Vector();\n String[][] f = C5030by.m3323f();\n if (f != null) {\n for (int length = f.length - 1; length >= 0; length--) {\n vector.addElement(f[length]);\n }\n }\n String[][] a = C5047co.m3446a();\n if (a != null) {\n for (int length2 = a.length - 1; length2 >= 0; length2--) {\n vector.addElement(a[length2]);\n }\n }\n String[][] a2 = C5075dp.m3559a();\n if (a2 != null) {\n for (int length3 = a2.length - 1; length3 >= 0; length3--) {\n vector.addElement(a2[length3]);\n }\n }\n String[][] a3 = C5070dk.m3552a();\n if (a3 != null) {\n for (int length4 = a3.length - 1; length4 >= 0; length4--) {\n vector.addElement(a3[length4]);\n }\n }\n String[][] a4 = C5061db.m3525a();\n if (a4 != null) {\n for (int length5 = a4.length - 1; length5 >= 0; length5--) {\n vector.addElement(a4[length5]);\n }\n }\n String[][] o = C5034cb.m3377o();\n if (o != null) {\n for (int length6 = o.length - 1; length6 >= 0; length6--) {\n vector.addElement(o[length6]);\n }\n }\n String[][] a5 = C4984aq.m3190a();\n if (a5 != null) {\n for (int length7 = a5.length - 1; length7 >= 0; length7--) {\n vector.addElement(a5[length7]);\n }\n }\n String[][] a6 = m3426a();\n if (a6 != null) {\n for (int length8 = a6.length - 1; length8 >= 0; length8--) {\n vector.addElement(a6[length8]);\n }\n }\n String[][] strArr = (String[][]) Array.newInstance(String.class, new int[]{vector.size(), 4});\n if (strArr != null) {\n for (int length9 = strArr.length - 1; length9 >= 0; length9--) {\n strArr[length9] = (String[]) vector.elementAt(length9);\n }\n }\n return strArr;\n }", "public void InitLinearLV() throws Exception{\n\tcommandExec c1 = new commandExec();\n\tc1.runCommand(\"lvcreate -n LinearLV -l 50%VG /dev/TargetVG\" );\n}", "private int m3995b(int i, C0820v vVar, C0788a0 a0Var, boolean z) {\n int f = i - this.f3140u.mo5120f();\n if (f <= 0) {\n return 0;\n }\n int i2 = -mo4335c(f, vVar, a0Var);\n int i3 = i + i2;\n if (z) {\n int f2 = i3 - this.f3140u.mo5120f();\n if (f2 > 0) {\n this.f3140u.mo5111a(-f2);\n i2 -= f2;\n }\n }\n return i2;\n }", "private int m3986a(int i, C0820v vVar, C0788a0 a0Var, boolean z) {\n int b = this.f3140u.mo5112b() - i;\n if (b <= 0) {\n return 0;\n }\n int i2 = -mo4335c(-b, vVar, a0Var);\n int i3 = i + i2;\n if (z) {\n int b2 = this.f3140u.mo5112b() - i3;\n if (b2 > 0) {\n this.f3140u.mo5111a(b2);\n return b2 + i2;\n }\n }\n return i2;\n }", "public void mo9805a(int i, C3706s0 s0Var, C3625g1 g1Var) {\n mo9814c((i << 3) | 2);\n mo9814c(((C3588a) s0Var).getSerializedSize(g1Var));\n g1Var.mo9646a(s0Var, (C3722v1) this.f9105a);\n }", "protected final void parseV() {\n current = read();\n skipSpaces();\n\n for (;;) {\n switch (current) {\n case '+': case '-': case '.':\n case '0': case '1': case '2': case '3': case '4':\n case '5': case '6': case '7': case '8': case '9':\n float y = parseNumber();\n smoothQCenterX = currentX;\n smoothCCenterX = currentX;\n\n currentY = y;\n smoothQCenterY = y;\n smoothCCenterY = y;\n p.lineTo(smoothCCenterX, smoothCCenterY);\n break;\n default:\n return;\n }\n skipCommaSpaces();\n }\n }", "public void mo12703a(C1085v vVar) {\n if (!this.f13679r.isLayoutRequested() && this.f13675n == 2) {\n float a = this.f13674m.mo12719a(vVar);\n int i = (int) (this.f13671j + this.f13669h);\n int i2 = (int) (this.f13672k + this.f13670i);\n if (((float) Math.abs(i2 - vVar.itemView.getTop())) >= ((float) vVar.itemView.getHeight()) * a || ((float) Math.abs(i - vVar.itemView.getLeft())) >= ((float) vVar.itemView.getWidth()) * a) {\n List c = m15035c(vVar);\n if (c.size() != 0) {\n C1085v a2 = this.f13674m.mo12723a(vVar, c, i, i2);\n if (a2 == null) {\n this.f13682u.clear();\n this.f13683v.clear();\n return;\n }\n int adapterPosition = a2.getAdapterPosition();\n int adapterPosition2 = vVar.getAdapterPosition();\n if (this.f13674m.mo12695b(this.f13679r, vVar, a2)) {\n this.f13674m.mo12726a(this.f13679r, vVar, adapterPosition2, a2, adapterPosition, i, i2);\n }\n }\n }\n }\n }", "static int m22556b(zzwt zzwt, cu cuVar) {\n zztw zztw = (zztw) zzwt;\n int d = zztw.mo4835d();\n if (d == -1) {\n d = cuVar.mo3068b(zztw);\n zztw.mo4833a(d);\n }\n return m22576g(d) + d;\n }", "void mo15005a(C4143se seVar);", "C2841w mo7234g();", "@Test\n @Tag(\"bm1000\")\n public void testSCFXM1() {\n CuteNetlibCase.doTest(\"SCFXM1.SIF\", \"18416.75902834894\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCFXM2() {\n CuteNetlibCase.doTest(\"SCFXM2.SIF\", \"36660.261564998815\", null, NumberContext.of(7, 4));\n }", "public int mo3870b(int i, C0820v vVar, C0788a0 a0Var) {\n if (this.f3138s == 0) {\n return 0;\n }\n return mo4335c(i, vVar, a0Var);\n }", "public final void mo9805a(int i, C3706s0 s0Var, C3625g1 g1Var) {\n mo9814c((i << 3) | 2);\n mo9814c(((C3588a) s0Var).getSerializedSize(g1Var));\n g1Var.mo9646a(s0Var, (C3722v1) this.f9105a);\n }", "private void a(String paramString, boolean paramBoolean)\r\n/* 282: */ {\r\n/* 283:293 */ for (int i1 = 0; i1 < paramString.length(); i1++)\r\n/* 284: */ {\r\n/* 285:294 */ char c1 = paramString.charAt(i1);\r\n/* 286: */ int i2;\r\n/* 287: */ int i3;\r\n/* 288:296 */ if ((c1 == '§') && (i1 + 1 < paramString.length()))\r\n/* 289: */ {\r\n/* 290:297 */ i2 = \"0123456789abcdefklmnor\".indexOf(paramString.toLowerCase().charAt(i1 + 1));\r\n/* 291:299 */ if (i2 < 16)\r\n/* 292: */ {\r\n/* 293:300 */ this.r = false;\r\n/* 294:301 */ this.s = false;\r\n/* 295:302 */ this.v = false;\r\n/* 296:303 */ this.u = false;\r\n/* 297:304 */ this.t = false;\r\n/* 298:305 */ if ((i2 < 0) || (i2 > 15)) {\r\n/* 299:306 */ i2 = 15;\r\n/* 300: */ }\r\n/* 301:309 */ if (paramBoolean) {\r\n/* 302:310 */ i2 += 16;\r\n/* 303: */ }\r\n/* 304:313 */ i3 = this.f[i2];\r\n/* 305:314 */ this.q = i3;\r\n/* 306:315 */ cjm.c((i3 >> 16) / 255.0F, (i3 >> 8 & 0xFF) / 255.0F, (i3 & 0xFF) / 255.0F, this.p);\r\n/* 307: */ }\r\n/* 308:316 */ else if (i2 == 16)\r\n/* 309: */ {\r\n/* 310:317 */ this.r = true;\r\n/* 311: */ }\r\n/* 312:318 */ else if (i2 == 17)\r\n/* 313: */ {\r\n/* 314:319 */ this.s = true;\r\n/* 315: */ }\r\n/* 316:320 */ else if (i2 == 18)\r\n/* 317: */ {\r\n/* 318:321 */ this.v = true;\r\n/* 319: */ }\r\n/* 320:322 */ else if (i2 == 19)\r\n/* 321: */ {\r\n/* 322:323 */ this.u = true;\r\n/* 323: */ }\r\n/* 324:324 */ else if (i2 == 20)\r\n/* 325: */ {\r\n/* 326:325 */ this.t = true;\r\n/* 327: */ }\r\n/* 328:326 */ else if (i2 == 21)\r\n/* 329: */ {\r\n/* 330:327 */ this.r = false;\r\n/* 331:328 */ this.s = false;\r\n/* 332:329 */ this.v = false;\r\n/* 333:330 */ this.u = false;\r\n/* 334:331 */ this.t = false;\r\n/* 335: */ \r\n/* 336:333 */ cjm.c(this.m, this.n, this.o, this.p);\r\n/* 337: */ }\r\n/* 338:336 */ i1++;\r\n/* 339: */ }\r\n/* 340: */ else\r\n/* 341: */ {\r\n/* 342:340 */ i2 = \"\".indexOf(c1);\r\n/* 343:342 */ if ((this.r) && (i2 != -1))\r\n/* 344: */ {\r\n/* 345: */ do\r\n/* 346: */ {\r\n/* 347:345 */ i3 = this.b.nextInt(this.d.length);\r\n/* 348:346 */ } while (this.d[i2] != this.d[i3]);\r\n/* 349:347 */ i2 = i3;\r\n/* 350: */ }\r\n/* 351:353 */ float f1 = this.k ? 0.5F : 1.0F;\r\n/* 352:354 */ int i4 = ((c1 == 0) || (i2 == -1) || (this.k)) && (paramBoolean) ? 1 : 0;\r\n/* 353:356 */ if (i4 != 0)\r\n/* 354: */ {\r\n/* 355:357 */ this.i -= f1;\r\n/* 356:358 */ this.j -= f1;\r\n/* 357: */ }\r\n/* 358:360 */ float f2 = a(i2, c1, this.t);\r\n/* 359:361 */ if (i4 != 0)\r\n/* 360: */ {\r\n/* 361:362 */ this.i += f1;\r\n/* 362:363 */ this.j += f1;\r\n/* 363: */ }\r\n/* 364:366 */ if (this.s)\r\n/* 365: */ {\r\n/* 366:367 */ this.i += f1;\r\n/* 367:368 */ if (i4 != 0)\r\n/* 368: */ {\r\n/* 369:369 */ this.i -= f1;\r\n/* 370:370 */ this.j -= f1;\r\n/* 371: */ }\r\n/* 372:372 */ a(i2, c1, this.t);\r\n/* 373:373 */ this.i -= f1;\r\n/* 374:374 */ if (i4 != 0)\r\n/* 375: */ {\r\n/* 376:375 */ this.i += f1;\r\n/* 377:376 */ this.j += f1;\r\n/* 378: */ }\r\n/* 379:378 */ f2 += 1.0F;\r\n/* 380: */ }\r\n/* 381: */ ckx localckx;\r\n/* 382: */ VertexBuffer localciv;\r\n/* 383:381 */ if (this.v)\r\n/* 384: */ {\r\n/* 385:382 */ localckx = ckx.getInstance();\r\n/* 386:383 */ localciv = localckx.getBuffer();\r\n/* 387:384 */ cjm.x();\r\n/* 388:385 */ localciv.begin();\r\n/* 389:386 */ localciv.addVertex(this.i, this.j + this.a / 2, 0.0D);\r\n/* 390:387 */ localciv.addVertex(this.i + f2, this.j + this.a / 2, 0.0D);\r\n/* 391:388 */ localciv.addVertex(this.i + f2, this.j + this.a / 2 - 1.0F, 0.0D);\r\n/* 392:389 */ localciv.addVertex(this.i, this.j + this.a / 2 - 1.0F, 0.0D);\r\n/* 393:390 */ localckx.draw();\r\n/* 394:391 */ cjm.w();\r\n/* 395: */ }\r\n/* 396:394 */ if (this.u)\r\n/* 397: */ {\r\n/* 398:395 */ localckx = ckx.getInstance();\r\n/* 399:396 */ localciv = localckx.getBuffer();\r\n/* 400:397 */ cjm.x();\r\n/* 401:398 */ localciv.begin();\r\n/* 402:399 */ int i5 = this.u ? -1 : 0;\r\n/* 403:400 */ localciv.addVertex(this.i + i5, this.j + this.a, 0.0D);\r\n/* 404:401 */ localciv.addVertex(this.i + f2, this.j + this.a, 0.0D);\r\n/* 405:402 */ localciv.addVertex(this.i + f2, this.j + this.a - 1.0F, 0.0D);\r\n/* 406:403 */ localciv.addVertex(this.i + i5, this.j + this.a - 1.0F, 0.0D);\r\n/* 407:404 */ localckx.draw();\r\n/* 408:405 */ cjm.w();\r\n/* 409: */ }\r\n/* 410:408 */ this.i += (int)f2;\r\n/* 411: */ }\r\n/* 412: */ }\r\n/* 413: */ }", "public static void printSHSV(FqImage imh){\n\t\tint\ti,j;\r\n\t\tfor( i = 0 ; i < imh.width ; i++ ){\r\n\t\t\tfor( j = 0 ; j < imh.height ; j++ ){\r\n\t\t\t\tSystem.out.print(\"s\"+imh.points[i][j].getSHSV() );\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t}", "public int[] getSV(){\r\n\t\treturn SV;\r\n\t}", "void mo23492a(C9072a0 a0Var);", "public int mo4335c(int i, C0820v vVar, C0788a0 a0Var) {\n if (mo4732e() == 0 || i == 0) {\n return 0;\n }\n this.f3139t.f3155a = true;\n mo4317G();\n int i2 = i > 0 ? 1 : -1;\n int abs = Math.abs(i);\n m3988a(i2, abs, true, a0Var);\n C0784c cVar = this.f3139t;\n int a = cVar.f3161g + mo4326a(vVar, cVar, a0Var, false);\n if (a < 0) {\n return 0;\n }\n if (abs > a) {\n i = i2 * a;\n }\n this.f3140u.mo5111a(-i);\n this.f3139t.f3164j = i;\n return i;\n }", "static void vectorTableCopy() {\r\n\t\tUS.ASM(\"b 0x1000f8\"); // jump to reset method (0x100000 + 0x100 - 8 - 0)\r\n\t\tUS.ASM(\"b 0x1007f4\"); // undefined instruction (0x100000 + 0x800 - 8 - 4)\r\n\t\tUS.ASM(\"b 0x1001f0\"); // jump to supervisor call (0x100000 + 0x200 - 8 - 8)\r\n\t\tUS.ASM(\"b 0x1008ec\"); // prefetch abort, stop here (0x100000 + 0x900 - 8 - 0xc)\r\n\t\tUS.ASM(\"b 0x1009e8\"); // data abort, stop here (0x100000 + 0xa00 - 8 - 0x10)\r\n\t\tUS.ASM(\"b -8\"); // not used, stop here\r\n\t\tUS.ASM(\"b 0x1003e0\"); // jump to IRQ interrupt (0x100000 + 0x400 - 8 - 0x18)\r\n\t\tUS.ASM(\"b -8\"); // FIQ, stop here\r\n\t}", "C1803l mo7382b(C2778au auVar);", "@Test\n @Tag(\"slow\")\n public void testSCSD8() {\n CuteNetlibCase.doTest(\"SCSD8.SIF\", \"905\", null, NumberContext.of(7, 4));\n }", "public static void c1_vl() {\n\t}", "private void m24355f() {\n String[] strArr = this.f19529f;\n int length = strArr.length;\n int i = length + length;\n if (i > 65536) {\n this.f19531h = 0;\n this.f19528e = false;\n this.f19529f = new String[64];\n this.f19530g = new C4216a[32];\n this.f19533j = 63;\n this.f19535l = false;\n return;\n }\n C4216a[] aVarArr = this.f19530g;\n this.f19529f = new String[i];\n this.f19530g = new C4216a[(i >> 1)];\n this.f19533j = i - 1;\n this.f19532i = m24353e(i);\n int i2 = 0;\n int i3 = 0;\n for (String str : strArr) {\n if (str != null) {\n i2++;\n int c = mo29675c(mo29670a(str));\n String[] strArr2 = this.f19529f;\n if (strArr2[c] == null) {\n strArr2[c] = str;\n } else {\n int i4 = c >> 1;\n C4216a aVar = new C4216a(str, this.f19530g[i4]);\n this.f19530g[i4] = aVar;\n i3 = Math.max(i3, aVar.f19539c);\n }\n }\n }\n int i5 = length >> 1;\n for (int i6 = 0; i6 < i5; i6++) {\n for (C4216a aVar2 = aVarArr[i6]; aVar2 != null; aVar2 = aVar2.f19538b) {\n i2++;\n String str2 = aVar2.f19537a;\n int c2 = mo29675c(mo29670a(str2));\n String[] strArr3 = this.f19529f;\n if (strArr3[c2] == null) {\n strArr3[c2] = str2;\n } else {\n int i7 = c2 >> 1;\n C4216a aVar3 = new C4216a(str2, this.f19530g[i7]);\n this.f19530g[i7] = aVar3;\n i3 = Math.max(i3, aVar3.f19539c);\n }\n }\n }\n this.f19534k = i3;\n this.f19536m = null;\n int i8 = this.f19531h;\n if (i2 != i8) {\n throw new IllegalStateException(String.format(\"Internal error on SymbolTable.rehash(): had %d entries; now have %d\", Integer.valueOf(i8), Integer.valueOf(i2)));\n }\n }", "public synchronized float getVoltage(){\n\t\t getData(REG_MMXCOMMAND, buf, 1);\n\t\t // 37 is the constant given by Mindsensors support 5/2011 to return millivolts. KPT\n return (37f*(buf[0]&0xff))*.001f;\n\t}", "private void mo3747b() {\n this.f1427B.add(this.f1490s);\n this.f1427B.add(this.f1491t);\n this.f1427B.add(this.f1492u);\n this.f1427B.add(this.f1493v);\n this.f1427B.add(this.f1495x);\n this.f1427B.add(this.f1496y);\n this.f1427B.add(this.f1497z);\n this.f1427B.add(this.f1494w);\n }", "private void findVOIs(short[] cm, ArrayList<Integer> xValsAbdomenVOI, ArrayList<Integer> yValsAbdomenVOI, short[] srcBuffer, ArrayList<Integer> xValsVisceralVOI, ArrayList<Integer> yValsVisceralVOI) {\r\n \r\n // angle in radians\r\n double angleRad;\r\n \r\n // the intensity profile along a radial line for a given angle\r\n short[] profile;\r\n \r\n // the x, y location of all the pixels along a radial line for a given angle\r\n int[] xLocs;\r\n int[] yLocs;\r\n try {\r\n profile = new short[xDim];\r\n xLocs = new int[xDim];\r\n yLocs = new int[xDim];\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT allocate profile\");\r\n return;\r\n }\r\n \r\n // the number of pixels along the radial line for a given angle\r\n int count;\r\n \r\n // The threshold value for muscle as specified in the JCAT paper\r\n int muscleThresholdHU = 16;\r\n \r\n for (int angle = 0; angle < 360; angle += angularResolution) {\r\n count = 0;\r\n int x = cm[0];\r\n int y = cm[1];\r\n int yOffset = y * xDim;\r\n double scaleFactor; // reduces the number of trig operations that must be performed\r\n \r\n angleRad = Math.PI * angle / 180.0;\r\n if (angle > 315 || angle <= 45) {\r\n // increment x each step\r\n scaleFactor = Math.tan(angleRad);\r\n while (x < xDim && sliceBuffer[yOffset + x] == abdomenTissueLabel) {\r\n // store the intensity and location of each point along the radial line\r\n profile[count] = srcBuffer[yOffset + x];\r\n xLocs[count] = x;\r\n yLocs[count] = y;\r\n count++;\r\n \r\n // walk out in x and compute the value of y for the given radial line\r\n x++;\r\n y = cm[1] - (int)((x - cm[0]) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n \r\n // x, y is a candidate abdomen VOI point\r\n // if there are more abdomenTissueLabel pixels along the radial line,\r\n // then we stopped prematurely\r\n \r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n // profile contains all the source image intensity values along the line from\r\n // the center-of-mass to the newly computed abdomen VOI point\r\n // Find where the subcutaneous fat ends and the muscle starts\r\n \r\n // start at the end of the profile array since its order is from the\r\n // center-of-mass to the abdomen voi point\r\n \r\n int idx = count - 5; // skip over the skin\r\n while (idx >= 0 && profile[idx] < muscleThresholdHU) {\r\n idx--;\r\n }\r\n if (idx <= 0) {\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT find visceral cavity in the intensity profile\");\r\n break;\r\n }\r\n xValsVisceralVOI.add(xLocs[idx]);\r\n yValsVisceralVOI.add(yLocs[idx]);\r\n \r\n } else if (angle > 45 && angle <= 135) {\r\n // decrement y each step\r\n scaleFactor = (Math.tan((Math.PI / 2.0) - angleRad));\r\n while (y > 0 && sliceBuffer[yOffset + x] == abdomenTissueLabel) {\r\n // store the intensity and location of each point along the radial line\r\n profile[count] = srcBuffer[yOffset + x];\r\n xLocs[count] = x;\r\n yLocs[count] = y;\r\n count++;\r\n \r\n // walk to the top of the image and compute values of x for the given radial line\r\n y--;\r\n x = cm[0] + (int)((cm[1] - y) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n // profile contains all the source image intensity values along the line from\r\n // the center-of-mass to the newly computed abdomen VOI point\r\n // Find where the subcutaneous fat ends\r\n int idx = count - 5; // skip over the skin\r\n while (idx >= 0 && profile[idx] < muscleThresholdHU) {\r\n idx--;\r\n }\r\n if (idx == 0) {\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT find visceral cavity in the intensity profile\");\r\n return;\r\n }\r\n xValsVisceralVOI.add(xLocs[idx]);\r\n yValsVisceralVOI.add(yLocs[idx]);\r\n \r\n } else if (angle > 135 && angle <= 225) {\r\n // decrement x each step\r\n scaleFactor = Math.tan(Math.PI - angleRad);\r\n while (x > 0 && sliceBuffer[yOffset + x] == abdomenTissueLabel) {\r\n // store the intensity and location of each point along the radial line\r\n profile[count] = srcBuffer[yOffset + x];\r\n xLocs[count] = x;\r\n yLocs[count] = y;\r\n count++;\r\n \r\n x--;\r\n y = cm[1] - (int)((cm[0] - x) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n // profile contains all the source image intensity values along the line from\r\n // the center-of-mass to the newly computed abdomen VOI point\r\n // Find where the subcutaneous fat ends\r\n int idx = count - 5; // skip over the skin\r\n while (idx >= 0 && profile[idx] < muscleThresholdHU) {\r\n idx--;\r\n }\r\n if (idx == 0) {\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT find visceral cavity in the intensity profile\");\r\n return;\r\n }\r\n xValsVisceralVOI.add(xLocs[idx]);\r\n yValsVisceralVOI.add(yLocs[idx]);\r\n\r\n } else if (angle > 225 && angle <= 315) {\r\n // increment y each step\r\n scaleFactor = Math.tan((3.0 * Math.PI / 2.0) - angleRad);\r\n while (y < yDim && sliceBuffer[yOffset + x] == abdomenTissueLabel) {\r\n // store the intensity and location of each point along the radial line\r\n profile[count] = srcBuffer[yOffset + x];\r\n xLocs[count] = x;\r\n yLocs[count] = y;\r\n count++;\r\n \r\n y++;\r\n x = cm[0] - (int)((y - cm[1]) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n // profile contains all the source image intensity values along the line from\r\n // the center-of-mass to the newly computed abdomen VOI point\r\n // Find where the subcutaneous fat ends\r\n int idx = count - 5; // skip over the skin\r\n while (idx >= 0 && profile[idx] < muscleThresholdHU) {\r\n idx--;\r\n }\r\n if (idx == 0) {\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT find visceral cavity in the intensity profile\");\r\n return;\r\n }\r\n xValsVisceralVOI.add(xLocs[idx]);\r\n yValsVisceralVOI.add(yLocs[idx]);\r\n\r\n }\r\n } // end for (angle = 0; ...\r\n\r\n }", "private void m3940a(C0820v vVar, C0788a0 a0Var, int i, int i2, boolean z) {\n int i3;\n int i4;\n int i5 = 0;\n int i6 = -1;\n if (z) {\n i6 = i;\n i4 = 0;\n i3 = 1;\n } else {\n i4 = i - 1;\n i3 = -1;\n }\n while (i4 != i6) {\n View view = this.f3122K[i4];\n C0780b bVar = (C0780b) view.getLayoutParams();\n bVar.f3128f = m3944c(vVar, a0Var, mo4749l(view));\n bVar.f3127e = i5;\n i5 += bVar.f3128f;\n i4 += i3;\n }\n }", "void mo17021c();", "public int mo3384v() {\n return 0;\n }", "public String generateVSVID();", "private static void vel_step ( int N, double[] u, double[] v, double[] u0, double[] v0,\r\n\t\tfloat visc, float dt )\r\n\t\t{\r\n\t\tadd_source ( N, u, u0, dt ); add_source ( N, v, v0, dt );\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\t\r\n\t\t//SWAP ( u0, u ); \r\n\t\t\r\n\t\tdouble[] temp;\r\n\t\ttemp=u0;\r\n\t\tu0=u;\r\n\t\tu=temp;\r\n\t\t//draw_dens ( N, u );\r\n\t\tdiffuse ( N, 1, u, u0, visc, dt );\r\n\t\t//draw_dens ( N, u );\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t//SWAP ( v0, v ); \r\n\t\t//double[] temp;\r\n\t\ttemp=v0;\r\n\t\tv0=v;\r\n\t\tv=temp;\r\n\t\t//draw_dens ( N, v );\r\n\t\t//draw_dens ( N, v0 );\r\n\t\tdiffuse ( N, 2, v, v0, visc, dt );\r\n\t\t//draw_dens ( N, v );\r\n\t\t//System.out.println(\"V\");\r\n\t\t//draw_dens ( N, v );\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\tproject ( N, u, v, u0, v0 );\r\n\t\t//SWAP ( u0, u ); \r\n\t\ttemp=u0;\r\n\t\tu0=u;\r\n\t\tu=temp;\r\n\t\t\r\n\t\t//SWAP ( v0, v );\r\n\t\ttemp=v0;\r\n\t\tv0=v;\r\n\t\tv=temp;\r\n\t\t//System.out.println(\"V\");\r\n\t\t//draw_dens ( N, v );\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\t\r\n\t\tadvect ( N, 1, u, u0, u0, v0, dt ); \r\n\t\tadvect ( N, 2, v, v0, u0, v0, dt );\r\n\t\tproject ( N, u, v, u0, v0 );\r\n\t\t}", "private static void dtp2v( double xi, double eta,\n double x, double y, double z,\n double[] v ) {\n double f = Math.sqrt( 1 + xi * xi + eta * eta );\n double r = Math.hypot( x, y );\n if ( r == 0 ) {\n r = 1d-20;\n x = r;\n }\n double f1 = 1.0 / f;\n double r1 = 1.0 / r;\n v[ 0 ] = ( x - ( xi * y + eta * x * z ) * r1 ) * f1;\n v[ 1 ] = ( y + ( xi * x - eta * y * z ) * r1 ) * f1;\n v[ 2 ] = ( z + eta * r ) * f1;\n }", "public VampireNumberImpl findVampire(int i, int a1000, int a100, int a10, int a1) {\n boolean[] vars = new boolean[12];\n int[] firsts = new int[12];\n int[] seconds = new int[12];\n\n firsts[0] = (a1000 * 10 + a100);\n seconds[0] = (a10 * 10 + a1);\n vars[0] = firsts[0] * seconds[0] == i;\n\n firsts[1] = (a1000 * 10 + a100);\n seconds[1] = (a10 + a1 * 10);\n vars[1] = firsts[1] * seconds[1] == i;\n\n firsts[2] = (a1000 + a100 * 10);\n seconds[2] = (a10 * 10 + a1);\n vars[2] = (a1000 + a100 * 10) * (a10 * 10 + a1) == i;\n\n firsts[3] = (a1000 + a100 * 10);\n seconds[3] = (a10 + a1 * 10);\n vars[3] = (a1000 + a100 * 10) * (a10 + a1 * 10) == i;\n\n firsts[4] = (a1000 * 10 + a10);\n seconds[4] = (a100 * 10 + a1);\n vars[4] = (a1000 * 10 + a10) * (a100 * 10 + a1) == i;\n\n firsts[5] = (a1000 * 10 + a10);\n seconds[5] = (a100 + a1 * 10);\n vars[5] = (a1000 * 10 + a10) * (a100 + a1 * 10) == i;\n\n firsts[6] = (a1000 + a10 * 10);\n seconds[6] = (a100 * 10 + a1);\n vars[6] = (a1000 + a10 * 10) * (a100 * 10 + a1) == i;\n\n firsts[7] = (a1000 + a10 * 10);\n seconds[7] = (a100 + a1 * 10);\n vars[7] = (a1000 + a10 * 10) * (a100 + a1 * 10) == i;\n\n firsts[8] = (a1000 * 10 + a1);\n seconds[8] = (a100 * 10 + a10);\n vars[8] = (a1000 * 10 + a1) * (a100 * 10 + a10) == i;\n\n firsts[9] = (a1000 + a1 * 10);\n seconds[9] = (a100 * 10 + a10);\n vars[9] = (a1000 + a1 * 10) * (a100 * 10 + a10) == i;\n\n firsts[10] = (a1000 * 10 + a1);\n seconds[10] = (a100 + a10 * 10);\n vars[10] = (a1000 * 10 + a1) * (a100 + a10 * 10) == i;\n\n firsts[11] = (a1000 + a1 * 10);\n seconds[11] = (a100 + a10 * 10);\n vars[11] = (a1000 + a1 * 10) * (a100 + a10 * 10) == i;\n\n int j = 0;\n for (j = 0; j < vars.length; j++) {\n if (vars[j]) {\n break;\n }\n }\n return new VampireNumberImpl(firsts[j] * seconds[j], firsts[j], seconds[j]);\n }", "public static void m2711v(Context context, C1129so soVar, C0735ko.C0740e eVar) {\n C1426yp.m3890b(context).f5210b.f4983e = false;\n f3508c.mo3811b(context, new C1128sn(context, soVar, eVar));\n }", "private void m3992a(C0820v vVar, C0784c cVar) {\n if (cVar.f3155a && !cVar.f3166l) {\n if (cVar.f3160f == -1) {\n m3990a(vVar, cVar.f3161g);\n } else {\n m3998b(vVar, cVar.f3161g);\n }\n }\n }" ]
[ "0.5950133", "0.5938312", "0.5929378", "0.58486235", "0.57342786", "0.5720402", "0.56511194", "0.563975", "0.5620174", "0.5619542", "0.55869025", "0.55777067", "0.55672985", "0.5502108", "0.5492094", "0.5465089", "0.54453385", "0.54257995", "0.541658", "0.5404801", "0.5397213", "0.5369246", "0.5334704", "0.53285277", "0.53123903", "0.53052026", "0.5299914", "0.52967703", "0.5292939", "0.5292935", "0.5290253", "0.52876306", "0.5272744", "0.52654296", "0.5264207", "0.52595705", "0.52570117", "0.5236662", "0.5227736", "0.5227367", "0.5223579", "0.521718", "0.52111995", "0.5208992", "0.5204424", "0.51970196", "0.5168398", "0.5165185", "0.51594484", "0.51499593", "0.5138289", "0.5136798", "0.51296276", "0.5127624", "0.5110821", "0.511015", "0.51046026", "0.5101714", "0.5101479", "0.5098321", "0.5090247", "0.50804245", "0.5077587", "0.50774133", "0.507735", "0.50739497", "0.50708145", "0.50619465", "0.5061448", "0.50583357", "0.505274", "0.5050901", "0.505028", "0.50489366", "0.5032269", "0.50314844", "0.5031028", "0.5026841", "0.5026813", "0.50236344", "0.50220346", "0.5017945", "0.5015637", "0.50083554", "0.50047827", "0.5002159", "0.5001857", "0.5000708", "0.500064", "0.5000105", "0.49987844", "0.49951318", "0.49935636", "0.49926472", "0.49866217", "0.49856117", "0.49845082", "0.49822605", "0.49807766", "0.49753523", "0.49751797" ]
0.0
-1
Connects to the MSN
private void openConnection(){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void connect() {}", "public void connect();", "public void connect();", "public void connect();", "public final boolean connect() {\n if(this.connected) return true;\n if(this.connectThread == null || !this.connectThread.isAlive()){\n this.connectThread = new MdsConnect();\n this.connectThread.start();\n }\n this.connectThread.retry();\n if(!Thread.currentThread().getName().startsWith(\"AWT-EventQueue-\")) this.waitTried();\n if(this.connected) try{\n this.setup();\n }catch(final MdsException e){\n e.printStackTrace();\n this.close();\n }\n return this.connected;\n }", "protected void startConnect() {\n if (tcp) {\n connection = new TCPConnection(this);\n } else {\n connection = new UDPConnection(this, udpSize);\n }\n connection.connect(remoteAddr, localAddr);\n }", "public void initiateConnection() {\n\t\tif (Settings.getRemoteHostname() != null) {\n\t\t\ttry {\n\t\t\t\toutgoingConnection(new Socket(Settings.getRemoteHostname(), Settings.getRemotePort()));\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.error(\"failed to make connection to \" + Settings.getRemoteHostname() + \":\"\n\t\t\t\t\t\t+ Settings.getRemotePort() + \" :\" + e);\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t}\n\t}", "public void connecting() {\n\n }", "public void connectToExternalServer()\n\t{\n\t\tbuildConnectionString(\"10.228.6.204\", \"\", \"ctec\", \"student\");\n\t\tsetupConnection();\n\t\t// createDatabase(\"Kyler\");\n\t}", "public void connect() throws OOBException {\n \t\tlog.debug(\"enter to connect \");\n \t\tJSch jsch = new JSch();\n \t\ttry {\n\t\t\tjsch.addIdentity(PRIVATE_KEY, PASSPHRASE);\n \t\t\tjsch.setKnownHosts(KNOWN_HOSTS);\n \t\t\tlog.debug(\"user \" + user + \"host : \" + host);\n \t\t\tsession = jsch.getSession(user, host, 22);\n \t\t\tsession.connect();\n \t\t} catch (JSchException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}", "public synchronized UIMessageReply connect() {\n this.ss = new ServerStream(parameters);\n\n // now connect the display to the network and initialize\n if (!this.ss.connect(this.windowName)) {\n return null;\n }\n\n // initialize\n return init();\n }", "synchronized private final void connectToServer() throws IOException {\n if(this.provider.useSSH()){\n if(this.userinfo == null) this.userinfo = new SSHSocket.SshUserInfo();\n this.sock = MdsIp.newSSHSocket(this.userinfo, this.provider);\n }else this.sock = new Socket(this.provider.host, this.provider.port);\n if(DEBUG.D) System.out.println(this.sock.toString());\n this.sock.setTcpNoDelay(true);\n this.dis = this.sock.getInputStream();\n this.dos = this.sock.getOutputStream();\n /* connect to mdsip */\n final Message message = new Message(this.provider.user, this.getMsgId());\n message.useCompression(this.use_compression);\n this.sock.setSoTimeout(3000);\n long tick = -System.nanoTime();\n message.send(this.dos);\n final Message msg = Message.receive(this.dis, null);\n tick += System.nanoTime();\n if(DEBUG.N) System.out.println(tick);\n this.isLowLatency = tick < 50000000;// if response is faster than 50ms\n this.sock.setSoTimeout(0);\n if(msg.header.get(4) == 0){\n this.close();\n return;\n }\n this.receiveThread = new MRT();\n this.receiveThread.start();\n this.connected = true;\n MdsIp.this.dispatchMdsEvent(new MdsEvent(this, MdsEvent.HAVE_CONTEXT, \"Connected to \" + this.provider.toString()));\n }", "public void connect()\r\n\t{\r\n\t\tkonekcija = ConnectionClass.getConnection(adresa, port, imeBaze, korisnickoIme, sifra);\r\n\t\tSystem.out.println(\"Konekcija otvorena: \"+ konekcija.toString());\r\n\t}", "public void doConnect() {\n Debug.logInfo(\"Connecting to \" + client.getServerURI() + \" with device name[\" + client.getClientId() + \"]\", MODULE);\n\n IMqttActionListener conListener = new IMqttActionListener() {\n\n public void onSuccess(IMqttToken asyncActionToken) {\n Debug.logInfo(\"Connected.\", MODULE);\n state = CONNECTED;\n carryOn();\n }\n\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n ex = exception;\n state = ERROR;\n Debug.logError(\"connect failed\" + exception.getMessage(), MODULE);\n carryOn();\n }\n\n public void carryOn() {\n synchronized (caller) {\n donext = true;\n caller.notifyAll();\n }\n }\n };\n\n try {\n // Connect using a non-blocking connect\n client.connect(conOpt, \"Connect sample context\", conListener);\n } catch (MqttException e) {\n // If though it is a non-blocking connect an exception can be\n // thrown if validation of parms fails or other checks such\n // as already connected fail.\n state = ERROR;\n donext = true;\n ex = e;\n }\n }", "public void connect() {\n\t\tint index = shell.getConnectionsCombo().getSelectionIndex();\n\t\tif (profiles.length == 0 || index < 0 || index >= profiles.length) {\n\t\t\tupdateSelection();\n\t\t\treturn;\n\t\t}\n\t\tIConnectionProfile profile = profiles[index];\n\t\tshell.setEnabled(false);\n\t\tnetworkManager.connect(profile, (s, r) -> {\n\t\t\tif (s) {\n\t\t\t\tcompleted = true;\n\t\t\t\tclose();\n\t\t\t} else {\n\t\t\t\tplugin.sync(() -> {\n\t\t\t\t\tMessageBox messageBox = new MessageBox(shell.isDisposed() ? null : shell, SWT.ICON_ERROR);\n\t\t\t\t\tmessageBox.setMessage(\"Failed to connect!\\n\" + r);\n\t\t\t\t\tmessageBox.open();\n\t\t\t\t\tshell.setEnabled(true);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}", "private void connection() {\n boolean connect;\n try {\n connect = true;\n this.jTextArea1.setText(\"Server starts...\");\n server = new MultiAgentServer(this);\n String ip = \"\";\n int errorBit = 256;\n for (int i = 0; i < server.getIpAddr().length; i++) {\n int currentIP = server.getIpAddr()[i];\n if (currentIP < 0) {\n currentIP += errorBit;\n }\n ip += currentIP + \".\";\n }\n ip = ip.substring(0, ip.length() - 1);\n System.out.println(ip);\n Naming.rebind(\"//\" + ip + \"/server\", server);\n this.jTextArea1.setText(\"Servername: \" + ip);\n this.jTextArea1.append(\"\\nServer is online\");\n } catch (MalformedURLException | RemoteException e) {\n this.jTextArea1.append(\"\\nServer is offline, something goes wrong!!!\");\n connect = false;\n }\n if (dialog.getMusicBox().isSelected()) {\n sl = new SoundLoopExample();\n }\n reconnectBtn.setEnabled(!connect);\n }", "public void connect() {\n try {\n socket = connectToBackEnd();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "void toConnect() throws Exception {\n\t\tnameField.setVisible(false);\n\t\tf.setTitle(nameField.getText());\n\t\tsocketToServer = new Socket(\"127.0.0.1\", 5050);\n\t\tmyOutputStream = new ObjectOutputStream(socketToServer.getOutputStream());\n\t\tmyInputStream = new ObjectInputStream(socketToServer.getInputStream()); \n\t\tconnected();\n\t\tstart();\n\t}", "public void connect() {\n\t\ttry {\n\t\t\tconnection = new Socket(ip, serverPort); // 128.39.83.87 // 127.0.0.1\n\t\t\t\n\t\t\toutput = new BufferedWriter(new OutputStreamWriter(\n connection.getOutputStream()));\n\t\t\tinput = new BufferedReader(new InputStreamReader(\n connection.getInputStream()));\n\t\t\t\n\t\t\tif (hostName.equals(Constants.IDGK + Main.userName))\n\t\t\t\tsendText(\"1\" + Main.userName);\n\t\t\telse\n\t\t\t\tsendText(\"2\" + Main.userName);\n\t\t\t\n\t\t} catch (UnknownHostException e) {\n\t\t\tMain.LOGGER.log(Level.SEVERE, \"Error connecting server\", e);\n\t\t} catch (IOException e) {\n\t\t\tMain.LOGGER.log(Level.WARNING, \"Error making output/input\", e);\n\t\t}\n\t}", "protected void connect() {\n\t\treadProperties();\n\t\tif (validateProperties())\n\t\t\tjuraMqttClient = createClient();\n\t}", "public void connect() throws Exception\n {\n if(connected)\n return;\n connectionSocket = new Socket(address, CommonRegister.DEFAULT_PORT);\n localPeerID = ++localPeerIDCount;\n initListener();\n reader = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream()));\n writer = new PrintWriter(connectionSocket.getOutputStream(),true);\n connected = true;\n }", "public static void doConnect() {\r\n\t\tlogger.info(\"Connecting to server......\");\r\n\t\tChannelFuture future = null;\r\n\t\ttry {\r\n\t\t\tfuture = bootstrap.connect(new InetSocketAddress(host, port));\r\n\t\t\tfuture.addListener(channelFutureListener);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t// future.addListener(channelFutureListener);\r\n\t\t\tlogger.warn(\"Closed connection.\");\r\n\t\t}\r\n\r\n\t}", "public void connectTo(NAddress address) throws IOException;", "public void Connect() {\n run = new Thread(\"Connect\") {\n @Override\n public void run() {\n running = true;\n try {\n server = new ServerSocket(9080);\n waitingForConnection();\n } catch (IOException ex) {\n Logger.getLogger(Dashboard.class\n .getName()).log(Level.SEVERE, null, ex);\n }\n }\n };\n run.start();\n }", "private static void connectToNameNode(){\n int nameNodeID = GlobalContext.getNameNodeId();\n ServerConnectMsg msg = new ServerConnectMsg(null);\n\n if(comm_bus.isLocalEntity(nameNodeID)) {\n log.info(\"Connect to local name node\");\n comm_bus.connectTo(nameNodeID, msg.getByteBuffer());\n } else {\n log.info(\"Connect to remote name node\");\n HostInfo nameNodeInfo = GlobalContext.getHostInfo(nameNodeID);\n String nameNodeAddr = nameNodeInfo.ip + \":\" + nameNodeInfo.port;\n log.info(\"name_node_addr = \" + String.valueOf(nameNodeAddr));\n comm_bus.connectTo(nameNodeID, nameNodeAddr, msg.getByteBuffer());\n }\n }", "void onConnectToNetByIPSucces();", "public void connect() {\n BotConnector newBot = new BotConnector();\n newBot.setEmail(this.email);\n newBot.setAuthenticationKey(key);\n newBot.setBotName(name);\n newBot.setRoom(room);\n //Start Listener Thread\n this.serverListener = new Thread(newBot, \"serverListener\");\n this.serverListener.start();\n }", "@Override\n public abstract void connect();", "private void doConnect() throws Exception {\n try {\n Registry reg = LocateRegistry.getRegistry(conf.getNameServiceHost(), conf.getNameServicePort());\n server = (IChatServer) reg.lookup(conf.getServerName());\n } catch (RemoteException e) {\n throw new Exception(\"rmiregistry not found at '\" + conf.getNameServiceHost() + \":\" +\n conf.getNameServicePort() + \"'\");\n } catch (NotBoundException e) {\n throw new Exception(\"Server '\" + conf.getServerName() + \"' not found.\");\n }\n\n //Unir al bot al canal com a usuari\n //el Hashcode li afig un valor unic al nom, per a que ningu\n //li copie el nom com a usuari\n user = new ChatUser(\"bot \" + this.hashCode(), this);\n if (!server.connectUser(user))\n throw new Exception(\"Nick already in use\");\n\n //Comprovar si hi ha canals en el servidor.\n IChatChannel[] channels = server.listChannels();\n if (channels == null || channels.length == 0)\n throw new Exception(\"Server has no channels\");\n \n //Unir el bot a cadascun dels canals\n for (IChatChannel channel : channels) {\n channel.join(user);\n }\n\n System.out.println(\"Bot unit als canals i preparat.\");\n }", "public void connectWiFi() {\n\n // Agrego la red para poder conectarme\n conf.networkId = wifi.addNetwork(conf);\n if (conf.networkId == -1) {\n Log.i(\"#FSEM# SERVICE\", \"Fallo addNetwork\");\n return;\n }\n\n // Receiver para cambio de estado de WIFI\n IntentFilter intentFilter = new IntentFilter(WifiManager.NETWORK_STATE_CHANGED_ACTION);\n intentFilter.addAction(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION);\n\n context.registerReceiver(this, intentFilter);\n\n // Mientras haya otra conexión con algun semaforo, espero a que se termine.\n while (SemComunication.staticState == StaticState.CONECTADO) {\n Log.i(\"#FSEM# SERVICE\", \"Me quiero conectar a \" + this.conf.SSID\n + \", pero sigue conectado a otro semaforo: \" + SemComunication.currentSSID);\n // Obligo a desconectarse.\n wifi.disconnect();\n SystemClock.sleep(1000);\n }\n\n // Me conecto con la red que quiero, y cuando lo logre\n // se ejecuta el receiver anterior\n wifi.disconnect();\n Log.i(\"#FSEM# SERVICE\", \"Me intento conectar con \" + (this.SSID));\n wifi.enableNetwork(this.conf.networkId, true);\n wifi.reconnect();\n SemComunication.staticState = StaticState.CONECTADO;\n SemComunication.networkId = this.conf.networkId;\n SemComunication.currentSSID = this.SSID;\n }", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "public void connect() throws IOException, XMPPException, SmackException {\n InetAddress addr = InetAddress.getByName(\"192.168.1.44\");\n HostnameVerifier verifier = new HostnameVerifier() {\n @Override\n public boolean verify(String hostname, SSLSession session) {\n return false;\n }\n };\n XMPPTCPConnectionConfiguration conf = XMPPTCPConnectionConfiguration.builder()\n .setXmppDomain(mApplicationContext.getString(R.string.txt_domain_name)) // name of the domain\n .setHost(mApplicationContext.getString(R.string.txt_server_address)) // address of the server\n .setResource(mApplicationContext.getString(R.string.txt_resource)) // resource from where your request is sent\n .setPort(5222) // static port number to connect\n .setKeystoreType(null) //To avoid authentication problem. Not recommended for production build\n .setSecurityMode(ConnectionConfiguration.SecurityMode.disabled)\n .setHostnameVerifier(verifier)\n .setHostAddress(addr)\n .setDebuggerEnabled(true)\n .setCompressionEnabled(true).build();\n\n //Set up the ui thread broadcast message receiver.\n setupUiThreadBroadCastMessageReceiver();\n\n mConnection = new XMPPTCPConnection(conf);\n mConnection.addConnectionListener(mOnConnectionListener);\n try {\n Log.d(TAG, \"Calling connect() \");\n mConnection.connect();\n Presence presence = new Presence(Presence.Type.available);\n mConnection.sendPacket(presence);\n\n Log.d(TAG, \" login() Called \");\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n /**\n * Listener to receive the incoming message\n */\n\n ChatManager.getInstanceFor(mConnection).addIncomingListener(new IncomingChatMessageListener() {\n @Override\n public void newIncomingMessage(EntityBareJid messageFrom, Message message, Chat chat) {\n String from = message.getFrom().toString();\n\n String contactJid = \"\";\n if (from.contains(\"/\")) {\n contactJid = from.split(\"/\")[0];\n Log.d(TAG, \"The real jid is :\" + contactJid);\n Log.d(TAG, \"The message is from :\" + from);\n } else {\n contactJid = from;\n }\n\n //Bundle up the intent and send the broadcast.\n Intent intent = new Intent(XmppConnectionService.NEW_MESSAGE);\n intent.setPackage(mApplicationContext.getPackageName());\n intent.putExtra(XmppConnectionService.BUNDLE_FROM_JID, contactJid);\n intent.putExtra(XmppConnectionService.BUNDLE_MESSAGE_BODY, message.getBody());\n mApplicationContext.sendBroadcast(intent);\n Log.d(TAG, \"Received message from :\" + contactJid + \" broadcast sent.\");\n }\n });\n\n\n ReconnectionManager reconnectionManager = ReconnectionManager.getInstanceFor(mConnection);\n reconnectionManager.setEnabledPerDefault(true);\n reconnectionManager.enableAutomaticReconnection();\n\n }", "public void autoConnect() {\n Log.i(TAG, \"HERE AUTOCONNECT\");\n connect(staticIp, staticPort);\n }", "public Status connect()\n {\n return connect(5.0);\n }", "public boolean initAndConnectToServer() {\n try {\n mTCPSocket.connect(new InetSocketAddress(mIpAdress, port), 1000);\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n return true;\n }", "public void connect()\n\t{\n\t\tUUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805f9b34fb\"); //Standard SerialPortService ID\n\t\ttry\n\t\t{\n\t sock = dev.createRfcommSocketToServiceRecord(uuid); \n\t sock.connect();\n\t connected = true;\n\t dev_out = sock.getOutputStream();\n\t dev_in = sock.getInputStream();\n\t write(0);\n\t write(0);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t}", "protected abstract void onConnect();", "private void connectToCS(int port, String host)throws Exception{\n socket = new Socket(host, port);\n inStream = new PDUInputStream(socket.getInputStream());\n outStream = new PDUOutputStream(socket.getOutputStream());\n\n PduJoin join = new PduJoin(nickName);\n outStream.writeToServer(join.getByteArray());\n\n chatCS();\n }", "public void connect() throws XMPPException, IllegalStateException{\n\n\t\tConnectionConfiguration cc = new ConnectionConfiguration(\"talk.google.com\", 5222, \"gmail.com\");\n\n\t\tserverConnection = new XMPPConnection(cc);\n\n\t\tserverConnection.connect();\n\n\t\tserverConnection.login(this.loginName, this.password, CLIENT_ID+\".\");\n\n\t\tfriendsList = serverConnection.getRoster();\n\n\t\tfriendsList.addRosterListener(this);\n\n\t\tstatusChangeListeners = new EventListenerList();\n\n\t\tserverConnection.addPacketListener(messageInterpreter, new PacketTypeFilter(Message.class));\n\t}", "private void connectToPeer() {\n mStatusText.append(\"Connecting to device...\\n\");\n\n String deviceKey = (String) mDevices.getSelectedItem();\n final WifiDirectDevice device = mGoodDevices.get(deviceKey);\n if (device == null) {\n mStatusText.append(\"Device no longer exists, refreshing peers...\\n\");\n discoverPeers();\n return;\n }\n\n WifiP2pConfig config = new WifiP2pConfig();\n config.deviceAddress = device.deviceAddress;\n config.wps.setup = WpsInfo.PBC; // push-button connect (as opposed to PIN, etc)\n\n // Set groupOwnerIntent so there aren't 2 groupowners.\n // It ranges between 0-15 , higher the value, higher\n // the possibility of becoming a groupOwner\n config.groupOwnerIntent = 0;\n\n if (mServiceDevices != null) {\n final WifiDirectDevice wDevice = mServiceDevices.get(deviceKey);\n if (wDevice != null && !wDevice.isGroupOwner && Integer.valueOf(wDevice.record.get(\"id\").toString()) < WifiDirectUtilities.ID) {\n// // Create a group\n// mManager.createGroup(mChannel, new WifiP2pManager.ActionListener() {\n// @Override\n// public void onSuccess() {\n// MainActivity.this.onGroupCreateResult(-1);\n// }\n//\n// @Override\n// public void onFailure(int reasonCode) {\n// MainActivity.this.onGroupCreateResult(reasonCode);\n// }\n// });\n this.mIsGO = true;\n config.groupOwnerIntent = 1;\n }\n }\n\n mManager.connect(mChannel, config, new WifiP2pManager.ActionListener() {\n\n @Override\n public void onSuccess() {\n mStatusText.append(\"Connected via WiFi!\\n\");\n // BroadcastReceiver will note when the connection changes in WIFI_P2P_PEERS_CHANGED_ACTION\n }\n\n @Override\n public void onFailure(int reasonCode) {\n logEvent(TAG, WifiDirectUtilities.getFailureReasonMessage(reasonCode));\n }\n });\n }", "private synchronized void doConnect() {\n try {\n String host = agent.getHost();\n int port = agent.getPort();\n log.fine(\"Connecting to server \" + host + ':' + port);\n socket = new Socket(host, port);\n input = socket.getInputStream();\n output = new OutputStreamWriter(socket.getOutputStream());\n disconnected = false;\n new Thread(this).start();\n\n // Automatically login! -> give an auth to the agent...\n TACMessage msg = new TACMessage(\"auth\");\n msg.setParameter(\"userName\", agent.getUser());\n msg.setParameter(\"userPW\", agent.getPassword());\n msg.setMessageReceiver(agent);\n sendMessage(msg);\n\n } catch (Exception e) {\n disconnected = true;\n log.log(Level.SEVERE, \"connection to server failed:\", e);\n socket = null;\n }\n }", "void open(String nameNport) {\n\tString[] token=nameNport.split(\":\");\n\tString host=token[0];\n\tint port=Integer.parseInt(token[1]);\n\tint proceedFlag=1;\n\tIterator<Socket> iterator=Connection.connections.iterator();\n\tif(host.equalsIgnoreCase(\"localhost\") || host.equals(\"127.0.0.1\"))\n\t\thost=simpella.infoSocket.getLocalAddress().getHostAddress();\n\tif((host.equalsIgnoreCase(simpella.infoSocket.getLocalAddress().getHostAddress())||host.equalsIgnoreCase(simpella.infoSocket.getLocalAddress().getCanonicalHostName()))&&(simpella.serverPortNo==port || simpella.downloadPortNo==port)){\n\t\tproceedFlag=0;\n\t\tSystem.out.println(\"Client: Self Connect not allowed\");\n\t\t}\n\twhile(iterator.hasNext() && proceedFlag==1)\n\t{\n\t\tSocket sock=(Socket)iterator.next();\n\t\t\n\t\tif((host.equalsIgnoreCase(sock.getInetAddress().getHostAddress()) || host.equalsIgnoreCase(sock.getInetAddress().getCanonicalHostName())) && port==sock.getPort()){\n\t\t\tproceedFlag=0; \n\t\t\tSystem.out.println(\"Client: Duplicate connection to same IP/port not allowed\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\tif(proceedFlag==1)\n\t\t{\n\t\n\t\n\tbyte type=04;\n\tMessage msg=new Message(type);\n\ttry {\n\t\tConnection.outgoingConnPackRecv[noOfConn]=0;\n\t\tConnection.outgoingConnPackSent[noOfConn]=0;\n\t\tConnection.outgoingConnPackSentSize[noOfConn]=0;\n\t\tConnection.outgoingConnPackRecvSize[noOfConn]=0;\n\t\t\n\t\tclientSideSocket[noOfConn]=new Socket(host,port);\n\t\tSystem.out.println(\"Client:TCP Connection established...Begin handshake\");\n\t\toutToServer[noOfConn]=new ObjectOutputStream(clientSideSocket[noOfConn].getOutputStream());\n\t\tinFromServer[noOfConn]=new ObjectInputStream(clientSideSocket[noOfConn].getInputStream());\n\t\tString strToServer=\"SIMPELLA CONNECT/0.6\\r\\n\";\n\t\tbyte[] byteArray= strToServer.getBytes(\"UTF-16LE\");\n\t\tmsg.setPayload(byteArray);\n \t\n\t\tSystem.out.println(\"Client:\"+new String(byteArray));\n\t\t//outToServer.writeUTF(\"SIMPELLA CONNECT/0.6\\r\\n\");\n\t\tConnection.outgoingConnPackSent[noOfConn]++;\n\t\tConnection.outgoingConnPackSentSize[noOfConn]+=byteArray.length+23;\n\t\toutToServer[noOfConn].writeObject((Object)msg);\n\t\tConnection.outgoingConnPackRecv[noOfConn]++;\n\t\t\n\t\tMessage msg1=(Message) inFromServer[noOfConn].readObject();\n\t\tbyte[] fromServer=msg1.getPayload();\n\t\tConnection.outgoingConnPackRecvSize[noOfConn]+=fromServer.length+23;\n\t\tString strFromServer=new String(fromServer);\n\t\tSystem.out.println(\"Server:\"+strFromServer);\n\t\tif(msg1.getMessage_type()==05)\n\t\t\t{\n\t\t\tstrToServer=\"SIMPELLA/0.6 200 thank you for accepting me\\r\\n\";\n\t\t\tbyte[] byteArray1= strToServer.getBytes(\"UTF-16LE\");\n\t\t\tMessage m=new Message((byte)05);\n\t\t\tm.setPayload(byteArray1);\n\t\t\tConnection.outgoingConnPackSent[noOfConn]++;\n\t\t\tConnection.outgoingConnPackSentSize[noOfConn]+=byteArray1.length+23;\n\t\t\toutToServer[noOfConn].writeObject((Object)m);\n\t\t\t\n\t\t\tConnection.connections.add(clientSideSocket[client.noOfConn]);\n\t\t\tConnection.outgoingConnection[client.noOfConn]=clientSideSocket[client.noOfConn];\n\t\t\tConnection.clientOutStream[client.noOfConn]=outToServer[client.noOfConn];\n\t\t\tnew clientSocketListen(clientSideSocket[noOfConn],outToServer[noOfConn],inFromServer[noOfConn]);\n\t\t\tupdate();\n\t\t\tnoOfConn++;\n\t\t\t//System.out.println(\"Client:num of conn=\"+noOfConn);\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"<open>:Cannot open connection to \"+host+\" at this time\");\n\t\t\t\tclientSideSocket[noOfConn].close();\n\t\t\t\tinFromServer[noOfConn].close();\n\t\t\t\toutToServer[noOfConn].close();\n//\t\t\t\tSystem.out.println(\"Client:num of conn=\"+noOfConn);\n\t\t\t}\n\t\t\n\t\t\n\t} catch (UnknownHostException e) {\n\t\tSystem.out.println(\"Unknown Host: Destination host unreachable\");\n\t\t//e.printStackTrace();\n\t} catch (Exception e) {\n\t\tSystem.out.println(\"Connection Refused/Destination host unreachable\");\n\t}\n\t\t}\n\t}", "private void connectToServer() throws IOException {\n\t\tna.message(\"Connecting to \" + serverAddress.getHostAddress()\n\t\t\t\t+ \" at port#: \" + portNumber);\n\t\tclientSocket = new Socket(serverAddress, portNumber);\n\t}", "public static void connect() {\n \t\tconnPool.start();\n \t}", "public void connect() throws IOException {\n socket = new Socket(serverAddress, serverPort);\n br = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n pw = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));\n\n LOG.info(br.readLine());\n\n String currentLine;\n sendMessage(SMTPProtocol.CMD_EHLO + \"prankApplication\" + \"\\r\\n\");\n do{\n currentLine = br.readLine();\n LOG.info(currentLine);\n }\n while (!currentLine.startsWith(\"250 \"));\n }", "public abstract void connectSystem();", "protected void connect() {\n for (int attempts = 3; attempts > 0; attempts--) {\n try {\n Socket socket = new Socket(\"localhost\", serverPort);\n attempts = 0;\n\n handleConnection(socket);\n }\n catch (ConnectException e) {\n // Ignore the 'connection refused' message and try again.\n // There may be other relevant exception messages that need adding here.\n if (e.getMessage().equals(\"Connection refused (Connection refused)\")) {\n if (attempts - 1 > 0) {\n // Print the number of attempts remaining after this one.\n logger.warning(\"Connection failed (\" + name + \"). \" + \n (attempts - 1) + \" attempts remaining.\");\n }\n else {\n logger.severe(\"Connection failed (\" + name + \"). \");\n }\n }\n else {\n logger.severe(e.toString());\n break;\n }\n }\n catch (Exception e) {\n logger.severe(\"Socket on module '\" + name + \"': \" + e.toString());\n }\n }\n }", "public void connect() throws IOException;", "@Override\n public void doConnect() throws IOException {\n if (!sc.finishConnect()) {\n return; // the selector gave a bad hint\n }\n\n // Sending login private\n var bb = ByteBuffer.allocate(1 + Long.BYTES);\n bb.put((byte) 9).putLong(connectId);\n queueMessage(bb.flip());\n\n updateInterestOps();\n }", "public abstract void onConnect();", "public void connect() {\n try {\n // ghetto hardcode the parameters\n ORB orb = ORB.init(new String[]{\"-ORBInitialHost\", \"localhost\", \"-ORBInitialPort\", \"8989\"}, null);\n\n org.omg.CORBA.Object objRef = orb.resolve_initial_references(\"NameService\");\n NamingContext ncRef = NamingContextHelper.narrow(objRef);\n\n NameComponent nc = new NameComponent(station, \"\");\n NameComponent path[] = {nc};\n instance = StationInterfaceHelper.narrow(ncRef.resolve(path));\n\n this.log.log(\"Connected!\");\n } catch (Exception ex) {\n log.log(ex.toString() + ex.getMessage());\n }\n }", "public void connect() {\n\t\ttry {\n\t\t\tsocket = new Socket(host, port);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error connecting: \" + e.getMessage());\n\t\t}\n\t}", "private void establishConnection() {\n\n try {\n\n for(Clone clone:this.clones){\n ClearConnection connection = new ClearConnection();\n connection.connect(clone.getIp(), clone.getOffloadingPort(), 5 * 1000);\n this.connections.add(connection);\n }\n\n this.protocol = new ERAMProtocol();\n this.ode = new ERAMode();\n\n } catch (Exception e) {\n Log.e(TAG,\"Connection setup with the Remote Server failed - \" + e);\n }\n }", "private void connect()\r\n\t{\r\n\t\tString remoteHostName = txtComputerName.getText();\r\n\t\tint remoteHostPort = Integer.parseInt(txtPort.getText());\r\n\t\tif (remoteHostName == null || remoteHostName.equals(\"\"))\r\n\t\t{\r\n\t\t\twriteLine(\"Enter a Computer Name\", 0);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (remoteHostPort <= 0)\r\n\t\t\t{\r\n\t\t\t\twriteLine(\"Enter a Port\", 0);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// we can now connect\r\n\t\t\t\t// set our cursor to notify the user that they might need to\r\n\t\t\t\t// wait\r\n\t\t\t\twriteLine(\"Connecting to: \" + remoteHostName + \" : \"\r\n\t\t\t\t\t\t+ remoteHostPort, 0);\r\n\t\t\t\tthis.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\r\n\t\t\t\t// lets try to connect to the remote server\r\n\r\n\t\t\t\ttheSocket = new CommSocket(remoteHostName, remoteHostPort);\r\n\r\n\t\t\t\tif (theSocket.connect())\r\n\t\t\t\t{\r\n\t\t\t\t\twriteLine(\r\n\t\t\t\t\t\t\t\"We are successfuly connected to: \"\r\n\t\t\t\t\t\t\t\t\t+ theSocket.getRemoteHostIP(), 0);\r\n\t\t\t\t\twriteLine(\"On Port: \" + theSocket.getRemoteHostPort(), 0);\r\n\t\t\t\t\trunning = true;\r\n\t\t\t\t\t// socketListener();\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\twriteLine(\"We failed to connect!\", 0);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.setCursor(Cursor\r\n\t\t\t\t\t\t.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void onConnect() {}", "private void connectingPeer() {\n for (int index = 0; index < this.peers.size(); index++) {\n String peerUrl = urlAdderP2PNodeName((String) this.peers.get(index));\n try {\n Node distNode = NodeFactory.getNode(peerUrl);\n P2PService peer = (P2PService) distNode.getActiveObjects(P2PService.class.getName())[0];\n \n if (!peer.equals(this.localP2pService)) {\n // Send a message to the remote peer to record me\n peer.register(this.localP2pService);\n // Add the peer in my group of acquaintances\n this.acqGroup.add(peer);\n }\n } catch (Exception e) {\n logger.debug(\"The peer at \" + peerUrl +\n \" couldn't be contacted\", e);\n }\n }\n }", "private void connect() throws Exception {\n\t\tConnection c = DriverManager.getConnection(\"jdbc:mysql://\" + details[0] + \":3306/\" + details[3], details[1], details[2]);\n\t\tsetConnection(c);\n\t}", "private void connectUsingToken() {\n\t\tString protocol = null;\n\t\tint port = getPortNumber();\n\t\tif (isWebSocket()) {\n\t\t\tprotocol = \"wss://\";\n\t\t\t// If there is no port specified use default\n\t\t\tif(port == -1) {\n\t\t\t\tport = WSS_PORT;\n\t\t\t}\n\t\t} else {\n\t\t\tprotocol = \"ssl://\";\n\t\t\t// If there is no port specified use default\n\t\t\tif(port == -1) {\n\t\t\t\tport = MQTTS_PORT;\n\t\t\t}\n\t\t} \n\n\t\tString mqttServer = getMQTTServer();\n\t\tif(mqttServer != null){\n\t\t\tserverURI = protocol + mqttServer + \":\" + port;\n\t\t} else {\n\t\t\tserverURI = protocol + getOrgId() + \".\" + MESSAGING + \".\" + this.getDomain() + \":\" + port;\n\t\t}\n\t\ttry {\n\t\t\tmqttAsyncClient = new MqttAsyncClient(serverURI, clientId, DATA_STORE);\n\t\t\tmqttAsyncClient.setCallback(mqttCallback);\n\t\t\tmqttClientOptions = new MqttConnectOptions();\n\t\t\tif (clientUsername != null) {\n\t\t\t\tmqttClientOptions.setUserName(clientUsername);\n\t\t\t}\n\t\t\tif (clientPassword != null) {\n\t\t\t\tmqttClientOptions.setPassword(clientPassword.toCharArray());\n\t\t\t}\n\t\t\tmqttClientOptions.setCleanSession(this.isCleanSession());\n\t\t\tif(this.keepAliveInterval != -1) {\n\t\t\t\tmqttClientOptions.setKeepAliveInterval(this.keepAliveInterval);\n\t\t\t}\n\t\t\tmqttClientOptions.setMaxInflight(getMaxInflight());\n\t\t\tmqttClientOptions.setAutomaticReconnect(isAutomaticReconnect());\n\t\t\t\n\t\t\tSSLContext sslContext = SSLContext.getInstance(\"TLSv1.2\");\n\n\t\t\tsslContext.init(null, null, null);\n\t\t\t\n\t\t\tmqttClientOptions.setSocketFactory(sslContext.getSocketFactory());\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private boolean connectServer() {\n\t\tclNetwork networkInfo = new clNetwork();\n\t\ttry {\n\t\t\tSocket _socket = new Socket(dstAddress, networkInfo.NTP_PORT);\n\t\t\t_socket.setSoTimeout(1000);\n\t\t\t_socket.setTcpNoDelay(true);\n\t\t\topenedSocket = _socket;\n\t\t\tinStream = openedSocket.getInputStream();\n\t\t\toutStream = openedSocket.getOutputStream();\n\t\t\treturn true;\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\treturn false;\n\t\t}\t\t\n\t}", "public synchronized void startConnection ()\r\n\t{\r\n \t\tsynchronized (this)\r\n \t\t{\r\n \t\t\tif (_roboCOM!=null) return;\r\n\t\t\t\r\n\t\t\tuitoken++;\r\n\t\t\t_roboCOM = new TCPClient (MsgQueue,cm,uitoken);\r\n\r\n\t\t\t// debug parameters\r\n\t\t\t_roboCOM.msgHello=\"Start Connection ACCE\";\r\n\t\t\t\t\t\t\t\r\n\t \t \tnew Thread (_roboCOM).start();\r\n \t\t}\r\n\t}", "public void initializeConnection() {\n\n cluster = Cluster.builder().addContactPoint(host).build();\n session = cluster.connect(keyspaceName);\n session.execute(\"USE \".concat(keyspaceName));\n }", "public void connect() {\n if (isShutdown)\n return;\n\n setNewConnection(reconnectInternal());\n }", "public void getConnect() \n {\n con = new ConnectDB().getCn();\n \n }", "private void establishServerConnection() {\n int lb_port = Integer.parseInt(gui.getLBPort_Text().getText());\n gui.getLBPort_Text().setEnabled(false);\n String lb_ip = gui.getLBIP_Text().getText();\n gui.getLBIP_Text().setEnabled(false);\n int server_port = Integer.parseInt(gui.getServerPort_Text().getText());\n gui.getServerPort_Text().setEnabled(false);\n String server_ip = gui.getServerIP_Text().getText();\n gui.getServerIP_Text().setEnabled(false);\n obtainId(server_ip, server_port);\n lbInfo = new ConnectionInfo(lb_ip, lb_port, 3);\n\n if (connection.startServer(server_port)) {\n connectionHandler = new ServerConnections(connection, lbInfo, requestsAnswered, processingRequests, gui.getCompleted_Text(), gui.getProcessing_Text());\n new Thread(connectionHandler).start();\n\n requestServerId();\n scheduler.scheduleAtFixedRate(heartbeat, 10, 10, TimeUnit.SECONDS);\n } else {\n gui.getLBPort_Text().setEnabled(true);\n gui.getLBIP_Text().setEnabled(true);\n gui.getServerPort_Text().setEnabled(true);\n gui.getServerIP_Text().setEnabled(true);\n gui.getButton_Connect().setEnabled(true);\n }\n }", "public void connect()\n {\n \tLog.d(TAG, \"connect\");\n \t\n \tif(!this.isConnected ) {\n mContext.bindService(new Intent(\"com.google.tungsten.LedService\"), mServiceConnection, \n \t\tContext.BIND_AUTO_CREATE);\n \t}\n }", "@Override\n\tprotected void onConnect() {\n\t\tLogUtil.debug(\"server connect\");\n\n\t}", "public void connect() throws InterruptedException, ClassNotFoundException {\n\ttry {\n\t if (verbose) {\n\t\tSystem.out.println(\" [DN] > Attempting to reach NameNode...\");\n\t }\n\t String NAMENODE_IP = this.read_NN_IP();\n\t sock = new Socket(NAMENODE_IP, UTILS.Constants.NAMENODE_PORT);\n\t oos = new ObjectOutputStream(sock.getOutputStream());\n\t Msg greeting = new Msg();\n\t greeting.set_msg_type(Constants.MESSAGE_TYPE.DATANODE_GREETING);\n\t greeting.set_return_address(my_address);\n\t this.write_to_NN(greeting);\n\t this.listen_to_NN(); \n\t} catch (UnknownHostException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } \n }", "public void doConnect() throws IOException {\n if (!sc.finishConnect()) {\n return; // the selector gave a bad hint\n }\n\n // Sending pseudo\n var newConnexio = new ConnexionFrame(pseudo);\n queueMessage(newConnexio.asByteBuffer().flip());\n\n updateInterestOps();\n }", "public void connect() throws PersistenceMechanismException {\n\t\t\r\n\t}", "protected void connect(String hostname, String portNumber) \n throws SimulationException {\n \n String coorIntURL = \"\";\n \n try { \n coorIntURL = \"rmi://\" + hostname + \":\" + portNumber + \"/coordinator\"; \n \n theCoorInt = (CoordinatorInterface)Naming.lookup(coorIntURL);\n theCoorInt.registerForCallback(this); \n \n }\n catch (Exception e) {\n simManagerLogger.logp(Level.SEVERE, \"SimulationManagerModel\", \n \"establishRMIConnection\", \"Unable to establish RMI \" +\n \"communication with the CAD Simulator. URL <\" + coorIntURL + \">\", e);\n \n throw new SimulationException(SimulationException.CAD_SIM_CONNECT, e);\n } \n }", "public void connect() throws IOException {\n //Loggen \"connecting\"\n addEntry(\"connecting\");\n\n //Den Input und Output Stream zum Kommunizieren über das Socket\n //initzialisieren\n out = new PrintWriter(primeServer.getOutputStream(), true);\n in = new BufferedReader(new InputStreamReader(primeServer.getInputStream()));\n\n //Kommunikation mit dem Server initzialisieren\n out.println(MessageType.HALLO);\n //Die vom Server an diesen Client vergebene ID auslesen\n id = Integer.parseInt(in.readLine());\n\n //Loggen \"connected,id\"\n addEntry(\"connected,\" + id);\n }", "abstract void onConnect();", "private void connectToServer() {\n\t\ttry {\n\n\t\t\tSystem.out.println(\"Attempting connection to server at port: 5555\");\n\t\t\tsocket = new Socket(\"localhost\", 5554);\n\t\t\tSystem.out.println(\"Connected to server at port: 5555\");\n\n\t\t\tobjectOutputStream = new ObjectOutputStream(socket.getOutputStream());\n\t\t\tobjectInputStream = new ObjectInputStream(socket.getInputStream());\n\t\t\t\n\t\t\t// sending client object to server\n\t\t\tobjectOutputStream.writeInt(Main.getUser().getUserId());\n\t\t\tobjectOutputStream.flush();\n\t\t} catch (UnknownHostException e) {\n\t\t\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}", "@Override\n public void connect(String name) throws Exception {\n }", "public abstract void connect() throws UnknownHostException, IOException;", "private void openConnection () {\n String[] labels = {\"Host :\", \"Port :\"};\n String[] initialValues = {\"localhost\", \"1111\"};\n StandardDialogClient openHandler = new StandardDialogClient () {\n\t@Override\n\tpublic void dialogDismissed (StandardDialog d, int code) {\n\t try {\n\t InputDialog inputD = (InputDialog)d;\n\t if (inputD.wasCancelled ()) return;\n\t String[] results = inputD.getResults ();\n\t String host = results[0];\n\t String port = results[1];\n\t TwGateway connection =\n\t (TwGateway)TwGateway.openConnection (host, port);\n\t // The following call will fail if the G2 is secure.\n\t connection.login();\n\t setConnection (connection);\n\t } catch (Exception e) {\n\t new WarningDialog (null, \"Error During Connect\", true, e.toString (), null).setVisible (true);\n\t }\n\t}\n };\t \n\n new ConnectionInputDialog (getCurrentFrame (), \"Open Connection\",\n\t\t\t\t true, labels, initialValues,\n\t\t\t\t (StandardDialogClient) openHandler).setVisible (true);\n }", "public void connect() {\n\n DatabaseGlobalAccess.getInstance().setEmf(Persistence.createEntityManagerFactory(\"PU_dashboarddb\"));\n DatabaseGlobalAccess.getInstance().setEm(DatabaseGlobalAccess.getInstance().getEmf().createEntityManager());\n DatabaseGlobalAccess.getInstance().getDatabaseData();\n DatabaseGlobalAccess.getInstance().setDbReachable(true);\n }", "public void connect() throws QualificationTimeoutException {\n Qualification qualificator = new Qualification(config);\n connectivityStatus = ConnectivityStatus.Starting;\n try {\n qualificator.run();\n } catch (QualificationTimeoutException e) {\n connectivityStatus = ConnectivityStatus.Offline;\n throw e;\n }\n connectivityStatus = ConnectivityStatus.Connected;\n myExternalAddress = qualificator.getMappedAddress();\n Inet6Address teredoPrefix = qualificator.getTeredoPrefix();\n myTeredoAddress = new TeredoAddress(teredoPrefix,\n config.getServerIp(),\n myExternalAddress);\n coneNat = qualificator.isConeNat();\n }", "private void init() {\n\t\tsendPacket(new Packet01Login(\"[you have connected to \"+UPnPGateway.getMappedAddress()+\"]\", null));\n\t}", "public void connect() throws Exception\n\t{\n\t\tHostnameVerifier hv = new HostnameVerifier()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic boolean verify(String urlHostName, SSLSession session)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\ttrustAllHttpsCertificates();\n\t\tHttpsURLConnection.setDefaultHostnameVerifier(hv);\n\t\t// These following methods have to be called in this order.\n\t\tinitSvcInstRef();\n\t\tinitVimPort();\n\t\tinitServiceContent();\n\t\tvimPort.login(serviceContent.getSessionManager(), user, password, null);\n\t\tinitPropertyCollector();\n\t\tinitRootFolder();\n\t\tisConnected = true;\n\t}", "private void connectDevices() {\n Set<DeviceId> deviceSubjects =\n cfgRegistry.getSubjects(DeviceId.class, Tl1DeviceConfig.class);\n deviceSubjects.forEach(deviceId -> {\n Tl1DeviceConfig config =\n cfgRegistry.getConfig(deviceId, Tl1DeviceConfig.class);\n connectDevice(new DefaultTl1Device(config.ip(), config.port(), config.username(),\n config.password()));\n });\n }", "void connect() throws Exception;", "private synchronized int srvConnect() {\n \n\t\ttry {\n\t\t\t// The address to connect to\n\t\t\tSystem.out.println(TAG + \":Address:\" + getAddress());\n\t\t\tSystem.out.println(TAG + \":Port:\" + String.valueOf(getPort()));\n\t\t\taddr = InetAddress.getByName(getAddress());\n\t\t\t// The address plus the port\n\t\t\tservAddress = new InetSocketAddress(addr, getPort());\n\n\t\t\t// Try to connect\n\t\t\tmysock = new Socket();\n\t\t\t// This socket will block/ try connect for 5s\n\t\t\tmysock.connect(servAddress, 5000);\n\t\t\t// Show me if i was connected successfully\n\t\t\tif (mysock.isConnected()) {\n\t\t\t\tif(out == null){\n\t\t\t\t\tout = new PrintWriter(mysock.getOutputStream(),true);\n\t\t\t\t\tSystem.out.println(TAG + \":New socket and new streamer was created.\");\n\t\t\t\t}\n\t\t\t}\n \n\t\t} catch (NullPointerException e) {\n\t\t\tSystem.out.println(TAG + \":Null Pointer occured.\");\n\t\t\treturn -1;\n\t\t} catch (UnknownHostException e) {\n\t\t\tSystem.out.println(TAG + \":Server does not exist.\");\n\t\t\treturn -1;\n\t\t} catch (IOException e) {\n\t\t\tif (e instanceof SocketException && e.getMessage().contains(\"Permission denied\")) {\n\t\t\t\tSystem.out.println(TAG + \":You don't have internet permission:\" + e);\n\t\t\t} else if(e instanceof ConnectException && e.getMessage().contains(\"Connection refused\")){\n\t\t\t\tSystem.out.println(TAG + \":Connection is refused, the service on the server is probably down:\" + e);\n\t\t\t} else {\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.out.println(TAG + \":Could not connect\");\n\t\t\t}\n\t\t\treturn -1;\n\t\t}\n \n\t\treturn 0;\n\t}", "private void connect(InProgInfo inProg, int serverSelect) throws InterruptedException\n {\n String hostName = new String(seqMcastInfo.streamingMCastChanServerList().get(serverSelect).data().array());\n String portNumber = seqMcastInfo.streamingMCastChanPortList().get(serverSelect).toString();\n String interfaceName = CommandLine.value(\"rtif\");\n \n System.out.println(\"Starting connection to Real Time Session...\");\n \n channelSessions.add(new EDFChannelSession(this));\n if (channelSessions.get(channelSessions.size() - 1).initTransport(false, error) < CodecReturnCodes.SUCCESS)\n System.exit(error.errorId());\n\n // enable XML tracing\n if (CommandLine.booleanValue(\"x\"))\n {\n channelSessions.get(channelSessions.size() - 1).enableXmlTrace(dictionaryHandler.dictionary());\n }\n\n // get connect options from the channel session\n ConnectOptions copts = channelSessions.get(channelSessions.size() - 1).getConnectOptions();\n\n // set the connection parameters on the connect options\n copts.unifiedNetworkInfo().address(hostName);\n copts.unifiedNetworkInfo().serviceName(portNumber);\n copts.unifiedNetworkInfo().interfaceName(interfaceName);\n copts.blocking(false);\n copts.connectionType(ConnectionTypes.SEQUENCED_MCAST);\n\n channelSessions.get(channelSessions.size() - 1).connect(inProg, error);\n \n channelSessions.get(channelSessions.size() - 1).channelInfo().connectOptions(copts);\n\n serversConnectedTo.add(serverSelect);\n }", "public void connect() throws IOException {\n\t\tsocket = new Socket(host, port);\n\t\tin = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\tout = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));\n\t\tconnected = true;\n\t\texecutor = Executors.newScheduledThreadPool(5);\n\t}", "private void processConnect(String processIP, short processPort,\n String simulatedIP, short weight) {\n this.processAttach(processIP, processPort, simulatedIP, weight);\n this.processStart();\n }", "private void connectToMaster(int masterPort) throws Exception {\n // Getting the registry \n Registry registry = LocateRegistry.getRegistry(null, masterPort); \n \n // Looking up the registry for the remote object \n this.master = (Master) registry.lookup(\"master\"); \n }", "public void connect() {\n\t\tif (connected) return;\n\t\tconnected = true;\n\t\tfor (SQLConnection sqlConnection: sqlConnections) {\n\t\t\tsqlConnection.connection();\n\t\t}\n\t}", "private void connect() {\n connectionString = \"jdbc:mysql://\" + Config.getInstance().getMySQLServerName() + \":\" + Config.getInstance().getMySQLServerPort() + \"/\" + Config.getInstance().getMySQLDatabaseName();\n\n try {\n Assassin.p.getLogger().info(\"Attempting connection to MySQL...\");\n\n // Force driver to load if not yet loaded\n Class.forName(\"com.mysql.jdbc.Driver\");\n Properties connectionProperties = new Properties();\n connectionProperties.put(\"user\", Config.getInstance().getMySQLUserName());\n connectionProperties.put(\"password\", Config.getInstance().getMySQLUserPassword());\n connectionProperties.put(\"autoReconnect\", \"false\");\n connectionProperties.put(\"maxReconnects\", \"0\");\n connection = DriverManager.getConnection(connectionString, connectionProperties);\n\n Assassin.p.getLogger().info(\"Connection to MySQL was a success!\");\n }\n catch (SQLException ex) {\n connection = null;\n\n if (reconnectAttempt == 0 || reconnectAttempt >= 11) {\n Assassin.p.getLogger().severe(\"Connection to MySQL failed!\");\n printErrors(ex);\n }\n }\n catch (ClassNotFoundException ex) {\n connection = null;\n\n if (reconnectAttempt == 0 || reconnectAttempt >= 11) {\n Assassin.p.getLogger().severe(\"MySQL database driver not found!\");\n }\n }\n }", "public void connect(ConnectionConfig config) {\n connectionManagers.computeIfAbsent(config, connectionManagerFactoryFunction).connect();\n }", "protected void startIMConnection() throws IOException {\n\t\tchannel = SocketChannel.open();\n\t\tSelector selectorPublic;\n\t\t// Make this channel a non-blocking channel\n\t\tchannel.configureBlocking(false);\n\t\t// Connect the channel to the remote port\n\t\tchannel.connect(new InetSocketAddress(hostName, portNum));\n\t\t// Open the selector to handle our non-blocking I/O\n\t\tSelector regSelector = Selector.open();\n\t\t// Register our channel to receive alerts to complete the connection\n\t\tSelectionKey regKey = channel.register(regSelector, SelectionKey.OP_CONNECT);\n\t\t// Do nothing but wait until we have a response.\n\t\tregSelector.select(0);\n\t\tassert regKey.isConnectable();\n\t\t// Try and complete creating this connection\n\t\tif (!channel.finishConnect()) {\n\t\t\tthrow new IOException(\"Error, something went wrong and I was unable to finish making this connection\");\n\t\t}\n\t\t// We are done, close this selector.\n\t\tregSelector.close();\n\n\t\ttry {\n\t\t\t// Open the selector to handle our non-blocking I/O\n\t\t\tselectorPublic = Selector.open();\n\t\t\t// Register our channel to receive alerts to complete the connection\n\t\t\tchannel.register(selectorPublic, SelectionKey.OP_READ);\n\t\t} catch (IOException e) {\n\t\t\t// For the moment we are going to simply cover up that there was a\n\t\t\t// problem.\n\t\t\tassert false;\n\t\t}\n\t}", "public ControlCenter(){\n serverConnect = new Sockets();\n serverConnect.startClient(\"127.0.0.1\", 5000);\n port = 5000;\n }", "private void connectToServer() {\n\n try {\n this.socket = new Socket(InetAddress.getByName(serverIP), this.port);\n\n oos = new ObjectOutputStream(socket.getOutputStream());\n oos.flush();\n ois = new ObjectInputStream(socket.getInputStream());\n\n Message connectMessage = new Message(Message.CLIENT_CONNECT);\n connectMessage.setMessage(userName);\n sendToServer(connectMessage);\n\n Message message;\n while (true){// wait for welcome message\n message = (Message) ois.readObject();\n if(message != null && message.getType() == Message.WELCOME){\n handleMessage(message);\n break;\n }\n }\n\n } catch (UnknownHostException e) {\n e.printStackTrace();\n System.exit(0);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void connect() throws IOException {\n/* 151 */ this.delegate.connect();\n/* */ }", "public boolean connect() {\n if (this.connection == null) {\n this.connection = JdbcUiUtil.connect(getSource(), getPassword());\n if (this.connection == null) {\n return false;\n }\n fireStateChanged();\n }\n return true;\n }", "public void connect(String key){\n\t\tif(peers.containsKey(key) || establishing.contains(key)) return;\n\t\t\n\t\testablishing.add(key);\n\t\tPeerNode newPeer = PeerNode.createPeer(key);\n\t\tif(newPeer == null){\n\t\t\tConsole.message(\"A conexao com o par \" + key + \" nao pode ser estabelecida.\");\n\t\t}else{\n\t\t\t// connected successfully\n\t\t\tpeers.put(newPeer.getKey(), newPeer);\n\t\t\tnew Thread(newPeer).start();\n\t\t\tConsole.logEvent(\"CONNECTED\", key);\n\t\t\tgetMainWindow().updateList();\n\t\t}\n\t\testablishing.remove(key);\n\t}", "private void connectToNotary() throws RemoteException, InvalidSignatureException {\n\t\tfor (String notaryID : notaryServers.keySet()) {\n\t\t\tNotaryInterface notary = notaryServers.get(notaryID);\n\n\t\t\tString cnonce = cryptoUtils.generateCNonce();\n\t\t\tString toSign = notary.getNonce(this.id) + cnonce + this.id;\n\t\t\tX509Certificate res = notary\n\t\t\t\t.connectToNotary(this.id, cnonce, cryptoUtils.getStoredCert(),\n\t\t\t\t\tcryptoUtils.signMessage(toSign));\n\n\t\t\tcryptoUtils.addCertToList(notaryID, res);\n\t\t}\n\t}", "protected void connect(){\n MediaBrowserCompat mediaBrowser = mediaBrowserProvider.getMediaBrowser();\n if (mediaBrowser.isConnected()) {\n onConnected();\n }\n }", "@Override\n public void run()\n {\n if (nsServer == null)\n {\n Log.e((nsServer==null)+\"\");\n connectNS(ip, port);\n }\n else\n {\n Log.e(nsServer.toString());\n connectNS(nsServer.getIp(), nsServer.getPort());\n }\n }", "public static Connection connect(){\n\t\ttry {\n\t\t\tadd = Configure.getADDRESS();\n\t\t\tconn = ConnectionFactory.getConnect(add, Configure.port, \"TCP\");\n\t\t} catch (Exception e) {\n\t\t\tConfigure.logger.error(e.getMessage());\n\t\t\t//System.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\t//System.exit(0);\n\t\t}\n\t\treturn conn;\n\t}" ]
[ "0.692049", "0.67927754", "0.67927754", "0.67927754", "0.6702888", "0.66685987", "0.65747094", "0.6545512", "0.64667875", "0.646494", "0.6442792", "0.64359426", "0.64350444", "0.6420673", "0.64100385", "0.6406247", "0.6400162", "0.6390896", "0.6381988", "0.6375752", "0.6352771", "0.6332938", "0.63295543", "0.6325499", "0.63158906", "0.628501", "0.627703", "0.6271709", "0.6254839", "0.6252282", "0.6180798", "0.6180798", "0.61681825", "0.61660707", "0.6154245", "0.6153192", "0.61481375", "0.6148015", "0.6093096", "0.6072955", "0.60697144", "0.6055286", "0.6044778", "0.6041207", "0.60406274", "0.6037718", "0.6035077", "0.6032235", "0.6016922", "0.60140854", "0.60106367", "0.6006792", "0.60033154", "0.59855974", "0.5982127", "0.5980678", "0.5971779", "0.5968574", "0.5966978", "0.59598315", "0.5956291", "0.5944239", "0.59398717", "0.5937568", "0.59274983", "0.5927415", "0.5919863", "0.5919626", "0.5907336", "0.5896062", "0.58948016", "0.5889577", "0.5889346", "0.5886773", "0.5875185", "0.58721477", "0.58715713", "0.5859177", "0.5854599", "0.58531857", "0.5841415", "0.5838238", "0.58349067", "0.5820035", "0.5818595", "0.58074015", "0.5804672", "0.5802293", "0.58014846", "0.5801221", "0.57909167", "0.57859904", "0.57839316", "0.57829404", "0.57745785", "0.57654536", "0.5764932", "0.57632935", "0.57629925", "0.57606274", "0.57561153" ]
0.0
-1
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof User)) { return false; } User other = (User) object; if ((this.username == null && other.username != null) || (this.username != null && !this.username.equals(other.username))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public int getId(){ return id; }", "public int getId() {return id;}", "public int getId() {return Id;}", "public int getId(){return id;}", "public void setId(long id) {\n id_ = id;\n }", "private int getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId(){return id;}", "public int id() {return id;}", "public long getId(){return this.id;}", "public int getId(){\r\n return this.id;\r\n }", "@Override public String getID() { return id;}", "public Long id() { return this.id; }", "public Integer getId() { return id; }", "@Override\n\tpublic Integer getId() {\n return id;\n }", "@Override\n public Long getId () {\n return id;\n }", "@Override\n public long getId() {\n return id;\n }", "public Long getId() {return id;}", "public Long getId() {return id;}", "public String getId(){return id;}", "@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}", "public Integer getId() { return this.id; }", "@Override\r\n public int getId() {\n return id;\r\n }", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "public int getId() {\n return id;\n }", "public long getId() { return _id; }", "public int getId() {\n/* 35 */ return this.id;\n/* */ }", "public long getId() { return id; }", "public long getId() { return id; }", "public void setId(Long id) \n {\n this.id = id;\n }", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "public void setId(String id) {\n this.id = id;\n }", "@Override\n\tpublic void setId(Long id) {\n\t}", "public Long getId() {\n return id;\n }", "public long getId() { return this.id; }", "public int getId()\n {\n return id;\n }", "public void setId(int id){\r\n this.id = id;\r\n }", "protected abstract String getId();", "@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}", "@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}", "public int getID() {return id;}", "public int getID() {return id;}", "public String getId() { return id; }", "public String getId() { return id; }", "public String getId() { return id; }", "@Override\n public int getField(int id) {\n return 0;\n }", "public int getId ()\r\n {\r\n return id;\r\n }", "public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }", "public int getId(){\r\n return localId;\r\n }", "void setId(int id) {\n this.id = id;\n }", "@Override\n public Integer getId() {\n return id;\n }", "@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "@Override\n public int getId() {\n return id;\n }", "@Override\n public int getId() {\n return id;\n }", "public void setId(int id)\n {\n this.id=id;\n }", "@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }", "@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}", "public int getId()\r\n {\r\n return id;\r\n }", "public void setId(Long id){\n this.id = id;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "final protected int getId() {\n\t\treturn id;\n\t}", "private void clearId() {\n \n id_ = 0;\n }", "public abstract Long getId();", "public void setId(Long id) \r\n {\r\n this.id = id;\r\n }", "@Override\n public long getId() {\n return this.id;\n }", "public String getId(){ return id.get(); }", "@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }", "public Long getId() \n {\n return id;\n }", "@Override\n\tpublic void setId(int id) {\n\n\t}", "public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }", "@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}", "public int getID(){\n return id;\n }", "public String getID(){\n return Id;\n }", "public int getId()\n {\n return id;\n }" ]
[ "0.68948644", "0.6837785", "0.67038405", "0.6639133", "0.6639133", "0.65911627", "0.6576973", "0.6576973", "0.6573157", "0.6573157", "0.6573157", "0.6573157", "0.6573157", "0.6573157", "0.65598476", "0.65598476", "0.6543178", "0.6523156", "0.65143406", "0.6486455", "0.6475413", "0.64253694", "0.6417849", "0.64156985", "0.6400779", "0.6365434", "0.63546157", "0.63499856", "0.6346203", "0.63227576", "0.631763", "0.63001484", "0.629182", "0.629182", "0.62824625", "0.62701356", "0.62650704", "0.6263972", "0.6261773", "0.62577695", "0.6254688", "0.62506694", "0.62461007", "0.62461007", "0.62423015", "0.62379855", "0.62379855", "0.623057", "0.6222287", "0.62187535", "0.6218387", "0.6210061", "0.62075466", "0.62007535", "0.6199978", "0.6191151", "0.6188524", "0.6188524", "0.6188345", "0.6188345", "0.6188345", "0.6185662", "0.6182675", "0.6173944", "0.6173008", "0.6165809", "0.6164505", "0.61599946", "0.61553764", "0.61553764", "0.61553764", "0.61553764", "0.61553764", "0.61553764", "0.61553764", "0.6154299", "0.6154299", "0.6140791", "0.61329263", "0.612767", "0.61260307", "0.61032844", "0.6102886", "0.6102886", "0.6101522", "0.6101417", "0.61006045", "0.6098037", "0.6098024", "0.6093603", "0.6091251", "0.60907245", "0.60907245", "0.6090395", "0.6087628", "0.6075129", "0.6071766", "0.6070483", "0.6069239", "0.6068642", "0.6068207" ]
0.0
-1
Created by EdsonGustavo on 28/02/2015.
public interface CategoriaMaterialData extends JpaRepository<CategoriaMaterial, Integer> { List<CategoriaMaterial> findByNomeContaining(String nome); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "private stendhal() {\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "protected boolean func_70814_o() { return true; }", "private void m50366E() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override public int describeContents() { return 0; }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n protected void getExras() {\n }", "private void kk12() {\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo4359a() {\n }", "@Override\n public void init() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void method_4270() {}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\r\n\tpublic void init() {}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private void init() {\n\n\t}", "@Override\n public void init() {}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n void init() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "public void m23075a() {\n }", "private void m50367F() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public void mo12628c() {\n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void init() {\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n protected void initialize() {\n\n \n }", "private void strin() {\n\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void mo21877s() {\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public final void mo91715d() {\n }", "@Override\n protected void initialize() \n {\n \n }", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "public abstract void mo70713b();", "public void mo21779D() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n\tprotected void initialize() {\n\t}" ]
[ "0.5797744", "0.5712614", "0.5701367", "0.56613517", "0.5645056", "0.5588767", "0.558563", "0.55839694", "0.5574291", "0.5574291", "0.557194", "0.55399346", "0.5529114", "0.55241215", "0.54939", "0.54564756", "0.5453768", "0.5430292", "0.5411478", "0.54107076", "0.5410105", "0.5406498", "0.539948", "0.539948", "0.539948", "0.539948", "0.539948", "0.5395907", "0.53812605", "0.53687733", "0.5364367", "0.53553903", "0.5337016", "0.5335351", "0.53318024", "0.53318024", "0.53228307", "0.5318555", "0.5317987", "0.53011686", "0.5298548", "0.52845097", "0.52775246", "0.5272093", "0.52648014", "0.525895", "0.52542907", "0.52542907", "0.52542907", "0.52542907", "0.52542907", "0.52542907", "0.5243458", "0.5238925", "0.5236335", "0.52353686", "0.5233316", "0.52311635", "0.52311635", "0.52311635", "0.5225834", "0.5224283", "0.5223896", "0.52122974", "0.52089643", "0.52089643", "0.52089643", "0.5207126", "0.5201613", "0.5200674", "0.51976955", "0.51952744", "0.51919585", "0.51906353", "0.5187686", "0.5187686", "0.5187686", "0.5183943", "0.5183224", "0.5183224", "0.5183224", "0.5183224", "0.5183224", "0.5183224", "0.5183224", "0.5178487", "0.5170115", "0.51658595", "0.5162631", "0.5162631", "0.51623", "0.51583374", "0.5154888", "0.51488316", "0.51481694", "0.5146084", "0.5145448", "0.5133301", "0.51281136", "0.5117321", "0.5115833" ]
0.0
-1
/ renamed from: a
public final void m8915a(ResultCallback<? super R> resultCallback, R r) { sendMessage(obtainMessage(1, new Pair(resultCallback, r))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: b
public static void m14216b(Result result) { if (result instanceof Releasable) { try { ((Releasable) result).release(); } catch (Throwable e) { String valueOf = String.valueOf(result); StringBuilder stringBuilder = new StringBuilder(String.valueOf(valueOf).length() + 18); stringBuilder.append("Unable to release "); stringBuilder.append(valueOf); Log.w("BasePendingResult", stringBuilder.toString(), e); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo2508a(bxb bxb);", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "@Override\n\tpublic void b() {\n\n\t}", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public bb b() {\n return a(this.a);\n }", "@Override\n\tpublic void b1() {\n\t\t\n\t}", "public void b() {\r\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public abstract void b(StringBuilder sb);", "public void b() {\n }", "public void b() {\n }", "protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }", "public u(b paramb)\r\n/* 7: */ {\r\n/* 8: 9 */ this.a = paramb;\r\n/* 9: */ }", "public interface b {\n void H_();\n\n void I_();\n\n void J_();\n\n void a(C0063d dVar);\n\n void a(byte[] bArr);\n\n void b(boolean z);\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public void b() {\n ((a) this.a).b();\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "public t b() {\n return a(this.a);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }", "private void m678b(byte b) {\n byte[] bArr = this.f523r;\n bArr[0] = b;\n this.f552g.mo502b(bArr);\n }", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "public abstract T zzm(B b);", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }", "public abstract void zzc(B b, int i, int i2);", "public interface b {\n}", "public interface b {\n}", "private void m10263b(byte b) throws cf {\r\n this.f6483r[0] = b;\r\n this.g.m10347b(this.f6483r);\r\n }", "BSubstitution createBSubstitution();", "public void b(ahd paramahd) {}", "void b();", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "B database(S database);", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public abstract C0631bt mo9227aB();", "public an b() {\n return a(this.a);\n }", "protected abstract void a(bru parambru);", "static void go(Base b) {\n\t\tb.add(8);\n\t}", "void mo46242a(bmc bmc);", "public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }", "public interface bca extends bbn {\n bca a();\n\n bca a(String str);\n\n bca b(String str);\n\n bca c(String str);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public abstract BoundType b();", "public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }", "b(a aVar, com.bytedance.jedi.model.h.a aVar2) {\n super(aVar2);\n this.f21531a = aVar;\n this.f21532b = new com.bytedance.jedi.model.h.f(aVar);\n }", "private void b(int paramInt)\r\n/* 193: */ {\r\n/* 194:203 */ this.h.a(a(paramInt));\r\n/* 195: */ }", "public void b(ahb paramahb)\r\n/* 583: */ {\r\n/* 584:625 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 585:626 */ this.a[i] = amj.b(paramahb.a[i]);\r\n/* 586: */ }\r\n/* 587:628 */ for (i = 0; i < this.b.length; i++) {\r\n/* 588:629 */ this.b[i] = amj.b(paramahb.b[i]);\r\n/* 589: */ }\r\n/* 590:631 */ this.c = paramahb.c;\r\n/* 591: */ }", "interface b {\n\n /* compiled from: CreditAccountContract */\n public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }\n\n /* compiled from: CreditAccountContract */\n public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }\n}", "@Override\n\tpublic void visit(PartB partB) {\n\n\t}", "public abstract void zzb(B b, int i, long j);", "public abstract void zza(B b, int i, zzeh zzeh);", "int metodo2(int a, int b) {\r\n\r\n\t\tthis.a += 5; // se modifica el campo del objeto, el uso de la palabra reservada this se utiliza para referenciar al campo.\r\n\t\tb += 7;\r\n\t\treturn a; // modifica en la asignaci\\u00f3n\r\n\t}", "private void internalCopy(Board b) {\n for (int i = 0; i < SIDE * SIDE; i += 1) {\n set(i, b.get(i));\n }\n\n _directions = b._directions;\n _whoseMove = b._whoseMove;\n _history = b._history;\n }", "public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }", "public void b(StringBuilder sb) {\n sb.append(this.a);\n sb.append(')');\n }", "public void b() {\n e$a e$a;\n try {\n e$a = this.b;\n }\n catch (IOException iOException) {\n return;\n }\n Object object = this.c;\n e$a.b(object);\n }", "public abstract void a(StringBuilder sb);", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public abstract void zzf(Object obj, B b);", "public interface bdp {\n\n /* renamed from: a */\n public static final bdp f3422a = new bdo();\n\n /* renamed from: a */\n bdm mo1784a(akh akh);\n}", "@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract void a(b paramb, int paramInt1, int paramInt2);", "public void mo1945a(byte b) throws cf {\r\n m10263b(b);\r\n }", "void mo83703a(C32456b<T> bVar);", "public void a(String str) {\n ((b.b) this.b).d(str);\n }", "public void selectB() { }", "BOperation createBOperation();", "void metodo1(int a, int b) {\r\n\t\ta += 5;//par\\u00e1metro con el mismo nombre que el campo.\r\n\t\tb += 7;\r\n\t}", "private static void m2196a(StringBuffer stringBuffer, byte b) {\n stringBuffer.append(\"0123456789ABCDEF\".charAt((b >> 4) & 15)).append(\"0123456789ABCDEF\".charAt(b & 15));\n }", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public void b(fv paramfv)\r\n/* 408: */ {\r\n/* 409:423 */ this.a = new amj[36];\r\n/* 410:424 */ this.b = new amj[4];\r\n/* 411:425 */ for (int i = 0; i < paramfv.c(); i++)\r\n/* 412: */ {\r\n/* 413:426 */ fn localfn = paramfv.b(i);\r\n/* 414:427 */ int j = localfn.d(\"Slot\") & 0xFF;\r\n/* 415:428 */ amj localamj = amj.a(localfn);\r\n/* 416:429 */ if (localamj != null)\r\n/* 417: */ {\r\n/* 418:430 */ if ((j >= 0) && (j < this.a.length)) {\r\n/* 419:431 */ this.a[j] = localamj;\r\n/* 420: */ }\r\n/* 421:433 */ if ((j >= 100) && (j < this.b.length + 100)) {\r\n/* 422:434 */ this.b[(j - 100)] = localamj;\r\n/* 423: */ }\r\n/* 424: */ }\r\n/* 425: */ }\r\n/* 426: */ }", "public void b(String str) {\n ((b.b) this.b).e(str);\n }", "public String b()\r\n/* 35: */ {\r\n/* 36:179 */ return a();\r\n/* 37: */ }", "public abstract void zza(B b, int i, T t);", "public Item b(World paramaqu, BlockPosition paramdt)\r\n/* 189: */ {\r\n/* 190:220 */ return null;\r\n/* 191: */ }", "public abstract void zza(B b, int i, long j);", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public abstract void mo9798a(byte b);", "public void mo9798a(byte b) {\n if (this.f9108f == this.f9107e) {\n mo9827i();\n }\n byte[] bArr = this.f9106d;\n int i = this.f9108f;\n this.f9108f = i + 1;\n bArr[i] = b;\n this.f9109g++;\n }", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "private void m676a(TField bkVar, byte b) {\n if (b == -1) {\n b = m687e(bkVar.f538b);\n }\n short s = bkVar.f539c;\n short s2 = this.f519n;\n if (s <= s2 || s - s2 > 15) {\n m678b(b);\n mo446a(bkVar.f539c);\n } else {\n m686d(b | ((s - s2) << 4));\n }\n this.f519n = bkVar.f539c;\n }", "private static void m831a(C0741g<?> gVar, C0747b bVar) {\n gVar.mo9477a(C0743i.f718b, (C0739e<? super Object>) bVar);\n gVar.mo9476a(C0743i.f718b, (C0738d) bVar);\n gVar.mo9474a(C0743i.f718b, (C0736b) bVar);\n }", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "private void j()\n/* */ {\n/* 223 */ c localc = this.b;\n/* 224 */ this.b = this.c;\n/* 225 */ this.c = localc;\n/* 226 */ this.c.b();\n/* */ }", "public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }", "public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.64558864", "0.6283203", "0.6252635", "0.6250949", "0.6244743", "0.6216273", "0.6194491", "0.6193556", "0.61641675", "0.6140157", "0.60993093", "0.60974354", "0.6077849", "0.6001867", "0.5997364", "0.59737104", "0.59737104", "0.5905105", "0.5904295", "0.58908087", "0.5886636", "0.58828026", "0.5855491", "0.584618", "0.5842517", "0.5824137", "0.5824071", "0.58097327", "0.5802052", "0.58012927", "0.579443", "0.5792392", "0.57902914", "0.5785124", "0.57718205", "0.57589084", "0.5735892", "0.5735892", "0.5734873", "0.5727929", "0.5720821", "0.5712531", "0.5706813", "0.56896514", "0.56543154", "0.5651059", "0.5649904", "0.56496733", "0.5647035", "0.5640965", "0.5640109", "0.563993", "0.5631903", "0.5597427", "0.55843794", "0.5583287", "0.557783", "0.55734867", "0.55733293", "0.5572254", "0.55683887", "0.55624336", "0.55540246", "0.5553985", "0.55480546", "0.554261", "0.5535739", "0.5529958", "0.5519634", "0.5517503", "0.55160624", "0.5511545", "0.5505353", "0.5500533", "0.5491741", "0.5486198", "0.5481978", "0.547701", "0.54725856", "0.5471632", "0.5463497", "0.5460805", "0.5454913", "0.5454885", "0.54519916", "0.5441594", "0.5436747", "0.5432453", "0.5425923", "0.5424724", "0.54189867", "0.54162544", "0.54051477", "0.53998184", "0.53945845", "0.53887725", "0.5388146", "0.5387678", "0.53858143", "0.53850687", "0.5384439" ]
0.0
-1
/ renamed from: c
private final void m14217c(R r) { this.f11870i = r; this.f11875n = null; this.f11866e.countDown(); this.f11871j = this.f11870i.getStatus(); if (this.f11873l) { this.f11868g = null; } else if (this.f11868g != null) { this.f11864b.removeMessages(2); this.f11864b.m8915a(this.f11868g, mo3575g()); } else if (this.f11870i instanceof Releasable) { this.mResultGuardian = new C2474b(); } ArrayList arrayList = this.f11867f; int size = arrayList.size(); int i = 0; while (i < size) { Object obj = arrayList.get(i); i++; ((zza) obj).zzr(this.f11871j); } this.f11867f.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo5289a(C5102c c5102c);", "public static void c0() {\n\t}", "void mo57278c();", "private static void cajas() {\n\t\t\n\t}", "void mo5290b(C5102c c5102c);", "void mo80457c();", "void mo12638c();", "void mo28717a(zzc zzc);", "void mo21072c();", "@Override\n\tpublic void ccc() {\n\t\t\n\t}", "public void c() {\n }", "void mo17012c();", "C2451d mo3408a(C2457e c2457e);", "void mo88524c();", "void mo86a(C0163d c0163d);", "void mo17021c();", "public abstract void mo53562a(C18796a c18796a);", "void mo4874b(C4718l c4718l);", "void mo4873a(C4718l c4718l);", "C12017a mo41088c();", "public abstract void mo70702a(C30989b c30989b);", "void mo72114c();", "public void mo12628c() {\n }", "C2841w mo7234g();", "public interface C0335c {\n }", "public void mo1403c() {\n }", "public static void c3() {\n\t}", "public static void c1() {\n\t}", "void mo8712a(C9714a c9714a);", "void mo67924c();", "public void mo97906c() {\n }", "public abstract void mo27385c();", "String mo20731c();", "public int c()\r\n/* 74: */ {\r\n/* 75:78 */ return this.c;\r\n/* 76: */ }", "public interface C0939c {\n }", "void mo1582a(String str, C1329do c1329do);", "void mo304a(C0366h c0366h);", "void mo1493c();", "private String getString(byte c) {\n\t\treturn c==1? \"$ \": \" \";\n\t}", "java.lang.String getC3();", "C45321i mo90380a();", "public interface C11910c {\n}", "void mo57277b();", "String mo38972c();", "static int type_of_cnc(String passed){\n\t\treturn 1;\n\t}", "public static void CC2_1() {\n\t}", "static int type_of_cc(String passed){\n\t\treturn 1;\n\t}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public void mo56167c() {\n }", "public interface C0136c {\n }", "private void kk12() {\n\n\t}", "abstract String mo1748c();", "public abstract void mo70710a(String str, C24343db c24343db);", "public interface C0303q extends C0291e {\n /* renamed from: a */\n void mo1747a(int i);\n\n /* renamed from: a */\n void mo1749a(C0288c cVar);\n\n /* renamed from: a */\n void mo1751a(byte[] bArr);\n\n /* renamed from: b */\n void mo1753b(int i);\n\n /* renamed from: c */\n void mo1754c(int i);\n\n /* renamed from: d */\n void mo1755d(int i);\n\n /* renamed from: e */\n int mo1756e(int i);\n\n /* renamed from: g */\n int mo1760g();\n\n /* renamed from: g */\n void mo1761g(int i);\n\n /* renamed from: h */\n void mo1763h(int i);\n}", "C3577c mo19678C();", "public abstract int c();", "public abstract int c();", "public final void mo11687c() {\n }", "byte mo30283c();", "private java.lang.String c(java.lang.String r7) {\n /*\n r6 = this;\n r2 = \"\";\n r0 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n if (r0 == 0) goto L_0x0050;\n L_0x0006:\n r0 = new java.lang.StringBuilder;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = java.lang.String.valueOf(r7);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0.<init>(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = \".\";\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.toString();\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x001f:\n r1 = r6.d;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r1.openFileInput(r0);\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x0025:\n r3 = new java.io.BufferedReader;\n r4 = new java.io.InputStreamReader;\n r0 = r1;\n r0 = (java.io.InputStream) r0;\n r5 = \"UTF-8\";\n r5 = java.nio.charset.Charset.forName(r5);\n r4.<init>(r0, r5);\n r3.<init>(r4);\n r0 = new java.lang.StringBuffer;\n r0.<init>();\n L_0x003d:\n r4 = r3.readLine();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n if (r4 != 0) goto L_0x0061;\n L_0x0043:\n r0 = r0.toString();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007d }\n r1.close();\t Catch:{ IOException -> 0x007d }\n r3.close();\t Catch:{ IOException -> 0x007d }\n L_0x004f:\n return r0;\n L_0x0050:\n r0 = r7;\n goto L_0x001f;\n L_0x0052:\n r0 = move-exception;\n r0 = r6.d;\t Catch:{ IOException -> 0x005e }\n r0 = r0.getAssets();\t Catch:{ IOException -> 0x005e }\n r1 = r0.open(r7);\t Catch:{ IOException -> 0x005e }\n goto L_0x0025;\n L_0x005e:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0061:\n r0.append(r4);\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n goto L_0x003d;\n L_0x0065:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x0070 }\n r1.close();\t Catch:{ IOException -> 0x0070 }\n r3.close();\t Catch:{ IOException -> 0x0070 }\n r0 = r2;\n goto L_0x004f;\n L_0x0070:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0073:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007f }\n r1.close();\t Catch:{ IOException -> 0x007f }\n r3.close();\t Catch:{ IOException -> 0x007f }\n L_0x007c:\n throw r0;\n L_0x007d:\n r1 = move-exception;\n goto L_0x004f;\n L_0x007f:\n r1 = move-exception;\n goto L_0x007c;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.a.b.b.c(java.lang.String):java.lang.String\");\n }", "@Override\n\tpublic void compile(CodeBlock c, CompilerEnvironment environment) {\n\n\t}", "public interface C3196it extends C3208jc {\n /* renamed from: a */\n void mo30275a(long j);\n\n /* renamed from: b */\n C3197iu mo30281b(long j);\n\n /* renamed from: b */\n boolean mo30282b();\n\n /* renamed from: c */\n byte mo30283c();\n\n /* renamed from: c */\n String mo30285c(long j);\n\n /* renamed from: d */\n void mo30290d(long j);\n\n /* renamed from: e */\n int mo30291e();\n\n /* renamed from: f */\n long mo30295f();\n}", "public static void mmcc() {\n\t}", "java.lang.String getCit();", "public abstract C mo29734a();", "C15430g mo56154a();", "void mo41086b();", "@Override\n public void func_104112_b() {\n \n }", "public interface C9223b {\n }", "public abstract String mo11611b();", "void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);", "String getCmt();", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "interface C2578d {\n}", "public interface C1803l extends C1813t {\n /* renamed from: b */\n C1803l mo7382b(C2778au auVar);\n\n /* renamed from: f */\n List<C1700ar> mo7233f();\n\n /* renamed from: g */\n C2841w mo7234g();\n\n /* renamed from: q */\n C1800i mo7384q();\n}", "double fFromC(double c) {\n return (c * 9 / 5) + 32;\n }", "void mo72113b();", "void mo1749a(C0288c cVar);", "public interface C0764b {\n}", "void mo41083a();", "String[] mo1153c();", "C1458cs mo7613iS();", "public interface C0333a {\n }", "public abstract int mo41077c();", "public interface C8843g {\n}", "public abstract void mo70709a(String str, C41018cm c41018cm);", "void mo28307a(zzgd zzgd);", "public static void mcdc() {\n\t}", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "C1435c mo1754a(C1433a c1433a, C1434b c1434b);", "public interface C0389gj extends C0388gi {\n}", "C5727e mo33224a();", "C12000e mo41087c(String str);", "public abstract String mo118046b();", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C0938b {\n }", "void mo80455b();", "public interface C0385a {\n }", "public interface C5527c {\n /* renamed from: a */\n int mo4095a(int i);\n\n /* renamed from: b */\n C5537g mo4096b(int i);\n}", "public interface C32231g {\n /* renamed from: a */\n void mo8280a(int i, int i2, C1207m c1207m);\n}", "public interface C11994b {\n /* renamed from: a */\n C11996a mo41079a(String str);\n\n /* renamed from: a */\n C11996a mo41080a(String str, C11997b bVar, String... strArr);\n\n /* renamed from: a */\n C11998c mo41081a(String str, C11999d dVar, String... strArr);\n\n /* renamed from: a */\n C12000e mo41082a(String str, C12001f fVar, String... strArr);\n\n /* renamed from: a */\n void mo41083a();\n\n /* renamed from: a */\n void mo41084a(C12018b bVar, ConnectionState... connectionStateArr);\n\n /* renamed from: b */\n C11996a mo41085b(String str);\n\n /* renamed from: b */\n void mo41086b();\n\n /* renamed from: c */\n C12000e mo41087c(String str);\n\n /* renamed from: c */\n C12017a mo41088c();\n\n /* renamed from: d */\n void mo41089d(String str);\n\n /* renamed from: e */\n C11998c mo41090e(String str);\n\n /* renamed from: f */\n C12000e mo41091f(String str);\n\n /* renamed from: g */\n C11998c mo41092g(String str);\n}" ]
[ "0.64592767", "0.644052", "0.6431582", "0.6418656", "0.64118475", "0.6397491", "0.6250796", "0.62470585", "0.6244832", "0.6232792", "0.618864", "0.61662376", "0.6152657", "0.61496663", "0.6138441", "0.6137171", "0.6131197", "0.6103783", "0.60983956", "0.6077118", "0.6061723", "0.60513836", "0.6049069", "0.6030368", "0.60263443", "0.60089093", "0.59970635", "0.59756917", "0.5956231", "0.5949343", "0.5937446", "0.5911776", "0.59034705", "0.5901311", "0.5883238", "0.5871533", "0.5865361", "0.5851141", "0.581793", "0.5815705", "0.58012", "0.578891", "0.57870495", "0.5775621", "0.57608724", "0.5734331", "0.5731584", "0.5728505", "0.57239383", "0.57130504", "0.57094604", "0.570793", "0.5697671", "0.56975955", "0.56911296", "0.5684489", "0.5684489", "0.56768984", "0.56749034", "0.5659463", "0.56589085", "0.56573", "0.56537443", "0.5651912", "0.5648272", "0.5641736", "0.5639226", "0.5638583", "0.56299245", "0.56297386", "0.56186295", "0.5615729", "0.56117755", "0.5596015", "0.55905765", "0.55816257", "0.55813104", "0.55723965", "0.5572061", "0.55696625", "0.5566985", "0.55633485", "0.555888", "0.5555646", "0.55525774", "0.5549722", "0.5548184", "0.55460495", "0.5539394", "0.5535825", "0.55300397", "0.5527975", "0.55183905", "0.5517322", "0.5517183", "0.55152744", "0.5514932", "0.55128884", "0.5509501", "0.55044043", "0.54984957" ]
0.0
-1
/ renamed from: g
private final R mo3575g() { R r; synchronized (this.f11863a) { ad.m9051a(this.f11872k ^ true, (Object) "Result has already been consumed."); ad.m9051a(m14229d(), (Object) "Result is not ready."); r = this.f11870i; this.f11870i = null; this.f11868g = null; this.f11872k = true; } cb cbVar = (cb) this.f11869h.getAndSet(null); if (cbVar != null) { cbVar.mo2545a(this); } return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void g() {\n }", "public void gored() {\n\t\t\n\t}", "public boolean g()\r\n/* 94: */ {\r\n/* 95:94 */ return this.g;\r\n/* 96: */ }", "public int g()\r\n/* 173: */ {\r\n/* 174:198 */ return 0;\r\n/* 175: */ }", "public void stg() {\n\n\t}", "public xm n()\r\n/* 274: */ {\r\n/* 275:287 */ if ((this.g == null) && (this.h != null) && (this.h.length() > 0)) {\r\n/* 276:288 */ this.g = this.o.a(this.h);\r\n/* 277: */ }\r\n/* 278:290 */ return this.g;\r\n/* 279: */ }", "int getG();", "private final zzgy zzgb() {\n }", "public int g()\r\n/* 601: */ {\r\n/* 602:645 */ return 0;\r\n/* 603: */ }", "private static void g() {\n h h10 = q;\n synchronized (h10) {\n h10.f();\n Object object = h10.e();\n object = object.iterator();\n boolean bl2;\n while (bl2 = object.hasNext()) {\n Object object2 = object.next();\n object2 = (g)object2;\n Object object3 = ((g)object2).getName();\n object3 = i.h.d.j((String)object3);\n ((g)object2).h((i.h.c)object3);\n }\n return;\n }\n }", "public int g()\r\n {\r\n return 1;\r\n }", "void mo28307a(zzgd zzgd);", "void mo21076g();", "void mo56163g();", "void mo98971a(C29296g gVar, int i);", "public int getG();", "void mo98970a(C29296g gVar);", "public abstract long g();", "public com.amap.api.col.n3.al g(java.lang.String r6) {\n /*\n r5 = this;\n r0 = 0\n if (r6 == 0) goto L_0x003a\n int r1 = r6.length()\n if (r1 > 0) goto L_0x000a\n goto L_0x003a\n L_0x000a:\n java.util.List<com.amap.api.col.n3.al> r1 = r5.c\n monitor-enter(r1)\n java.util.List<com.amap.api.col.n3.al> r2 = r5.c // Catch:{ all -> 0x0037 }\n java.util.Iterator r2 = r2.iterator() // Catch:{ all -> 0x0037 }\n L_0x0013:\n boolean r3 = r2.hasNext() // Catch:{ all -> 0x0037 }\n if (r3 == 0) goto L_0x0035\n java.lang.Object r3 = r2.next() // Catch:{ all -> 0x0037 }\n com.amap.api.col.n3.al r3 = (com.amap.api.col.n3.al) r3 // Catch:{ all -> 0x0037 }\n java.lang.String r4 = r3.getCity() // Catch:{ all -> 0x0037 }\n boolean r4 = r6.equals(r4) // Catch:{ all -> 0x0037 }\n if (r4 != 0) goto L_0x0033\n java.lang.String r4 = r3.getPinyin() // Catch:{ all -> 0x0037 }\n boolean r4 = r6.equals(r4) // Catch:{ all -> 0x0037 }\n if (r4 == 0) goto L_0x0013\n L_0x0033:\n monitor-exit(r1) // Catch:{ all -> 0x0037 }\n return r3\n L_0x0035:\n monitor-exit(r1)\n return r0\n L_0x0037:\n r6 = move-exception\n monitor-exit(r1)\n throw r6\n L_0x003a:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.amap.api.col.n3.am.g(java.lang.String):com.amap.api.col.n3.al\");\n }", "public int getG() {\r\n\t\treturn g;\r\n\t}", "private Gng() {\n }", "void mo57277b();", "int mo98967b(C29296g gVar);", "public void mo21782G() {\n }", "public final void mo74763d(C29296g gVar) {\n }", "private final java.lang.String m14284g() {\n /*\n r3 = this;\n b.h.b.a.b.b.ah r0 = r3.f8347b\n b.h.b.a.b.b.m r0 = r0.mo7065b()\n b.h.b.a.b.b.ah r1 = r3.f8347b\n b.h.b.a.b.b.az r1 = r1.mo7077p()\n b.h.b.a.b.b.az r2 = p073b.p085h.p087b.p088a.p090b.p094b.C1710ay.f5339d\n boolean r1 = p073b.p079e.p081b.C1489j.m6971a(r1, r2)\n if (r1 == 0) goto L_0x0056\n boolean r1 = r0 instanceof p073b.p085h.p087b.p088a.p090b.p127j.p128a.p129a.C2608e\n if (r1 == 0) goto L_0x0056\n b.h.b.a.b.j.a.a.e r0 = (p073b.p085h.p087b.p088a.p090b.p127j.p128a.p129a.C2608e) r0\n b.h.b.a.b.e.a$c r0 = r0.mo9643H()\n b.h.b.a.b.g.i$c r0 = (p073b.p085h.p087b.p088a.p090b.p117g.C2383i.C2387c) r0\n b.h.b.a.b.g.i$f<b.h.b.a.b.e.a$c, java.lang.Integer> r1 = p073b.p085h.p087b.p088a.p090b.p112e.p114b.C2330b.f7137i\n java.lang.String r2 = \"JvmProtoBuf.classModuleName\"\n p073b.p079e.p081b.C1489j.m6969a(r1, r2)\n java.lang.Object r0 = p073b.p085h.p087b.p088a.p090b.p112e.p113a.C2288f.m11197a(r0, r1)\n java.lang.Integer r0 = (java.lang.Integer) r0\n if (r0 == 0) goto L_0x003e\n b.h.b.a.b.e.a.c r1 = r3.f8350e\n java.lang.Number r0 = (java.lang.Number) r0\n int r0 = r0.intValue()\n java.lang.String r0 = r1.mo8811a(r0)\n if (r0 == 0) goto L_0x003e\n goto L_0x0040\n L_0x003e:\n java.lang.String r0 = \"main\"\n L_0x0040:\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r2 = \"$\"\n r1.append(r2)\n java.lang.String r0 = p073b.p085h.p087b.p088a.p090b.p116f.C2361g.m11709a(r0)\n r1.append(r0)\n java.lang.String r0 = r1.toString()\n return r0\n L_0x0056:\n b.h.b.a.b.b.ah r1 = r3.f8347b\n b.h.b.a.b.b.az r1 = r1.mo7077p()\n b.h.b.a.b.b.az r2 = p073b.p085h.p087b.p088a.p090b.p094b.C1710ay.f5336a\n boolean r1 = p073b.p079e.p081b.C1489j.m6971a(r1, r2)\n if (r1 == 0) goto L_0x00a0\n boolean r0 = r0 instanceof p073b.p085h.p087b.p088a.p090b.p094b.C1680ab\n if (r0 == 0) goto L_0x00a0\n b.h.b.a.b.b.ah r0 = r3.f8347b\n if (r0 == 0) goto L_0x0098\n b.h.b.a.b.j.a.a.j r0 = (p073b.p085h.p087b.p088a.p090b.p127j.p128a.p129a.C2638j) r0\n b.h.b.a.b.j.a.a.f r0 = r0.mo9635N()\n boolean r1 = r0 instanceof p073b.p085h.p087b.p088a.p090b.p100d.p110b.C2129i\n if (r1 == 0) goto L_0x00a0\n b.h.b.a.b.d.b.i r0 = (p073b.p085h.p087b.p088a.p090b.p100d.p110b.C2129i) r0\n b.h.b.a.b.i.d.b r1 = r0.mo8045e()\n if (r1 == 0) goto L_0x00a0\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r2 = \"$\"\n r1.append(r2)\n b.h.b.a.b.f.f r0 = r0.mo8042b()\n java.lang.String r0 = r0.mo9039a()\n r1.append(r0)\n java.lang.String r0 = r1.toString()\n return r0\n L_0x0098:\n b.u r0 = new b.u\n java.lang.String r1 = \"null cannot be cast to non-null type org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedPropertyDescriptor\"\n r0.<init>(r1)\n throw r0\n L_0x00a0:\n java.lang.String r0 = \"\"\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p073b.p085h.p087b.p088a.C3008g.C3011c.m14284g():java.lang.String\");\n }", "void mo16687a(T t, C4621gg ggVar) throws IOException;", "public final void mo74759a(C29296g gVar) {\n }", "int mo98966a(C29296g gVar);", "void mo57278c();", "public double getG();", "public boolean h()\r\n/* 189: */ {\r\n/* 190:187 */ return this.g;\r\n/* 191: */ }", "private void kk12() {\n\n\t}", "gp(go goVar, String str) {\n super(str);\n this.f82115a = goVar;\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void draw(Graphics g) {\n\t\t\n\t}", "@Override\n\tpublic void draw(Graphics g) {\n\t\t\n\t}", "C2841w mo7234g();", "public abstract long g(int i2);", "public final h.c.b<java.lang.Object> g() {\n /*\n r2 = this;\n h.c.b<java.lang.Object> r0 = r2.f15786a\n if (r0 == 0) goto L_0x0005\n goto L_0x001d\n L_0x0005:\n h.c.e r0 = r2.b()\n h.c.c$b r1 = h.c.c.f14536c\n h.c.e$b r0 = r0.get(r1)\n h.c.c r0 = (h.c.c) r0\n if (r0 == 0) goto L_0x001a\n h.c.b r0 = r0.c(r2)\n if (r0 == 0) goto L_0x001a\n goto L_0x001b\n L_0x001a:\n r0 = r2\n L_0x001b:\n r2.f15786a = r0\n L_0x001d:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.coroutines.jvm.internal.ContinuationImpl.g():h.c.b\");\n }", "void mo41086b();", "public abstract int mo123248g();", "public void getK_Gelisir(){\n K_Gelistir();\r\n }", "int mo54441g(int i);", "private static String m11g() {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"sh\");\n stringBuilder.append(\"el\");\n stringBuilder.append(\"la\");\n stringBuilder.append(\"_ve\");\n stringBuilder.append(\"rs\");\n stringBuilder.append(\"i\");\n stringBuilder.append(\"on\");\n return stringBuilder.toString();\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "Groepen maakGroepsindeling(Groepen aanwezigheidsGroepen);", "public String getGg() {\n return gg;\n }", "public void g() {\n this.f25459e.Q();\n }", "void mo1761g(int i);", "public abstract void bepaalGrootte();", "public void referToGP(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "public final i g() {\n return new i();\n }", "public abstract void mo42331g();", "@Override\n public void func_104112_b() {\n \n }", "public int g2dsg(int v) { return g2dsg[v]; }", "void NhapGT(int thang, int nam) {\n }", "Gruppo getGruppo();", "public void method_4270() {}", "public abstract String mo41079d();", "public abstract String mo118046b();", "public void setGg(String gg) {\n this.gg = gg;\n }", "public abstract CharSequence mo2161g();", "void mo119582b();", "private void strin() {\n\n\t}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public String BFS(int g) {\n\t\t//TODO\n\t}", "void mo21073d();", "private stendhal() {\n\t}", "public void golpearJugador(Jugador j) {\n\t\t\n\t}", "public void ganar() {\n // TODO implement here\n }", "public static Object gvRender(Object... arg) {\r\nUNSUPPORTED(\"e2g1sf67k7u629a0lf4qtd4w8\"); // int gvRender(GVC_t *gvc, graph_t *g, const char *format, FILE *out)\r\nUNSUPPORTED(\"erg9i1970wdri39osu8hx2a6e\"); // {\r\nUNSUPPORTED(\"1bh3yj957he6yv2dkeg4pzwdk\"); // int rc;\r\nUNSUPPORTED(\"1ag9dz4apxn0w3cz8w2bfm6se\"); // GVJ_t *job;\r\nUNSUPPORTED(\"8msotrfl0cngiua3j57ylm26b\"); // g = g->root;\r\nUNSUPPORTED(\"exts51afuertju5ed5v7pdpg7\"); // /* create a job for the required format */\r\nUNSUPPORTED(\"dn6z1r1bbrtmr58m8dnfgfnm0\"); // rc = gvjobs_output_langname(gvc, format);\r\nUNSUPPORTED(\"5apijrijm2r8b1g2l4x7iee7s\"); // job = gvc->job;\r\nUNSUPPORTED(\"5wvj0ph8uqfgg8jl3g39jsf51\"); // if (rc == 999) {\r\nUNSUPPORTED(\"4lkoedjryn54aff3fyrsewwu5\"); // agerr (AGERR, \"Format: \\\"%s\\\" not recognized. Use one of:%s\\n\",\r\nUNSUPPORTED(\"2pjgp86rkudo6mihbako5yps2\"); // format, gvplugin_list(gvc, API_device, format));\r\nUNSUPPORTED(\"f3a98gxettwtewduvje9y3524\"); // return -1;\r\nUNSUPPORTED(\"dvgyxsnyeqqnyzq696k3vskib\"); // }\r\nUNSUPPORTED(\"ect62lxc3zm51lhzifift55m\"); // job->output_lang = gvrender_select(job, job->output_langname);\r\nUNSUPPORTED(\"ewlceg1k4gs2e6syq4ear5kzo\"); // if (!(agbindrec(g, \"Agraphinfo_t\", 0, NOT(0)) && GD_drawing(g)) && !(job->flags & (1<<26))) {\r\nUNSUPPORTED(\"3yo4xyapbp7osp8uyz4kff98s\"); // \tagerrorf( \"Layout was not done\\n\");\r\nUNSUPPORTED(\"8d9xfgejx5vgd6shva5wk5k06\"); // \treturn -1;\r\nUNSUPPORTED(\"dvgyxsnyeqqnyzq696k3vskib\"); // }\r\nUNSUPPORTED(\"2ai20uylya195fbdqwjy9bz0n\"); // job->output_file = out;\r\nUNSUPPORTED(\"10kpqi6pvibjsxjyg0g76lix3\"); // if (out == NULL)\r\nUNSUPPORTED(\"d47ukby9krmz2k8ycmzzynnfr\"); // \tjob->flags |= (1<<27);\r\nUNSUPPORTED(\"9szsye4q9jykqvtk0bc1r91d0\"); // rc = gvRenderJobs(gvc, g);\r\nUNSUPPORTED(\"7l8ugws8ptgtlxc1ymmh3cf18\"); // gvrender_end_job(job);\r\nUNSUPPORTED(\"a9p7yonln7g91ge7xab3xf9dr\"); // gvjobs_delete(gvc);\r\nUNSUPPORTED(\"5bc9k4vsl6g7wejc5xefc5964\"); // return rc;\r\nUNSUPPORTED(\"c24nfmv9i7o5eoqaymbibp7m7\"); // }\r\n\r\nthrow new UnsupportedOperationException();\r\n}", "void mo41083a();", "@VisibleForTesting\n public final long g(long j) {\n long j2 = j - this.f10062b;\n this.f10062b = j;\n return j2;\n }", "void mo72113b();", "@Override\n\tpublic void render(Graphics g) {\n\t\t\n\t}", "@Override\n\tpublic void render(Graphics g) {\n\t\t\n\t}", "public void b(gy ☃) {}\r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ public void a(gy ☃) {}", "Gtr createGtr();", "TGG createTGG();", "public abstract String mo9239aw();", "public void setG(boolean g) {\n\tthis.g = g;\n }", "private static C8504ba m25889b(C2272g gVar) throws Exception {\n return m25888a(gVar);\n }", "void mo21074e();", "private String pcString(String g, String d) {\n return g+\"^part_of(\"+d+\")\";\n }", "public abstract String mo13682d();", "public void mo38117a() {\n }", "public abstract void mo70713b();", "public Gitlet(int a) {\n\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void draw(Graphics2D g) {\n\t\t\n\t}", "public abstract T zzg(T t, T t2);", "public int mo9232aG() {\n return 0;\n }", "public void mo3286a(C0813g gVar) {\n this.f2574g = gVar;\n }", "public void mo21787L() {\n }", "@Override\n public String toString(){\n return \"G(\"+this.getVidas()+\")\";\n }", "public String DFS(int g) {\n\t\t//TODO\n\t}", "public static Object gvRenderContext(Object... arg) {\r\nUNSUPPORTED(\"6bxfu9f9cshxn0i97berfl9bw\"); // int gvRenderContext(GVC_t *gvc, graph_t *g, const char *format, void *context)\r\nUNSUPPORTED(\"erg9i1970wdri39osu8hx2a6e\"); // {\r\nUNSUPPORTED(\"1bh3yj957he6yv2dkeg4pzwdk\"); // int rc;\r\nUNSUPPORTED(\"1ag9dz4apxn0w3cz8w2bfm6se\"); // GVJ_t *job;\r\nUNSUPPORTED(\"8msotrfl0cngiua3j57ylm26b\"); // g = g->root;\r\nUNSUPPORTED(\"exts51afuertju5ed5v7pdpg7\"); // /* create a job for the required format */\r\nUNSUPPORTED(\"dn6z1r1bbrtmr58m8dnfgfnm0\"); // rc = gvjobs_output_langname(gvc, format);\r\nUNSUPPORTED(\"5apijrijm2r8b1g2l4x7iee7s\"); // job = gvc->job;\r\nUNSUPPORTED(\"5wvj0ph8uqfgg8jl3g39jsf51\"); // if (rc == 999) {\r\nUNSUPPORTED(\"8r1a6szpsnku0jhatqkh0qo75\"); // \t\tagerr(AGERR, \"Format: \\\"%s\\\" not recognized. Use one of:%s\\n\",\r\nUNSUPPORTED(\"2pj79j8toe6bactkaedt54xcv\"); // \t\t\t format, gvplugin_list(gvc, API_device, format));\r\nUNSUPPORTED(\"b0epxudfxjm8kichhaautm2qi\"); // \t\treturn -1;\r\nUNSUPPORTED(\"dvgyxsnyeqqnyzq696k3vskib\"); // }\r\nUNSUPPORTED(\"ect62lxc3zm51lhzifift55m\"); // job->output_lang = gvrender_select(job, job->output_langname);\r\nUNSUPPORTED(\"ewlceg1k4gs2e6syq4ear5kzo\"); // if (!(agbindrec(g, \"Agraphinfo_t\", 0, NOT(0)) && GD_drawing(g)) && !(job->flags & (1<<26))) {\r\nUNSUPPORTED(\"3yo4xyapbp7osp8uyz4kff98s\"); // \tagerrorf( \"Layout was not done\\n\");\r\nUNSUPPORTED(\"b0epxudfxjm8kichhaautm2qi\"); // \t\treturn -1;\r\nUNSUPPORTED(\"dvgyxsnyeqqnyzq696k3vskib\"); // }\r\nUNSUPPORTED(\"ex1rhur9nlj950oe8r621uxxk\"); // job->context = context;\r\nUNSUPPORTED(\"3hvm1mza6yapsb3hi7bkw03cs\"); // job->external_context = NOT(0);\r\nUNSUPPORTED(\"9szsye4q9jykqvtk0bc1r91d0\"); // rc = gvRenderJobs(gvc, g);\r\nUNSUPPORTED(\"7l8ugws8ptgtlxc1ymmh3cf18\"); // gvrender_end_job(job);\r\nUNSUPPORTED(\"dql0bth0nzsrpiu9vnffonrhf\"); // gvdevice_finalize(job);\r\nUNSUPPORTED(\"a9p7yonln7g91ge7xab3xf9dr\"); // gvjobs_delete(gvc);\r\nUNSUPPORTED(\"5bc9k4vsl6g7wejc5xefc5964\"); // return rc;\r\nUNSUPPORTED(\"c24nfmv9i7o5eoqaymbibp7m7\"); // }\r\n\r\nthrow new UnsupportedOperationException();\r\n}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "void mo54435d();" ]
[ "0.678414", "0.67709124", "0.6522526", "0.64709187", "0.6450875", "0.62853396", "0.6246107", "0.6244691", "0.6212993", "0.61974055", "0.61380696", "0.6138033", "0.6105423", "0.6057178", "0.60355175", "0.60195917", "0.59741", "0.596904", "0.59063077", "0.58127505", "0.58101356", "0.57886875", "0.5771653", "0.57483286", "0.57415104", "0.5739937", "0.5737405", "0.5734033", "0.5716611", "0.5702987", "0.5702633", "0.568752", "0.5673585", "0.5656889", "0.5654594", "0.56383264", "0.56383264", "0.5633443", "0.5619376", "0.56107736", "0.55950445", "0.55687404", "0.5560633", "0.5544451", "0.553233", "0.55284953", "0.5526995", "0.5523609", "0.5522537", "0.5520261", "0.5508765", "0.54931", "0.5475987", "0.5471256", "0.5469798", "0.54696023", "0.5466119", "0.5450189", "0.5445573", "0.54424983", "0.54304206", "0.5423924", "0.54234356", "0.5420949", "0.54093313", "0.53971386", "0.53892636", "0.53887594", "0.5388692", "0.53799766", "0.5377014", "0.5375743", "0.53676707", "0.53666615", "0.53654546", "0.536411", "0.536411", "0.5361922", "0.53584075", "0.5357915", "0.53526837", "0.53503513", "0.534265", "0.5342214", "0.53399533", "0.533597", "0.5332819", "0.5331027", "0.5329743", "0.5329616", "0.5325393", "0.53252953", "0.5323291", "0.53207254", "0.5314264", "0.53122807", "0.53109974", "0.5310432", "0.53044266", "0.5304416", "0.5302328" ]
0.0
-1
/ renamed from: a
public final R mo2484a(long r4, java.util.concurrent.TimeUnit r6) { /* JADX: method processing error */ /* Error: java.lang.NullPointerException at jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75) at jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45) at jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63) at jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:56) at jadx.core.ProcessClass.process(ProcessClass.java:39) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282) at jadx.api.JavaClass.decompile(JavaClass.java:62) at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200) at jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source) */ /* r3 = this; r0 = 0; r2 = (r4 > r0 ? 1 : (r4 == r0 ? 0 : -1)); if (r2 <= 0) goto L_0x000b; L_0x0006: r0 = "await must not be called on the UI thread when time is greater than zero."; com.google.android.gms.common.internal.ad.m9057c(r0); L_0x000b: r0 = r3.f11872k; r1 = 1; r0 = r0 ^ r1; r2 = "Result has already been consumed."; com.google.android.gms.common.internal.ad.m9051a(r0, r2); r0 = r3.f11876o; if (r0 != 0) goto L_0x0019; L_0x0018: goto L_0x001a; L_0x0019: r1 = 0; L_0x001a: r0 = "Cannot await if then() has been called."; com.google.android.gms.common.internal.ad.m9051a(r1, r0); r0 = r3.f11866e; Catch:{ InterruptedException -> 0x002d } r4 = r0.await(r4, r6); Catch:{ InterruptedException -> 0x002d } if (r4 != 0) goto L_0x0032; Catch:{ InterruptedException -> 0x002d } L_0x0027: r4 = com.google.android.gms.common.api.Status.zzfnl; Catch:{ InterruptedException -> 0x002d } r3.m14226b(r4); Catch:{ InterruptedException -> 0x002d } goto L_0x0032; L_0x002d: r4 = com.google.android.gms.common.api.Status.zzfnj; r3.m14226b(r4); L_0x0032: r4 = r3.m14229d(); r5 = "Result is not ready."; com.google.android.gms.common.internal.ad.m9051a(r4, r5); r4 = r3.mo3575g(); return r4; */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.common.api.internal.BasePendingResult.a(long, java.util.concurrent.TimeUnit):R"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
public void mo2485a() { /* JADX: method processing error */ /* Error: java.lang.NullPointerException at jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75) at jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45) at jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63) at jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:56) at jadx.core.ProcessClass.process(ProcessClass.java:39) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282) at jadx.api.JavaClass.decompile(JavaClass.java:62) at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200) at jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source) */ /* r2 = this; r0 = r2.f11863a; monitor-enter(r0); r1 = r2.f11873l; Catch:{ all -> 0x002a } if (r1 != 0) goto L_0x0028; Catch:{ all -> 0x002a } L_0x0007: r1 = r2.f11872k; Catch:{ all -> 0x002a } if (r1 == 0) goto L_0x000c; Catch:{ all -> 0x002a } L_0x000b: goto L_0x0028; Catch:{ all -> 0x002a } L_0x000c: r1 = r2.f11875n; Catch:{ all -> 0x002a } if (r1 == 0) goto L_0x0015; L_0x0010: r1 = r2.f11875n; Catch:{ RemoteException -> 0x0015 } r1.cancel(); Catch:{ RemoteException -> 0x0015 } L_0x0015: r1 = r2.f11870i; Catch:{ all -> 0x002a } m14216b(r1); Catch:{ all -> 0x002a } r1 = 1; Catch:{ all -> 0x002a } r2.f11873l = r1; Catch:{ all -> 0x002a } r1 = com.google.android.gms.common.api.Status.zzfnm; Catch:{ all -> 0x002a } r1 = r2.mo3568a(r1); Catch:{ all -> 0x002a } r2.m14217c(r1); Catch:{ all -> 0x002a } monitor-exit(r0); Catch:{ all -> 0x002a } return; Catch:{ all -> 0x002a } L_0x0028: monitor-exit(r0); Catch:{ all -> 0x002a } return; Catch:{ all -> 0x002a } L_0x002a: r1 = move-exception; Catch:{ all -> 0x002a } monitor-exit(r0); Catch:{ all -> 0x002a } throw r1; */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.common.api.internal.BasePendingResult.a():void"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
public final void mo2486a(zza zza) { ad.m9055b(zza != null, "Callback cannot be null."); synchronized (this.f11863a) { if (m14229d()) { zza.zzr(this.f11871j); } else { this.f11867f.add(zza); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
public final void m14223a(R r) { synchronized (this.f11863a) { if (this.f11874m || this.f11873l) { m14216b((Result) r); return; } m14229d(); ad.m9051a(m14229d() ^ 1, (Object) "Results have already been set"); ad.m9051a(this.f11872k ^ 1, (Object) "Result has already been consumed"); m14217c(r); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ JADX WARNING: inconsistent code. / Code decompiled incorrectly, please refer to instructions dump. / renamed from: a
public final void mo2487a(com.google.android.gms.common.api.ResultCallback<? super R> r5) { /* r4 = this; r0 = r4.f11863a; monitor-enter(r0); if (r5 != 0) goto L_0x000c; L_0x0005: r5 = 0; r4.f11868g = r5; Catch:{ all -> 0x000a } monitor-exit(r0); Catch:{ all -> 0x000a } return; L_0x000a: r5 = move-exception; goto L_0x003c; L_0x000c: r1 = r4.f11872k; Catch:{ all -> 0x000a } r2 = 1; r1 = r1 ^ r2; r3 = "Result has already been consumed."; com.google.android.gms.common.internal.ad.m9051a(r1, r3); Catch:{ all -> 0x000a } r1 = r4.f11876o; Catch:{ all -> 0x000a } if (r1 != 0) goto L_0x001a; L_0x0019: goto L_0x001b; L_0x001a: r2 = 0; L_0x001b: r1 = "Cannot set callbacks if then() has been called."; com.google.android.gms.common.internal.ad.m9051a(r2, r1); Catch:{ all -> 0x000a } r1 = r4.mo2488b(); Catch:{ all -> 0x000a } if (r1 == 0) goto L_0x0028; L_0x0026: monitor-exit(r0); Catch:{ all -> 0x000a } return; L_0x0028: r1 = r4.m14229d(); Catch:{ all -> 0x000a } if (r1 == 0) goto L_0x0038; L_0x002e: r1 = r4.f11864b; Catch:{ all -> 0x000a } r2 = r4.mo3575g(); Catch:{ all -> 0x000a } r1.m8915a(r5, r2); Catch:{ all -> 0x000a } goto L_0x003a; L_0x0038: r4.f11868g = r5; Catch:{ all -> 0x000a } L_0x003a: monitor-exit(r0); Catch:{ all -> 0x000a } return; L_0x003c: monitor-exit(r0); Catch:{ all -> 0x000a } throw r5; */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.common.api.internal.BasePendingResult.a(com.google.android.gms.common.api.ResultCallback):void"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }", "private void method_7083() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2145() {\r\n // $FF: Couldn't be decompiled\r\n }", "void m1864a() {\r\n }", "private void m14210a(java.io.IOException r4, java.io.IOException r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r3 = this;\n r0 = f12370a;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = f12370a;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = 1;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = new java.lang.Object[r1];\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r2 = 0;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1[r2] = r5;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r0.invoke(r4, r1);\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.connection.RouteException.a(java.io.IOException, java.io.IOException):void\");\n }", "protected void method_2247() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2141() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_1148() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_7081() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_6338() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2113() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2139() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_2226() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void m13383b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x000a }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x000a }\n r2 = 0;\t Catch:{ Exception -> 0x000a }\n r0.delete(r1, r2, r2);\t Catch:{ Exception -> 0x000a }\n L_0x000a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.b():void\");\n }", "private void m50366E() {\n }", "public void method_2046() {\r\n // $FF: Couldn't be decompiled\r\n }", "private void m25427g() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19111m;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = r2.f19104f;\t Catch:{ Exception -> 0x000f }\n r0 = android.support.v4.content.C0396d.m1465a(r0);\t Catch:{ Exception -> 0x000f }\n r1 = r2.f19111m;\t Catch:{ Exception -> 0x000f }\n r0.m1468a(r1);\t Catch:{ Exception -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.w.g():void\");\n }", "public void method_2197() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void mo2485a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = r2.f11863a;\n monitor-enter(r0);\n r1 = r2.f11873l;\t Catch:{ all -> 0x002a }\n if (r1 != 0) goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x0007:\n r1 = r2.f11872k;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x000c;\t Catch:{ all -> 0x002a }\n L_0x000b:\n goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x000c:\n r1 = r2.f11875n;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x0015;\n L_0x0010:\n r1 = r2.f11875n;\t Catch:{ RemoteException -> 0x0015 }\n r1.cancel();\t Catch:{ RemoteException -> 0x0015 }\n L_0x0015:\n r1 = r2.f11870i;\t Catch:{ all -> 0x002a }\n m14216b(r1);\t Catch:{ all -> 0x002a }\n r1 = 1;\t Catch:{ all -> 0x002a }\n r2.f11873l = r1;\t Catch:{ all -> 0x002a }\n r1 = com.google.android.gms.common.api.Status.zzfnm;\t Catch:{ all -> 0x002a }\n r1 = r2.mo3568a(r1);\t Catch:{ all -> 0x002a }\n r2.m14217c(r1);\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x0028:\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x002a:\n r1 = move-exception;\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.common.api.internal.BasePendingResult.a():void\");\n }", "public long mo915b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = -1;\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n if (r2 == 0) goto L_0x000d;\t Catch:{ NumberFormatException -> 0x000e }\n L_0x0006:\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n r2 = java.lang.Long.parseLong(r2);\t Catch:{ NumberFormatException -> 0x000e }\n r0 = r2;\n L_0x000d:\n return r0;\n L_0x000e:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.b.b():long\");\n }", "public final void mo91715d() {\n }", "public void method_2250() {\r\n // $FF: Couldn't be decompiled\r\n }", "private final void asx() {\n /*\n r12 = this;\n r0 = r12.cFE;\n if (r0 == 0) goto L_0x0073;\n L_0x0004:\n r1 = r12.cxs;\n if (r1 == 0) goto L_0x0073;\n L_0x0008:\n r1 = r12.ayL;\n if (r1 != 0) goto L_0x000d;\n L_0x000c:\n goto L_0x0073;\n L_0x000d:\n r2 = 0;\n if (r1 == 0) goto L_0x0027;\n L_0x0010:\n r1 = r1.Km();\n if (r1 == 0) goto L_0x0027;\n L_0x0016:\n r1 = r1.aar();\n if (r1 == 0) goto L_0x0027;\n L_0x001c:\n r3 = r0.getName();\n r1 = r1.get(r3);\n r1 = (java.util.ArrayList) r1;\n goto L_0x0028;\n L_0x0027:\n r1 = r2;\n L_0x0028:\n if (r1 == 0) goto L_0x0051;\n L_0x002a:\n r1 = (java.lang.Iterable) r1;\n r1 = kotlin.collections.u.Z(r1);\n if (r1 == 0) goto L_0x0051;\n L_0x0032:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$1;\n r3.<init>(r12);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.b(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x003f:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$2;\n r3.<init>(r0);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.f(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x004c:\n r1 = kotlin.sequences.n.f(r1);\n goto L_0x0052;\n L_0x0051:\n r1 = r2;\n L_0x0052:\n r3 = r12.asr();\n if (r1 == 0) goto L_0x0059;\n L_0x0058:\n goto L_0x005d;\n L_0x0059:\n r1 = kotlin.collections.m.emptyList();\n L_0x005d:\n r4 = r12.bub;\n if (r4 == 0) goto L_0x006d;\n L_0x0061:\n r5 = 0;\n r6 = 0;\n r7 = 1;\n r8 = 0;\n r9 = 0;\n r10 = 19;\n r11 = 0;\n r2 = com.iqoption.core.util.e.a(r4, r5, r6, r7, r8, r9, r10, r11);\n L_0x006d:\n r3.c(r1, r2);\n r12.d(r0);\n L_0x0073:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.asx():void\");\n }", "static void method_7086() {\r\n // $FF: Couldn't be decompiled\r\n }", "private void method_7082(class_1293 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_4270() {}", "static void method_28() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void mo3613a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f18081b;\n monitor-enter(r0);\n r1 = r4.f18080a;\t Catch:{ all -> 0x001f }\n if (r1 == 0) goto L_0x0009;\t Catch:{ all -> 0x001f }\n L_0x0007:\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n return;\t Catch:{ all -> 0x001f }\n L_0x0009:\n r1 = 1;\t Catch:{ all -> 0x001f }\n r4.f18080a = r1;\t Catch:{ all -> 0x001f }\n r2 = r4.f18081b;\t Catch:{ all -> 0x001f }\n r3 = r2.f12200d;\t Catch:{ all -> 0x001f }\n r3 = r3 + r1;\t Catch:{ all -> 0x001f }\n r2.f12200d = r3;\t Catch:{ all -> 0x001f }\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n r0 = r4.f18083d;\n okhttp3.internal.C2933c.m14194a(r0);\n r0 = r4.f18082c;\t Catch:{ IOException -> 0x001e }\n r0.m14100c();\t Catch:{ IOException -> 0x001e }\n L_0x001e:\n return;\n L_0x001f:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a.a():void\");\n }", "void m5768b() throws C0841b;", "private boolean m2248a(java.lang.String r3, com.onesignal.La.C0596a r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/318857719.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = 0;\n r1 = 1;\n java.lang.Float.parseFloat(r3);\t Catch:{ Throwable -> 0x0007 }\n r3 = 1;\n goto L_0x0008;\n L_0x0007:\n r3 = 0;\n L_0x0008:\n if (r3 != 0) goto L_0x0017;\n L_0x000a:\n r3 = com.onesignal.sa.C0650i.ERROR;\n r1 = \"Missing Google Project number!\\nPlease enter a Google Project number / Sender ID on under App Settings > Android > Configuration on the OneSignal dashboard.\";\n com.onesignal.sa.m1656a(r3, r1);\n r3 = 0;\n r1 = -6;\n r4.mo1392a(r3, r1);\n return r0;\n L_0x0017:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.onesignal.Pa.a(java.lang.String, com.onesignal.La$a):boolean\");\n }", "private boolean method_2253(class_1033 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "void m5770d() throws C0841b;", "public void m23075a() {\n }", "void m5771e() throws C0841b;", "void m5769c() throws C0841b;", "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "public void mo23813b() {\n }", "private void a(java.lang.String r11, java.lang.String r12, boolean r13, boolean r14, com.google.ae r15) {\n /*\n r10 = this;\n r9 = 48;\n r8 = 2;\n r6 = F;\n if (r11 != 0) goto L_0x0017;\n L_0x0007:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x0015 }\n r1 = com.google.dk.NOT_A_NUMBER;\t Catch:{ ao -> 0x0015 }\n r2 = J;\t Catch:{ ao -> 0x0015 }\n r3 = 47;\n r2 = r2[r3];\t Catch:{ ao -> 0x0015 }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x0015 }\n throw r0;\t Catch:{ ao -> 0x0015 }\n L_0x0015:\n r0 = move-exception;\n throw r0;\n L_0x0017:\n r0 = r11.length();\t Catch:{ ao -> 0x002d }\n r1 = 250; // 0xfa float:3.5E-43 double:1.235E-321;\n if (r0 <= r1) goto L_0x002f;\n L_0x001f:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x002d }\n r1 = com.google.dk.TOO_LONG;\t Catch:{ ao -> 0x002d }\n r2 = J;\t Catch:{ ao -> 0x002d }\n r3 = 41;\n r2 = r2[r3];\t Catch:{ ao -> 0x002d }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x002d }\n throw r0;\t Catch:{ ao -> 0x002d }\n L_0x002d:\n r0 = move-exception;\n throw r0;\n L_0x002f:\n r7 = new java.lang.StringBuilder;\n r7.<init>();\n r10.a(r11, r7);\t Catch:{ ao -> 0x004f }\n r0 = r7.toString();\t Catch:{ ao -> 0x004f }\n r0 = b(r0);\t Catch:{ ao -> 0x004f }\n if (r0 != 0) goto L_0x0051;\n L_0x0041:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x004f }\n r1 = com.google.dk.NOT_A_NUMBER;\t Catch:{ ao -> 0x004f }\n r2 = J;\t Catch:{ ao -> 0x004f }\n r3 = 48;\n r2 = r2[r3];\t Catch:{ ao -> 0x004f }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x004f }\n throw r0;\t Catch:{ ao -> 0x004f }\n L_0x004f:\n r0 = move-exception;\n throw r0;\n L_0x0051:\n if (r14 == 0) goto L_0x006f;\n L_0x0053:\n r0 = r7.toString();\t Catch:{ ao -> 0x006d }\n r0 = r10.a(r0, r12);\t Catch:{ ao -> 0x006d }\n if (r0 != 0) goto L_0x006f;\n L_0x005d:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x006b }\n r1 = com.google.dk.INVALID_COUNTRY_CODE;\t Catch:{ ao -> 0x006b }\n r2 = J;\t Catch:{ ao -> 0x006b }\n r3 = 46;\n r2 = r2[r3];\t Catch:{ ao -> 0x006b }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x006b }\n throw r0;\t Catch:{ ao -> 0x006b }\n L_0x006b:\n r0 = move-exception;\n throw r0;\n L_0x006d:\n r0 = move-exception;\n throw r0;\t Catch:{ ao -> 0x006b }\n L_0x006f:\n if (r13 == 0) goto L_0x0074;\n L_0x0071:\n r15.b(r11);\t Catch:{ ao -> 0x00d3 }\n L_0x0074:\n r0 = r10.b(r7);\n r1 = r0.length();\t Catch:{ ao -> 0x00d5 }\n if (r1 <= 0) goto L_0x0081;\n L_0x007e:\n r15.a(r0);\t Catch:{ ao -> 0x00d5 }\n L_0x0081:\n r2 = r10.e(r12);\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r1 = r7.toString();\t Catch:{ ao -> 0x00d7 }\n r0 = r10;\n r4 = r13;\n r5 = r15;\n r0 = r0.a(r1, r2, r3, r4, r5);\t Catch:{ ao -> 0x00d7 }\n L_0x0095:\n if (r0 == 0) goto L_0x0182;\n L_0x0097:\n r1 = r10.b(r0);\n r4 = r1.equals(r12);\n if (r4 != 0) goto L_0x017f;\n L_0x00a1:\n r0 = r10.a(r0, r1);\n L_0x00a5:\n if (r6 == 0) goto L_0x00bd;\n L_0x00a7:\n a(r7);\t Catch:{ ao -> 0x0121 }\n r3.append(r7);\t Catch:{ ao -> 0x0121 }\n if (r12 == 0) goto L_0x00b8;\n L_0x00af:\n r1 = r0.L();\n r15.a(r1);\t Catch:{ ao -> 0x0123 }\n if (r6 == 0) goto L_0x00bd;\n L_0x00b8:\n if (r13 == 0) goto L_0x00bd;\n L_0x00ba:\n r15.l();\t Catch:{ ao -> 0x0125 }\n L_0x00bd:\n r1 = r3.length();\t Catch:{ ao -> 0x00d1 }\n if (r1 >= r8) goto L_0x0127;\n L_0x00c3:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x00d1 }\n r1 = com.google.dk.TOO_SHORT_NSN;\t Catch:{ ao -> 0x00d1 }\n r2 = J;\t Catch:{ ao -> 0x00d1 }\n r3 = 44;\n r2 = r2[r3];\t Catch:{ ao -> 0x00d1 }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x00d1 }\n throw r0;\t Catch:{ ao -> 0x00d1 }\n L_0x00d1:\n r0 = move-exception;\n throw r0;\n L_0x00d3:\n r0 = move-exception;\n throw r0;\n L_0x00d5:\n r0 = move-exception;\n throw r0;\n L_0x00d7:\n r0 = move-exception;\n r1 = g;\n r4 = r7.toString();\n r1 = r1.matcher(r4);\n r4 = r0.a();\t Catch:{ ao -> 0x0111 }\n r5 = com.google.dk.INVALID_COUNTRY_CODE;\t Catch:{ ao -> 0x0111 }\n if (r4 != r5) goto L_0x0113;\n L_0x00ea:\n r4 = r1.lookingAt();\t Catch:{ ao -> 0x0111 }\n if (r4 == 0) goto L_0x0113;\n L_0x00f0:\n r0 = r1.end();\n r1 = r7.substring(r0);\n r0 = r10;\n r4 = r13;\n r5 = r15;\n r0 = r0.a(r1, r2, r3, r4, r5);\n if (r0 != 0) goto L_0x0095;\n L_0x0101:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x010f }\n r1 = com.google.dk.INVALID_COUNTRY_CODE;\t Catch:{ ao -> 0x010f }\n r2 = J;\t Catch:{ ao -> 0x010f }\n r3 = 43;\n r2 = r2[r3];\t Catch:{ ao -> 0x010f }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x010f }\n throw r0;\t Catch:{ ao -> 0x010f }\n L_0x010f:\n r0 = move-exception;\n throw r0;\n L_0x0111:\n r0 = move-exception;\n throw r0;\n L_0x0113:\n r1 = new com.google.ao;\n r2 = r0.a();\n r0 = r0.getMessage();\n r1.<init>(r2, r0);\n throw r1;\n L_0x0121:\n r0 = move-exception;\n throw r0;\n L_0x0123:\n r0 = move-exception;\n throw r0;\t Catch:{ ao -> 0x0125 }\n L_0x0125:\n r0 = move-exception;\n throw r0;\n L_0x0127:\n if (r0 == 0) goto L_0x013a;\n L_0x0129:\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r10.a(r3, r0, r1);\t Catch:{ ao -> 0x0150 }\n if (r13 == 0) goto L_0x013a;\n L_0x0133:\n r0 = r1.toString();\t Catch:{ ao -> 0x0150 }\n r15.c(r0);\t Catch:{ ao -> 0x0150 }\n L_0x013a:\n r0 = r3.length();\n if (r0 >= r8) goto L_0x0152;\n L_0x0140:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x014e }\n r1 = com.google.dk.TOO_SHORT_NSN;\t Catch:{ ao -> 0x014e }\n r2 = J;\t Catch:{ ao -> 0x014e }\n r3 = 42;\n r2 = r2[r3];\t Catch:{ ao -> 0x014e }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x014e }\n throw r0;\t Catch:{ ao -> 0x014e }\n L_0x014e:\n r0 = move-exception;\n throw r0;\n L_0x0150:\n r0 = move-exception;\n throw r0;\n L_0x0152:\n r1 = 16;\n if (r0 <= r1) goto L_0x0166;\n L_0x0156:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x0164 }\n r1 = com.google.dk.TOO_LONG;\t Catch:{ ao -> 0x0164 }\n r2 = J;\t Catch:{ ao -> 0x0164 }\n r3 = 45;\n r2 = r2[r3];\t Catch:{ ao -> 0x0164 }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x0164 }\n throw r0;\t Catch:{ ao -> 0x0164 }\n L_0x0164:\n r0 = move-exception;\n throw r0;\n L_0x0166:\n r0 = 0;\n r0 = r3.charAt(r0);\t Catch:{ ao -> 0x017d }\n if (r0 != r9) goto L_0x0171;\n L_0x016d:\n r0 = 1;\n r15.a(r0);\t Catch:{ ao -> 0x017d }\n L_0x0171:\n r0 = r3.toString();\n r0 = java.lang.Long.parseLong(r0);\n r15.a(r0);\n return;\n L_0x017d:\n r0 = move-exception;\n throw r0;\n L_0x017f:\n r0 = r2;\n goto L_0x00a5;\n L_0x0182:\n r0 = r2;\n goto L_0x00a7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, java.lang.String, boolean, boolean, com.google.ae):void\");\n }", "public boolean mo3969a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f19005h;\n if (r0 != 0) goto L_0x0011;\n L_0x0004:\n r0 = r4.f19004g;\n if (r0 == 0) goto L_0x000f;\n L_0x0008:\n r0 = r4.f19004g;\n r1 = com.facebook.ads.C1700b.f5123e;\n r0.mo1313a(r4, r1);\n L_0x000f:\n r0 = 0;\n return r0;\n L_0x0011:\n r0 = new android.content.Intent;\n r1 = r4.f19002e;\n r2 = com.facebook.ads.AudienceNetworkActivity.class;\n r0.<init>(r1, r2);\n r1 = \"predefinedOrientationKey\";\n r2 = r4.m25306b();\n r0.putExtra(r1, r2);\n r1 = \"uniqueId\";\n r2 = r4.f18999b;\n r0.putExtra(r1, r2);\n r1 = \"placementId\";\n r2 = r4.f19000c;\n r0.putExtra(r1, r2);\n r1 = \"requestTime\";\n r2 = r4.f19001d;\n r0.putExtra(r1, r2);\n r1 = \"viewType\";\n r2 = r4.f19009l;\n r0.putExtra(r1, r2);\n r1 = \"useCache\";\n r2 = r4.f19010m;\n r0.putExtra(r1, r2);\n r1 = r4.f19008k;\n if (r1 == 0) goto L_0x0052;\n L_0x004a:\n r1 = \"ad_data_bundle\";\n r2 = r4.f19008k;\n r0.putExtra(r1, r2);\n goto L_0x005b;\n L_0x0052:\n r1 = r4.f19006i;\n if (r1 == 0) goto L_0x005b;\n L_0x0056:\n r1 = r4.f19006i;\n r1.m18953a(r0);\n L_0x005b:\n r1 = 268435456; // 0x10000000 float:2.5243549E-29 double:1.32624737E-315;\n r0.addFlags(r1);\n r1 = r4.f19002e;\t Catch:{ ActivityNotFoundException -> 0x0066 }\n r1.startActivity(r0);\t Catch:{ ActivityNotFoundException -> 0x0066 }\n goto L_0x0072;\n L_0x0066:\n r1 = r4.f19002e;\n r2 = com.facebook.ads.InterstitialAdActivity.class;\n r0.setClass(r1, r2);\n r1 = r4.f19002e;\n r1.startActivity(r0);\n L_0x0072:\n r0 = 1;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.k.a():boolean\");\n }", "public void mo38117a() {\n }", "private p000a.p001a.p002a.p003a.C0916s m1655b(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m321a();\n r7 = r7.m322b();\n r1 = 0;\n r2 = r1;\n L_0x000a:\n r3 = r6.f1533u;\n r3 = r3 + 1;\n r6.f1533u = r3;\n r0.m2803e();\n r3 = r0.mo2010a();\n if (r3 != 0) goto L_0x0032;\n L_0x0019:\n r7 = r6.f1513a;\n r8 = \"Cannot retry non-repeatable request\";\n r7.m260a(r8);\n if (r2 == 0) goto L_0x002a;\n L_0x0022:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity. The cause lists the reason the original request failed.\";\n r7.<init>(r8, r2);\n throw r7;\n L_0x002a:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity.\";\n r7.<init>(r8);\n throw r7;\n L_0x0032:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x003a:\n r2 = r7.mo15e();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x004f;\t Catch:{ IOException -> 0x0086 }\n L_0x0040:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Reopening the direct connection.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x0086 }\n r2.mo2023a(r7, r8, r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x004f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Proxied connection. Need to start over.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0085;\t Catch:{ IOException -> 0x0086 }\n L_0x0057:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m262a();\t Catch:{ IOException -> 0x0086 }\n if (r2 == 0) goto L_0x007c;\t Catch:{ IOException -> 0x0086 }\n L_0x005f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = new java.lang.StringBuilder;\t Catch:{ IOException -> 0x0086 }\n r3.<init>();\t Catch:{ IOException -> 0x0086 }\n r4 = \"Attempt \";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = r6.f1533u;\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = \" to execute request\";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r3 = r3.toString();\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n L_0x007c:\n r2 = r6.f1518f;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m464a(r0, r3, r8);\t Catch:{ IOException -> 0x0086 }\n r1 = r2;\n L_0x0085:\n return r1;\n L_0x0086:\n r2 = move-exception;\n r3 = r6.f1513a;\n r4 = \"Closing the connection.\";\n r3.m260a(r4);\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0093 }\n r3.close();\t Catch:{ IOException -> 0x0093 }\n L_0x0093:\n r3 = r6.f1520h;\n r4 = r0.m2802d();\n r3 = r3.retryRequest(r2, r4, r8);\n if (r3 == 0) goto L_0x010a;\n L_0x009f:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x00d9;\n L_0x00a7:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when processing request to \";\n r4.append(r5);\n r4.append(r7);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n L_0x00d9:\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x00ea;\n L_0x00e1:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x00ea:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x000a;\n L_0x00f2:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"Retrying request to \";\n r4.append(r5);\n r4.append(r7);\n r4 = r4.toString();\n r3.m269d(r4);\n goto L_0x000a;\n L_0x010a:\n r8 = r2 instanceof p000a.p001a.p002a.p003a.C0176z;\n if (r8 == 0) goto L_0x0134;\n L_0x010e:\n r8 = new a.a.a.a.z;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r7 = r7.mo10a();\n r7 = r7.m474e();\n r0.append(r7);\n r7 = \" failed to respond\";\n r0.append(r7);\n r7 = r0.toString();\n r8.<init>(r7);\n r7 = r2.getStackTrace();\n r8.setStackTrace(r7);\n throw r8;\n L_0x0134:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.b(a.a.a.a.i.b.x, a.a.a.a.n.e):a.a.a.a.s\");\n }", "protected void a(bug parambug)\r\n/* 35: */ {\r\n/* 36:36 */ this.j.a((bxf)null);\r\n/* 37: */ }", "@Override // X.AnonymousClass0PN\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public void A0D() {\n /*\n r5 = this;\n super.A0D()\n X.08d r0 = r5.A05\n X.0OQ r4 = r0.A04()\n X.0Rk r3 = r4.A00() // Catch:{ all -> 0x003d }\n X.0BK r2 = r4.A04 // Catch:{ all -> 0x0036 }\n java.lang.String r1 = \"DELETE FROM receipt_device\"\n java.lang.String r0 = \"CLEAR_TABLE_RECEIPT_DEVICE\"\n r2.A0C(r1, r0) // Catch:{ all -> 0x0036 }\n X.08m r1 = r5.A03 // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"receipt_device_migration_complete\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_index\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_retry\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n r3.A00() // Catch:{ all -> 0x0036 }\n r3.close()\n r4.close()\n java.lang.String r0 = \"ReceiptDeviceStore/ReceiptDeviceDatabaseMigration/resetMigration/done\"\n com.whatsapp.util.Log.i(r0)\n return\n L_0x0036:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x0038 }\n L_0x0038:\n r0 = move-exception\n r3.close() // Catch:{ all -> 0x003c }\n L_0x003c:\n throw r0\n L_0x003d:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x003f }\n L_0x003f:\n r0 = move-exception\n r4.close() // Catch:{ all -> 0x0043 }\n L_0x0043:\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: X.C43661yk.A0D():void\");\n }", "void mo80452a();", "public static boolean m19464a(java.lang.String r3, int[] r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = android.text.TextUtils.isEmpty(r3);\n r1 = 0;\n if (r0 == 0) goto L_0x0008;\n L_0x0007:\n return r1;\n L_0x0008:\n r0 = r4.length;\n r2 = 2;\n if (r0 == r2) goto L_0x000d;\n L_0x000c:\n return r1;\n L_0x000d:\n r0 = \"x\";\n r3 = r3.split(r0);\n r0 = r3.length;\n if (r0 == r2) goto L_0x0017;\n L_0x0016:\n return r1;\n L_0x0017:\n r0 = r3[r1];\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = java.lang.Integer.parseInt(r0);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r1] = r0;\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = 1;\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = r3[r0];\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = java.lang.Integer.parseInt(r3);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r0] = r3;\t Catch:{ NumberFormatException -> 0x0029 }\n return r0;\n L_0x0029:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.arp.a(java.lang.String, int[]):boolean\");\n }", "public static void m5812a(java.lang.String r0, java.lang.String r1, java.lang.String r2) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r2 = new com.crashlytics.android.answers.AddToCartEvent;\n r2.<init>();\n r2.putItemType(r0);\n r0 = java.lang.Long.parseLong(r1);\t Catch:{ Exception -> 0x0013 }\n r0 = java.math.BigDecimal.valueOf(r0);\t Catch:{ Exception -> 0x0013 }\n r2.putItemPrice(r0);\t Catch:{ Exception -> 0x0013 }\n L_0x0013:\n r0 = java.util.Locale.getDefault();\n r0 = java.util.Currency.getInstance(r0);\n r2.putCurrency(r0);\n r0 = com.crashlytics.android.answers.Answers.getInstance();\n r0.logAddToCart(r2);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String):void\");\n }", "protected void method_2045(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2112(int param1, int param2, int param3, aji param4, int param5, int param6) {\r\n // $FF: Couldn't be decompiled\r\n }", "private static void m13385d() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = java.lang.System.currentTimeMillis();\t Catch:{ Exception -> 0x0024 }\n r2 = java.util.concurrent.TimeUnit.DAYS;\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r2 = r2.toMillis(r3);\t Catch:{ Exception -> 0x0024 }\n r4 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = r0 - r2;\t Catch:{ Exception -> 0x0024 }\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x0024 }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x0024 }\n r2 = \"timestamp < ?\";\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r3 = new java.lang.String[r3];\t Catch:{ Exception -> 0x0024 }\n r6 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = java.lang.String.valueOf(r4);\t Catch:{ Exception -> 0x0024 }\n r3[r6] = r4;\t Catch:{ Exception -> 0x0024 }\n r0.delete(r1, r2, r3);\t Catch:{ Exception -> 0x0024 }\n L_0x0024:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.d():void\");\n }", "protected void method_2246(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public abstract void mo53562a(C18796a c18796a);", "public void mo2740a() {\n }", "public void mo115190b() {\n }", "@androidx.annotation.Nullable\n /* renamed from: j */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final p005b.p096l.p097a.p151d.p152a.p154b.C3474b mo14822j(java.lang.String r9) {\n /*\n r8 = this;\n java.io.File r0 = new java.io.File\n java.io.File r1 = r8.mo14820g()\n r0.<init>(r1, r9)\n boolean r1 = r0.exists()\n r2 = 3\n r3 = 6\n r4 = 1\n r5 = 0\n r6 = 0\n if (r1 != 0) goto L_0x0022\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s\"\n r0.mo14884b(r2, r9, r1)\n L_0x001f:\n r9 = r6\n goto L_0x0093\n L_0x0022:\n java.io.File r1 = new java.io.File\n b.l.a.d.a.b.o1 r7 = r8.f6567b\n int r7 = r7.mo14797a()\n java.lang.String r7 = java.lang.String.valueOf(r7)\n r1.<init>(r0, r7)\n boolean r0 = r1.exists()\n r7 = 2\n if (r0 != 0) goto L_0x0050\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0050:\n java.io.File[] r0 = r1.listFiles()\n if (r0 == 0) goto L_0x007b\n int r1 = r0.length\n if (r1 != 0) goto L_0x005a\n goto L_0x007b\n L_0x005a:\n if (r1 <= r4) goto L_0x0074\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Multiple pack versions found for pack name: %s app version: %s\"\n r0.mo14884b(r3, r9, r1)\n goto L_0x001f\n L_0x0074:\n r9 = r0[r5]\n java.lang.String r9 = r9.getCanonicalPath()\n goto L_0x0093\n L_0x007b:\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"No pack version found for pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0093:\n if (r9 != 0) goto L_0x0096\n return r6\n L_0x0096:\n java.io.File r0 = new java.io.File\n java.lang.String r1 = \"assets\"\n r0.<init>(r9, r1)\n boolean r1 = r0.isDirectory()\n if (r1 != 0) goto L_0x00af\n b.l.a.d.a.e.f r9 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r0\n java.lang.String r0 = \"Failed to find assets directory: %s\"\n r9.mo14884b(r3, r0, r1)\n return r6\n L_0x00af:\n java.lang.String r0 = r0.getCanonicalPath()\n b.l.a.d.a.b.w r1 = new b.l.a.d.a.b.w\n r1.<init>(r5, r9, r0)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p005b.p096l.p097a.p151d.p152a.p154b.C3544t.mo14822j(java.lang.String):b.l.a.d.a.b.b\");\n }", "void mo72113b();", "boolean m25333a(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = this;\n java.lang.Class.forName(r1);\t Catch:{ ClassNotFoundException -> 0x0005 }\n r1 = 1;\n return r1;\n L_0x0005:\n r1 = 0;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mapbox.android.core.location.c.a(java.lang.String):boolean\");\n }", "public void mo12930a() {\n }", "public void mo21779D() {\n }", "public int method_7084(String param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "private final java.util.Map<java.lang.String, java.lang.String> m11967c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r7 = this;\n r0 = new java.util.HashMap;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r0.<init>();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r7.f10169c;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r2 = r7.f10170d;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r3 = f10168i;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r4 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r5 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r6 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r1.query(r2, r3, r4, r5, r6);\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n if (r1 == 0) goto L_0x0031;\n L_0x0014:\n r2 = r1.moveToNext();\t Catch:{ all -> 0x002c }\n if (r2 == 0) goto L_0x0028;\t Catch:{ all -> 0x002c }\n L_0x001a:\n r2 = 0;\t Catch:{ all -> 0x002c }\n r2 = r1.getString(r2);\t Catch:{ all -> 0x002c }\n r3 = 1;\t Catch:{ all -> 0x002c }\n r3 = r1.getString(r3);\t Catch:{ all -> 0x002c }\n r0.put(r2, r3);\t Catch:{ all -> 0x002c }\n goto L_0x0014;\n L_0x0028:\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n goto L_0x0031;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x002c:\n r0 = move-exception;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n throw r0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x0031:\n return r0;\n L_0x0032:\n r0 = \"ConfigurationContentLoader\";\n r1 = \"PhenotypeFlag unable to load ContentProvider, using default values\";\n android.util.Log.e(r0, r1);\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzsi.c():java.util.Map<java.lang.String, java.lang.String>\");\n }", "public void m9741j() throws cf {\r\n }", "private static void m13381a(long r3, float r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\n r0.beginTransaction();\t Catch:{ Exception -> 0x001f }\n r1 = \"INSERT INTO battery_watcher (timestamp, level) VALUES (?, ?)\";\t Catch:{ Exception -> 0x001f }\n r1 = r0.compileStatement(r1);\t Catch:{ Exception -> 0x001f }\n r2 = 1;\t Catch:{ Exception -> 0x001f }\n r1.bindLong(r2, r3);\t Catch:{ Exception -> 0x001f }\n r3 = 2;\t Catch:{ Exception -> 0x001f }\n r4 = (double) r5;\t Catch:{ Exception -> 0x001f }\n r1.bindDouble(r3, r4);\t Catch:{ Exception -> 0x001f }\n r1.execute();\t Catch:{ Exception -> 0x001f }\n r0.setTransactionSuccessful();\t Catch:{ Exception -> 0x001f }\n goto L_0x0026;\n L_0x001d:\n r3 = move-exception;\n goto L_0x002a;\n L_0x001f:\n r3 = f10646a;\t Catch:{ all -> 0x001d }\n r4 = \"Issue adding location to battery history\";\t Catch:{ all -> 0x001d }\n com.foursquare.internal.util.FsLog.m6807d(r3, r4);\t Catch:{ all -> 0x001d }\n L_0x0026:\n r0.endTransaction();\n return;\n L_0x002a:\n r0.endTransaction();\n throw r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.a(long, float):void\");\n }", "public final void a(com.tencent.mm.plugin.game.c.ai r12, java.lang.String r13, int r14, int r15) {\n /*\n r11 = this;\n if (r12 == 0) goto L_0x000a;\n L_0x0002:\n r0 = r12.nmz;\n r0 = com.tencent.mm.sdk.platformtools.bi.cC(r0);\n if (r0 == 0) goto L_0x0010;\n L_0x000a:\n r0 = 8;\n r11.setVisibility(r0);\n L_0x000f:\n return;\n L_0x0010:\n r11.mAppId = r13;\n r11.niV = r15;\n r0 = r12.nmz;\n r7 = r0.iterator();\n L_0x001a:\n r0 = r7.hasNext();\n if (r0 == 0) goto L_0x000f;\n L_0x0020:\n r0 = r7.next();\n r4 = r0;\n r4 = (com.tencent.mm.plugin.game.c.k) r4;\n if (r4 == 0) goto L_0x001a;\n L_0x0029:\n r5 = new com.tencent.mm.plugin.game.d.e$a$a;\n r5.<init>();\n r0 = r4.nlz;\n switch(r0) {\n case 1: goto L_0x004a;\n case 2: goto L_0x00e3;\n default: goto L_0x0033;\n };\n L_0x0033:\n r0 = 2;\n if (r14 != r0) goto L_0x001a;\n L_0x0036:\n r0 = r11.mContext;\n r1 = 10;\n r2 = 1002; // 0x3ea float:1.404E-42 double:4.95E-321;\n r3 = r4.nlw;\n r4 = r4.nlr;\n r6 = com.tencent.mm.plugin.game.model.ap.CD(r4);\n r4 = r13;\n r5 = r15;\n com.tencent.mm.plugin.game.model.ap.a(r0, r1, r2, r3, r4, r5, r6);\n goto L_0x001a;\n L_0x004a:\n r0 = r4.nlx;\n if (r0 == 0) goto L_0x001a;\n L_0x004e:\n r11.e(r11);\n r0 = r11.DF;\n r1 = com.tencent.mm.R.i.djD;\n r2 = 1;\n r6 = r0.inflate(r1, r11, r2);\n r0 = com.tencent.mm.R.h.cxP;\n r0 = r6.findViewById(r0);\n r0 = (android.widget.TextView) r0;\n r1 = com.tencent.mm.R.h.cxR;\n r1 = r6.findViewById(r1);\n r1 = (android.widget.TextView) r1;\n r2 = com.tencent.mm.R.h.cxO;\n r2 = r6.findViewById(r2);\n r2 = (com.tencent.mm.plugin.game.widget.EllipsizingTextView) r2;\n r3 = 2;\n r2.setMaxLines(r3);\n r3 = com.tencent.mm.R.h.cxQ;\n r3 = r6.findViewById(r3);\n r3 = (android.widget.ImageView) r3;\n r8 = r11.mContext;\n r9 = r4.nlv;\n r10 = r0.getTextSize();\n r8 = com.tencent.mm.pluginsdk.ui.d.i.b(r8, r9, r10);\n r0.setText(r8);\n r0 = r11.mContext;\n r8 = r4.nlx;\n r8 = r8.fpg;\n r9 = r1.getTextSize();\n r0 = com.tencent.mm.pluginsdk.ui.d.i.b(r0, r8, r9);\n r1.setText(r0);\n r0 = r11.mContext;\n r1 = r4.nlx;\n r1 = r1.nkL;\n r8 = r2.getTextSize();\n r0 = com.tencent.mm.pluginsdk.ui.d.i.b(r0, r1, r8);\n r2.setText(r0);\n r0 = r4.nlx;\n r0 = r0.nkM;\n r0 = com.tencent.mm.sdk.platformtools.bi.oN(r0);\n if (r0 != 0) goto L_0x00dd;\n L_0x00b9:\n r0 = com.tencent.mm.plugin.game.d.e.aSC();\n r1 = r4.nlx;\n r1 = r1.nkM;\n r2 = r5.aSD();\n r0.a(r3, r1, r2);\n L_0x00c8:\n r0 = new com.tencent.mm.plugin.game.ui.f$a;\n r1 = r4.nlw;\n r2 = r4.nlx;\n r2 = r2.nkN;\n r3 = r4.nlr;\n r0.<init>(r1, r2, r3);\n r6.setTag(r0);\n r6.setOnClickListener(r11);\n goto L_0x0033;\n L_0x00dd:\n r0 = 8;\n r3.setVisibility(r0);\n goto L_0x00c8;\n L_0x00e3:\n r0 = r4.nly;\n if (r0 == 0) goto L_0x001a;\n L_0x00e7:\n r11.e(r11);\n r0 = r11.DF;\n r1 = com.tencent.mm.R.i.djE;\n r2 = 1;\n r3 = r0.inflate(r1, r11, r2);\n r0 = com.tencent.mm.R.h.cOG;\n r0 = r3.findViewById(r0);\n r0 = (android.widget.TextView) r0;\n r1 = com.tencent.mm.R.h.cOI;\n r1 = r3.findViewById(r1);\n r1 = (android.widget.TextView) r1;\n r2 = com.tencent.mm.R.h.cOH;\n r2 = r3.findViewById(r2);\n r2 = (android.widget.ImageView) r2;\n r6 = r11.mContext;\n r8 = r4.nlv;\n r9 = r0.getTextSize();\n r6 = com.tencent.mm.pluginsdk.ui.d.i.b(r6, r8, r9);\n r0.setText(r6);\n r0 = r11.mContext;\n r6 = r4.nly;\n r6 = r6.fpg;\n r8 = r1.getTextSize();\n r0 = com.tencent.mm.pluginsdk.ui.d.i.b(r0, r6, r8);\n r1.setText(r0);\n r0 = r4.nly;\n r0 = r0.nkM;\n r0 = com.tencent.mm.sdk.platformtools.bi.oN(r0);\n if (r0 != 0) goto L_0x016f;\n L_0x0135:\n r0 = r4.nly;\n r0 = r0.npS;\n r1 = 1;\n if (r0 != r1) goto L_0x0167;\n L_0x013c:\n r0 = 1;\n r5.nDa = r0;\n r0 = com.tencent.mm.R.g.bCF;\n r5.nDd = r0;\n L_0x0143:\n r0 = com.tencent.mm.plugin.game.d.e.aSC();\n r1 = r4.nly;\n r1 = r1.nkM;\n r5 = r5.aSD();\n r0.a(r2, r1, r5);\n L_0x0152:\n r0 = new com.tencent.mm.plugin.game.ui.f$a;\n r1 = r4.nlw;\n r2 = r4.nly;\n r2 = r2.nkN;\n r5 = r4.nlr;\n r0.<init>(r1, r2, r5);\n r3.setTag(r0);\n r3.setOnClickListener(r11);\n goto L_0x0033;\n L_0x0167:\n r0 = 1;\n r5.hFJ = r0;\n r0 = com.tencent.mm.R.g.bCE;\n r5.nDd = r0;\n goto L_0x0143;\n L_0x016f:\n r0 = 8;\n r2.setVisibility(r0);\n goto L_0x0152;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.plugin.game.ui.f.a(com.tencent.mm.plugin.game.c.ai, java.lang.String, int, int):void\");\n }", "public void mo21787L() {\n }", "public final void mo1285b() {\n }", "public static void m5820b(java.lang.String r3, java.lang.String r4, java.lang.String r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.StartCheckoutEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r1 = 1;\n r0.putItemCount(r1);\n r1 = java.lang.Long.parseLong(r3);\t Catch:{ Exception -> 0x001f }\n r3 = java.math.BigDecimal.valueOf(r1);\t Catch:{ Exception -> 0x001f }\n r0.putTotalPrice(r3);\t Catch:{ Exception -> 0x001f }\n L_0x001f:\n r3 = \"type\";\n r0.putCustomAttribute(r3, r4);\n r3 = \"cta\";\n r0.putCustomAttribute(r3, r5);\n r3 = com.crashlytics.android.answers.Answers.getInstance();\n r3.logStartCheckout(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.b(java.lang.String, java.lang.String, java.lang.String):void\");\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "public void m51745d() {\n this.f42403b.a();\n }", "public boolean A_()\r\n/* 21: */ {\r\n/* 22:138 */ return true;\r\n/* 23: */ }", "void mo57277b();", "public int a()\r\n/* 64: */ {\r\n/* 65:70 */ return this.a;\r\n/* 66: */ }", "int a(java.lang.String r8, com.google.ho r9, java.lang.StringBuilder r10, boolean r11, com.google.ae r12) {\n /*\n r7 = this;\n r1 = 0;\n r0 = r8.length();\t Catch:{ RuntimeException -> 0x0009 }\n if (r0 != 0) goto L_0x000b;\n L_0x0007:\n r0 = r1;\n L_0x0008:\n return r0;\n L_0x0009:\n r0 = move-exception;\n throw r0;\n L_0x000b:\n r2 = new java.lang.StringBuilder;\n r2.<init>(r8);\n r0 = J;\n r3 = 25;\n r0 = r0[r3];\n if (r9 == 0) goto L_0x001c;\n L_0x0018:\n r0 = r9.a();\n L_0x001c:\n r0 = r7.a(r2, r0);\n if (r11 == 0) goto L_0x0025;\n L_0x0022:\n r12.a(r0);\t Catch:{ RuntimeException -> 0x0040 }\n L_0x0025:\n r3 = com.google.aw.FROM_DEFAULT_COUNTRY;\t Catch:{ RuntimeException -> 0x0042 }\n if (r0 == r3) goto L_0x005e;\n L_0x0029:\n r0 = r2.length();\t Catch:{ RuntimeException -> 0x003e }\n r1 = 2;\n if (r0 > r1) goto L_0x0044;\n L_0x0030:\n r0 = new com.google.ao;\t Catch:{ RuntimeException -> 0x003e }\n r1 = com.google.dk.TOO_SHORT_AFTER_IDD;\t Catch:{ RuntimeException -> 0x003e }\n r2 = J;\t Catch:{ RuntimeException -> 0x003e }\n r3 = 26;\n r2 = r2[r3];\t Catch:{ RuntimeException -> 0x003e }\n r0.<init>(r1, r2);\t Catch:{ RuntimeException -> 0x003e }\n throw r0;\t Catch:{ RuntimeException -> 0x003e }\n L_0x003e:\n r0 = move-exception;\n throw r0;\n L_0x0040:\n r0 = move-exception;\n throw r0;\n L_0x0042:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x003e }\n L_0x0044:\n r0 = r7.a(r2, r10);\n if (r0 == 0) goto L_0x0050;\n L_0x004a:\n r12.a(r0);\t Catch:{ RuntimeException -> 0x004e }\n goto L_0x0008;\n L_0x004e:\n r0 = move-exception;\n throw r0;\n L_0x0050:\n r0 = new com.google.ao;\n r1 = com.google.dk.INVALID_COUNTRY_CODE;\n r2 = J;\n r3 = 24;\n r2 = r2[r3];\n r0.<init>(r1, r2);\n throw r0;\n L_0x005e:\n if (r9 == 0) goto L_0x00d2;\n L_0x0060:\n r0 = r9.L();\n r3 = java.lang.String.valueOf(r0);\n r4 = r2.toString();\n r5 = r4.startsWith(r3);\n if (r5 == 0) goto L_0x00d2;\n L_0x0072:\n r5 = new java.lang.StringBuilder;\n r3 = r3.length();\n r3 = r4.substring(r3);\n r5.<init>(r3);\n r3 = r9.X();\n r4 = r7.o;\n r6 = r3.g();\n r4 = r4.a(r6);\n r6 = 0;\n r7.a(r5, r9, r6);\n r6 = r7.o;\n r3 = r3.f();\n r3 = r6.a(r3);\n r6 = r4.matcher(r2);\t Catch:{ RuntimeException -> 0x00ca }\n r6 = r6.matches();\t Catch:{ RuntimeException -> 0x00ca }\n if (r6 != 0) goto L_0x00af;\n L_0x00a5:\n r4 = r4.matcher(r5);\t Catch:{ RuntimeException -> 0x00cc }\n r4 = r4.matches();\t Catch:{ RuntimeException -> 0x00cc }\n if (r4 != 0) goto L_0x00bb;\n L_0x00af:\n r2 = r2.toString();\t Catch:{ RuntimeException -> 0x00ce }\n r2 = r7.a(r3, r2);\t Catch:{ RuntimeException -> 0x00ce }\n r3 = com.google.dz.TOO_LONG;\t Catch:{ RuntimeException -> 0x00ce }\n if (r2 != r3) goto L_0x00d2;\n L_0x00bb:\n r10.append(r5);\t Catch:{ RuntimeException -> 0x00d0 }\n if (r11 == 0) goto L_0x00c5;\n L_0x00c0:\n r1 = com.google.aw.FROM_NUMBER_WITHOUT_PLUS_SIGN;\t Catch:{ RuntimeException -> 0x00d0 }\n r12.a(r1);\t Catch:{ RuntimeException -> 0x00d0 }\n L_0x00c5:\n r12.a(r0);\n goto L_0x0008;\n L_0x00ca:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x00cc }\n L_0x00cc:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x00ce }\n L_0x00ce:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x00d0 }\n L_0x00d0:\n r0 = move-exception;\n throw r0;\n L_0x00d2:\n r12.a(r1);\n r0 = r1;\n goto L_0x0008;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, com.google.ho, java.lang.StringBuilder, boolean, com.google.ae):int\");\n }", "private static class_1205 method_6442(String param0, int param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2111(int param1, int param2, int param3, aji param4, int param5, int param6) {\r\n // $FF: Couldn't be decompiled\r\n }", "private void m1654a(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m322b();\n r7 = r7.m321a();\n r1 = 0;\n L_0x0009:\n r2 = \"http.request\";\n r8.mo160a(r2, r7);\n r1 = r1 + 1;\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x002f }\n if (r2 != 0) goto L_0x0020;\t Catch:{ IOException -> 0x002f }\n L_0x0018:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x002f }\n r2.mo2023a(r0, r8, r3);\t Catch:{ IOException -> 0x002f }\n goto L_0x002b;\t Catch:{ IOException -> 0x002f }\n L_0x0020:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x002f }\n r3 = p000a.p001a.p002a.p003a.p032l.C0150c.m428a(r3);\t Catch:{ IOException -> 0x002f }\n r2.mo1931b(r3);\t Catch:{ IOException -> 0x002f }\n L_0x002b:\n r6.m1660a(r0, r8);\t Catch:{ IOException -> 0x002f }\n return;\n L_0x002f:\n r2 = move-exception;\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0035 }\n r3.close();\t Catch:{ IOException -> 0x0035 }\n L_0x0035:\n r3 = r6.f1520h;\n r3 = r3.retryRequest(r2, r1, r8);\n if (r3 == 0) goto L_0x00a0;\n L_0x003d:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x0009;\n L_0x0045:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when connecting to \";\n r4.append(r5);\n r4.append(r0);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x0088;\n L_0x007f:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x0088:\n r2 = r6.f1513a;\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r4 = \"Retrying connect to \";\n r3.append(r4);\n r3.append(r0);\n r3 = r3.toString();\n r2.m269d(r3);\n goto L_0x0009;\n L_0x00a0:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.a(a.a.a.a.i.b.x, a.a.a.a.n.e):void\");\n }", "private void kk12() {\n\n\t}", "public void mo1334a() {\n m18933c();\n }", "void mo41086b();", "static void m7753b() {\n f8029a = false;\n }", "public void mo44053a() {\n }", "void mo80457c();", "public void mo9137b() {\n }", "public static void m5813a(java.lang.String r2, java.lang.String r3, java.lang.String r4, boolean r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.PurchaseEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r0.putItemId(r2);\n r0.putItemType(r3);\n r2 = java.lang.Long.parseLong(r4);\t Catch:{ Exception -> 0x0021 }\n r2 = java.math.BigDecimal.valueOf(r2);\t Catch:{ Exception -> 0x0021 }\n r0.putItemPrice(r2);\t Catch:{ Exception -> 0x0021 }\n L_0x0021:\n r0.putSuccess(r5);\n r2 = com.crashlytics.android.answers.Answers.getInstance();\n r2.logPurchase(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String, boolean):void\");\n }", "private synchronized void a(com.whatsapp.util.x r11, boolean r12) {\n /*\n r10 = this;\n r0 = 0;\n monitor-enter(r10);\n r2 = com.whatsapp.util.Log.h;\t Catch:{ all -> 0x0016 }\n r3 = com.whatsapp.util.x.a(r11);\t Catch:{ all -> 0x0016 }\n r1 = com.whatsapp.util.bl.b(r3);\t Catch:{ IllegalArgumentException -> 0x0014 }\n if (r1 == r11) goto L_0x0019;\n L_0x000e:\n r0 = new java.lang.IllegalStateException;\t Catch:{ IllegalArgumentException -> 0x0014 }\n r0.<init>();\t Catch:{ IllegalArgumentException -> 0x0014 }\n throw r0;\t Catch:{ IllegalArgumentException -> 0x0014 }\n L_0x0014:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n L_0x0016:\n r0 = move-exception;\n monitor-exit(r10);\n throw r0;\n L_0x0019:\n if (r12 == 0) goto L_0x0058;\n L_0x001b:\n r1 = com.whatsapp.util.bl.d(r3);\t Catch:{ IllegalArgumentException -> 0x0052 }\n if (r1 != 0) goto L_0x0058;\n L_0x0021:\n r1 = r0;\n L_0x0022:\n r4 = r10.b;\t Catch:{ all -> 0x0016 }\n if (r1 >= r4) goto L_0x0058;\n L_0x0026:\n r4 = r3.b(r1);\t Catch:{ IllegalArgumentException -> 0x0050 }\n r4 = r4.exists();\t Catch:{ IllegalArgumentException -> 0x0050 }\n if (r4 != 0) goto L_0x0054;\n L_0x0030:\n r11.b();\t Catch:{ IllegalArgumentException -> 0x0050 }\n r0 = new java.lang.IllegalStateException;\t Catch:{ IllegalArgumentException -> 0x0050 }\n r2 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0050 }\n r2.<init>();\t Catch:{ IllegalArgumentException -> 0x0050 }\n r3 = z;\t Catch:{ IllegalArgumentException -> 0x0050 }\n r4 = 24;\n r3 = r3[r4];\t Catch:{ IllegalArgumentException -> 0x0050 }\n r2 = r2.append(r3);\t Catch:{ IllegalArgumentException -> 0x0050 }\n r1 = r2.append(r1);\t Catch:{ IllegalArgumentException -> 0x0050 }\n r1 = r1.toString();\t Catch:{ IllegalArgumentException -> 0x0050 }\n r0.<init>(r1);\t Catch:{ IllegalArgumentException -> 0x0050 }\n throw r0;\t Catch:{ IllegalArgumentException -> 0x0050 }\n L_0x0050:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n L_0x0052:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n L_0x0054:\n r1 = r1 + 1;\n if (r2 == 0) goto L_0x0022;\n L_0x0058:\n r1 = r10.b;\t Catch:{ all -> 0x0016 }\n if (r0 >= r1) goto L_0x008f;\n L_0x005c:\n r1 = r3.b(r0);\t Catch:{ all -> 0x0016 }\n if (r12 == 0) goto L_0x0088;\n L_0x0062:\n r4 = r1.exists();\t Catch:{ IllegalArgumentException -> 0x0126 }\n if (r4 == 0) goto L_0x008b;\n L_0x0068:\n r4 = r3.a(r0);\t Catch:{ all -> 0x0016 }\n r1.renameTo(r4);\t Catch:{ all -> 0x0016 }\n r5 = com.whatsapp.util.bl.e(r3);\t Catch:{ all -> 0x0016 }\n r6 = r5[r0];\t Catch:{ all -> 0x0016 }\n r4 = r4.length();\t Catch:{ all -> 0x0016 }\n r8 = com.whatsapp.util.bl.e(r3);\t Catch:{ IllegalArgumentException -> 0x0128 }\n r8[r0] = r4;\t Catch:{ IllegalArgumentException -> 0x0128 }\n r8 = r10.i;\t Catch:{ IllegalArgumentException -> 0x0128 }\n r6 = r8 - r6;\n r4 = r4 + r6;\n r10.i = r4;\t Catch:{ IllegalArgumentException -> 0x0128 }\n if (r2 == 0) goto L_0x008b;\n L_0x0088:\n a(r1);\t Catch:{ IllegalArgumentException -> 0x0128 }\n L_0x008b:\n r0 = r0 + 1;\n if (r2 == 0) goto L_0x0058;\n L_0x008f:\n r0 = r10.e;\t Catch:{ IllegalArgumentException -> 0x012a }\n r0 = r0 + 1;\n r10.e = r0;\t Catch:{ IllegalArgumentException -> 0x012a }\n r0 = 0;\n com.whatsapp.util.bl.a(r3, r0);\t Catch:{ IllegalArgumentException -> 0x012a }\n r0 = com.whatsapp.util.bl.d(r3);\t Catch:{ IllegalArgumentException -> 0x012a }\n r0 = r0 | r12;\n if (r0 == 0) goto L_0x00e0;\n L_0x00a0:\n r0 = 1;\n com.whatsapp.util.bl.a(r3, r0);\t Catch:{ IllegalArgumentException -> 0x012c }\n r0 = r10.m;\t Catch:{ IllegalArgumentException -> 0x012c }\n r1 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x012c }\n r1.<init>();\t Catch:{ IllegalArgumentException -> 0x012c }\n r4 = z;\t Catch:{ IllegalArgumentException -> 0x012c }\n r5 = 26;\n r4 = r4[r5];\t Catch:{ IllegalArgumentException -> 0x012c }\n r1 = r1.append(r4);\t Catch:{ IllegalArgumentException -> 0x012c }\n r4 = com.whatsapp.util.bl.a(r3);\t Catch:{ IllegalArgumentException -> 0x012c }\n r1 = r1.append(r4);\t Catch:{ IllegalArgumentException -> 0x012c }\n r4 = r3.a();\t Catch:{ IllegalArgumentException -> 0x012c }\n r1 = r1.append(r4);\t Catch:{ IllegalArgumentException -> 0x012c }\n r4 = 10;\n r1 = r1.append(r4);\t Catch:{ IllegalArgumentException -> 0x012c }\n r1 = r1.toString();\t Catch:{ IllegalArgumentException -> 0x012c }\n r0.write(r1);\t Catch:{ IllegalArgumentException -> 0x012c }\n if (r12 == 0) goto L_0x010f;\n L_0x00d4:\n r0 = r10.n;\t Catch:{ IllegalArgumentException -> 0x012e }\n r4 = 1;\n r4 = r4 + r0;\n r10.n = r4;\t Catch:{ IllegalArgumentException -> 0x012e }\n com.whatsapp.util.bl.a(r3, r0);\t Catch:{ IllegalArgumentException -> 0x012e }\n if (r2 == 0) goto L_0x010f;\n L_0x00e0:\n r0 = r10.k;\t Catch:{ IllegalArgumentException -> 0x012e }\n r1 = com.whatsapp.util.bl.a(r3);\t Catch:{ IllegalArgumentException -> 0x012e }\n r0.remove(r1);\t Catch:{ IllegalArgumentException -> 0x012e }\n r0 = r10.m;\t Catch:{ IllegalArgumentException -> 0x012e }\n r1 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x012e }\n r1.<init>();\t Catch:{ IllegalArgumentException -> 0x012e }\n r2 = z;\t Catch:{ IllegalArgumentException -> 0x012e }\n r4 = 25;\n r2 = r2[r4];\t Catch:{ IllegalArgumentException -> 0x012e }\n r1 = r1.append(r2);\t Catch:{ IllegalArgumentException -> 0x012e }\n r2 = com.whatsapp.util.bl.a(r3);\t Catch:{ IllegalArgumentException -> 0x012e }\n r1 = r1.append(r2);\t Catch:{ IllegalArgumentException -> 0x012e }\n r2 = 10;\n r1 = r1.append(r2);\t Catch:{ IllegalArgumentException -> 0x012e }\n r1 = r1.toString();\t Catch:{ IllegalArgumentException -> 0x012e }\n r0.write(r1);\t Catch:{ IllegalArgumentException -> 0x012e }\n L_0x010f:\n r0 = r10.i;\t Catch:{ IllegalArgumentException -> 0x0130 }\n r2 = r10.c;\t Catch:{ IllegalArgumentException -> 0x0130 }\n r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1));\n if (r0 > 0) goto L_0x011d;\n L_0x0117:\n r0 = r10.f();\t Catch:{ IllegalArgumentException -> 0x0132 }\n if (r0 == 0) goto L_0x0124;\n L_0x011d:\n r0 = r10.d;\t Catch:{ IllegalArgumentException -> 0x0132 }\n r1 = r10.j;\t Catch:{ IllegalArgumentException -> 0x0132 }\n r0.submit(r1);\t Catch:{ IllegalArgumentException -> 0x0132 }\n L_0x0124:\n monitor-exit(r10);\n return;\n L_0x0126:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n L_0x0128:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n L_0x012a:\n r0 = move-exception;\n throw r0;\t Catch:{ IllegalArgumentException -> 0x012c }\n L_0x012c:\n r0 = move-exception;\n throw r0;\t Catch:{ IllegalArgumentException -> 0x012e }\n L_0x012e:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n L_0x0130:\n r0 = move-exception;\n throw r0;\t Catch:{ IllegalArgumentException -> 0x0132 }\n L_0x0132:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.whatsapp.util.b6.a(com.whatsapp.util.x, boolean):void\");\n }", "static void method_461() {\r\n // $FF: Couldn't be decompiled\r\n }", "public abstract void mo70713b();", "void mo80455b();", "public boolean method_2088(class_689 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public final void a(int r12, int r13) {\n /*\n r11 = this;\n r0 = 2\n java.lang.Object[] r1 = new java.lang.Object[r0]\n java.lang.Integer r2 = java.lang.Integer.valueOf(r12)\n r8 = 0\n r1[r8] = r2\n java.lang.Integer r2 = java.lang.Integer.valueOf(r13)\n r9 = 1\n r1[r9] = r2\n com.meituan.robust.ChangeQuickRedirect r3 = f53268a\n java.lang.Class[] r6 = new java.lang.Class[r0]\n java.lang.Class r2 = java.lang.Integer.TYPE\n r6[r8] = r2\n java.lang.Class r2 = java.lang.Integer.TYPE\n r6[r9] = r2\n java.lang.Class r7 = java.lang.Void.TYPE\n r4 = 0\n r5 = 55518(0xd8de, float:7.7797E-41)\n r2 = r11\n boolean r1 = com.meituan.robust.PatchProxy.isSupport(r1, r2, r3, r4, r5, r6, r7)\n if (r1 == 0) goto L_0x004f\n java.lang.Object[] r1 = new java.lang.Object[r0]\n java.lang.Integer r2 = java.lang.Integer.valueOf(r12)\n r1[r8] = r2\n java.lang.Integer r2 = java.lang.Integer.valueOf(r13)\n r1[r9] = r2\n com.meituan.robust.ChangeQuickRedirect r3 = f53268a\n r4 = 0\n r5 = 55518(0xd8de, float:7.7797E-41)\n java.lang.Class[] r6 = new java.lang.Class[r0]\n java.lang.Class r0 = java.lang.Integer.TYPE\n r6[r8] = r0\n java.lang.Class r0 = java.lang.Integer.TYPE\n r6[r9] = r0\n java.lang.Class r7 = java.lang.Void.TYPE\n r2 = r11\n com.meituan.robust.PatchProxy.accessDispatch(r1, r2, r3, r4, r5, r6, r7)\n return\n L_0x004f:\n com.ss.android.ugc.aweme.live.alphaplayer.e$j r10 = com.ss.android.ugc.aweme.live.alphaplayer.e.g\n monitor-enter(r10)\n r11.m = r12 // Catch:{ all -> 0x00bb }\n r11.n = r13 // Catch:{ all -> 0x00bb }\n r11.r = r9 // Catch:{ all -> 0x00bb }\n r11.g = r9 // Catch:{ all -> 0x00bb }\n r11.p = r8 // Catch:{ all -> 0x00bb }\n com.ss.android.ugc.aweme.live.alphaplayer.e$j r0 = com.ss.android.ugc.aweme.live.alphaplayer.e.g // Catch:{ all -> 0x00bb }\n r0.notifyAll() // Catch:{ all -> 0x00bb }\n L_0x0061:\n boolean r0 = r11.f53269b // Catch:{ all -> 0x00bb }\n if (r0 != 0) goto L_0x00b9\n boolean r0 = r11.f53271d // Catch:{ all -> 0x00bb }\n if (r0 != 0) goto L_0x00b9\n boolean r0 = r11.p // Catch:{ all -> 0x00bb }\n if (r0 != 0) goto L_0x00b9\n java.lang.Object[] r1 = new java.lang.Object[r8] // Catch:{ all -> 0x00bb }\n com.meituan.robust.ChangeQuickRedirect r3 = f53268a // Catch:{ all -> 0x00bb }\n r4 = 0\n r5 = 55511(0xd8d7, float:7.7787E-41)\n java.lang.Class[] r6 = new java.lang.Class[r8] // Catch:{ all -> 0x00bb }\n java.lang.Class r7 = java.lang.Boolean.TYPE // Catch:{ all -> 0x00bb }\n r2 = r11\n boolean r0 = com.meituan.robust.PatchProxy.isSupport(r1, r2, r3, r4, r5, r6, r7) // Catch:{ all -> 0x00bb }\n if (r0 == 0) goto L_0x0098\n java.lang.Object[] r1 = new java.lang.Object[r8] // Catch:{ all -> 0x00bb }\n com.meituan.robust.ChangeQuickRedirect r3 = f53268a // Catch:{ all -> 0x00bb }\n r4 = 0\n r5 = 55511(0xd8d7, float:7.7787E-41)\n java.lang.Class[] r6 = new java.lang.Class[r8] // Catch:{ all -> 0x00bb }\n java.lang.Class r7 = java.lang.Boolean.TYPE // Catch:{ all -> 0x00bb }\n r2 = r11\n java.lang.Object r0 = com.meituan.robust.PatchProxy.accessDispatch(r1, r2, r3, r4, r5, r6, r7) // Catch:{ all -> 0x00bb }\n java.lang.Boolean r0 = (java.lang.Boolean) r0 // Catch:{ all -> 0x00bb }\n boolean r0 = r0.booleanValue() // Catch:{ all -> 0x00bb }\n goto L_0x00a9\n L_0x0098:\n boolean r0 = r11.j // Catch:{ all -> 0x00bb }\n if (r0 == 0) goto L_0x00a8\n boolean r0 = r11.k // Catch:{ all -> 0x00bb }\n if (r0 == 0) goto L_0x00a8\n boolean r0 = r11.f() // Catch:{ all -> 0x00bb }\n if (r0 == 0) goto L_0x00a8\n r0 = 1\n goto L_0x00a9\n L_0x00a8:\n r0 = 0\n L_0x00a9:\n if (r0 == 0) goto L_0x00b9\n com.ss.android.ugc.aweme.live.alphaplayer.e$j r0 = com.ss.android.ugc.aweme.live.alphaplayer.e.g // Catch:{ InterruptedException -> 0x00b1 }\n r0.wait() // Catch:{ InterruptedException -> 0x00b1 }\n goto L_0x0061\n L_0x00b1:\n java.lang.Thread r0 = java.lang.Thread.currentThread() // Catch:{ all -> 0x00bb }\n r0.interrupt() // Catch:{ all -> 0x00bb }\n goto L_0x0061\n L_0x00b9:\n monitor-exit(r10) // Catch:{ all -> 0x00bb }\n return\n L_0x00bb:\n r0 = move-exception\n monitor-exit(r10) // Catch:{ all -> 0x00bb }\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ss.android.ugc.aweme.live.alphaplayer.e.i.a(int, int):void\");\n }", "private void m50367F() {\n }", "void mo119582b();", "public abstract void mo70702a(C30989b c30989b);", "public final synchronized com.google.android.m4b.maps.bu.C4910a m21843a(java.lang.String r10) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r9 = this;\n monitor-enter(r9);\n r0 = r9.f17909e;\t Catch:{ all -> 0x0056 }\n r1 = 0;\n if (r0 != 0) goto L_0x0008;\n L_0x0006:\n monitor-exit(r9);\n return r1;\n L_0x0008:\n r0 = r9.f17907c;\t Catch:{ all -> 0x0056 }\n r2 = com.google.android.m4b.maps.az.C4733b.m21060a(r10);\t Catch:{ all -> 0x0056 }\n r0 = r0.m21933a(r2, r1);\t Catch:{ all -> 0x0056 }\n if (r0 == 0) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0014:\n r2 = r0.length;\t Catch:{ all -> 0x0056 }\n r3 = 9;\t Catch:{ all -> 0x0056 }\n if (r2 <= r3) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0019:\n r2 = 0;\t Catch:{ all -> 0x0056 }\n r2 = r0[r2];\t Catch:{ all -> 0x0056 }\n r4 = 1;\t Catch:{ all -> 0x0056 }\n if (r2 == r4) goto L_0x0020;\t Catch:{ all -> 0x0056 }\n L_0x001f:\n goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0020:\n r5 = com.google.android.m4b.maps.bs.C4891e.m21914c(r0, r4);\t Catch:{ all -> 0x0056 }\n r2 = new com.google.android.m4b.maps.ar.a;\t Catch:{ all -> 0x0056 }\n r7 = com.google.android.m4b.maps.de.C5350x.f20104b;\t Catch:{ all -> 0x0056 }\n r2.<init>(r7);\t Catch:{ all -> 0x0056 }\n r7 = new java.io.ByteArrayInputStream;\t Catch:{ IOException -> 0x0052 }\n r8 = r0.length;\t Catch:{ IOException -> 0x0052 }\n r8 = r8 - r3;\t Catch:{ IOException -> 0x0052 }\n r7.<init>(r0, r3, r8);\t Catch:{ IOException -> 0x0052 }\n r2.m20818a(r7);\t Catch:{ IOException -> 0x0052 }\n r0 = 2;\n r0 = r2.m20843h(r0);\t Catch:{ all -> 0x0056 }\n r10 = r10.equals(r0);\t Catch:{ all -> 0x0056 }\n if (r10 != 0) goto L_0x0042;\n L_0x0040:\n monitor-exit(r9);\n return r1;\n L_0x0042:\n r10 = new com.google.android.m4b.maps.bu.a;\t Catch:{ all -> 0x0056 }\n r10.<init>();\t Catch:{ all -> 0x0056 }\n r10.m22018a(r4);\t Catch:{ all -> 0x0056 }\n r10.m22020a(r2);\t Catch:{ all -> 0x0056 }\n r10.m22016a(r5);\t Catch:{ all -> 0x0056 }\n monitor-exit(r9);\n return r10;\n L_0x0052:\n monitor-exit(r9);\n return r1;\n L_0x0054:\n monitor-exit(r9);\n return r1;\n L_0x0056:\n r10 = move-exception;\n monitor-exit(r9);\n throw r10;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.bs.b.a(java.lang.String):com.google.android.m4b.maps.bu.a\");\n }", "public void mo21785J() {\n }", "public org.a9 a() {\n /*\n r4 = this;\n r1 = 0;\n r0 = r4.c;\n if (r0 != 0) goto L_0x0040;\n L_0x0005:\n monitor-enter(r4);\n r0 = r4.c;\t Catch:{ all -> 0x0043 }\n if (r0 != 0) goto L_0x003f;\n L_0x000a:\n r2 = r4.e;\t Catch:{ IllegalArgumentException -> 0x0041 }\n if (r2 != 0) goto L_0x003f;\n L_0x000e:\n r0 = r4.b;\t Catch:{ all -> 0x0043 }\n r2 = z;\t Catch:{ all -> 0x0043 }\n r3 = 8;\n r2 = r2[r3];\t Catch:{ all -> 0x0043 }\n r3 = 0;\n r0 = r0.getSharedPreferences(r2, r3);\t Catch:{ all -> 0x0043 }\n r2 = z;\t Catch:{ all -> 0x0043 }\n r3 = 6;\n r2 = r2[r3];\t Catch:{ all -> 0x0043 }\n r3 = \"\";\n r0 = r0.getString(r2, r3);\t Catch:{ all -> 0x0043 }\n r2 = android.text.TextUtils.isEmpty(r0);\t Catch:{ IllegalArgumentException -> 0x0046 }\n if (r2 == 0) goto L_0x0053;\n L_0x002d:\n r2 = r1;\n L_0x002e:\n if (r2 == 0) goto L_0x0039;\n L_0x0030:\n r0 = new org.a9;\t Catch:{ IllegalArgumentException -> 0x0048 }\n r0.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0048 }\n r2 = com.whatsapp.DialogToastActivity.f;\t Catch:{ IllegalArgumentException -> 0x0048 }\n if (r2 == 0) goto L_0x003a;\n L_0x0039:\n r0 = r1;\n L_0x003a:\n r4.c = r0;\t Catch:{ all -> 0x0043 }\n r1 = 1;\n r4.e = r1;\t Catch:{ all -> 0x0043 }\n L_0x003f:\n monitor-exit(r4);\t Catch:{ all -> 0x0043 }\n L_0x0040:\n return r0;\n L_0x0041:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0043 }\n L_0x0043:\n r0 = move-exception;\n monitor-exit(r4);\t Catch:{ all -> 0x0043 }\n throw r0;\n L_0x0046:\n r0 = move-exception;\n throw r0;\t Catch:{ IllegalArgumentException -> 0x0048 }\n L_0x0048:\n r0 = move-exception;\n r2 = z;\t Catch:{ all -> 0x0043 }\n r3 = 7;\n r2 = r2[r3];\t Catch:{ all -> 0x0043 }\n com.whatsapp.util.Log.c(r2, r0);\t Catch:{ all -> 0x0043 }\n r0 = r1;\n goto L_0x003a;\n L_0x0053:\n r2 = 3;\n r0 = android.backport.util.Base64.decode(r0, r2);\t Catch:{ IllegalArgumentException -> 0x0048 }\n r2 = r0;\n goto L_0x002e;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.whatsapp.l9.a():org.a9\");\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "void mo41083a();", "public void mo21825b() {\n }" ]
[ "0.7256868", "0.7237698", "0.72193015", "0.7184973", "0.7123215", "0.7113636", "0.7089104", "0.70764107", "0.7052513", "0.7052513", "0.701526", "0.70047635", "0.6987284", "0.6948501", "0.69393444", "0.6911598", "0.69075185", "0.6907435", "0.69028264", "0.68815696", "0.683273", "0.6808877", "0.6803797", "0.68021446", "0.6786406", "0.6782492", "0.6775087", "0.67711866", "0.67576885", "0.67444223", "0.6732422", "0.67291105", "0.67262673", "0.6723865", "0.6708031", "0.6706696", "0.6698195", "0.6693488", "0.66781926", "0.6642044", "0.66363674", "0.66354525", "0.6628634", "0.66270375", "0.66056293", "0.66056246", "0.6600465", "0.65890193", "0.6578444", "0.65750736", "0.656524", "0.6564702", "0.65646607", "0.65644467", "0.6560206", "0.65529823", "0.65479094", "0.65426314", "0.652759", "0.65259093", "0.65132624", "0.651066", "0.6509762", "0.65048385", "0.65045375", "0.64917654", "0.6491749", "0.649172", "0.648611", "0.64858156", "0.6484186", "0.6481478", "0.6472212", "0.6469028", "0.6466572", "0.64606106", "0.6455829", "0.64310116", "0.64299285", "0.64288753", "0.6425085", "0.6415061", "0.63957477", "0.6395427", "0.6392376", "0.6390837", "0.6382995", "0.6377339", "0.6372157", "0.6367006", "0.6363501", "0.6361273", "0.63538885", "0.63533646", "0.63476396", "0.6346918", "0.63352925", "0.6334883", "0.6329085", "0.6326983", "0.6323673" ]
0.0
-1
/ renamed from: a
public final void m14225a(cb cbVar) { this.f11869h.set(cbVar); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: b
public final void m14226b(Status status) { synchronized (this.f11863a) { if (!m14229d()) { m14223a(mo3568a(status)); this.f11874m = true; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo2508a(bxb bxb);", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "@Override\n\tpublic void b() {\n\n\t}", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public bb b() {\n return a(this.a);\n }", "@Override\n\tpublic void b1() {\n\t\t\n\t}", "public void b() {\r\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public abstract void b(StringBuilder sb);", "public void b() {\n }", "public void b() {\n }", "protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }", "public u(b paramb)\r\n/* 7: */ {\r\n/* 8: 9 */ this.a = paramb;\r\n/* 9: */ }", "public interface b {\n void H_();\n\n void I_();\n\n void J_();\n\n void a(C0063d dVar);\n\n void a(byte[] bArr);\n\n void b(boolean z);\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public void b() {\n ((a) this.a).b();\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "public t b() {\n return a(this.a);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }", "private void m678b(byte b) {\n byte[] bArr = this.f523r;\n bArr[0] = b;\n this.f552g.mo502b(bArr);\n }", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "public abstract T zzm(B b);", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }", "public abstract void zzc(B b, int i, int i2);", "public interface b {\n}", "public interface b {\n}", "private void m10263b(byte b) throws cf {\r\n this.f6483r[0] = b;\r\n this.g.m10347b(this.f6483r);\r\n }", "BSubstitution createBSubstitution();", "public void b(ahd paramahd) {}", "void b();", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "B database(S database);", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public abstract C0631bt mo9227aB();", "public an b() {\n return a(this.a);\n }", "protected abstract void a(bru parambru);", "static void go(Base b) {\n\t\tb.add(8);\n\t}", "void mo46242a(bmc bmc);", "public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }", "public interface bca extends bbn {\n bca a();\n\n bca a(String str);\n\n bca b(String str);\n\n bca c(String str);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public abstract BoundType b();", "public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }", "b(a aVar, com.bytedance.jedi.model.h.a aVar2) {\n super(aVar2);\n this.f21531a = aVar;\n this.f21532b = new com.bytedance.jedi.model.h.f(aVar);\n }", "private void b(int paramInt)\r\n/* 193: */ {\r\n/* 194:203 */ this.h.a(a(paramInt));\r\n/* 195: */ }", "public void b(ahb paramahb)\r\n/* 583: */ {\r\n/* 584:625 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 585:626 */ this.a[i] = amj.b(paramahb.a[i]);\r\n/* 586: */ }\r\n/* 587:628 */ for (i = 0; i < this.b.length; i++) {\r\n/* 588:629 */ this.b[i] = amj.b(paramahb.b[i]);\r\n/* 589: */ }\r\n/* 590:631 */ this.c = paramahb.c;\r\n/* 591: */ }", "interface b {\n\n /* compiled from: CreditAccountContract */\n public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }\n\n /* compiled from: CreditAccountContract */\n public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }\n}", "@Override\n\tpublic void visit(PartB partB) {\n\n\t}", "public abstract void zzb(B b, int i, long j);", "public abstract void zza(B b, int i, zzeh zzeh);", "int metodo2(int a, int b) {\r\n\r\n\t\tthis.a += 5; // se modifica el campo del objeto, el uso de la palabra reservada this se utiliza para referenciar al campo.\r\n\t\tb += 7;\r\n\t\treturn a; // modifica en la asignaci\\u00f3n\r\n\t}", "private void internalCopy(Board b) {\n for (int i = 0; i < SIDE * SIDE; i += 1) {\n set(i, b.get(i));\n }\n\n _directions = b._directions;\n _whoseMove = b._whoseMove;\n _history = b._history;\n }", "public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }", "public void b(StringBuilder sb) {\n sb.append(this.a);\n sb.append(')');\n }", "public void b() {\n e$a e$a;\n try {\n e$a = this.b;\n }\n catch (IOException iOException) {\n return;\n }\n Object object = this.c;\n e$a.b(object);\n }", "public abstract void a(StringBuilder sb);", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public abstract void zzf(Object obj, B b);", "public interface bdp {\n\n /* renamed from: a */\n public static final bdp f3422a = new bdo();\n\n /* renamed from: a */\n bdm mo1784a(akh akh);\n}", "@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract void a(b paramb, int paramInt1, int paramInt2);", "public void mo1945a(byte b) throws cf {\r\n m10263b(b);\r\n }", "void mo83703a(C32456b<T> bVar);", "public void a(String str) {\n ((b.b) this.b).d(str);\n }", "public void selectB() { }", "BOperation createBOperation();", "void metodo1(int a, int b) {\r\n\t\ta += 5;//par\\u00e1metro con el mismo nombre que el campo.\r\n\t\tb += 7;\r\n\t}", "private static void m2196a(StringBuffer stringBuffer, byte b) {\n stringBuffer.append(\"0123456789ABCDEF\".charAt((b >> 4) & 15)).append(\"0123456789ABCDEF\".charAt(b & 15));\n }", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public void b(fv paramfv)\r\n/* 408: */ {\r\n/* 409:423 */ this.a = new amj[36];\r\n/* 410:424 */ this.b = new amj[4];\r\n/* 411:425 */ for (int i = 0; i < paramfv.c(); i++)\r\n/* 412: */ {\r\n/* 413:426 */ fn localfn = paramfv.b(i);\r\n/* 414:427 */ int j = localfn.d(\"Slot\") & 0xFF;\r\n/* 415:428 */ amj localamj = amj.a(localfn);\r\n/* 416:429 */ if (localamj != null)\r\n/* 417: */ {\r\n/* 418:430 */ if ((j >= 0) && (j < this.a.length)) {\r\n/* 419:431 */ this.a[j] = localamj;\r\n/* 420: */ }\r\n/* 421:433 */ if ((j >= 100) && (j < this.b.length + 100)) {\r\n/* 422:434 */ this.b[(j - 100)] = localamj;\r\n/* 423: */ }\r\n/* 424: */ }\r\n/* 425: */ }\r\n/* 426: */ }", "public void b(String str) {\n ((b.b) this.b).e(str);\n }", "public String b()\r\n/* 35: */ {\r\n/* 36:179 */ return a();\r\n/* 37: */ }", "public abstract void zza(B b, int i, T t);", "public Item b(World paramaqu, BlockPosition paramdt)\r\n/* 189: */ {\r\n/* 190:220 */ return null;\r\n/* 191: */ }", "public abstract void zza(B b, int i, long j);", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public abstract void mo9798a(byte b);", "public void mo9798a(byte b) {\n if (this.f9108f == this.f9107e) {\n mo9827i();\n }\n byte[] bArr = this.f9106d;\n int i = this.f9108f;\n this.f9108f = i + 1;\n bArr[i] = b;\n this.f9109g++;\n }", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "private void m676a(TField bkVar, byte b) {\n if (b == -1) {\n b = m687e(bkVar.f538b);\n }\n short s = bkVar.f539c;\n short s2 = this.f519n;\n if (s <= s2 || s - s2 > 15) {\n m678b(b);\n mo446a(bkVar.f539c);\n } else {\n m686d(b | ((s - s2) << 4));\n }\n this.f519n = bkVar.f539c;\n }", "private static void m831a(C0741g<?> gVar, C0747b bVar) {\n gVar.mo9477a(C0743i.f718b, (C0739e<? super Object>) bVar);\n gVar.mo9476a(C0743i.f718b, (C0738d) bVar);\n gVar.mo9474a(C0743i.f718b, (C0736b) bVar);\n }", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "private void j()\n/* */ {\n/* 223 */ c localc = this.b;\n/* 224 */ this.b = this.c;\n/* 225 */ this.c = localc;\n/* 226 */ this.c.b();\n/* */ }", "public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }", "public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.64558864", "0.6283203", "0.6252635", "0.6250949", "0.6244743", "0.6216273", "0.6194491", "0.6193556", "0.61641675", "0.6140157", "0.60993093", "0.60974354", "0.6077849", "0.6001867", "0.5997364", "0.59737104", "0.59737104", "0.5905105", "0.5904295", "0.58908087", "0.5886636", "0.58828026", "0.5855491", "0.584618", "0.5842517", "0.5824137", "0.5824071", "0.58097327", "0.5802052", "0.58012927", "0.579443", "0.5792392", "0.57902914", "0.5785124", "0.57718205", "0.57589084", "0.5735892", "0.5735892", "0.5734873", "0.5727929", "0.5720821", "0.5712531", "0.5706813", "0.56896514", "0.56543154", "0.5651059", "0.5649904", "0.56496733", "0.5647035", "0.5640965", "0.5640109", "0.563993", "0.5631903", "0.5597427", "0.55843794", "0.5583287", "0.557783", "0.55734867", "0.55733293", "0.5572254", "0.55683887", "0.55624336", "0.55540246", "0.5553985", "0.55480546", "0.554261", "0.5535739", "0.5529958", "0.5519634", "0.5517503", "0.55160624", "0.5511545", "0.5505353", "0.5500533", "0.5491741", "0.5486198", "0.5481978", "0.547701", "0.54725856", "0.5471632", "0.5463497", "0.5460805", "0.5454913", "0.5454885", "0.54519916", "0.5441594", "0.5436747", "0.5432453", "0.5425923", "0.5424724", "0.54189867", "0.54162544", "0.54051477", "0.53998184", "0.53945845", "0.53887725", "0.5388146", "0.5387678", "0.53858143", "0.53850687", "0.5384439" ]
0.0
-1
/ renamed from: b
public boolean mo2488b() { boolean z; synchronized (this.f11863a) { z = this.f11873l; } return z; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo2508a(bxb bxb);", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "@Override\n\tpublic void b() {\n\n\t}", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public bb b() {\n return a(this.a);\n }", "@Override\n\tpublic void b1() {\n\t\t\n\t}", "public void b() {\r\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public abstract void b(StringBuilder sb);", "public void b() {\n }", "public void b() {\n }", "protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }", "public u(b paramb)\r\n/* 7: */ {\r\n/* 8: 9 */ this.a = paramb;\r\n/* 9: */ }", "public interface b {\n void H_();\n\n void I_();\n\n void J_();\n\n void a(C0063d dVar);\n\n void a(byte[] bArr);\n\n void b(boolean z);\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public void b() {\n ((a) this.a).b();\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "public t b() {\n return a(this.a);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }", "private void m678b(byte b) {\n byte[] bArr = this.f523r;\n bArr[0] = b;\n this.f552g.mo502b(bArr);\n }", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "public abstract T zzm(B b);", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }", "public abstract void zzc(B b, int i, int i2);", "public interface b {\n}", "public interface b {\n}", "private void m10263b(byte b) throws cf {\r\n this.f6483r[0] = b;\r\n this.g.m10347b(this.f6483r);\r\n }", "BSubstitution createBSubstitution();", "public void b(ahd paramahd) {}", "void b();", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "B database(S database);", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public abstract C0631bt mo9227aB();", "public an b() {\n return a(this.a);\n }", "protected abstract void a(bru parambru);", "static void go(Base b) {\n\t\tb.add(8);\n\t}", "void mo46242a(bmc bmc);", "public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }", "public interface bca extends bbn {\n bca a();\n\n bca a(String str);\n\n bca b(String str);\n\n bca c(String str);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public abstract BoundType b();", "public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }", "b(a aVar, com.bytedance.jedi.model.h.a aVar2) {\n super(aVar2);\n this.f21531a = aVar;\n this.f21532b = new com.bytedance.jedi.model.h.f(aVar);\n }", "private void b(int paramInt)\r\n/* 193: */ {\r\n/* 194:203 */ this.h.a(a(paramInt));\r\n/* 195: */ }", "public void b(ahb paramahb)\r\n/* 583: */ {\r\n/* 584:625 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 585:626 */ this.a[i] = amj.b(paramahb.a[i]);\r\n/* 586: */ }\r\n/* 587:628 */ for (i = 0; i < this.b.length; i++) {\r\n/* 588:629 */ this.b[i] = amj.b(paramahb.b[i]);\r\n/* 589: */ }\r\n/* 590:631 */ this.c = paramahb.c;\r\n/* 591: */ }", "interface b {\n\n /* compiled from: CreditAccountContract */\n public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }\n\n /* compiled from: CreditAccountContract */\n public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }\n}", "@Override\n\tpublic void visit(PartB partB) {\n\n\t}", "public abstract void zzb(B b, int i, long j);", "public abstract void zza(B b, int i, zzeh zzeh);", "int metodo2(int a, int b) {\r\n\r\n\t\tthis.a += 5; // se modifica el campo del objeto, el uso de la palabra reservada this se utiliza para referenciar al campo.\r\n\t\tb += 7;\r\n\t\treturn a; // modifica en la asignaci\\u00f3n\r\n\t}", "private void internalCopy(Board b) {\n for (int i = 0; i < SIDE * SIDE; i += 1) {\n set(i, b.get(i));\n }\n\n _directions = b._directions;\n _whoseMove = b._whoseMove;\n _history = b._history;\n }", "public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }", "public void b(StringBuilder sb) {\n sb.append(this.a);\n sb.append(')');\n }", "public void b() {\n e$a e$a;\n try {\n e$a = this.b;\n }\n catch (IOException iOException) {\n return;\n }\n Object object = this.c;\n e$a.b(object);\n }", "public abstract void a(StringBuilder sb);", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public abstract void zzf(Object obj, B b);", "public interface bdp {\n\n /* renamed from: a */\n public static final bdp f3422a = new bdo();\n\n /* renamed from: a */\n bdm mo1784a(akh akh);\n}", "@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract void a(b paramb, int paramInt1, int paramInt2);", "public void mo1945a(byte b) throws cf {\r\n m10263b(b);\r\n }", "void mo83703a(C32456b<T> bVar);", "public void a(String str) {\n ((b.b) this.b).d(str);\n }", "public void selectB() { }", "BOperation createBOperation();", "void metodo1(int a, int b) {\r\n\t\ta += 5;//par\\u00e1metro con el mismo nombre que el campo.\r\n\t\tb += 7;\r\n\t}", "private static void m2196a(StringBuffer stringBuffer, byte b) {\n stringBuffer.append(\"0123456789ABCDEF\".charAt((b >> 4) & 15)).append(\"0123456789ABCDEF\".charAt(b & 15));\n }", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public void b(fv paramfv)\r\n/* 408: */ {\r\n/* 409:423 */ this.a = new amj[36];\r\n/* 410:424 */ this.b = new amj[4];\r\n/* 411:425 */ for (int i = 0; i < paramfv.c(); i++)\r\n/* 412: */ {\r\n/* 413:426 */ fn localfn = paramfv.b(i);\r\n/* 414:427 */ int j = localfn.d(\"Slot\") & 0xFF;\r\n/* 415:428 */ amj localamj = amj.a(localfn);\r\n/* 416:429 */ if (localamj != null)\r\n/* 417: */ {\r\n/* 418:430 */ if ((j >= 0) && (j < this.a.length)) {\r\n/* 419:431 */ this.a[j] = localamj;\r\n/* 420: */ }\r\n/* 421:433 */ if ((j >= 100) && (j < this.b.length + 100)) {\r\n/* 422:434 */ this.b[(j - 100)] = localamj;\r\n/* 423: */ }\r\n/* 424: */ }\r\n/* 425: */ }\r\n/* 426: */ }", "public void b(String str) {\n ((b.b) this.b).e(str);\n }", "public String b()\r\n/* 35: */ {\r\n/* 36:179 */ return a();\r\n/* 37: */ }", "public abstract void zza(B b, int i, T t);", "public Item b(World paramaqu, BlockPosition paramdt)\r\n/* 189: */ {\r\n/* 190:220 */ return null;\r\n/* 191: */ }", "public abstract void zza(B b, int i, long j);", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public abstract void mo9798a(byte b);", "public void mo9798a(byte b) {\n if (this.f9108f == this.f9107e) {\n mo9827i();\n }\n byte[] bArr = this.f9106d;\n int i = this.f9108f;\n this.f9108f = i + 1;\n bArr[i] = b;\n this.f9109g++;\n }", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "private void m676a(TField bkVar, byte b) {\n if (b == -1) {\n b = m687e(bkVar.f538b);\n }\n short s = bkVar.f539c;\n short s2 = this.f519n;\n if (s <= s2 || s - s2 > 15) {\n m678b(b);\n mo446a(bkVar.f539c);\n } else {\n m686d(b | ((s - s2) << 4));\n }\n this.f519n = bkVar.f539c;\n }", "private static void m831a(C0741g<?> gVar, C0747b bVar) {\n gVar.mo9477a(C0743i.f718b, (C0739e<? super Object>) bVar);\n gVar.mo9476a(C0743i.f718b, (C0738d) bVar);\n gVar.mo9474a(C0743i.f718b, (C0736b) bVar);\n }", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "private void j()\n/* */ {\n/* 223 */ c localc = this.b;\n/* 224 */ this.b = this.c;\n/* 225 */ this.c = localc;\n/* 226 */ this.c.b();\n/* */ }", "public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }", "public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.64558864", "0.6283203", "0.6252635", "0.6250949", "0.6244743", "0.6216273", "0.6194491", "0.6193556", "0.61641675", "0.6140157", "0.60993093", "0.60974354", "0.6077849", "0.6001867", "0.5997364", "0.59737104", "0.59737104", "0.5905105", "0.5904295", "0.58908087", "0.5886636", "0.58828026", "0.5855491", "0.584618", "0.5842517", "0.5824137", "0.5824071", "0.58097327", "0.5802052", "0.58012927", "0.579443", "0.5792392", "0.57902914", "0.5785124", "0.57718205", "0.57589084", "0.5735892", "0.5735892", "0.5734873", "0.5727929", "0.5720821", "0.5712531", "0.5706813", "0.56896514", "0.56543154", "0.5651059", "0.5649904", "0.56496733", "0.5647035", "0.5640965", "0.5640109", "0.563993", "0.5631903", "0.5597427", "0.55843794", "0.5583287", "0.557783", "0.55734867", "0.55733293", "0.5572254", "0.55683887", "0.55624336", "0.55540246", "0.5553985", "0.55480546", "0.554261", "0.5535739", "0.5529958", "0.5519634", "0.5517503", "0.55160624", "0.5511545", "0.5505353", "0.5500533", "0.5491741", "0.5486198", "0.5481978", "0.547701", "0.54725856", "0.5471632", "0.5463497", "0.5460805", "0.5454913", "0.5454885", "0.54519916", "0.5441594", "0.5436747", "0.5432453", "0.5425923", "0.5424724", "0.54189867", "0.54162544", "0.54051477", "0.53998184", "0.53945845", "0.53887725", "0.5388146", "0.5387678", "0.53858143", "0.53850687", "0.5384439" ]
0.0
-1
/ renamed from: c
public final Integer mo2489c() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo5289a(C5102c c5102c);", "public static void c0() {\n\t}", "void mo57278c();", "private static void cajas() {\n\t\t\n\t}", "void mo5290b(C5102c c5102c);", "void mo80457c();", "void mo12638c();", "void mo28717a(zzc zzc);", "void mo21072c();", "@Override\n\tpublic void ccc() {\n\t\t\n\t}", "public void c() {\n }", "void mo17012c();", "C2451d mo3408a(C2457e c2457e);", "void mo88524c();", "void mo86a(C0163d c0163d);", "void mo17021c();", "public abstract void mo53562a(C18796a c18796a);", "void mo4874b(C4718l c4718l);", "void mo4873a(C4718l c4718l);", "C12017a mo41088c();", "public abstract void mo70702a(C30989b c30989b);", "void mo72114c();", "public void mo12628c() {\n }", "C2841w mo7234g();", "public interface C0335c {\n }", "public void mo1403c() {\n }", "public static void c3() {\n\t}", "public static void c1() {\n\t}", "void mo8712a(C9714a c9714a);", "void mo67924c();", "public void mo97906c() {\n }", "public abstract void mo27385c();", "String mo20731c();", "public int c()\r\n/* 74: */ {\r\n/* 75:78 */ return this.c;\r\n/* 76: */ }", "public interface C0939c {\n }", "void mo1582a(String str, C1329do c1329do);", "void mo304a(C0366h c0366h);", "void mo1493c();", "private String getString(byte c) {\n\t\treturn c==1? \"$ \": \" \";\n\t}", "java.lang.String getC3();", "C45321i mo90380a();", "public interface C11910c {\n}", "void mo57277b();", "String mo38972c();", "static int type_of_cnc(String passed){\n\t\treturn 1;\n\t}", "public static void CC2_1() {\n\t}", "static int type_of_cc(String passed){\n\t\treturn 1;\n\t}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public void mo56167c() {\n }", "public interface C0136c {\n }", "private void kk12() {\n\n\t}", "abstract String mo1748c();", "public abstract void mo70710a(String str, C24343db c24343db);", "public interface C0303q extends C0291e {\n /* renamed from: a */\n void mo1747a(int i);\n\n /* renamed from: a */\n void mo1749a(C0288c cVar);\n\n /* renamed from: a */\n void mo1751a(byte[] bArr);\n\n /* renamed from: b */\n void mo1753b(int i);\n\n /* renamed from: c */\n void mo1754c(int i);\n\n /* renamed from: d */\n void mo1755d(int i);\n\n /* renamed from: e */\n int mo1756e(int i);\n\n /* renamed from: g */\n int mo1760g();\n\n /* renamed from: g */\n void mo1761g(int i);\n\n /* renamed from: h */\n void mo1763h(int i);\n}", "C3577c mo19678C();", "public abstract int c();", "public abstract int c();", "public final void mo11687c() {\n }", "byte mo30283c();", "private java.lang.String c(java.lang.String r7) {\n /*\n r6 = this;\n r2 = \"\";\n r0 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n if (r0 == 0) goto L_0x0050;\n L_0x0006:\n r0 = new java.lang.StringBuilder;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = java.lang.String.valueOf(r7);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0.<init>(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = \".\";\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.toString();\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x001f:\n r1 = r6.d;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r1.openFileInput(r0);\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x0025:\n r3 = new java.io.BufferedReader;\n r4 = new java.io.InputStreamReader;\n r0 = r1;\n r0 = (java.io.InputStream) r0;\n r5 = \"UTF-8\";\n r5 = java.nio.charset.Charset.forName(r5);\n r4.<init>(r0, r5);\n r3.<init>(r4);\n r0 = new java.lang.StringBuffer;\n r0.<init>();\n L_0x003d:\n r4 = r3.readLine();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n if (r4 != 0) goto L_0x0061;\n L_0x0043:\n r0 = r0.toString();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007d }\n r1.close();\t Catch:{ IOException -> 0x007d }\n r3.close();\t Catch:{ IOException -> 0x007d }\n L_0x004f:\n return r0;\n L_0x0050:\n r0 = r7;\n goto L_0x001f;\n L_0x0052:\n r0 = move-exception;\n r0 = r6.d;\t Catch:{ IOException -> 0x005e }\n r0 = r0.getAssets();\t Catch:{ IOException -> 0x005e }\n r1 = r0.open(r7);\t Catch:{ IOException -> 0x005e }\n goto L_0x0025;\n L_0x005e:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0061:\n r0.append(r4);\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n goto L_0x003d;\n L_0x0065:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x0070 }\n r1.close();\t Catch:{ IOException -> 0x0070 }\n r3.close();\t Catch:{ IOException -> 0x0070 }\n r0 = r2;\n goto L_0x004f;\n L_0x0070:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0073:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007f }\n r1.close();\t Catch:{ IOException -> 0x007f }\n r3.close();\t Catch:{ IOException -> 0x007f }\n L_0x007c:\n throw r0;\n L_0x007d:\n r1 = move-exception;\n goto L_0x004f;\n L_0x007f:\n r1 = move-exception;\n goto L_0x007c;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.a.b.b.c(java.lang.String):java.lang.String\");\n }", "@Override\n\tpublic void compile(CodeBlock c, CompilerEnvironment environment) {\n\n\t}", "public interface C3196it extends C3208jc {\n /* renamed from: a */\n void mo30275a(long j);\n\n /* renamed from: b */\n C3197iu mo30281b(long j);\n\n /* renamed from: b */\n boolean mo30282b();\n\n /* renamed from: c */\n byte mo30283c();\n\n /* renamed from: c */\n String mo30285c(long j);\n\n /* renamed from: d */\n void mo30290d(long j);\n\n /* renamed from: e */\n int mo30291e();\n\n /* renamed from: f */\n long mo30295f();\n}", "public static void mmcc() {\n\t}", "java.lang.String getCit();", "public abstract C mo29734a();", "C15430g mo56154a();", "void mo41086b();", "@Override\n public void func_104112_b() {\n \n }", "public interface C9223b {\n }", "public abstract String mo11611b();", "void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);", "String getCmt();", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "interface C2578d {\n}", "public interface C1803l extends C1813t {\n /* renamed from: b */\n C1803l mo7382b(C2778au auVar);\n\n /* renamed from: f */\n List<C1700ar> mo7233f();\n\n /* renamed from: g */\n C2841w mo7234g();\n\n /* renamed from: q */\n C1800i mo7384q();\n}", "double fFromC(double c) {\n return (c * 9 / 5) + 32;\n }", "void mo72113b();", "void mo1749a(C0288c cVar);", "public interface C0764b {\n}", "void mo41083a();", "String[] mo1153c();", "C1458cs mo7613iS();", "public interface C0333a {\n }", "public abstract int mo41077c();", "public interface C8843g {\n}", "public abstract void mo70709a(String str, C41018cm c41018cm);", "void mo28307a(zzgd zzgd);", "public static void mcdc() {\n\t}", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "C1435c mo1754a(C1433a c1433a, C1434b c1434b);", "public interface C0389gj extends C0388gi {\n}", "C5727e mo33224a();", "C12000e mo41087c(String str);", "public abstract String mo118046b();", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C0938b {\n }", "void mo80455b();", "public interface C0385a {\n }", "public interface C5527c {\n /* renamed from: a */\n int mo4095a(int i);\n\n /* renamed from: b */\n C5537g mo4096b(int i);\n}", "public interface C32231g {\n /* renamed from: a */\n void mo8280a(int i, int i2, C1207m c1207m);\n}", "public interface C11994b {\n /* renamed from: a */\n C11996a mo41079a(String str);\n\n /* renamed from: a */\n C11996a mo41080a(String str, C11997b bVar, String... strArr);\n\n /* renamed from: a */\n C11998c mo41081a(String str, C11999d dVar, String... strArr);\n\n /* renamed from: a */\n C12000e mo41082a(String str, C12001f fVar, String... strArr);\n\n /* renamed from: a */\n void mo41083a();\n\n /* renamed from: a */\n void mo41084a(C12018b bVar, ConnectionState... connectionStateArr);\n\n /* renamed from: b */\n C11996a mo41085b(String str);\n\n /* renamed from: b */\n void mo41086b();\n\n /* renamed from: c */\n C12000e mo41087c(String str);\n\n /* renamed from: c */\n C12017a mo41088c();\n\n /* renamed from: d */\n void mo41089d(String str);\n\n /* renamed from: e */\n C11998c mo41090e(String str);\n\n /* renamed from: f */\n C12000e mo41091f(String str);\n\n /* renamed from: g */\n C11998c mo41092g(String str);\n}" ]
[ "0.64592767", "0.644052", "0.6431582", "0.6418656", "0.64118475", "0.6397491", "0.6250796", "0.62470585", "0.6244832", "0.6232792", "0.618864", "0.61662376", "0.6152657", "0.61496663", "0.6138441", "0.6137171", "0.6131197", "0.6103783", "0.60983956", "0.6077118", "0.6061723", "0.60513836", "0.6049069", "0.6030368", "0.60263443", "0.60089093", "0.59970635", "0.59756917", "0.5956231", "0.5949343", "0.5937446", "0.5911776", "0.59034705", "0.5901311", "0.5883238", "0.5871533", "0.5865361", "0.5851141", "0.581793", "0.5815705", "0.58012", "0.578891", "0.57870495", "0.5775621", "0.57608724", "0.5734331", "0.5731584", "0.5728505", "0.57239383", "0.57130504", "0.57094604", "0.570793", "0.5697671", "0.56975955", "0.56911296", "0.5684489", "0.5684489", "0.56768984", "0.56749034", "0.5659463", "0.56589085", "0.56573", "0.56537443", "0.5651912", "0.5648272", "0.5641736", "0.5639226", "0.5638583", "0.56299245", "0.56297386", "0.56186295", "0.5615729", "0.56117755", "0.5596015", "0.55905765", "0.55816257", "0.55813104", "0.55723965", "0.5572061", "0.55696625", "0.5566985", "0.55633485", "0.555888", "0.5555646", "0.55525774", "0.5549722", "0.5548184", "0.55460495", "0.5539394", "0.5535825", "0.55300397", "0.5527975", "0.55183905", "0.5517322", "0.5517183", "0.55152744", "0.5514932", "0.55128884", "0.5509501", "0.55044043", "0.54984957" ]
0.0
-1
/ renamed from: d
public final boolean m14229d() { return this.f11866e.getCount() == 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void d() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public int d()\r\n/* 79: */ {\r\n/* 80:82 */ return this.d;\r\n/* 81: */ }", "public String d_()\r\n/* 445: */ {\r\n/* 446:459 */ return \"container.inventory\";\r\n/* 447: */ }", "public abstract int d();", "private void m2248a(double d, String str) {\n this.f2954c = d;\n this.f2955d = (long) d;\n this.f2953b = str;\n this.f2952a = ValueType.doubleValue;\n }", "public int d()\n {\n return 1;\n }", "public interface C19512d {\n /* renamed from: dd */\n void mo34676dd(int i, int i2);\n }", "void mo21073d();", "@Override\n public boolean d() {\n return false;\n }", "int getD();", "public void dor(){\n }", "public int getD() {\n\t\treturn d;\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public String getD() {\n return d;\n }", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "public final void mo91715d() {\n }", "public D() {}", "void mo17013d();", "public int getD() {\n return d_;\n }", "void mo83705a(C32458d<T> dVar);", "public void d() {\n\t\tSystem.out.println(\"d method\");\n\t}", "double d();", "public float d()\r\n/* 15: */ {\r\n/* 16:163 */ return this.b;\r\n/* 17: */ }", "protected DNA(Population pop, DNA d) {\n\t\t// TODO: implement this\n\t}", "public ahb(ahd paramahd)\r\n/* 12: */ {\r\n/* 13: 36 */ this.d = paramahd;\r\n/* 14: */ }", "public abstract C17954dh<E> mo45842a();", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void visitTdetree(Tdetree p) {\n\n\t}", "public abstract void mo56925d();", "void mo54435d();", "public void mo21779D() {\n }", "public void d() {\n this.f20599d.a(this.f20598c);\n this.f20598c.a(this);\n this.f20601f = new a(new d());\n d.a(this.f20596a, this.f20597b, this.f20601f);\n this.f20596a.setLayoutManager(new NPALinearLayoutManager(getContext()));\n ((s) this.f20596a.getItemAnimator()).setSupportsChangeAnimations(false);\n this.f20596a.setAdapter(this.f20601f);\n this.f20598c.a(this.f20602g);\n }", "@Override\r\n public String getStringRepresentation()\r\n {\r\n return \"D\";\r\n }", "void mo28307a(zzgd zzgd);", "List<String> d();", "d(l lVar, m mVar, b bVar) {\n super(mVar);\n this.f11484d = lVar;\n this.f11483c = bVar;\n }", "public int getD() {\n return d_;\n }", "public void addDField(String d){\n\t\tdfield.add(d);\n\t}", "public void mo3749d() {\n }", "public a dD() {\n return new a(this.HG);\n }", "public String amd_to_dma(java.sql.Date d)\n {\n String resp = \"\";\n if (d!=null)\n {\n String sdat = d.toString();\n String sano = sdat.substring(0,4);\n String smes = sdat.substring(5,7);\n String sdia = sdat.substring(8,10);\n resp = sdia+\"/\"+smes+\"/\"+sano;\n }\n return resp;\n }", "public void mo130970a(double d) {\n SinkDefaults.m149818a(this, d);\n }", "public abstract int getDx();", "public void mo97908d() {\n }", "public com.c.a.d.d d() {\n return this.k;\n }", "private static String toPsString(double d) {\n return \"(\" + d + \")\";\n }", "public boolean d() {\n return false;\n }", "void mo17023d();", "String dibujar();", "@Override\n\tpublic void setDurchmesser(int d) {\n\n\t}", "public void mo2470d() {\n }", "public abstract VH mo102583a(ViewGroup viewGroup, D d);", "public abstract String mo41079d();", "public void setD ( boolean d ) {\n\n\tthis.d = d;\n }", "public Dx getDx() {\n/* 32 */ return this.dx;\n/* */ }", "DoubleNode(int d) {\n\t data = d; }", "DD createDD();", "@java.lang.Override\n public float getD() {\n return d_;\n }", "public void setD(String d) {\n this.d = d == null ? null : d.trim();\n }", "public int d()\r\n {\r\n return 20;\r\n }", "float getD();", "public static int m22546b(double d) {\n return 8;\n }", "void mo12650d();", "String mo20732d();", "static void feladat4() {\n\t}", "void mo130799a(double d);", "public void mo2198g(C0317d dVar) {\n }", "@Override\n public void d(String TAG, String msg) {\n }", "private double convert(double d){\n\t\tDecimalFormatSymbols symbols = DecimalFormatSymbols.getInstance();\n\t\tsymbols.setDecimalSeparator('.');\n\t\tDecimalFormat df = new DecimalFormat(\"#.##\",symbols); \n\t\treturn Double.valueOf(df.format(d));\n\t}", "public void d(String str) {\n ((b.b) this.b).g(str);\n }", "public abstract void mo42329d();", "public abstract long mo9229aD();", "public abstract String getDnForPerson(String inum);", "public interface ddd {\n public String dan();\n\n}", "@Override\n public void func_104112_b() {\n \n }", "public Nodo (String d){\n\t\tthis.dato = d;\n\t\tthis.siguiente = null; //para que apunte el nodo creado a nulo\n\t}", "public void mo5117a(C0371d c0371d, double d) {\n new C0369b(this, c0371d, d).start();\n }", "public interface C27442s {\n /* renamed from: d */\n List<EffectPointModel> mo70331d();\n}", "public final void m22595a(double d) {\n mo4383c(Double.doubleToRawLongBits(d));\n }", "public void d() {\n this.f23522d.a(this.f23521c);\n this.f23521c.a(this);\n this.i = new a();\n this.i.a(new ae(this.f23519a));\n this.f23519a.setAdapter(this.i);\n this.f23519a.setOnItemClickListener(this);\n this.f23521c.e();\n this.h.a(hashCode(), this.f23520b);\n }", "public Vector2d(double d) {\n\t\tthis.x = d;\n\t\tthis.y = d;\n\t}", "DomainHelper dh();", "private Pares(PLoc p, PLoc s, int d){\n\t\t\tprimero=p;\n\t\t\tsegundo=s;\n\t\t\tdistancia=d;\n\t\t}", "static double DEG_to_RAD(double d) {\n return d * Math.PI / 180.0;\n }", "@java.lang.Override\n public float getD() {\n return d_;\n }", "private final VH m112826b(ViewGroup viewGroup, D d) {\n return mo102583a(viewGroup, d);\n }", "public Double getDx();", "public void m25658a(double d) {\n if (d <= 0.0d) {\n d = 1.0d;\n }\n this.f19276f = (float) (50.0d / d);\n this.f19277g = new C4658a(this, this.f19273c);\n }", "boolean hasD();", "public abstract void mo27386d();", "MergedMDD() {\n }", "@ReflectiveMethod(name = \"d\", types = {})\n public void d(){\n NMSWrapper.getInstance().exec(nmsObject);\n }", "@Override\n public Chunk d(int i0, int i1) {\n return null;\n }", "public void d(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 47: */ {\r\n/* 48: 68 */ BlockPosition localdt = paramdt.offset(((EnumDirection)parambec.getData(a)).opposite());\r\n/* 49: 69 */ Block localbec = paramaqu.getBlock(localdt);\r\n/* 50: 70 */ if (((localbec.getType() instanceof bdq)) && (((Boolean)localbec.getData(bdq.b)).booleanValue())) {\r\n/* 51: 71 */ paramaqu.g(localdt);\r\n/* 52: */ }\r\n/* 53: */ }", "double defendre();", "public static int setDimension( int d ) {\n int temp = DPoint.d;\n DPoint.d = d;\n return temp;\n }", "public Datum(Datum d) {\n this.dan = d.dan;\n this.mesec = d.mesec;\n this.godina = d.godina;\n }", "public Nodo (String d, Nodo n){\n\t\tdato = d;\n\t\tsiguiente=n;\n\t}" ]
[ "0.63810617", "0.616207", "0.6071929", "0.59959275", "0.5877492", "0.58719957", "0.5825175", "0.57585526", "0.5701679", "0.5661244", "0.5651699", "0.56362265", "0.562437", "0.5615328", "0.56114155", "0.56114155", "0.5605659", "0.56001145", "0.5589302", "0.5571578", "0.5559222", "0.5541367", "0.5534182", "0.55326", "0.550431", "0.55041796", "0.5500838", "0.54946786", "0.5475938", "0.5466879", "0.5449981", "0.5449007", "0.54464436", "0.5439673", "0.543565", "0.5430978", "0.5428843", "0.5423923", "0.542273", "0.541701", "0.5416963", "0.54093426", "0.53927654", "0.53906536", "0.53793144", "0.53732955", "0.53695524", "0.5366731", "0.53530186", "0.535299", "0.53408253", "0.5333639", "0.5326304", "0.53250664", "0.53214055", "0.53208005", "0.5316437", "0.53121597", "0.52979535", "0.52763224", "0.5270543", "0.526045", "0.5247397", "0.5244388", "0.5243049", "0.5241726", "0.5241194", "0.523402", "0.5232349", "0.5231111", "0.5230985", "0.5219358", "0.52145815", "0.5214168", "0.5209237", "0.52059376", "0.51952434", "0.5193699", "0.51873696", "0.5179743", "0.5178796", "0.51700175", "0.5164517", "0.51595956", "0.5158281", "0.51572365", "0.5156627", "0.5155795", "0.51548296", "0.51545656", "0.5154071", "0.51532024", "0.5151545", "0.5143571", "0.5142079", "0.5140048", "0.51377696", "0.5133826", "0.5128858", "0.5125679", "0.5121545" ]
0.0
-1
/ renamed from: e
public final boolean m14230e() { boolean b; synchronized (this.f11863a) { if (((GoogleApiClient) this.f11865d.get()) == null || !this.f11877p) { mo2485a(); } b = mo2488b(); } return b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void e() {\n\n\t}", "public void e() {\n }", "@Override\n\tpublic void processEvent(Event e) {\n\n\t}", "@Override\n public void e(String TAG, String msg) {\n }", "public String toString()\r\n {\r\n return e.toString();\r\n }", "@Override\n\t\t\t\t\t\t\tpublic void error(Exception e) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public Object element() { return e; }", "@Override\n public void e(int i0, int i1) {\n\n }", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "private static Throwable handle(final Throwable e) {\r\n\t\te.printStackTrace();\r\n\r\n\t\tif (e.getCause() != null) {\r\n\t\t\te.getCause().printStackTrace();\r\n\t\t}\r\n\t\tif (e instanceof SAXException) {\r\n\t\t\t((SAXException) e).getException().printStackTrace();\r\n\t\t}\r\n\t\treturn e;\r\n\t}", "void event(Event e) throws Exception;", "Event getE();", "public int getE() {\n return e_;\n }", "@Override\n\tpublic void onException(Exception e) {\n\n\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, et.get(2));\r\n\t\t\t}", "public byte e()\r\n/* 84: */ {\r\n/* 85:86 */ return this.e;\r\n/* 86: */ }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, et.get(1));\r\n\t\t\t}", "public void toss(Exception e);", "private void log(IndexObjectException e) {\n\t\t\r\n\t}", "public int getE() {\n return e_;\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "private String getStacktraceFromException(Exception e) {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tPrintStream ps = new PrintStream(baos);\n\t\te.printStackTrace(ps);\n\t\tps.close();\n\t\treturn baos.toString();\n\t}", "protected void processEdge(Edge e) {\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"E \" + super.toString();\n\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, et.get(0));\r\n\t\t\t}", "public Element getElement() {\n/* 78 */ return this.e;\n/* */ }", "@Override\r\n public void actionPerformed( ActionEvent e )\r\n {\n }", "void mo57276a(Exception exc);", "@Override\r\n\tpublic void onEvent(Object e) {\n\t}", "public Throwable getOriginalException()\n/* 28: */ {\n/* 29:56 */ return this.originalE;\n/* 30: */ }", "@Override\r\n\t\t\tpublic void onError(Throwable e) {\n\r\n\t\t\t}", "private void sendOldError(Exception e) {\n }", "private V e() throws com.amap.api.col.n3.gh {\n /*\n r6 = this;\n r0 = 0\n r1 = 0\n L_0x0002:\n int r2 = r6.b\n if (r1 >= r2) goto L_0x00cd\n com.amap.api.col.n3.ki r2 = com.amap.api.col.n3.ki.c() // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n android.content.Context r3 = r6.d // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.net.Proxy r3 = com.amap.api.col.n3.ik.a(r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n r6.a((java.net.Proxy) r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n byte[] r2 = r2.a((com.amap.api.col.n3.kj) r6) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.lang.Object r2 = r6.a((byte[]) r2) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n int r0 = r6.b // Catch:{ ic -> 0x0025, gh -> 0x0020, Throwable -> 0x002a }\n r1 = r0\n r0 = r2\n goto L_0x0002\n L_0x0020:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0033\n L_0x0025:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0044\n L_0x002a:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"未知错误\"\n r0.<init>(r1)\n throw r0\n L_0x0032:\n r2 = move-exception\n L_0x0033:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 < r3) goto L_0x0002\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0043:\n r2 = move-exception\n L_0x0044:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 >= r3) goto L_0x008a\n int r3 = r6.e // Catch:{ InterruptedException -> 0x0053 }\n int r3 = r3 * 1000\n long r3 = (long) r3 // Catch:{ InterruptedException -> 0x0053 }\n java.lang.Thread.sleep(r3) // Catch:{ InterruptedException -> 0x0053 }\n goto L_0x0002\n L_0x0053:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x0078\n goto L_0x0082\n L_0x0078:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0082:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x008a:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"未知的错误\"\n java.lang.String r1 = r2.a()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x00bb\n goto L_0x00c5\n L_0x00bb:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x00c5:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x00cd:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.amap.api.col.n3.gi.e():java.lang.Object\");\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n protected void processMouseEvent(MouseEvent e) {\n super.processMouseEvent(e);\n }", "private void printInfo(SAXParseException e) {\n\t}", "@Override\n\t\tpublic void onError(Throwable e) {\n\t\t\tSystem.out.println(\"onError\");\n\t\t}", "String exceptionToStackTrace( Exception e ) {\n StringWriter stringWriter = new StringWriter();\n PrintWriter printWriter = new PrintWriter(stringWriter);\n e.printStackTrace( printWriter );\n return stringWriter.toString();\n }", "public <E> E getE(E e){\n return e;\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@PortedFrom(file = \"tSignatureUpdater.h\", name = \"vE\")\n private void vE(NamedEntity e) {\n sig.add(e);\n }", "@Override\n\t\tpublic void onException(Exception arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t}", "protected E eval()\n\t\t{\n\t\tE e=this.e;\n\t\tthis.e=null;\n\t\treturn e;\n\t\t}", "void showResultMoError(String e);", "public int E() {\n \treturn E;\n }", "@Override\r\n public void processEvent(IAEvent e) {\n\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "static public String getStackTrace(Exception e) {\n java.io.StringWriter s = new java.io.StringWriter(); \n e.printStackTrace(new java.io.PrintWriter(s));\n String trace = s.toString();\n \n if(trace==null || trace.length()==0 || trace.equals(\"null\"))\n return e.toString();\n else\n return trace;\n }", "@Override\n public String toString() {\n return \"[E]\" + super.toString() + \"(at: \" + details + \")\";\n }", "public static void error(boolean e) {\n E = e;\n }", "public void out_ep(Edge e) {\r\n\r\n\t\tif (triangulate == 0 & plot == 1) {\r\n\t\t\tclip_line(e);\r\n\t\t}\r\n\r\n\t\tif (triangulate == 0 & plot == 0) {\r\n\t\t\tSystem.err.printf(\"e %d\", e.edgenbr);\r\n\t\t\tSystem.err.printf(\" %d \", e.ep[le] != null ? e.ep[le].sitenbr : -1);\r\n\t\t\tSystem.err.printf(\"%d\\n\", e.ep[re] != null ? e.ep[re].sitenbr : -1);\r\n\t\t}\r\n\r\n\t}", "public void m58944a(E e) {\n this.f48622a = e;\n }", "void mo43357a(C16726e eVar) throws RemoteException;", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t}", "@Override\n\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t}", "static String getElementText(Element e) {\n if (e.getChildNodes().getLength() == 1) {\n Text elementText = (Text) e.getFirstChild();\n return elementText.getNodeValue();\n }\n else\n return \"\";\n }", "public RuntimeException processException(RuntimeException e)\n\n {\n\treturn new RuntimeException(e);\n }", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\n\t\t\t}", "@java.lang.Override\n public java.lang.String getE() {\n java.lang.Object ref = e_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n e_ = s;\n return s;\n }\n }", "protected void onEvent(DivRepEvent e) {\n\t\t}", "protected void onEvent(DivRepEvent e) {\n\t\t}", "protected void logException(Exception e) {\r\n if (log.isErrorEnabled()) {\r\n log.logError(LogCodes.WPH2004E, e, e.getClass().getName() + \" processing field \");\r\n }\r\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(2));\r\n\t\t\t}", "@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t\t\t\t\t\t\t\t\t}", "com.walgreens.rxit.ch.cda.EIVLEvent getEvent();", "@Override\n protected void getExras() {\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(4));\r\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\r\n\t\t\t}", "public e o() {\r\n return k();\r\n }", "@Override\n\t\t\tpublic void focusGained(FocusEvent e) {\n\t\t\t\t\n\t\t\t}" ]
[ "0.723272", "0.6603143", "0.6412109", "0.63626343", "0.6339823", "0.62542486", "0.62321854", "0.6159398", "0.6122612", "0.6122612", "0.60797614", "0.6049353", "0.60395765", "0.6001096", "0.599872", "0.59708726", "0.5955105", "0.59372604", "0.5885304", "0.5870147", "0.58634216", "0.58605117", "0.58569276", "0.5832746", "0.5795353", "0.5784078", "0.5772249", "0.57679546", "0.57465214", "0.5725804", "0.5722567", "0.5722261", "0.57132834", "0.56985664", "0.5682963", "0.5671155", "0.564998", "0.56173414", "0.56141734", "0.5609959", "0.56044847", "0.5597638", "0.55975354", "0.5594103", "0.5594103", "0.5594103", "0.5578509", "0.5568864", "0.55685985", "0.5564599", "0.5561868", "0.55616784", "0.5560205", "0.555747", "0.5550567", "0.5550567", "0.5550567", "0.5550567", "0.5547813", "0.5525149", "0.5522982", "0.55208427", "0.5516027", "0.55119777", "0.5511772", "0.5511772", "0.5511772", "0.5511772", "0.5511772", "0.5511772", "0.5511772", "0.5511772", "0.5511772", "0.5511772", "0.5511718", "0.5509749", "0.5509611", "0.5503599", "0.5501386", "0.549961", "0.5492128", "0.54891884", "0.5483632", "0.5483632", "0.54829365", "0.54811716", "0.54798293", "0.5478617", "0.54777545", "0.547199", "0.54695016", "0.54695016", "0.54695016", "0.54695016", "0.54695016", "0.54695016", "0.54695016", "0.54695016", "0.54683137", "0.5467239", "0.5464439" ]
0.0
-1
/ renamed from: f
public final void m14231f() { boolean z; if (!this.f11877p) { if (!((Boolean) f11862c.get()).booleanValue()) { z = false; this.f11877p = z; } } z = true; this.f11877p = z; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void func_70305_f() {}", "public static Forca get_f(){\n\t\treturn f;\n\t}", "void mo84656a(float f);", "public final void mo8765a(float f) {\n }", "@Override\n public int f() {\n return 0;\n }", "public void f() {\n }", "void mo9704b(float f, float f2, int i);", "void mo56155a(float f);", "public void f() {\n }", "void mo9696a(float f, float f2, int i);", "@Override\n\tpublic void f2() {\n\t\t\n\t}", "public void f() {\n Message q_ = q_();\n e.c().a(new f(255, a(q_.toByteArray())), getClass().getSimpleName(), i().a(), q_);\n }", "void mo72112a(float f);", "void mo9694a(float f, float f2);", "void f1() {\r\n\t}", "public amj p()\r\n/* 543: */ {\r\n/* 544:583 */ return this.f;\r\n/* 545: */ }", "double cFromF(double f) {\n return (f-32) * 5 / 9;\n }", "void mo34547J(float f, float f2);", "@Override\n\tpublic void f1() {\n\n\t}", "public void f() {\n this.f25459e.J();\n }", "public abstract void mo70718c(String str, float f);", "public byte f()\r\n/* 89: */ {\r\n/* 90:90 */ return this.f;\r\n/* 91: */ }", "C3579d mo19694a(C3581f fVar) throws IOException;", "public abstract void mo70714b(String str, float f);", "void mo9705c(float f, float f2);", "FunctionCall getFc();", "@Override\n\tpublic void af(String t) {\n\n\t}", "void mo9695a(float f, float f2, float f3, float f4, float f5);", "public abstract void mo70705a(String str, float f);", "void mo21075f();", "static double transform(int f) {\n return (5.0 / 9.0 * (f - 32));\n\n }", "private int m216e(float f) {\n int i = (int) (f + 0.5f);\n return i % 2 == 1 ? i - 1 : i;\n }", "void mo9703b(float f, float f2);", "public abstract int mo123247f();", "void mo6072a(float f) {\n this.f2347q = this.f2342e.mo6054a(f);\n }", "public float mo12718a(float f) {\n return f;\n }", "public abstract void mo70706a(String str, float f, float f2);", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "protected float l()\r\n/* 72: */ {\r\n/* 73: 84 */ return 0.0F;\r\n/* 74: */ }", "public int getF() {\n\t\treturn f;\n\t}", "public void f()\r\n {\r\n float var1 = 0.5F;\r\n float var2 = 0.125F;\r\n float var3 = 0.5F;\r\n this.a(0.5F - var1, 0.5F - var2, 0.5F - var3, 0.5F + var1, 0.5F + var2, 0.5F + var3);\r\n }", "void mo9698a(String str, float f);", "private static float m82748a(float f) {\n if (f == 0.0f) {\n return 1.0f;\n }\n return 0.0f;\n }", "static void feladat4() {\n\t}", "public int getf(){\r\n return f;\r\n}", "private static double FToC(double f) {\n\t\treturn (f-32)*5/9;\n\t}", "public void a(Float f) {\n ((b.b) this.b).a(f);\n }", "public Flt(float f) {this.f = new Float(f);}", "static double f(double x){\n \treturn Math.sin(x);\r\n }", "private float m23258a(float f, float f2, float f3) {\n return f + ((f2 - f) * f3);\n }", "public double getF();", "protected float m()\r\n/* 234: */ {\r\n/* 235:247 */ return 0.03F;\r\n/* 236: */ }", "final void mo6072a(float f) {\n this.f2349i = this.f2348h.mo6057b(f);\n }", "private float m87322b(float f) {\n return (float) Math.sin((double) ((float) (((double) (f - 0.5f)) * 0.4712389167638204d)));\n }", "public void colores(int f) {\n this.f = f;\n }", "static float m51586b(float f, float f2, float f3) {\n return ((f2 - f) * f3) + f;\n }", "void mo3193f();", "public void mo3777a(float f) {\n this.f1443S = f;\n }", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "static void feladat9() {\n\t}", "private double f2c(double f)\n {\n return (f-32)*5/9;\n }", "public void e(Float f) {\n ((b.b) this.b).e(f);\n }", "int mo9691a(String str, String str2, float f);", "void mo196b(float f) throws RemoteException;", "public void d(Float f) {\n ((b.b) this.b).d(f);\n }", "static void feladat7() {\n\t}", "public void b(Float f) {\n ((b.b) this.b).b(f);\n }", "long mo54439f(int i);", "public void c(Float f) {\n ((b.b) this.b).c(f);\n }", "@java.lang.Override\n public java.lang.String getF() {\n java.lang.Object ref = f_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n f_ = s;\n return s;\n }\n }", "public static void detectComponents(String f) {\n\t\t\n\t}", "public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }", "public void f() {\n if (this instanceof b) {\n b bVar = (b) this;\n Message q_ = bVar.q_();\n e.c().a(new f(bVar.b(), q_.toByteArray()), getClass().getSimpleName(), i().a(), q_);\n return;\n }\n f a2 = a();\n if (a2 != null) {\n e.c().a(a2, getClass().getSimpleName(), i().a(), (Message) null);\n }\n }", "void mo54440f();", "public int F()\r\n/* 24: */ {\r\n/* 25: 39 */ return aqt.a(0.5D, 1.0D);\r\n/* 26: */ }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public abstract int mo9741f();", "void testMethod() {\n f();\n }", "public static int m22547b(float f) {\n return 4;\n }", "public float mo12728b(float f) {\n return f;\n }", "public void mo1963f() throws cf {\r\n }", "public abstract File mo41087j();", "@Override\n\tpublic void visit(Function arg0) {\n\t\t\n\t}", "public abstract int f(int i2);", "static void feladat6() {\n\t}", "public void furyo ()\t{\n }", "long mo30295f();", "public void a(zf zfVar, Canvas canvas, float f, float f2) {\n }", "public T fjern();", "public static void feec() {\n\t}", "@Override\n\tdouble f(double x) {\n\t\treturn x;\n\t}", "static void feladat3() {\n\t}", "static void feladat8() {\n\t}", "public void mo3797c(float f) {\n this.f1455ad[0] = f;\n }", "public abstract double fct(double x);", "public interface b {\n boolean f(@NonNull File file);\n }", "public void setF(){\n\t\tf=calculateF();\n\t}", "public FI_() {\n }", "static void feladat5() {\n\t}", "private final void m57544f(int i) {\n this.f47568d.m63092a(new C15335a(i, true));\n }", "public abstract long f();" ]
[ "0.7323683", "0.65213245", "0.649907", "0.64541733", "0.6415534", "0.63602704", "0.6325114", "0.63194084", "0.630473", "0.62578535", "0.62211406", "0.6209556", "0.6173324", "0.61725706", "0.61682224", "0.6135272", "0.6130462", "0.6092916", "0.6089471", "0.6073019", "0.6069227", "0.6045645", "0.60285485", "0.6017334", "0.60073197", "0.59810024", "0.59757596", "0.5967885", "0.5942414", "0.59418225", "0.5939683", "0.59241796", "0.58987755", "0.5894165", "0.58801377", "0.5879881", "0.5830818", "0.57981277", "0.5790314", "0.578613", "0.5775656", "0.5772591", "0.57630384", "0.5752546", "0.5752283", "0.5735288", "0.5733957", "0.57191586", "0.57179475", "0.57131994", "0.57131445", "0.5706053", "0.5689441", "0.56773764", "0.5667179", "0.56332076", "0.5623908", "0.56229013", "0.5620846", "0.5620233", "0.5616687", "0.5610022", "0.5601161", "0.55959773", "0.5594083", "0.55762523", "0.5570697", "0.5569185", "0.5552703", "0.55498457", "0.5549487", "0.5540512", "0.55403346", "0.5538902", "0.5538738", "0.55373883", "0.55234814", "0.55215186", "0.551298", "0.5508332", "0.5507449", "0.55046654", "0.550407", "0.55029416", "0.5494386", "0.5493873", "0.54900146", "0.5487203", "0.54866016", "0.54843825", "0.5478175", "0.547722", "0.54764897", "0.5472811", "0.54662675", "0.5460087", "0.5458977", "0.54567033", "0.54565614", "0.5454854", "0.5442333" ]
0.0
-1
Start typing your Java solution below DO NOT write main() function
public String strStr(String haystack, String needle) { int x; if(needle.length() == 0) { return haystack; } for(int i=0; i<haystack.length(); i++) { x=0; while((x < needle.length()) && (x+i < haystack.length()) && (haystack.charAt(i+x) == needle.charAt(x))) { x++; } if(x == needle.length()) { return haystack.substring(i); } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main() {\n \n }", "public static void main(String[] args) {\n\n Solution2.solution();\n }", "public static void main(String[] args) {\n // write your code here - this is called comment and it always starts with double slash\n // and comlier will ignore this because of the // sign.\n // I am gonna say hello\n // JAVA IS CASE SENSITIVE LANGUAGE\n // System and system are very different things in java\n //Hello AND hello are different for java\n // System.out.println(\"Hello Batch 15!\");\n // System.out.println(\"I am still here.\");\n // System.out.println(\"I love Java.\");\n\n // Write a program to display your information.\n // When you run it, it should have this outcome.\n // I am your name here\n // I am from batch 15\n // I am from your city here\n // I love Java\n\n System.out.println(\"I am Sevim.\");\n System.out.println(\"I am from Batch 15.\");\n System.out.println(\"I'm from New Jersey.\");\n System.out.println(\"I love Java.\");\n\n\n\n }", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "public static void main(String[] args) {\n\t\tSolution s = new Solution();\n\t\ts.solution(2, 4, 2, 1);\n\t}", "public static void main()\n\t{\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(solution());\r\n\t}", "public static void main(String[] args) {\n \n \n \n \n }", "public static void main(String[] args) {\n \n \n \n\t}", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[]args) {\n\t\n\t\t\n\n}", "public void solution() {\n\t\t\n\t}", "public static void main(String[] args) {\r\n\t\tSomeJava8Features obj = new SomeJava8Features();\r\n\r\n\t\t// StringJoiner\r\n\t\texampleStringJoiner();\r\n\t\t\r\n\t\t// Default\r\n\t\tint ary[] = {3,6,8,9,0};\r\n\t\tSystem.out.println(\"\\nsumOfGivenIntArray ... \" + obj.sumOfGivenIntArray(ary));\r\n\t\tobj.sayMore(\"Hello Rohini\");\r\n\t\t\r\n\t\t// ForEach & Lambda Expression\r\n\t\texampleForEach_FindMaximum(ary);\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSolution s = new Solution();\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Wow I really love this class!\");\n\t\tSystem.out.println(\"Thanks again for the V8 energy drink!\");\n\t\tSystem.out.println(\"I think next time im going to have a redbull though\");\n\t\tSystem.out.println(\"We can sip on some energy drinks and make more fun of JJ\");\n\t\tSystem.out.println(\"I still cant believe JJ had a baby\");\n\t\tSystem.out.println(\"You can call me Uncle Louie\");\n\t\tSystem.out.println(\"Does Uncle Louie sound like a creepy name though?\");\n\t\tSystem.out.println(\"Anyways, I think ill be a good uncle\");\n\t\tSystem.out.println(\"I just have to figure out how to properly hold a baby\");\n\t\tSystem.out.println(\"Well, thank you for reading. Can't wait to see what else this class has to offer!\");\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args)\n\t{\n\n\n\n\n\n\n\t}", "public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public static void main(String[] args) {\n Last_coding_exercises.task17();\n\n\n }", "public static void main(){\n\t}", "public static void main() {\n }", "public static void main (String []args){\n }", "public static void main(String[] args) {\n \n\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static int Main()\n\t{\n\t\tint len;\n\t\tint i;\n\t\tint j;\n\t\tint p;\n\t\tint l;\n\t\tMain_str = new Scanner(System.in).nextLine();\n\t\tfor (len = 0;Main_str.charAt(len) != '\\0';len++)\n\t\t{\n\t\t\t;\n\t\t}\n\t\tfor (l = 2;l <= len;l++)\n\t\t{\n\t\t\tfor (i = 0;i <= len - l;i++)\n\t\t\t{\n\t\t\t\tfor (j = 0;j < l / 2;j++)\n\t\t\t\t{\n\t\t\t\t\tif (Main_str.charAt(i + j) != Main_str.charAt(i + l - 1 - j))\n\t\t\t\t\t{\n//C++ TO JAVA CONVERTER TODO TASK: There are no gotos or labels in Java:\n\t\t\t\t\t\tgoto here;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\tfor (p = i;p < i + l;p++)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.printf(\"%c\",Main_str.charAt(p));\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.print(\"\\n\");\n//C++ TO JAVA CONVERTER TODO TASK: There are no gotos or labels in Java:\n\t\t\t\t\there:\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}", "public static void main(String [] args)\n {\n System.out.println(\"Programming is great fun!\");\n }", "public static void main(String[] args) {\t\n\t\t\n\t}", "public static void main(String[] args) {\n \r\n\t}", "public static void main(String[] args) // every Java program starts with a main method or function\r\n\t{\n\t}", "public static void main(String[] args){\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n }", "public static void main(String []args){\n }", "public static void main(String []args){\n }", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t}", "public static void main(String []args){\n\n }", "public static void main(String[] args) {}", "public static void main(String[] args) {}", "public static void main(String[] args) {\r\n \r\n }", "public static void main(String[] args) {\r\n \r\n }", "public static void main (String args[]) {\n\t\t\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(solution(0));\n\n\t}", "public static void main(String[] args) {\n \n }", "@Override\r\n public void run() {\n System.out.println(\"Running in Java (regular algorithm)\");\r\n }", "public static void main (String[] args) {\r\n\t\t \r\n\t\t}", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args){\n\t\t\n\t\t\n \t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t \t\n\t \t\n\t }", "public static void main(String[] args) {\n\t\t\tSystem.out.println(Solution(5, 83));\n\t\t\t\n\t\t}", "public static void main(String[] args) {\r\n\t\t//method body\r\n\t}", "public static void main (String[] args) {\n\t\t\n\t}", "public static void main(String args[]){\n\t\t\n\t\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n \n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main (String[]args) throws IOException {\n }", "public void Main(){\n }", "private void generateSolution() {\n\t\t// TODO\n\n\t}", "public static void main(String[] args){\n \t\n }", "public static void main(String args[]) {\r\n }", "public static void main(String[] args) {\r\n// Use for unit testing\r\n }", "public static void main(String[] args) {\n\t\t// public static=> access modifies. accessable from anywhere in the project.\n\t\t// Main method is always public static\n\t\t// main method name\n\t\t// void=> return type. Void=no special return type.\n\t\t// args =>argument\n\t\t// String[] = String of Array\n\t\t// What is main method\n\t\t// Engine of a car. Without main method, we cannot run any code.\n\t\t// Do we have to have a main method to build and run any code?\n\t\t// Yes we need main to build and run an application\n\n\t\t// How many data type are there in JAVA?\n\t\t// 2.Primetive and Non-primetive\n\t\t// How many primitive data type are there?\n\t\t// 8:boolean, char, byte, short, int, long, float, double\n\t\t// NOTE: all primitives start with lowercase\n\n\t\t// Please declare all the primitive data types?\n\t\tboolean b; // b =true\n\t\t// assign a value after\n\t\tb = false;\n\t\tboolean th = true;\n\t\t// In Java every character has a value. Space (bosluk) called whitespace.\n\t\tchar c;\n\t\tc = 'a';\n\t\tbyte by;\n\t\tshort s;\n\t\t// int=> is Data Type, i=> variable(container), 1 =>value.\n\t\t// variables are important in JAVA.\n\t\t// Because, we create object/variable and use them in our codes to make our code\n\t\t// DYNAMIC\n\t\t// Also to use the same value again and again\n\t\tint i;\n\t\tlong l;\n\t\tfloat f;\n\t\tdouble d;\n\n\t\t// print int\n\t\t// We have to initialize the variables ( int i = 1; i ye deger verme) to print\n\t\t// the values.\n\t\tSystem.out.println();\n\t\t// Find the minimum and maximum value of a short. Use the same variable s\n\t\ts = Short.MIN_VALUE;\n\t\tSystem.out.println(\"The Smallest Value of a short => \" + s);\n\t\ts = Short.MAX_VALUE;\n\t\t// We are printing dynamically\n\t\tSystem.out.println(\"The Biggest Value of a short => \" + s);\n\t\t//\n\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t}" ]
[ "0.7085202", "0.70152825", "0.70048785", "0.6863522", "0.68364745", "0.682089", "0.68138087", "0.6797307", "0.6784227", "0.6755715", "0.6755715", "0.6755715", "0.6755715", "0.6755715", "0.6755715", "0.67436904", "0.67295706", "0.67241466", "0.6723099", "0.66999674", "0.6688058", "0.6688058", "0.6682968", "0.66816163", "0.668011", "0.66610104", "0.6654195", "0.6650627", "0.66442734", "0.66428536", "0.66428536", "0.66274446", "0.6623134", "0.6613289", "0.66122013", "0.66095144", "0.6607382", "0.660495", "0.660495", "0.6593702", "0.65918875", "0.65878415", "0.65878415", "0.6581943", "0.6581943", "0.65790117", "0.6577939", "0.6575975", "0.65719914", "0.6571269", "0.65631574", "0.6551785", "0.6550106", "0.6550106", "0.6550106", "0.6550106", "0.65487796", "0.65473306", "0.6545566", "0.6543781", "0.65367806", "0.6532359", "0.652479", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.65175384", "0.6512665", "0.65047544", "0.6502129", "0.65001583", "0.6500158", "0.64990646", "0.6490301", "0.64869404", "0.64869404", "0.64869404" ]
0.0
-1
Creates new form PantallaPrincipal
public PantallaPrincipal() { gestor= new Gestor(); initComponents(); inicializarTablaCarreras(); inicializarTablaCorredorTotales(); inicializarTablaCorredor(); mostrarCarreras(); mostrarCorredoresTotales(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PantallaPrincipal() {\n initComponents();\n }", "public VentanaPrincipal() {\n initComponents();\n\n idUsuariosControlador = Fabrica.getInstance().getControladorUsuarios(null).getId();\n idProductosControlador = Fabrica.getInstance().getControladorProductos(null).getId();\n idOrdenesControlador = Fabrica.getInstance().getControladorOrdenes(null).getId();\n controlarUsuario = Fabrica.getInstance().getControladorUsuarios(idUsuariosControlador);\n controlarProducto = Fabrica.getInstance().getControladorProductos(idProductosControlador);\n controlarOrden = Fabrica.getInstance().getControladorOrdenes(idOrdenesControlador);\n }", "public frmPrincipal() {\n initComponents(); \n inicializar();\n \n }", "public VentanaPrincipal() {\n initComponents();\n editar = false;\n }", "public VentaPrincipal() {\n initComponents();\n }", "@_esCocinero\n public Result crearPaso() {\n Form<Paso> frm = frmFactory.form(Paso.class).bindFromRequest();\n\n // Comprobación de errores\n if (frm.hasErrors()) {\n return status(409, frm.errorsAsJson());\n }\n\n Paso nuevoPaso = frm.get();\n\n // Comprobar autor\n String key = request().getQueryString(\"apikey\");\n if (!SeguridadFunctions.esAutorReceta(nuevoPaso.p_receta.getId(), key))\n return Results.badRequest();\n\n // Checkeamos y guardamos\n if (nuevoPaso.checkAndCreate()) {\n Cachefunctions.vaciarCacheListas(\"pasos\", Paso.numPasos(), cache);\n Cachefunctions.vaciarCacheListas(\"recetas\", Receta.numRecetas(), cache);\n return Results.created();\n } else {\n return Results.badRequest();\n }\n\n }", "public JanelaPrincipal() {\n initComponents();\n }", "public formPrincipal() {\n initComponents();\n }", "public VentanaPrincipal(Controlador main) {\n controlador = main;\n initComponents();\n }", "public TelaPrincipal() {\n initComponents();\n Consultorio.Instance().efetuaBalanco(false);\n setSize(1029,764);\n }", "public Principal() {\n initComponents();\n Desabilitar();\n ChoicePro.add(\"\");\n ChoicePro.add(\"Guerrero\");\n ChoicePro.add(\"Mago\");\n ChoicePro.add(\"Arquero\");\n Llenar();\n\n }", "public JPDV1(Principal P) {\n this.Princi = P;\n initComponents();\n }", "public vistaPrincipal() {\n initComponents();\n }", "public VentanaPrincipal() {\n initComponents();\n menuTelefono.setVisible(false);\n menuItemCerrarSesion.setVisible(false);\n controladorUsuario = new ControladorUsuario();\n\n ventanaRegistrarUsuario = new VentanaRegistrarUsuario(controladorUsuario);\n ventanaBuscarUsuarios = new VentanaBuscarUsuarios(controladorUsuario, controladorTelefono);\n \n }", "public frm_tutor_subida_prueba() {\n }", "public TelaPrincipal() {\n initComponents();\n }", "public TelaPrincipal() {\n initComponents();\n }", "public TelaPrincipal() {\r\n initComponents();\r\n con.conecta();\r\n }", "@Override\n\tpublic Pane generateForm() {\n\t\treturn painelPrincipal;\n\t}", "public VentanaPrincipal() {\n initComponents();\n }", "public VentanaPrincipal() throws IOException {\n initComponents();\n buscador = new Busqueda();\n }", "public frmPrincipal() {\n initComponents();\n }", "public Principal() {\n initComponents();\n ab = new adminbarra(pg_Ordenes);\n }", "@RequestMapping(value=\"/formpaciente\")\r\n\tpublic String crearPaciente(Map<String, Object> model) {\t\t\r\n\t\t\r\n\t\tPaciente paciente = new Paciente();\r\n\t\tmodel.put(\"paciente\", paciente);\r\n\t\tmodel.put(\"obrasociales\",obraSocialService.findAll());\r\n\t\t//model.put(\"obrasPlanesForm\", new ObrasPlanesForm());\r\n\t\t//model.put(\"planes\", planService.findAll());\r\n\t\tmodel.put(\"titulo\", \"Formulario de Alta de Paciente\");\r\n\t\t\r\n\t\treturn \"formpaciente\";\r\n\t}", "public VentanaPrincipal() {\n\t\tinitComponents();\n\t\tthis.setLocationRelativeTo(this);\n\t\ttry {\n\t\t\tcontroladorCliente = new ControladorVentanaCliente();\n\t\t\tcargarFranquicia();\n\t\t\tcargarTipoTransacion();\n\t\t\ttipoCompra();\n\t\t} catch (NamingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public Perfil create(Perfil perfil);", "public Principal() {\n initComponents();\n }", "public Principal() {\n initComponents();\n }", "public Principal() {\n initComponents();\n }", "public Principal() {\n initComponents();\n }", "public Principal() {\n initComponents();\n }", "public Principal() {\n initComponents();\n }", "public Principal() {\n initComponents();\n }", "public Principal() {\n initComponents();\n }", "public Principal() {\n initComponents();\n }", "public InicioPrincipal() {\n initComponents();\n }", "public Principal()\n {\n\n }", "public FRM_MenuPrincipal() {\n initComponents();\n archivos = new ArchivoUsuarios(); \n controlador = new CNTRL_MenuPrincipal(this, archivos);\n agregarControlador(controlador);\n setResizable(false);\n ordenarVentanas();\n }", "public JfrmPrincipal() {\n initComponents();\n }", "public static void create(Formulario form){\n daoFormulario.create(form);\n }", "public Principal() {\n initComponents();\n setResizable(false);\n setLocationRelativeTo(null);\n asignarListeners();\n listaGatos = Utilidad.leerArchivoGatos();\n listaPerros = Utilidad.leerArchivoPerros();\n // Actualizacion al iniciar el proyecto, carga de informacion de los\n // archivos planos\n actualizarListas();\n }", "public TelaPrincipalMDI() {\n initComponents();\n }", "public VentanaPrincipal(Modelo s) {\n modelo = s;\n initComponents();\n capturarEventos();\n }", "public ControladorPrueba() {\r\n }", "public VentanaPrincipal() {\r\n\t\t\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tsetBounds(100, 100, 643, 414);\r\n\t\t\r\n\t\tmenuBar = new JMenuBar();\r\n\t\tsetJMenuBar(menuBar);\r\n\t\t\r\n\t\tmnPersona = new JMenu(\"Persona\");\r\n\t\tmenuBar.add(mnPersona);\r\n\t\t\r\n\t\tmntmAgregar = new JMenuItem(\"Agregar\");\r\n\t\tmnPersona.add(mntmAgregar);\r\n\t\t\r\n\t\tmntmModificar = new JMenuItem(\"Modificar\");\r\n\t\tmnPersona.add(mntmModificar);\r\n\t\t\r\n\t\tmntmListar=new JMenuItem(\"Listar\");\r\n\t\tmnPersona.add(mntmListar);\r\n\t\t\r\n\t\tmntmEliminar = new JMenuItem(\"Eliminar\");\r\n\t\tmnPersona.add(mntmEliminar);\r\n\t\t\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\t\r\n\r\n\t}", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public SalidaCajaForm() {\n\t\tinicializarComponentes();\n }", "public VPrincipal() {\n initComponents();\n }", "public Principal() {\n initComponents();\n setLocationRelativeTo(null);\n deshabilitarPermisos();\n String titulos[] = {\"Nº\", \"Fecha y Hora\", \"Actividad\"};\n modeloTabla.setColumnIdentifiers(titulos);\n this.tabla.setModel(modeloTabla);\n }", "public FormPrincipal(String privilegio) {\r\n\r\n initComponents();\r\n// jTextFieldPreco.setText(\"0.0\");\r\n// System.out.println(Float.valueOf(\"\"));\r\n if (privilegio.equals(\"administrador\") == false) {\r\n jButtonNovoUsuario.setEnabled(false);\r\n jButtonRemover.setEnabled(false);\r\n\r\n }\r\n atualizarLinhas();\r\n\r\n }", "public frmPrincipal() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setResizable(false);\n btnReiniciar.setEnabled(false);\n txtSuma.setEditable(false);\n txtSupletorio.setEnabled(false);\n btnObtenerNotaFinal.setEnabled(false);\n txtNotaFinal.setEditable(false);\n }", "public JFrmPrincipal() {\n initComponents();\n }", "com.soa.SolicitarCreditoDocument.SolicitarCredito addNewSolicitarCredito();", "public JFramePrincipal() {\n initComponents();\n controladorPrincipal = new ControladorPrincipal(this);\n }", "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "Compuesta createCompuesta();", "public Principal_jefe_decredito() {\n initComponents();\n\n }", "private void menuPrincipal() {\r\n\t\ttelaPrincipal = new TelaPrincipal();\r\n\t\ttelaPrincipal.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\ttelaPrincipal.setVisible(true);\r\n\t\tsetVisible(false);\r\n\t}", "public FormPrincipal() {\n initComponents();\n setLocationRelativeTo( null );\n \n }", "@RequestMapping(method = RequestMethod.POST, value = {\"\",\"/\"})\r\n\tpublic ResponseEntity<FormularioDTO> add(@RequestBody @Valid Formulario formulario) throws AuthenticationException {\r\n\t\tformulario.setInstituicao(new Instituicao(authService.getDados().getInstituicaoId()));\r\n\t\treturn new ResponseEntity<>(formularioService.create(formulario), HttpStatus.CREATED);\r\n\t}", "public VentanaProveedor(VentanaPrincipal v) {\n initComponents();\n v = ventanaPrincipal;\n cp = new ControladorProveedor();\n }", "public Principal() {\r\n initComponents();\r\n setLocationRelativeTo(null); \r\n panel_Compras = new Compras();\r\n panel_Ventas = new Ventas();\r\n }", "public PrincipalSinUsuario(Principal principal) {\n initComponents();\n this.principal = principal;\n }", "public MenuPrincipal() {\n initComponents();\n \n }", "public TelaPrincipalADM() {\n initComponents();\n }", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "@POST\n\t@Consumes({MediaType.APPLICATION_FORM_URLENCODED, MediaType.APPLICATION_JSON} )\n\t@Produces(MediaType.TEXT_HTML)\n\tpublic void createPunto(Punto punto,\n\t\t\t@Context HttpServletResponse servletResponse) throws IOException {\n\t\tpunto.setId(AutoIncremental.getAutoIncremental());\n\t\tpuntoService.agregarPunto(punto);\n\t\tservletResponse.sendRedirect(\"./rutas/\");\n\t}", "public void crearPersonaje(ActionEvent event) {\r\n\r\n\t\tthis.personaje.setAspecto(url);\r\n\r\n\t\tDatabaseOperaciones.guardarPersonaje(stats, personaje);\r\n\r\n\t\tvisualizaPersonajes();\r\n\t}", "protected void creaPagine() {\n Pagina pag;\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* crea la pagina e aggiunge campi e pannelli */\n pag = this.addPagina(\"generale\");\n\n pan = PannelloFactory.orizzontale(this);\n pan.add(Cam.data);\n pan.add(Cam.importo.get());\n pan.add(Cam.note.get());\n pag.add(pan);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public abstract Anuncio creaAnuncioIndividualizado();", "public void crearPrincipal(String nameFile, String fileClases,int tipoClase, Boolean f_gc, Boolean f_nucl, Boolean f_cod, Boolean f_k, int k) throws IOException{\n //Primero leer las clases para agregarlas al final\n ReadClasses c= new ReadClasses();\n classes=c.leer(fileClases, tipoClase);\n cat=c.getCat();\n phylum=c.getPhylum();\n specie= c.getSpecie();\n if (tipoClase==1)\n clasDif=c.getCatDif();\n //clasDif=c.getCat();\n else\n if (tipoClase==2)\n clasDif=c.getPhylumDif();\n //clasDif=c.getPhylum();\n else\n clasDif=c.getSpecieDif();\n id=c.getId();\n if (f_cod)\n crearCodon();\n if (f_k)\n crearKmers4();\n //Crear encabezado de Arff\n BufferedWriter bufferArff =crearEncArff(nameFile,f_gc, f_nucl,f_cod,f_k,k, tipoClase);\n //Adicionar los datos a la base (mismo orden)\n leerFichero(nameFile, bufferArff,f_gc, f_nucl, f_cod, f_k, k, tipoClase);\n\n }", "public PlanoSaude create(long plano_id);", "void crearNuevaPersona(Persona persona);", "public static void presentarMenuPrincipal() {\n\t\tSystem.out.println(\"Ingresa el numero de la opcion deseada y preciona enter\");\n\t\tSystem.out.println(\"1 - Registrar nuevo libro\");\n\t\tSystem.out.println(\"2 - Consultar libros\");\n\t\tSystem.out.println(\"3 - terminar\");\n\t}", "public FrameCadastroUsuario(Principal principal) {\n initComponents();\n\t\tthis.principal = principal;\n }", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "public GUI_Principal() {\n initComponents();\n \n ce = new Calculo_Ecuacion();\n inicializaValores();\n }", "@Override\n public boolean createApprisialForm(ApprisialFormBean apprisial) {\n apprisial.setGendate(C_Util_Date.generateDate());\n return in_apprisialformdao.createApprisialForm(apprisial);\n }", "public String nuevo() {\n\n\t\tLOG.info(\"Submitado formulario, accion nuevo\");\n\t\tString view = \"/alumno/form\";\n\n\t\t// las validaciones son correctas, por lo cual los datos del formulario estan en\n\t\t// el atributo alumno\n\n\t\t// TODO simular index de la bbdd\n\t\tint id = this.alumnos.size();\n\t\tthis.alumno.setId(id);\n\n\t\tLOG.debug(\"alumno: \" + this.alumno);\n\n\t\t// TODO comprobar edad y fecha\n\n\t\talumnos.add(alumno);\n\t\tview = VIEW_LISTADO;\n\t\tmockAlumno();\n\n\t\t// mensaje flash\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\tExternalContext externalContext = facesContext.getExternalContext();\n\t\texternalContext.getFlash().put(\"alertTipo\", \"success\");\n\t\texternalContext.getFlash().put(\"alertMensaje\", \"Alumno \" + this.alumno.getNombre() + \" creado con exito\");\n\n\t\treturn view + \"?faces-redirect=true\";\n\t}", "public void SalvarNovaPessoa(){\r\n \r\n\t\tpessoaModel.setUsuarioModel(this.usuarioController.GetUsuarioSession());\r\n \r\n\t\t//INFORMANDO QUE O CADASTRO FOI VIA INPUT\r\n\t\tpessoaModel.setOrigemCadastro(\"I\");\r\n \r\n\t\tpessoaRepository.SalvarNovoRegistro(this.pessoaModel);\r\n \r\n\t\tthis.pessoaModel = null;\r\n \r\n\t\tUteis.MensagemInfo(\"Registro cadastrado com sucesso\");\r\n \r\n\t}", "private void criaCabecalho() {\r\n\t\tJLabel cabecalho = new JLabel(\"Cadastro de Homem\");\r\n\t\tcabecalho.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tcabecalho.setFont(new Font(\"Arial\", Font.PLAIN, 16));\r\n\t\tcabecalho.setForeground(Color.BLACK);\r\n\t\tcabecalho.setBounds(111, 41, 241, 33);\r\n\t\tpainelPrincipal.add(cabecalho);\r\n\t}", "@PostMapping(\"/creargrupo\")\n public String create(@ModelAttribute (\"grupo\") Grupo grupo) throws Exception {\n try {\n grupoService.create(grupo);\n return \"redirect:/pertenezco\";\n }catch (Exception e){\n LOG.log(Level.WARNING,\"grupos/creargrupo\" + e.getMessage());\n return \"redirect:/error\";\n }\n }", "public InicioJPanel(Principal principal) {\n this.principal = principal;\n\n initComponents();\n\n iniciarBotones(true);\n\n }", "public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }", "public principal() {\n initComponents();\n \n // Verificando si se completó el nivel\n verificar_niveles();\n \n \n }", "public void createAd(/*Should be a form*/){\n Ad ad = new Ad();\n User owner = this.user;\n Vehicle vehicle = this.vehicle;\n String \n// //ADICIONAR\n ad.setOwner();\n ad.setVehicle();\n ad.setDescription();\n ad.setPics();\n ad.setMain_pic();\n }", "public Principal() {\n initComponents();\n empresaControlador = new EmpresaControlador();\n clienteControlador = new ClienteControlador();\n vehiculoControlador = new VehiculoControlador();\n servicioControlador = new ServicioControlador();\n archivoObjeto = new ArchivoObjeto(\"/home/diego/UPS/56/ProgramacionAplicada/Parqueadero/src/archivo/ClienteArchivo.obj\");// Ruta Absolojuta\n archivosBinarios = new ArchivosBinarios();\n archivosBinariosAleatorio = new ArchivosBinariosAleatorio(\"ServicioArchivo.dat\");//Ruta relativa\n }", "public PrincipalPanel() {\n\t\tinitialize();\n\t}", "public void cambiarPanelPrincipal(JComponent elemento)\n {\n principal.removeAll();\n principal.setVisible(false);\n principal.add(elemento);\n principal.setVisible(true);\n }", "public PanelMenuPrincipal() {\r\n\t\tinitComponents();\r\n\t\tif (((Usuario) Util.usuarioCommon).getUsrAccPanelControlSn()\r\n\t\t\t\t.equals(\"N\")) {\r\n\t\t\tbtnAdmGral.setVisible(false);\r\n\t\t\tjSeparator4.setVisible(false);\r\n\t\t}\r\n\t\tagregarEscuchas();\r\n\t\t//panelSubMenu.setLayout(null);\r\n\r\n\t}", "public ProfilsFIForm() {\r\n\t\tsuper();\r\n\t}", "Documento createDocumento();", "protected RespostaFormularioPreenchido() {\n // for ORM\n }", "public static Result postAddPaper() {\n Form<PaperFormData> formData = Form.form(PaperFormData.class).bindFromRequest();\n Paper info1 = new Paper(formData.get().title, formData.get().authors, formData.get().pages,\n formData.get().channel);\n info1.save();\n return redirect(routes.PaperController.listProject());\n }", "public Principal() {\r\n\t\tinitialize();\r\n\t}", "public TelaPrincipalLocutor() {\n initComponents();\n\n }", "public DCrearDisco( InterfazDiscotienda id ){\r\n super( id, true );\r\n principal = id;\r\n\r\n panelDatos = new PanelCrearDisco( );\r\n panelBotones = new PanelBotonesDisco( this );\r\n\r\n getContentPane( ).add( panelDatos, BorderLayout.CENTER );\r\n getContentPane( ).add( panelBotones, BorderLayout.SOUTH );\r\n\r\n setTitle( \"Crear Disco\" );\r\n pack();\r\n }", "ProjetoRN createProjetoRN();", "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }" ]
[ "0.72038656", "0.7050082", "0.69731283", "0.6943591", "0.6772863", "0.6764914", "0.66943944", "0.6590677", "0.65832776", "0.65692806", "0.65354335", "0.65134686", "0.64977795", "0.64976513", "0.6491616", "0.6478856", "0.6478856", "0.64679223", "0.64462453", "0.6428172", "0.63443786", "0.6340108", "0.6327427", "0.6316997", "0.62043947", "0.6184717", "0.61511433", "0.61511433", "0.61511433", "0.61511433", "0.61511433", "0.61511433", "0.61511433", "0.61511433", "0.61511433", "0.6130976", "0.6122071", "0.61125445", "0.610184", "0.6063675", "0.5983643", "0.5978963", "0.59786505", "0.5978493", "0.59713894", "0.5953576", "0.59217864", "0.5916254", "0.5912688", "0.5908246", "0.59060925", "0.5891794", "0.5882047", "0.5879175", "0.5877885", "0.58754426", "0.5839242", "0.5834462", "0.5830649", "0.58104676", "0.5805007", "0.5800061", "0.57982814", "0.5795881", "0.5795816", "0.57955605", "0.5784493", "0.5781362", "0.57779574", "0.577622", "0.5768179", "0.575792", "0.5755359", "0.57544017", "0.5736505", "0.57293457", "0.57178485", "0.5691743", "0.5690831", "0.5688587", "0.5682668", "0.5676525", "0.5657598", "0.5655315", "0.56269276", "0.5624549", "0.56207615", "0.561045", "0.5607632", "0.560634", "0.55874705", "0.5584716", "0.557013", "0.55688256", "0.5568031", "0.55657816", "0.55585", "0.5555939", "0.5555316", "0.5554737" ]
0.6402882
20
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { TituloCarrera = new javax.swing.JLabel(); jScrollPaneCarrera = new javax.swing.JScrollPane(); jTableCarreras = new javax.swing.JTable(); TituloCorredor = new javax.swing.JLabel(); jScrollPaneCorredor = new javax.swing.JScrollPane(); jTableCorredores = new javax.swing.JTable(); jButtonBajaCarrera = new javax.swing.JButton(); TituloCorredor1 = new javax.swing.JLabel(); jScrollPaneCorredorTot = new javax.swing.JScrollPane(); jTableCorredoresTot = new javax.swing.JTable(); jButtonAñadir = new javax.swing.JButton(); filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); jButtonBajaCorredor = new javax.swing.JButton(); jMenuBar = new javax.swing.JMenuBar(); jMenuAlta = new javax.swing.JMenu(); jMenuItemCarrera = new javax.swing.JMenuItem(); jMenuItemCorredor = new javax.swing.JMenuItem(); jMenumodificar = new javax.swing.JMenu(); jMenuItemCarreraModificar = new javax.swing.JMenuItem(); jMenuItemCorredorModificar = new javax.swing.JMenuItem(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); TituloCarrera.setText("CARRERAS"); jTableCarreras.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Nombre", "Lugar", "Fecha", "Participantes" } )); jTableCarreras.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jTableCarrerasMouseClicked(evt); } }); jScrollPaneCarrera.setViewportView(jTableCarreras); TituloCorredor.setText("CORREDORES"); jTableCorredores.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null, null}, {null, null, null, null, null}, {null, null, null, null, null}, {null, null, null, null, null} }, new String [] { "Nombre", "Direccion", "Fecha Nac", "Telefono", "DNI" } )); jScrollPaneCorredor.setViewportView(jTableCorredores); jButtonBajaCarrera.setText("Dar de Baja"); jButtonBajaCarrera.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonBajaCarreraActionPerformed(evt); } }); TituloCorredor1.setText("CORREDORES TOTALES"); jTableCorredoresTot.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null, null}, {null, null, null, null, null}, {null, null, null, null, null}, {null, null, null, null, null} }, new String [] { "Nombre", "Direccion", "Fecha Nac", "Telefono", "DNI" } )); jScrollPaneCorredorTot.setViewportView(jTableCorredoresTot); jButtonAñadir.setText("Añadir Corredor a Carrera"); jButtonAñadir.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonAñadirActionPerformed(evt); } }); jButtonBajaCorredor.setText("Dar de Baja"); jButtonBajaCorredor.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonBajaCorredorActionPerformed(evt); } }); jMenuAlta.setText("Alta..."); jMenuItemCarrera.setText("Carrera"); jMenuItemCarrera.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemCarreraActionPerformed(evt); } }); jMenuAlta.add(jMenuItemCarrera); jMenuItemCorredor.setText("Corredor"); jMenuItemCorredor.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemCorredorActionPerformed(evt); } }); jMenuAlta.add(jMenuItemCorredor); jMenuBar.add(jMenuAlta); jMenumodificar.setText("Modificar"); jMenuItemCarreraModificar.setText("Carrera"); jMenuItemCarreraModificar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemCarreraModificarActionPerformed(evt); } }); jMenumodificar.add(jMenuItemCarreraModificar); jMenuItemCorredorModificar.setText("Corredor"); jMenuItemCorredorModificar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemCorredorModificarActionPerformed(evt); } }); jMenumodificar.add(jMenuItemCorredorModificar); jMenuBar.add(jMenumodificar); setJMenuBar(jMenuBar); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPaneCarrera, javax.swing.GroupLayout.PREFERRED_SIZE, 416, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollPaneCorredor, javax.swing.GroupLayout.PREFERRED_SIZE, 416, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(TituloCarrera) .addGroup(layout.createSequentialGroup() .addGap(312, 312, 312) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(filler1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButtonBajaCarrera)))) .addGap(0, 0, Short.MAX_VALUE)) .addComponent(TituloCorredor)))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jScrollPaneCorredorTot, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 411, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addComponent(TituloCorredor1, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonBajaCorredor) .addContainerGap())) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jButtonAñadir) .addContainerGap()))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(12, 12, 12) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(TituloCarrera) .addComponent(jButtonBajaCarrera)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jScrollPaneCarrera, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(filler1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE) .addComponent(TituloCorredor) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPaneCorredor, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(40, 40, 40)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(147, 147, 147) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jButtonBajaCorredor) .addComponent(TituloCorredor1, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(jScrollPaneCorredorTot, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonAñadir) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public frmVenda() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.731952", "0.72909003", "0.72909003", "0.72909003", "0.72862417", "0.7248404", "0.7213685", "0.72086793", "0.7195972", "0.71903807", "0.71843296", "0.7158833", "0.71475875", "0.70933676", "0.7081167", "0.7056787", "0.69876975", "0.6977383", "0.6955115", "0.6953839", "0.69452274", "0.6942602", "0.6935845", "0.6931919", "0.6928187", "0.6925288", "0.69251484", "0.69117147", "0.6911646", "0.6892842", "0.68927234", "0.6891408", "0.68907607", "0.68894386", "0.68836755", "0.688209", "0.6881168", "0.68787616", "0.68757504", "0.68741524", "0.68721044", "0.685922", "0.68570775", "0.6855737", "0.6855207", "0.68546575", "0.6853559", "0.6852262", "0.6852262", "0.68443567", "0.6837038", "0.6836797", "0.68291426", "0.6828922", "0.68269444", "0.6824652", "0.682331", "0.68175536", "0.68167555", "0.6810103", "0.6809546", "0.68085015", "0.68083894", "0.6807979", "0.68027437", "0.67950374", "0.67937446", "0.67921823", "0.67911226", "0.67900467", "0.6788873", "0.67881", "0.6781613", "0.67669237", "0.67660683", "0.6765841", "0.6756988", "0.675558", "0.6752552", "0.6752146", "0.6742482", "0.67395985", "0.673791", "0.6736197", "0.6733452", "0.67277217", "0.6726687", "0.67204696", "0.67168", "0.6714824", "0.6714823", "0.6708782", "0.67071444", "0.670462", "0.67010295", "0.67004406", "0.6699407", "0.6698219", "0.669522", "0.66916007", "0.6689694" ]
0.0
-1