After updating xcode to 8.0 facing problems? - xcode

I have updated my xcode to 8.0 and trying to run a sample demo app. i am getting the messages in log file like that 3 or 4 times . whats happening ??
2016-09-20 21:09:39.807151 demo[34599:1708960] subsystem:
com.apple.BackBoardServices.fence, category: App, enable_level: 1,
persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0,
generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0,
enable_private_data: 0

These are OS Activity logs. You can disable this as so:
Goto Project> Schemes > Edit Scheme
In the window select Run
Add the the environment variable as follows

Related

MFC: how to set font size?

I am currently using the code below to set font.
CFont my_font;
my_font.CreateFont(86, 0, 0, 0, FW_NORMAL, FALSE, FALSE, 0, ANSI_CHARSET, OUT_DEFAULT_PRECIS,
CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_SWISS, _T("Arial"));
void CMyView::OnPrint(CDC* pDC, CPrintInfo* pInfo)
{
...
CFont *old_font = pDC->SelectObject(&my_font);
...
}
I test using print to PDF. It works ok on my machine using Microsoft Print to PDF. But when I build and run it on another machine using a very old version of Adobe PDF, the font is too small. What is the right way to set font so that its size is consistent across different machines?

How can I get the version of SSMS from VSIX

I am developing an extention for SSMS using VSIX.
In this extension I need to know which version of SSMS I am running on.
What is the best way to get that?
I do it like this in my SSMS extension (for SSMS 16 and higher)
var dte = GetServiceHelper(typeof(EnvDTE.DTE)) as EnvDTE.DTE;
if (dte == null) return new Version(130, 0, 0, 0);
if (dte.RegistryRoot.Contains("14.0"))
{
return new Version(140, 0, 0, 0);
}
return new Version(130, 0, 0, 0);
https://github.com/ErikEJ/SqlCeToolbox/blob/master/src/GUI/SSMSToolbox/Package/SqlCeToolboxPackage.cs#L67
dte.Version returns 2015.0130 for SSMS 2016 and 2017.0140 for SSMS 17.

Too much information being presented in Debug Area - Xcode 8

I just upgraded to Xcode 8 and upon building and running my project an enormous amount of information is being printed to the Debug Area.
Here is a sample:
016-09-14 08:37:54.394736 SmartTapp[8645:112431] subsystem: com.apple.network, category: , enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 2, enable_private_data: 0
2016-09-14 08:37:54.395777 SmartTapp[8645:112431] [] tcp_connection_create_with_endpoint_and_parameters 1 www.smarttapp.com 80
2016-09-14 08:37:54.397472 SmartTapp[8645:112431] [] tcp_connection_start 1 starting
How do I turn this off?
I have already tried the suggestion offered here and it didn't work.Hide strange unwanted Xcode 8 logs
Open:
=> Product
=> Scheme
=> Edit Scheme
=> Select "Run"
=> Second Tab "Argument"
=> Inside Environment Variables press + button
=> add Name = OS_ACTIVITY_MODE & set the Value to disable
Press Close button
And you are done.

AT commands SM 0,0

I'm new at AT commands, and I'm having an issue when I try to receive a SMS in my SIM card.
It's a D-link DWM-157 (I guess that's it).
How I'm doing:
AT
OK
AT+CMGF=1
OK
AT+CPMS?
+CPMS: "SM", 0, 0, "SM", 0, 0, "SM", 0, 0
and then it returns the SM as 0,0, as if the SIM card had no max SMS storage capacity.
I tried plugging off and on again the modem and sometimes it works just fine, but when I reset it again, the problem comes back.
Can you guys help me understanding what's going on?

Formatted text encoding in binary plist

