元素是:
span {
position:absolute;
float:left;
height:80px;
width:150px;
top:210px;
left:320px;
background-color:yellow;
display:none; //No display
border: 3px solid #111;
}
Run Code Online (Sandbox Code Playgroud)
我使用此代码删除显示,使其可见,
$( "跨度")removeAttr( "显示器").
但它不起作用.我使用的方法有效还是有其他方法来获得结果?
我的代码如下所示,当它工作时(当我将父主题更改为Theme.Sherlock或Theme.Sherlock.Light它所做的主题更改时)它不会更改标题颜色.
代码与此处几乎相同
代码:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="MyTheme" parent="@style/Theme.Sherlock">
<item name="actionBarStyle">@style/MyTheme.ActionBarStyle</item>
<item name="android:actionBarStyle">@style/MyTheme.ActionBarStyle</item>
</style>
<style name="MyTheme.ActionBarStyle" parent="@style/Widget.Sherlock.ActionBar">
<item name="android:titleTextStyle">@style/MyTheme.ActionBar.TitleTextStyle</item>
</style>
<style name="MyTheme.ActionBar.TitleTextStyle" parent="@style/TextAppearance.Sherlock.Widget.ActionBar.Title" >
<item name="android:textColor">#FF0000</item>
</style>
</resources>
Run Code Online (Sandbox Code Playgroud) 好的,当然我理解表达式的这一部分... listPreferredItemHeight是首选列表项高度.
但我真的没有得到这些东西......谷歌没有帮助.任何人都可以指出我正确的方向,我可以读到这个?
这也可以是对资源的引用(其形式为"@〔包:]类型:名称为")("?[包:] [类型:]名称"的形式)或主题属性包含该类型的值.
我在这里找到此代码的示例http://android-developers.blogspot.com/2009/02/android-layout-tricks-1.html
thnx in advanced
编辑:在链接的示例中,代码是 android:layout_height ="?android:attr/listPreferredItemHeight".究竟是什么意思?
我有一个unicode对象列表,并希望将它们编码为utf-8,但编码似乎不起作用.
代码在这里:
>>> tmp = [u' test context']
>>> tmp.encode('utf-8')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'list' object has no attribute 'encode'
>>>
Run Code Online (Sandbox Code Playgroud)
我无法理解为什么没有属性编码
最近从Eclipse更改为Android Studio,我也将JDK更改java-open-jdk为jdk1.7.0_45.
现在我正在尝试运行我的第一个应用程序并收到此消息:
Installation failed since the APK was either not signed, or signed incorrectly. If this is a Gradle-based project, then make sure the signing configuration is specified in the Gradle build script
编辑:
当我从Android Studio运行时,我收到上面显示的错误.当我从命令行运行它时,我没有收到错误(应用程序正在运行,我收到错误但与gradle无关).
我从这里得到了代码
您可以在google repo上查看build.gradle
更新2:
我添加了这段代码
signingConfigs {
release {
storeFile file("john.keystore")
storePassword "john"
keyAlias "johnkeystore"
keyPassword "john"
}
}
Run Code Online (Sandbox Code Playgroud)
就buildTypes在build.gradle文件中的代码块上方.文件john.keystore位于我的Project的根目录下.我跑了gradlew assembleRelease,我得到了 xxx-release-unsigned.apk.
我开始使用ubuntu 12.04的新VPS系统
按照这里的命令后我安装了php,mysql,apache2
PHP和Apache工作得很好,但是当我运行时:
service mysql start
Run Code Online (Sandbox Code Playgroud)
我明白了: unable to connect to system bus: failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory.
我用谷歌搜索,但没有找到足够的帮助我.
没有/ var/run/dbus /目录,我不知道我需要创建一个,或者即使这是mysql的问题.
我知道我使用了一个糟糕的标题,但我无法描述它.
代码在这里:http://jsfiddle.net/FFjgc/3/
标题:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://jscrollpane.kelvinluck.com/style/jquery.jscrollpane.css" />
<script type="text/javascript" src="http://jscrollpane.kelvinluck.com/script/jquery.jscrollpane.min.js"></script>
<script type="text/javascript" src="http://jscrollpane.kelvinluck.com/script/jquery.mousewheel.js"></script>
<script type="text/javascript" src="http://jscrollpane.kelvinluck.com/script/mwheelIntent.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.scroll').jScrollPane();
});
</script>
Run Code Online (Sandbox Code Playgroud)
和CSS
.scroll {
width: 100%;
height: 200px;
overflow: auto;
}
Run Code Online (Sandbox Code Playgroud)
它是如此简单,我使用所有的图书馆,我敢肯定有代码没有错误,因为我看它的最后2小时.
谢谢.
我正在使用TabLayout两个嵌套的片段,我注意到当用户点击另一个Tab时,内容立即改变,指示器从第一个Tab移动到第二个Tab需要3-4秒.
我在迄今为止尝试应用程序的任何设备中都有相同的行为(不仅仅是genymotion).Nexus 4和Nexus 5X是一些测试设备.
布局是:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:EMVideoView="http://schemas.android.com/apk/res-auto"
android:background="@color/white"
android:clickable="true"
android:layout_width="match_parent" android:layout_height="match_parent">
<com.devbrackets.android.exomedia.EMVideoView
android:id="@+id/video_play_activity_video_view"
android:layout_width="match_parent" android:layout_height="360dp"
EMVideoView:defaultControlsEnabled="true"/>
<android.support.design.widget.TabLayout
android:id="@+id/nested_tabs" android:layout_below="@+id/video_play_activity_video_view"
android:layout_width="match_parent" android:layout_height="?attr/actionBarSize"
app:tabMode="fixed" app:tabGravity="fill"/>
<FrameLayout android:id="@+id/fl_nested_tabs_container" android:layout_below="@+id/nested_tabs"
android:layout_width="match_parent" android:layout_height="wrap_content"/>
Run Code Online (Sandbox Code Playgroud)
和我更改标签的代码:
@Override
public void onTabSelected(TabLayout.Tab tab) {
if (isCommentsFragmentSelected) {
isCommentsFragmentSelected = false;
getChildFragmentManager()
.beginTransaction()
.replace(R.id.fl_nested_tabs_container, PollsFragment.newInstance())
.commit();
} else {
isCommentsFragmentSelected = true;
getChildFragmentManager()
.beginTransaction()
.replace(R.id.fl_nested_tabs_container, CommentsFragment.newInstance())
.commit();
}
}
Run Code Online (Sandbox Code Playgroud) 我需要暴露我的OkHttpClient ,ApplicationModule所以我加入了ApplicationComponent.像这样的东西:
@Module
public class ApplicationModule {
@Provides @Singleton
public OkHttpClient provideOkHttpClient() {
final OkHttpClient.Builder client = new OkHttpClient.Builder();
return client.build();
}
@Singleton
@Component( modules = {ApplicationModule.class} )
public interface ApplicationComponent {
OkHttpClient okHttpClient();
}
Run Code Online (Sandbox Code Playgroud)
所以我OkHttpClient okHttpClient();在ApplicationComponent正如你刚才看到的那样添加了.
现在NetworkModule我用它像:
@Module
public class NetworkModule {
@Provides @ActivityScope
public ProjectService provideProjectService(OkHttpClient client) {
return new ProjectService(client);
}
@Component( dependencies = {ApplicationComponent.class}, modules = {NetworkModule.class} )
@ActivityScope
public interface NetworkComponent {
void inject(@NonNull …Run Code Online (Sandbox Code Playgroud) 我在我的ubuntu 10.04上运行python 3.1.2
我需要安装哪个版本的BeautifulSoup以及如何安装?
我已经下载了3.2版并运行sudo python3 setup.py install
但不起作用
日Thnx
编辑:我得到的错误是:
>>> import BeautifulSoup
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "BeautifulSoup.py", line 448
raise AttributeError, "'%s' object has no attribute '%s'" % (self.__class__.__name__, attr)
^
SyntaxError: invalid syntax
>>>
Run Code Online (Sandbox Code Playgroud) 我使用EasyPermissions从谷歌库来处理Android上6.第一次权限我按一下按钮,捕捉图像,它要求我给权限CAMERA和WRITE_EXTERNAL_STORAGE.
在我接受了两个权限应用程序崩溃并显示错误消息后,您可以在下面看到:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.debug, PID: 22768
java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=123, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {com.example.debug/com.example.camera.CameraActivity}: java.lang.RuntimeException: Cannot execute non-void method openCamera
at android.app.ActivityThread.deliverResults(ActivityThread.java:3699)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3742)
at android.app.ActivityThread.-wrap16(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.RuntimeException: Cannot execute non-void method openCamera
at pub.devrel.easypermissions.EasyPermissions.runAnnotatedMethods(EasyPermissions.java:229)
at pub.devrel.easypermissions.EasyPermissions.onRequestPermissionsResult(EasyPermissions.java:186)
at com.example.camera.CameraActivity.onRequestPermissionsResult(CameraActivity.java:243)
at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:6553)
at android.app.Activity.dispatchActivityResult(Activity.java:6432)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3695)
at …Run Code Online (Sandbox Code Playgroud) 我猜不是因为我一直在尝试用例子而且没有任何作用......
我很好奇为什么不呢?我该怎么设置呢?
谢谢
我想在每个<p>Tag 之后插入一个div,当然用id定义.
使用insertAfter,jQuery非常简单:
$('#id').insertAfter('p'); but how about using css?
Run Code Online (Sandbox Code Playgroud)
在选择器可以帮助之后我看不到css .
android ×6
css ×3
jquery ×3
python ×2
attributes ×1
dagger-2 ×1
encoding ×1
font-family ×1
gradle ×1
html ×1
html-lists ×1
java ×1
jscrollpane ×1
mysql ×1
tags ×1
ubuntu ×1
vps ×1