Skip to content

Instantly share code, notes, and snippets.

View uphy's full-sized avatar
💭
I may be slow to respond.

Yuhi Ishikura uphy

💭
I may be slow to respond.
View GitHub Profile
import org.wso2.am.admin.clients.registry.ResourceAdminServiceClient;
import org.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminException;
import org.wso2.carbon.registry.info.stub.RegistryExceptionException;
import org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException;
import org.wso2.carbon.rest.api.stub.RestApiAdminAPIException;
import java.rmi.RemoteException;
public class ResourceAdminServiceClientSample {
@uphy
uphy / JavaFXDialog.java
Created January 4, 2017 06:25
How to develop KNIME node with JavaFX
package it.pkg;
import java.awt.BorderLayout;
import java.util.concurrent.Callable;
import java.util.concurrent.Semaphore;
import java.util.concurrent.atomic.AtomicReference;
import javax.swing.JPanel;
import org.knime.core.node.InvalidSettingsException;
/**
* Copyright (C) 2016 uphy.jp
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
@uphy
uphy / ExpandableListView.java
Last active June 2, 2023 20:54
JavaFX Expandable ListView
/**
* Copyright (C) 2015 uphy.jp
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@uphy
uphy / ProgressIndicatorPaneExample.java
Last active August 29, 2015 14:03
Add progress indicator feature to any JavaFX scene.While displaying progress indicator, it blocks all mouse events from user.
/**
* Copyright (C) 2014 uphy.jp
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@uphy
uphy / KeyBindingUtils.java
Last active October 14, 2015 13:23
Basic Emacs Keybindings with JavaFX
/**
* Copyright (C) 2015 uphy.jp
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
#!/bin/bash
#
# glassfish: Startup script for Glassfish Application Server.
#
# chkconfig: 3 80 05
# description: Startup script for domain1 of Glassfish Application Server.
export GLASSFISH_HOME=/usr/local/glassfish/glassfish
export GLASSFISH_OWNER=glassfish
export JAVA_HOME=/usr/local/java
@uphy
uphy / ClassLoaderAndObjectIOTest.java
Created December 15, 2013 03:21
How to read objects which are loaded dynamically.
package dct;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.ObjectStreamClass;
import java.net.URL;
@uphy
uphy / AndroidApplicationRestart.java
Last active August 20, 2021 03:00
Androidで、アクティビティではなく、アプリケーションレベルの再起動を行う。
final Intent i = new Intent(getApplicationContext(), ContentActivity.class);
final PendingIntent appStarter = PendingIntent.getActivity(getApplicationContext(), 0, i, 0);
final AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);
alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + 5000, appStarter);
Process.killProcess(Process.myPid());
@uphy
uphy / example-prms-jmatx.java
Created January 21, 2012 02:32
Example of prms and jmatx combination.
/**
* 関数を注入するテストを行います。
*
* @throws Exception テスト失敗
*/
@SuppressWarnings("boxing")
@Test
public void testInvocableWithInitialValue() throws Exception {
class A {