sqlite创建时候出现错误。errmsg: near "From": syntax error

sqlite创建时候出现错误。errmsg: near "From": syntax error,代码如下:我找不到错误了。。。
const char *sql_create_table="create table mydata (From integer, To integer, Data integer, Message text, IMEI integer, IMSI integer, PhoneNumber integer);";
ret = sqlite3_exec(db,sql_create_table,NULL,NULL,&errmsg);
if(ret != SQLITE_OK)
{
printf("errmsg: %s\n",errmsg);
//return -1;
}

3个回答

结贴,from不能用作字段

from 是sql语句里面的关键字啊,不能用作字段名

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Android Sqlite建表语句出错

``` ublic static final String CREATE_TABLE = "create table HistoryNote ("+ "id integer primary key autoincrement,"+ "date text,"+ "from text,"+ "content text,"+ "tag integer,"+//tag = 0是历史记录,tag = 1是记事簿 "isCollected integer)";// isCollected = 0是未被收藏,=1是收藏 ``` 但是错误提示在from附近有错! ``android.database.sqlite.SQLiteException: near "from": syntax error (code 1): , while compiling: create table History (id integer primary key autoincrement,date text,from text,content text,tag integer,isCollected integer)` ``` 我是个安卓开发初学者,这个问题在哪?

sql语句SQL logic error near ",": syntax error一般错误出在哪里

