如果我在构建路径中添加一些jar并希望在编程时看到一些提示(例如参数和某些函数的返回值),那么如何实现呢?例如,我在使用Axis时需要一些帮助,并且可以获得在线文档(http://ws.apache.org/axis/java/apiDocs/index.html).
如何将这个或任何其他类似的javadoc"导入"Eclipse?
我在xml中有一个tablelayout.我还在代码中添加了一些行.如何在代码中设置一些视图的column_layout?
在xml我有:
android:layout_column="3"
Run Code Online (Sandbox Code Playgroud)
如何在代码中实现相同的功能(例如TextView)?
我使用以下代码创建了UUID(不知道哪种类型):
// Create universally unique identifier (object)
CFUUIDRef uuidObject = CFUUIDCreate(kCFAllocatorDefault);
// Get the string representation of CFUUID object.
NSString *uuidStr = (__bridge NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuidObject);
CFRelease(uuidObject);
Run Code Online (Sandbox Code Playgroud)
但我发送数据的 API 说这不是它需要的类型 1 http://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_.28MAC_address.29。
如何在 objC (iphone) 中创建这个 type1 UUID?
我在 obj C 中制作此文件时遇到问题,是否可以选择使用 C 代码来生成此文件?
我有一个应用程序,我定期下载一些数据(我目前使用nstimer).是否可以在iOS中定期执行此操作而无需启动我的应用程序?
我写了一个servlet,它将一个映像写入我的应用程序的根目录,然后在获得GET请求时将其传递给客户端.当我在带有jetty的Eclipse中测试它时,一切正常(带有GWT插件).但是当我将它移动到Tomcat时,我得到了filenotfound异常(因为图像根本没有被写入因此无法返回给客户端).这个问题是否有写文件的权限?
我将此添加到catalina.policy文件,但它也没有帮助(webui是我的应用程序的文件夹):
grant {
permission java.io.FilePermission "${catalina.home}/webapps/webui/","read,write,delete";
permission java.io.FilePermission "${catalina.home}/webapps/webui/*","read,write,delete";
};
Run Code Online (Sandbox Code Playgroud) 我使用小部件和RPC在GWT中创建了一个登录页面.成功登录后,我想显示另一个也使用GWT小部件的页面(我将使用Google Chart Tools Library 1.1).我正在使用Eclipse的GWT插件,在启动新项目时创建一些文件夹(服务器,客户端......).如何显示第一个GWT页面?我看过这个(GWT多模块用于单独的HTML页面?),这是正确的方法吗?
我有一个简单的首选项(不是EditText首选项或ListPreference).我有一个删除目录中所有文件的方法.我想在用户点击偏好时执行此操作,但我不知道如何对首选项的点击做出反应.
我在地图上有 2 个标记,我想在用户单击按钮时删除它们。这是我的方法:
public void deleteAllMarkers() {
if(mapView.getOverlays().size() !=0) {
//Log.d("MAPA ",Integer.toString(mapView.getOverlays().size()));
for (int i=0; i<mapView.getOverlays().size(); i++ ) {
mapView.getOverlays().remove(i);
}
mapView.postInvalidate();
}
}
Run Code Online (Sandbox Code Playgroud)
问题是我必须按两次按钮才能摆脱两个标记,因为在第一次按下后只有 1 个标记消失。
我究竟做错了什么?
我检查是否有使用此代码的Twitter帐户:
ACAccountStore *accountStore = [[ACAccountStore alloc] init];
ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
NSArray *arrayOfAccounts = [accountStore accountsWithAccountType:accountType];
Run Code Online (Sandbox Code Playgroud)
如果我在带有twitter帐户的iOS 6模拟器上运行它arrayOfAccounts.count是1,但在iPhone 4 iOS6上,arrayOfAccounts.count则为0.
我究竟做错了什么?
我正在使用此代码旋转UIImage。
CGFloat DegreesToRads(CGFloat degrees) {
return degrees * M_PI / 180;
}
- (UIImage *)scaleAndRotateImage:(UIImage *)image forAngle: (double) angle {
float radians=DegreesToRads(angle);
// calculate the size of the rotated view's containing box for our drawing space
UIView *rotatedViewBox = [[UIView alloc] initWithFrame:CGRectMake(0,0, image.size.width, image.size.height)];
CGAffineTransform t = CGAffineTransformMakeRotation(radians);
rotatedViewBox.transform = t;
CGSize rotatedSize = rotatedViewBox.frame.size;
// Create the bitmap context
UIGraphicsBeginImageContext(rotatedSize);
CGContextRef bitmap = UIGraphicsGetCurrentContext();
// Move the origin to the middle of the image so we will rotate and …Run Code Online (Sandbox Code Playgroud) 我有一个活动,可以在用户按下按钮后启动服务.在这项服务中,我有一个每10秒运行一次的计时器.我想每10秒从这个服务运行另一个活动(谷歌地图).如果我把它投入使用我会收到此错误:
12-29 10:09:21.369: ERROR/AndroidRuntime(235): android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
Run Code Online (Sandbox Code Playgroud)
我应该把我的代码用于发布活动吗?
android ×4
objective-c ×4
iphone ×3
ios ×2
java ×2
background ×1
eclipse ×1
gwt ×1
javadoc ×1
preferences ×1
rotation ×1
service ×1
servlets ×1
sync ×1
tablelayout ×1
tablerow ×1
tomcat ×1
twitter ×1
uiimage ×1
uuid ×1