bar

XCode 6 Tab Bar tabs greyed out

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Anytime I add a tab bar controller to XCode the tab bar is greyed out and I can't see any of the tabs in the storyboard. At runtime it displays fine. I can't figure out why it is happening. 回答1: Add an image to the Tab Bar Item and you will see the normal view of the tab bar on the specific View Controller where you changed it. When every single Tab Bar Item got an image you will also see the normal appearance in your Tab Bar Controller. 回答2: Setting an image for the Tab Bar Items and restarting xcode fixed it for me. 回答3: In the assets

Apply vs transform on a group object

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Consider the following dataframe: A B C D 0 foo one 0.162003 0.087469 1 bar one -1.156319 -1.526272 2 foo two 0.833892 -1.666304 3 bar three -2.026673 -0.322057 4 foo two 0.411452 -0.954371 5 bar two 0.765878 -0.095968 6 foo one -0.654890 0.678091 7 foo three -1.789842 -1.130922 The following commands work: > df.groupby('A').apply(lambda x: (x['C'] - x['D'])) > df.groupby('A').apply(lambda x: (x['C'] - x['D']).mean()) but none of the following work: > df.groupby('A').transform(lambda x: (x['C'] - x['D'])) ValueError: could not broadcast

C++ const question

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: If I do this: // In header class Foo { void foo(bar*); }; // In cpp void Foo::foo(bar* const pBar) { //Stuff } The compiler does not complain that the signatures for Foo::foo do not match. However if I had: void foo(const bar*); //In header void Foo::foo(bar*) {} //In cpp The code will fail to compile. What is going on? I'm using gcc 4.1.x 回答1: The const keyword in the first example is meaningless. You are saying that you don't plan on changing the pointer. However, the pointer was passed by value and so it dos not matter if you change it or

Set title background color

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In my android application I want the standard/basic title bar to change color. To change the text color you have setTitleColor(int color) , is there a way to change the background color of the bar? 回答1: This thread will get you started with building your own title bar in a xml file and using it in your activities Edit Here is a brief summary of the content of the link above - This is just to set the color of the text and the background of the title bar - no resizing, no buttons, just the simpliest sample res/layout/mytitle.xml - This is the

Detecting presence of a scroll bar in a DIV using jQuery? [duplicate]

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This question already has an answer here: How can I check if a scrollbar is visible? 16 answers I want to detect the presence of a scroll bar in a DIV using jQuery. I was thinking to use $('div').scrollTop() but that returns 0 in both cases when the scroll bar is at the top and when there is no scroll bar at all. Any ideas guys? 回答1: Assuming overflow on the div is auto : var div= document.getElementById('something'); // need real DOM Node, not jQuery wrapper var hasVerticalScrollbar= div.scrollHeight>div.clientHeight; var

How to change the status bar color in android

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: First of all it's not a duplicate as in How to change the background color of android status bar How do I change the status bar color which should be same as in navigation bar. I want the status bar color to be same as the navigation bar color 回答1: Android 5.0 Lollipop introduced Material Design theme which automatically colors the status bar based on the ColorPrimaryDark value of the theme. This is supported on device pre-lollipop thanks to the library support-v7-appcompat starting from version 21. Blogpost about support appcompat v21 from

NavigationBar bar, tint, and title text color in iOS 8

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: The background text in the status bar is still black. How do I change the color to white? // io8, swift, Xcode 6.0.1 override func viewDidLoad() { super.viewDidLoad() self.navigationController?.navigationBar.barTintColor = UIColor.blackColor() self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.orangeColor()] } 回答1: In AppDelegate.swift , in application(_:didFinishLaunchingWithOptions:) I put the following: UINavigationBar.appearance().barTintColor = UIColor(red: 234.0/255.0, green: 46.0

iOS 8: web app status bar position and resizing problems

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When setting the meta tags apple-mobile-web-app-capable and apple-mobile-web-app-status-bar-style to create a full screen web app, the iOS status bar is at the top of the screen (translucent) and there's an additional empty black bar at the bottom. Here's my code: Test Capture a photo using camera There's an additional problem with the tag apple-mobile-web-app-status-bar-style . After taking and accepting a photo via camera input black bars appear on the sides of the screen. I'm using iOS8 GM on an iPad3. I think this might be an iOS 8 bug

Adding multiple columns in a dplyr mutate call

匿名 (未验证) 提交于 2019-12-03 01:17:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a data frame with a dot-separated character column: > set . seed ( 310366 ) > tst = data . frame ( x = 1 : 10 , y = paste ( sample ( c ( "FOO" , "BAR" , "BAZ" ), 10 , TRUE ), "." , sample ( c ( "foo" , "bar" , "baz" ), 10 , TRUE ), sep = "" )) > tst x y 1 1 BAR . baz 2 2 FOO . foo 3 3 BAZ . baz 4 4 BAZ . foo 5 5 BAZ . bar 6 6 FOO . baz 7 7 BAR . bar 8 8 BAZ . baz and I want to split that column into two new columns containing the parts on either side of the dot. str_split_fixed from package stringr can do the job quite

How to fix “Constructor Calls Overridable Method”

匿名 (未验证) 提交于 2019-12-03 01:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have the following setup which is giving me a message stating that "Constructor Calls Overridable Method". I know this is happening, but my question is how to fix it so that the code still works and the message goes away. public interface Foo { void doFoo (); } public class FooImpl implements Foo { @Override { public void doFoo (){ //.. Do important code } } public class Bar { private FooImpl fi ; public Bar (){ fi = new FooImpl (); fi . doFoo (); // The message complains about this line } } Thanks! 回答1: As @Voo says, your