想达到的效果:主窗口上面是一个容器panel,里面有3个下拉框,左边是一个toolStrip菜单栏,剩余部分是一个panel1(用来显示五个子窗口),如第一个图;按完第一个按钮,在主窗口的panel1上显示第一个子窗口(Win1)的内容,效果如图二; 下面是主窗口用的部分程序 ``` public static string a; public static string b;public static string c;Win1 w1; w1 = new Win1();string a = comboBox1.Text; string b = comboBox2.Text; string c = comboBox3.Text; private void toolStripButton1_Click(object sender, EventArgs e) { this.panel1.Controls.Clear(); // 清空原有的控件 w1.TopLevel = false; // 非顶级窗口 w1.FormBorderStyle = FormBorderStyle.None; // 不显示标题栏 //w1.Dock = System.Windows.Forms.DockStyle.Fill; // 填充panel w1.WindowState = FormWindowState.Maximized; this.panel1.Controls.Add(w1); // 添加w1窗体 //w1.Show(this); w1.Show(); flag = true; } private void button1_Click(object sender, EventArgs e) { if (flag == true && flag1 == true && flag2 == true) { w1.Creatchart1(); } } ``` 下面是Win1的其中的一个chart的程序 ``` private void Creatchart1() { string e = Form1.a; string f = Form1.b; string g = Form1.c; string wax = e + f + g; string dbPath = @"D:\历年高考分数.db"; string sq = @"Data Source=" + dbPath; m = new SQLiteConnection(sq); m.Open(); SQLiteDataAdapter mAdapter = new SQLiteDataAdapter("select " + wax + ",yxlc from 表2", m); DataSet ds = new DataSet(); mAdapter.Fill(ds); DataTable dt = ds.Tables[0]; Series Series1 = new Series(); chart1.DataSource = dt; Series1.IsValueShownAsLabel = false;//是否显示图例 chart1.Series.Add(Series1); chart1.Series["Series1"].ChartType = SeriesChartType.Spline;//形状 chart1.Series[0].XValueMember = "yxlc";//X轴数据成员列 chart1.Series[0].YValueMembers = wax; chart1.Series[0].IsValueShownAsLabel = true;//显示坐标 chart1.DataBind(); chart1.BringToFront(); m.Close(); } ``` 启动时在mAdapter.Fill(ds);处显示其他信息: SQL logic error near ",": syntax error ,应该怎么改 ![图片说明](https://img-ask.csdn.net/upload/201908/30/1567155000_964508.png)![图片说明](https://img-ask.csdn.net/upload/201908/30/1567155019_611468.png)

(我原来问的不小心给删了)sql语句SQL logic error near ",": syntax error一般错误出在哪里

想达到的效果:主窗口上面是一个容器panel,里面有3个下拉框,左边是一个toolStrip菜单栏,剩余部分是一个panel1(用来显示五个子窗口),如第一个图;按完第一个按钮,在主窗口的panel1上显示第一个子窗口(Win1)的内容,效果如图二; a是comboBox1.Text,b 是comboBox2.Text,c是comboBox3.Text,为了方便子窗口调用主窗口public static string a; public static string b;public static string c;有令string e = Form1.a; string f = Form1.b; string g = Form1.c;不知道对不对 下面是主窗口用的部分程序 ``` public static string a; public static string b;public static string c;Win1 w1; w1 = new Win1();string a = comboBox1.Text; string b = comboBox2.Text; string c = comboBox3.Text; private void toolStripButton1_Click(object sender, EventArgs e) { this.panel1.Controls.Clear(); // 清空原有的控件 w1.TopLevel = false; // 非顶级窗口 w1.FormBorderStyle = FormBorderStyle.None; // 不显示标题栏 //w1.Dock = System.Windows.Forms.DockStyle.Fill; // 填充panel w1.WindowState = FormWindowState.Maximized; this.panel1.Controls.Add(w1); // 添加w1窗体 //w1.Show(this); w1.Show(); flag = true; } private void button1_Click(object sender, EventArgs e) { if (flag == true && flag1 == true && flag2 == true) { w1.Creatchart1(); } } ``` 下面是Win1的其中的一个chart的程序 ``` private void Creatchart1() { string e = Form1.a; string f = Form1.b; string g = Form1.c; string wax = e + f + g; string dbPath = @"D:\历年高考分数.db"; string sq = @"Data Source=" + dbPath; m = new SQLiteConnection(sq); m.Open(); SQLiteDataAdapter mAdapter = new SQLiteDataAdapter("select " + wax + ",yxlc from 表2", m); DataSet ds = new DataSet(); mAdapter.Fill(ds); DataTable dt = ds.Tables[0]; Series Series1 = new Series(); chart1.DataSource = dt; Series1.IsValueShownAsLabel = false;//是否显示图例 chart1.Series.Add(Series1); chart1.Series["Series1"].ChartType = SeriesChartType.Spline;//形状 chart1.Series[0].XValueMember = "yxlc";//X轴数据成员列 chart1.Series[0].YValueMembers = wax; chart1.Series[0].IsValueShownAsLabel = true;//显示坐标 chart1.DataBind(); chart1.BringToFront(); m.Close(); } ``` 启动时在mAdapter.Fill(ds);处显示其他信息: SQL logic error near ",": syntax error ,应该怎么改 ![图片说明](https://img-ask.csdn.net/upload/201908/30/1567155298_585744.png)![图片说明](https://img-ask.csdn.net/upload/201908/30/1567155318_123552.png)

python新手求助程序问题

各位大神好: 我在课本上抄了一段程序,想看看运行结果,运行时却报错,请帮忙查看是什么原因. 代码如下 ``` import sqlite3 def convert(value): if value.startswith('~'): return value.strip('~') if not value: value = '0' return float(value) conn=sqlite3.connect('food.db') curs=conn.cursor() curs.execute(''' CREATE TABLE food ( id TEXT PRIMARY, desc TEXT, water FLOAT, kcal FLOAT, protein FLOAT, fat FLOAT, ash FLOAT, carbs FLOAT, fiber FLOAT, sugar FLOAT ) ''') query='INSERT INTO food VALUE (?,?,?,?,?,?,?,?,?,?)' for line in open(r'C:\Users\wgh\Downloads\ABBREV.txt'): fields = line.split('^') vals=[convert(f) for f in fields[:field_count]] curs.execute(query,vals) conn.commit() conn.close() ``` 报错内容如下: Traceback (most recent call last): File "E:/python/Lib/site-packages/importdata.py", line 26, in <module> ''') sqlite3.OperationalError: near ",": syntax error

SQLiteException: unrecognized token到底怎么解决

12-07 15:21:10.385 5851-5851/? E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.abc.sqlite_demo, PID: 5851 android.database.sqlite.SQLiteException: unrecognized token: "'01001" (code 1): , while compiling: update tbset name = "'问题"where num ='01201 at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method) at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889) at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500) at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588) at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58) at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31) at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1672) at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1603) at com.abc.sqlite_demo.DBHelper.update(DBHelper.java:74) at com.abc.sqlite_demo.MainActivity.onClick(MainActivity.java:60) at android.view.View.performClick(View.java:4438) at android.view.View$PerformClick.run(View.java:18473) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5120) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:818) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634) at dalvik.system.NativeStart.main(Native Method)

Android SQLite查询报错

在运行查询语句时,报错语法错误: inal Cursor c = getContentResolver().query( Provider.GAME_URI, new String[]{"CASE WHEN " +DBHelper.COLUMN_CRE_USER + " = " + preferences.getInt(LoginScreen.ID, 0) + " THEN (" + DBHelper.COLUMN_CRE_PTS + " AS you AND " + DBHelper.COLUMN_CON_PTS + " AS them) ELSE (" + DBHelper.COLUMN_CON_PTS + " AS you AND " + DBHelper.COLUMN_CRE_PTS + " AS them)"},"turn = ?", new String[] { preferences.getInt(LoginScreen.ID, 0) + ""}, null); 报的错: 04-24 19:57:48.345: E/AndroidRuntime(18775): Caused by: android.database.sqlite.SQLiteException: near "AS": syntax error (code 1): , while compiling: SELECT CASE WHEN createduser = 112 THEN (createdplayerpts AS you AND connectedplayerpts AS them) ELSE (connectedplayerpts AS you AND createdplayerpts AS them) FROM game WHERE (turn = ?)

Gosqlite(golang)中出现奇怪的sqlite错误

<div class="post-text" itemprop="text"> <p>I got a strange error and can't find out whats going wrong. I use this function to save an incoming message:</p> <pre><code>func (mdb *MailDB) SaveMail(mail *Mail){ conn, err := sqlite.Open("maildb.db") if err != nil { log.Print("Unable to open the database: ", err) return } defer conn.Close() insertsql := fmt.Sprintf(`INSERT INTO mails (sender,subject,text,time) VALUES ("%v", "%v", "%v", %v) ;`, mail.Sender,mail.Subject,mail.Text,time.Now().Unix()) err = conn.Exec(insertsql) if err!=nil { log.Print("maildb insert fail @exec: ",err) log.Print(insertsql) return } } </code></pre> <p>I get this error:</p> <pre><code>2012/05/09 10:10:20 maildb insert fail @exec: SQL error or missing database: unrecognized token: """ 2012/05/09 10:10:20 INSERT INTO mails (sender,subject,text,time) VALUES ("wLrOBizTcmS1MlqeXydUK9U6YJQ=", "abc", "321 ", 1336551020) ; </code></pre> <p>(after 321 is an ' ' i dont know why its ommited here)</p> <p>The strange thing is, that I can send the copy'n'pasted query in an sqlite console without problems.</p> <p>do someone see whats going wrong? please help!</p> </div>

android有关sqlite数据库创建问题

刚开始做android,碰到了数据库sqlite的问题,把数据库连接和创建表的代码打在一起,就是照着菜鸟教程上的代码打的,也不报错,运行也没问题,但是就是什么都没有,请教一下各位谁能告诉我是怎么回事?![图片说明](https://img-ask.csdn.net/upload/201606/17/1466169168_292632.jpg)![图片说明](https://img-ask.csdn.net/upload/201606/17/1466169191_727154.jpg)

保存JSON字符串到sqlite中

数据是JSON格式的,这样: -- - `contentJson=`[{"key1":"Value1","key2":"Value2","key3":"Value3","key4":"Value4","key5":"Value5","key6":"Value6","key7":"Value7", "key8":"Value8"},{"key1":"Value1","key2":"Value2","key3":"Value3","key4":"Value4","key5":"Value5","key6":"Value6","key7":"Value7", "key8":"Value8"}] -- - 怎么样把这些数据保存到Sqlite数据库中? 实现代码: NSString *statement = [[NSString alloc]initWithFormat:@"INSERT INTO mydatabase(contentJson,ID) VALUES(\"%@\",%d)",contentJson,ID]; 但是没有成功,非常感谢帮忙。

SQLite创建数据库while compiling: testsystem.db

android.database.sqlite.SQLiteException: near "testsystem": syntax error (code 1): , while compiling: testsystem.db at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method) at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:887) at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:498) at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588) at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58) at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31) at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1674) at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1605) at com.gggd.sunny.testsystem.tools.DBOpenHelper.onCreate(DBOpenHelper.java:63) at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:251) at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187) at com.gggd.sunny.testsystem.tools.LibraryAndTestDB.<init>(LibraryAndTestDB.java:21) at com.gggd.sunny.testsystem.MakeTestModeActivity.insertData(MakeTestModeActivity.java:217) at com.gggd.sunny.testsystem.MakeTestModeActivity$2.onClick(MakeTestModeActivity.java:181) at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:163) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:5527) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)

如何将laravel / laravel从5.3更新到5.4?

<div class="post-text" itemprop="text"> <p>I have attempted to update <code>laravel/laravel</code> from <code>5.3</code> to <code>5.4</code>, and to do so, I have modified <code>composer.json</code> to this:</p> <pre><code> { "name" : "laravel/laravel", "description" : "The Laravel Framework.", "keywords" : [ "framework", "laravel" ], "license" : "MIT", "type" : "project", "require" : { "php" : "&gt;=5.6.4", "laravel/framework" : "5.4.*", "h4cc/wkhtmltopdf-amd64" : "0.12.x", "h4cc/wkhtmltoimage-amd64" : "0.12.x", "barryvdh/laravel-snappy" : "^0.3.3", "greggilbert/recaptcha" : "dev-master" }, "require-dev" : { "fzaninotto/faker" : "~1.4", "mockery/mockery" : "0.9.*", "phpunit/phpunit" : "~5.7", "symfony/css-selector" : "2.8.*|3.0.*", "symfony/dom-crawler" : "2.8.*|3.0.*", "barryvdh/laravel-ide-helper" : "^2.2", "guzzlehttp/guzzle" : "~6.0" }, "autoload" : { "classmap" : [ "database" ], "psr-4" : { "App\\" : "app/" } }, "autoload-dev" : { "classmap" : [ "tests/TestCase.php" ] }, "scripts" : { "post-root-package-install" : "php -r \"copy('.env.example', '.env');\"", "post-create-project-cmd" : "php artisan key:generate", "post-install-cmd" : [ "Illuminate\\Foundation\\ComposerScripts::postInstall", "php artisan optimize" ], "post-update-cmd" : [ "Illuminate\\Foundation\\ComposerScripts::postUpdate", "php artisan optimize" ] }, "config" : { "preferred-install" : "dist" } } </code></pre> <p>Then I ran</p> <pre><code>$ composer update </code></pre> <p>It seems that <code>composer</code> did not do anything:</p> <pre><code>Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 0 installs, 0 updates, 0 removals Generating autoload files &gt; Illuminate\Foundation\ComposerScripts::postUpdate &gt; php artisan optimize Generating optimized class loader The compiled class file has been removed. </code></pre> <p>When I then ran </p> <pre><code>$ php artisan --version </code></pre> <p>the output is:</p> <pre><code>Laravel Framework version 5.3.31 </code></pre> <p>In <code>composer.lock</code> I find this:</p> <pre><code> { "name": "laravel/framework", "version": "v5.3.31", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", "reference": "e641e75fc5b26ad0ba8c19b7e83b08cad1d03b89" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/laravel/framework/zipball/e641e75fc5b26ad0ba8c19b7e83b08cad1d03b89", "reference": "e641e75fc5b26ad0ba8c19b7e83b08cad1d03b89", "shasum": "" }, "require": { "classpreloader/classpreloader": "~3.0", "doctrine/inflector": "~1.0", "ext-mbstring": "*", "ext-openssl": "*", "jeremeamia/superclosure": "~2.2", "league/flysystem": "~1.0", "monolog/monolog": "~1.11", "mtdowling/cron-expression": "~1.0", "nesbot/carbon": "~1.20", "paragonie/random_compat": "~1.4|~2.0", "php": "&gt;=5.6.4", "psy/psysh": "0.7.*|0.8.*", "ramsey/uuid": "~3.0", "swiftmailer/swiftmailer": "~5.4", "symfony/console": "3.1.*", "symfony/debug": "3.1.*", "symfony/finder": "3.1.*", "symfony/http-foundation": "3.1.*", "symfony/http-kernel": "3.1.*", "symfony/process": "3.1.*", "symfony/routing": "3.1.*", "symfony/translation": "3.1.*", "symfony/var-dumper": "3.1.*", "vlucas/phpdotenv": "~2.2" }, "replace": { "illuminate/auth": "self.version", "illuminate/broadcasting": "self.version", "illuminate/bus": "self.version", "illuminate/cache": "self.version", "illuminate/config": "self.version", "illuminate/console": "self.version", "illuminate/container": "self.version", "illuminate/contracts": "self.version", "illuminate/cookie": "self.version", "illuminate/database": "self.version", "illuminate/encryption": "self.version", "illuminate/events": "self.version", "illuminate/exception": "self.version", "illuminate/filesystem": "self.version", "illuminate/hashing": "self.version", "illuminate/http": "self.version", "illuminate/log": "self.version", "illuminate/mail": "self.version", "illuminate/notifications": "self.version", "illuminate/pagination": "self.version", "illuminate/pipeline": "self.version", "illuminate/queue": "self.version", "illuminate/redis": "self.version", "illuminate/routing": "self.version", "illuminate/session": "self.version", "illuminate/support": "self.version", "illuminate/translation": "self.version", "illuminate/validation": "self.version", "illuminate/view": "self.version", "tightenco/collect": "self.version" }, "require-dev": { "aws/aws-sdk-php": "~3.0", "mockery/mockery": "~0.9.4", "pda/pheanstalk": "~3.0", "phpunit/phpunit": "~5.4", "predis/predis": "~1.0", "symfony/css-selector": "3.1.*", "symfony/dom-crawler": "3.1.*" }, "suggest": { "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).", "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.4).", "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~5.3|~6.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).", "predis/predis": "Required to use the redis cache and queue drivers (~1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0).", "symfony/css-selector": "Required to use some of the crawler integration testing tools (3.1.*).", "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (3.1.*).", "symfony/psr-http-message-bridge": "Required to use psr7 bridging features (0.2.*)." }, "type": "library", "extra": { "branch-alias": { "dev-master": "5.3-dev" } }, </code></pre> <p>What's wrong ?</p> <p>Thank's in advance for any help.</p> </div>

打开SQlite数据库的时候报错

用嵌入SQLite数据库开发ios应用,我把数据库放到SQlite管理员,然后拖到Xcode工程中。但是当我打开DB的时候,报错 **out of memory** ,不知道是不是SQlite的bug,因为我的文件很小,应该不会报出内存问题。 初始化数据库的代码: - (id)initWithPath:(NSString *)path { if (self = [super init]) { BOOL success; NSError *error; NSFileManager *fileManager = [NSFileManager defaultManager]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *dbPath = [documentsDirectory stringByAppendingPathComponent:@"SoundLib_DB.sqlite"]; if ([fileManager fileExistsAtPath:dbPath] == NO) { NSString *resourcePath = [[NSBundle mainBundle] pathForResource:@"SoundLib_DB" ofType:@"sqlite"]; [fileManager copyItemAtPath:resourcePath toPath:dbPath error:&error]; } success = [fileManager fileExistsAtPath:dbPath]; if(!success) { NSLog(@"Cannot locate database file '%@'.", dbPath); } sqlite3 *dbConnection; //Here is when I get the error, at trying to open the DB if (sqlite3_open_v2("SoundLib", &dbConnection, SQLITE_OPEN_READWRITE, NULL) != SQLITE_OK) { NSLog(@"[SQLITE] Unable to open database!"); NSLog(@"%s Prepare failure '%s' (%1d)", __FUNCTION__, sqlite3_errmsg(database), sqlite3_errcode(database)); return nil; } database = dbConnection; } return self; }

laravel-echo-server 404尝试进行身份验证时

<div class="post-text" itemprop="text"> <p>I'm setting up a laravel-echo-server, when I try to authenticate to a private channel, I get the error: Client can not be authenticated, got HTTP status 404.</p> <p>Authorizing public channels works.</p> <p>//channels.php</p> <pre><code>Broadcast::channel('private-test', function($user) { return true; }); </code></pre> <p>//front-end script to authenticate to private channel</p> <pre><code>window.Echo.private('private-test') .listen('TestMessage', (e) =&gt; { app.updateChat(e); }); </code></pre> <p>//laravel-echo-server.json</p> <pre><code>{ "authHost": "basic.test", "authEndpoint": "/broadcasting/auth", "clients": [], "database": "redis", "databaseConfig": { "redis": {}, "sqlite": { "databasePath": "/database/laravel-echo-server.sqlite" } }, "devMode": false, "host": null, "port": "6001", "protocol": "http", "socketio": {}, "sslCertPath": "", "sslKeyPath": "", "sslCertChainPath": "", "sslPassphrase": "", "apiOriginAllow": { "allowCors": false, "allowOrigin": "", "allowMethods": "", "allowHeaders": "" } } </code></pre> <p>//bootstrap.js</p> <pre><code>window._ = require('lodash'); /** * We'll load jQuery and the Bootstrap jQuery plugin which provides support * for JavaScript based Bootstrap features such as modals and tabs. This * code may be modified to fit the specific needs of your application. */ try { window.$ = window.jQuery = require('jquery'); require('bootstrap-sass'); } catch (e) {} /** * We'll load the axios HTTP library which allows us to easily issue requests * to our Laravel back-end. This library automatically handles sending the * CSRF token as a header based on the value of the "XSRF" token cookie. */ window.axios = require('axios'); window.axios.defaults.headers.common['X-CSRF-TOKEN'] = window.Laravel.csrfToken; window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; /** * Next we will register the CSRF Token as a common header with Axios so that * all outgoing HTTP requests automatically have it attached. This is just * a simple convenience so we don't have to attach every token manually. */ let token = document.head.querySelector('meta[name="csrf-token"]'); if (token) { window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; } else { console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); } /** * Echo exposes an expressive API for subscribing to channels and listening * for events that are broadcast by Laravel. Echo and event broadcasting * allows your team to easily build robust real-time web applications. */ import Echo from 'laravel-echo' // window.Pusher = require('pusher-js'); // window.Echo = new Echo({ // broadcaster: 'pusher', // key: 'your-pusher-key' // }); window.Echo = new Echo({ broadcaster: 'socket.io', host: window.location.hostname + ':6001' }); </code></pre> <p>Simply, my laravel echo gets loaded in from a app.js in public/js, all the libraries within bootstrap.js get loaded in. AFAIK, there is no issue in loading in the right javascript or front-end syntax.</p> <p>I can add public channels and send messages over them, however I cannot authenticate to private channels.</p> <p>Does anyone have suggestions?</p> </div>

SQLSTATE [HY000]:常规错误:Laravel SQLite解析时出现10个磁盘I / O错误

<div class="post-text" itemprop="text"> <p>I have a case where I upload an SQLite DB to Laravel to be parsed for the data within. I am currently using Homestead for this project. </p> <p>When I upload an SQLite db sized under a MB, all seems alright. As soon as I upload a DB that is 2MB I get this error:</p> <blockquote> <p>SQLSTATE[HY000]: General error: 10 disk I/O error</p> </blockquote> <p>What can be the trouble here? Is this a Homestead thing? The physical HD has plenty of space so it isn't a space problem. I've checked the permissions on the directory the file is being read from and the permissions are alright. Any ideas?</p> </div>

为什么加工后的协程卡住了?

<div class="post-text" itemprop="text"> <p>I am new to Golang. I have been using GORM and concurrency of go to read a SQLite database and write it into a CSV file. It is working smooth but when the processing is done it is not ending the main program and exiting. I have to print <code>command+c</code> to exit. I don't know what I am doing wrong. May be it is entering into some blocking or deadlock mode or something. Moreover it is not printing a bye message too. Which means it is still trying to read the data from the channel. Please help. Here is the code.</p> <pre><code>package main import ( "fmt" "reflect" "github.com/jinzhu/gorm" _ "github.com/jinzhu/gorm/dialects/sqlite" ) type AirQuality struct { // gorm.Model // ID uint `gorm:"column:id"` Index string `gorm:"column:index"` BEN string `gorm:"column:BEN"` CH4 string `gorm:"column:CH4"` CO string `gorm:"column:CO"` EBE string `gorm:"column:EBE"` MXY string `gorm:"column:MXY"` NMHC string `gorm:"column:NMHC"` NO string `gorm:"column:NO"` NO2 string `gorm:"column:NO_2"` NOX string `gorm:"column:NOx"` OXY string `gorm:"column:OXY"` O3 string `gorm:"column:O_3"` PM10 string `gorm:"column:PM10"` PM25 string `gorm:"column:PM25"` PXY string `gorm:"column:PXY"` SO2 string `gorm:"column:SO_2"` TCH string `gorm:"column:TCH"` TOL string `gorm:"column:TOL"` Time string `gorm:"column:date; type:timestamp"` Station string `gorm:"column:station"` } func (AirQuality) TableName() string { return "AQ" } func main() { c := generateRows("boring!!") for { fmt.Println(&lt;-c) if c == nil { fmt.Println("Bye") break } } } func generateRows(msg string) &lt;-chan []string { c := make(chan []string) go func() { db, err := gorm.Open("sqlite3", "./load_testing_7.6m.db") if err != nil { panic("failed to connect database") } defer db.Close() rows, err := db.Model(&amp;AirQuality{}).Limit(20).Rows() defer rows.Close() if err != nil { panic(err) } for rows.Next() { var aq AirQuality db.ScanRows(rows, &amp;aq) v := reflect.Indirect(reflect.ValueOf(aq)) var buf []string for i := 0; i &lt; v.NumField(); i++ { buf = append(buf, v.Field(i).String()) } c &lt;- buf } }() return c } </code></pre> </div>

在Go GORM中显示外键的外键

<div class="post-text" itemprop="text"> <p>I was able to partially solve this with <a href="https://stackoverflow.com/questions/29435783/gorm-golang-orm-associations">this case</a></p> <p>Unfortunately, the Preload() function doesn't seem to work with delving further down in the related object set. </p> <p>To clarify, I have the following models:</p> <pre><code> type Room struct { gorm.Model Name string Games []Game `gorm:"ForeignKey:RoomID"` } type Game struct { gorm.Model RoomID int `gorm:"index"` Players []Player `gorm:"ForeignKey:GameID"` } type Player struct { gorm.Model Name string GameID int `gorm:"index"` } </code></pre> <p>When I create a new object with a new Room, Game, and Player object created I get the following data returned (json encoded):</p> <pre><code> {"Value":{"ID":26,"CreatedAt":"2016-05-15T01:21:22.426234189-07:00","UpdatedAt":"2016-05-15T01:21:22.426234189-07:00","DeletedAt":null,"Name":"foo","Games":[{"ID":17,"CreatedAt":"2016-05-15T01:21:22.427026134-07:00","UpdatedAt":"2016-05-15T01:21:22.427026134-07:00","DeletedAt":null,"RoomID":26,"Turns":null,"Players":[{"ID":4,"CreatedAt":"2016-05-15T01:21:22.427560561-07:00","UpdatedAt":"2016-05-15T01:21:22.427560561-07:00","DeletedAt":null,"Name":"TestPlayer","GameID":17}],"Counter":1,"Assigned":false}],"Testing":false},"Error":null,"RowsAffected":1} </code></pre> <p>But if I try to query the structure with a preload() function, I get the following:</p> <pre><code> {"Value":{"ID":26,"CreatedAt":"2016-05-15T01:21:22.426234189-07:00","UpdatedAt":"2016-05-15T01:21:22.426234189-07:00","DeletedAt":null,"Name":"foo","Games":[{"ID":17,"CreatedAt":"2016-05-15T01:21:22.427026134-07:00","UpdatedAt":"2016-05-15T01:21:22.427026134-07:00","DeletedAt":null,"RoomID":26,"Turns":null,"Players":null,"Counter":1,"Assigned":false}],"Testing":false},"Error":null,"RowsAffected":1} </code></pre> <p>Note that the Players section is now null. Here's my room registration and room query functions:</p> <pre><code> func RegisterRoom(w http.ResponseWriter, r *http.Request) { err := r.ParseForm() if err != nil { // Handle error } // r.PostForm is a map of our POST form values room := Room{ Name: r.PostFormValue("label"), Games: []Game{{ Counter: 1, Players: []Player{{Name: r.PostFormValue("username")}}, }}, } t := db.Create(&amp;room) if err := json.NewEncoder(w).Encode(t); err != nil { panic(err) } } func RoomShow(w http.ResponseWriter, r *http.Request) { var rm Room vars := mux.Vars(r) roomId := vars["roomId"] id, _ := strconv.Atoi(roomId) room := db.Preload("Games").First(&amp;rm, id) result := db.Find(&amp;room) json.NewEncoder(w).Encode(result) } </code></pre> </div>

Laravel 5.7 - 广播 - socket.io - redis:客户端什么也没发生

<div class="post-text" itemprop="text"> <p>Since few days I read about how to setup laravel-echo on my local machine. I manage to be able to run laravel-echo-server with redis and socket.io.</p> <p>The problem is that the event is fired, but nothing happen on the client side.</p> <p>I know that the event is fired, because it's log into my horizon.log file.</p> <pre><code>Horizon started successfully. [2018-08-29 18:35:30][31] Processing: App\Events\NewModel [2018-08-29 18:35:31][31] Processed: App\Events\NewModel </code></pre> <p>Then, into my echo.log file, I can see that the user is connected to the channel and echo trigger the event.</p> <pre><code>L A R A V E L E C H O S E R V E R version 1.3.9 ⚠ Starting server in DEV mode... ✔ Running at localhost on port 60010 ✔ Channels are ready. ✔ Listening for http events... ✔ Listening for redis events... Server ready! [6:35:15 PM] - QW3VITRzWPH4FvxPAAAB joined channel: channel-name Channel: presence-channel-name Event: App\Events\NewModel </code></pre> <p>It run on port 60010, because when I tried to do it on port 6001, the client is unable to connect.</p> <p>I'm using virtualbox/homestead on a windows 10 machine.</p> <p>There is the port forwarding into my Homestead.yaml</p> <pre><code>ports: - send: 60010 to: 6001 </code></pre> <p>So, I don't understand why client don't log the event. There is why my code at the moment</p> echo.js <pre><code>/** * Echo exposes an expressive API for subscribing to channels and listening * for events that are broadcast by Laravel. Echo and event broadcasting * allows your team to easily build robust real-time web applications. */ import Echo from "laravel-echo" window.io = require('socket.io-client'); // Have this in case you stop running your laravel echo server if (typeof io !== 'undefined') { window.Echo = new Echo({ broadcaster: 'socket.io', host: window.location.hostname + ':60010', }); console.log('Connected to socket.io'); } else { console.log('Not connected to socket.io'); } window.Echo.channel('channel-name') .listen('NewModel', (e) =&gt; { console.log('1:'); console.log(e); }) .listen('App\Events\NewModel', (e) =&gt; { console.log('2:'); console.log(e); }) .listen('App.Events.NewModel', (e) =&gt; { console.log('3:'); console.log(e); }); </code></pre> laravel-echo-server.json <pre><code>{ "authHost": "https://app.torque.homestead", "authEndpoint": "/broadcasting/auth", "clients": [{ "appId": "appId", "key": "key" }], "database": "redis", "databaseConfig": { "redis": { "port": "6379", "host": "127.0.0.1" }, "sqlite": { "databasePath": "/database/laravel-echo-server.sqlite" } }, "devMode": true, "host": "", "port": "60010", "protocol": "https", "socketio": {}, "sslCertPath": "app.torque.homestead.crt", "sslKeyPath": "app.torque.homestead.key", "sslCertChainPath": "", "sslPassphrase": "", "apiOriginAllow": { "allowCors": false, "allowOrigin": "", "allowMethods": "", "allowHeaders": "" } } </code></pre> channels.php <pre><code>&lt;?php /* |-------------------------------------------------------------------------- | Broadcast Channels |-------------------------------------------------------------------------- | | Here you may register all of the event broadcasting channels that your | application supports. The given channel authorization callbacks are | used to check if an authenticated user can listen to the channel. | */ Broadcast::channel('App.User.{id}', function ($user, $id) { return (int) $user-&gt;id === (int) $id; }); Broadcast::channel('channel-name', function () { return true; }); </code></pre> <p>If you want to see another file, let me know. Actually I don't know what could be needed to fix the issue.</p> <p>I think the problem may come from the forwarding port... But like I said, using 6001 is not working.</p> <p>I tried many things like changing port(maybe not the right combination like client on 60010 and server on 6001????)</p> <p>I also change that line into echo.js many times</p> <pre><code>host: window.location.hostname + ':60010', </code></pre> <p>There is some version of what i'm using :</p> <pre><code>vagrant@homestead:~$ node -v v10.8.0 vagrant@homestead:~$ npm -v 6.4.0 vagrant@homestead:~$ php -v PHP 7.2.9-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Aug 19 2018 07:16:54) ( NTS ) </code></pre> <p>packages.json</p> <pre><code>{ "private": true, "scripts": { "dev": "npm run development", "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", "watch": "npm run development -- --watch", "watch-poll": "npm run watch -- --watch-poll", "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", "prod": "npm run production", "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" }, "devDependencies": { "axios": "^0.18", "babel-preset-react": "^6.24.1", "bootstrap": "^4.1.3", "cross-env": "^5.2.0", "jquery": "^3.2", "laravel-mix": "^2.1.14", "lodash": "^4.17.4", "popper.js": "^1.14.4", "vue": "^2.5.17" }, "dependencies": { "@fortawesome/fontawesome": "^1.1.8", "@fortawesome/fontawesome-free-brands": "^5.0.13", "@fortawesome/fontawesome-free-regular": "^5.0.13", "@fortawesome/fontawesome-free-solid": "^5.0.13", "@fortawesome/fontawesome-free-webfonts": "^1.0.9", "@fortawesome/vue-fontawesome": "0.0.22", "ajv": "^6.5.3", "bootstrap-confirmation2": "^4.0.1", "datatables.net": "^1.10.19", "datatables.net-bs4": "^1.10.19", "datatables.net-buttons": "^1.5.3", "datatables.net-buttons-bs4": "^1.5.3", "express": "^4.16.3", "ioredis": "^4.0.0", "laravel-echo": "^1.4.0", "laravel-echo-server": "^1.3.9", "socket.io": "^2.1.1", "socket.io-client": "^2.1.1", "vee-validate": "^2.0.9", "vue-inject": "^2.1.1", "yarn": "^1.9.4" } } </code></pre> <p>composer.json</p> <pre><code>{ "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "type": "project", "require": { "php": "^7.1.3", "aloha/twilio": "^4.0", "eyewitness/eye": "dev-beta", "fideloper/proxy": "^4.0", "guzzlehttp/guzzle": "^6.3", "laravel/framework": "5.7.*", "laravel/horizon": "^1.3", "laravel/passport": "^6.0", "laravel/tinker": "^1.0", "predis/predis": "^1.1" }, "require-dev": { "filp/whoops": "^2.0", "fzaninotto/faker": "^1.4", "mockery/mockery": "^1.0", "nunomaduro/collision": "^2.0", "phpunit/phpunit": "^7.0" }, "autoload": { "classmap": [ "database/seeds", "database/factories" ], "psr-4": { "App\\": "app/" } }, "autoload-dev": { "psr-4": { "Tests\\": "tests/" } }, "extra": { "laravel": { "dont-discover": [ ] } }, "scripts": { "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ "@php artisan key:generate" ], "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover" ] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true }, "minimum-stability": "dev", "prefer-stable": true } </code></pre> <h2>Thank you for helping me!</h2> <h2>--EDIT--</h2> <p>After mcklayin suggest me, I look for redis data. So I run this :</p> <pre><code>vagrant@homestead:/var/lib$ redis-cli --scan presence-channel-name:members horizon:1 horizon:34 horizon:supervisors horizon:measured_jobs horizon:9 horizon:monitor:time-to-clear horizon:job:App\Jobs\ProcessModels horizon:35 horizon:queue:default horizon:job_id horizon:job:App\Events\NewModel horizon:masters horizon:last_snapshot_at horizon:33 horizon:master:homestead-xVse horizon:failed_jobs horizon:32 horizon:supervisor:homestead-xVse:supervisor-1 horizon:recent_jobs horizon:measured_queues </code></pre> <h2>--EDIT 2--</h2> <p>There is the App\Events\NewModel.php file</p> <pre><code>&lt;?php namespace App\Events; use Illuminate\Broadcasting\Channel; use Illuminate\Queue\SerializesModels; use Illuminate\Broadcasting\PrivateChannel; use Illuminate\Broadcasting\PresenceChannel; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Broadcasting\InteractsWithSockets; use Illuminate\Contracts\Broadcasting\ShouldBroadcast; class NewModel implements ShouldBroadcast { use Dispatchable, InteractsWithSockets, SerializesModels; public $data; /** * Create a new event instance. * * @return void */ public function __construct($data) { $this-&gt;data = $data; } /** * Get the channels the event should broadcast on. * * @return \Illuminate\Broadcasting\Channel|array */ public function broadcastOn() { return new PrivateChannel('channel-name'); } public function broadcastAs() { return 'NewModel'; } } </code></pre> </div>

通过Timestamp条目聚合和可视化SQLite数据库中的条目

<div class="post-text" itemprop="text"> <p>I have a big SQLite - Database that contains entries like this:</p> <pre><code>rowID timestamp employee sold 1 1345294648 myer 1 2 1351508109 miller 2 3 1351508109 smith 8 4 1351508109 miller 10 5 1351508109 smith 1 6 1353243448 myer 10 </code></pre> <p>It represents the amount of units certain employees have sold at a certain time.</p> <p>With the following code in php i can get the sold units per employee:</p> <pre><code>&lt;?php $response = array(); $db = new PDO("sqlite:./db.sqlite"); $query_count = $db -&gt; query("SELECT * FROM myTable GROUP BY employee"); while ($row = $query_count -&gt; fetch(PDO::FETCH_ASSOC)) { $current_employee = $row['employee']; $response[$current_employee]["sold"] = $row['sold']; } echo json_encode($response); ?&gt; </code></pre> <p>This will give back the following JSON - formatted data:</p> <pre><code>{ "miller" : { "sold" : 12 }, "myer" : { "sold" : 11 }, "smith" : { "sold" : 9 } } </code></pre> <p>Now i want to separate the sales to the distinct months, like this:</p> <pre><code>{ "miller":{ "sold":{ "january":1, "february":8, "march":9 } }, "myer":{ "sold":{ "january":10, "february":11, "march":13 } }, "smith":{ "sold":{ "january":11, "february":10, "march":10 } } } </code></pre> <p>After that, i want to visualize the data with an bar chart, like this but non-stacked:</p> <p><a href="http://bl.ocks.org/1134768" rel="nofollow">http://bl.ocks.org/1134768</a></p> <p>Is there a SQL - Request / PHP-Script that can help me?</p> <p>I'm glad for every answer, thanks in advance.</p> </div>

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

String s = new String(" a ") 到底产生几个对象?

老生常谈的一个梗,到2020了还在争论,你们一天天的,哎哎哎,我不是针对你一个,我是说在座的各位都是人才! 上图红色的这3个箭头,对于通过new产生一个字符串(”宜春”)时,会先去常量池中查找是否已经有了”宜春”对象,如果没有则在常量池中创建一个此字符串对象,然后堆中再创建一个常量池中此”宜春”对象的拷贝对象。 也就是说准确答案是产生了一个或两个对象,如果常量池中原来没有 ”宜春” ,就是两个。...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

Linux面试题(2020最新版)

文章目录Linux 概述什么是LinuxUnix和Linux有什么区别?什么是 Linux 内核?Linux的基本组件是什么?Linux 的体系结构BASH和DOS之间的基本区别是什么?Linux 开机启动过程?Linux系统缺省的运行级别?Linux 使用的进程间通信方式?Linux 有哪些系统日志文件?Linux系统安装多个桌面环境有帮助吗?什么是交换空间?什么是root帐户什么是LILO?什...

Linux命令学习神器!命令看不懂直接给你解释!

大家都知道,Linux 系统有非常多的命令,而且每个命令又有非常多的用法,想要全部记住所有命令的所有用法,恐怕是一件不可能完成的任务。 一般情况下,我们学习一个命令时,要么直接百度去搜索它的用法,要么就直接用 man 命令去查看守冗长的帮助手册。这两个都可以实现我们的目标,但有没有更简便的方式呢? 答案是必须有的!今天给大家推荐一款有趣而实用学习神器 — kmdr,让你解锁 Linux 学习新姿势...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

史上最全的 python 基础知识汇总篇,没有比这再全面的了,建议收藏

网友们有福了,小编终于把基础篇的内容全部涉略了一遍,这是一篇关于基础知识的汇总的文章,请朋友们收下,不用客气,不过文章篇幅肯能会有点长,耐心阅读吧爬虫(七十)多进程multiproces...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

85后蒋凡:28岁实现财务自由、34岁成为阿里万亿电商帝国双掌门,他的人生底层逻辑是什么?...

蒋凡是何许人也? 2017年12月27日,在入职4年时间里,蒋凡开挂般坐上了淘宝总裁位置。 为此,时任阿里CEO张勇在任命书中力赞: 蒋凡加入阿里,始终保持创业者的冲劲,有敏锐的...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

新一代神器STM32CubeMonitor介绍、下载、安装和使用教程

关注、星标公众号,不错过精彩内容作者:黄工公众号:strongerHuang最近ST官网悄悄新上线了一款比较强大的工具:STM32CubeMonitor V1.0.0。经过我研究和使用之...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

大学一路走来,学习互联网全靠这几个网站,最终拿下了一把offer

大佬原来都是这样炼成的

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

什么时候跳槽,为什么离职,你想好了么?

都是出来打工的,多为自己着想

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

你期望月薪4万,出门右拐,不送,这几个点,你也就是个初级的水平

先来看几个问题通过注解的方式注入依赖对象,介绍一下你知道的几种方式@Autowired和@Resource有何区别说一下@Autowired查找候选者的...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《经典算法案例》01-08:如何使用质数设计扫雷(Minesweeper)游戏

我们都玩过Windows操作系统中的经典游戏扫雷(Minesweeper),如果把质数当作一颗雷,那么,表格中红色的数字哪些是雷(质数)?您能找出多少个呢?文中用列表的方式罗列了10000以内的自然数、质数(素数),6的倍数等,方便大家观察质数的分布规律及特性,以便对算法求解有指导意义。另外,判断质数是初学算法,理解算法重要性的一个非常好的案例。

立即提问
相关内容推荐