gyp — how to set FRAMEWORK_SEARCH_PATH? - ios

How do I set FRAMEWORK_SEARCH_PATH with gyp?
If I do
"libraries": [ "foo.framework", ],
that field is left blank and Xcode can't find header files.

After checking tests I found proper way:
"xcode_settings": {
'FRAMEWORK_SEARCH_PATHS': [
'/foo/',
],
},

Related

VSCode run formatter on save without needing to save twice

I have a command that runs on save and formats the file, obviously then the file changes and needs to be saved again. Is there a way to make it so I don't need to hit save twice?
"runItOn": {
"commands": [
{
"match": ".rb",
"isShellCommand": false,
"cmd": "extension.rubyReplace"
}
]
}
Enter shortcut keys"ctrl+shift+P",open the file "setting.json",
add the following lines to this file:
"editor.formatOnType": true,
"editor.formatOnSave": true,
This will format the code on save.

Universal Link open only base URL

is it possible to set a path in the "paths" array inside the apple-app-site-association file that will open only the original domain in the application?
for example,
if my domain is
https://www.example.com
i want the app to be opened if a user clicks a link to
https://www.example.com
but not to
https://www.example.com/a
I didn't test solutions below, so I can't guarantee that they will work. At the same time they all are based on documentation, so they should. I currently don't want to invest time into setting up test environment for this, so that would be nice if you share your test results.
My first suggestion would be just this:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "%YOUR.APP.ID%",
"paths": [
"/"
]
}
]
}
}
If this didn't help, here's another go:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "%YOUR.APP.ID%",
"paths": [
"NOT /?*",
"/*"
]
}
]
}
}
Here ? matches any single character, and * matches any substring, including empty. The idea in the second case is that the system might use the rules from top to bottom.
Because the system evaluates each path in the paths array in the order it is specified—and stops evaluating when a positive or negative match is found—you should specify high priority paths before low priority paths.
https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html?utm_source=revxblog
The third idea would be to at first exclude all the top level components you know then adding allow all. That might be really overwhelming, especially if you don't control paths or they change.

Dart Angular Components - How to get full path of selected values?

I'm implementing a Single Selection Nested Tree from the Angular Components Example and the example code gets the selected value.
I want to get the full path with the selected value as well as the selected parent groups titles.
Is this possible? I've been searching for an API documentation but haven't found one yet.
Example:
<material-tree
[options]="nestedOptions"
[expandAll]="expandAll"
[selection]="singleSelection">
</material-tree>
-
final SelectionOptions nestedOptions = new _NestedSelectionOptions([
new OptionGroup(
['Animated Feature Films', 'Live-Action Films', 'Documentary Films'])
], {
'Animated Feature Films': [
new OptionGroup([
'Cinderalla',
'Alice In Wonderland',
'Peter Pan',
'Lady and the Tramp',
])
],
'Live-Action Films': [
new OptionGroup(
['Treasure Island', 'The Littlest Outlaw', 'Old Yeller', 'Star Wars'])
],
'Documentary Films': [
new OptionGroup(['Frank and Ollie', 'Sacred Planet'])
],
'Star Wars': [
new OptionGroup(['By George Lucas'])
],
'By George Lucas': [
new OptionGroup(
['A New Hope', 'Empire Strikes Back', 'Return of the Jedi'])
]
});
There isn't a built in way to display the path information. To make that work you would want to create a class for your values that stores the parent information and makes that accessible. Then use an ItemRenderer to ensure it is displayed as a string when used in the Material Tree.

custom build with pointerEvent

