用HTML / CSS GUI在Ubuntu上开发原生应用程序?(Develop Native Application on Ubuntu with HTML/CSS GUI?)
雷蒙德偶尔会有一个好主意 :
下一代Windows将带有一个新的编程基础,让开发人员使用与Web应用程序相同的技术构建本地应用程序。 微软称这个新品种为“量身定制的应用”。
开发图形用户界面总是有一个陡峭的学习曲线; 你学到的每一个新的工具包都是不同的,它需要花费大量的时间和精力以及沮丧。 因此用CSS开发HTML看起来非常有吸引力:它更容易和更便携; 并与HTML 5和CSS 3,它是非常强大的。
在Ubuntu上是否有任何支持(或者更好,跨平台的工具包)来开发使用HTML / CSS的本地应用程序? 为了尽量减少开销,我不想开始一个完整的浏览器会话。 (这不是很好的桌面集成。)我对原生JavaScript或Python 3的答案特别感兴趣,但任何语言都可以(在我的书中比新的GUI工具包更容易学习新语言)。
编辑 :我找到了这个页面 ,但没有时间阅读或测试它。 它连接到Python XULRunner ,但我再也没有关于它的知识。
Redmond has a good idea occasionally:
The next-gen Windows will come with a new programming foundation, letting developers build native apps with the same techniques they use for Web applications. Microsoft calls this new variety "tailored apps."
There is always a steep learning curve for developing GUIs; each new toolkit you learn is different enough that it takes a lot of time and effort and frustration. Thus developing in HTML with CSS begins to look very appealing: it's much easier and much more portable; and with HTML 5 and CSS 3, it is very powerful.
Is there any support yet on Ubuntu (or even better, a cross-platform toolkit) for developing native applications that use HTML/CSS for the GUI? To minimize overhead, I do not want to start a full browser session. (That's not very good desktop integration.) I am particularly interested in answers for native JavaScript or Python 3, but any language would be alright (easier to learn a new language than a new GUI toolkit, in my book).
Edit: I have found this page, but have not had time to read it all or test it. It linked to Python XULRunner, but again I have no previous knowledge of it.
原文:https://stackoverflow.com/questions/8732244
最满意答案
SELECT DATE_FORMAT(cc.datefield, '%d-%b') AS DATE , SUM(IFNULL(cds.quantity,0)) AS total_sales FROM cart_calendar cc INNER JOIN cart_daily_sales cds ON (DATE(cds.order_date) = cc.datefield) WHERE WEEK(cc.datefield) = WEEK(now()) GROUP BY WEEK(cc.datefield)
或者如果你每天都想要它:
SELECT DATE_FORMAT(cc.datefield, '%d-%b') AS DATE , SUM(IFNULL(cds.quantity,0)) AS total_sales FROM cart_calendar cc INNER JOIN cart_daily_sales cds ON (DATE(cds.order_date) = cc.datefield) WHERE WEEK(cc.datefield) = WEEK(now()) GROUP BY MOD(WEEKDAY(cc.datefield)+1,6) WITH ROLLUP
SELECT DATE_FORMAT(cc.datefield, '%d-%b') AS DATE , SUM(IFNULL(cds.quantity,0)) AS total_sales FROM cart_calendar cc INNER JOIN cart_daily_sales cds ON (DATE(cds.order_date) = cc.datefield) WHERE WEEK(cc.datefield) = WEEK(now()) GROUP BY WEEK(cc.datefield)
Or if you want it per day:
SELECT DATE_FORMAT(cc.datefield, '%d-%b') AS DATE , SUM(IFNULL(cds.quantity,0)) AS total_sales FROM cart_calendar cc INNER JOIN cart_daily_sales cds ON (DATE(cds.order_date) = cc.datefield) WHERE WEEK(cc.datefield) = WEEK(now()) GROUP BY MOD(WEEKDAY(cc.datefield)+1,6) WITH ROLLUP
相关问答
更多-
尝试使用NOT EXISTS() : SELECT s.* FROM ( SELECT strftime('%W', date(p.match_date, 'unixepoch', 'localtime')) AS week_number, sum(red_cards + yellow_cards) AS cards, user_id FROM user_records GROUP BY week_number, user_id) s WHERE ...
-
当前月份和周的SQL(SQL for current Month and week)[2023-05-31]
- 开始一个月的日子 select replace(cast(dateadd(mm,datediff(mm,0,getdate()),0) as date),'-','') - 月末 select replace(cast(dateadd(mm,datediff(mm,0,getdate())+1,0)-1 as date),'-','') - 在SQL 2012及更高版本中 select replace(eomonth(getdate()),'-',''); - 开始一周的一天 select rep ... -
SELECT DATE_FORMAT(cc.datefield, '%d-%b') AS DATE , SUM(IFNULL(cds.quantity,0)) AS total_sales FROM cart_calendar cc INNER JOIN cart_daily_sales cds ON (DATE(cds.order_date) = cc.datefield) WHERE WEEK(cc.datefield) = WEEK(now()) GROUP ...
-
这段代码将带回您当前周内的所有记录。 如果您只想要工作周(没有周末),请将* 7和+7更改为* 5和+5 BETWEEN dateadd(dd,(datediff(dd,-53684,getdate())/7)*7,-53684) AND dateadd(dd((datediff(dd,-53684,getdate())/7)*7)+7,-53684) This bit of code will bring you back all records within the current wee ...
-
如何选择没有日期落在当前周的行的记录(How to select records which do not have rows with dates falling in the current week)[2023-06-28]
像这样的东西: SELECT u.Id FROM Users u WHERE u.IsFollowing = 0 AND u.IsRequested = 0 AND NOT EXISTS (SELECT 1 FROM Actions a WHERE u.Id = a.UserId ); Something like this: SELECT u.Id FROM Users u WHERE ... -
每年分别按周分组(Group by week separately for year)[2022-05-20]
SELECT datepart(week, myDate) as week, datepart(year, myDate) as year, ... from table group by concat(year, '-', week); SELECT datepart(week, myDate) as week, datepart(year, myDate) as year, ... from table group by concat(year, '-', week); -
这是一种方法。 首先,我们需要从当前日期的星期一开始,因此我们可以使用以下技术 以下将始终给出本周的星期一 mysql> select date_sub(curdate(), interval weekday(curdate()) day) as d ; +------------+ | d | +------------+ | 2016-09-19 | +------------+ 现在获取上周的星期一,我们可以将上面的内容调整为 mysql> select date_sub(date ...
-
SQLite:获取当前周(SQLite : obtain current week)[2024-02-25]
什么存储在tastings.date列中? 请注意,SQLite没有“timestamp”类型亲缘关系,因此可能存储Text(某些日期表示)或整数(julian day,epoch ...) 所有时间和日期函数都需要有效的时间字符串 ,并将该时间字符串转换为另一种字符串格式 如果tastings.date包含周数,则使用: AND cast(tastings.date AS TEXT) = strftime('%W','now') What is stored inside the tastings.da ... -
按周分组?(Group dates by week?)[2021-08-25]
您可以从日期获取年份部分,追加第一个月的第一天,然后添加(#week - 1)以获取event_date所属的一周的开始日期,如下所示: SELECT EventDate, WorkflowCat, ErrorType, SUM(EventCount) AS 'Total' FROM ( SELECT DATEADD(ww, DATEPART(ww, e.event_date) - 1, CONVERT(DATETIME, ... -
按周数和周结束分组(Group by Week Number and Week Ending)[2023-05-22]
您按照actual_sale_date进行分组,因此一周的结果没有按周汇总。 要获得周结束日期,请在周开始时添加6天。 rollup使用week_number和周结束日期。 select extract(week from actual_sale_date) as week_number, to_char(date_trunc('week', actual_sale_date) + interval '6' day,'MM/dd/yyyy'), count(*) from data where proje ...