我一直在处理JSF的问题,当涉及到重定向到我的应用程序中的页面时,它工作正常,但我无法重定向到外部URL可以有人指导我吗?
我有一个项目并迁移到gradle依赖,但我发现自己有一个问题试图用gradle设置dagger,我第一次编译它工作完美(或者如果我清理)但如果我尝试两次然后它给我错误像:
错误:(13,14)错误:重复类:com.myapp.android.application.InjectingApplication $ InjectingApplicationModule $$ ModuleAdapter
我尝试使用android-apt插件并在文档中配置,但我仍然得到相同的错误(https://bitbucket.org/hvisser/android-apt/overview)
我也尝试使用提供的依赖,就像编译本教程(https://github.com/frankdu/android-gradle-dagger-tutorial)但到目前为止没有运气.
你有任何想法如何配置匕首和gradle?
编辑
我的build.gradle看起来像这样
apply plugin: 'android'
apply plugin: 'android-apt'
android {
compileSdkVersion 19
buildToolsVersion "19.0.2"
defaultConfig {
minSdkVersion 9
targetSdkVersion 19
packageName "com.myapp.android"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile project(':volley')
apt 'com.squareup.dagger:dagger-compiler:1.2.0'
compile 'com.squareup.dagger:dagger:1.2.0'
}
Run Code Online (Sandbox Code Playgroud)
而我的顶级build.gradle看起来像这样
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies { …Run Code Online (Sandbox Code Playgroud) 我对视图范围很困惑.我认为它可以在JSF导航到另一个页面(显然没有重定向),但它没有.那么使用它而不是请求范围有什么好处,如果我召唤相同的视图它将是同一个对象?
我有以下代码:
Decimal initialBalance;
DateTime dailyDate = ctx.DailyBalances.Max(c => c.DailyDate);
if (dailyDate != null)
initialBalance = ctx.DailyBalances.Where(c => c.DailyDate == dailyDate).Select(c => c.FinalBalance).FirstOrDefault();
else
initialBalance = 0;
return initialBalance;
Run Code Online (Sandbox Code Playgroud)
不过我一直试图找到优化它的方法,制作一个查询而不是一个......任何消化?
我试图在动作栏上解决这个问题,但从我可以看到的标题基本上是一个TextView,但我需要放置一个图像而不是纯文本.我尝试将其设置为Style themes.xml,如下所示:
<item name="android:actionBarStyle">@style/MyActionBar</item>
Run Code Online (Sandbox Code Playgroud)
然后我定义了这种风格
<style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
<item name="android:background">@drawable/action_background</item>
<item name="android:titleTextStyle">@style/ActionbarTitleStyle</item>
</style>
Run Code Online (Sandbox Code Playgroud)
我认为我可以为标题定义背景,但即使我做的不是我想要的,也可以试试getActionBar().setCustomView(layout); 但是在调用setContentView之前发生我的操作栏为空,我需要在Base类中使用它.
PD.我只需要关心HONEYCOMB和更高,所以如果你不建议Sherlock或Jonhanilson实施.
目前我正在抓取文章新闻网站,在获取其主要内容的过程中,我遇到了很多人在其中嵌入了如下推文的问题:
我将 XPath 表达式与XPath 助手(chrome 插件)一起使用以测试我是否可以获得内容,然后将此表达式添加到 scrapy python,但是元素内部的#shadow-root元素似乎超出了 DOM 的范围,我正在寻找获取在这些类型的元素中获取内容的方法,最好使用 XPath。
嗨,我正在查看flask-login处理会话登录很好,这项工作很适合模板和视图,我有权访问会话.
不过,我一直试图知道是否有办法将user_token发送给授权的电话.我查看了文件,对此非常模糊.它说我应该
我虽然看到了以下内容(请纠正我,如果我错了)
嗨,我一直在寻找secnhatouch领域的readOnly属性,但还没有找到它...有人可以帮我解决这个问题
{
xtype: 'textfield',
name: 'ReferenceNumber',
readOnly:true,
label: 'Reference'
}
Run Code Online (Sandbox Code Playgroud) 我一直在使用Android兼容包但我遇到了以下问题,似乎每当我在我的应用程序上创建一个Fragment作为内部静态类并尝试启动该活动时它会显示以下错误
android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment org.wr.CreditCardHolderActivity.CreditCardHolderFragment: make sure class name exists, is public, and has an empty constructor that is public
Run Code Online (Sandbox Code Playgroud)
当我将片段和活动分开时,一切顺利进行,任何人都知道为什么?我该如何解决?
谢谢!
所以我在看一个同时使用picasso和okhttp的http android应用程序,然而当谈到离线模式时,毕加索一直试图永远加载图像,我可以看到一个非常积极的重试策略,因为它一直让我在监听器回调时出错:
picasso.listener(new Picasso.Listener()
{
@Override
public void onImageLoadFailed(Picasso picasso, Uri uri, Exception exception)
{
Debug.info(this, "On image error " + exception.getMessage());
}
})
Run Code Online (Sandbox Code Playgroud)
任何人都有一些暗示,我看着毕加索跟踪故障负载图像的事实,当有网络应该尝试重试请求那些图像时附加到广播,但这不是我在这里看到的,我是什么看到毕加索即使没有联系也拼命想要获得那些形象.
您好我一直在试图弄清楚如何更改"填充",我认为它是UIBarButtonItem的色调,但是当我尝试使用外观或外观时,如果不能正常工作,请继续将图标显示为蓝色:
我希望它可能是白色的,当我自定义按钮本身时,我能够改变色调颜色并且它可以工作,但我想用所有按钮的外观来做.这是我做样式的代码,如果有人可以给我一个提示或提示如何做这种事情?
-(void)applyStyle {
[self styleUIButtons];
UIImage *navigationBarBackground = [[UIImage imageNamed:@"base_nav_bar" ] stretchableImageWithLeftCapWidth:0 topCapHeight:0];
[[UINavigationBar appearance]setBackgroundImage:navigationBarBackground forBarMetrics:UIBarMetricsDefault];
[[UINavigationBar appearance]setTitleTextAttributes:@{NSForegroundColorAttributeName: self.mainNavigationBarTextColor}];
[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTitleTextAttributes:@{NSForegroundColorAttributeName: self.mainNavigationBarTextColor} forState:UIControlStateNormal];
[[UIButton appearanceWhenContainedIn:[UINavigationBar class], nil] setTitleColor:self.mainNavigationBarTextColor forState:UIControlStateNormal];
UIImage* barButtonImage = [self createSolidColorImageWithColor:[UIColor colorWithWhite:1.0 alpha:0.1] andSize:CGSizeMake(10, 10)];
[[UIBarButtonItem appearance] setBackgroundImage:barButtonImage forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
[[UIButton appearanceWhenContainedIn:[UINavigationBar class], nil] setBackgroundImage:barButtonImage forState:UIControlStateNormal];
[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTintColor:self.mainNavigationBarIconColor ];
NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:
[UIFont boldSystemFontOfSize:12], NSFontAttributeName,
[UIColor grayColor], NSForegroundColorAttributeName,
nil];
[[UISegmentedControl appearance]setTitleTextAttributes:attributes forState:UIControlStateNormal];
}
-(UIImage*)createSolidColorImageWithColor:(UIColor*)color andSize:(CGSize)size{
CGFloat scale = …Run Code Online (Sandbox Code Playgroud) 我一直在尝试根据 matplotlib 散点图中的颜色添加图例。我看过几个例子,但他们假设每个图都会有一个与之关联的标签,而且我还没有弄清楚如何在没有“标签”属性的情况下做到这一点,并且仅基于颜色。目前我有以下代码
plt.subplot(121)
plt.gca().set_title('Female')
survived = female_data[:,1]
pclass = female_data[:,2]
age = female_data[:,5]
label_color = ['r' if i==0 else 'b' for i in survived]
axes = plt.gca()
axes.get_xaxis().set_visible(False)
plt.scatter(age, pclass, color=label_color)
Run Code Online (Sandbox Code Playgroud)
渲染类似这样的东西,我希望红色和蓝色在图中有一个标签。任何想法?
android ×4
jsf ×2
jsf-2 ×2
auth-token ×1
dagger ×1
external-url ×1
field ×1
flask ×1
flask-login ×1
gradle ×1
ios ×1
ios7 ×1
linq ×1
matplotlib ×1
okhttp ×1
picasso ×1
python ×1
readonly ×1
redirect ×1
scrapy ×1
sencha-touch ×1
shadow-dom ×1
styling ×1
uiappearance ×1
web-scraping ×1
xpath ×1