buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
@Inject public MmapFsStore(ShardId shardId, @IndexSettings Settings indexSettings, Environment environment, @LocalNodeId String localNodeId) throws IOException { super(shardId, indexSettings); // by default, we don't need to sync to disk, since we use the gateway this.syncToDisk = componentS...
@Inject public MmapFsStore(ShardId shardId, @IndexSettings Settings indexSettings, Environment environment, @LocalNodeId String localNodeId) throws IOException { super(shardId, indexSettings); // by default, we don't need to sync to disk, since we use the gateway this.syncToDisk = componentS...
@Inject public NioFsStore(ShardId shardId, @IndexSettings Settings indexSettings, Environment environment, @LocalNodeId String localNodeId) throws IOException { super(shardId, indexSettings); // by default, we don't need to sync to disk, since we use the gateway this.syncToDisk = componentSe...
@Inject public NioFsStore(ShardId shardId, @IndexSettings Settings indexSettings, Environment environment, @LocalNodeId String localNodeId) throws IOException { super(shardId, indexSettings); // by default, we don't need to sync to disk, since we use the gateway this.syncToDisk = componentSe...
@Inject public SimpleFsStore(ShardId shardId, @IndexSettings Settings indexSettings, Environment environment, @LocalNodeId String localNodeId) throws IOException { super(shardId, indexSettings); // by default, we don't need to sync to disk, since we use the gateway this.syncToDisk = componen...
@Inject public SimpleFsStore(ShardId shardId, @IndexSettings Settings indexSettings, Environment environment, @LocalNodeId String localNodeId) throws IOException { super(shardId, indexSettings); // by default, we don't need to sync to disk, since we use the gateway this.syncToDisk = componen...
public void toJson (Object object, Class knownType, Class elementType, FileHandle file) { Writer writer = null; try { writer = file.writer(false, "UTF-8"); toJson(object, knownType, elementType, writer); } catch (Exception ex) { throw new SerializationException("Error writing file: " + file, ex); } fi...
public void toJson (Object object, Class knownType, Class elementType, FileHandle file) { Writer writer = null; try { writer = file.writer(false); toJson(object, knownType, elementType, writer); } catch (Exception ex) { throw new SerializationException("Error writing file: " + file, ex); } finally { ...
public JsonValue parse (FileHandle file) { try { return parse(file.reader("UTF-8")); } catch (Exception ex) { throw new SerializationException("Error parsing file: " + file, ex); } }
public JsonValue parse (FileHandle file) { try { return parse(file.read()); } catch (Exception ex) { throw new SerializationException("Error parsing file: " + file, ex); } }
@Required public CountRequest querySource(QueryBuilder queryBuilder) { return querySource(queryBuilder.build()); }
@Required public CountRequest querySource(QueryBuilder queryBuilder) { return querySource(queryBuilder.buildAsString()); }
@Required public DeleteByQueryRequest querySource(QueryBuilder queryBuilder) { return querySource(queryBuilder.build()); }
@Required public DeleteByQueryRequest querySource(QueryBuilder queryBuilder) { return querySource(queryBuilder.buildAsString()); }
@Required public IndexDeleteByQueryRequest querySource(QueryBuilder queryBuilder) { return querySource(queryBuilder.build()); }
@Required public IndexDeleteByQueryRequest querySource(QueryBuilder queryBuilder) { return querySource(queryBuilder.buildAsString()); }
private static JsonBuilder convert(RestRequest request, Throwable t) throws IOException { JsonBuilder builder = jsonBuilder().prettyPrint() .startObject().field("error", detailedMessage(t)); if (t != null && request.paramAsBoolean("errorTrace", false)) { builder.startObje...
private static JsonBuilder convert(RestRequest request, Throwable t) throws IOException { JsonBuilder builder = binaryJsonBuilder().prettyPrint() .startObject().field("error", detailedMessage(t)); if (t != null && request.paramAsBoolean("errorTrace", false)) { builder.sta...
@Override public void handleRequest(RestRequest request, RestChannel channel) { try { JsonBuilder builder = RestJsonBuilder.cached(request).prettyPrint(); builder.startObject(); builder.field("ok", true); if (settings.get("name") != null) { bui...
@Override public void handleRequest(RestRequest request, RestChannel channel) { try { JsonBuilder builder = RestJsonBuilder.restJsonBuilder(request).prettyPrint(); builder.startObject(); builder.field("ok", true); if (settings.get("name") != null) { ...
public static String parseQuerySource(RestRequest request) { if (request.hasContent()) { return request.contentAsString(); } String queryString = request.param("q"); if (queryString == null) { throw new ElasticSearchIllegalArgumentException("No query to execut...
public static String parseQuerySource(RestRequest request) { if (request.hasContent()) { return request.contentAsString(); } String queryString = request.param("q"); if (queryString == null) { throw new ElasticSearchIllegalArgumentException("No query to execut...
@Override public void parse(JsonParser jp, SearchContext context) throws Exception { JsonToken token; SearchContextFacets.QueryExecutionType queryExecutionType = SearchContextFacets.QueryExecutionType.COLLECT; List<SearchContextFacets.QueryFacet> queryFacets = null; while ((token = j...
@Override public void parse(JsonParser jp, SearchContext context) throws Exception { JsonToken token; SearchContextFacets.QueryExecutionType queryExecutionType = SearchContextFacets.QueryExecutionType.COLLECT; List<SearchContextFacets.QueryFacet> queryFacets = null; while ((token = j...
@Override public void parse(JsonParser jp, SearchContext context) throws Exception { JsonIndexQueryParser indexQueryParser = (JsonIndexQueryParser) context.queryParser(); Query query = indexQueryParser.parse(jp, context.source()); query.setBoost(query.getBoost() * context.queryBoost()); ...
@Override public void parse(JsonParser jp, SearchContext context) throws Exception { JsonIndexQueryParser indexQueryParser = (JsonIndexQueryParser) context.queryParser(); Query query = indexQueryParser.parse(jp); query.setBoost(query.getBoost() * context.queryBoost()); context.query(...
public static void main (String[] argv) { // this is only here for me to debug native code faster new SharedLibraryLoader("../../gdx/libs/gdx-natives.jar").load("gdx"); new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio"); new SharedLibraryLoader("../../extensions/...
public static void main (String[] argv) { // this is only here for me to debug native code faster new SharedLibraryLoader("../../gdx/libs/gdx-natives.jar").load("gdx"); new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio"); new SharedLibraryLoader("../../extensions/...
public List<Comment> loadInBackground() { try { Gist gist = store.addGist(service.getGist(id)); List<Comment> comments; if (gist.getComments() > 0) comments = service.getComments(id); else...
public List<Comment> loadInBackground() { try { Gist gist = store.addGist(service.getGist(id)); List<Comment> comments; if (gist.getComments() > 0) comments = service.getComments(id); else...
public void translate (float velocityX, float velocityY) { /** If velocities squares summed is shorter than Epsilon it could lead ~0 length rayCast that cause nasty c++ assertion * inside box2d. This is so short distance that moving particle has no effect so this return early. */ if ((velocityX * velocityX ...
public void translate (float velocityX, float velocityY) { /** If velocities squares summed is shorter than Epsilon it could lead ~0 length rayCast that cause nasty c++ assertion * inside box2d. This is so short distance that moving particle has no effect so this return early. */ if ((velocityX * velocityX ...
public Mesh (VertexDataType type, boolean isStatic, int maxVertices, int maxIndices, VertexAttribute... attributes) { // if (type == VertexDataType.VertexArray && Gdx.graphics.isGL20Available()) type = VertexDataType.VertexBufferObject; if (type == VertexDataType.VertexBufferObject || Mesh.forceVBO) { vertices =...
public Mesh (VertexDataType type, boolean isStatic, int maxVertices, int maxIndices, VertexAttribute... attributes) { // if (type == VertexDataType.VertexArray && Gdx.graphics.isGL20Available()) type = VertexDataType.VertexBufferObject; if (type == VertexDataType.VertexBufferObject) { vertices = new VertexBuffer...
public enum ApplicationType { Android, Desktop, Applet, WebGL }
public enum ApplicationType { Android, Desktop, Applet, WebGL, iOS }
public void run () { try { mainLoop(); } catch (Throwable t) { error("GwtApplication", "exception: " + t.getMessage(), t); throw new RuntimeException(t); } } }.scheduleRepeating((int)((1f / config.fps) * 1000)); } void mainLoop() { graphics.update(); if (Gdx.graphics.getWidth()...
public void run () { try { mainLoop(); } catch (Throwable t) { error("GwtApplication", "exception: " + t.getMessage(), t); throw new RuntimeException(t); } } }.scheduleRepeating((int)((1f / config.fps) * 1000)); } void mainLoop() { graphics.update(); if (Gdx.graphics.getWidth()...
public void rotateAround (Vector3 point, Vector3 axis, float angle) { tmpVec.set(point); tmpVec.sub(position); translate(tmpVec); rotate(axis, angle); tmpVec.rotate(axis, angle); translate(tmpVec.mul(-1)); }
public void rotateAround (Vector3 point, Vector3 axis, float angle) { tmpVec.set(point); tmpVec.sub(position); translate(tmpVec); rotate(axis, angle); tmpVec.rotate(axis, angle); translate(-tmpVec.x, -tmpVec.y, -tmpVec.z); }
public void create () { super.create(); final Mesh barMesh = new Mesh(true, 8, 36, new VertexAttribute(Usage.Position, 3, "a_position")); barMesh.setVertices(new float[] {5f, 0.5f, 0.5f, 5f, 0.5f, -0.5f, -5f, 0.5f, 0.5f, -5f, 0.5f, -0.5f, 5f, -0.5f, 0.5f, 5f, -0.5f, -0.5f, -5f, -0.5f, 0.5f, -5f, -0.5f, -0.5f...
public void create () { super.create(); final Mesh barMesh = new Mesh(true, 8, 36, new VertexAttribute(Usage.Position, 3, "a_position")); barMesh.setVertices(new float[] {5f, 0.5f, 0.5f, 5f, 0.5f, -0.5f, -5f, 0.5f, 0.5f, -5f, 0.5f, -0.5f, 5f, -0.5f, 0.5f, 5f, -0.5f, -0.5f, -5f, -0.5f, 0.5f, -5f, -0.5f, -0.5f...
public static void writeFont (BitmapFontData fontData, String[] pageRefs, FileHandle outFntFile, FontInfo info, int scaleW, int scaleH) { if (info == null) { info = new FontInfo(); info.face = outFntFile.nameWithoutExtension(); } int lineHeight = (int)fontData.lineHeight; int pages = pageRefs.length; ...
public static void writeFont (BitmapFontData fontData, String[] pageRefs, FileHandle outFntFile, FontInfo info, int scaleW, int scaleH) { if (info == null) { info = new FontInfo(); info.face = outFntFile.nameWithoutExtension(); } int lineHeight = (int)fontData.lineHeight; int pages = pageRefs.length; ...
public static boolean pushScissors (Rectangle scissor) { fix(scissor); if (scissors.size == 0) { if (scissor.width < 1 || scissor.height < 1) return false; Gdx.gl.glEnable(GL10.GL_SCISSOR_TEST); } else { // merge scissors Rectangle parent = scissors.get(scissors.size - 1); float minX = Math.max(p...
public static boolean pushScissors (Rectangle scissor) { fix(scissor); if (scissors.size == 0) { if (scissor.width < 1 || scissor.height < 1) return false; Gdx.gl.glEnable(GL10.GL_SCISSOR_TEST); } else { // merge scissors Rectangle parent = scissors.get(scissors.size - 1); float minX = Math.max(p...
@Test public void simpleIndexTemplateTests() throws Exception { clean(); client.admin().indices().preparePutTemplate("template_1") .setTemplate("te*") .setOrder(0) .addMapping("type1", XContentFactory.jsonBuilder().startObject().startObject("type1").s...
@Test public void simpleIndexTemplateTests() throws Exception { clean(); client.admin().indices().preparePutTemplate("template_1") .setTemplate("te*") .setOrder(0) .addMapping("type1", XContentFactory.jsonBuilder().startObject().startObject("type1").s...
private ProcessInfo() { }
private long id; ProcessInfo() { }
public void onConfigurationChanged (Configuration config) { super.onConfigurationChanged(config); boolean keyboardAvailable = false; if (config.keyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO) keyboardAvailable = true; input.keyboardAvailable = keyboardAvailable; }
public void onConfigurationChanged (Configuration config) { super.onConfigurationChanged(config); boolean keyboardAvailable = false; if (config.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO) keyboardAvailable = true; input.keyboardAvailable = keyboardAvailable; }
public synchronized void unload (String fileName) { // check if it's in the queue int foundIndex = -1; for (int i = 0; i < loadQueue.size; i++) { if (loadQueue.get(i).fileName.equals(fileName)) { foundIndex = i; break; } } if (foundIndex != -1) { toLoad--; loadQueue.removeIndex(foundIndex...
public synchronized void unload (String fileName) { // check if it's in the queue int foundIndex = -1; for (int i = 0; i < loadQueue.size; i++) { if (loadQueue.get(i).fileName.equals(fileName)) { foundIndex = i; break; } } if (foundIndex != -1) { toLoad--; loadQueue.removeIndex(foundIndex...
public synchronized void beforeTest(Random random, double transportClientRatio) throws IOException { super.beforeTest(random, transportClientRatio); cluster.beforeTest(random, transportClientRatio); Settings defaultSettings = cluster.getDefaultSettings(); final Client client = cluste...
public synchronized void beforeTest(Random random, double transportClientRatio) throws IOException { super.beforeTest(random, transportClientRatio); cluster.beforeTest(random, transportClientRatio); Settings defaultSettings = cluster.getDefaultSettings(); final Client client = cluste...
import com.badlogic.gdx.controllers.desktop.ois.OisListener; package com.badlogic.gdx.controllers; import java.awt.Frame; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import javax.swing.JFrame; import javax.swing.SwingUtilities; import org.lwj...
import com.badlogic.gdx.controllers.desktop.ois.OisListener; package com.badlogic.gdx.controllers; import java.awt.Frame; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import javax.swing.JFrame; import javax.swing.SwingUtilities; import org.lwj...
private void innerToXContent(XContentBuilder builder, boolean includeDefaults) throws IOException { if (includeDefaults || enabled != Defaults.ENABLED) { builder.field("enabled", enabled); } if (includeDefaults || autoBoost != false) { builder.field("auto_boost", auto...
private void innerToXContent(XContentBuilder builder, boolean includeDefaults) throws IOException { if (includeDefaults || enabled != Defaults.ENABLED) { builder.field("enabled", enabled); } if (includeDefaults || autoBoost != false) { builder.field("auto_boost", auto...
public void setEnvironment (String name) { if (name == null) return; if (cubemap != null) { cubemap.dispose(); cubemap = null; } if (name.equals("<none>")) { if (lights.has(CubemapAttribute.EnvironmentMap)) { lights.remove(CubemapAttribute.EnvironmentMap); shaderProvider.clear(); } } else...
public void setEnvironment (String name) { if (name == null) return; if (cubemap != null) { cubemap.dispose(); cubemap = null; } if (name.equals("<none>")) { if (lights.has(CubemapAttribute.EnvironmentMap)) { lights.remove(CubemapAttribute.EnvironmentMap); shaderProvider.clear(); } } else...
public boolean scrolled (InputEvent event, int amount) { resetFade(); if (scrollY) setScrollY(amountY + Math.max(areaHeight * 0.9f, maxY * 0.1f) / 4 * amount); else if (scrollX) // setScrollX(amountX + Math.max(areaWidth * 0.9f, maxX * 0.1f) / 4 * amount); return true; } }); } void ...
public boolean scrolled (InputEvent event, int amount) { resetFade(); if (scrollY) setScrollY(amountY + Math.max(areaHeight * 0.9f, maxY * 0.1f) / 4 * amount); else if (scrollX) // setScrollX(amountX + Math.max(areaWidth * 0.9f, maxX * 0.1f) / 4 * amount); return true; } }); } void ...
public void testSniffMode() throws ExecutionException, InterruptedException { Settings settings = ImmutableSettings.builder().put("client.transport.nodes_sampler_interval", "1s") .put("name", "transport_client_sniff_mode").put(ClusterName.SETTING, cluster().getClusterName()) ...
public void testSniffMode() throws ExecutionException, InterruptedException { Settings settings = ImmutableSettings.builder().put(requiredSettings()).put("client.transport.nodes_sampler_interval", "1s") .put("name", "transport_client_sniff_mode").put(ClusterName.SETTING, cluster().getCluste...
public ApplicationListener getApplicationListener () { return new GwtTestWrapper(); }
public ApplicationListener getApplicationListener () { return new UITest(); }
public Vector3 crs (float x, float y, float z) { return this.set(y * z - z * y, z * x - x * z, x * y - y * x); }
public Vector3 crs (float x, float y, float z) { return this.set(this.y * z - this.z * y, this.z * x - this.x * z, this.x * y - this.y * x); }
public boolean handle (Event event) { if (!(event instanceof ChangeEvent)) return false; changed((ChangeEvent)event, event.getTargetActor()); return false; }
public boolean handle (Event event) { if (!(event instanceof ChangeEvent)) return false; changed((ChangeEvent)event, event.getTarget()); return false; }
public static Tuple<Settings, Environment> prepareSettings(Settings pSettings, boolean loadConfigSettings) { // ignore this prefixes when getting properties from es. and elasticsearch. String[] ignorePrefixes = new String[]{"es.default.", "elasticsearch.default."}; // just create enough sett...
public static Tuple<Settings, Environment> prepareSettings(Settings pSettings, boolean loadConfigSettings) { // ignore this prefixes when getting properties from es. and elasticsearch. String[] ignorePrefixes = new String[]{"es.default.", "elasticsearch.default."}; // just create enough sett...
private void testLocal () throws IOException { String path = "meow"; FileHandle handle = Gdx.files.local(path); handle.delete(); if (handle.exists()) fail(); if (handle.isDirectory()) fail(); if (handle.delete()) fail(); if (handle.list().length != 0) fail(); if (handle.child("meow").exists()) fail(); ...
private void testLocal () throws IOException { String path = "meow"; FileHandle handle = Gdx.files.local(path); handle.delete(); if (handle.exists()) fail(); if (handle.isDirectory()) fail(); if (handle.delete()) fail(); if (handle.list().length != 0) fail(); if (handle.child("meow").exists()) fail(); ...
private static native long getByteBufferAddress (ByteBuffer buffer); /* return (long) env->GetDirectBufferAddress(buffer); */
private static native long getByteBufferAddress (ByteBuffer buffer); /* return (long) buffer; */
public int skip(int count) { int total = Math.min(available, count); available -= total; readPosition = (readPosition + total) % buffer.length; return total; }
public int skip(int count) { int total = count = Math.min(available, count); available -= total; readPosition = (readPosition + total) % buffer.length; return total; }
public JsonValue parse (InputStream input) { try { return parse(new InputStreamReader(input, "UTF-8")); } catch (IOException ex) { throw new SerializationException(ex); } finally { StreamUtils.closeQuietly(input); } }
public JsonValue parse (InputStream input) { try { return parse(new InputStreamReader(input, "ISO-8859-1")); } catch (IOException ex) { throw new SerializationException(ex); } finally { StreamUtils.closeQuietly(input); } }
public CustomNumericField(NumberFieldMapper mapper, byte[] value) { this.mapper = mapper; this.name = mapper.names().indexName(); fieldsData = value; isIndexed = mapper.indexed(); isTokenized = mapper.indexed(); omitTermFreqAndPositions = ...
public CustomNumericField(NumberFieldMapper mapper, byte[] value) { this.mapper = mapper; this.name = mapper.names().indexName(); fieldsData = value; isIndexed = mapper.indexed(); isTokenized = mapper.indexed(); omitTermFreqAndPositions = ...
@Inject public FsGateway(Settings settings, ThreadPool threadPool, ClusterService clusterService, Environment environment, ClusterName clusterName) throws IOException { super(settings, threadPool, clusterService); File gatewayFile; String location = componentSet...
@Inject public FsGateway(Settings settings, ThreadPool threadPool, ClusterService clusterService, Environment environment, ClusterName clusterName) throws IOException { super(settings, threadPool, clusterService); File gatewayFile; String location = componentSet...
private void deleteShard(int shardId, boolean delete, boolean snapshotGateway, boolean deleteGateway, String reason) throws ElasticSearchException { Injector shardInjector; IndexShard indexShard; synchronized (this) { Map<Integer, Injector> tmpShardInjectors = newHashMap(shardsIn...
private void deleteShard(int shardId, boolean delete, boolean snapshotGateway, boolean deleteGateway, String reason) throws ElasticSearchException { Injector shardInjector; IndexShard indexShard; synchronized (this) { Map<Integer, Injector> tmpShardInjectors = newHashMap(shardsIn...
private void deleteIndex(String index, boolean delete, String reason, @Nullable Executor executor) throws ElasticSearchException { Injector indexInjector; IndexService indexService; synchronized (this) { indexInjector = indicesInjectors.remove(index); if (indexInjecto...
private void deleteIndex(String index, boolean delete, String reason, @Nullable Executor executor) throws ElasticSearchException { Injector indexInjector; IndexService indexService; synchronized (this) { indexInjector = indicesInjectors.remove(index); if (indexInjecto...
public void setEnabled (Actor actor, boolean enabled) { actor.touchable = enabled; // Get current style. Method method = findMethod(actor.getClass(), "getStyle"); if (method == null) return; Object style; try { style = method.invoke(actor); } catch (Exception ignored) { return; } // Determine n...
public void setEnabled (Actor actor, boolean enabled) { actor.setTouchable(enabled); // Get current style. Method method = findMethod(actor.getClass(), "getStyle"); if (method == null) return; Object style; try { style = method.invoke(actor); } catch (Exception ignored) { return; } // Determine...
protected String models[] = new String[] {"car.obj", "cube.obj", "scene.obj", "scene2.obj", "wheel.obj", "g3d/invaders.g3dj", "g3d/head.g3db", "g3d/knight.g3dj", "g3d/knight.g3db", "g3d/ship.obj", "g3d/shapes/cube_1.0x1.0.g3dj", "g3d/shapes/cube_1.5x1.5.g3dj", "g3d/shapes/sphere.g3dj", "g3d/shapes/teapot.g3dj", "g...
protected String models[] = new String[] {"car.obj", "cube.obj", "scene.obj", "scene2.obj", "wheel.obj", "g3d/invaders.g3dj", "g3d/head.g3db", "g3d/knight.g3dj", "g3d/knight.g3db", "g3d/monkey.g3db", "g3d/ship.obj", "g3d/shapes/cube_1.0x1.0.g3dj", "g3d/shapes/cube_1.5x1.5.g3dj", "g3d/shapes/sphere.g3dj", "g3d/shap...
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, ...
public void parse(XContentParser parser, SearchContext context) throws Exception { XContentParser.Token token; List<String> includes = null, excludes = null; String currentFieldName = null; token = parser.currentToken(); // we get it on the value if (token == XContentParser....
public void parse(XContentParser parser, SearchContext context) throws Exception { XContentParser.Token token; List<String> includes = null, excludes = null; String currentFieldName = null; token = parser.currentToken(); // we get it on the value if (parser.isBooleanValue())...
public ExitStatus execute(Settings settings, Environment env) throws Exception { XContentBuilder builder = jsonBuilder().startObject().field("_id", 1).field("file").startObject(); if (base64text != null) { // If base64 is provided builder.field("_content"...
public ExitStatus execute(Settings settings, Environment env) throws Exception { XContentBuilder builder = jsonBuilder().startObject().field("_id", 1).field("file").startObject(); if (base64text != null) { // If base64 is provided builder.field("_content"...
public boolean setDisplayMode (DisplayMode displayMode) { if (!super.setDisplayMode(displayMode)) return false; LwjglAWTCanvas.this.setDisplayMode(displayMode.width, displayMode.height); return true; } }; if (Gdx.audio == null) { audio = new OpenALAudio(); Gdx.audio = audio; } else { au...
public boolean setDisplayMode (DisplayMode displayMode) { if (!super.setDisplayMode(displayMode)) return false; LwjglAWTCanvas.this.setDisplayMode(displayMode.width, displayMode.height); return true; } }; if (!LwjglApplicationConfiguration.disableAudio && Gdx.audio == null) { audio = new OpenAL...
static public void toFloat (short[] src, int offsetSrc, float[] dst, int offsetDst, int numBytes) { float scale = 1.0f / Short.MAX_VALUE; for (int i = offsetSrc, ii = offsetDst; i < numBytes; i++, ii++) dst[i] = src[ii] * scale; }
static public void toFloat (short[] src, int offsetSrc, float[] dst, int offsetDst, int numBytes) { float scale = 1.0f / Short.MAX_VALUE; for (int i = offsetSrc, ii = offsetDst; i < numBytes; i++, ii++) dst[ii] = src[i] * scale; }
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-...
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-...
public enum GraphicsType { AndroidGL, JoglGL, LWJGL, Angle, WebGL, iOSGL }
public enum GraphicsType { AndroidGL, LWJGL, Angle, WebGL, iOSGL }
public static String VERSION = "0.9.7"; }
public static String VERSION = "0.9.8"; }
private void addGlyph (Glyph glyph, float x, float y, float width, float height) { float x2 = x + width; float y2 = y + height; final float u = glyph.u; final float u2 = glyph.u2; final float v = glyph.v; final float v2 = glyph.v2; final float[] vertices = this.vertices; if (integer) { x = Math.ro...
private void addGlyph (Glyph glyph, float x, float y, float width, float height) { float x2 = x + width; float y2 = y + height; final float u = glyph.u; final float u2 = glyph.u2; final float v = glyph.v; final float v2 = glyph.v2; final float[] vertices = this.vertices; if (integer) { x = Math.ro...
private MD2Frame loadFrame (MD2Header header, LittleEndianInputStream in) throws IOException { MD2Frame frame = new MD2Frame(); frame.vertices = new float[header.numVertices * 3]; frame.normalIndices = new int[header.numVertices]; float scaleX = in.readFloat(), scaleY = in.readFloat(), scaleZ = in.readFloat()...
private MD2Frame loadFrame (MD2Header header, LittleEndianInputStream in) throws IOException { MD2Frame frame = new MD2Frame(); frame.vertices = new float[header.numVertices * 3]; frame.normalIndices = new int[header.numVertices]; float scaleX = in.readFloat(), scaleY = in.readFloat(), scaleZ = in.readFloat()...
public void rotateAround (Vector3 point, Vector3 axis, float angle) { tmpVec.set(point); tmpVec.sub(position); translate(tmpVec); rotate(axis, angle); tmpVec.rotate(axis, angle); translate(-tmpVec.x, -tmpVec.y, -tmpVec.z); }
public void rotateAround (Vector3 point, Vector3 axis, float angle) { tmpVec.set(point); tmpVec.sub(position); translate(tmpVec); rotate(axis, angle); tmpVec.rotate(axis, angle); translate(tmpVec.mul(-1)); }
public void create () { super.create(); final Mesh barMesh = new Mesh(true, 8, 36, new VertexAttribute(Usage.Position, 3, "a_position")); barMesh.setVertices(new float[] {5f, 0.5f, 0.5f, 5f, 0.5f, -0.5f, -5f, 0.5f, 0.5f, -5f, 0.5f, -0.5f, 5f, -0.5f, 0.5f, 5f, -0.5f, -0.5f, -5f, -0.5f, 0.5f, -5f, -0.5f, -0.5f...
public void create () { super.create(); final Mesh barMesh = new Mesh(true, 8, 36, new VertexAttribute(Usage.Position, 3, "a_position")); barMesh.setVertices(new float[] {5f, 0.5f, 0.5f, 5f, 0.5f, -0.5f, -5f, 0.5f, 0.5f, -5f, 0.5f, -0.5f, 5f, -0.5f, 0.5f, 5f, -0.5f, -0.5f, -5f, -0.5f, 0.5f, -5f, -0.5f, -0.5f...
protected float update(float delta) { if (loopCount != 0 && animation != null) { final float diff = speed * delta; time += diff; int loops = (int)Math.abs(time / duration); if (time < 0f) { loops++; while (time < 0f) time += duration; } time = Math.abs(time % duration); ...
protected float update(float delta) { if (loopCount != 0 && animation != null) { final float diff = speed * delta; time += diff; int loops = (int)Math.abs(time / duration); if (time < 0f) { loops++; while (time < 0f) time += duration; } time = Math.abs(time % duration); ...
protected abstract ListAdapter adapterFor(List<E> items);
public void onLoadFinished(Loader<List<E>> loader, List<E> items) { setListAdapter(adapterFor(items)); if (isResumed()) { setListShown(true); } else { setListShownNoAnimation(true); } } abstract ListAdapter adapterFor(List<E> items);
public void run () { try { mainLoop(); } catch (Throwable t) { error("GwtApplication", "exception: " + t.getMessage(), t); throw new RuntimeException(t); } } }.scheduleRepeating((int)((1f / config.fps) * 1000)); } void mainLoop() { graphics.update(); if (Gdx.graphics.getWidth()...
public void run () { try { mainLoop(); } catch (Throwable t) { error("GwtApplication", "exception: " + t.getMessage(), t); throw new RuntimeException(t); } } }.scheduleRepeating((int)((1f / config.fps) * 1000)); } void mainLoop() { graphics.update(); if (Gdx.graphics.getWidth()...
private void drawDebugRects (ShapeRenderer shapes) { if (debugRects == null || !getDebug()) return; shapes.set(ShapeType.Line); shapes.setColor(getStage().getDebugColor()); float x = 0, y = 0; if (!isTransform()) { x = getX(); y = getY(); } for (int i = 0, n = debugRects.size; i < n; i++) { Debu...
private void drawDebugRects (ShapeRenderer shapes) { if (debugRects == null || !getDebug()) return; shapes.set(ShapeType.Line); shapes.setColor(getStage().getDebugColor()); float x = 0, y = 0; if (!isTransform()) { x = getX(); y = getY(); } for (int i = 0, n = debugRects.size; i < n; i++) { Debu...
public boolean touchDown (int screenX, int screenY, int pointer, int button) { boolean result = false; if (button == Buttons.LEFT) { Ray ray = camera.getPickRay(screenX, screenY); tmpV1.set(ray.direction).scl(10f).add(ray.origin); ClosestRayResultCallback cb = new ClosestRayResultCallback(ray.origin, tmpV...
public boolean touchDown (int screenX, int screenY, int pointer, int button) { boolean result = false; if (button == Buttons.LEFT) { Ray ray = camera.getPickRay(screenX, screenY); tmpV1.set(ray.direction).scl(10f).add(ray.origin); ClosestRayResultCallback cb = new ClosestRayResultCallback(ray.origin, tmpV...
public Joint createJoint (JointDef def) { long jointAddr = createProperJoint(def); Joint joint = null; if (def.type == JointType.DistanceJoint) joint = new DistanceJoint(this, jointAddr); if (def.type == JointType.FrictionJoint) joint = new FrictionJoint(this, jointAddr); if (def.type == JointType.GearJoint)...
public Joint createJoint (JointDef def) { long jointAddr = createProperJoint(def); Joint joint = null; if (def.type == JointType.DistanceJoint) joint = new DistanceJoint(this, jointAddr); if (def.type == JointType.FrictionJoint) joint = new FrictionJoint(this, jointAddr); if (def.type == JointType.GearJoint)...
public void testSimpleTTL() throws Exception { client().admin().indices().prepareDelete().execute().actionGet(); client().admin().indices().prepareCreate("test") .addMapping("type1", XContentFactory.jsonBuilder() .startObject() .startO...
public void testSimpleTTL() throws Exception { client().admin().indices().prepareDelete().execute().actionGet(); client().admin().indices().prepareCreate("test") .addMapping("type1", XContentFactory.jsonBuilder() .startObject() .startO...
@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 parse(String facetName, XContentParser parser, SearchContext context) { XContentIndexQueryParser indexQueryParser = (XContentIndexQueryParser) context.queryParser(); Query facetQuery = indexQueryParser.parse(parser).query(); return new QueryFacetCollector(face...
@Override public void parse(XContentParser parser, SearchContext context) throws Exception { XContentIndexQueryParser indexQueryParser = (XContentIndexQueryParser) context.queryParser(); byte[] querySource = parser.binaryValue(); XContentParser qSourceParser = XContentFactory.xContent(queryS...
@Override public void parse(XContentParser parser, SearchContext context) throws Exception { XContentIndexQueryParser indexQueryParser = (XContentIndexQueryParser) context.queryParser(); byte[] querySource = parser.binaryValue(); XContentParser qSourceParser = XContentFactory.xContent(queryS...
@Override public void parse(XContentParser parser, SearchContext context) throws Exception { XContentIndexQueryParser indexQueryParser = (XContentIndexQueryParser) context.queryParser(); Query query = indexQueryParser.parse(parser); context.query(query); }
@Override public void parse(XContentParser parser, SearchContext context) throws Exception { XContentIndexQueryParser indexQueryParser = (XContentIndexQueryParser) context.queryParser(); Query query = indexQueryParser.parse(parser).query(); context.query(query); }
public void layout (float layoutX, float layoutY, float layoutWidth, float layoutHeight) { Toolkit toolkit = this.toolkit; ArrayList<Cell> cells = this.cells; if (sizeInvalid) computeSize(); float hpadding = w(padLeft) + w(padRight); float vpadding = h(padTop) + h(padBottom); // totalMinWidth/totalMinHe...
public void layout (float layoutX, float layoutY, float layoutWidth, float layoutHeight) { Toolkit toolkit = this.toolkit; ArrayList<Cell> cells = this.cells; if (sizeInvalid) computeSize(); float hpadding = w(padLeft) + w(padRight); float vpadding = h(padTop) + h(padBottom); // totalMinWidth/totalMinHe...
private static final String tag = "IOSGraphics"; IOSApplication app; IOSInput input; IOSGLES20 gl20; int width;
private static final String tag = "IOSGraphics"; IOSApplication app; IOSInput input; GL20 gl20; int width;
public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case id.gist_comment: startActivityForResult(CreateCommentActivity.createIntent(), REQUEST_CODE_COMMENT); return true; case id.gist_delete: ConfirmDialogFragment.confirm(this...
public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case id.gist_comment: startActivityForResult(CreateCommentActivity.createIntent(), REQUEST_CODE_COMMENT); return true; case id.gist_delete: ConfirmDialogFragment.show(this, R...
public org.elasticsearch.index.fielddata.FieldDataType fieldDataType2() { return new FieldDataType("string"); }
public org.elasticsearch.index.fielddata.FieldDataType fieldDataType2() { return new FieldDataType("string", "paged_bytes"); }
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); boolean cache = false; // default to false, since its using fielddata cache CacheKeyFilter.Key cacheKey = null; String fieldName = null; ...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); boolean cache = false; // default to false, since its using fielddata cache CacheKeyFilter.Key cacheKey = null; String fieldName = null; ...
public void onListItemClick(ListView l, View v, int position, long id) { Event event = (Event) l.getItemAtPosition(position); if (TYPE_DOWNLOAD.equals(event.getType())) { openDownload(event); return; } Issue issue = issueMatcher.getIssue(event); if (...
public void onListItemClick(ListView l, View v, int position, long id) { Event event = (Event) l.getItemAtPosition(position); if (TYPE_DOWNLOAD.equals(event.getType())) { openDownload(event); return; } Issue issue = issueMatcher.getIssue(event); if (...
protected String models[] = new String[] { "car.obj", "cube.obj", "scene.obj", "scene2.obj", "sphere.obj", "wheel.obj", "g3d/invaders.g3dj", "g3d/head.g3db", "g3d/knight.g3dj", "g3d/knight.g3db", "g3d/ship.obj", "g3d/teapot.g3db" };
protected String models[] = new String[] { "car.obj", "cube.obj", "scene.obj", "scene2.obj", "sphere.obj", "wheel.obj", "g3d/head.g3db", "g3d/knight.g3dj", "g3d/knight.g3db", "g3d/ship.obj", "g3d/teapot.g3db" };
public void create () { super.create(); world.maxSubSteps = 20; world.add("ground", 0f, 0f, 0f).setColor(0.25f + 0.5f * (float)Math.random(), 0.25f + 0.5f * (float)Math.random(), 0.25f + 0.5f * (float)Math.random(), 1f); // Note: not every model is suitable for a one on one translation with a soft body, ...
public void create () { super.create(); world.maxSubSteps = 20; world.add("ground", 0f, 0f, 0f).setColor(0.25f + 0.5f * (float)Math.random(), 0.25f + 0.5f * (float)Math.random(), 0.25f + 0.5f * (float)Math.random(), 1f); // Note: not every model is suitable for a one on one translation with a soft body, ...
public void create () { Settings.load(); Assets.load(); setScreen(new MainMenuScreen(this)); fps = new FPSLogger(); }
public void create () { Settings.load(); Assets.load(); setScreen(new GameScreen(this)); fps = new FPSLogger(); }
public void setScaleY (float scale) { this.scale.y += scale; updated = false; }
public void setScaleY (float scale) { this.scale.y = scale; updated = false; }
private void parseMeshes (ModelData model, JsonValue json) { JsonValue meshes = json.require("meshes"); model.meshes.ensureCapacity(meshes.size()); for (JsonValue mesh = meshes.child(); mesh != null; mesh = mesh.next()) { ModelMesh jsonMesh = new ModelMesh(); String id = mesh.getString("id", ""); ...
private void parseMeshes (ModelData model, JsonValue json) { JsonValue meshes = json.require("meshes"); model.meshes.ensureCapacity(meshes.size()); for (JsonValue mesh = meshes.child(); mesh != null; mesh = mesh.next()) { ModelMesh jsonMesh = new ModelMesh(); String id = mesh.getString("id", ""); ...
public void run () { if (listener.longPress(pointer1.x, pointer1.y)) longPressFired = true; } };
public void run () { longPressFired = listener.longPress(pointer1.x, pointer1.y); } };
public static boolean intersectRayBounds (Ray ray, BoundingBox box, Vector3 intersection) { Vector3.tmp.set(ray.origin); Vector3.tmp2.set(ray.origin); Vector3.tmp.sub(box.min); Vector3.tmp.sub(box.max); if (Vector3.tmp.x > 0 && Vector3.tmp.y > 0 && Vector3.tmp.z > 0 && Vector3.tmp2.x < 0 && Vector3.tmp2.y < ...
public static boolean intersectRayBounds (Ray ray, BoundingBox box, Vector3 intersection) { Vector3.tmp.set(ray.origin); Vector3.tmp2.set(ray.origin); Vector3.tmp.sub(box.min); Vector3.tmp2.sub(box.max); if (Vector3.tmp.x > 0 && Vector3.tmp.y > 0 && Vector3.tmp.z > 0 && Vector3.tmp2.x < 0 && Vector3.tmp2.y <...
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 (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 (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 (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 (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 (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 (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 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 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 - 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 (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 (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 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; }
protected String models[] = new String[] { "car.obj", "cube.obj", "scene.obj", "scene2.obj", "sphere.obj", "wheel.obj", "g3d/head.g3db", "g3d/knight.g3dj", "g3d/knight.g3db", "g3d/ship.obj", "g3d/teapot.g3db" };
protected String models[] = new String[] { "car.obj", "cube.obj", "scene.obj", "scene2.obj", "sphere.obj", "wheel.obj", "g3d/invaders.g3dj", "g3d/head.g3db", "g3d/knight.g3dj", "g3d/knight.g3db", "g3d/ship.obj", "g3d/teapot.g3db" };
public ByteFieldMapper build(BuilderContext context) { fieldType.setOmitNorms(fieldType.omitNorms() || boost != 1.0f); ByteFieldMapper fieldMapper = new ByteFieldMapper(buildNames(context), precisionStep, fuzzyFactor, boost, fieldType, nullValue, ignoreMalformed(conte...
public ByteFieldMapper build(BuilderContext context) { fieldType.setOmitNorms(fieldType.omitNorms() && boost == 1.0f); ByteFieldMapper fieldMapper = new ByteFieldMapper(buildNames(context), precisionStep, fuzzyFactor, boost, fieldType, nullValue, ignoreMalformed(conte...
public DateFieldMapper build(BuilderContext context) { boolean parseUpperInclusive = Defaults.PARSE_UPPER_INCLUSIVE; if (context.indexSettings() != null) { parseUpperInclusive = context.indexSettings().getAsBoolean("index.mapping.date.parse_upper_inclusive", Defaults.PARS...
public DateFieldMapper build(BuilderContext context) { boolean parseUpperInclusive = Defaults.PARSE_UPPER_INCLUSIVE; if (context.indexSettings() != null) { parseUpperInclusive = context.indexSettings().getAsBoolean("index.mapping.date.parse_upper_inclusive", Defaults.PARS...
public DoubleFieldMapper build(BuilderContext context) { fieldType.setOmitNorms(fieldType.omitNorms() || boost != 1.0f); DoubleFieldMapper fieldMapper = new DoubleFieldMapper(buildNames(context), precisionStep, fuzzyFactor, boost, fieldType, nullValue, ...
public DoubleFieldMapper build(BuilderContext context) { fieldType.setOmitNorms(fieldType.omitNorms() && boost == 1.0f); DoubleFieldMapper fieldMapper = new DoubleFieldMapper(buildNames(context), precisionStep, fuzzyFactor, boost, fieldType, nullValue, ...
public FloatFieldMapper build(BuilderContext context) { fieldType.setOmitNorms(fieldType.omitNorms() || boost != 1.0f); FloatFieldMapper fieldMapper = new FloatFieldMapper(buildNames(context), precisionStep, fuzzyFactor, boost, fieldType, nullValue, ...
public FloatFieldMapper build(BuilderContext context) { fieldType.setOmitNorms(fieldType.omitNorms() && boost == 1.0f); FloatFieldMapper fieldMapper = new FloatFieldMapper(buildNames(context), precisionStep, fuzzyFactor, boost, fieldType, nullValue, ...
public IntegerFieldMapper build(BuilderContext context) { fieldType.setOmitNorms(fieldType.omitNorms() || boost != 1.0f); IntegerFieldMapper fieldMapper = new IntegerFieldMapper(buildNames(context), precisionStep, fuzzyFactor, boost, fieldType, nul...
public IntegerFieldMapper build(BuilderContext context) { fieldType.setOmitNorms(fieldType.omitNorms() && boost == 1.0f); IntegerFieldMapper fieldMapper = new IntegerFieldMapper(buildNames(context), precisionStep, fuzzyFactor, boost, fieldType, nul...
public LongFieldMapper build(BuilderContext context) { fieldType.setOmitNorms(fieldType.omitNorms() || boost != 1.0f); LongFieldMapper fieldMapper = new LongFieldMapper(buildNames(context), precisionStep, fuzzyFactor, boost, fieldType, nullValue, i...
public LongFieldMapper build(BuilderContext context) { fieldType.setOmitNorms(fieldType.omitNorms() && boost != 1.0f); LongFieldMapper fieldMapper = new LongFieldMapper(buildNames(context), precisionStep, fuzzyFactor, boost, fieldType, nullValue, i...
public ShortFieldMapper build(BuilderContext context) { fieldType.setOmitNorms(fieldType.omitNorms() || boost != 1.0f); ShortFieldMapper fieldMapper = new ShortFieldMapper(buildNames(context), precisionStep, fuzzyFactor, boost, fieldType, nullValue, ...
public ShortFieldMapper build(BuilderContext context) { fieldType.setOmitNorms(fieldType.omitNorms() && boost == 1.0f); ShortFieldMapper fieldMapper = new ShortFieldMapper(buildNames(context), precisionStep, fuzzyFactor, boost, fieldType, nullValue, ...
public IpFieldMapper build(BuilderContext context) { fieldType.setOmitNorms(fieldType.omitNorms() || boost != 1.0f); IpFieldMapper fieldMapper = new IpFieldMapper(buildNames(context), precisionStep, boost, fieldType, nullValue, ignoreMalformed(context)); f...
public IpFieldMapper build(BuilderContext context) { fieldType.setOmitNorms(fieldType.omitNorms() && boost == 1.0f); IpFieldMapper fieldMapper = new IpFieldMapper(buildNames(context), precisionStep, boost, fieldType, nullValue, ignoreMalformed(context)); f...
public void resize (int width, int height) { System.out.println(viewport); viewport.update(width, height); }
public void resize (int width, int height) { System.out.println(viewport.getClass().getSimpleName()); viewport.update(width, height); }
protected ItemListAdapter<Gist, ? extends ItemView> createAdapter( List<Gist> items) { return new GistListAdapter(avatarHelper, getActivity() .getLayoutInflater(), items.toArray(new Gist[items.size()])); }
protected ItemListAdapter<Gist, ? extends ItemView> createAdapter( List<Gist> items) { return new GistListAdapter(avatars, getActivity() .getLayoutInflater(), items.toArray(new Gist[items.size()])); }