I'm trying to do some scripting that edits a binary plist file. The plist describes the objects contained in a DVD studio pro file. It appears that a text box in DVD studio pro is encoded in the plist as base64 data that describes the text string along with its formatting. I can't seem to figure out how to understand this data. Ideally, I'd like to be able to alter the text string but not the formatting. The following seems to describe a text box that says "Menu title here". There are two strings, one with the key called "dictionary" and the other called "string"; both are CFData. Any ideas how I can parse this or convert this into a format that I can edit directly? I've been playing around with writing a little converter in cocoa, but no luck yet.
<dict>
<key>Dictionary</key>
<data>
BAtzdHJlYW10
eXBlZIHoA4QB
QISEhAxOU0Rp
Y3Rpb25hcnkA
hIQITlNPYmpl
Y3QAhYQBaQaS
hISECE5TU3Ry
aW5nAZSEASsG
TlNGb250hpKE
hIQGTlNGb250
HpSVJIQFWzM2
Y10GAAAAGgAA
AP/+TAB1AGMA
aQBkAGEARwBy
AGEAbgBkAGUA
AACEAWYVhAFj
AJsBmwCbAIaS
hJaXB05TQ29s
b3KGkoSEhAdO
U0NvbG9yAJSb
AYQEZmZmZoPz
8nI/g/Dvbz+D
7OtrPwGGkoSW
lwtOU0V4cGFu
c2lvboaShISE
CE5TTnVtYmVy
AISEB05TVmFs
dWUAlIQBKoSa
moNHx9c9hpKE
lpcNTlNPYmxp
cXVlbmVzc4aS
hJ6ghIQBZKEA
hpKElpcQTlNQ
YXJhZ3JhcGhT
dHlsZYaShISE
EE5TUGFyYWdy
YXBoU3R5bGUA
lIQEQ0NAUwAA
hQCGkoSWlxFO
U0JhY2tncm91
bmRDb2xvcoaS
hJubA4QCZmYA
AIaG
</data>
<key>String</key>
<data>
BAtzdHJlYW10
eXBlZIHoA4QB
QISEhBJOU0F0
dHJpYnV0ZWRT
dHJpbmcAhIQI
TlNPYmplY3QA
hZKEhIQITlNT
dHJpbmcBlIQB
Kw9OZW51IFRp
dGxlIEhlcmWG
hAJpSQEPkoSE
hAxOU0RpY3Rp
b25hcnkAlIQB
aQWShJaWDU5T
T2JsaXF1ZW5l
c3OGkoSEhAhO
U051bWJlcgCE
hAdOU1ZhbHVl
AJSEASqEhAFk
nQCGkoSWlgtO
U0V4cGFuc2lv
boaShJuchIQB
Zp6DR8fXPYaS
hJaWEE5TUGFy
YWdyYXBoU3R5
bGWGkoSEhBBO
U1BhcmFncmFw
aFN0eWxlAJSE
BENDQFMAAIUA
hpKElpYGTlNG
b250hpKEhIQG
TlNGb250HpSZ
JIQFWzM2Y10G
AAAAGgAAAP/+
TAB1AGMAaQBk
AGEARwByAGEA
bgBkAGUAAACe
FYQBYwCjAaMA
owCGkoSWlgdO
U0NvbG9yhpKE
hIQHTlNDb2xv
cgCUowGEBGZm
ZmaD8/JyP4Pw
728/g+zraz8B
hoaG
</data>
</dict>
That's a base64-coded NSArchiver archive. You need to decode base64 first, then use [NSUnarchiver unarchiveObjectWithData:]. The "Dictionary" entry above looks like this after decoding (in Python syntax because I used pyObjC):
{
NSBackgroundColor = "NSCalibratedWhiteColorSpace 0 0";
NSColor = "NSCalibratedRGBColorSpace 0.94902 0.937255 0.921569 1";
NSExpansion = "0.1053606";
NSFont = "\"LucidaGrande 21.00 pt. P [] (0x103110b60) fobj=0x103110c30, spc=6.64\"";
NSObliqueness = 0;
NSParagraphStyle = "Alignment 0, LineSpacing 0, ParagraphSpacing 0, ParagraphSpacingBefore 0, HeadIndent 0, TailIndent 0, FirstLineHeadIndent 0, LineHeight 0/0, LineHeightMultiple 0, LineBreakMode 0, Tabs (\n 28L,\n 56L,\n 84L,\n 112L,\n 140L,\n 168L,\n 196L,\n 224L,\n 252L,\n 280L,\n 308L,\n 336L\n), DefaultTabInterval 0, Blocks (null), Lists (null), BaseWritingDirection -1, HyphenationFactor 0, TighteningFactor 0.05, HeaderLevel 0";
}

Resources