小编oja*_*jas的帖子

Android:直接在material-calendarview中更改Year

我正在使用https://github.com/prolificinteractive/material-calendarview

现在它正在改变点击右箭头或左箭头
的月份如何直接更改年份而不是更改月份.
这是可能的Android默认日历视图.下面是我的多产交互代码 - 日历

public class ActivityCalendar extends AppCompatActivity implements OnDateSelectedListener, OnMonthChangedListener {

    private static final DateFormat FORMATTER = SimpleDateFormat.getDateInstance();
    private MaterialCalendarView widget;
    private String zodiacSign = "";
    private HashMap<String,Integer> hashMapMonth =  new HashMap<>();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.layout_calendar);
        widget = (MaterialCalendarView)findViewById(R.id.calendarView);
        widget.setOnDateChangedListener(this);
        widget.setOnMonthChangedListener(this);

    }

    @Override
    public void onDateSelected(@NonNull MaterialCalendarView widget, @Nullable CalendarDay date, boolean selected) {
        String strDate = getSelectedDatesString();
        Intent returnIntent = new Intent();
        returnIntent.putExtra(TagClass.BIRTH_DATE, strDate);
        setResult(Activity.RESULT_OK, returnIntent);
        finish();
    }


    @Override
    public …
Run Code Online (Sandbox Code Playgroud)

android android-calendar

6
推荐指数
1
解决办法
1960
查看次数

神经网络:了解theano图书馆

谁能解释一下以下python代码的输出:

from theano import tensor as T
from theano import function, shared

a, b = T.dmatrices('a', 'b')
diff = a - b
abs_diff = abs(diff)
diff_squared = diff ** 2

f = function([a, b], [diff, abs_diff, diff_squared])

print f([[1, 1], [1, 1]], [[0, 1], [2, 3]])
Run Code Online (Sandbox Code Playgroud)

测试功能

print f( [ [1,1],[1,1] ], 
         [ [0,1],[2,3] ])  

Output:  [ [[ 1.,  0.], [-1., -2.]], 
           [[ 1.,  0.], [ 1.,  2.]], 
           [[ 1.,  0.], [ 1.,  4.]]]
Run Code Online (Sandbox Code Playgroud)

python neural-network theano

5
推荐指数
1
解决办法
154
查看次数

Android:编译错误:任务':app:compileDebugJava'的执行失败

我面临以下错误:

Error:(89, 39) error: incomparable types: CAP#1 and int  
where CAP#1 is a fresh type-variable:  
CAP#1 extends Object from capture of ?Note: Some input files use unchecked or   unsafe operations.  
Note: Recompile with -Xlint:unchecked for details.  
Error:Execution failed for task ':app:compileDebugJava'.  
Run Code Online (Sandbox Code Playgroud)

编译失败; 请参阅编译器错误输出以获取详细信

我的Gradle文件如下所示:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.0 rc3"

    repositories {
        maven { url "https://jitpack.io" }
        mavenCentral()
        jcenter()

    }

    defaultConfig {
        applicationId "wishlist.oj.app"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }

    buildTypes {
        release …
Run Code Online (Sandbox Code Playgroud)

android build.gradle android-gradle-plugin recycler-adapter android-recyclerview

3
推荐指数
1
解决办法
2万
查看次数