这里有新的Android开发者.我正在关注http://www.vogella.de/上的教程.第一个应用程序(温度转换)工作.第二个(做首选项并使用菜单)永远不会出现.我尝试过使用Helios和Galileo.我试过重新安装Android SDK.我已经尝试删除测试设备并重新创建它.其他人说这个教程有效.
当另一个应用程序工作时,它没有得到两行"找不到启动器活动!" 和"启动只会同步设备上的应用程序包."
我所看到的:
------------------------------
...] Android Launch!
...] adb is running normally.
...] No Launcher activity found!
...] The launch will only sync the application package on the device!
...] Performing sync
...] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'TestDevice'
...] Uploading de.vogella.android.preferences.apk onto device 'emulator-5554'
...] Installing de.vogella.android.preferences.apk...
...] Success!
...] \de.vogella.android.preferences\bin\de.vogella.android.preferences.apk installed on device
...] Done!
Run Code Online (Sandbox Code Playgroud)
更新:这是我的Android清单文件中的文本
<manifest
xmlns:android="schemas.android.com/apk/res/android";
package="de.vogella.android.preferences"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".HelloPreferences" android:label="@string/app_name">
</activity> …Run Code Online (Sandbox Code Playgroud) 我想在d3中创建一个半圈.使用基数插值产生的路径接近我想要的路径,但不够"圆形".如何编写自己的插补器以更好地围绕这条路径,还是有更好的方法?
这是我到目前为止:http://jsfiddle.net/Wexcode/jEfsh/
<svg width="300" height="500">
<g id="g-1"></g>
<g id="g-2"></g>
</svg>?
Run Code Online (Sandbox Code Playgroud)
JS:
var curved = d3.svg.line()
.x(function(d) { return d.x; })
.y(function(d) { return d.y; })
.interpolate("cardinal")
.tension(0);
var straight = d3.svg.line()
.x(function(d) { return d.x; })
.y(function(d) { return d.y; })
.interpolate("linear")
.tension(0);
var points = [{x: 70, y: 52.5}, {x: 250, y: 250}, {x: 70, y: 447.5}];
d3.select("#g-1").append("path").attr("d", curved(points));
d3.select("#g-2").append("path").attr("d", straight(points));
Run Code Online (Sandbox Code Playgroud) 我在php(preg_match_all)中使用正则表达式时遇到了一些麻烦.
我使用以下代码查找由<>:封装的电子邮件,即:
preg_match_all("<[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})>:", $body,$matches);
Run Code Online (Sandbox Code Playgroud)
出于某种原因,PHP在冒号处爆炸,出现以下错误:
警告:preg_match_all()[function.preg-match-all]:未知修饰符':'in ...
任何帮助都将非常感激,因为我不是正则表达的大师,而且我只是脱毛了.