idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,158,530 | private static void tryAssertionDefault(RegressionEnvironment env) {<NEW_LINE>// assert select result type<NEW_LINE>env.assertStatement("s0", statement -> {<NEW_LINE>EventType eventType = statement.getEventType();<NEW_LINE>assertEquals(String.class, eventType.getPropertyType("symbol"));<NEW_LINE>assertEquals(Long.class... | assertNull(listener.getLastOldData()); |
462,543 | final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | (super.beforeMarshalling(listTagsForResourceRequest)); |
1,793,356 | public Writable map(Writable w) {<NEW_LINE>switch(mathFunction) {<NEW_LINE>case ABS:<NEW_LINE>return new DoubleWritable(Math.abs(w.toDouble()));<NEW_LINE>case ACOS:<NEW_LINE>return new DoubleWritable(Math.acos(w.toDouble()));<NEW_LINE>case ASIN:<NEW_LINE>return new DoubleWritable(Math.asin(w.toDouble()));<NEW_LINE>case... | (w.toDouble())); |
386,689 | public Map<String, Object> handleJsonRequest(Map<String, ?> input) {<NEW_LINE>if (input == null) {<NEW_LINE>throw new BadRequestException("Malformed JSON");<NEW_LINE>}<NEW_LINE>String registrarId = (String) input.get(ID_PARAM);<NEW_LINE>if (Strings.isNullOrEmpty(registrarId)) {<NEW_LINE>throw new BadRequestException(St... | .format("Missing key for resource ID: %s", ID_PARAM)); |
1,656,636 | public List<ValidateError> validate(Map<String, String> values) {<NEW_LINE>List<ValidateError> errors = new ArrayList<>();<NEW_LINE>Validator validator;<NEW_LINE>ValidateError error;<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.REQUIRED);<NEW_LINE>error = validator.validate(values.get("functionKey"), con... | ValidatorFactory.getInstance(Validator.MAX_LENGTH); |
539,073 | // DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static void addClassFilter(com.sun.jdi.request.MethodExitRequest a, java.lang.String b) throws org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper, org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper {<NEW_LINE>if (org.net... | jpda.jdi.InternalExceptionWrapper(ex); |
1,120,069 | public String registerServer(String nodeId, boolean isLeader, URI httpPublishUri, String hostname) {<NEW_LINE>Map<String, Object> fields = Maps.newHashMap();<NEW_LINE>fields.put("last_seen", Tools.getUTCTimestamp());<NEW_LINE><MASK><NEW_LINE>fields.put("type", Node.Type.SERVER.toString());<NEW_LINE>fields.put("is_leade... | fields.put("node_id", nodeId); |
670,896 | public void chmodUploadCheckboxClicked(final NSButton sender) {<NEW_LINE>boolean enabled = sender.state() == NSCell.NSOnState;<NEW_LINE>preferences.setProperty("queue.upload.permissions.change", enabled);<NEW_LINE>preferences.setProperty("touch.permissions.change", enabled);<NEW_LINE>this.chmodUploadDefaultCheckbox.set... | uownerx.setEnabled(enabled && chmodUploadDefaultChecked); |
617,185 | public void init(PinotConfiguration config) throws Exception {<NEW_LINE>_config = new MinionConf(config.toMap());<NEW_LINE>String zkAddress = _config.getZkAddress();<NEW_LINE>String helixClusterName = _config.getHelixClusterName();<NEW_LINE>ServiceStartableUtils.applyClusterConfig(_config, zkAddress, helixClusterName, ... | _instanceId, InstanceType.PARTICIPANT, zkAddress); |
1,418,203 | public long handle(Emulator<?> emulator) {<NEW_LINE>RegisterContext context = emulator.getContext();<NEW_LINE>UnidbgPointer object = context.getPointerArg(1);<NEW_LINE>UnidbgPointer jmethodID = context.getPointerArg(2);<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("CallIntMethod object=" + object + ", jmetho... | getObject(object.toIntPeer()); |
500,627 | protected void postInit() {<NEW_LINE>CategoryAttribute attribute = getItem();<NEW_LINE>CategoryAttributeConfiguration configuration = attribute.getConfiguration();<NEW_LINE>initScreensTable(attribute);<NEW_LINE>if (attribute.getDataType() == ENTITY && Boolean.TRUE.equals(attribute.getLookup()) && configuration.getOptio... | omitEmptyStrings().split(enumeration); |
756,924 | public void onReceive(Context context, Intent intent) {<NEW_LINE>ContextManager.setContext(context);<NEW_LINE>DependencyInjectionService.getInstance().inject(this);<NEW_LINE>long taskId = intent.getLongExtra(AstridApiConstants.EXTRAS_TASK_ID, -1);<NEW_LINE>if (taskId == -1)<NEW_LINE>return;<NEW_LINE>Task task = PluginS... | fetchById(taskId, Task.PROPERTIES); |
733,848 | private Mono<Response<String>> supportedVpnDevicesWithResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgu... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
534,837 | private String createNextAuthToken(final DigestScheme ds, final ClientRequestContext requestContext, final HttpAuthenticationFilter.Credentials credentials) throws IOException {<NEW_LINE>final StringBuilder sb = new StringBuilder(100);<NEW_LINE>sb.append("Digest ");<NEW_LINE>append(sb, "username", credentials.getUserna... | final String cnonce = randomBytes(CLIENT_NONCE_BYTE_COUNT); |
635,021 | protected void initializeCapacities(MkCoPEntry exampleLeaf) {<NEW_LINE>// exampleLeaf.getParentDistance().externalizableSize();<NEW_LINE>int distanceSize = ByteArrayUtil.SIZE_DOUBLE;<NEW_LINE>// overhead = index(4), numEntries(4), id(4), isLeaf(0.125)<NEW_LINE>double overhead = 12.125;<NEW_LINE>if (getPageSize() - over... | "Node size of " + getPageSize() + " Bytes is chosen too small!"); |
1,408,371 | private Button renderDefaultOverflowAction(@NonNull Context context, @NonNull ViewGroup viewGroup, @NonNull HostConfig hostConfig) {<NEW_LINE>final Button overflowActionView = new Button(context);<NEW_LINE>LinearLayout.LayoutParams layoutParams;<NEW_LINE>final ActionsOrientation orientation = hostConfig.GetActions().ge... | width, LinearLayout.LayoutParams.MATCH_PARENT); |
1,373,609 | public void executeWithoutPassword(BaseRequest request, BaseResponse response) throws DdlException {<NEW_LINE>checkGlobalAuth(ConnectContext.get().getCurrentUserIdentity(), PrivPredicate.ADMIN);<NEW_LINE>String dbName = request.getSingleParameter(DB_PARAM);<NEW_LINE>String tableName = request.getSingleParameter(TABLE_P... | getCurrentCatalog().getDb(dbName); |
1,025,498 | public String feedAndGetStates(@RequestParam(value = "action", required = false) String action, @RequestParam(value = "customer", required = false) String customer, @RequestParam(value = "order", required = false) String order, @RequestParam(value = "event", required = false) String event, @RequestParam(value = "guide"... | "allIds", machines.keySet()); |
1,038,629 | public void writeReference(Reference ref) {<NEW_LINE>// DD = definition description<NEW_LINE>Element classdd = htmldoc.createElement(HTMLUtil.HTML_DD_TAG);<NEW_LINE>maindl.appendChild(classdd);<NEW_LINE>// Prefix<NEW_LINE>if (!ref.prefix().isEmpty()) {<NEW_LINE>Element prediv = htmldoc.createElement(HTMLUtil.HTML_DIV_T... | setTextContent(ref.url()); |
1,729,830 | private static void addRenderTreeNode(final LayoutState layoutState, final RenderTreeNode node, final LithoRenderUnit unit, final LayoutOutput layoutOutput, @OutputUnitType final int type, @Nullable final TransitionId transitionId, @Nullable final RenderTreeNode parent) {<NEW_LINE>if (parent != null) {<NEW_LINE>parent.... | unit, absoluteBounds, type, transitionId); |
1,855,517 | public static boolean isPoolSystemPool(String poolName) {<NEW_LINE>Pattern <MASK><NEW_LINE>Matcher matcher = pattern.matcher(poolName);<NEW_LINE>// If the pool name does not contain #, return false<NEW_LINE>if (!matcher.find()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>matcher.reset();<NEW_LINE>String moduleNameFrom... | pattern = Pattern.compile("#"); |
182,521 | public String buildAppConfig(DeployAppBuildAppConfigReq request, String operator) {<NEW_LINE>AppPackageDO appPackageDO = appPackageRepository.getByCondition(AppPackageQueryCondition.builder().id(request.getAppPackageId()).withBlobs(false).build());<NEW_LINE>DeployAppSchema deployAppSchema = new DeployAppSchema();<NEW_L... | (getParameterValue(componentBinder, schema)); |
849,543 | public com.amazonaws.services.codecommit.model.InvalidApprovalRuleNameException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.codecommit.model.InvalidApprovalRuleNameException invalidApprovalRuleNameException = new com.amazonaws.services.codecommit.model.Inval... | String currentParentElement = context.getCurrentParentElement(); |
1,333,694 | public DeleteDeploymentGroupResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DeleteDeploymentGroupResult deleteDeploymentGroupResult = new DeleteDeploymentGroupResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentE... | JsonToken token = context.getCurrentToken(); |
1,804,443 | public static void main(String[] args) {<NEW_LINE>final String USAGE = "\n" + "Usage:\n" + " <keyId> \n\n" + "Where:\n" + " keyId - a key id value to use to encrypt/decrypt the data (for example, xxxxxbcd-12ab-34cd-56ef-1234567890ab). \n\n";<NEW_LINE>if (args.length != 1) {<NEW_LINE><MASK><NEW_LINE>System.exit(1)... | System.out.println(USAGE); |
378,947 | public static DescribePrivilegesResponse unmarshall(DescribePrivilegesResponse describePrivilegesResponse, UnmarshallerContext context) {<NEW_LINE>describePrivilegesResponse.setRequestId(context.stringValue("DescribePrivilegesResponse.RequestId"));<NEW_LINE>describePrivilegesResponse.setPageSize(context.integerValue("D... | ("DescribePrivilegesResponse.Items[" + i + "].Operation")); |
1,086,118 | private void dumpHeapReferences(J9JavaVMPointer vm, J9ObjectPointer targetObject, PrintStream out) throws CorruptDataException {<NEW_LINE>if (GCExtensions.isVLHGC()) {<NEW_LINE><MASK><NEW_LINE>table.row("object (!j9object)", "field (!j9object)", "!mm_heapregiondescriptorvlhgc", "AC (type)");<NEW_LINE>GCObjectHeapIterat... | Table table = new Table("On Heap References"); |
1,325,818 | public void onTrainingEnd(Trainer trainer) {<NEW_LINE>Metrics metrics = trainer.getMetrics();<NEW_LINE>if (metrics == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>float p50;<NEW_LINE>float p90;<NEW_LINE>if (metrics.hasMetric("train")) {<NEW_LINE>// possible no train metrics if only one iteration is executed<NEW_LINE>p5... | ().longValue() / 1_000_000f; |
773,913 | public final String createURI(final String[] values, final int offset, final int length) {<NEW_LINE>TemplateValueStrategy ns = new TemplateValueStrategy() {<NEW_LINE><NEW_LINE>private final int lengthPlusOffset = length + offset;<NEW_LINE><NEW_LINE>private int v = offset;<NEW_LINE><NEW_LINE>private final Map<String, St... | resolveTemplate(normalizedTemplate, sb, ns); |
1,355,840 | private List<CodeLens> provideHighlightHints(TextDocument doc, StringLiteral node, SpringProcessLiveData[] processLiveData) {<NEW_LINE>ASTNode exactNode = getExactNode(node);<NEW_LINE>if (exactNode != null) {<NEW_LINE>Map<String, List<LocalRange>> <MASK><NEW_LINE>// Get the escaped value that INCLUDES the quotes as we ... | propertiesWithRanges = new HashMap<>(); |
1,303,994 | public SegmentCommitter createSegmentCommitter(boolean isSplitCommit, SegmentCompletionProtocol.Request.Params params, String controllerVipUrl) throws URISyntaxException {<NEW_LINE>if (!isSplitCommit) {<NEW_LINE>return new DefaultSegmentCommitter(_logger, _protocolHandler, params);<NEW_LINE>}<NEW_LINE>SegmentUploader s... | _logger, _protocolHandler, params, segmentUploader); |
657,713 | public InstrumentableNode materializeInstrumentableNodes(Set<Class<? extends Tag>> materializedTags) {<NEW_LINE>if (materializationNeeded() && materializedTags.contains(WriteElementTag.class)) {<NEW_LINE>JavaScriptNode clonedTarget = targetNode == null || targetNode.hasSourceSection() ? targetNode : JSTaggedExecutionNo... | clonedValue = cloneUninitialized(valueNode, materializedTags); |
1,288,434 | private LambdaExpression cachedResolvedCopy(TypeBinding targetType, boolean anyTargetOk, boolean requireExceptionAnalysis, InferenceContext18 context, Scope outerScope) {<NEW_LINE>if (this.committed && outerScope instanceof BlockScope) {<NEW_LINE>this.enclosingScope = (BlockScope) outerScope;<NEW_LINE>// trust the resu... | copy.setExpressionContext(this.expressionContext); |
1,536,200 | private void initViews(View playerUi) {<NEW_LINE>panel = playerUi.<MASK><NEW_LINE>progressbar = playerUi.findViewById(R.id.progressbar);<NEW_LINE>videoCurrentTimeTextView = playerUi.findViewById(R.id.video_current_time);<NEW_LINE>videoDurationTextView = playerUi.findViewById(R.id.video_duration);<NEW_LINE>Button playPa... | findViewById(R.id.panel); |
1,008,546 | final BatchGetTracesResult executeBatchGetTraces(BatchGetTracesRequest batchGetTracesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchGetTracesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
765,697 | public void onRefreshStarted() {<NEW_LINE>new Thread(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>Twitter twitter = Utils.getTwitter(context, settings);<NEW_LINE>paging.setPage(1);<NEW_LINE>ResponseList<twitter4j.Status> lists = twitter.getUserListStatuses(listId, p... | spinner.setVisibility(View.GONE); |
320,316 | private static Object paramToDataObject(Object param, Class<?> paramClass, ProtocolVersion version) {<NEW_LINE>if (param == null) {<NEW_LINE>return null;<NEW_LINE>} else if (param instanceof ComplexResourceKey) {<NEW_LINE>return ((ComplexResourceKey) param).toDataMap();<NEW_LINE>} else if (version.compareTo(AllProtocol... | DataTemplateUtil.stringify(param, paramClass); |
1,564,064 | static byte[] deObfuscateNetworkHeader(final byte[] pdu, final byte[] ivIndex, final byte[] privacyKey) {<NEW_LINE>final ByteBuffer obfuscatedNetworkBuffer = ByteBuffer.allocate(6);<NEW_LINE>obfuscatedNetworkBuffer.order(ByteOrder.BIG_ENDIAN);<NEW_LINE>obfuscatedNetworkBuffer.<MASK><NEW_LINE>final byte[] obfuscatedData... | put(pdu, 2, 6); |
248,584 | private IRubyObject arrayRange(final ThreadContext context, final RubyRange range) {<NEW_LINE>final Object array = getObject();<NEW_LINE>final int arrayLength = Array.getLength(array);<NEW_LINE>final IRubyObject rFirst = range.first(context);<NEW_LINE>final IRubyObject rLast = range.last(context);<NEW_LINE>if (rFirst i... | >= 0 ? last : arrayLength + last; |
1,138,498 | public String[] split(String text) {<NEW_LINE>for (Pattern regexp : CONTRACTIONS2) text = regexp.matcher(text).replaceAll("$1 $2");<NEW_LINE>for (Pattern regexp : CONTRACTIONS3) text = regexp.matcher(text).replaceAll("$1 $2 $3");<NEW_LINE>text = DELIMITERS[0].matcher(text).replaceAll(" $1 ");<NEW_LINE>text = DELIMITERS... | (text).replaceAll(" . "); |
164,111 | public StoredSessionAttempt insertAttempt(long sessionId, int projId, SessionAttempt attempt) throws ResourceConflictException, ResourceNotFoundException {<NEW_LINE>long attemptId = catchForeignKeyNotFound(() -> catchConflict(() -> dao.insertAttempt(siteId, projId, sessionId, attempt.getRetryAttemptName().or(DEFAULT_AT... | getWorkflowDefinitionId().orNull()); |
1,216,747 | public static void performTypingAction(Editor editor, char c) {<NEW_LINE>EditorActionManager actionManager = EditorActionManager.getInstance();<NEW_LINE>if (c == BACKSPACE_FAKE_CHAR) {<NEW_LINE>EditorActionHandler actionHandler = actionManager.getActionHandler(IdeActions.ACTION_EDITOR_BACKSPACE);<NEW_LINE>actionHandler... | actionManager.getActionHandler(IdeActions.ACTION_EDITOR_SPLIT); |
613,337 | protected Map readGenericMap(SimpleXMLParserDocumentNode node) throws TOTorrentException {<NEW_LINE>SimpleXMLParserDocumentAttribute <MASK><NEW_LINE>if (bk != null && bk.getValue().equalsIgnoreCase("true")) {<NEW_LINE>Map res = new ByteEncodedKeyHashMap<>();<NEW_LINE>SimpleXMLParserDocumentNode[] kids = node.getChildre... | bk = node.getAttribute("byte_keys"); |
1,167,073 | public String decodeString(KrollDict args) {<NEW_LINE>if (!args.containsKey(TiC.PROPERTY_SOURCE) || args.get(TiC.PROPERTY_SOURCE) == null) {<NEW_LINE>throw new IllegalArgumentException("source was not specified for decodeString");<NEW_LINE>}<NEW_LINE>BufferProxy src = (BufferProxy) args.get(TiC.PROPERTY_SOURCE);<NEW_LI... | buffer, position, length, charset); |
1,212,123 | private void writeAudience(JsonGenerator gen, Map.Entry<String, Object> e) throws IOException {<NEW_LINE>if (e.getValue() instanceof String) {<NEW_LINE>gen.writeFieldName(e.getKey());<NEW_LINE>gen.writeString((String) e.getValue());<NEW_LINE>} else {<NEW_LINE>List<String> audArray = new ArrayList<>();<NEW_LINE>if (e.ge... | .add((String) aud); |
1,591,345 | public void marshall(WeeklyAutoScalingSchedule weeklyAutoScalingSchedule, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (weeklyAutoScalingSchedule == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(weeklyAut... | weeklyAutoScalingSchedule.getThursday(), THURSDAY_BINDING); |
537,144 | public Resource<Bitmap> transform(Resource<Bitmap> resource, int outWidth, int outHeight) {<NEW_LINE>Bitmap source = resource.get();<NEW_LINE>int width = source.getWidth();<NEW_LINE>int height = source.getHeight();<NEW_LINE>int scaledWidth = width / mSampling;<NEW_LINE>int scaledHeight = height / mSampling;<NEW_LINE>Bi... | blur(bitmap, mRadius, true); |
867,262 | public static void signedSub(final long offset, final ITranslationEnvironment environment, final List<ReilInstruction> instructions, final String firstOperand, final String secondOperand, final String resultOperand, final String trueResult) {<NEW_LINE>final <MASK><NEW_LINE>final String twoComplementfirstOperand = envir... | String tmpResult = environment.getNextVariableString(); |
873,341 | public JsonError processHttpErrorEncounteredResponse(@NonNull final Exchange exchange) {<NEW_LINE>final Exception exception = CoalesceUtil.coalesce(exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class), exchange.getIn().getHeader(Exchange.EXCEPTION_CAUGHT, Exception.class));<NEW_LINE>if (!(exception instance... | .getName() : null)); |
1,600,765 | protected void addOverlays() {<NEW_LINE>super.addOverlays();<NEW_LINE>final Bitmap ok = ((BitmapDrawable) getResources().getDrawable(R.drawable<MASK><NEW_LINE>final Bitmap ko = ((BitmapDrawable) getResources().getDrawable(R.drawable.twotone_warning_black_36)).getBitmap();<NEW_LINE>mMapView.getOverlayManager().add(new O... | .baseline_done_outline_black_36)).getBitmap(); |
1,429,240 | private MDDOrder createDistributionOrder(MPPMRP mrp) {<NEW_LINE>MLocator locatorFrom = MLocator.get(mrp.getCtx(), getLocatorId());<NEW_LINE>MLocator locatorTo = MLocator.get(mrp.getCtx(), getLocatorToId());<NEW_LINE>int docTypeId = MPPMRP.getDocType(getCtx(), MDocType.DOCBASETYPE_DistributionOrder, locatorTo.getAD_Org_... | order.setDocAction(MDDOrder.DOCACTION_Complete); |
664,852 | static void c_3_2() throws Exception {<NEW_LINE>BatchOperator<?> train_data = new AkSourceBatchOp().setFilePath(DATA_DIR + TRAIN_FILE);<NEW_LINE>BatchOperator<?> test_data = new AkSourceBatchOp(<MASK><NEW_LINE>Pipeline pipeline = new Pipeline().add(new FeatureHasher().setSelectedCols(FEATURE_COL_NAMES).setCategoricalCo... | ).setFilePath(DATA_DIR + TEST_FILE); |
1,766,211 | private void purgePartialColumns() {<NEW_LINE>for (SystemInfo system : sheet.getSystems()) {<NEW_LINE>final List<BarColumn> columns = columnMap.get(system);<NEW_LINE>// Start column (or -1)<NEW_LINE>final int iStart = getStartColumnIndex(columns);<NEW_LINE>for (int i = iStart + 1; i < columns.size(); i++) {<NEW_LINE>fi... | logger.info("VIP part of partial column {}", peak); |
807,152 | public void windowStateChanged(WindowEvent e) {<NEW_LINE>// The Customize Window was closed<NEW_LINE>if (e.getID() == WindowEvent.WINDOW_CLOSED && m_reportEngine != null) {<NEW_LINE>setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));<NEW_LINE>log.info("Re-read PrintFormat");<NEW_LINE>int AD_PrintFormat_ID = m_re... | getCtx(), AD_PrintFormat_ID, true); |
1,385,395 | public static void main(String[] args) throws IOException {<NEW_LINE>// Use the factory to get Cryptopia exchange API using default settings<NEW_LINE>Exchange cryptopia = ExchangeFactory.INSTANCE.createExchange(CryptopiaExchange.class);<NEW_LINE>// Interested in the public market data feed (no authentication)<NEW_LINE>... | add(limitOrder.getOriginalAmount()); |
156,754 | protected MultiGetResult<K, V> do_GET_ALL(Set<? extends K> keys) {<NEW_LINE>ArrayList<K> keyList = new ArrayList<K>(keys.size());<NEW_LINE>ArrayList<Object> newKeyList = new ArrayList<Object>(keys.size());<NEW_LINE>keys.stream().forEach((k) -> {<NEW_LINE>Object newKey = buildKey(k);<NEW_LINE>keyList.add(k);<NEW_LINE>ne... | holder = innerResultMap.get(newKey); |
78,566 | final PutResourcePolicyResult executePutResourcePolicy(PutResourcePolicyRequest putResourcePolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putResourcePolicyRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PutResourcePolicyReq... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
96,760 | final CreateDeliverabilityTestReportResult executeCreateDeliverabilityTestReport(CreateDeliverabilityTestReportRequest createDeliverabilityTestReportRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createDeliverabilityTestReportRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = execu... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,840,108 | public static void loadChapters(Playable playable, Context context) {<NEW_LINE>if (playable.getChapters() != null) {<NEW_LINE>// Already loaded<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<Chapter> chaptersFromDatabase = null;<NEW_LINE>List<Chapter> chaptersFromPodcastIndex = null;<NEW_LINE>if (playable instanceof FeedMed... | loadChaptersOfFeedItem(feedMedia.getItem()); |
1,120,619 | public String encodePadded(byte[] input) {<NEW_LINE>Preconditions.checkArgument(input.length % 3 == 0, "input needs to be padded to a multiple of three");<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>for (int i = 0; i < input.length; i += 3) {<NEW_LINE>byte b1 = input[i];<NEW_LINE>byte <MASK><NEW_LINE>byte... | b2 = input[i + 1]; |
1,365,315 | private GridLocationMap<FGVertex, FGEdge> convertToGrid(FGTempGraph jGraph, LayoutModel<FGVertex> layoutModel, LayoutAlgorithm<FGVertex> layoutAlgorithm) throws CancelledException {<NEW_LINE>GridLocationMap<FGVertex, FGEdge> grid = new GridLocationMap<>();<NEW_LINE>Map<Double, Integer> columns = new TreeMap<>();<NEW_LI... | point = layoutModel.get(fgVertex); |
1,433,427 | protected String normalizeBuildTargetString(String target) {<NEW_LINE>if (shouldRelativize) {<NEW_LINE>target = addPackagePathToRelativeBuildTarget(rootRelativePackage, target);<NEW_LINE>}<NEW_LINE>// Check and save the cell name<NEW_LINE>BuckCellArg arg = BuckCellArg.of(target);<NEW_LINE>target = arg.getArg();<NEW_LIN... | += ":" + nameAfterColon.get(); |
955,107 | private void drawShapes() {<NEW_LINE>g2.setColor(bgColor);<NEW_LINE>g2.setComposite(composites[1]);<NEW_LINE>for (StyleShape s : shapes) {<NEW_LINE>specialBgColor = !s.getBgColor().equals(bgColor);<NEW_LINE>if (specialBgColor) {<NEW_LINE>g2.setColor(s.getBgColor());<NEW_LINE>g2.setComposite(AlphaComposite.getInstance(A... | .getFontHandler().resetFontSize(); |
719,704 | private void addSendBsqGroup() {<NEW_LINE>TitledGroupBg titledGroupBg = addTitledGroupBg(root, ++gridRow, 2, Res.get("dao.wallet.send.sendFunds"), Layout.GROUP_DISTANCE);<NEW_LINE>GridPane.setColumnSpan(titledGroupBg, 3);<NEW_LINE>receiversAddressInputTextField = addInputTextField(root, gridRow, Res.get("dao.wallet.sen... | GridPane.setColumnSpan(amountInputTextField, 3); |
1,430,039 | public Particle read(ByteBuf buffer) throws Exception {<NEW_LINE>int type = Type.VAR_INT.readPrimitive(buffer);<NEW_LINE>Particle particle = new Particle(type);<NEW_LINE>switch(type) {<NEW_LINE>// Block / Falling Dust /<NEW_LINE>case 3:<NEW_LINE>case 20:<NEW_LINE>// Flat Block<NEW_LINE>particle.getArguments().add(new P... | VAR_INT.readPrimitive(buffer))); |
1,791,837 | // Searches for the pattern in the text starting at specified index<NEW_LINE>private int searchFromIndex(char[] text, int textStartIndex) {<NEW_LINE>char[] eligibleText;<NEW_LINE>if (textStartIndex != 0) {<NEW_LINE>if (text.length - textStartIndex < 0) {<NEW_LINE>// no match<NEW_LINE>return textStartIndex + text.length... | int offset = textIndex - patternLength + 1; |
736,330 | /* ======================================================================<NEW_LINE>* ============================================================ query ===<NEW_LINE>* ====================================================================== */<NEW_LINE>@Override<NEW_LINE>public Cursor query(Uri uri, String[] projection, S... | selectionArgs, groupBy, null, sortOrder); |
274,439 | public void widgetSelected(SelectionEvent event) {<NEW_LINE>TableItem[] selection = buddy_table.getSelection();<NEW_LINE>String str = readFromClipboard();<NEW_LINE>if (str != null) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>for (int i = 0; i < selection.length; i++) {<NEW_LINE>BuddyPluginBuddy buddy = ... | selection[i].getData(); |
1,712,427 | private static POInfoColumn retrievePOInfoColumn(@NonNull final ResultSet rs) throws SQLException {<NEW_LINE>final String m_TableName = rs.getString(I_AD_Table.COLUMNNAME_TableName);<NEW_LINE>final String ColumnName = rs.getString(2);<NEW_LINE>final int AD_Reference_ID = rs.getInt(3);<NEW_LINE>final boolean IsMandatory... | Name = rs.getString(7); |
1,645,189 | public static void main(String[] args) {<NEW_LINE>final String usage = "\n" + "Usage:\n" + " <indexId> <dataSourceId> \n\n" + "Where:\n" + " indexId - The id value of the index.\n" + " dataSourceId - The id value of the data source.\n";<NEW_LINE>if (args.length != 2) {<NEW_LINE>System.out.println(usage);<NEW_L... | Region.US_EAST_1).build(); |
550,980 | public static FilterSpecCompiledDesc makeFilterSpec(EventType eventType, String eventTypeName, List<ExprNode> filterExpessions, PropertyEvalSpec optionalPropertyEvalSpec, LinkedHashMap<String, Pair<EventType, String>> taggedEventTypes, LinkedHashMap<String, Pair<EventType, String>> arrayEventTypes, LinkedHashSet<String... | taggedEventTypes, arrayEventTypes, statementRawInfo, services); |
1,425,247 | public JsonResult execute() {<NEW_LINE>String entityType = getNonNullRequestParamValue(Const.ParamsNames.ENTITY_TYPE);<NEW_LINE>if (entityType.equals(Const.EntityType.INSTRUCTOR)) {<NEW_LINE>return handleInstructorReq();<NEW_LINE>}<NEW_LINE>// Default path for student and admin<NEW_LINE>String courseId = getNonNullRequ... | courseId, userInfo.getId()); |
38,082 | // snippet-start:[cloudfront.java2.function.main]<NEW_LINE>public static String createNewFunction(CloudFrontClient cloudFrontClient, String functionName, String filePath) {<NEW_LINE>try {<NEW_LINE>InputStream is = new FileInputStream(filePath);<NEW_LINE>SdkBytes functionCode = SdkBytes.fromInputStream(is);<NEW_LINE>Fun... | functionConfig(config).build(); |
878,546 | private static IkePhase1Policy toIkePhase1Policy(IkePolicy ikePolicy, ImmutableSortedMap.Builder<String, IkePhase1Key> ikePhase1Keys) {<NEW_LINE><MASK><NEW_LINE>IkePhase1Policy ikePhase1Policy = new IkePhase1Policy(name);<NEW_LINE>// pre-shared-key<NEW_LINE>IkePhase1Key ikePhase1Key = new IkePhase1Key();<NEW_LINE>ikePh... | String name = ikePolicy.getName(); |
1,032,715 | public void refToken(Token idAssign, Token t, Token label, Token args, boolean inverted, int autoGenType, boolean lastInRule) {<NEW_LINE>if (grammar instanceof LexerGrammar) {<NEW_LINE>// In lexer, token references are really rule references<NEW_LINE>if (autoGenType == GrammarElement.AUTO_GEN_CARET) {<NEW_LINE>tool.err... | grammar, t, inverted, autoGenType); |
825,890 | private void expireScript(AeiObjects aeiObjects) throws Exception {<NEW_LINE>ExpireScriptResult expire = new ExpireScriptResult();<NEW_LINE>ScriptContext scriptContext = aeiObjects.scriptContext();<NEW_LINE>CompiledScript cs = aeiObjects.business().element().getCompiledScript(aeiObjects.getWork().getApplication(), aeiO... | getWork().setExpireTime(null); |
599,297 | private void layoutGridLines(CompositeSize columnWidths, CompositeSize rowHeights, double x, double y, double columnHeight, double rowWidth) {<NEW_LINE>if (!isGridLinesVisible()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!gridLines.getChildren().isEmpty()) {<NEW_LINE>gridLines.getChildren().clear();<NEW_LINE>}<NEW_LIN... | , linex + rowWidth, liney)); |
1,686,447 | private void dumpColor(PrintWriter out, String key, Color color) {<NEW_LINE>Color[<MASK><NEW_LINE>Color resolvedColor = resolveDerivedColor(key, color, retBaseColor);<NEW_LINE>if (resolvedColor != color && resolvedColor.getRGB() != color.getRGB()) {<NEW_LINE>if (!isIntelliJTheme) {<NEW_LINE>System.err.println("Key '" +... | ] retBaseColor = new Color[1]; |
569,187 | public ApiResponse<MediaFolder> mediaPutWithHttpInfo(String id, UpdateMediaFolderRequest updateMediaFolderRequest) throws ApiException {<NEW_LINE>Object localVarPostBody = updateMediaFolderRequest;<NEW_LINE>// verify the required parameter 'id' is set<NEW_LINE>if (id == null) {<NEW_LINE>throw new ApiException(400, "Mis... | throw new ApiException(400, "Missing the required parameter 'updateMediaFolderRequest' when calling mediaPut"); |
1,265,607 | public void reloadSubList() {<NEW_LINE>changedSubs.clear();<NEW_LINE>List<String> allSubs = UserSubscriptions.sort<MASK><NEW_LINE>// Check which subreddits are different<NEW_LINE>ColorPreferences colorPrefs = new ColorPreferences(SettingsSubreddit.this);<NEW_LINE>int defaultFont = colorPrefs.getFontStyle().getColor();<... | (UserSubscriptions.getAllUserSubreddits(this)); |
820,186 | /*<NEW_LINE>For the backward pass:<NEW_LINE>Given epsilon, the gradient at every activation node calculate the next set of gradients for the backward pass<NEW_LINE>Best practice is to modify in place.<NEW_LINE><NEW_LINE>Using the terminology,<NEW_LINE>in -> linear input to the activation node<NEW_LINE>out -> the out... | muli(2 / 3.0))); |
404,477 | static double[][] readErrorMatrix(String fileName, Index<String> tagIndex, boolean useLogProb) {<NEW_LINE>int numTags = tagIndex.size();<NEW_LINE>int matrixSize = numTags;<NEW_LINE>String[] matrixLines = new String[matrixSize];<NEW_LINE>try {<NEW_LINE>BufferedReader br = new BufferedReader(new InputStreamReader(new Fil... | (ArrayUtils.toString(matrix)); |
1,160,192 | private void updateShareIconsInFiles(OwnCloudClient client) {<NEW_LINE>RemoteOperationResult<ShareResponse> result;<NEW_LINE>// remote request<NEW_LINE>GetRemoteSharesForFileOperation operation = new GetRemoteSharesForFileOperation(mLocalFolder.getRemotePath(), true, true);<NEW_LINE>result = operation.execute(client);<... | getFileByPath(remoteShare.getPath()); |
454,028 | public boolean process(@Nonnull String path, @Nonnull FullHttpRequest request, @Nonnull ChannelHandlerContext context, @Nullable Map<String, Object> handlers) {<NEW_LINE>if (!(path.isEmpty() || (path.length() == 1 && path.charAt(0) == '/') || path.equalsIgnoreCase("/rpc2"))) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE... | context.channel(), request); |
1,150,108 | public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {<NEW_LINE>Class beanClass = (Class) in.readObject();<NEW_LINE>Class customizerClass = (Class) in.readObject();<NEW_LINE>if (customizerClass == null) {<NEW_LINE>_descriptor = new BeanDescriptor(beanClass);<NEW_LINE>} else {<NEW_LINE>_de... | String) in.readObject()); |
685,378 | private void checkFile(final ModelRepository modelRepository, final File file, final Kind kind) {<NEW_LINE>if (file != null) {<NEW_LINE>try {<NEW_LINE>synchronized (FolderObserver.class) {<NEW_LINE>if ((kind == ENTRY_CREATE || kind == ENTRY_MODIFY)) {<NEW_LINE>if (parsers.contains(getExtension(file.getName()))) {<NEW_L... | removeModel(file.getName()); |
1,806,505 | // /////////////////////////////////////////////////////////////////////////////////////////<NEW_LINE>// BsqBalanceListener<NEW_LINE>// /////////////////////////////////////////////////////////////////////////////////////////<NEW_LINE>@Override<NEW_LINE>public void onUpdateBalances(Coin availableBalance, Coin available... | (bsqFormatter.formatCoinWithCode(unlockingBondsBalance)); |
1,257,760 | public com.amazonaws.services.route53recoverycontrolconfig.model.ValidationException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.route53recoverycontrolconfig.model.ValidationException validationException = new com.amazonaws.services.<MASK><NEW_LINE>int origi... | route53recoverycontrolconfig.model.ValidationException(null); |
321,866 | public boolean run(NotificationEvent event) {<NEW_LINE>AbstractSystemInvoker invoker = this.getSystemInvokerMgr().getSystemInvoker(InvokerType.HTTP);<NEW_LINE>UAVHttpMessage tmsg = new UAVHttpMessage();<NEW_LINE>tmsg.setIntent("ntfpush");<NEW_LINE>tmsg.putRequest("ntfevent", event.toJSONString());<NEW_LINE>String servi... | service, tmsg, Map.class); |
2,482 | private void renderCustomFill(Graphics2D g, Viewport viewport, Geometry gc, Layer layer) throws Exception {<NEW_LINE>int numGeom = gc.getNumGeometries();<NEW_LINE>boolean isLinear = gc.getDimension() == 1;<NEW_LINE>Color clrBase = layer.getGeometryStyle().getFillColor();<NEW_LINE>if (isLinear) {<NEW_LINE>clrBase = laye... | getFillType(), clrBase, numGeom); |
1,382,416 | private String createColumnExpression(Column col) {<NEW_LINE>if (col.typeString().equals("NUMERIC")) {<NEW_LINE>return "CAST(" + "t.`" + col.name() + "`" <MASK><NEW_LINE>}<NEW_LINE>if (col.typeString().equals("JSON")) {<NEW_LINE>return "TO_JSON_STRING(" + "t.`" + col.name() + "`" + ") AS " + col.name();<NEW_LINE>}<NEW_... | + " AS STRING) AS " + col.name(); |
1,419,364 | public void endTessellation() {<NEW_LINE>if (root.tessUpdate) {<NEW_LINE>if (root.tessKind == TRIANGLES && hasPolys) {<NEW_LINE>pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPolyVertex.glId);<NEW_LINE>tessGeo.finalPolyVerticesBuffer(firstModifiedPolyVertex, lastModifiedPolyVertex);<NEW_LINE>pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPo... | PGL.ARRAY_BUFFER, bufPolySpecular.glId); |
285,595 | // SystemListener:reshape<NEW_LINE>@Override<NEW_LINE>public void onSurfaceChanged(GL10 gl, int width, int height) {<NEW_LINE>if (logger.isLoggable(Level.FINE)) {<NEW_LINE>logger.log(Level.FINE, "GL Surface changed, width: {0} height: {1}", new Object[] { width, height });<NEW_LINE>}<NEW_LINE>// update the application ... | settings.setResolution(width, height); |
773,423 | private void handleAlphaOnTitle(float percentage) {<NEW_LINE>if (percentage >= PERCENTAGE_TO_HIDE_TITLE_DETAILS) {<NEW_LINE>if (mIsTheTitleContainerVisible) {<NEW_LINE>animate(mAppBar.findViewById(R.id.toolbar_content<MASK><NEW_LINE>animate(mToolBar.findViewById(R.id.toolbar_title), ALPHA_ANIMATIONS_DURATION, View.VISI... | ), ALPHA_ANIMATIONS_DURATION, View.INVISIBLE); |
911,375 | public List<IssuesDao> list(IssuesRequest request) {<NEW_LINE>request.setOrders(ServiceUtils.getDefaultOrderByField(request.getOrders(), "create_time"));<NEW_LINE>List<IssuesDao> issues = extIssuesMapper.getIssues(request);<NEW_LINE>Map<String, Set<String<MASK><NEW_LINE>Map<String, User> userMap = getUserMap(issues);<N... | >> caseSetMap = getCaseSetMap(issues); |
1,296,551 | public List<Pair<ExecutionReference, ExecutableFlow>> handle(final ResultSet rs) throws SQLException {<NEW_LINE>if (!rs.next()) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>final List<Pair<ExecutionReference, ExecutableFlow>> execFlows = new ArrayList<>();<NEW_LINE>do {<NEW_LINE>final int <MASK><NEW_L... | id = rs.getInt(1); |
711,515 | private void showInputDialog(ActionEvent event) {<NEW_LINE>EscapeDialog messageDialog = new // $NON-NLS-1$<NEW_LINE>EscapeDialog(// $NON-NLS-1$<NEW_LINE>getParentFrame(event), JMeterUtils.getResString("curl_import"), false);<NEW_LINE><MASK><NEW_LINE>contentPane.setLayout(new BorderLayout());<NEW_LINE>statusText = new J... | Container contentPane = messageDialog.getContentPane(); |
821,800 | private boolean checkChange(CompilationController javac, PositionBounds span) throws IOException, BadLocationException {<NEW_LINE>final int begin = span.getBegin().getOffset();<NEW_LINE>final Trees trees = javac.getTrees();<NEW_LINE>TreePath path = javac.getTreeUtilities().pathFor(begin + 1);<NEW_LINE>if (path == null)... | element, javac.getClasspathInfo()); |
857,978 | public void createCertificateIssuerCodeSnippets() {<NEW_LINE>CertificateAsyncClient certificateAsyncClient = getCertificateAsyncClient();<NEW_LINE>// BEGIN: com.azure.security.keyvault.certificates.CertificateAsyncClient.createIssuer#CertificateIssuer<NEW_LINE>CertificateIssuer issuer = new CertificateIssuer("issuerNam... | ("keyvaultuser").setPassword("temp2"); |
1,763,658 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>// Check if logged in<NEW_LINE>if (!ApplicationContext.getInstance().isLoggedIn()) {<NEW_LINE>startActivity(new Intent(this, LoginActivity.class));<NEW_LINE>finish();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Handle... | findViewById(R.id.progressBar); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.