This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.freecodecamp.cn/challenges/check-for-palindromes | |
function palindrome(str) { | |
// 回文检测 | |
str = str.replace('_', ''); | |
str = str.replace(/\W/gi, ''); | |
str = str.replace(/\s/gi, ''); | |
str = str.toLowerCase(); | |
newStr = str.split('').reverse().join(''); | |
return str == newStr; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.freecodecamp.cn/challenges/check-for-palindromes | |
function palindrome(str) { | |
// 回文检测 | |
str = str.replace('_', ''); | |
str = str.replace(/\W/gi, ''); | |
str = str.replace(/\s/gi, ''); | |
str = str.toLowerCase(); | |
newStr = str.split('').reverse().join(''); | |
return str == newStr; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Widget circleAvatarWithBorder2(url) { | |
return Stack( | |
alignment: AlignmentDirectional.center, | |
children: <Widget>[ | |
Container( | |
width: 32.0, | |
height: 32.0, | |
decoration: BoxDecoration( | |
borderRadius: BorderRadius.all(Radius.circular(50.0)), | |
border: Border.all( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tencent.tip.bitmapprofiler.extension | |
import org.junit.Test | |
import java.lang.ref.WeakReference | |
import java.util.* | |
import kotlin.collections.ArrayList | |
class ContractTest { | |
@Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "op.h" | |
#include <dlfcn.h> | |
#include <stdio.h> | |
typedef int (*CACULATE_FUNC)(int, int); | |
int main(int argc, char* argv[]) | |
{ | |
dlerror(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example.demo_glide"> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |
<application | |
android:name=".MyApp" | |
android:allowBackup="true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// usage: Choreographer.getInstance().postFrameCallback(new Helper()); | |
public class Helper implements Choreographer.FrameCallback { | |
private static final String TAG = "IndexHelper"; | |
private Field messagesField; | |
private Field nextField; | |
public Helper() { | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2016 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import os.path | |
import hashlib | |
import sys | |
hash_array = {} | |
def file_md5(file_path): | |
md5 = hashlib.md5() | |
with file(file_path, "rb") as f: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 上传腾讯云cos. | |
* <p> | |
* Created by 410063005 on 2018/1/31. | |
*/ | |
// Config: https://cloud.tencent.com/document/product/436/12159 | |
// Usage: | |
// File file = new File(Environment.getExternalStorageDirectory(), "hello.png"); | |
// CosClient.create(IndexActivity.this, getAssets().open("heap.json")).upload(file); | |
public class CosClient { |