buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
private Entitlement createEntitlementByPool(Consumer consumer, Pool pool, Integer quantity) { // Attempt to create an entitlement: try { Entitlement e = poolManager.entitleByPool(consumer, pool, quantity); log.debug("Created entitlement: " + e); return e; ...
private Entitlement createEntitlementByPool(Consumer consumer, Pool pool, Integer quantity) { // Attempt to create an entitlement: try { Entitlement e = poolManager.entitleByPool(consumer, pool, quantity); log.debug("Created entitlement: " + e); return e; ...
protected Class resolveClass(final ObjectStreamClass clazz) throws IOException, ClassNotFoundException { String clazzName = clazz.getName(); if (clazzName.indexOf("$$") > 0) { clazzName = clazzName.substring(0, clazzName.indexOf("$$")); } try { ret...
protected Class resolveClass(final ObjectStreamClass clazz) throws IOException, ClassNotFoundException { String clazzName = clazz.getName(); if (clazzName.indexOf("$$") > 0) { clazzName = clazzName.substring(0, clazzName.indexOf("$$")); } try { ret...
public ProjectProperties readSonarConfiguration(IProject project) { LOG.debug("Rading configuration for project " + project.getName()); IScopeContext projectScope = new ProjectScope(project); IEclipsePreferences projectNode = projectScope.getNode(SonarCorePlugin.PLUGIN_ID); if (projectNode == null) { ...
public ProjectProperties readSonarConfiguration(IProject project) { LOG.debug("Reading configuration for project " + project.getName()); IScopeContext projectScope = new ProjectScope(project); IEclipsePreferences projectNode = projectScope.getNode(SonarCorePlugin.PLUGIN_ID); if (projectNode == null) {...
public IStatus visit(IResource resource, IProgressMonitor monitor) { try { int returnCode = 1;// Used in messge dialog. monitor.beginTask("Checkin in " + resource.getFullPath(), 100); StateCache cache = getCache(resource); final StateCache targetElement = getFinalTargetElement(cache); IStatus r...
public IStatus visit(IResource resource, IProgressMonitor monitor) { try { int returnCode = 1;// Used in messge dialog. monitor.beginTask("Checkin in " + resource.getFullPath(), 100); StateCache cache = getCache(resource); final StateCache targetElement = getFinalTargetElement(cache); IStatus r...
private Variation evalBoard(IBoard board, int total_depth, int depth, int alpha, int beta, Variation old_tree) { // whose move is it? Side side = board.getActiveColor(); int side_sign = Side.getSideSign(side); // generate moves Set<IMove> moves = board.getPossibleMoves(); // check for mate and stalem...
private Variation evalBoard(IBoard board, int total_depth, int depth, int alpha, int beta, Variation old_tree) { // whose move is it? Side side = board.getActiveColor(); int side_sign = Side.getSideSign(side); // generate moves Set<IMove> moves = board.getPossibleMoves(); // check for mate and stalem...
@Override public void mouseClicked(MouseEvent e) { if (e.getButton() != MouseEvent.BUTTON1) return; Node n = new Node(Main.map.mapView.getLatLon(e.getX(), e.getY())); if (n.coor.isOutSideWorld()) { JOptionPane.showMessageDialog(Main.parent,tr("Cannot add a node outside of the world.")); return; } ...
@Override public void mouseClicked(MouseEvent e) { if (e.getButton() != MouseEvent.BUTTON1) return; Node n = new Node(Main.map.mapView.getLatLon(e.getX(), e.getY())); if (n.coor.isOutSideWorld()) { JOptionPane.showMessageDialog(Main.parent,tr("Cannot add a node outside of the world.")); return; } ...
public void execute(EditorAdaptor editorAdaptor, TextRange region, ContentType contentType) { int startLine; int endLine; if(region == null) { //special case, recalculate 'current line' every time //(this is to ensure '.' always works on current line) int offset = editorAdaptor.getP...
public void execute(EditorAdaptor editorAdaptor, TextRange region, ContentType contentType) { int startLine; int endLine; if(region == null) { //special case, recalculate 'current line' every time //(this is to ensure '.' always works on current line) int offset = editorAdaptor.getP...
public State process(String input, TCP tcp, UDPSender us, Message udpMessage, Message tcpMessage, long timeEnteredState,boolean firstCall) { if(firstCall){ System.out.println("You are connected to a server.\nType :update to try to bind your name to your ip.\nType :query <username> to ask the server for the ip of ...
public State process(String input, TCP tcp, UDPSender us, Message udpMessage, Message tcpMessage, long timeEnteredState,boolean firstCall) { if(firstCall){ System.out.println("You are connected to a server.\nType :update to try to bind your name to your ip.\nType :query <username> to ask the server for the ip of ...
public HttpRequest getRequest() throws IOException { String httpMethod = (String) msgContext.getProperty(Constants.Configuration.HTTP_METHOD); if (httpMethod == null) { httpMethod = "POST"; } endpointURLPrefix = (String) msgContext.getProperty(NhttpConstants.ENDPOINT_PRE...
public HttpRequest getRequest() throws IOException { String httpMethod = (String) msgContext.getProperty(Constants.Configuration.HTTP_METHOD); if (httpMethod == null) { httpMethod = "POST"; } endpointURLPrefix = (String) msgContext.getProperty(NhttpConstants.ENDPOINT_PRE...
private static void convert(Ctx ctx, YType given, YType argType) { given = given.deref(); argType = argType.deref(); String descr = argType.javaType == null ? "" : argType.javaType.description; if (argType.type == YetiType.JAVA_ARRAY && given.type ...
private static void convert(Ctx ctx, YType given, YType argType) { given = given.deref(); argType = argType.deref(); String descr = argType.javaType == null ? "" : argType.javaType.description; if (argType.type == YetiType.JAVA_ARRAY && given.type ...
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.setIntegerProperty("splashscreen", R.drawable.splash); super.loadUrl("file:///android_asset/www/views/index.html", 3000); }
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.setIntegerProperty("splashscreen", R.drawable.splash); super.setIntegerProperty("loadUrlTimeoutValue", 10000); super.loadUrl("file:///android_asset/www/views/index.html", 5000); }
public FileSystemProvider(CollectorConfig collectorConfig) throws IOException { String hfsHost = collectorConfig.getHfsHost(); Configuration hadoopConfig = new Configuration(); if (hfsHost.isEmpty()) { // Local filesystem, for testing hadoopConfig.set("fs.default...
public FileSystemProvider(CollectorConfig collectorConfig) throws IOException { String hfsHost = collectorConfig.getHfsHost(); Configuration hadoopConfig = new Configuration(); if (hfsHost.isEmpty()) { // Local filesystem, for testing hadoopConfig.set("fs.default...
public void recieveData(JSONObject data, ActionType actionType) { try{ Ids ids = new Ids(); if(data.has(UID) && data.get(UID).equals("null")) ids.setGlobalId(data.getLong(UID)); String title = null; if(data.has(TITLE)) title = data.getString(TITLE); switch (actionType) { case CREATE:...
public void recieveData(JSONObject data, ActionType actionType) { try{ Ids ids = new Ids(); if(data.has(UID) && !data.get(UID).equals(null)) ids.setGlobalId(data.getLong(UID)); String title = null; if(data.has(TITLE)) title = data.getString(TITLE); switch (actionType) { case CREATE: ...
public void test() throws Exception { // Import a project with bad pom.xml IProject project = createExisting("markerTest", "projects/markers"); waitForJobsToComplete(); assertNotNull("Expected not null project", project); IMavenProjectFacade facade = MavenPlugin.getDefault().getMavenProjectManager...
public void test() throws Exception { // Import a project with bad pom.xml IProject project = createExisting("markerTest", "projects/markers"); waitForJobsToComplete(); assertNotNull("Expected not null project", project); IMavenProjectFacade facade = MavenPlugin.getDefault().getMavenProjectManager...
protected void onScrollYOffsetChanged(int offset) { if (this.isIgnoreYOffsetChange) { return; } int startIndex = Math.max( 0, (-offset)/this.childRowHeight - 5); int count = this.itemSource.countItems(); int itemsListSize = this.itemsList.size(); if (count > itemsListSize) { startIndex = Math....
protected void onScrollYOffsetChanged(int offset) { if (this.isIgnoreYOffsetChange) { return; } int count = this.itemSource.countItems(); int itemsListSize = this.itemsList.size(); if (count <= itemsListSize) { return; } int startIndex = Math.max( 0, (-offset)/this.childRowHeight - 5); if (...
public void fillLayout(final SipProfile account) { super.fillLayout(account); //Override titles accountDisplayName.setTitle(R.string.w_sipgate_display_name); accountDisplayName.setDialogTitle(R.string.w_sipgate_display_name); accountServer.setTitle(R.string.w_common_server); accountServer.setDialogTitle(R....
public void fillLayout(final SipProfile account) { super.fillLayout(account); //Override titles accountDisplayName.setTitle(R.string.w_sipgate_display_name); accountDisplayName.setDialogTitle(R.string.w_sipgate_display_name); accountServer.setTitle(R.string.w_common_server); accountServer.setDialogTitle(R....
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String userEmail = (String) req.getSession().getAttribute("email"); if(userEmail == null) { req.setAttribute("msgClass", Constants.MSG_CSS_ERROR); req.setAttribute("message", Utility.getCON...
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String userEmail = (String) req.getSession().getAttribute("email"); if(userEmail == null) { req.setAttribute("msgClass", Constants.MSG_CSS_ERROR); req.setAttribute("message", Utility.getCON...
public EncodedText encodeText(String text) { if (text == null || text.length() == 0) return NO_TEXT; String s = text.toUpperCase(Locale.ENGLISH); byte[] buf = new byte[2 * s.length() + 1]; int off = 0; for (char c : transliterate(s)) { if (c == ' ') { buf = put6(buf, off++, 0); } else if (c >...
public EncodedText encodeText(String text) { if (text == null || text.length() == 0) return NO_TEXT; String s = text.toUpperCase(Locale.ENGLISH); byte[] buf = new byte[2 * s.length() + 1]; int off = 0; for (char c : transliterate(s)) { if (c == ' ') { buf = put6(buf, off++, 0); } else if (c >...
public Event(){ this.id = UUID.randomUUID().toString().toLowerCase(); }
public Event(){ this.id = UUID.randomUUID().toString(); }
public static void initComponentDefaults(UIDefaults table) { Toolkit toolkit = Toolkit.getDefaultToolkit(); WindowsDesktopProperty defaultTextColor = new WindowsDesktopProperty("win.button.textColor", UIDefaultsLookup.get("controlText"), toolkit); WindowsDesktopProperty defaultBackgroundCol...
public static void initComponentDefaults(UIDefaults table) { Toolkit toolkit = Toolkit.getDefaultToolkit(); WindowsDesktopProperty defaultTextColor = new WindowsDesktopProperty("win.button.textColor", UIDefaultsLookup.get("controlText"), toolkit); WindowsDesktopProperty defaultBackgroundCol...
public GeoQuery(double centroidLatitude, double centroidLongitude, Float rangeInKm) { latRadians = Conversions.d2r(centroidLatitude); longRadians = Conversions.d2r(centroidLongitude); if (!( null == rangeInKm)) { throw new RuntimeException("please specify rangeInKilomete...
public GeoQuery(double centroidLatitude, double centroidLongitude, Float rangeInKm) { latRadians = Conversions.d2r(centroidLatitude); longRadians = Conversions.d2r(centroidLongitude); this.rangeInKm = rangeInKm; if (null == rangeInKm) { throw new RuntimeException...
public void run() { SwingUtilities.invokeLater(new Runnable() { public void run() { if (getNode() == null || Controller.getCurrentModeController().isBlocked()) { return; } getNode().acceptViewVisitor(new INodeViewVisitor() { public void visit(final INodeView nodeView) { if(! (...
public void run() { SwingUtilities.invokeLater(new Runnable() { public void run() { if (getNode() == null || Controller.getCurrentModeController().isBlocked()) { return; } getNode().acceptViewVisitor(new INodeViewVisitor() { public void visit(final INodeView nodeView) { if(! (...
public void newTurn() { if ((level == NOT_BUILT) && (type != CHURCH)) return; // Don't do anything if the building does not exist. if (type == SCHOOLHOUSE) { Iterator i = getUnitIterator(); while (i.hasNext()) { Unit teacher = (Unit) i.next(); ...
public void newTurn() { if ((level == NOT_BUILT) && (type != CHURCH)) return; // Don't do anything if the building does not exist. if (type == SCHOOLHOUSE) { Iterator i = getUnitIterator(); while (i.hasNext()) { Unit teacher = (Unit) i.next(); ...
public void run() { while (!isInterrupted()) { try { sleep(clock_interval); } catch (InterruptedException e) { break; // the main thread wants this thread to end } if (type==NORMAL_CLOCK || type==STOP_WATCH) c_millisecond +=clock_interval;...
public void run() { while (!isInterrupted()) { try { sleep(clock_interval); } catch (InterruptedException e) { break; // the main thread wants this thread to end } if (type==NORMAL_CLOCK || type==STOP_WATCH) c_millisecond +=clock_interval;...
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { SQLiteDatabase db = mOpenHelper.getReadableDatabase(); final int match = URI_MATCHER.match(uri); SQLiteQueryBuilder qb = new SQLiteQueryBuilder(); String limit ...
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { SQLiteDatabase db = mOpenHelper.getReadableDatabase(); final int match = URI_MATCHER.match(uri); SQLiteQueryBuilder qb = new SQLiteQueryBuilder(); String limit ...
public void end( String namespace, String name ) throws Exception { // Retrieve or construct the parameter values array Object parameters[] = null; if ( paramCount > 0 ) { parameters = getDigester().popParams(); if ( getDigester().getLogger().isTr...
public void end( String namespace, String name ) throws Exception { // Retrieve or construct the parameter values array Object[] parameters; if ( paramCount > 0 ) { parameters = getDigester().popParams(); if ( getDigester().getLogger().isTraceEnab...
public static boolean create( CommandSender player, String name, String nick, Boolean protect ) { if ( player instanceof Player ) if ( !PermissionManager.checkPerm( (Player) player, "cynichat.admin.create") ) return false; if ( DataManager.getChannel(name) != null ) { player.sendMessage("This channel ...
public static boolean create( CommandSender player, String name, String nick, Boolean protect ) { if ( player instanceof Player ) if ( !PermissionManager.checkPerm( (Player) player, "cynichat.admin.create") ) return false; if ( DataManager.getChannel(name) != null ) { player.sendMessage("This channel ...
public void runCommand(CommandSender sender, List<String> args) { int page = 1; if (args.size() > 0) { try { page = Integer.parseInt(args.get(0)); } catch (NumberFormatException e) { page = 1; } } List<Job> jobs = ma...
public void runCommand(CommandSender sender, List<String> args) { int page = 1; if (args.size() > 0) { try { page = Integer.parseInt(args.get(0)); } catch (NumberFormatException e) { page = 1; } } List<Job> jobs = ma...
public TikaResponse fire(TikaRequest request) throws TikaException, TException { String url = request.getUrl(); String urlDecoded = null; try { urlDecoded = java.net.URLDecoder.decode(url, "UTF-8"); } catch (UnsupportedEncodingException e) { return null; ...
public TikaResponse fire(TikaRequest request) throws TikaException, TException { String url = request.getUrl(); String urlDecoded = null; try { urlDecoded = java.net.URLDecoder.decode(url, "UTF-8"); } catch (UnsupportedEncodingException e) { return null; ...
public void handleEvent(SessionLoadedEvent event) { List<File> files = event.getLoadedSession().getAppFileListMap().get(SESSION_NAMESPACE); if (files == null) { return; } FilterPanelController filterPanelController = filterPanel.getController(); filterPanelController.reset(); TransformerPanelContr...
public void handleEvent(SessionLoadedEvent event) { List<File> files = event.getLoadedSession().getAppFileListMap().get(SESSION_NAMESPACE); if (files == null) { return; } FilterPanelController filterPanelController = filterPanel.getController(); filterPanelController.reset(); TransformerPanelContr...
public void testOptimizer() { DoubleDataset gaussian = Generic1DDatasetCreator.createGaussianDataset(); List<IdentifiedPeak> peaks = Generic1DFitter.parseDataDerivative(Generic1DDatasetCreator.xAxis, gaussian, Generic1DDatasetCreator.smoothing); IdentifiedPeak iniPeak = peaks.get(0); int[] start = { iniPeak ...
public void testOptimizer() { DoubleDataset gaussian = Generic1DDatasetCreator.createGaussianDataset(); List<IdentifiedPeak> peaks = Generic1DFitter.parseDataDerivative(Generic1DDatasetCreator.xAxis, gaussian, Generic1DDatasetCreator.smoothing); IdentifiedPeak iniPeak = peaks.get(0); int[] start = { iniPeak ...
public void testTika() throws Exception { Client clapClient = new Client("clap"); Representation rtfSample = clapClient.get( "clap://system/org/restlet/test/LuceneTestCase.rtf") .getEntity(); // rtfSample.write(System.out); // Prepare a SAX content h...
public void testTika() throws Exception { Client clapClient = new Client("clap"); Representation rtfSample = clapClient.get( "clap://system/org/restlet/test/LuceneTestCase.rtf") .getEntity(); // rtfSample.write(System.out); // Prepare a SAX content h...
public void join() { while (!isStopped()) { final CountDownLatch latch = new CountDownLatch(1); onStop(new Runnable() { public void run() { latch.countDown(); } }); try { latch.await(); ...
public void join() { final CountDownLatch latch = new CountDownLatch(1); onStop(new Runnable() { public void run() { latch.countDown(); } }); while (!isStopped()) { try { latch.await(); } catc...
public void processRender(WebuiRequestContext context) throws Exception { Locale locale = context.getParentAppRequestContext().getLocale() ; locale_ = locale ; //context.getJavascriptManager().loadScriptResource("eXo.cs.UIDateTimePicker"); String input_id = "DateTimePicker-"+context.getJavascriptM...
public void processRender(WebuiRequestContext context) throws Exception { Locale locale = context.getParentAppRequestContext().getLocale() ; locale_ = locale ; //context.getJavascriptManager().loadScriptResource("eXo.cs.UIDateTimePicker"); String input_id = "DateTimePicker-"+context.getJavascriptM...
public void runInternal(GeogitCLI cli) throws IOException { checkParameter(commits.size() == 2, "Two commit references must be provided"); ConsoleReader console = cli.getConsole(); GeoGIT geogit = cli.getGeogit(); Optional<RevObject> left = geogit.command(RevObjectParse.class).setR...
public void runInternal(GeogitCLI cli) throws IOException { checkParameter(commits.size() == 2, "Two commit references must be provided"); ConsoleReader console = cli.getConsole(); GeoGIT geogit = cli.getGeogit(); Optional<RevObject> left = geogit.command(RevObjectParse.class).setR...
private static void showHostsModifiedAlert(Context context) { final File ignoredFile = new File("/data/data/fq.router2/etc/hosts-modified-alert-ignored"); if (ignoredFile.exists()) { return; } new AlertDialog.Builder(context) .setIcon(android.R.drawable.ic...
private static void showHostsModifiedAlert(Context context) { final File ignoredFile = new File("/data/data/fq.router2/etc/hosts-modified-alert-ignored"); if (ignoredFile.exists()) { return; } new AlertDialog.Builder(context) .setIcon(android.R.drawable.ic...
public static String nicePrint(Document document) { StringBuilder output = new StringBuilder(); output.append("Entered text: ").append(document.getText()).append("\n\n"); if (document.getSentences() != null) { int cont = 0; for (Sentence sentence : document.getSentences()) { cont++; ...
public static String nicePrint(Document document) { StringBuilder output = new StringBuilder(); output.append("Entered text: ").append(document.getText()).append("\n\n"); if (document.getSentences() != null) { int cont = 0; for (Sentence sentence : document.getSentences()) { cont++; ...
public static String useGnuParser(final String[] commandLineArguments) throws ClassNotFoundException, SQLException{ final CommandLineParser cmdLineGnuParser = new GnuParser(); final Options gnuOptions = new CommandLineConstructors().getCommands(); CommandLine commandLine; String result = ""; ...
public static String useGnuParser(final String[] commandLineArguments) throws ClassNotFoundException, SQLException{ final CommandLineParser cmdLineGnuParser = new GnuParser(); final Options gnuOptions = new CommandLineConstructors().getCommands(); CommandLine commandLine; String result = ""; ...
public blockChangeLog(blockChangeLogCategory cat, EntityPlayer player, String block, int X, int Y, int Z, TileEntity te) { super(); SerialBlob teBlob = null; if (te != null) { NBTTagCompound nbt = new NBTTagCompound(); te.writeToNBT(nbt); try { teBlob = new SerialBlob(new JSONObject().put(te....
public blockChangeLog(blockChangeLogCategory cat, EntityPlayer player, String block, int X, int Y, int Z, TileEntity te) { super(); SerialBlob teBlob = null; if (te != null) { NBTTagCompound nbt = new NBTTagCompound(); te.writeToNBT(nbt); try { teBlob = new SerialBlob(new JSONObject().put(te....
public void save(){ Topic topic = getModel(Topic.class); topic.set("userID", getSessionAttr("userID")).set("topicID", null); Post post = getModel(Post.class); post.set("userID", getSessionAttr("userID")); topic.save(post); redirect("/post/" + topic.getInt("id")); ...
public void save(){ Topic topic = getModel(Topic.class); topic.set("userID", getSessionAttr("userID")); Post post = getModel(Post.class); post.set("userID", getSessionAttr("userID")); topic.save(post); redirect("/post/" + topic.getInt("id")); }
public List<Goal> goals(Job job) { List<Goal> superGoals = super.goals(job); ArrayList<Goal> goals = new ArrayList<Goal>(superGoals.size()+10); for (Goal g : superGoals) { if (g == Desugarer(job)) { goals.add(ExpressionFlattenerForAtExpr(jo...
public List<Goal> goals(Job job) { List<Goal> superGoals = super.goals(job); ArrayList<Goal> goals = new ArrayList<Goal>(superGoals.size()+10); for (Goal g : superGoals) { if (g == Desugarer(job)) { goals.add(ExpressionFlattenerForAtExpr(jo...
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.chat); serviceBinding = new XmppServiceBinding(this); contactHead = findViewById(R.id.contact_head); ...
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.chat); serviceBinding = new XmppServiceBinding(this); contactHead = findViewById(R.id.contact_head); ...
void handlePanDeviceStateChange(BluetoothDevice device, String iface, int state, int local_role, int remote_role) { if(DBG) Log.d(TAG, "handlePanDeviceStateChange: device: " + device + ", iface: " + iface + ", state: " + state + ", local_role:" + local...
void handlePanDeviceStateChange(BluetoothDevice device, String iface, int state, int local_role, int remote_role) { if(DBG) Log.d(TAG, "handlePanDeviceStateChange: device: " + device + ", iface: " + iface + ", state: " + state + ", local_role:" + local...
public ServiceResponse call() throws RequestException { String serviceEndpoint = service.getEndpoint().toString(); OAuthAuth oaa = (OAuthAuth) auth; OAuthService twitterOAuth = new ServiceBuilder() .provider(TwitterApi.class) .apiKey(service.getApikey()) ...
public ServiceResponse call() throws RequestException { String serviceEndpoint = service.getEndpoint().toString(); OAuthAuth oaa = (OAuthAuth) auth; OAuthService twitterOAuth = new ServiceBuilder() .provider(TwitterApi.class) .apiKey(service.getApikey()) ...
public static ComplexDoubleMatrix[] sparseSVD(ComplexDoubleMatrix A) { int m = A.rows; int n = A.columns; ComplexDoubleMatrix U = new ComplexDoubleMatrix(m, min(m, n)); DoubleMatrix S = new DoubleMatrix(min(m, n)); ComplexDoubleMatrix V = new ComplexDoubleMatrix(min(m, n), n...
public static ComplexDoubleMatrix[] sparseSVD(ComplexDoubleMatrix A) { int m = A.rows; int n = A.columns; ComplexDoubleMatrix U = new ComplexDoubleMatrix(m, min(m, n)); DoubleMatrix S = new DoubleMatrix(min(m, n)); ComplexDoubleMatrix V = new ComplexDoubleMatrix(min(m, n), n...
public ModelAndView searchJson( @RequestParam(value = "query", required = false, defaultValue = "") String q, @RequestParam(value = "startFrom", required = false, defaultValue = "1") int start, @RequestParam(value = "rows", required = false, defaultValue = "1000") int rows, HttpServletRequest request, H...
public ModelAndView searchJson( @RequestParam(value = "query", required = false, defaultValue = "") String q, @RequestParam(value = "startFrom", required = false, defaultValue = "1") int start, @RequestParam(value = "rows", required = false, defaultValue = "1000") int rows, HttpServletRequest request, H...
public void sessionCreated(HttpSessionEvent event) { activeSessions.put(event.getSession().getId(), event.getSession()); log.warn("New session created! Current number of active sessions: " + activeSessions.size()); }
public void sessionCreated(HttpSessionEvent event) { activeSessions.put(event.getSession().getId(), event.getSession()); log.info("New session created! Current number of active sessions: " + activeSessions.size()); }
protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException { try { mDerivedProgressMonitor.reset(); // First thing we do is go through the resource delta to not // lose it if we have to abort the build for any reason. ...
protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException { try { mDerivedProgressMonitor.reset(); // First thing we do is go through the resource delta to not // lose it if we have to abort the build for any reason. ...
public void launchAppYaml(String filename) { try { Reader input = Streams.reader(new ResourceUtils(this).getResourceFromUrl(filename)); AssemblyTemplate at = platform.pdp().registerDeploymentPlan(input); Assembly assembly = at.getInstantiator().newInstance().instantiate(...
public void launchAppYaml(String filename) { try { Reader input = Streams.reader(new ResourceUtils(this).getResourceFromUrl(filename)); AssemblyTemplate at = platform.pdp().registerDeploymentPlan(input); Assembly assembly = at.getInstantiator().newInstance().instantiate(...
public void execute(final ScriptEntry scriptEntry) throws CommandExecutionException { final dScript script = (dScript) scriptEntry.getObject("script"); Duration duration = (Duration) scriptEntry.getObject("duration"); dB.report(getName(), scriptEntry.getPlayer().debug() + script.debug() ...
public void execute(final ScriptEntry scriptEntry) throws CommandExecutionException { final dScript script = (dScript) scriptEntry.getObject("script"); Duration duration = (Duration) scriptEntry.getObject("duration"); dB.report(getName(), scriptEntry.getPlayer().debug() + script.debug() ...
private void showWave(ShortBuffer waveBuffer, int startPosition, int endPosition) { final int w = ((View) mImage.getParent()).getWidth(); final int h = mImage.getHeight(); if (w <= 0 || h <= 0) { // view is not visible this time. Skip drawing. return; } ...
private void showWave(ShortBuffer waveBuffer, int startPosition, int endPosition) { final int w = ((View) mImage.getParent()).getWidth(); final int h = mImage.getHeight(); if (w <= 0 || h <= 0) { // view is not visible this time. Skip drawing. return; } ...
public void doValidate( ApplicationConfiguration configuration, CRepository repo, ExternalConfiguration externalConfiguration ) throws InvalidConfigurationException { super.doValidate( configuration, repo, externalConfiguration ); AbstractGroupRepositoryConfi...
public void doValidate( ApplicationConfiguration configuration, CRepository repo, ExternalConfiguration externalConfiguration ) throws InvalidConfigurationException { super.doValidate( configuration, repo, externalConfiguration ); AbstractGroupRepositoryConfi...
public void bindView(View view, Context context, Cursor cursor) { Account account = getAccountFromCursor(cursor); String fromList = cursor.getString(SENDER_LIST_COLUMN); String toList = cursor.getString(TO_LIST_COLUMN); String ccList = cursor.getString(CC_LIST_CO...
public void bindView(View view, Context context, Cursor cursor) { Account account = getAccountFromCursor(cursor); String fromList = cursor.getString(SENDER_LIST_COLUMN); String toList = cursor.getString(TO_LIST_COLUMN); String ccList = cursor.getString(CC_LIST_CO...
public boolean visitNodeInst(Nodable ni, HierarchyEnumerator.CellInfo info) { float leX = (float)0.0; boolean wire = false; boolean primitiveTransistor = false; // Check if this NodeInst is tagged as a logical effort node Instance.Type type = null; Variable var = nul...
public boolean visitNodeInst(Nodable ni, HierarchyEnumerator.CellInfo info) { float leX = (float)0.0; boolean wire = false; boolean primitiveTransistor = false; // Check if this NodeInst is tagged as a logical effort node Instance.Type type = null; Variable var = nul...
public void shouldBeAbleToCreateNewTalk() throws InterruptedException { WebElement myTalksButton = webDriver.findElement(By.id("my_talks_button")); myTalksButton.click(); WaitForAjax(webDriver); assertTrue(webDriver.findElement(By.id("new_talk")).isDisplayed()); webDriver.fin...
public void shouldBeAbleToCreateNewTalk() throws InterruptedException { WebElement myTalksButton = webDriver.findElement(By.id("my_talks_button")); myTalksButton.click(); WaitForAjax(webDriver); assertTrue(webDriver.findElement(By.id("new_talk")).isDisplayed()); webDriver.fin...
public void run() { int eventType; ContentValues lastPosition = null; Vector<ContentValues> bulk = new Vector<ContentValues>(); boolean speed = false; boolean accuracy = false; boolean bearing = false; boolean elevatio...
public void run() { int eventType; ContentValues lastPosition = null; Vector<ContentValues> bulk = new Vector<ContentValues>(); boolean speed = false; boolean accuracy = false; boolean bearing = false; boolean elevatio...
public Commit getCommit() { if (repoDir == null) { throw new IllegalArgumentException("'repoDir' must not be null"); } FileRepositoryBuilder builder = new FileRepositoryBuilder(); @Cleanup Repository repo = builder.setGitDir(repoDir) .readEnvironment() ...
public Commit getCommit() { if (repoDir == null) { throw new IllegalArgumentException("'repoDir' must not be null"); } FileRepositoryBuilder builder = new FileRepositoryBuilder(); @Cleanup Repository repo = builder.setGitDir(repoDir) .readEnvironment() ...
public void testAlgorithmNew(){ System.setProperty("test", "true"); boolean labs = false; if(labs){ //Clean the database DbInitialiser.init(); //Lets create some annotators with id's 1 - numPeople and place them in array annotators = new AnnotatorModel[numPeople]; for(int i = 0; i < numPeople...
public void testAlgorithmNew(){ System.setProperty("test", "true"); boolean labs = false; if(labs){ //Clean the database DbInitialiser.init(); //Lets create some annotators with id's 1 - numPeople and place them in array annotators = new AnnotatorModel[numPeople]; for(int i = 0; i < numPeople...
public List<StepDefinition[]> getStepDefinitions() { ProgressBar progressBar = new ProgressBar("Importing step definitions"); FlashingMessageManager.addMessage(progressBar); try { final URL[] urls = new URL[] { new URL("https://raw.github.com/calabash/calabash...
public Map<String, List<StepDefinition>> getStepDefinitions() { ProgressBar progressBar = new ProgressBar("Importing step definitions"); FlashingMessageManager.addMessage(progressBar); try { final URL[] urls = new URL[] { new URL("https://raw.github.com/calaba...
public static float[][] calculateAggregatedQoS( ArrayList<QoSAttribute> qosValues) { float[][] aggregatedQoSValues; aggregatedQoSValues = new float[qosValues.get(0).getValues().length][qosValues .get(0).getValues()[0].length]; for (int i = 0; i < aggregatedQoSValues.length; i++) { Arrays.fill(aggregat...
public static float[][] calculateAggregatedQoS( ArrayList<QoSAttribute> qosValues) { float[][] aggregatedQoSValues; aggregatedQoSValues = new float[qosValues.get(0).getValues().length][]; for (int i = 0; i < aggregatedQoSValues.length; i++) { aggregatedQoSValues[i] = new float[qosValues.get(0).getValues()...
public void create() { try { Statement stmt = connection.createStatement(); stmt.executeUpdate(" CREATE TABLE networkdatabase "+ " networkid int IDENTITY PRIMARY KEY, "+ " serverName VARCHAR, "+ " serverDNS VARCHAR, "+ " network_code VARCHAR, "+ " statio...
public void create() { try { Statement stmt = connection.createStatement(); stmt.executeUpdate(" CREATE TABLE networkdatabase "+ " (networkid int IDENTITY PRIMARY KEY, "+ " serverName VARCHAR, "+ " serverDNS VARCHAR, "+ " network_code VARCHAR, "+ " stati...
public static void main(String [] args) { boolean single = false; boolean control_hub = false; boolean pool_server = true; NameServer ns = null; int port = TCP_IBIS_NAME_SERVER_PORT_NR; String poolport = null; String hubport = null; ControlHub h = null; for (int i = 0; i < args.length; i++) { if...
public static void main(String [] args) { boolean single = false; boolean control_hub = false; boolean pool_server = true; NameServer ns = null; int port = TCP_IBIS_NAME_SERVER_PORT_NR; String poolport = null; String hubport = null; ControlHub h = null; for (int i = 0; i < args.length; i++) { if...
public static void main(String[] args) throws Exception { Configuration configuration; if (args.length != 5) { System.err.println("Required args: bot_name, bot_password, host_mask, host, channel"); return; } if ("-".equals(args[2])) { configuration = ...
public static void main(String[] args) throws Exception { Configuration configuration; if (args.length == 4) { configuration = new Configuration.Builder() .setName(args[0]) .setNickservPassword(args[1]) .setAutoNickChange(true)...
boolean containsPoint(final int x, final int y) { final String shape = StringUtils.defaultIfEmpty(getShapeAttribute(), "rect").toLowerCase(); if ("default".equals(shape) && getCoordsAttribute() != null) { return true; } else if ("rect".equals(shape) && getCoordsAttribute...
boolean containsPoint(final int x, final int y) { final String shape = StringUtils.defaultIfEmpty(getShapeAttribute(), "rect").toLowerCase(); if ("default".equals(shape) && getCoordsAttribute() != null) { return true; } else if ("rect".equals(shape) && getCoordsAttribute...
protected void onHandleIntent(Intent intent) { mNotifMan.cancel(LOGIN_ERROR_ID); // clear any old notification MuWifiClient loginClient = new MuWifiClient(mPrefs.getString(Preferences.KEY_USERNAME, null), mPrefs.getString(Preferences.KEY_PASSWORD, null)); try { updateOngoingNotification(getString(R.stri...
protected void onHandleIntent(Intent intent) { mNotifMan.cancel(LOGIN_ERROR_ID); // clear any old notification MuWifiClient loginClient = new MuWifiClient(mPrefs.getString(Preferences.KEY_USERNAME, null), mPrefs.getString(Preferences.KEY_PASSWORD, null)); try { updateOngoingNotification(getString(R.stri...
static boolean shortcutExists(Context context, String title, Intent intent) { final ContentResolver cr = context.getContentResolver(); Cursor c = cr.query(LauncherSettings.Favorites.CONTENT_URI, new String[] { "title", "intent" }, "title=? and intent=?", new String[] { title,...
static boolean shortcutExists(Context context, String title, Intent intent) { final ContentResolver cr = context.getContentResolver(); Cursor c = cr.query(LauncherSettings.Favorites.CONTENT_URI, new String[] { "title", "intent" }, "title=? and intent=?", new String[] { title,...
public double runAsDouble() { double total = (Long.parseLong(getFieldValue("like")) * 5) + (Long.parseLong(getFieldValue("participate")) * 100) + Long.parseLong(getFieldValue("status")); Date start_time = BaseModule .parse_date(getFieldValue("start_time")); Date end_time = BaseModule.parse_da...
public double runAsDouble() { double total = (Long.parseLong(getFieldValue("like")) * 5) + (Long.parseLong(getFieldValue("participate")) * 100) + Long.parseLong(getFieldValue("status")); Date start_time = BaseModule .parse_date(getFieldValue("start_time")); Date end_time = BaseModule.parse_da...
public /*@ pure @*/ SoundEffect make(File the_sound_effect_file) { assert false; //@ assert false; return null; }
public static /*@ pure @*/ SoundEffect make(File the_sound_effect_file) { assert false; //@ assert false; return null; }
private Collision evaluateCollision(Point myPosition, double myDirection, double mySpeed, Point otherPosition, double otherDirection, double otherSpeed, int id) { //TODO I fear this will perform poorly for something supposed to be fast... //here we forecast if a collision may happen final Point collisionPositio...
private Collision evaluateCollision(Point myPosition, double myDirection, double mySpeed, Point otherPosition, double otherDirection, double otherSpeed, int id) { //TODO I fear this will perform poorly for something supposed to be fast... //here we forecast if a collision may happen final Point collisionPositio...
public HTTPResponse postMultipart(String url, Map<String, String> parameters) throws IOException { HttpURLConnection conn = getAndConfigureConnection(url); conn.setRequestMethod("POST"); String boundary = createMultipartBoundary(); conn.setRequestProperty(HEADER_TYPE, CONTENT_TYPE +"; "+ BOUNDARY + boundary...
public HTTPResponse postMultipart(String url, Map<String, Object> parameters) throws IOException { HttpURLConnection conn = getAndConfigureConnection(url); conn.setRequestMethod("POST"); String boundary = createMultipartBoundary(); conn.setRequestProperty(HEADER_TYPE, CONTENT_TYPE +"; "+ BOUNDARY + boundary...
public void addFuel(PlayerInteractEvent e){ Player p = e.getPlayer(); //if(!p.getGameMode().equals(GameMode.CREATIVE)){ if(p.hasPermission("jet.fly")){ if(e.getAction().equals(Action.RIGHT_CLICK_AIR)||e.getAction().equals(Action.RIGHT_CLICK_BLOCK)){ if(p.getInventory().getChestplate() !...
public void addFuel(PlayerInteractEvent e){ Player p = e.getPlayer(); //if(!p.getGameMode().equals(GameMode.CREATIVE)){ if(p.hasPermission("jet.fly")){ if(e.getAction().equals(Action.RIGHT_CLICK_AIR)||e.getAction().equals(Action.RIGHT_CLICK_BLOCK)){ if(p.getInventory().getChestplate() !...
private void makeSpan() { /** * Get the text */ String plainText=getResources().getString(R.string.text_sample); Spanned htmlText = Html.fromHtml(plainText); SpannableString mSpannableString= new SpannableString(htmlText); int allTextStart = 0; int...
private void makeSpan() { /** * Get the text */ String plainText=getResources().getString(R.string.text_sample); Spanned htmlText = Html.fromHtml(plainText); SpannableString mSpannableString= new SpannableString(htmlText); int allTextStart = 0; int...
protected <X extends Exception> void update( SortedSet<K> putkey, SortedSet<K> remkey, final SortedMap<K, V> putmap, Closure<Map.Entry<K, V>, X> value_handler, ExceptionConvertor<X> conv ) throws TaskAbortException { while(true) { SortedSet<K> rejected; if (value_handler == null) { // synchro...
protected <X extends Exception> void update( SortedSet<K> putkey, SortedSet<K> remkey, final SortedMap<K, V> putmap, Closure<Map.Entry<K, V>, X> value_handler, ExceptionConvertor<X> conv ) throws TaskAbortException { while(true) { final SortedSet<K> rejected; if (value_handler == null) { // s...
public String execute(String s) { if (s.matches("OUVRIR.* COFFRE")) { if (coffreOuvert) return "Le coffre est déjà ouvert."; coffreOuvert = true; return "Le coffre s'ouvre et un épais nuage de poussière en sort. Il y a une clé dans le fond."; } else if (s.matches("PRENDRE.* CLÉ")) { if (coffreO...
public String execute(String s) { if (s.matches("OUVRIR.* COFFRE")) { if (coffreOuvert) return "Le coffre est déjà ouvert."; coffreOuvert = true; return "Le coffre s'ouvre et un épais nuage de poussière en sort. Il y a une clé dans le fond."; } else if (s.matches("PRENDRE.* CLE")) { if (coffreO...
public void rework(HiveConf job, MapredWork work) throws IOException { Map<String, PartitionDesc> pathToParts = work.getPathToPartitionInfo(); List<String> toRemovePaths = new ArrayList<String>(); Map<String, PartitionDesc> toAddPathToPart = new HashMap<String, PartitionDesc>(); Map<String, ArrayList<...
public void rework(HiveConf job, MapredWork work) throws IOException { Map<String, PartitionDesc> pathToParts = work.getPathToPartitionInfo(); List<String> toRemovePaths = new ArrayList<String>(); Map<String, PartitionDesc> toAddPathToPart = new HashMap<String, PartitionDesc>(); Map<String, ArrayList<...
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String method, surname, firstname, username, password, phone, email; Integer studentId = 0; Short age; try { try { studentId = Integer.parseInt(request.getParameter("stud...
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String surname, firstname, username, password, phone, email; Integer studentId = 0; Short age; try { try { studentId = Integer.parseInt(request.getParameter("student_id")...
public ConfigurationMixin( @Structure Qi4j api, @This Composite me, @Structure UnitOfWorkFactory uowf, @Uses ServiceDescriptor descriptor ) throws Exception { Class configurat...
public ConfigurationMixin( @Structure Qi4j api, @This Composite me, @Structure UnitOfWorkFactory uowf, @Uses ServiceDescriptor descriptor ) throws Exception { Class configurat...
void observeRec(List<FormatChunk> oCandidates, List<String> chunks, int curIdx, boolean monthDone, boolean dayDone, boolean hoursDone, boolean minutesDone, boolean secondDone) { String c = chunks.get(curIdx); if (c.length() <= 1) { if (StringUtils.isNumeric(c)) { // Coul...
void observeRec(List<FormatChunk> oCandidates, List<String> chunks, int curIdx, boolean monthDone, boolean dayDone, boolean hoursDone, boolean minutesDone, boolean secondDone) { String c = chunks.get(curIdx); if (c.length() <= 1) { if (c.length() > 0 && StringUtils.isNumeric(c)) { ...
private ElementLayout createScoreValue(AGLView view, ScoringElement elem, SortableColumnHeader header, int id) { Row row = new Row(); row.setGrabY(true); IScore underlyingScore = header.getScoreID(); if (underlyingScore instanceof ProductScore) underlyingScore = elem.getSelected((ProductScore) underlyingSco...
private ElementLayout createScoreValue(AGLView view, ScoringElement elem, SortableColumnHeader header, int id) { Row row = new Row(); row.setGrabY(true); row.setXDynamic(true); IScore underlyingScore = header.getScoreID(); if (underlyingScore instanceof ProductScore) underlyingScore = elem.getSelected((Pr...
public void testProfiledRun() throws Exception { final Experiment mockExperiment = EasyMock.createMock(Experiment.class); final SubjectStateBridge mockSubjectA = EasyMock.createMock(SubjectStateBridge.class); final SubjectStateBridge mockSubjectB = EasyMock.createMock(SubjectStateBridge.class); final ...
public void testProfiledRun() throws Exception { final Experiment mockExperiment = EasyMock.createMock(Experiment.class); final SubjectStateBridge mockSubjectA = EasyMock.createMock(SubjectStateBridge.class); final SubjectStateBridge mockSubjectB = EasyMock.createMock(SubjectStateBridge.class); final ...
public XmlvmProcess<?> createTargetProcess(Targets target, String out) { switch (target) { case JS: return new JavaScriptOutputProcess(arguments); case PYTHON: return new PythonOutputProcess(arguments); case CPP: return new CppOutputProcess(argumen...
public XmlvmProcess<?> createTargetProcess(Targets target, String out) { switch (target) { case JS: return new JavaScriptOutputProcess(arguments); case PYTHON: return new PythonOutputProcess(arguments); case CPP: return new CppOutputProcess(argumen...
public static void registerUser(XMPPConnection con, String gatewayDomain, String username, String password, String nickname) throws XMPPException { Registration registration = new Registration(); registration.setType(IQ.Type.SET); registration.setTo(gatewayDomain); registration.addEx...
public static void registerUser(XMPPConnection con, String gatewayDomain, String username, String password, String nickname) throws XMPPException { Registration registration = new Registration(); registration.setType(IQ.Type.SET); registration.setTo(gatewayDomain); registration.addEx...
public void handle(CommandSender sender, String[] arguments) { //Display possible help for this command if(!(sender instanceof Player)) { MessageManager.send(sender, "iBank "+iBank.description.getVersion()+" ("+iBank.CodeName+")"); String args = ""; for(String name : CommandHandler.getCommands("bank")) ...
public void handle(CommandSender sender, String[] arguments) { //Display possible help for this command if(!(sender instanceof Player)) { MessageManager.send(sender, "iBank "+iBank.description.getVersion()); String args = ""; for(String name : CommandHandler.getCommands("bank")) { args = CommandHa...
public static Vector upgrade031(Vector messages) throws Exception { Connection conn = null; try { // FIXME - hard coding conn = DatabaseConnection.getConnection(); conn.setAutoCommit(false); // add redirection column String sql = "alter table jam_topic add column redirect_to VARCHAR(200) "; Datab...
public static Vector upgrade031(Vector messages) throws Exception { Connection conn = null; try { // FIXME - hard coding conn = DatabaseConnection.getConnection(); conn.setAutoCommit(false); // add redirection column String sql = "alter table jam_topic add column redirect_to VARCHAR(200) "; Datab...
private void ping(Location location) { HttpClient client = new DefaultHttpClient(); HttpPost request = new HttpPost(url); try { List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>( 4); nameValuePairs.add(new BasicNameValuePair("email", email)); nameValuePairs .add(new B...
private void ping(Location location) { HttpClient client = new DefaultHttpClient(); HttpPost request = new HttpPost(url); try { List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>( 4); nameValuePairs.add(new BasicNameValuePair("email", email)); nameValuePairs .add(new B...
public static void main(String[] args) { System.out.println("test"); System.out.println("test"); System.out.println("test"); System.out.println("test"); System.out.println("test"); System.out.println("test"); System.out.println("test"); System.out.println("test"); System.out.println("test"); Syst...
public static void main(String[] args) { System.out.println("test"); System.out.println("test"); System.out.println("test"); System.out.println("test"); System.out.println("test"); System.out.println("test"); System.out.println("test"); System.out.println("test"); System.out.println("test"); Syst...
public void apply(FaceletContext ctx, UIComponent parent) throws IOException { if(entity == null) { // if entry attribute not setted. entityConverter would not be registered. return; } parent.getAttributes().put("entity", entity.getValue(ctx)); parent.getAttributes().put("noSelectionValue", noSelectio...
public void apply(FaceletContext ctx, UIComponent parent) throws IOException { if(entity == null || entity.getValue() == null) { // if entry attribute not setted. entityConverter would not be registered. return; } parent.getAttributes().put("entity", entity.getValue(ctx)); parent.getAttributes().put("...
public void onPlayerJoin(PlayerJoinEvent event){ Player player = event.getPlayer(); if(!player.hasPlayedBefore()){ FileConfiguration config = plugin.configYML; Location loc = new Location( plugin.getServer().getWorld(config.getString("spawn.world")), ...
public void onPlayerJoin(PlayerJoinEvent event){ Player player = event.getPlayer(); if(!player.hasPlayedBefore()){ FileConfiguration config = plugin.configYML; Location loc = new Location( plugin.getServer().getWorld(config.getString("spawn.world")), ...
public void build() { Square[] s = super.getSquares(); int rand = (int) (Math.random() * 40); if (rand < 10) { for (int i = 0; i < 4; i++) { s[i] = new Square(new Position( super.getLeftIn(Util.SQUARE_SIZE * 3) + (Util.SQUARE_SIZE * super.getStartX()) - i * Util.SQUARE_SIZE, Util.B4_BOX...
public void build() { Square[] s = super.getSquares(); int rand = (int) (Math.random() * 40); if (rand < 10) { for (int i = 0; i < 4; i++) { s[i] = new Square(new Position( super.getLeftIn(Util.SQUARE_SIZE * 3) + (Util.SQUARE_SIZE * super.getStartX()) - i * Util.SQUARE_SIZE, Util.B4_BOX...
private void renderEntities(StateBasedGame game, Graphics g, LuminousEntity... entities) { Arrays.sort(entities); int i = 0; // GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_STENCIL_TEST); GL11.glStencilFunc(GL11.GL_ALWAYS, 1, 1); ...
private void renderEntities(StateBasedGame game, Graphics g, LuminousEntity... entities) { Arrays.sort(entities); int i = 0; GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_STENCIL_TEST); GL11.glAlphaFunc(GL11.GL_GREATER, 0); G...
protected void renderTokens(Graphics2D g, List<Token> tokenList, ZoneView view) { Rectangle viewport = new Rectangle(0, 0, getSize().width, getSize().height); Rectangle clipBounds = g.getClipBounds(); float scale = zoneScale.getScale(); for (Token token : tokenList) { ...
protected void renderTokens(Graphics2D g, List<Token> tokenList, ZoneView view) { Rectangle viewport = new Rectangle(0, 0, getSize().width, getSize().height); Rectangle clipBounds = g.getClipBounds(); float scale = zoneScale.getScale(); for (Token token : tokenList) { ...
protected static void initListeners(final GUIMain main) { /*********************************************************************************************************************************************** *############################################################################################################*...
protected static void initListeners(final GUIMain main) { /*********************************************************************************************************************************************** *############################################################################################################*...
public void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try{ errors.clear(); UpdatePasswordForm passwordForm = new UpdatePasswordForm(); String uri = request.getRequestURI(); int lastIndex = uri.lastIndexOf("/"); S...
public void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try{ errors.clear(); UpdatePasswordForm passwordForm = new UpdatePasswordForm(); String uri = request.getRequestURI(); int lastIndex = uri.lastIndexOf("/"); S...
public UnresolvedType fromBinding(TypeBinding binding) { if (binding instanceof HelperInterfaceBinding) { return ((HelperInterfaceBinding) binding).getTypeX(); } if (binding == null || binding.qualifiedSourceName() == null) { return ResolvedType.MISSING; } // first piece of generics support! if (bind...
public UnresolvedType fromBinding(TypeBinding binding) { if (binding instanceof HelperInterfaceBinding) { return ((HelperInterfaceBinding) binding).getTypeX(); } if (binding == null || binding.qualifiedSourceName() == null) { return ResolvedType.MISSING; } // first piece of generics support! if (bind...
public int getDaysUntil() { Calendar nowDate = Calendar.getInstance(); nowDate.set(Calendar.MILLISECOND, 0); nowDate.set(Calendar.SECOND, 0); nowDate.set(Calendar.MINUTE, 0); nowDate.set(Calendar.HOUR, 0); Calendar eventDate = Calendar.getInstance(); eventDate.setTime(getDateTime()); eventDate.set(Cal...
public int getDaysUntil() { Calendar nowDate = Calendar.getInstance(); nowDate.set(Calendar.MILLISECOND, 0); nowDate.set(Calendar.SECOND, 0); nowDate.set(Calendar.MINUTE, 0); nowDate.set(Calendar.HOUR_OF_DAY, 0); Calendar eventDate = Calendar.getInstance(); eventDate.setTime(getDateTime()); eventDate....
public int complete(String buffer, int cursor, List candidates) { // Guarantee that the final token is the one we're expanding if (buffer == null) { candidates.add("/"); return 1; } buffer = buffer.substring(0, cursor); String path = buffer; in...
public int complete(String buffer, int cursor, List candidates) { // Guarantee that the final token is the one we're expanding if (buffer == null) { candidates.add("/"); return 1; } else if (!buffer.startsWith("/")) { return 0; } buffer = b...
public PackDialog(MainFrame mainFrame, FileSet files, boolean isShiftDown) { super(mainFrame, Translator.get(com.mucommander.ui.action.PackAction.class.getName()+".label"), mainFrame); this.mainFrame = mainFrame; this.files = files; // Retrieve available formats for single file o...
public PackDialog(MainFrame mainFrame, FileSet files, boolean isShiftDown) { super(mainFrame, Translator.get(com.mucommander.ui.action.PackAction.class.getName()+".label"), mainFrame); this.mainFrame = mainFrame; this.files = files; // Retrieve available formats for single file o...
protected boolean installInterestFilter(StructuredViewer viewer) { if (viewer == null) { MylarStatusHandler.log("The viewer to install InterestFilter is null", this); return false; } try { viewer.getControl().setRedraw(false); viewer.addFilter(interestFilter); previousFilters.addAll(Arrays.asLi...
protected boolean installInterestFilter(StructuredViewer viewer) { if (viewer == null) { MylarStatusHandler.log("The viewer to install InterestFilter is null", this); return false; } try { viewer.getControl().setRedraw(false); previousFilters.addAll(Arrays.asList(viewer.getFilters())); List<Cla...
public String[] GC() throws IOException, MalformedObjectNameException { ObjectName gcName = null; gcName = new ObjectName(ManagementFactory.MEMORY_POOL_MXBEAN_DOMAIN_TYPE+",*");//GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE + ",*"); Set mbeans = connection.queryNames(gcName, null); if (m...
public String[] GC() throws IOException, MalformedObjectNameException { ObjectName gcName = null; gcName = new ObjectName(ManagementFactory.MEMORY_POOL_MXBEAN_DOMAIN_TYPE+",*");//GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE + ",*"); Set mbeans = connection.queryNames(gcName, null); if (m...
private void addField(OJAnnotatedClass annotatedClass, OJEnum ojEnum, String fieldName) { OJAnnotatedOperation fromLabel = ojEnum.findOperation("fromLabel", new OJPathName("String")); OJAnnotatedOperation fromQualifiedName = ojEnum.findOperation("fromQualifiedName", new OJPathName("String")); OJAnnotatedOperatio...
private void addField(OJAnnotatedClass annotatedClass, OJEnum ojEnum, String fieldName) { OJAnnotatedOperation fromLabel = ojEnum.findOperation("fromLabel", new OJPathName("String")); OJAnnotatedOperation fromQualifiedName = ojEnum.findOperation("fromQualifiedName", new OJPathName("String")); OJAnnotatedOperatio...