This file contains hidden or 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
<profile version="1.0"> | |
<option name="myName" value="Project Default" /> | |
<inspection_tool class="15081240-e5f7-3bc9-a0ad-c3b1d502c560" enabled="true" level="WARNING" enabled_by_default="true" /> | |
<inspection_tool class="18972239-2a78-3b70-9e07-0aabf0a5ccd4" enabled="true" level="ERROR" enabled_by_default="true" editorAttributes="ERRORS_ATTRIBUTES" /> | |
<inspection_tool class="1948d804-a1bc-3721-8cc5-64a4898bd260" enabled="true" level="ERROR" enabled_by_default="true" editorAttributes="ERRORS_ATTRIBUTES" /> | |
<inspection_tool class="9c5d90f8-66c5-3330-90fb-c3178656cadc" enabled="true" level="WEAK WARNING" enabled_by_default="true" editorAttributes="INFO_ATTRIBUTES" /> | |
<inspection_tool class="SSBasedInspection" enabled="true" level="WARNING" enabled_by_default="true"> | |
<searchConfiguration name="ConstraintLayout 使用 match_parent" description="ConstraintLayout 不建议使用 match_parent 约束&#10;建议使用 0dp + 双向 parent 约束来处理" text="<androidx.constraintlayout.widget.ConstraintLayout $pT$> $prefix$&# |
This file contains hidden or 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
/*** | |
* 枚举类型定义 | |
*/ | |
enum class Color { | |
RED, GREEN, BLUE | |
} | |
/*** | |
* 密封类定义 | |
*/ |
This file contains hidden or 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.wenmq.algo.binary; | |
/** | |
* 二进制对于 2 的指数的优化 | |
*/ | |
public class PowerOfTwoSolution { | |
/** | |
* 判断一个数是不是 2 的非负整数次幂: | |
* |
This file contains hidden or 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
private void checkStringConstant(DiagnosticPosition var1, Object var2) { | |
if (this.nerrs == 0 && var2 != null && var2 instanceof String && ((String)var2).length() >= 65535) { | |
this.log.error(var1, "limit.string", new Object[0]); | |
++this.nerrs; | |
} | |
} |
This file contains hidden or 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.hellowmq.third; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import com.to8to.api.network.TCommonParamsManager; | |
/** | |
* Created by @ifans.wen |
This file contains hidden or 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.wenmq.algo.design; | |
public class SingletonBestArray { | |
/** | |
* 线程安全 | |
* 双检查锁机制保证性能 | |
* 延迟初始化 | |
*/ | |
public static class DoubleLockSingleton { | |
public volatile static DoubleLockSingleton _instance; |
This file contains hidden or 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
int compareVersion(String version1, String version2) { | |
List<String> nums1 = version1.split("\."); | |
List<String> nums2 = version2.split("\\."); | |
int i = 0, j = 0; | |
while (i < nums1.length || j < nums2.length) { | |
String num1 = i < nums1.length ? nums1[i] : "0"; | |
String num2 = j < nums2.length ? nums2[j] : "0"; | |
int res = compare(num1, num2); | |
if (res == 0) { | |
i++; |
This file contains hidden or 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
/// This is a example of dart tear-offs. | |
/// a "tear-offs" is a closure that takes the same parameters as the method and invokes it when you call it. | |
List<int> a = [1,2,3,4,5,6]; | |
Map<int,String> b = new Map() | |
..[0]= "0000" | |
..[1]= "1111" | |
..[2]= "2222" | |
..[3]= "3333"; |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
""" | |
Created on Tue Aug 21 12:41:20 2018 | |
@author: bdmin | |
""" | |
import requests | |
from urllib.parse import urlencode | |
from pyquery import PyQuery as pq |
This file contains hidden or 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 2019 the Dart project authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license | |
// that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
import 'dart:math' as math; | |
final Color primaryColor = Colors.red; | |
final TargetPlatform platform = TargetPlatform.android; |
NewerOlder