bar

Error with ggplot2 mapping variable to y and using stat=“bin”

匿名 (未验证) 提交于 2019-12-03 01:55:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using ggplot2 to make a histogram: geom_histogram(aes(x=...), y="..ncount../sum(..ncount..)") and I get the error: Mapping a variable to y and also using stat="bin". With stat="bin", it will attempt to set the y value to the count of cases in each group. This can result in unexpected behavior and will not be allowed in a future version of ggplot2. If you want y to represent counts of cases, use stat="bin" and don't map a variable to y. If you want y to represent values in the data, use stat="identity". See ?geom_bar for examples.

Unfortunately System UI has stopped [duplicate]

匿名 (未验证) 提交于 2019-12-03 01:55:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This question already has an answer here: Android emulator error: “System UI has stopped” 6 answers I gets this message every time I start 4.0.3 emulator in WXGA800 mode. My app works fine without running System UI except action bar does not appears and I can't test my actionbar functionality. My OS is Win7 x64. Sdk revision 19. Any ideas? Stacktrace: FATAL EXCEPTION: main java.lang.RuntimeException: Unable to create service com.android.systemui.SystemUIService: java.lang.RuntimeException: Tablet device cannot show navigation bar and system

Set visibility of progress bar gone on completion of image loading using Glide library

匿名 (未验证) 提交于 2019-12-03 01:55:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Hi I want to have a progress bar for image which will shown while image loading but when image loading will be completed I want to set it to gone. Earlier I was using Picasso library for this. But I don't know how to use it with Glide library. I have idea that some resource ready function is there but I don't know how to use it. Can anyone help me? Code for Picasso Library Picasso.with(mcontext).load(imgLinkArray.get(position).mUrlLink) .into(imageView, new Callback() { @Override public void onSuccess() { progressBar.setVisibility(View.GONE)

Unmarshaling nested JSON objects in Golang

匿名 (未验证) 提交于 2019-12-03 01:55:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: There are a few questions on the topic but none of them seem to cover my case, thus I'm creating a new one. I have JSON like the following: {"foo":{ "bar": "1", "baz": "2" }, "more": "text"} Is there a way to unmarshal the nested bar property and assign it directly to a struct property without creating a nested struct? The solution I'm adopting right now is the following: type Foo struct { More String `json:"more"` Foo struct { Bar string `json:"bar"` Baz string `json:"baz"` } `json:"foo"` // FooBar string `json:"foo.bar"` } This is a

Change font of back navigation bar button

匿名 (未验证) 提交于 2019-12-03 01:55:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I want to be able to set the font of my apps navigation bar back button without doing anything too crazy and without losing any other design characteristics of the button (i.e. I want to keep the arrow). Right now I use this in viewDidAppear: to set the font of the normal bar button items. for ( NSObject * view in self . navigationController . navigationBar . subviews ) { if ([ view isKindOfClass :[ UIButton class ]]) { [(( UIButton *) view ). titleLabel setFont :[ UIFont fontWithName :@ "Gill Sans" size : 14.0 ]]; } } However this

How does the scanf function work in C?

匿名 (未验证) 提交于 2019-12-03 01:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Why do you require ampersand (&) in the scanf function. What will the output or type of error (compile or runtime) be in the following C code? #include void main () { int a ; printf ( "enter integer:" ); scanf ( "%d" , a ); } 回答1: The & in C is an operator that returns the address of the operand. Think of it this way, if you would simply give scanf the variable a without the & , it will be passed to it by-value, which means scanf will not be able to set its value for you to see. Passing it by-reference (using & actually passes a

Creating a file progress bar in PHP

匿名 (未验证) 提交于 2019-12-03 01:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Does anyone know of any methods to create a file upload progress bar in PHP? I have often heard that it's impossible. I have one idea, but not sure if it would work: have a normal file upload, but instead submit to an iframe. When this is submitted, store the file information (size and temp location) in the session. At the same time, start an AJAX call to every say 10 seconds to check the size of the file compared to the size stored in the session. This would return the size to the AJAX and then a progress bar would be sized and maybe

The model item passed into the dictionary is of type .. but this dictionary requires a model item of type

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This question and community wiki answer has been added to assist in closing out numerous unanswered questions as discussed in this meta post . I have some code and when it executes, it throws an exception saying: The model item passed into the dictionary is of type Bar but this dictionary requires a model item of type Foo What does this mean, and how do I fix it? 回答1: The error means that you're navigating to a view whose model is declared as typeof Foo (by using @model Foo ), but you actually passed it a model which is typeof Bar (note the

IOS7 Status bar hide/show on select controllers

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I would like to show and hide the Status bar on some controllers. Can this be done or is it more of an overall app setting. I have seen many posts/questions about the plist update: View controller-based status bar appearance - NO If this is completed what control is then given? I am looking to show the status bar on the main screen of the application. But for example on a side (slide) menu I would like it not to show, is this possible? Can this be changed in IB or code? EDIT -- I am using a https://github.com/edgecase/ECSlidingViewController

Hide/Show Action Bar Option Menu Item for different fragments

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a Sherlock Fragment Activity in which there are 3 Fragments. Fragment A, Fragment B, Fragment C are three fragments. I want to show a done option menu in Fragment B only. And the activity is started with Fragment A. When Fragment B is selected done button is added. @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setHasOptionsMenu(true); } @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { if(!menusInflated){ inflater.inflate(R.menu.security, menu);