Symbol: UIViewAlertForUnsatisfiableConstraints
Debugger Action: po [[UIWindow keyWindow] _autolayoutTrace]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Convert Base64 value in a variable to varbinary: | |
declare @str varchar(20); | |
set @str = '3qAAAA=='; | |
select cast(N'' as xml).value('xs:base64Binary(sql:variable("@str"))', 'varbinary(20)'); | |
-- Convert binary value in a variable to Base64: | |
declare @bin varbinary(20); | |
set @bin = 0xDEA00000; | |
select cast(N'' as xml).value('xs:base64Binary(xs:hexBinary(sql:variable("@bin")))', 'varchar(20)'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MARK: - UIView Extension for Dance | |
@available(iOS 10.0, *) | |
extension UIView { | |
fileprivate struct DanceAssociatedKey { | |
static var dance = "dance_key" | |
} | |
public var dance: Dance { |
I've done something similar to what you're trying to do. Let me tell you what I've learned and how I did it.
I assume you have a one-to-one relationship between your Core Data object and the model (or db schema) on the server. You simply want to keep the server contents in sync with the clients, but clients can also modify and add data. If I got that right, then keep reading.
I added four fields to assist with synchronization:
- sync_status - Add this field to your core data model only. It's used by the app to determine if you have a pending change on the item. I use the following codes: 0 means no changes, 1 means it's queued to be synchronized to the server, and 2 means it's a temporary object and can be purged.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Cleans paths of invalid characters. | |
/// </summary> | |
public static class PathSanitizer | |
{ | |
/// <summary> | |
/// The set of invalid filename characters, kept sorted for fast binary search | |
/// </summary> | |
private readonly static char[] invalidFilenameChars; | |
/// <summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class MvcHtmlHelpers | |
{ | |
/// <summary> | |
/// Renders checkbox as one input (normal Html.CheckBoxFor renders two inputs: checkbox and hidden) | |
/// </summary> | |
public static MvcHtmlString BasicCheckBoxFor<T>(this HtmlHelper<T> html, Expression<Func<T, bool>> expression, object htmlAttributes = null) | |
{ | |
var tag = new TagBuilder("input"); | |
tag.Attributes["type"] = "checkbox"; |
// @class = "form-control"
// When using editortemplates, this class is important
<div class="md-form">
@Html.LabelFor(model => model.Date, htmlAttributes: new { @class = "" }, labelText: $"Date Of Incident (ex: {DateTime.Now.ToString(CultureInfo.CurrentCulture)})")
@Html.EditorFor(model => model.Date, new { htmlAttributes = new { @class = "form-control", type = "text" } })
@Html.ValidationMessageFor(model => model.Date, "", new { @class = "text-danger" })
</div>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\7-Zip.001\shell] | |
@="extract" | |
[HKEY_CLASSES_ROOT\7-Zip.001\shell\extract] | |
@="Extract to Folder" | |
[HKEY_CLASSES_ROOT\7-Zip.001\shell\extract\command] | |
@="\"C:\\Program Files\\7-Zip\\7zG.exe\" x \"%1\" -o*" | |
[HKEY_CLASSES_ROOT\7-Zip.7z\shell] |
OlderNewer