Lastest

typecho调用二级分类文章group by incompatible with sql_mode=only_full_group_by错误

分析 调用typecho二级分类文章列表显示data base query error 代码目录下搜索"Database Server Error",找到文件var/Typecho/Common.php 282行附近 var/Typecho/Common.php if ($isException && $exception instanceof Typecho_Db_Exception) { $code = 500; @error_log($message); //覆盖原始错误信息 $message = 'Database Server Error'; if ($exception instanceof Typecho_Db_Adapter_Exception) { $code = 503; $message = 'Error establishing a database connection'; } else if ($exception instanceof Typecho_Db_Query_Exception) { $message = 'Database Query Error'; // 增加va...

真实条件从句 vs 虚拟条件从句

问:If you are ever in Winnipeg, we should get together and have a party.算不算虚拟语气 答:不算,它是真实条件从句 那虚拟语气? if从句 大致上分为 真实条件壮从 虚拟条件壮从 1.虚拟条件状语从句 虚拟语气 虚拟条件语句:条件描述的情况是客观世界不可能存在的条件,真实世界永远不可能发生 比如: 如果太阳从西边出来 如果地球比太阳大 如果地球围着月亮转 需要用过去时,不能用was,只能用were,太阳从西边升起 if the sun were rising from the west 2.真实际条件句 条件描述的情况是现实世界中可以实现的 if you are ever in Winnipeg, we should get together and have a party 现在不在winnipeg,但是它可以实现,我有可能在某一刻回到winnipeg

united states is so dependent on China for medicine

视频 您的浏览器不支持 video 标签。 The United States is so dependent on China for medicine. but if they shut the door within months, (We assume) not within weeks, our health system will collapse 口语中表达自己的观点,会省略掉we assume, 直接说not within weeks, our health system will collapse

鸡兔同笼问题的一种解法

问题 假设有鸡和兔子总共80只,总共280只脚,问有多少只鸡,多少只兔子 解答 让所有的鸡和兔子抬起一只脚,那么还有280-80=200,还有200只脚在地上 让所有的鸡和兔子再抬起一只脚,那么地上还有200-80=120只脚。 这时候,所有的鸡已经坐在地上了。剩下的兔子还有两只脚着地,对应省的120只脚。 所以,笼子里120/2=60兔子 有80-60 = 20只鸡 公式化 假设有A和B两种动物。每只动物A有m只脚,每只动物B有n只脚,有m>n。假设A和B总共有S只,总共有脚P只。 那只要让所有动物抬起n只脚,剩下的酒都是动物A的脚。 剩下脚的数量为:P - Sn = 280 - 802 = 120 只脚 剩下的都是动物A,每只有m只脚,还有m-n只脚在地上 所以A动物有 x = (P - S*n)/(m-n) 只 = 120/(4-2) = 60 只 B动物有 y = S - x 只 = 80 - 60 = 20 只 x = (P - S*n)/(m-n) y = S - x

ever的用法总结

can ever be用法 我们来看两个句子 can the magnitude of the instantaneous velocity of an object ever be greater than the magnitude of its average velocity? can it always be greater? 这里can ... ever be是疑问句,表示经验性询问。即,是否存在这种可能,是否可能存在某一刻瞬时速度大于平均速度 always表示一直,整个过程中瞬时速度一直大于平均速度 我在这里吐槽下自己,居然误解can ever be为一直,瞬时速度一直大于平均速度。 面壁思过。。。 ever 用法 根据doctionary.cambridge.org的解释 every,adverb,意思是at any time 疑问句例句: 表达存在可能性 has he ever scored a goal before? 他之前是否进过球(表达存在性,并不要求一直进球,只是是否进过) do you ever dream about winning the lottery? 你是否梦见过中彩票(表达存在性,是否做过中彩票的梦) have you ever heard the Ivy restaurant? 你是否听说过Ivy餐厅(表达存在性,听过一次也是...

Android tools:replace用法

使用场景,为什么需要Android tools:replace 假设我们使用了第三方android module,这个module处于某种原因在开发的时候使用了app_name。比如下面这样 <application android:icon="@mipmap/ic_launcher" android:allowBackup="true" android:backupAgent="com.github.shadowsocks.ConfigBackupHelper" android:extractNativeLibs="true" android:label="@string/app_name" android:supportsRtl="true" android:networkSecurityConfig="@xml/network_security_config" android:banner="@mipmap/banner"> ........ </application> 我们自己app也有指定android:label,那么就会产生冲突报错大致如下 Manifest merger failed : Attribut...

flutter插件引用aar导致Duplicate class android.support.v4.app.INotificationSideChannel

错误信息 Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:28.0.0) Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:28.0.0) Duplicate class android.support.v4.graphics.drawable.IconCompatParcelizer found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:28.0.0) Duplicate class android.su...

kotlin中when的用法

when是什么 when用于在kotlin中实现类c语言中的switch关键字 when怎么用 when (x) { 1 -> print("x == 1") 2 -> print("x == 2") else -> { // Note the block print("x is neither 1 nor 2") } } 差不多是类C语言中这么个意思 swicth(x){ case 1: ....... break; case 2: ....... break; default: // kotlin else ....... break; } 帮助 https://kotlinlang.org/docs/reference/control-flow.html

gradle编译太慢的解决办法

gradle编译速度实在太慢,一个hello world竟然要15s。改用本文配置之后只要2.15s 解决方法 gradle.property文件 org.gradle.jvmargs=-Xmx1536m 改为 org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 org.gradle.daemon=true org.gradle.parallel=true org.gradle.configureondemand=true

go语言数组内存是怎么扩容的

话不多说,上测试代码和结果 package main import ( "fmt" ) func main() { var orderIds []int fmt.Println(len(orderIds), cap(orderIds)) fmt.Println("已使用", "\t\t", "容量", "\t\t", "增量") var lastCap = cap(orderIds) for i := 0; i < 100000; i++ { orderIds = append(orderIds, 1) if cap(orderIds) != lastCap{ fmt.Println(len(orderIds), "\t\t", cap(orderIds), "\t\t", cap(orderIds)-lastCap) lastCap = cap(orderIds) } } } 输出 0 0 已使用 容量 增量 1 2 2 3 4 2 5 8 4 9 16 8 ...

执行时间: 1716057328420.2 毫秒