如何复制PS倍层模式(How to replicate PS multiply layer mode)
有没有人知道使用图像或CSS复制Photoshop的多层模式的好方法?
我正在开发一个项目,当您将鼠标悬停在其上时,缩略图可以获得颜色叠加层,但是设计师使用了一个层次叠加,我无法弄清楚如何在网络上生成它。
我想出的最好的事情是使用rgba或透明png,但即使这样看起来也不正确。
Does anybody know of a good way to replicate Photoshop's multiply layer mode using either an image or CSS?
I'm working on a project that has thumbnails that get a color overlay when you hover over them, but the designer used a layer set to multiply and I can't figure out how to produce it on the web.
The best thing I've come up with is either using rgba or a transparent png, but even then it doesn't look right.
原文:https://stackoverflow.com/questions/2958813
最满意答案
不,没有SQL语法用于以“批处理”模式提供列别名,例如将表名作为前缀应用于所有列(顺便说一下,SQLite默认支持该功能)。
解决此问题的一种方法是按照用于获取结果的任何语言,按顺序位置而不是按名称引用列。
另一种解决方案是使用不同的列名定义表,以避免名称冲突。 某些SQL标识符(例如约束名称)必须在它们所驻留的数据库中是唯一的,而不仅仅是表中的唯一标识符。 它可能是您要用于将相同规则应用于列名称的命名约定。
No, there's no SQL syntax for giving column aliases in a "batch" mode, for example applying the table name as a prefix to all columns (by the way, SQLite does support that feature by default).
One way to solve this is to refer to columns by ordinal position instead of by name, in whatever language you use to fetch the results.
Another solution is to define your tables with distinct column names so you avoid the name conflict. Some SQL identifiers, for example constraint names, are already required to be unique within the database they reside in, not only unique within a table. It may be a naming convention you want to use to apply the same rule to column names.
相关问答
更多-
要理解为什么你没有得到你期望的答案,请看看这个查询: SELECT * FROM player LEFT JOIN goal USING (idplayer) 如您所见,左侧的行重复右侧的匹配行。 每个连接都重复该过程。 以下是查询的原始数据: SELECT * FROM player LEFT JOIN goal USING (idplayer) LEFT JOIN assist USING (idplayer) LEFT JOIN gw USING (idplayer) LEFT JOIN win U ...
-
LINQ to SQL:多个连接ON多个列。(LINQ to SQL: Multiple joins ON multiple Columns. Is this possible?)[2024-02-18]
将Linq中的多个列连接到SQL有一点不同。 var query = from t1 in myTABLE1List // Listjoin t2 in myTABLE1List on new { t1.ColumnA, t1.ColumnB } equals new { t2.ColumnA, t2.ColumnB } ... 您必须利用匿名类型,并为您要比较的多个列组成一个类型。 这首先看起来很混乱,但是一旦了解了SQL从表达式中组合起来的方式, ... -
不,没有SQL语法用于以“批处理”模式提供列别名,例如将表名作为前缀应用于所有列(顺便说一下,SQLite默认支持该功能)。 解决此问题的一种方法是按照用于获取结果的任何语言,按顺序位置而不是按名称引用列。 另一种解决方案是使用不同的列名定义表,以避免名称冲突。 某些SQL标识符(例如约束名称)必须在它们所驻留的数据库中是唯一的,而不仅仅是表中的唯一标识符。 它可能是您要用于将相同规则应用于列名称的命名约定。 No, there's no SQL syntax for giving column alias ...
-
在Evk的帮助下(见评论),我找到了一个解决方案 我需要命名我的变量 我需要尊重类型(即使可以为空) 所以正确的解决方案是 Res.AddRange(from jh in db.Job join jd in db.JobDetail on jh.number equals jd.number join js in db.JobSection on new { a = jd.number, b = (int?)jd.ref, c = jd.product } ...
-
将代码从使用所有行的计数更改为仅包含不同值的计数,应该返回您期望的结果 comm.CommandText = "SELECT Count(DISTINCT Courses.CourseID) AS CourseCount, Count(DISTINCT Students.StudentID) AS StudentCount, Schools.Name, Schools.StartDate, Schools.SchoolFees " + "FROM Schools" + ...
-
您可以使用RETURN QUERY返回SETOF A_TYPE ,如此处所述 create or replace function comp_detail (in_id integer) returns setof tmp_comp as $$ declare out_put tmp_comp%rowtype; begin return query(select name, age, address,dept from company as c inner join department as ...
-
通常,您可以使用最少的查询做得更好。 数据库必须做更少的工作(19个更少的解析),缓存可能会被启动,计划将针对手头的问题进行优化,而不是问题的5%。 为往返增加网络延迟,它变得非常有意义。 另一方面,如果您发现20个单独的查询更便宜,那么您可能会发现数据库正在挣扎于过时的统计数据或某些东西,需要稍微调整一下。 As a rule you will do better with fewest queries. The database has to do less work (19 fewer parses) ...
-
我不确定我完全理解你的意图,但也许下面的查询可能是你想要的? 鉴于您的样本数据,它似乎产生了正确的输出。 SELECT state.msg, SUM(CASE WHEN true_id = state_value THEN 1 ELSE 0 END) AS Trues, SUM(CASE WHEN false_id = state_value THEN 1 ELSE 0 END) AS Falses FROM state JOIN step ON state.t_id = step.state_ ...
-
多个数据库连接(Multiple database joins)[2021-12-15]
这应该这样做: SELECT c.* FROM content JOIN content_info ci ON ci.entry_id=c.id JOIN categories cat ON cat.id=ci.cat_id WHERE cat.parent_id=这将返回属于父类为parent_id的类别的所有帖子( content行) 或者使用子查询: SELECT c.* FROM content JOIN content_info ci ON ci.entr ... -
问题不是订单部分,而是按部分分组。 如果您包含作者,则意味着您也会在书籍和作者之间产生差异。 我建议你省略author.id,并从代码中排序列表,而不是SQL。 The problem is not the order part, but the group by part. If you include the author, it means you make difference between the book and the author too. I recommend you to omitt ...