我是Android Dev的新手,并试图了解如何合并开源/第三方扩展/插件.
我试图通过添加到Gradle方法包含两个不同的包,最近的库是https://github.com/silvestrpredko/DotProgressBarExample/tree/master/app
指示添加以下Gradle依赖项:
compile 'com.github.silvestrpredko:dot-progress-bar:0.1.4@aar'
Run Code Online (Sandbox Code Playgroud)
目前我的Gradle看起来像:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.e.crispens.tuna"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
jcenter()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.github.silvestrpredko:dot-progress-bar:0.1.4@aar'
}
Run Code Online (Sandbox Code Playgroud)
而且,根据文档,我创建了一个包含以下XML的布局(相关方直接从文档中复制):
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.e.crispens.tuna.StringFragment">
<com.github.silvestrpredko.dotprogressbar.DotProgressBar
android:id="@+id/dot_progress_bar"
android:layout_width="match_parent"
android:layout_height="50dp"
custom:amount="5"
custom:duration="@android:integer/config_mediumAnimTime"
custom:endColor="@color/light_blue_A400"
custom:startColor="@color/light_blue_A700"/>
</FrameLayout>
Run Code Online (Sandbox Code Playgroud)
但是,我收到此错误:
/Users/crispensmith/AndroidStudioProjects/Tuna/app/src/main/res/layout/fragment_string.xml …Run Code Online (Sandbox Code Playgroud) 几年前,我创作了一个PHP(ZEND)模块,我今天在一些项目中仍然使用它.这个模块是基于对PHP图像处理的相当基本的(即copypasta)理解而构建的,但在一种情况下工作得很漂亮.
模块从表中提取blob数据,将其解析为图像,使用imagcopyresampled()调整其大小,然后将生成的.jpg发送到浏览器,它被称为标准控制器操作.
它似乎适用于所有情况,除非用户从Facebook保存原始图像(即右键单击Facebook图像查看器并下载到桌面然后上传到客户端站点).我自己测试了很多次并且能够复制它.我还能够通过photoshop重新保存时上传相同的图像,而不会遇到问题.
我怀疑facebook图像显示在文件中添加了一些导致我的系统中断的额外元数据.
这有解决方案吗?
PHP映像模块的代码如下:
private function _buildImage($mode) {
//Prepare the output image
//Currently CROP and RESIZE are using different output onstruction calls
//So $finalImage is initialized prior to entering the mode blocks.
$finalImage = imagecreatetruecolor($this->_width, $this->_height);
$backgroundFillColor = imagecolorallocate($finalImage, RED, BLUE, GREEN);
imageFill($finalImage, 0, 0, $backgroundFillColor);
$this->_table = $this->_getTable($mode);
$image = $this->_request->image;
$this->_imageData = $this->_table->fetchEntryAsRow($image);
//Set top and left to 0 to capture the top/left corner of the orignal image.
$top = 0;
$left = 0;
$inputImage = …Run Code Online (Sandbox Code Playgroud) 我是GIT的新手,我一直试图在互联网上找到这个问题的答案,但到目前为止还没有找到任何可以解决的问题.
如果我理解正确,请求回购的目的是允许您使用代码来准备拉取请求,然后发出拉取请求以便为项目做出贡献.
但很多时候,作者在创建即插即用的javascript资源方面做得非常出色.在这些情况下,我只想为项目保留一份干净,最新的副本.
以Lea Verrou的前缀为例.这是一个很棒的项目,由一个比我更了解供应商前缀混乱的人写的.老实说,我不太可能为这个项目做出贡献.
在这种情况下,是分支最好的选项还是有更好的方法来维护下载的并发和存储?
什么是最好的方法是让屏幕阅读器类型的辅助设备以富有洞察力的方式宣布部分?
理想情况下,<h1>有没有一种方法可以标记<section>可以实现此目的的实际标记,而不是将此作业传递给子标记?
如果a <article>被分解为<section>s,则认为<section>s不适合联合,但它们仍应在文档结构中具有自己的固有身份.我们作为HTML作者如何记录这一点?
示例:给出此树:
Article: A review of the iPad
section: brief preamble, statement of goals
section: aesthetics
section: performance
section: target market
section: wrap up
Run Code Online (Sandbox Code Playgroud)
我们如何标记<section>s以使辅助设备能够从<section>标签中获取部分焦点?
这是HTML中的一个例子:
<!DOCTYPE html>
<html>
<head> <!-- meta data and css --> </head>
<body>
<article>
<h1>An article about markup!</h1>
<section id="examele_1">
<h1>Example 1</h1>
</section>
<section class="example 2">
<h1>Example 2</h1>
</section>
<section data-subject="Example 3">
<h1>Example 3</h1>
</section>
</article>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
那么:示例1到3中的任何一个都是不错的选择,还是有更好的选择?