闲聊

电商网站完成了!

我一个人做了一个电商网站,我觉得自己太厉害了,哈哈。

其实平时的工作是产品经理,但是我所在的公司有点养闲人的意思,所以就和朋友合伙做了一个境外的电商网站。

全站使用的.NET Core 框架(最近刚学会的)

本网站也进行了迁移,进入了阿里云。希望国内用户访问更迅捷一些

下一个即将开坑的是一个记录汽车油耗的微信小程序,但是目前遇到的问题是我发现其实我不会计算油耗,甚至说以前我的计算方式都是错的。

油耗计算的基础是消耗量,但是我没有办法推测出用户在未知情况下的燃油消耗情况,我最近正在研究

《和多娜多娜一起干坏事吧》真的香,希望各位支持正版游戏!

闲聊

用.NET EF Core对Mysql进行INNER JOIN多表查询

之前在网上找了好多资料,也没有比较好的回答

我要写这样一个sql语句:

SELECT
*
FROM
a
JOIN b ON a.PID = b.ID
JOIN c ON a.P2ID = c.ID
JOIN d ON c.PID = d.ID
AND c.P2ID = d.ID2

在.NET EF Core中我是这样做的:

IQueryable<a> cartIQ = from s in _dBContext.a select s;
cartIQ = cartIQ.Where(c => c.ID == param);
var cartList = cartIQ.Join(_dBContext.b, prodCart => prodCart.ProdId, prod => prod.Id, (prodCart, prod) => new { c = prodCart, b = prod })
.Join(_dBContext.SkuInfo, prod => prod.c.SkuId, sku => sku.SkuId, (prod, sku) => new { prod.c, prod.b, SkuInfo = sku })
.Join(_dBContext.SkuColorPic, t => new { t.SkuInfo.ProdId, t.SkuInfo.ColorId }, cpic => new { cpic.ProdId, cpic.ColorId }, (t, cpic) => new { t.c, t.b, t.SkuInfo, SkuColorPic = cpic });

闲聊

干活干活

主要还是处理moc3模型动作影响的东西,framework里面还是有很多方法需要理解,写的很工整,但是学习是需要时间的。。。

闲聊

Macbook Pro 2020!

这几天切换开发环境到Macbook上,确实遇到很多之前没想过的问题。
比如安装brew啊之类的,真是好麻烦啊///

所以本周更新的干货可能不是很多,而且我还在适应新的开发环境,有点不太数量啊emmm

闲聊

fu到啦

今天收到了年初预订的超大miku玩具了!
有一说一,做工堪忧,有好多线头,我剪掉了。

这是在批站会员购买的,所以速度还是可以的,我和媳妇说我要放车里,后座上系好安全带,当孩子放着哈哈!

闲聊

webpack真是个好东西

之前一点也不知道这个玩意,我一直以为min.js是用比较简单去掉注释和空格做的,我真是孤陋寡闻啊!

我在网上查了好多资料,原来js是可以这样进行合并,并组成新的sdk。

通过wp插件真的是学到之前没玩过的东西,有意思!

闲聊

给MI6X MIKU ROOT

好久没用这个手机了,要是说起来,我买回来的时候就没怎么折腾它,卖了IPHONE7 等价换初音这种事情,真的划算吗?

这次更换可Root的开发版,其实是为了可以进行Android Auto的研究,因为在网上看了一下,Android Auto限制非常多,和Carplay一样,你又没有Carplay那么多软件支持,死撑什么呢,也不知道,不过有一说一,国外支持Android Auto的软件其实挺多的,但是用得上不?

为啥折腾Android Auto ,其实要从上个月我自己徒手装车机开始说起

这辆凯迪拉克ATSL被我折腾的够呛啦~

但是装完了原厂车机,又没有Carplay怎么搞呢…

来Android Auto吧!

Android Auto主要需要一个软件进行sqlite3库的改写,我看YouTube上的教程大部分人推荐
AA Phenotype Patcher
,我下载了以后看了一下,这个软件可以改写com.google.android.gms.car的信息

-- Apps which will be added to whitelist: --
- 虾米音乐 (fm.xiami.main)
- AA Mirror (com.github.slashmax.aamirror)
- 高德地图 (com.autonavi.minimap)

-- chmod 775 sqlite3 --
OutputStream:
chmod 775 /data/user/0/pl.eselter.aaphenotypepatcher/sqlite3
-- end chmod 775 sqlite3 --

-- Drop Triggers --
OutputStream:
/data/user/0/pl.eselter.aaphenotypepatcher/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'DROP TRIGGER after_delete;'

