buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
@Override protected ShardsIterator shards(ClusterState clusterState, AnalyzeRequest request) { request.index(clusterState.metaData().concreteIndex(request.index())); return clusterState.routingTable().index(request.index()).allShardsIt(); }
@Override protected ShardsIterator shards(ClusterState clusterState, AnalyzeRequest request) { request.index(clusterState.metaData().concreteIndex(request.index())); return clusterState.routingTable().index(request.index()).randomAllShardsIt(); }
@Override protected ShardsIterator shards(ClusterState clusterState, PercolateRequest request) { request.index(clusterState.metaData().concreteIndex(request.index())); return clusterState.routingTable().index(request.index()).allShardsIt(); }
@Override protected ShardsIterator shards(ClusterState clusterState, PercolateRequest request) { request.index(clusterState.metaData().concreteIndex(request.index())); return clusterState.routingTable().index(request.index()).randomAllShardsIt(); }
@Test public void testSimpleOperations() { Translog.Snapshot snapshot = translog.snapshot(); assertThat(snapshot, translogSize(0)); snapshot.release(); translog.add(new Translog.Create("test", "1", new byte[]{1})); snapshot = translog.snapshot(); assertThat(snapshot,...
@Test public void testSimpleOperations() { Translog.Snapshot snapshot = translog.snapshot(); assertThat(snapshot, translogSize(0)); snapshot.release(); translog.add(new Translog.Create("test", "1", new byte[]{1})); snapshot = translog.snapshot(); assertThat(snapshot,...
public GdxImage (GdxRenderer renderer, Texture texture, int srcX, int srcY, int srcWidth, int srcHeight, Color color, boolean tile) { this.renderer = renderer; width = Math.abs(srcWidth); height = Math.abs(srcHeight); this.tintColor = color == null ? Color.WHITE : color; this.tile = tile; sprite = new Sp...
public GdxImage (GdxRenderer renderer, Texture texture, int srcX, int srcY, int srcWidth, int srcHeight, Color color, boolean tile) { this.renderer = renderer; width = Math.abs(srcWidth); height = Math.abs(srcHeight); this.tintColor = color == null ? Color.WHITE : color; this.tile = tile; sprite = new Sp...
public boolean touchDown (int x, int y, int pointer) { renderMode = (renderMode + 1) % 2; return false; } }); spriteBatch = new SpriteBatch(); spriteBatch.setProjectionMatrix(new Matrix4().setToOrtho(0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), 0, 0, 1)); logoSprite = new Sprite(Gdx.gra...
public boolean touchDown (int x, int y, int pointer) { renderMode = (renderMode + 1) % 2; return false; } }); spriteBatch = new SpriteBatch(); spriteBatch.setProjectionMatrix(new Matrix4().setToOrtho(0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), 0, 0, 1)); logoSprite = new Sprite(Gdx.gra...
@Override public void create () { if (spriteBatch != null) return; spriteBatch = new SpriteBatch(); Matrix4 transform = new Matrix4(); transform.setToTranslation(0, Gdx.graphics.getHeight(), 0); transform.mul(new Matrix4().setToScaling(1, -1, 1)); spriteBatch.setTransformMatrix(transform); pixS1 = Gdx....
@Override public void create () { if (spriteBatch != null) return; spriteBatch = new SpriteBatch(); Matrix4 transform = new Matrix4(); transform.setToTranslation(0, Gdx.graphics.getHeight(), 0); transform.mul(new Matrix4().setToScaling(1, -1, 1)); spriteBatch.setTransformMatrix(transform); pixS1 = Gdx....
public void create () { batch = new SpriteBatch(); atlas = new TextureAtlas(Gdx.files.internal("data")); badlogic = atlas.getSprite("badlogicslice"); badlogic.setPosition(50, 50); badlogicSmall = atlas.getSprite("badlogicsmall"); badlogicSmall.setPosition(10, 10); badlogicSmall.getTextureRegion().flip...
public void create () { batch = new SpriteBatch(); atlas = new TextureAtlas(Gdx.files.internal("data")); badlogic = atlas.getSprite("badlogicslice"); badlogic.setPosition(50, 50); badlogicSmall = atlas.getSprite("badlogicsmall"); badlogicSmall.setPosition(10, 10); badlogicSmall.getRegion().flip(true, ...
protected void renderWorld () { softBody.getVertices(mesh.getVerticesBuffer(), softBody.getNodeCount(), mesh.getVertexSize(), 0); softBody.getWorldTransform(instance.transform); modelBatch.begin(camera); world.render(modelBatch, lights); modelBatch.render(instance, lights); modelBatch.end(); }
protected void renderWorld () { softBody.getVertices(mesh.getVerticesBuffer(), softBody.getNodeCount(), mesh.getVertexSize(), 0); softBody.getWorldTransform(instance.transform); modelBatch.begin(camera); world.render(modelBatch, lights); modelBatch.render(lights, instance); modelBatch.end(); }
public void render () { if ((dbgTimer += Gdx.graphics.getDeltaTime()) >= 1f) { dbgTimer -= 1f; // Gdx.app.log("Test", "FPS: "+Gdx.graphics.getFramesPerSecond()+", binds: "+exclusiveTextures.getBindCount()+", reused: "+exclusiveTextures.getReuseCount()); // exclusiveTextures.resetCounts(); } GL20 gl = Gd...
public void render () { if ((dbgTimer += Gdx.graphics.getDeltaTime()) >= 1f) { dbgTimer -= 1f; // Gdx.app.log("Test", "FPS: "+Gdx.graphics.getFramesPerSecond()+", binds: "+exclusiveTextures.getBindCount()+", reused: "+exclusiveTextures.getReuseCount()); // exclusiveTextures.resetCounts(); } GL20 gl = Gd...
public void render () { Gdx.gl.glViewport(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); cam.update(); shapeRenderer.setProjectionMatrix(cam.combined); shapeRenderer.begin(ShapeType.Line); shapeRenderer.setColor(Color.RED); ...
public void render () { Gdx.gl.glViewport(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); cam.update(); shapeRenderer.setProjectionMatrix(cam.combined); shapeRenderer.begin(ShapeType.Line); shapeRenderer.setColor(Color.RED); ...
public static void main(String[] args) { System.setProperty("es-foreground", "yes"); Bootstrap.main(args); }
public static void main(String[] args) { System.setProperty("es.foreground", "yes"); Bootstrap.main(args); }
public void render() { Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); stage.act(Gdx.graphics.getDeltaTime()); stage.render(); }
public void render() { Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); stage.act(Gdx.graphics.getDeltaTime()); stage.draw(); }
@Override public void render () { GL10 gl = Gdx.graphics.getGL10(); gl.glClear(GL10.GL_COLOR_BUFFER_BIT); ui.act(Gdx.graphics.getDeltaTime()); ui.render(); }
@Override public void render () { GL10 gl = Gdx.graphics.getGL10(); gl.glClear(GL10.GL_COLOR_BUFFER_BIT); ui.act(Gdx.graphics.getDeltaTime()); ui.draw(); }
private void parseSource(SearchContext context, byte[] source, int offset, int length) throws SearchParseException { // nothing to parse... if (source == null || length == 0) { return; } try { XContentParser parser = XContentFactory.xContent(source, offset, le...
private void parseSource(SearchContext context, byte[] source, int offset, int length) throws SearchParseException { // nothing to parse... if (source == null || length == 0) { return; } try { XContentParser parser = XContentFactory.xContent(source, offset, le...
public final Quaternion orient = new Quaternion( 0, 0, 0, 0 ); }
public final MD5Quaternion orient = new MD5Quaternion(); }
private void build () { if (!Gdx.graphics.isGL20Available()) throw new GdxRuntimeException("GL2 is required."); GL20 gl = Gdx.graphics.getGL20(); // iOS uses a different framebuffer handle! (not necessarily 0) if (!defaultFramebufferHandleInitialized) { defaultFramebufferHandleInitialized = true; if ...
private void build () { if (!Gdx.graphics.isGL20Available()) throw new GdxRuntimeException("GL2 is required."); GL20 gl = Gdx.graphics.getGL20(); // iOS uses a different framebuffer handle! (not necessarily 0) if (!defaultFramebufferHandleInitialized) { defaultFramebufferHandleInitialized = true; if ...
public Vector3 getEndPoint (float distance) { return new Vector3(origin).add(direction.tmp().mul(distance)); }
public Vector3 getEndPoint (float distance) { return new Vector3(origin).add(direction.tmp().scl(distance)); }
public void create () { camera = new PerspectiveCamera(67, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); camera.position.set(0, 2, 3).nor().mul(10); camera.lookAt(0, 0, 0); camera2 = new PerspectiveCamera(67, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); camera2.position.set(-3, 2, 0); camera2...
public void create () { camera = new PerspectiveCamera(67, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); camera.position.set(0, 2, 3).nor().scl(10); camera.lookAt(0, 0, 0); camera2 = new PerspectiveCamera(67, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); camera2.position.set(-3, 2, 0); camera2...
public Texture (FileHandle file, Format format, boolean useMipMaps) { if (file.name().contains(".etc1")) { create(new ETC1TextureData(file, useMipMaps)); } else { create(new FileTextureData(file, null, format, useMipMaps)); } }
public Texture (FileHandle file, Format format, boolean useMipMaps) { if (file.name().endsWith(".etc1")) { create(new ETC1TextureData(file, useMipMaps)); } else { create(new FileTextureData(file, null, format, useMipMaps)); } }
public static BuildTarget newDefaultTarget (BuildTarget.TargetOs type, boolean is64Bit) { if (type == TargetOs.Windows && !is64Bit) { // Windows 32-Bit return new BuildTarget(TargetOs.Windows, false, new String[] {"**/*.c"}, new String[0], new String[] {"**/*.cpp"}, new String[0], new String[0], "i586-ming...
public static BuildTarget newDefaultTarget (BuildTarget.TargetOs type, boolean is64Bit) { if (type == TargetOs.Windows && !is64Bit) { // Windows 32-Bit return new BuildTarget(TargetOs.Windows, false, new String[] {"**/*.c"}, new String[0], new String[] {"**/*.cpp"}, new String[0], new String[0], "i686-w64-...
private void toTouchEvents (long touches, UIEvent uiEvent) { long array = NSSetExtensions.allObjects(touches); int length = (int)NSArrayExtensions.count(array); for (int i = 0; i < length; i++) { long touchHandle = NSArrayExtensions.objectAtIndex$(array, i); UITouch touch = UI_TOUCH_WRAPPER.wrap(touchHandl...
private void toTouchEvents (long touches, UIEvent uiEvent) { long array = NSSetExtensions.allObjects(touches); int length = (int)NSArrayExtensions.count(array); for (int i = 0; i < length; i++) { long touchHandle = NSArrayExtensions.objectAtIndex$(array, i); UITouch touch = UI_TOUCH_WRAPPER.wrap(touchHandl...
FacetCollector parse(String facetName, XContentParser parser, SearchContext context) throws IOException; /* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. E...
FacetCollector parse(String facetName, XContentParser parser, SearchContext context) throws IOException; /* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. E...
@Override public FacetCollector parser(String facetName, XContentParser parser, SearchContext context) throws IOException { String fieldName = null; String valueFieldName = null; String valueScript = null; Map<String, Object> params = null; double lat = Double.NaN; do...
@Override public FacetCollector parse(String facetName, XContentParser parser, SearchContext context) throws IOException { String fieldName = null; String valueFieldName = null; String valueScript = null; Map<String, Object> params = null; double lat = Double.NaN; dou...
@Override public FacetCollector parser(String facetName, XContentParser parser, SearchContext context) throws IOException { String keyField = null; String valueField = null; String keyScript = null; String valueScript = null; Map<String, Object> params = null; long in...
@Override public FacetCollector parse(String facetName, XContentParser parser, SearchContext context) throws IOException { String keyField = null; String valueField = null; String keyScript = null; String valueScript = null; Map<String, Object> params = null; long int...
@Override public FacetCollector parser(String facetName, XContentParser parser, SearchContext context) { XContentIndexQueryParser indexQueryParser = (XContentIndexQueryParser) context.queryParser(); Query facetQuery = indexQueryParser.parse(parser); return new QueryFacetCollector(facetName, ...
@Override public FacetCollector parse(String facetName, XContentParser parser, SearchContext context) { XContentIndexQueryParser indexQueryParser = (XContentIndexQueryParser) context.queryParser(); Query facetQuery = indexQueryParser.parse(parser); return new QueryFacetCollector(facetName, f...
@Override public FacetCollector parser(String facetName, XContentParser parser, SearchContext context) throws IOException { String keyField = null; String valueField = null; String keyScript = null; String valueScript = null; Map<String, Object> params = null; XConten...
@Override public FacetCollector parse(String facetName, XContentParser parser, SearchContext context) throws IOException { String keyField = null; String valueField = null; String keyScript = null; String valueScript = null; Map<String, Object> params = null; XContent...
@Override public FacetCollector parser(String facetName, XContentParser parser, SearchContext context) throws IOException { String field = null; String currentFieldName = null; String script = null; Map<String, Object> params = cachedParams.get().get(); params.clear(); ...
@Override public FacetCollector parse(String facetName, XContentParser parser, SearchContext context) throws IOException { String field = null; String currentFieldName = null; String script = null; Map<String, Object> params = cachedParams.get().get(); params.clear(); ...
@Override public FacetCollector parser(String facetName, XContentParser parser, SearchContext context) throws IOException { String field = null; int size = 10; String fieldName = null; XContentParser.Token token; ImmutableSet<String> excluded = ImmutableSet.of(); Str...
@Override public FacetCollector parse(String facetName, XContentParser parser, SearchContext context) throws IOException { String field = null; int size = 10; String fieldName = null; XContentParser.Token token; ImmutableSet<String> excluded = ImmutableSet.of(); Stri...
static public void freeAll (Array objects) { if (objects == null) throw new IllegalArgumentException("objects cannot be null."); for (int i = 0, n = objects.size; i < n; i++) { Object object = objects.get(i); if (object == null) continue; ReflectionPool pool = typePools.get(object.getClass()); if (pool...
static public void freeAll (Array objects) { if (objects == null) throw new IllegalArgumentException("objects cannot be null."); for (int i = 0, n = objects.size; i < n; i++) { Object object = objects.get(i); if (object == null) continue; ReflectionPool pool = typePools.get(object.getClass()); if (pool...
public void testExternalValues() throws Exception { String originalText = "This is an elasticsearch mapper attachment test."; String contentType = "text/plain; charset=ISO-8859-1"; String forcedName = "dummyname.txt"; String bytes = Base64.encodeBytes(originalText.getBytes()); ...
public void testExternalValues() throws Exception { String originalText = "This is an elasticsearch mapper attachment test."; String contentType = "text/plain; charset=ISO-8859-1"; String forcedName = "dummyname.txt"; String bytes = Base64.encodeBytes(originalText.getBytes()); ...
public void collect(int docId, long owningBucketOrdinal) throws IOException { if (owningBucketOrdinal >= tops.size()) { long from = tops.size(); tops = bigArrays.grow(tops, owningBucketOrdinal + 1); tops.fill(from, tops.size(), Double.NEGATIVE_INFINITY); botto...
public void collect(int docId, long owningBucketOrdinal) throws IOException { if (owningBucketOrdinal >= tops.size()) { long from = tops.size(); tops = bigArrays.grow(tops, owningBucketOrdinal + 1); tops.fill(from, tops.size(), Double.NEGATIVE_INFINITY); botto...
public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList( AnimationTest.class, AccelerometerTest.class, ActionTest.class, ActionSequenceTest.class, GroupTest.class, AlphaTest.class, AtlasIssueTest.class, AssetManagerTest.class, FilterPerformanceTest.class, ...
public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList( AnimationTest.class, AccelerometerTest.class, ActionTest.class, ActionSequenceTest.class, GroupTest.class, AlphaTest.class, AtlasIssueTest.class, AssetManagerTest.class, FilterPerformanceTest.class, ...
@Override protected ShardGatewaySnapshotResponse shardOperationOnPrimary(ShardOperationRequest shardRequest) { IndexShardGatewayService shardGatewayService = indicesService.indexServiceSafe(shardRequest.request.index()) .shardInjectorSafe(shardRequest.shardId).getInstance(IndexShardGatewaySe...
@Override protected ShardGatewaySnapshotResponse shardOperationOnPrimary(ShardOperationRequest shardRequest) { IndexShardGatewayService shardGatewayService = indicesService.indexServiceSafe(shardRequest.request.index()) .shardInjectorSafe(shardRequest.shardId).getInstance(IndexShardGatewaySe...
public ImmutableMap<String, BlobMetaData> listIndexBlobs(int shardId) throws IOException { ImmutableBlobContainer indexContainer = blobStore.immutableBlobContainer(shardIndexPath(shardId)); return BlobStoreIndexShardGateway.aggregateParts(indexContainer.listBlobs()); }
public ImmutableMap<String, BlobMetaData> listIndexBlobs(int shardId) throws IOException { ImmutableBlobContainer indexContainer = blobStore.immutableBlobContainer(shardIndexPath(shardId)); return BlobStoreIndexShardGateway.buildVirtualBlobs(indexContainer, indexContainer.listBlobs(), null); }
@Override public void run() { // recheck here, since the cluster event can be called if (indexShard.ignoreRecoveryAttempt()) { return; } try { RecoveryAction recoveryAction = indexService.shardInjector(sh...
@Override public void run() { // recheck here, since the cluster event can be called if (indexShard.ignoreRecoveryAttempt()) { return; } try { RecoveryAction recoveryAction = indexService.shardInjector(sh...
public GdxTexture (GdxRenderer renderer, FileHandle textureFile) { this.renderer = renderer; texture = Gdx.graphics.newTexture(textureFile, TextureFilter.Linear, TextureFilter.Linear, TextureWrap.ClampToEdge, TextureWrap.ClampToEdge); }
public GdxTexture (GdxRenderer renderer, FileHandle textureFile) { this.renderer = renderer; texture = Gdx.graphics.newTexture(textureFile, TextureFilter.Nearest, TextureFilter.Nearest, TextureWrap.ClampToEdge, TextureWrap.ClampToEdge); }
public Gdx2DPixmap(InputStream in, int requestedFormat) throws IOException { ByteArrayOutputStream bytes = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; int readBytes = 0; while((readBytes = in.read(buffer)) != -1) { bytes.write(buffer, 0, readBytes); } buffer = bytes.toByteArray();...
public Gdx2DPixmap(InputStream in, int requestedFormat) throws IOException { ByteArrayOutputStream bytes = new ByteArrayOutputStream(1024); byte[] buffer = new byte[1024]; int readBytes = 0; while((readBytes = in.read(buffer)) != -1) { bytes.write(buffer, 0, readBytes); } buffer = bytes.toByteArra...
static public int nextPowerOfTwo (int value) { if (value == 0) return 1; if ((value & value - 1) == 0) return value; value |= value >> 1; value |= value >> 2; value |= value >> 4; value |= value >> 8; value |= value >> 16; return value + 1; }
static public int nextPowerOfTwo (int value) { if (value == 0) return 1; value--; value |= value >> 1; value |= value >> 2; value |= value >> 4; value |= value >> 8; value |= value >> 16; return value + 1; }
/** index to the next free event, package private for touch handlers **/ int freeEventIndex = 0; /** whether multitouch is supported or not **/ final boolean hasMultitouch; AndroidInput( AndroidApplication activity, GLSurfaceView view, int sleepTime ) { view.setOnKeyListener( this ); view.setOnTouchListen...
/** index to the next free event, package private for touch handlers **/ int freeEventIndex = 0; /** whether multitouch is supported or not **/ final boolean hasMultitouch; AndroidInput( AndroidApplication activity, View view, int sleepTime ) { view.setOnKeyListener( this ); view.setOnTouchListener( this ...
public void create () { batch = new SpriteBatch(); atlas = new TextureAtlas(Gdx.files.internal("data")); badlogic = atlas.createSprite("badlogicslice"); badlogic.setPosition(50, 50); badlogicSmall = atlas.createSprite("badlogicsmall"); badlogicSmall.setPosition(10, 10); badlogicSmall.flip(true, true);...
public void create () { batch = new SpriteBatch(); atlas = new TextureAtlas(Gdx.files.internal("data/pack")); badlogic = atlas.createSprite("badlogicslice"); badlogic.setPosition(50, 50); badlogicSmall = atlas.createSprite("badlogicsmall"); badlogicSmall.setPosition(10, 10); badlogicSmall.flip(true, t...
public String toString() { return "@" + annotationType.getName(); } } static boolean isBindingAnnotation(Annotation annotation) { return isBindingAnnotation(annotation.annotationType()); } static boolean isBindingAnnotation( Class<? extends Annotation> a...
public String toString() { return "@" + annotationType.getName(); } } static boolean isBindingAnnotation(Annotation annotation) { return isBindingAnnotation(annotation.annotationType()); } static boolean isBindingAnnotation( Class<? extends Annotation> a...
private final boolean exposed; /** * @param method the method to invoke. It's return type must be the same type as {@code key}. */ ProviderMethod(Key<T> key, Method method, Object instance, ImmutableSet<Dependency<?>> dependencies, List<Provider<?>> parameterProviders, ...
private final boolean exposed; /** * @param method the method to invoke. It's return type must be the same type as {@code key}. */ ProviderMethod(Key<T> key, Method method, Object instance, ImmutableSet<Dependency<?>> dependencies, List<Provider<?>> parameterProviders, ...
public List<ProviderMethod<?>> getProviderMethods(Binder binder) { List<ProviderMethod<?>> result = Lists.newArrayList(); for (Class<?> c = delegate.getClass(); c != Object.class; c = c.getSuperclass()) { for (Method method : c.getDeclaredMethods()) { if (method.isAnnotat...
public List<ProviderMethod<?>> getProviderMethods(Binder binder) { List<ProviderMethod<?>> result = Lists.newArrayList(); for (Class<?> c = delegate.getClass(); c != Object.class; c = c.getSuperclass()) { for (Method method : c.getDeclaredMethods()) { if (method.getAnnota...
public V visit(ProviderBinding<? extends T> providerBinding) { return visitOther((Binding) providerBinding); }
public V visit(ProviderBinding<? extends T> providerBinding) { return visitOther((Binding<? extends T>) providerBinding); }
private static Map<String, Array<ModelLoaderHints>> defaultHints = new HashMap<String, Array<ModelLoaderHints>>(); // registering the default loaders here static { /* TODO: Move/Drop support registerLoader("dae", new ColladaLoader(), new ModelLoaderHints(false)); registerLoader("dae", new ColladaLoaderSkeleto...
private static Map<String, Array<ModelLoaderHints>> defaultHints = new HashMap<String, Array<ModelLoaderHints>>(); // registering the default loaders here static { /* TODO: Move/Drop support registerLoader("dae", new ColladaLoader(), new ModelLoaderHints(false)); registerLoader("dae", new ColladaLoaderSkeleto...
public RefreshStats refresh() { return this.refresh(); }
public RefreshStats refresh() { return this.refreshStats; }
public IOSObjectALSound (FileHandle filePath) { soundPath = filePath.path(); soundBuffer = OALSimpleAudio.sharedInstance().preloadEffect(soundPath); }
public IOSObjectALSound (FileHandle filePath) { soundPath = filePath.file().getPath().replace('\\', '/'); soundBuffer = OALSimpleAudio.sharedInstance().preloadEffect(soundPath); }
public static void main (String[] argv) { // this is only here for me to debug native code faster new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio"); new SharedLibraryLoader("../../extensions/gdx-image/libs/gdx-image-natives.jar").load("gdx-image"); new SharedLib...
public static void main (String[] argv) { // this is only here for me to debug native code faster new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio"); new SharedLibraryLoader("../../extensions/gdx-image/libs/gdx-image-natives.jar").load("gdx-image"); new SharedLib...
@Override public void processTokenFilters(TokenFiltersBindings tokenFiltersBindings) { tokenFiltersBindings.processTokenFilter("snowball", SnowballTokenFilterFactory.class); tokenFiltersBindings.processTokenFilter("stemmer", StemmerTokenFilterFactory.class); tokenFiltersBindi...
@Override public void processTokenFilters(TokenFiltersBindings tokenFiltersBindings) { tokenFiltersBindings.processTokenFilter("snowball", SnowballTokenFilterFactory.class); tokenFiltersBindings.processTokenFilter("stemmer", StemmerTokenFilterFactory.class); tokenFiltersBindi...
@Inject public AbstractCompoundWordTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, Environment env, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name, settings); minWordSize = settings.getAsInt("min_word_size", CompoundWordTokenFilterBase....
@Inject public AbstractCompoundWordTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, Environment env, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name, settings); minWordSize = settings.getAsInt("min_word_size", CompoundWordTokenFilterBase....
public void execute(SearchContext context) { try { context.rewriteQuery(); THashSet<Term> termsSet = new THashSet<Term>(); context.query().extractTerms(termsSet); Term[] terms = termsSet.toArray(new Term[termsSet.size()]); int[] freqs = context.se...
public void execute(SearchContext context) { try { context.rewriteQuery(); THashSet<Term> termsSet = new THashSet<Term>(); context.query().extractTerms(termsSet); Term[] terms = termsSet.toArray(new Term[termsSet.size()]); int[] freqs = context.se...
public void execute(SearchContext searchContext) throws QueryPhaseExecutionException { try { searchContext.queryResult().from(searchContext.from()); searchContext.queryResult().size(searchContext.size()); Query query = searchContext.query(); if (searchContext...
public void execute(SearchContext searchContext) throws QueryPhaseExecutionException { try { searchContext.queryResult().from(searchContext.from()); searchContext.queryResult().size(searchContext.size()); Query query = searchContext.query(); if (searchContext...
@Target({ElementType.PARAMETER, ElementType.FIELD, ElementType.METHOD}) /* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Elastic Search licenses this * fi...
@Target({ElementType.PARAMETER, ElementType.FIELD, ElementType.METHOD}) /* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Elastic Search licenses this * fi...
public JoglSound (JoglAudio audio, JoglFileHandle file) throws UnsupportedAudioFileException, IOException { this.audio = audio; InputStream fin = new BufferedInputStream(new FileInputStream(file.getFile())); AudioInputStream ain = AudioSystem.getAudioInputStream(fin); AudioFormat baseFormat = ain.getFormat(); ...
public JoglSound (JoglAudio audio, JoglFileHandle file) throws UnsupportedAudioFileException, IOException { this.audio = audio; InputStream fin = new BufferedInputStream(file.readFile()); AudioInputStream ain = AudioSystem.getAudioInputStream(fin); AudioFormat baseFormat = ain.getFormat(); AudioFormat decode...
public LwjglSound (LwjglAudio audio, LwjglFileHandle file) throws UnsupportedAudioFileException, IOException { this.audio = audio; InputStream fin = new BufferedInputStream(new FileInputStream(file.getFile())); AudioInputStream ain = AudioSystem.getAudioInputStream(fin); AudioFormat baseFormat = ain.getFormat(...
public LwjglSound (LwjglAudio audio, LwjglFileHandle file) throws UnsupportedAudioFileException, IOException { this.audio = audio; InputStream fin = new BufferedInputStream(file.readFile()); AudioInputStream ain = AudioSystem.getAudioInputStream(fin); AudioFormat baseFormat = ain.getFormat(); AudioFormat dec...
protected void processFile (Entry inputFile) throws Exception { inputFile.inputFile.delete(); } }; deleteProcessor.setRecursive(false); String scaledPackFileName = rootSettings.scaledPackFileName(packFileName, i); File packFile = new File(scaledPackFileName); String prefix = packFi...
protected void processFile (Entry inputFile) throws Exception { inputFile.inputFile.delete(); } }; deleteProcessor.setRecursive(false); String scaledPackFileName = rootSettings.getScaledPackFileName(packFileName, i); File packFile = new File(scaledPackFileName); String prefix = pac...
private MetaData loadGlobalState() { long highestVersion = -1; MetaData metaData = null; for (File dataLocation : nodeEnv.nodeDataLocations()) { File stateLocation = new File(dataLocation, "_state"); if (!stateLocation.exists()) { continue; ...
private MetaData loadGlobalState() { long highestVersion = -1; MetaData metaData = null; for (File dataLocation : nodeEnv.nodeDataLocations()) { File stateLocation = new File(dataLocation, "_state"); if (!stateLocation.exists()) { continue; ...
public void test() { for (int i = 0; i < 10000; ++i) { final double lat = randomDouble() * 180 - 90; final double lon = randomDouble() * 360 - 180; final Distance precision = new Distance(randomDouble() * 10, randomFrom(Arrays.asList(DistanceUnit.MILLIMETERS, DistanceUnit...
public void test() { for (int i = 0; i < 10000; ++i) { final double lat = randomDouble() * 180 - 90; final double lon = randomDouble() * 360 - 180; final Distance precision = new Distance(1+(randomDouble() * 9), randomFrom(Arrays.asList(DistanceUnit.MILLIMETERS, DistanceU...
@Override public void flush(Flush flush) throws EngineException { if (indexWriter == null) { throw new EngineClosedException(shardId, failedEngine); } // check outside the lock as well so we can check without blocking on the write lock if (disableFlushCounter > 0) { ...
@Override public void flush(Flush flush) throws EngineException { if (indexWriter == null) { throw new EngineClosedException(shardId, failedEngine); } // check outside the lock as well so we can check without blocking on the write lock if (disableFlushCounter > 0) { ...
protected void setStage (Stage stage) { super.setStage(stage); Actor[] childrenArray = children.items; for (int i = 0, n = children.size; i < n; i++) childrenArray[i].setStage(stage); }
protected void setStage (Stage stage) { super.setStage(stage); Actor[] childrenArray = children.items; for (int i = 0, n = children.size; i < n; i++) childrenArray[i].setStage(stage); // StackOverflowError here means the group is its own ancestor. }
private void mainLoop () { try { graphics.setupDisplay(); } catch (LWJGLException e) { throw new GdxRuntimeException(e); } listener.create(); listener.resize(graphics.getWidth(), graphics.getHeight()); int lastWidth = graphics.getWidth(); int lastHeight = graphics.getHeight(); graphics.lastTim...
private void mainLoop () { try { graphics.setupDisplay(); } catch (LWJGLException e) { throw new GdxRuntimeException(e); } listener.create(); listener.resize(graphics.getWidth(), graphics.getHeight()); int lastWidth = graphics.getWidth(); int lastHeight = graphics.getHeight(); graphics.lastTim...
public T[] ensureCapacity (int additionalCapacity) { int sizeNeeded = size + additionalCapacity; if (sizeNeeded > items.length) resize(Math.max(8, sizeNeeded)); return items; }
public T[] ensureCapacity (int additionalCapacity) { int sizeNeeded = size + additionalCapacity; if (sizeNeeded >= items.length) resize(Math.max(8, sizeNeeded)); return items; }
long serverOpen(); /* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Elastic Search licenses this * file to you under the Apache License, Version 2.0 (the ...
long serverOpen(); /* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Elastic Search licenses this * file to you under the Apache License, Version 2.0 (the ...
public void resume(Application app) { device = app.getAudio().newAudioDevice(true); recorder = app.getAudio().newAudioRecoder( 22050, true ); }
public void resume(Application app) { device = app.getAudio().newAudioDevice(true); recorder = app.getAudio().newAudioRecoder( 44100, true ); }
@Override public JsonMapper.Builder parse(String name, JsonNode node, ParserContext parserContext) throws MapperParsingException { ObjectNode booleanNode = (ObjectNode) node; JsonBooleanFieldMapper.Builder builder = booleanField(name); parseJsonField(builder, name, booleanNod...
@Override public JsonMapper.Builder parse(String name, JsonNode node, ParserContext parserContext) throws MapperParsingException { ObjectNode booleanNode = (ObjectNode) node; JsonBooleanFieldMapper.Builder builder = booleanField(name); parseJsonField(builder, name, booleanNod...
@Override public JsonMapper.Builder parse(String name, JsonNode node, ParserContext parserContext) throws MapperParsingException { ObjectNode dateNode = (ObjectNode) node; JsonDateFieldMapper.Builder builder = dateField(name); parseNumberField(builder, name, dateNode, parserC...
@Override public JsonMapper.Builder parse(String name, JsonNode node, ParserContext parserContext) throws MapperParsingException { ObjectNode dateNode = (ObjectNode) node; JsonDateFieldMapper.Builder builder = dateField(name); parseNumberField(builder, name, dateNode, parserC...
@Override public JsonMapper.Builder parse(String name, JsonNode node, ParserContext parserContext) throws MapperParsingException { ObjectNode doubleNode = (ObjectNode) node; JsonDoubleFieldMapper.Builder builder = doubleField(name); parseNumberField(builder, name, doubleNode,...
@Override public JsonMapper.Builder parse(String name, JsonNode node, ParserContext parserContext) throws MapperParsingException { ObjectNode doubleNode = (ObjectNode) node; JsonDoubleFieldMapper.Builder builder = doubleField(name); parseNumberField(builder, name, doubleNode,...
@Override public JsonMapper.Builder parse(String name, JsonNode node, ParserContext parserContext) throws MapperParsingException { ObjectNode floatNode = (ObjectNode) node; JsonFloatFieldMapper.Builder builder = floatField(name); parseNumberField(builder, name, floatNode, par...
@Override public JsonMapper.Builder parse(String name, JsonNode node, ParserContext parserContext) throws MapperParsingException { ObjectNode floatNode = (ObjectNode) node; JsonFloatFieldMapper.Builder builder = floatField(name); parseNumberField(builder, name, floatNode, par...
@Override public JsonMapper.Builder parse(String name, JsonNode node, ParserContext parserContext) throws MapperParsingException { ObjectNode shortNode = (ObjectNode) node; JsonShortFieldMapper.Builder builder = shortField(name); parseNumberField(builder, name, shortNode, par...
@Override public JsonMapper.Builder parse(String name, JsonNode node, ParserContext parserContext) throws MapperParsingException { ObjectNode shortNode = (ObjectNode) node; JsonShortFieldMapper.Builder builder = shortField(name); parseNumberField(builder, name, shortNode, par...
@Inject public ZenDiscovery(Settings settings, ClusterName clusterName, ThreadPool threadPool, TransportService transportService, ClusterService clusterService, ZenPingService pingService) { super(settings); this.clusterName = clusterNa...
@Inject public ZenDiscovery(Settings settings, ClusterName clusterName, ThreadPool threadPool, TransportService transportService, ClusterService clusterService, ZenPingService pingService) { super(settings); this.clusterName = clusterNa...
public IndexDynamicSettingsModule() { indexDynamicSettings = new DynamicSettings(); indexDynamicSettings.addDynamicSetting(AbstractIndexStore.INDEX_STORE_THROTTLE_MAX_BYTES_PER_SEC); indexDynamicSettings.addDynamicSetting(AbstractIndexStore.INDEX_STORE_THROTTLE_TYPE); indexDynamicSet...
public IndexDynamicSettingsModule() { indexDynamicSettings = new DynamicSettings(); indexDynamicSettings.addDynamicSetting(AbstractIndexStore.INDEX_STORE_THROTTLE_MAX_BYTES_PER_SEC); indexDynamicSettings.addDynamicSetting(AbstractIndexStore.INDEX_STORE_THROTTLE_TYPE); indexDynamicSet...
public double readDouble () throws IOException { return Double.longBitsToDouble(readLong()); }
public double readDouble () throws IOException { throw new RuntimeException("readDouble"); }
private void parseMaterials (ModelData model, JsonValue json, String materialDir) { JsonValue materials = json.get("materials"); if(materials == null) { // we should probably create some default material in this case } else { model.materials.ensureCapacity(materials.size()); for (JsonValue material = ...
private void parseMaterials (ModelData model, JsonValue json, String materialDir) { JsonValue materials = json.get("materials"); if(materials == null) { // we should probably create some default material in this case } else { model.materials.ensureCapacity(materials.size()); for (JsonValue material = ...
public void addAll (boolean[] array, int offset, int length) { boolean[] items = this.items; int sizeNeeded = size + length; if (sizeNeeded >= items.length) items = resize(Math.max(8, (int)(sizeNeeded * 1.75f))); System.arraycopy(array, offset, items, size, length); size += length; }
public void addAll (boolean[] array, int offset, int length) { boolean[] items = this.items; int sizeNeeded = size + length - offset; if (sizeNeeded >= items.length) items = resize(Math.max(8, (int)(sizeNeeded * 1.75f))); System.arraycopy(array, offset, items, size, length); size += length; }
public void addAll (char[] array, int offset, int length) { char[] items = this.items; int sizeNeeded = size + length ; if (sizeNeeded >= items.length) items = resize(Math.max(8, (int)(sizeNeeded * 1.75f))); System.arraycopy(array, offset, items, size, length); size += length; }
public void addAll (char[] array, int offset, int length) { char[] items = this.items; int sizeNeeded = size + length - offset; if (sizeNeeded >= items.length) items = resize(Math.max(8, (int)(sizeNeeded * 1.75f))); System.arraycopy(array, offset, items, size, length); size += length; }
public void addAll (float[] array, int offset, int length) { float[] items = this.items; int sizeNeeded = size + length; if (sizeNeeded >= items.length) items = resize(Math.max(8, (int)(sizeNeeded * 1.75f))); System.arraycopy(array, offset, items, size, length); size += length; }
public void addAll (float[] array, int offset, int length) { float[] items = this.items; int sizeNeeded = size + length - offset; if (sizeNeeded >= items.length) items = resize(Math.max(8, (int)(sizeNeeded * 1.75f))); System.arraycopy(array, offset, items, size, length); size += length; }
public void addAll (int[] array, int offset, int length) { int[] items = this.items; int sizeNeeded = size + length; if (sizeNeeded >= items.length) items = resize(Math.max(8, (int)(sizeNeeded * 1.75f))); System.arraycopy(array, offset, items, size, length); size += length; }
public void addAll (int[] array, int offset, int length) { int[] items = this.items; int sizeNeeded = size + length - offset; if (sizeNeeded >= items.length) items = resize(Math.max(8, (int)(sizeNeeded * 1.75f))); System.arraycopy(array, offset, items, size, length); size += length; }
public void writeValue (Object value, Class knownType, Class elementType) { try { if (value == null) { writer.value(null); return; } if ((knownType != null && knownType.isPrimitive()) || knownType == String.class || knownType == Integer.class || knownType == Boolean.class || knownType == Float....
public void writeValue (Object value, Class knownType, Class elementType) { try { if (value == null) { writer.value(null); return; } if ((knownType != null && knownType.isPrimitive()) || knownType == String.class || knownType == Integer.class || knownType == Boolean.class || knownType == Float....
public void addAll (long[] array, int offset, int length) { long[] items = this.items; int sizeNeeded = size + length; if (sizeNeeded >= items.length) items = resize(Math.max(8, (int)(sizeNeeded * 1.75f))); System.arraycopy(array, offset, items, size, length); size += length; }
public void addAll (long[] array, int offset, int length) { long[] items = this.items; int sizeNeeded = size + length - offset; if (sizeNeeded >= items.length) items = resize(Math.max(8, (int)(sizeNeeded * 1.75f))); System.arraycopy(array, offset, items, size, length); size += length; }
public void addAll (short[] array, int offset, int length) { short[] items = this.items; int sizeNeeded = size + length; if (sizeNeeded >= items.length) items = resize(Math.max(8, (int)(sizeNeeded * 1.75f))); System.arraycopy(array, offset, items, size, length); size += length; }
public void addAll (short[] array, int offset, int length) { short[] items = this.items; int sizeNeeded = size + length - offset; if (sizeNeeded >= items.length) items = resize(Math.max(8, (int)(sizeNeeded * 1.75f))); System.arraycopy(array, offset, items, size, length); size += length; }
public String glGetActiveUniform (int program, int index, IntBuffer size, Buffer type) { // FIXME this is less than ideal of course... IntBuffer typeTmp = BufferUtils.createIntBuffer(2); String name = GL20.glGetActiveUniform(program, index, 256, typeTmp); size.put(typeTmp.get(0)); if (type instanceof IntBuff...
public String glGetActiveUniform (int program, int index, IntBuffer size, Buffer type) { // FIXME this is less than ideal of course... IntBuffer typeTmp = BufferUtils.createIntBuffer(2); String name = GL20.glGetActiveUniform(program, index, 256, typeTmp); size.put(typeTmp.get(0)); if (type instanceof IntBuff...
private void consolidate () { if (newData == null) { return; } // System.out.println("consolidate(); ndp: " + newDataPos + " nd-len: " + newData.length()); if (data.length() < newDataPos) { StringBuilder filler = new StringBuilder(); while (data.length() + filler.length() < newDataPos) { filler.ap...
public void close () throws IOException { if (data != null) { flush(); data = null; } } void consolidate () { if (newData == null) { return; } // System.out.println("consolidate(); ndp: " + newDataPos + " nd-len: " + newData.length()); if (data.length() < newDataPos) { StringBuilder filler =...
public void begin () { for(int i = 0; i < count; i++) { textures[i].texture = null; if(weights != null) weights[i] = 0; } }
public void begin () { for(int i = 0; i < count; i++) { textures[i].reset(); if(weights != null) weights[i] = 0; } }
private void focusChanged (FocusEvent event) { Stage stage = getStage(); if (isModal && stage != null && stage.getRoot().getChildren().size > 0 && stage.getRoot().getChildren().peek() == Dialog.this) { // Dialog is top most actor. Actor newFocusedActor = event.getRelatedActor(); if (newFocused...
private void focusChanged (FocusEvent event) { Stage stage = getStage(); if (isModal && stage != null && stage.getRoot().getChildren().size > 0 && stage.getRoot().getChildren().peek() == Dialog.this) { // Dialog is top most actor. Actor newFocusedActor = event.getRelatedActor(); if (newFocused...
public HighlightField highlight(HighlighterContext highlighterContext) { SearchContextHighlight.Field field = highlighterContext.field; CacheEntry cacheEntry = (CacheEntry) highlighterContext.hitContext.cache().get("test-custom"); final int docId = highlighterContext.hitContext.readerContext...
public HighlightField highlight(HighlighterContext highlighterContext) { SearchContextHighlight.Field field = highlighterContext.field; CacheEntry cacheEntry = (CacheEntry) highlighterContext.hitContext.cache().get("test-custom"); final int docId = highlighterContext.hitContext.readerContext...
@Override public Query parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); // move to the field value String queryString = null; String defaultField = AllFieldMapper.NAME; // default to all MapperQueryPars...
@Override public Query parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); // move to the field value String queryString = null; String defaultField = AllFieldMapper.NAME; // default to all MapperQueryPars...
public synchronized String getDiagonistics () { StringBuffer buffer = new StringBuffer(); for (String fileName : assetTypes.keys()) { buffer.append(fileName); buffer.append(", "); Class type = assetTypes.get(fileName); RefCountedContainer assetRef = assets.get(type).get(fileName); Array<String> dep...
public synchronized String getDiagnostics () { StringBuffer buffer = new StringBuffer(); for (String fileName : assetTypes.keys()) { buffer.append(fileName); buffer.append(", "); Class type = assetTypes.get(fileName); RefCountedContainer assetRef = assets.get(type).get(fileName); Array<String> depe...
public void render () { Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); boolean result = manager.update(); if (result & !diagnosed) { Gdx.app.log("AssetManagerTest", "\n" + manager.getDiagonistics() + "\n" + Texture.getManagedStatus()); diagnosed = false; // invalidateTexture(manager.get("data/animation.png", ...
public void render () { Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); boolean result = manager.update(); if (result & !diagnosed) { Gdx.app.log("AssetManagerTest", "\n" + manager.getDiagnostics() + "\n" + Texture.getManagedStatus()); diagnosed = false; // invalidateTexture(manager.get("data/animation.png", T...
protected void allocRenderable(){ renderable = new Renderable(); renderable.primitiveType = GL20.GL_POINTS; renderable.meshPartOffset = 0; renderable.material = new Material( new BlendingAttribute(GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA, 1f), new DepthTestAttribute(GL20.GL_LEQUAL, false), TextureAttribu...
protected void allocRenderable(){ renderable = new Renderable(); renderable.primitiveType = GL20.GL_POINTS; renderable.meshPartOffset = 0; renderable.material = new Material( new BlendingAttribute(GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA, 1f), new DepthTestAttribute(GL20.GL_LEQUAL, false), TextureAttribu...
public String toString () { return "[" + x + ", " + y + ", " + z + "]"; }
public String toString () { return x + "," + y + "," + z; }
private void setLayoutEnabled (Group parent, boolean enabled) { SnapshotArray<Actor> children = parent.getChildren(); for (int i = 0, n = children.size; i < n; i++) { Actor actor = children.get(i); if (actor instanceof Layout) ((Layout)actor).setLayoutEnabled(enabled); else if (actor instanceof Group)...
private void setLayoutEnabled (Group parent, boolean enabled) { SnapshotArray<Actor> children = getChildren(); for (int i = 0, n = children.size; i < n; i++) { Actor actor = children.get(i); if (actor instanceof Layout) ((Layout)actor).setLayoutEnabled(enabled); else if (actor instanceof Group) // ...
public void setColor (float r, float g, float b, float a) { int intBits = (int)(255 * a) << 24 | (int)(255 * b) << 16 | (int)(255 * g) << 8 | (int)(255 * r); color = Float.intBitsToFloat(intBits); }
public void setColor (float r, float g, float b, float a) { int intBits = (int)(255 * a) << 24 | (int)(255 * b) << 16 | (int)(255 * g) << 8 | (int)(255 * r); color = Float.intBitsToFloat((intBits & 0xfeffffff)); }
public void setColor (float r, float g, float b, float a) { int intBits = ((int)(255 * a) << 24) | ((int)(255 * b) << 16) | ((int)(255 * g) << 8) | ((int)(255 * r)); float color = Float.intBitsToFloat(intBits); if (color == this.color) return; this.color = color; float[] vertices = this.vertices; for (int ...
public void setColor (float r, float g, float b, float a) { int intBits = ((int)(255 * a) << 24) | ((int)(255 * b) << 16) | ((int)(255 * g) << 8) | ((int)(255 * r)); float color = Float.intBitsToFloat((intBits & 0xfeffffff)); if (color == this.color) return; this.color = color; float[] vertices = this.vertic...
public void rebuild( ) { if( mesh == null ) { FloatMesh m = new FloatMesh( 6 * text.length(), 3, false, false, true, 1, 2, false, 0 ); mesh = new MeshRenderer( graphics.getGL10(), m, false, font.isManaged() ); } if( mesh.getMaximumVertices() / 6 < text.length() ) { mesh.dispose(); Floa...
public void rebuild( ) { if( mesh == null ) { FloatMesh m = new FloatMesh( 6 * text.length(), 3, false, false, true, 1, 2, false, 0 ); mesh = new MeshRenderer( graphics.getGL10(), m, false, font.isManaged() ); } if( mesh.getMesh().getMaximumVertices() / 6 < text.length() ) { mesh.dispose(...
public void render(Application app) { GL10 gl = app.getGraphics().getGL10(); gl.glViewport( 0, 0, app.getGraphics().getWidth(), app.getGraphics().getHeight() ); gl.glClearColor( 0.7f, 0.7f, 0.7f, 1 ); gl.glClear( GL10.GL_COLOR_BUFFER_BIT ); gl.glEnable(GL10.GL_TEXTURE_2D ); texture.bind(); mesh.ren...
public void render(Application app) { GL10 gl = app.getGraphics().getGL10(); gl.glViewport( 0, 0, app.getGraphics().getWidth(), app.getGraphics().getHeight() ); gl.glClearColor( 0.7f, 0.7f, 0.7f, 1 ); gl.glClear( GL10.GL_COLOR_BUFFER_BIT ); gl.glEnable(GL10.GL_TEXTURE_2D ); texture.bind(); mesh.ren...
protected void masterOperation(final ClusterSearchShardsRequest request, final ClusterState state, final ActionListener<ClusterSearchShardsResponse> listener) throws ElasticsearchException { ClusterState clusterState = clusterService.state(); String[] concreteIndices = clusterState.metaData().concre...
protected void masterOperation(final ClusterSearchShardsRequest request, final ClusterState state, final ActionListener<ClusterSearchShardsResponse> listener) throws ElasticsearchException { ClusterState clusterState = clusterService.state(); String[] concreteIndices = clusterState.metaData().concre...
protected void masterOperation(final ClusterStateRequest request, final ClusterState state, ActionListener<ClusterStateResponse> listener) throws ElasticsearchException { ClusterState currentState = clusterService.state(); logger.trace("Serving cluster state request using version {}", currentState.v...
protected void masterOperation(final ClusterStateRequest request, final ClusterState state, ActionListener<ClusterStateResponse> listener) throws ElasticsearchException { ClusterState currentState = clusterService.state(); logger.trace("Serving cluster state request using version {}", currentState.v...
protected void masterOperation(GetAliasesRequest request, ClusterState state, ActionListener<AliasesExistResponse> listener) throws ElasticsearchException { String[] concreteIndices = state.metaData().concreteIndices(request.indices(), request.indicesOptions()); request.indices(concreteIndices); ...
protected void masterOperation(GetAliasesRequest request, ClusterState state, ActionListener<AliasesExistResponse> listener) throws ElasticsearchException { String[] concreteIndices = state.metaData().concreteIndices(request.indicesOptions(), request.indices()); request.indices(concreteIndices); ...
protected void masterOperation(GetAliasesRequest request, ClusterState state, ActionListener<GetAliasesResponse> listener) throws ElasticsearchException { String[] concreteIndices = state.metaData().concreteIndices(request.indices(), request.indicesOptions()); request.indices(concreteIndices); ...
protected void masterOperation(GetAliasesRequest request, ClusterState state, ActionListener<GetAliasesResponse> listener) throws ElasticsearchException { String[] concreteIndices = state.metaData().concreteIndices(request.indicesOptions(), request.indices()); request.indices(concreteIndices); ...
protected ClusterBlockException checkRequestBlock(ClusterState state, AnalyzeRequest request) { if (request.index() != null) { request.index(state.metaData().concreteIndex(request.index())); return state.blocks().indexBlockedException(ClusterBlockLevel.READ, request.index()); ...
protected ClusterBlockException checkRequestBlock(ClusterState state, AnalyzeRequest request) { if (request.index() != null) { request.index(state.metaData().concreteSingleIndex(request.index())); return state.blocks().indexBlockedException(ClusterBlockLevel.READ, request.index()); ...