Initial commit
This commit is contained in:
20
easygrammar.txt
Normal file
20
easygrammar.txt
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
oscar - iphone12pro
|
||||
ID: 10030
|
||||
DeviceID: dcf3ac0035b492106575a09ca4e1d4abb3d85111c2cfd56648e38a67f6d3c1f7
|
||||
RegTime: 2024-08-25 14:58:38
|
||||
|
||||
|
||||
oscar - iphoneX
|
||||
applestore:
|
||||
ID: 10024
|
||||
DeviceID: c1f3ca1e4fc5eb4608ee183b305114e559c490ac13dadf384d268de6d597ed96
|
||||
RegTime: 2024-08-21 17:11:17
|
||||
|
||||
Dev:
|
||||
ID:
|
||||
DeviceID:
|
||||
RegTime:
|
||||
|
||||
|
||||
|
||||
@ -4,6 +4,11 @@ cd /Users/oscar/Downloads/brew-4.3.8/bin
|
||||
对应目录下的 Library/Caches/swiftybeaver.log 既是
|
||||
|
||||
|
||||
我有个Appstore IAP 的问题。用户A在 我们的app里面,订阅了付费服务,使用的是他自己的apple id; 然后他在另外一台iPhone上登陆这个 apple id,打开我们的应用之后,点击 Restore Purchase,这会触发appstore的回调操作吗? 我该如何保证这个信息可以同步到我们的服务端?
|
||||
|
||||
|
||||
好的,明白了。那么现在我们在新的这台设备上,没有得到新的订阅信息。我在app里使用了日志库来记录信息,我应该怎么把这个日志文件读取出来?
|
||||
|
||||
## 需要一个菊花转动,与后台交互
|
||||
我们继续工作。先回忆一下我们之前都做了哪些。我们编写了GrammarCheckView,TranslateView,WordsView和SettingsView。他们分别完成不同的功能。现在,我们需要一个统一的组建,它需要在客户端有点击事件,与服务端交互时弹出,使得整个页面不可点击和操作;等服务端结果出来之后,再刷新页面。这个组建通常是一个转动的齿轮。它需要在我们上面提到的每个View中用到,所以,我们需要一个比较好的封装。请你以 WordsView 页面为例,给出实现的方法。
|
||||
|
||||
|
||||
@ -1,5 +1,50 @@
|
||||
prompts_server.txt
|
||||
|
||||
|
||||
我们在golang程序中使用了mysql,因此引入了这个库 github.com/go-sql-driver/mysql 来进行操作。现在我们需要开启一个事务,它需要操作两条sql进行更新数据库。请你帮我写个事务的示例。
|
||||
|
||||
|
||||
我在使用 mysql8.0 时发现了一个奇怪的问题。
|
||||
我创建了一个user表,它包含一个字段 RegTime,它是 timestamp 类型,默认值是 CURRENT_TIMESTAMP; 我写入数据时,不指定 RegTime 的值,让它取默认值,然后读取出来的时候,它会显示当前时区(东八区)的值;
|
||||
我又创建了一个vip表,它包含一个字段 PurchaseDate ,它是 timestamp 类型,默认值是 CURRENT_TIMESTAMP;我写入数据时,会在程序中给他赋值,golang的代码如下:
|
||||
currentTime := time.Now()
|
||||
写入之后,读取数据时,它变成了UTC时间,也就是比当前的东八区少了八个小时!
|
||||
|
||||
已知mysql的 time_zone 设置为了 SYSTEM, 而服务器的设置 timedatectl
|
||||
Local time: Sun 2024-08-25 15:21:10 CST 也是东八区的。
|
||||
那么,问题出在哪里呢? 为什么我在golang中给 PurchaseDate 赋值,它的显示,不是东八区的时间?
|
||||
|
||||
|
||||
请帮我写一个shell脚本,它用来管理服务端程序的启动和退出。它接收一个参数:
|
||||
1,当参数取值为 start 时,执行命令
|
||||
cd /usr/local/aigrammar/
|
||||
nohup ./aigrammar > output.log 2>&1 &
|
||||
|
||||
2, 当参数取值为 stop 时,执行命令
|
||||
killall aigrammar
|
||||
|
||||
3, 当参数取值为 restart 时,执行命令
|
||||
killall aigrammar
|
||||
sleep(2)
|
||||
cd /usr/local/aigrammar/
|
||||
nohup ./aigrammar > output.log 2>&1 &
|
||||
|
||||
|
||||
|
||||
我的服务器是 ubuntu的,它的时区设置是: timedatectl
|
||||
Local time: Sat 2024-08-17 12:02:29 CST
|
||||
Universal time: Sat 2024-08-17 04:02:29 UTC
|
||||
RTC time: Sat 2024-08-17 04:02:29
|
||||
Time zone: Asia/Shanghai (CST, +0800)
|
||||
然后我的mysql的时区,是跟随系统的:SHOW VARIABLES LIKE 'time_zone'; SYSTEM。
|
||||
|
||||
然后我在golang中,获取时间
|
||||
currentTime := time.Now()
|
||||
nextDay = time.Unix(transantion.ExpiresDate/1000, 0).In(time.Local)
|
||||
并写入到mysql的 timestamp 字段中,通过mysql客户端读取时发现它的时间不对,变成了 UTC时间,而不是 CST时间。这是怎么回事呢?
|
||||
|
||||
|
||||
|
||||
现在我们需要增加一个函数 QueryUserBenefits,它的输入参数与 QueryUserBenefits 类似,ID保持一致,增加一个 datestr 参数,它的格式类似于 '20240705', 默认值是'*'。函数的作用是删除 ID:datastr的redis key,如果datestr为默认值的话,则表示全部。请完成你的代码
|
||||
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ mariadb_password = J33mHT26=da!
|
||||
|
||||
|
||||
azure portal:
|
||||
https://portal.azure.com/
|
||||
francecentral
|
||||
https://grammar.openai.azure.com/
|
||||
8b68c235b737488ab9a99983a14f8cca
|
||||
@ -20,6 +21,10 @@ gpt35
|
||||
49.51.178.206
|
||||
Tester@123
|
||||
|
||||
mysql:
|
||||
mysql -udevops -pb5hs945wXjHr aigrammar
|
||||
mysql -uroot -pehKK3lDXo5jx aigrammar
|
||||
|
||||
|
||||
硅谷服务器(centos)
|
||||
170.106.194.18
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>AIGrammar - Privacy Policy</title>
|
||||
<title>EasyGrammar - Privacy Policy</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
@ -33,7 +33,7 @@
|
||||
<h1>Privacy Policy</h1>
|
||||
|
||||
<h2>Introduction</h2>
|
||||
<p>Welcome to AIGrammar. This Privacy Policy explains how we collect, use, disclose, and protect your information when you use our application ("App"). By using the App, you agree to the collection and use of information in accordance with this policy. If you do not agree with the terms of this Privacy Policy, please do not use the App.</p>
|
||||
<p>Welcome to EasyGrammar. This Privacy Policy explains how we collect, use, disclose, and protect your information when you use our application ("App"). By using the App, you agree to the collection and use of information in accordance with this policy. If you do not agree with the terms of this Privacy Policy, please do not use the App.</p>
|
||||
|
||||
<h2>1. Information We Collect</h2>
|
||||
<p><strong>1.1 Personal Information:</strong> When you register for an account or use our services, we may collect personal information such as your name, email address, and account details.</p>
|
||||
@ -58,7 +58,7 @@
|
||||
<p>We take reasonable measures to protect your information from unauthorized access, use, or disclosure. However, no internet or email transmission is ever fully secure or error-free.</p>
|
||||
|
||||
<h2>5. Your Rights</h2>
|
||||
<p>You have the right to access, update, and delete your personal information. You can manage your account settings and preferences within the App or by contacting us at support@aigrammar.com.</p>
|
||||
<p>You have the right to access, update, and delete your personal information. You can manage your account settings and preferences within the App or by contacting us at support@EasyGrammar.com.</p>
|
||||
|
||||
<h2>6. Children's Privacy</h2>
|
||||
<p>Our services are not intended for use by children under the age of 13. We do not knowingly collect personal information from children under 13. If we become aware that we have collected personal information from a child under 13, we will take steps to delete such information.</p>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>AIGrammar - Term of Use</title>
|
||||
<title>EasyGrammar - Term of Use</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
@ -31,8 +31,8 @@
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Term of Use</h1>
|
||||
<h2>Welcome to AIGrammar</h2>
|
||||
<p>These Terms of Use ("Terms") govern your use of the AIGrammar application ("App"), which is designed to provide grammar and spelling correction, translation services (English to Chinese and vice versa), and dictionary features for English words. By accessing or using the App, you agree to be bound by these Terms. If you do not agree with these Terms, please do not use the App.</p>
|
||||
<h2>Welcome to EasyGrammar</h2>
|
||||
<p>These Terms of Use ("Terms") govern your use of the EasyGrammar application ("App"), which is designed to provide grammar and spelling correction, translation services (English to Chinese and vice versa), and dictionary features for English words. By accessing or using the App, you agree to be bound by these Terms. If you do not agree with these Terms, please do not use the App.</p>
|
||||
|
||||
<h2>1. Services Provided</h2>
|
||||
<p><strong>1.1 Grammar and Spelling Correction:</strong> The App offers tools to correct grammar and spelling errors in English texts.</p>
|
||||
@ -54,7 +54,7 @@
|
||||
<p><strong>4.2 Prohibited Activities:</strong> You agree not to engage in any activity that interferes with or disrupts the App or its services.</p>
|
||||
|
||||
<h2>5. Intellectual Property</h2>
|
||||
<p><strong>5.1 Ownership:</strong> The App and its content, features, and functionality are owned by AIGrammar and its licensors.</p>
|
||||
<p><strong>5.1 Ownership:</strong> The App and its content, features, and functionality are owned by EasyGrammar and its licensors.</p>
|
||||
<p><strong>5.2 Restrictions:</strong> You may not copy, modify, distribute, sell, or lease any part of the App.</p>
|
||||
|
||||
<h2>6. Privacy</h2>
|
||||
@ -64,7 +64,7 @@
|
||||
<p>We reserve the right to terminate or suspend your access to the App at any time, without notice, for conduct that we believe violates these Terms or is harmful to other users of the App.</p>
|
||||
|
||||
<h2>8. Limitation of Liability</h2>
|
||||
<p>To the fullest extent permitted by law, AIGrammar shall not be liable for any indirect, incidental, special, consequential, or punitive damages, or any loss of profits or revenues, whether incurred directly or indirectly, or any loss of data, use, goodwill, or other intangible losses, resulting from your use of the App.</p>
|
||||
<p>To the fullest extent permitted by law, EasyGrammar shall not be liable for any indirect, incidental, special, consequential, or punitive damages, or any loss of profits or revenues, whether incurred directly or indirectly, or any loss of data, use, goodwill, or other intangible losses, resulting from your use of the App.</p>
|
||||
|
||||
<h2>9. Changes to the Terms</h2>
|
||||
<p>We may modify these Terms from time to time. We will notify you of any changes by posting the new Terms on the App. Your continued use of the App after the changes have been posted constitutes your acceptance of the new Terms.</p>
|
||||
|
||||
Reference in New Issue
Block a user