options

/show include equivalent option in g++

风格不统一 提交于 2019-11-27 05:27:22
I see that VC++ includes an option called /show include to list you the hierarchy of include files in each translation unit. This seems to be a very helpful option - to optimise/improve the compilation time in a large scale project. Question Is there any equivalent option in GNU g++ compiler to get these (similar output)? There's a variety of options for controlling this. -MD will list files, -MMD will list non-system files as side effects of compilation -M, -MM will generate lists instead of compiling. -MQ, -MG, -MP and -MT generate makefile target fragments. -MF allows you to specify an

ng-options how to set first select always blank

给你一囗甜甜゛ 提交于 2019-11-27 04:27:47
问题 I am using angularjs in a project and in which I am using ng-options for generating . Initially when the pages reload and no option element is selected the html generated like below: <select size="3" ng-model="item" ng-options="s.name for s in itemlist"> <option value="?" selected="selected"></option> <option value="0">Item 1</option> <option value="1">Item 2</option> <option value="2">Item 3</option> </select> But when I select an element (ex. Item 2) the first blank select is gone. I know

Change stringsAsFactors settings for data.frame

僤鯓⒐⒋嵵緔 提交于 2019-11-27 04:24:27
问题 I have a function in which I define a data.frame that I use loops to fill with data. At some point I get the Warning message: Warning messages: 1: In [<-.factor ( *tmp* , iseq, value = "CHANGE") : invalid factor level, NAs generated Therefore, when I define my data.frame, I'd like to set the option stringsAsFactors to FALSE but I don't understand how to do it. I have tried: DataFrame = data.frame(stringsAsFactors=FALSE) and also: options(stringsAsFactors=FALSE) What is the correct way to set

AngularJS - value attribute for select

纵饮孤独 提交于 2019-11-27 04:02:49
问题 Source JSON data is: [ {"name":"Alabama","code":"AL"}, {"name":"Alaska","code":"AK"}, {"name":"American Samoa","code":"AS"}, ... ] I try ng-options="i.code as i.name for i in regions" but am getting: <option value="?" selected="selected"></option> <option value="0">Alabama</option> <option value="1">Alaska</option> <option value="2">American Samoa</option> while I am expecting to get: <option value="AL">Alabama</option> <option value="AK">Alaska</option> <option value="AS">American Samoa<

When (not) to abuse NSUserDefaults

China☆狼群 提交于 2019-11-27 02:33:51
问题 I wonder what the guidelines are for: 1 - how often I can read from NSUserDefaults 2 - how much data I can reasonably store in NSUserDefaults Obviously, there are limits to how much NSUserDefaults can be used but I have trouble determining what's reasonable and what isn't. Some examples among others: If my game has an option for the computer to be one of the players, I will use NSUserDefaults to save that boolean value. That much is clear. But is it also reasonable to access NSUserDefaults

How to remove ellipsis from a row in a Python Pandas series or data frame, shown when long lines/wide columns are truncated?

℡╲_俬逩灬. 提交于 2019-11-27 02:24:34
问题 When I create the following Pandas Series: pandas.Series(['a', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'aaaaaaaaaaaaaaaa', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'] I get this as a result: 0 a 1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... 2 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... 3 aaaaaaaaaaaaaaaa 4 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..

CORS settings for IIS 7.5

霸气de小男生 提交于 2019-11-27 02:22:36
问题 Could someone please help me, convert the following code for use in the web.config in IIS 7.5 and where in the web.config file I should place each piece of code? # Always set these headers. Header always set Access-Control-Allow-Origin "*" Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT" Header always set Access-Control-Max-Age "1000" Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security

How do you send a custom header in a cross-domain (CORS) XMLHttpRequest?

拜拜、爱过 提交于 2019-11-27 01:26:34
I am trying to send a CORS request for a JSON payload. I control both the server and the client. I'm following along here: https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS?redirectlocale=en-US&redirectslug=HTTP_access_control The server has a custom header that must be sent along with every request. This custom header therefore makes the request 'not simple' and thus the request must be preflighted with an OPTIONS request. I can see jquery making the OPTIONS request, but it doesn't send the custom header along. Methods I've tried: using the beforeSend option: http://api.jquery

How to change knitr options mid chunk

强颜欢笑 提交于 2019-11-27 01:03:34
问题 Hi I would like to change chunk options, mid chunk, without having to create a new chunk.. running the following code I would expect to get two very different size outputs, but for some reason this does not seem to be the case. Also the second plot doesn't plot at all...(it does when you change it to plot(2:1000)...but either way the second output is the same size as the first. both fig.width=7 . What am I doing wrong? Pls note the importance of 'mid chunk' the reason for this is that I would

GCC: how is march different from mtune?

放肆的年华 提交于 2019-11-26 22:37:28
问题 I tried to scrub the GCC man page for this, but still don't get it, really. What's the difference between -march and -mtune ? When does one use just -march , vs. both? Is it ever possible to just -mtune ? 回答1: If you use -march then GCC will be free to generate instructions that work on the specified CPU, but not on (typically) earlier CPUs in the architecture family. If you use -mtune , then the compiler will generate code that works on any of them, but will favour instruction sequences that