bar

Need a row count after SELECT statement: what's the optimal SQL approach?

匿名 (未验证) 提交于 2019-12-03 01:15:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to select a column from a single table (no joins) and I need the count of the number of rows, ideally before I begin retrieving the rows. I have come to two approaches that provide the information I need. Approach 1: SELECT COUNT( my_table.my_col ) AS row_count FROM my_table WHERE my_table.foo = 'bar' Then SELECT my_table.my_col FROM my_table WHERE my_table.foo = 'bar' Or Approach 2 SELECT my_table.my_col, ( SELECT COUNT ( my_table.my_col ) FROM my_table WHERE my_table.foo = 'bar' ) AS row_count FROM my_table WHERE my_table.foo =

Pandas: Bar-Plot with two bars and two y-axis

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a DataFrame looking like this: amount price age A 40929 4066443 B 93904 9611272 C 188349 19360005 D 248438 24335536 E 205622 18888604 F 140173 12580900 G 76243 6751731 H 36859 3418329 I 29304 2758928 J 39768 3201269 K 30350 2867059 Now I'd like to plot a bar-plot with the age on the x-axis as labels. For each x-tick there should be two bars, one bar for the amount, and one for the price. I can get this working by using simply: df.plot(kind='bar') The problem is the scaling. The prices are so much higher that I can not really identify

How to increase width of morris.js bar or add space between bars?

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have this morris.js bar with multiple bars, i want to change width of the bars or make space between durations. From the below image is there a way to provide either more space between Feb March and April or is there a way to adjust bar widths? Here is my code Morris.Bar({ element: 'morris-chart-bar', data: [ { y: 'Feb', a: 75, b: 60, c: 5, d: 50 }, { y: 'March', a: 180, b: 220, c: 140, d: 160 }, { y: 'April', a: 300, b: 340, c: 350, d: 270 } ], xkey: 'y', ykeys: ['a', 'b', 'c', 'd'], labels: ['A', 'B', 'C', 'D'], barColors: ['#0B62A4','

F#, namespaces, modules, fs and fsx

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm aware of other questions about modules and namespaces in F#, but they're not helping me right now. I've got a project with Utilities.fs namespace Company.Project.Namespace module Utilities = //stuff here Functions.fs namespace Company.Project.Namespace open Utilities module Functions = //stuff here And I'm trying to test them in an fsx: #load "Utilities.fs" #load "Functions.fs" which gives me error FS0039: The namespace or module 'Utilities' is not defined when I try to send it to FSI with Alt-Enter . I've tried adding same namespace at

iOS Tab Bar icons keep getting larger

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am having a problem with my icons in my tabBar . Tapping the same tab bar button repeatedly will keep increasing the tab bar icon's size. If I push a different one, it goes back to its original size. Any ideas what I should fix? 回答1: As per the project shared by the OP ( see question comments ), it seems the tab bar image insets seem to be messing things up. Steps to resolve the issue: Select the tab bar item of the problematic ViewController s in IB Go to Size Inspector section ( on the right ) Ensure your image insets are balanced If you

Navigation bar title bug with interactivePopGestureRecognizer

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am having a weird problem with UINavigationBar 's title in an app when interactivePopGestureRecognizer comes into play. I have made a demo app to showcase this bug. Setup: The rootViewController is a UINavigationController . FirstViewController has the navigation bar hidden, and interactivePopGestureRecognizer.enabled = NO; Second and ThirdViewController s have the navigation bar visible and the popgesture enabled. Bug: The bug occurs when going back from the Second to the First view using the popgesture. If you pull the second view

How to set the Tab bar item 1 to be selected by default in iphone?

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am new to iphone development.I am creating a view based application.I have added a tab bar in my view(and not a tab bar controller).By setting the tag vale of the tab bar item to 1, 2 ,I have loaded the view for each tab bar on tabbar item click event.I want the tab bar 1 to be selected by default.What should i do for that? Here is my code :- - ( void ) tabBar :( UITabBar *) tabBar didSelectItem :( UITabBarItem *) item { NSLog (@ "didSelectItem: %d" , item . tag ); [ self activateTab : item . tag ]; } - ( void ) activateTab :(

how to share a variable across modules for all tests in py.test

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have multiple tests run by py.test that are located in multiple classes in multiple files. What is the simplest way to share a large dictionary - which I do not want to duplicate - with every method of every class in every file to be used by py.test? In short, I need to make a "global variable" for every test. Outside of py.test, I have no use for this variable, so I don't want to store it in the files being tested. I made frequent use of py.test's fixtures, but this seems overkill for this need. Maybe it's the only way? 回答1: Update:

Why were the case classes without a parameter list deprecated?

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Why were the case classes without a parameter list deprecated from Scala? And why does compiler suggest to use () as parameter list instead? EDIT : Someone please answer my second question... :| 回答1: It is really easy to accidentally use a no-arg case class incorrectly as a pattern. scala> case class Foo warning: there were deprecation warnings; re-run with -deprecation for details defined class Foo scala> (new Foo: Any) match { case Foo => true; case _ => false } res10: Boolean = false Instead of: scala> (new Foo: Any) match { case _: Foo =

Status bar could not find cached time string image. Rendering in-process

匿名 (未验证) 提交于 2019-12-03 01:12:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I get the above runtime message after I upgraded to Swift4.1 and Xcode 9.3. Before the upgrade I did not have this message in my console window. Status bar could not find cached time string image. Rendering in-process. comes up every few minutes as long as I have the App running. It sees to me there is no negative side effect, my App is running, as usual, I have not seen any problems. I use the standard Status Bar, have not changed to modify it in any way. Question 1: Would there be a problem originating from this warning under situations i