I can not find where to export "pointerEvent" for my custom build. I am checking the "shiftKey" status of the pointerEvent in two places.
on a singleclick event:
evt.pointerEvent.shiftKey
on a boxend event:
evt.mapBrowserEvent.pointerEvent.shiftKey
I can't seem to figure out what I need in my build config.json file. I've tried various combinations of "ol.interaction.*" and "ol.events.*" without sucess. I've grep'd the source for occurrences of "pointerEvent" and "mapBrowserEvent.pointerEvent" and tried to reference those in my exports but I'm pretty much guessing at this point.
Thanks
Probably not a great answer because I don't understand the "why", but for the record - I'm checking the shiftKey status after a singleClick event. With a debug build of ol3 the following code works:
myVar = evt.pointerEvent.shiftKey; // only works with a debug build
But fails with a non-debug ol3 build. The version below works with non-debug builds:
myVar = ol.events.condition.shiftKeyOnly(evt);
to check the shiftKey status after a boxend event add the mapBrowserEvent property of the event object:
myVar = ol.events.condition.shiftKeyOnly(evt.mapBrowserEvent);
When I say a "non-debug" ol3 build above I'm referring to "compilation_level" directive being set to "ADVANCED".
UPDATE:
Some tests:
custom-build.json and fiddle with this custom build (86KB).
{
"exports": [
"ol.Map",
"ol.Map#on",
"ol.Map#addInteraction",
"ol.layer.Tile",
"ol.source.OSM",
"ol.interaction.DragBox",
"ol.interaction.DragBox#on",
"ol.events.condition.shiftKeyOnly",
"ol.View"
],
"compile": {
"externs": [
"externs/closure-compiler.js",
"externs/oli.js",
"externs/olx.js",
"externs/proj4js.js"
],
"define": [
"ol.ENABLE_DOM=false",
"ol.ENABLE_WEBGL=false",
"ol.ENABLE_PROJ4JS=false",
"ol.ENABLE_VECTOR=false",
"goog.array.ASSUME_NATIVE_FUNCTIONS=true",
"goog.DEBUG=false"
],
"extra_annotation_name": [
"api", "observable"
],
"compilation_level": "ADVANCED",
"manage_closure_dependencies": true
}
}
There's nothing special you should put in you config.json.
Add to your exports array:
"exports": [
...
"ol.events.condition.shiftKeyOnly"
]
Try this after build:
map.on('singleclick', function(evt){
console.info(ol.events.condition.shiftKeyOnly(evt));
});

Sublime Text 2 - key binding to change syntax

I want to make a new key binding to change syntax to, let's say, HTML or CSS. I searched the official and unofficial documentation to see if there are any answers to my problem.
Use the following key combination to pull up the command palette:
Ctrl+Shift+P
then type:
sshtml (for example, to set the syntax to HTML)
This is how i roll, if that's what you meant exaclty:
// Syntax Change
{"keys": ["alt+shift+h"], "command": "set_file_type",
"args": {"syntax": "Packages/HTML/HTML.tmLanguage"}
},
{"keys": ["alt+shift+m"], "command": "set_file_type",
"args": {"syntax": "Packages/Markdown/Markdown.tmLanguage"}
},
{"keys": ["alt+shift+p"], "command": "set_file_type",
"args": {"syntax": "Packages/PHP/PHP.tmLanguage"}
},
{"keys": ["alt+shift+j"], "command": "set_file_type",
"args": {"syntax": "Packages/Javascript/JSON.tmLanguage"}
},
There is an easy way to do that.
On the right bottom, there is a button, click on that button you will get all the available syntax.
You can use the Command Pallet (ctrl + shift + p) to change the Syntax, but sometimes using "ss" or "sshtml" brings up other commands that are un-related to the "Set Syntax" options.
You can also add a new Key Binding User Preference that brings up the Command Pallet with the text "Set Syntax: " already in it. Then you just have to type the language you want to set it to.
To setup this key-binding shortcut:
Open the Command Pallet (ctrl + shift + p)
Find and select the "Preferences: Key Bindings" option
Update your User ".sublime-keymap" file to have the "keys" json-object listed in the array:
[
"// additonal/exsiting key comands go here...",
{ "keys": ["ctrl+alt+l"], "command": "show_overlay", "args": {"overlay": "command_palette", "text": "Set Syntax: "} }
]
Now you can use ctrl+alt+l to bring up the command prompt. Then just type HTML, CSS, or whatever language you're looking to switch too.
Feel free to change the "keys" combination from ctrl+alt+l to anything else you want the shortcut to be too.
dzhi's answer doesnt work anymore for JSON in Sublime 4.
The correct path is
Packages/JSON/JSON.tmLanguage

Resources