af

How to force inclusion of an object file in a static library when linking into executable?

匿名 (未验证) 提交于 2019-12-03 02:59:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a C++ project that due to its directory structure is set up as a static library A , which is linked into shared library B , which is linked into executable C . (This is a cross-platform project using CMake, so on Windows we get A.lib , B.dll , and C.exe , and on Linux we get libA.a , libB.so , and C .) Library A has an init function ( A_init , defined in A/initA.cpp ), that is called from library B 's init function ( B_init , defined in B/initB.cpp ), which is called from C 's main. Thus, when linking B , A_init (and all symbols

Android save BLE device to reconnect after app close

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm developing an android BLE app in which i try to establish a stable Connection between the app and a BLE device. To achieve this i want my app to keep the BLE device data in shared preferences or somewhere. After app close, i'd like my app to retrive this data and attemp a connection without scan for devices. I prefer to avoid scanning every time becouse scan gives me a lot of problems and it takes time. How can do it? Is there a way to save BLE data? 回答1: You need to store the Bluetooth Device Address (AB:CD:EF:01:02:03) of the device in

Is there a way to suppress “x rows affected” in SQLCMD from the command line?

匿名 (未验证) 提交于 2019-12-03 01:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is there a way to suppress "x rows affected" in SQLCMD from the command line? I'm running an MSBuild script and don't want it clogging up my log on my build server. I'd rather not have to add "SET NOCOUNT ON" in every script, so if there's a way to do it from the command line, that would be fantastic. 回答1: What about creating a startup script with SET NOCOUNT ON in the script (assign the script to the SQLCMDINI environment variable). http://msdn.microsoft.com/en-us/library/ms162773.aspx 回答2: The -i and -q options are mutually exclusive .

'inet_pton': identifier not found

匿名 (未验证) 提交于 2019-12-03 01:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm trying to include the following code in my program but the error ('inet_pton': identifier not found) will appeared. // IPv4: struct sockaddr_in ip4addr ; int s ; ip4addr . sin_family = AF_INET ; ip4addr . sin_port = htons ( 3490 ); inet_pton ( AF_INET , "10.0.0.1" , & ip4addr . sin_addr ); s = socket ( PF_INET , SOCK_STREAM , 0 ); bind ( s , ( struct sockaddr *)& ip4addr , sizeof ip4addr ); Output error C3861 : 'inet_pton' : identifier not found the including header #include #include #include "udpDefine.h" #include any helping

Does renewing a provisioning profile affect keychain access when I submit an app update to the AppStore?

匿名 (未验证) 提交于 2019-12-03 01:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have an iPhone app that uses the keychain for authentication-related storage. I also had an expiring Provisioning Profile. In the documentation for keychain access it states: On iPhone, Keychain rights depend on the provisioning profile used to sign your application. Be sure to consistently use the same provisioning profile across different versions of your application. Because my Provisioning Profile was expiring, I renewed it (in the provisioning portal), downloaded it, and double-clicked it which "installed" it into XCode's organizer.

UICollectionView showing wrong cells after scrolling - dequeue issue?

匿名 (未验证) 提交于 2019-12-03 01:47:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a UICollectionView within a UIViewController. In the collectionView cellForItemAtIndexPath: method, it creates a series of custom cells based on the datasource. The custom cells in turn contain a UIView, subclassed to draw single PDF pages. It's set up in such a way as to split a PDF file into its single pages, so cell 1 contains PDF page 1, cell 2 contains PDF page 2 and so on. So far so good, here's my problem: When I scroll down, the UICollectionView starts displaying the wrong cells. For instance in a 34 page document,

RabbitMQ cluster is not reconnecting after network failure

匿名 (未验证) 提交于 2019-12-03 01:39:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have RabbitMQ cluster with two nodes in production and the cluster is breaking with these error messages: =ERROR REPORT==== 23-Dec-2011::04:21:34 === ** Node rabbit@rabbitmq02 not responding ** ** Removing (timedout) connection ** =INFO REPORT==== 23-Dec-2011::04:21:35 === node rabbit@rabbitmq02 lost 'rabbit' =ERROR REPORT==== 23-Dec-2011::04:21:49 === Mnesia(rabbit@rabbitmq01): ** ERROR ** mnesia_event got {inconsistent_database, running_partitioned_network, rabbit@rabbitmq02} I tried to simulate the problem by killing the

Clang++ -fmodules errors using types after #include <cstdint>

匿名 (未验证) 提交于 2019-12-03 01:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: The following simple test case file is giving me a compile-time error with the tip of 'master' from Clang's github mirror, when compiled with -fmodules , using the command shown below. I'm wondering if this is a bug with the new experimental Module feature for Clang -- maybe a problem with the implementation of module maps for the standard library -- or if there's something I'm doing wrong. The error still appears if I add -fbuiltin-module-map to the command. Interestingly, the error no longer appears if I substitute stdint.h for

Initializing a const member variable after object construction

匿名 (未验证) 提交于 2019-12-03 01:33:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I often find myself wishing I could have an object's member variable be const, but that the system allowed initialization of that const variable after construction. Is there a mechanism that would allow me to do this? To clarify, here is an example: class A { public : A (){} initialize ( int x ) { c = x ; } private : const int c ; } I want to be able to do something like that. I don't have this information at construction, so I can't simply move initialization to the initialization list of the constructor. 回答1: No, you cannot

cannot fetch location in marshmallow after giving permission request

匿名 (未验证) 提交于 2019-12-03 01:27:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am developing an location app which is working fine in all devices except in Marshmallow.I have requested permission during runtime and when I grant permission longitude and latitude is not fetched,if i go to settings and change the location from high accuracy to battery saving,location is fetched and the app works.I want location to be fetched at high accuracy. ActivityCompat.requestPermissions(this, new String[]{ Manifest.permission.CAMERA, android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE