小编tok*_*kis的帖子

SQL 时间 24 小时到 12 小时格式

我的桌子是这样的:

+----------------+------------+
|      Date      +    Time    |
|-----------------------------|
| 2015-09-23     | 17:20:25   |
| 2015-09-23     | 17:25:27   |
| 2015-09-24     | 06:29:27   |
-------------------------------
Run Code Online (Sandbox Code Playgroud)

我只想获取时间列,并希望它以 12 小时格式显示。像这样的东西:

5:20 P.M.
5:25 P.M.
6:29 A.M.
Run Code Online (Sandbox Code Playgroud)

我使用了这个查询: SELECT time FROM attendance WHERE 1

mysql sql

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

CSS + SVG 无限动画,每次迭代之间有延迟

我的代码在这里显示复选标记的动画。

它有效,但问题是,它不循环。它只动画 1 次。我想要的是每 2 秒动画一次。

Codepen链接: http: //codepen.io/haniotis/pen/KwvYLO

CSS 看起来像这样:

@import "bourbon";

$color--green: #7ac142;
$curve: cubic-bezier(0.650, 0.000, 0.450, 1.000);

.checkmark__circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: $color--green;
  fill: none;
  animation: stroke .6s $curve forwards;
}

.checkmark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: #fff;
  stroke-miterlimit: 10;
  margin: 10% auto;
  box-shadow: inset 0px 0px 0px $color--green;
  animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark__check {
  transform-origin: …
Run Code Online (Sandbox Code Playgroud)

css svg css-animations

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

Android Listview从URL加载imageview

我正在从url加载图像并将其输入到列表视图。问题是每次我滚动列表视图时imageview都会更改其图像。

我从以下位置使用了此代码:如何在Android中通过URL加载ImageView?从URL加载图像:

public class ImageLoadTask extends AsyncTask<Void, Void, Bitmap> {

    private String url;
    private ImageView imageView;

    public ImageLoadTask(String url, ImageView imageView) {
        this.url = url;
        this.imageView = imageView;
    }

    @Override
    protected Bitmap doInBackground(Void... params) {
        try {
            URL urlConnection = new URL(url);
            HttpURLConnection connection = (HttpURLConnection) urlConnection
                    .openConnection();
            connection.setDoInput(true);
            connection.connect();
            InputStream input = connection.getInputStream();
            Bitmap myBitmap = BitmapFactory.decodeStream(input);
            return myBitmap;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    @Override
    protected void onPostExecute(Bitmap result) {
        super.onPostExecute(result);
        imageView.setImageBitmap(result); …
Run Code Online (Sandbox Code Playgroud)

android listview

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

标签 统计

android ×1

css ×1

css-animations ×1

listview ×1

mysql ×1

sql ×1

svg ×1