-- DELETE old Flags --
OutputStream:
/data/user/0/pl.eselter.aaphenotypepatcher/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'DELETE FROM Flags WHERE name="app_white_list";'

-- run SQL method #1 --
OutputStream:
/data/user/0/pl.eselter.aaphenotypepatcher/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", 234, 0, 0, "", "app_white_list", "fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap",1);
INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", 230, 0, 0, "", "app_white_list", "fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap",1);
INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", 234, 0, 0, "", "app_white_list", "fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap",1);
INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", 230, 0, 0, "", "app_white_list", "fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap",1);
INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car_setup", 234, 0, 0, "", "app_white_list", "fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap",1);
INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car_setup", 230, 0, 0, "", "app_white_list", "fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap",1);
INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", (SELECT version FROM Packages WHERE packageName="com.google.android.gms.car#car"), 0, 0, "", "app_white_list", "fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap",1);
INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", (SELECT version FROM Packages WHERE packageName="com.google.android.gms.car"), 0, 0, "", "app_white_list", "fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap",1);
INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car_setup", (SELECT version FROM Packages WHERE packageName="com.google.android.gms.car#car"), 0, 0, "", "app_white_list", "fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap",1);'
OutputStream:
/data/user/0/pl.eselter.aaphenotypepatcher/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'CREATE TRIGGER after_delete AFTER DELETE
ON Flags
BEGIN
INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", (SELECT version FROM Packages WHERE packageName="com.google.android.gms.car#car"), 0, 0, "", "app_white_list", "fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap",1);
INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", 230, 0, 0, "", "app_white_list", "fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap",1);
INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car", 234, 0, 0, "", "app_white_list", "fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap",1);
INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", (SELECT version FROM Packages WHERE packageName="com.google.android.gms.car"), 0, 0, "", "app_white_list", "fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap",1);
INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", 230, 0, 0, "", "app_white_list", "fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap",1);
INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car", 234, 0, 0, "", "app_white_list", "fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap",1);
INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car_setup", (SELECT version FROM Packages WHERE packageName="com.google.android.gms.car#car"), 0, 0, "", "app_white_list", "fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap",1);
INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car_setup", 230, 0, 0, "", "app_white_list", "fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap",1);
INSERT OR REPLACE INTO Flags (packageName, version, flagType, partitionId, user, name, stringVal, committed) VALUES ("com.google.android.gms.car#car_setup", 234, 0, 0, "", "app_white_list", "fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap",1);
END;'
-- end SQL method #1 --

-- Check (1/3) --
OutputStream:
/data/user/0/pl.eselter.aaphenotypepatcher/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'SELECT * FROM Flags WHERE name="app_white_list";'
InputStream:
com.google.android.gms.car#car_setup|230|0|0||app_white_list||||fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap||1
com.google.android.gms.car#car_setup|234|0|0||app_white_list||||fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap||1
com.google.android.gms.car#car|230|0|0||app_white_list||||fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap||1
com.google.android.gms.car#car|234|0|0||app_white_list||||fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap||1
com.google.android.gms.car|230|0|0||app_white_list||||fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap||1
com.google.android.gms.car|234|0|0||app_white_list||||fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap||1
com.google.android.gms.car|247|0|0||app_white_list||||fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap||1
-- Check (2/3) --
OutputStream:
/data/user/0/pl.eselter.aaphenotypepatcher/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'DELETE FROM Flags WHERE name="app_white_list";'
-- Check (3/3) --
OutputStream:
/data/user/0/pl.eselter.aaphenotypepatcher/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'SELECT * FROM Flags WHERE name="app_white_list";'
InputStream:
com.google.android.gms.car#car_setup|230|0|0||app_white_list||||fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap||1
com.google.android.gms.car#car_setup|234|0|0||app_white_list||||fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap||1
com.google.android.gms.car#car|230|0|0||app_white_list||||fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap||1
com.google.android.gms.car#car|234|0|0||app_white_list||||fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap||1
com.google.android.gms.car|230|0|0||app_white_list||||fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap||1
com.google.android.gms.car|234|0|0||app_white_list||||fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap||1
com.google.android.gms.car|247|0|0||app_white_list||||fm.xiami.main,com.github.slashmax.aamirror,com.autonavi.minimap||1

-- Check seems OK :) --

通过这种方式可能会让Android Auto应用中增加指定的APP,网上说AA Phenotype Patcher需要配合AAMirror使用,因为比较晚,明天去车上试试,顺便拍几个照片!