lucene大于(lucene larger than)
你们中的任何人都知道如何搜索所有大于指定数字的数字吗?
例如:所有文档编号> 65
我尝试过:documentNumber:[65 TO *]但是我收到异常,因为lucene期望解析一个没有*的数字。
提前致谢!
Does anybody of you guys know how to search all the numbers larget than a specified one?
for example: all the document number > 65
i tried like: documentNumber: [65 TO *] but i receive exception, as lucene expected to parse a number there not a *.
Thanks in advance!
原文:https://stackoverflow.com/questions/1472724
最满意答案
好的,在你的屏幕(gameScreen和另一个)中删除“extends Game”,只留下工具屏幕。
然后,而不是像gameScreen中那样使用setScreen(game2)。 像这样用它:
game.setScreen(game2)//添加“游戏”。
多数民众赞成因为你的屏幕不会从游戏延伸,但你在该领域得到了游戏,所以你可以从中使用它。
并且仅作为额外:不要将另一个实例称为“game2”,因为它不是游戏。 并且不要使用小写字母来开始类的名称(gameScreen应该是GameScreen),但这只是约定,如果你这样做,由你决定。
Ok, in your screens (gameScreen and Another) delete "extends Game", only leave implements Screen.
Then instead of using setScreen(game2) like that in gameScreen. Use it like this:
game.setScreen(game2) //add "game."
thats because your screen wont extend from game, but you get the game in that field, so you can use it from it.
And only as an extra: dont call the Another instance "game2" because it is not a game. And dont use lowercase letter to begin the name of a class (gameScreen should be GameScreen), but thats only convention, up to you if you do it.
相关问答
更多-
看起来你忘了设置输入处理器 Gdx.input.setInputProcessor(var); 您应该在MenuScreen show()方法中调用此方法。 这样引擎会知道你的输入处理器*。 代码如下所示: public class MenuScreen extends InputAdapter implements Screen { ... @Override public void show() { Gdx.input.setInputProcessor(t ...
-
返回Libgdx中的密钥(Back Key in Libgdx)[2022-02-28]
如果您希望应用程序捕获后退键而不是操作系统,那么您希望使用true而不是false作为setCatchBackKey方法的参数。 另见文档 : 设置是否应捕获Android上的BACK按钮。 这样可以防止应用暂停。 对桌面没有任何影响。 If you want your application to catch the back key instead of the OS, then you want to use true instead of false as argument of the setCa ... -
您只需在第二个屏幕上添加一个标志即可忽略第一个touchup事件。 private boolean isFirstTouchUp = true; 在touchup事件中,添加此代码, if(isFirstTouchUp){ isFirstTouchUp = false; }else{ // Do you touchup event here, } 希望我能帮到你:D You can simply add a flag on the second screen to ignore the first ...
-
根据您希望何时完成,您需要致电: myStage.act(); 获取您要查找的输出的示例是: if(player.isDead()) { myStage.act(); } 但请注意,这不是转换屏幕的有效方法。 Depending on when you want it to be done, you need to call: myStage.act(); And an example to get the output your looking for would be: if(player ...
-
任何LibGDX屏幕只不过是一种AndroidLauncher活动视图。 当您使用Interface打开任何其他活动时,具有LibGDX视图的Activity将暂停并在后台折叠。 您可以使用Intent从任何活动返回到Libgdx活动。 Intent intent = new Intent(this, AndroidLauncher.class); startActivity(intent); 或者可能通过finish()您可以返回上一个活动。 Any Screen of LibGDX is nothin ...
-
好的,在你的屏幕(gameScreen和另一个)中删除“extends Game”,只留下工具屏幕。 然后,而不是像gameScreen中那样使用setScreen(game2)。 像这样用它: game.setScreen(game2)//添加“游戏”。 多数民众赞成因为你的屏幕不会从游戏延伸,但你在该领域得到了游戏,所以你可以从中使用它。 并且仅作为额外:不要将另一个实例称为“game2”,因为它不是游戏。 并且不要使用小写字母来开始类的名称(gameScreen应该是GameScreen),但这只是约 ...
-
即时速度变化LibGDX(Instant velocity change LibGDX)[2023-02-04]
浏览代码并思考逻辑。 您遵循if-else语句并始终将SP添加到速度。 如此有效,您可以将该数学与if-else结合使用,从而产生以下等效结果: if (position.x > 2560) { velocity.add(0, 0, 0); } else { velocity.add(2 * SP, 0, 0); } velocity.scl(dt); position.add(velocity.x, 0, 0); ve ... -
setGravity()方法确定将内容放置在AdView中的位置(在本例中为广告),而不是将AdView放置在其容器中的位置。 看起来你的容器是RelativeLayout,所以你应该能够设置新的LayoutParams而不是设置引力: RelativeLayout.LayoutParams adParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, ...
-
将渲染功能更改为: @Override public void render(float delta) { Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); //clears the buffer CharSequence str = "Main Menu"; batch = new SpriteBatch(); font = new BitmapFont(); batch.begin(); font.d ...
-
似乎问题来自处理skin 。 我在外部类中使用static Skin对象作为我的皮肤,所有需要该皮肤的类都使用它。 我的问题是我将皮肤放在其中一个屏幕上,这样可以处理所有其他课程所使用的皮肤。 我通过简单地创建一个dispose();来解决这个问题dispose(); 在类中保存我所有皮肤的方法,并在我退出游戏时处理它们。 It seems like the problem came from disposing the skin. I use a static Skin object in an exte ...