当我试图开始Kibana时,我面临以下问题.我首先重新启动了我成功运行的elasticsearch服务器.在启动Elasticsearch后,我尝试启动Kibana,但没有运气.
{"name":"Kibana","hostname":"ABCD","pid":3848,"level":30,"msg":"Elasticsearch is still initializing the kibana index... Trying again in 2.5 second.","time":"2015-07-03T07:35:34.936Z","v":0}
Run Code Online (Sandbox Code Playgroud)
提前致谢
我正在研究Symfony2项目,以便从HTML视图生成PDF.以下是来自config.yml
knp_snappy:
pdf:
enabled: true
binary: /path/to/my/wkhtmltopdf
options:
no-stop-slow-scripts: ~
enable-javascript: ~
use-xserver: ~
page-size: A4
dpi: 300
Run Code Online (Sandbox Code Playgroud)
现在我想知道DIV是否在页面边缘重叠,如果是这样,在DIV之前添加分页符.它目前显示如下.
我试图获得DIV的高度并将其与页面高度进行比较,但它不起作用.
是否有任何解决方案可以知道DIV何时重叠或在某些内容重叠时自动中断页面?
我正在定义我的界限如下:
private static final LatLngBounds BOUNDS_CHENNAI = new LatLngBounds(
new LatLng(12.8339547, 80.0817007), new LatLng(13.2611661, 80.33632279999999)); // Chennai city bounds.
Run Code Online (Sandbox Code Playgroud)
创建Goolge API客户端如下:
mGoogleApiClient = new GoogleApiClient.Builder(this)
.enableAutoManage(this,this)
.addApi(Places.GEO_DATA_API)
.addConnectionCallbacks(this)
.build();
Run Code Online (Sandbox Code Playgroud)
并在适配器中使用这些边界如下:
PendingResult<AutocompletePredictionBuffer> results =
Places.GeoDataApi
.getAutocompletePredictions(mGoogleApiClient, constraint.toString(),
mBounds, mPlaceFilter);
Run Code Online (Sandbox Code Playgroud)
根据文件应该只返回我在钦奈市内的位置,但它返回我来自世界各地的位置.
例如,当我输入"Sola"时,它返回艾哈迈达巴德市的"索拉路",而不是在界限内显示匹配的结果.
我在build.gradle文件中添加了以下依赖项。
compile 'com.aerisweather:aeris-maps-lib:2.0.0@aar'
Run Code Online (Sandbox Code Playgroud)
它来自
如果您从以下 URL 看到工件,它具有 android 支持 v7 库类。
https://oss.sonatype.org/#nexus-search;quick~aerisweather
我想在运行/打包应用程序时排除该包。由于重复的类错误,我无法运行/打包应用程序。
我尝试过添加这样的配置,
configurations {
all*.exclude group: 'com.android.support', module: 'appcompat-v7'
}
Run Code Online (Sandbox Code Playgroud)
但这将它排除在整个项目之外,这导致我犯了很多错误。
我已经尝试了一切,但仍然出现以下错误。
错误:任务“:transformClassesWithJarMergingForDebug”执行失败。com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:android/support/v7/appcompat/R$anim.class
android gradle android-studio build.gradle android-gradle-plugin
在我的角度模板中,我正在使用angular-ui创建一个下拉菜单,我需要根据ng-repeat中定义的"company"对象的属性禁用某些列表项.
我已经尝试过禁用标签或ng-disabled指令但没有成功.我怎样才能实现这一目标?
我目前的代码:
<div class="btn-group" uib-dropdown is-open="dropdown-open">
<button id="companyDropDown" type="button" class="btn btn-default"
uib-dropdown-toggle>
{{companyDescr}}<span class="caret"></span>
</button>
<ul class="dropdown-menu" uib-dropdown-menu role="menu"
aria-labelledby="companyDropDown">
<li role="menuItem" ng-repeat="company in companyContracts">
<a ng-click="selectContract(company)">{{company.address}}</a>
</li>
</ul>
</div>
Run Code Online (Sandbox Code Playgroud)
任何帮助将不胜感激!
我需要得到:
对于尝试登录我的网站的每个用户。如果用户成功登录,则获取该信息没有问题,但是我不知道如何获取IP地址以进行失败尝试。
她是我的代码:
app.listener.interactive_login_listener:
class: AppBundle\EventListener\LogonListener
arguments: ['@security.token_storage', '@doctrine.orm.entity_manager', '@security.authorization_checker', '@router', '@manager.settings']
tags:
- { name: kernel.event_listener, event: security.interactive_login, method: onAuthenticationSuccess }
# authentication failure event listener
app.listener.authentication_failure_event_listener:
class: AppBundle\EventListener\LogonListener
arguments: ['@security.token_storage', '@doctrine.orm.entity_manager', '@security.authorization_checker', '@router', '@manager.settings']
tags:
- { name: kernel.event_listener, event: security.authentication.failure, method: onAuthenticationFailure }
Run Code Online (Sandbox Code Playgroud)
和听众:
class LogonListener implements EventSubscriberInterface
{
private $_tokenStorage;
private $_em;
private $_authorizationChecker;
private $_router;
private $_settings;
public function __construct(
TokenStorage $tokenStorage,
EntityManager $em,
AuthorizationCheckerInterface $authorizationChecker,
Router $router,
$settings)
{
$this->_tokenStorage …Run Code Online (Sandbox Code Playgroud) 我在Amazon EC2上配置了 Cassandra,在单个集群中有3 个节点(实例)。现在我想要做的是通过为单个集群中的每个人创建单独的键空间,在 Cassandra 上为我的客户提供一些空间。客户端的数量会一天天增加,所以我可以假设创建的密钥空间没有固定数量。
如果我在单个集群中创建过多的键空间,会不会出现性能问题?
如果这不是好的做法,那么还有其他解决方法可以满足我的需要吗?我不想配置多个 Cassandra 实例。
以下是来自AndroidManifest.xml文件.
<permission
android:name="com.kivi.kividoctors.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.telephony" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-feature android:name="android.hardware.camera.flash" android:required="false" />
Run Code Online (Sandbox Code Playgroud)
但是,当我更新应用程序时,Google会继续向我显示列表中的3个功能.它只是忽略了相机功能的android:required属性.它适用于电话功能.
android.hardware.CAMERA
android.hardware.camera.AUTOFOCUS
android.hardware.camera.FLASH
Run Code Online (Sandbox Code Playgroud)
我已经尝试了所有可能的方法,但是找不到解决方案.
有没有什么我想要摆脱列表中的上述3个功能?
更新:
还尝试了android:name属性中的大写功能.
(我知道这不对,但我仍然尝试过,但也没有运气)
<uses-feature android:name="android.hardware.CAMERA" android:required="false" />
<uses-feature android:name="android.hardware.camera.AUTOFOCUS" android:required="false" />
<uses-feature android:name="android.hardware.camera.FLASH" android:required="false" />
Run Code Online (Sandbox Code Playgroud) 我在树枝模板中有一些变量,所以考虑使用全局范围。
config.yml
twig:
globals:
varA: "@wf.autoload.getA"
varB: "@wf.autoload.getB"
Run Code Online (Sandbox Code Playgroud)
在服务 yml我有:
services.yml
wf.autoload:
class: Scope\WfBundle\WfAutoloadService
arguments: ["@doctrine.orm.entity_manager"]
Run Code Online (Sandbox Code Playgroud)
WfAutoloadService类具有用于获取变量的公共函数
class WfAutloadService {
...
public function getA(){
return ...;
}
public function getB(){
return ...
}
...
}
Run Code Online (Sandbox Code Playgroud)
我的想法行不通。的方法@=service(wf.autoload).getA()也行不通。
是否可以?还是坏主意和坏做法?
谢谢
我有一个 android 应用程序,它从 okhttp3 发送多个数据,但我找不到记录在 php 中发送的所有数据的方法。我当前的日志只包含最后一条记录(如下所示)。我最好的猜测是 php 文件数据正在被覆盖,直到最后一条记录..如何记录所有发送的数据?是的,所有数据都是从 android 应用程序发出的...
索引.php
if (isset($_POST))
{
file_put_contents("post.log",print_r($_POST,true));
}
Run Code Online (Sandbox Code Playgroud)
示例 post.log
Array
(
[date] => 02 Aug, 12:22
[company] => Assert Ventures
[lattitude] => 32.8937542
[longitude] => -108.336584
[user_id] => Malboro
[photo_id] => 1
)
Run Code Online (Sandbox Code Playgroud)
我想要的是
(
[date] => 02 Aug, 12:22
[company] => Three Ventures
[lattitude] => 302.8937542
[longitude] => -55.336584
[user_id] => Malboro
[photo_id] => 1
),
(
[date] => 02 Aug, 12:22
[company] => Two Ventures
[lattitude] => 153.8937542 …Run Code Online (Sandbox Code Playgroud) 如果我尝试通过事务编辑域修改该资源文件,我在资源管理器中有该资源文件I am getting exception as
java.lang.IllegalStateException:如果没有写入事务,则无法在 org.eclipse.emf.transaction.impl.TransactionChangeRecorder.assertWriting(TransactionChangeRecorder.java:348) 处修改资源集,在 org.eclipse.emf.transaction.impl.TransactionChangeRecorder.appendNotification( TransactionChangeRecorder.java:302) 在 org.eclipse.emf.transaction.impl.TransactionChangeRecorder.processObjectNotification(TransactionChangeRecorder.java:284) 在 org.eclipse.emf.transaction.impl.TransactionChangeRecorder.notifyChanged(TransactionChangeRecorder.java:240) 在 org .eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) 在 org.eclipse.emf.common.notify.impl.NotificationImpl.dispatch(NotificationImpl.java:1027) 在 org.eclipse.emf .common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:299) 在 org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:303)
我想从 volley requset 向 php 发送字符串数据的 ID 和数组列表。但我不确定如何正确发送到服务器以及如何在 php 中获取它。这是向服务器发送请求的android端:
private void sendMessage() {
StringRequest stringRequest = new StringRequest(Request.Method.POST, Config.NOTIF_URL,
new Response.Listener < String > () {
@Override
public void onResponse(String response) {
Log.d("Response --->", response);
jsonNotif = new ParseJSON(response);
jsonNotif.parseJSON();
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Toast.makeText(context, error.getMessage(), Toast.LENGTH_LONG).show();
}
}) {
@Override
protected Map < String, String > getParams() throws AuthFailureError {
Map < String, String > params = new HashMap < > …Run Code Online (Sandbox Code Playgroud) 我有一个问题,我似乎无法用我的注册脚本解决.
这是脚本:
<?php
//MySQLi connection
$con = mysqli_connect("-","-","-","users");
if (mysqli_connect_errno())
{
echo "MySQLi Connection was not established: " . mysqli_connect_error();
}
//Reading the userdata from the registerp.php page
$usr = mysqli_real_escape_string($con,$_POST['username']);
$email = mysqli_real_escape_string($con,$_POST['email']);
$pass_unhashed = mysqli_real_escape_string($con,$_POST['pass']);
$pass = password_hash($pass_unhashed, PASSWORD_DEFAULT);
//Checking if user exists
$check_usr = mysqli_query($con,"SELECT * FROM users WHERE user_name = '$usr'");
if(check_usr === false)
{
echo(mysqli_error($con));
}
else
{
if (mysqli_num_rows($con,$check_usr)>=1)
{
echo "This Username already exists";
}
else
{
echo "This Username is available";
echo …Run Code Online (Sandbox Code Playgroud) android ×5
php ×5
symfony ×3
angularjs ×1
arraylist ×1
build.gradle ×1
cassandra ×1
eclipse ×1
eclipse-emf ×1
foreach ×1
gradle ×1
html ×1
kibana ×1
kibana-4 ×1
loops ×1
mysql ×1
nosql ×1
replication ×1
wkhtmltopdf ×1