Below is the code I am using :
Text("Welcome! If you need help locating it, click [here](Open Settings)to go to settings and copy the number.")
I can open any URL in safari, but how can I open :
UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!)
Text("Welcome! If you need help locating it, click [here](https://www.capitalone.com)to go to settings and copy the number.")
I can not use attributed string.
Related
I'm trying to make a permanent change to my SAS config file (sasv9.cfg). Specifically, I want to increase the MEMSIZE option from -MEMSIZE 2G to -MEMSIZE MAX.
The instructions from SAS on how to do this are on this page under *Overview of Changing SAS System Option Settings' ... http://support.sas.com/documentation/cdl/en/hostwin/69955/HTML/default/viewer.htm#p0drw76qo0gig2n1kcoliekh605k.htm#p0273uv4qrgcrjn16vg7muluuhrz
Using SAS' text editor I am able to access the config file (sasv9.cfg) and make the changes to the appropriate line of code.
The problem is that SAS won't let me save those changes, stipulating that the 'administrator' has to approve them. I am the administrator but I don't know enough about how SAS' OS works to enable the save.
Any suggestions on workarounds to this issue would be most welcome.
You need to edit the file as an Administrator since I'm guessing you are on Windows,
Right click in notepad app and select run as an Administrator:
Then open the file sasv9.cfg through menu > file > open
I have a missing font and I am trying to auto-replace it while doing other things, however I can't seem to ACTUALLY find it for whatever reason. After entering this code if I open the find/change window the find/change format windows look accurate,
but if I click them and change "Basic Character Formats" the family for both is reading as blank.
tell application "Adobe InDesign CC 2017"
set find text preferences to nothing
set change text preferences to nothing
--Set the find options.
set properties of find change text options to {case sensitive:false, whole word:false, include footnotes:false, include hidden layers:false, include locked layers for find:false, include locked stories for find:false, include master pages:false}
set properties of find text preferences to {applied font:"Avenier (T1)", font style:"55 Roman"}
set properties of change text preferences to {applied font:"Avenier", font style:"Roman "}
tell active document
set myFoundItems to change text
display dialog ("Found " & (count myFoundItems) & " instances.")
end tell
end tell
Does anyone have any clues how to fix this?
Is it possible to tune WebStorm so that when I have something like this in my terminal window, then I just click on the filename and jump to it.
Not possible using built-in terminal (please vote for IDEA-118566 and IDEA-154439).
Awesome Console plugin might be a solution; but it doesn't support built-in terminal (https://github.com/anthraxx/intellij-awesome-console/issues/23)
there is also Output Link Filter plugin that provides similar functionality, but it looks outdated and (also) doesn't work in built-in terminal
Update (2022): IDEA-118566 is already fixed, links should work. Please note that providing links for particular output needs adding specific logic handing such output. Thus, if you encounter missing links in a particular output, please file a separate issue request describing link output format and steps to reproduce such output.
Webstorm does in fact now have this functionality.
Note that the bug about this functionality being missing (linked in another answer) has been marked as fixed: https://youtrack.jetbrains.com/issue/IDEA-118566.
It's not quite a single click solution, but what I do, is double click the text so that it auto selects and copies the path, including line and char numbers to clipboard. Then use the shortcut for Goto File.... Hit paste (cmd+v) then Enter and it will take you to the exact location.
For me, the shortcut for Goto File... is cmd+shift+O - you can check your shortcut in the menu Navigate -> File...
You can use the following format to output text in the terminal via console.log and the path will be clickable:
at ($FILE_FULL_PATH:$LINE_NUMBER:$SYMBOL_NUMBER)
Example with the full path to the file:
at (/home/ubuntu/project/index.js:12:55)
However, if you're running WebStorm with exact file path's project's folder, you can use the following format:
at (./project/index.js:12:55)
I installed Awesome Console plugin and with this plugin, all files and links in the console and terminal will be highlighted and can be clicked. Source code files will be opened in the IDE, other links with the default viewer/browser for this type.
You can jump to files from the terminal with left click
Just select file path (dblclick) & press "shift" twice (search everywhere) & press "enter"...
How do you resolve this issue?
image of message
(Black lines are to hide my username and project name)
Please check the path of your .momd file once. According to image you've provided, /Users/.../Library/Mobile Documents/com~Apple~CloudDocs/.../MyModel.momd is the path expected. But, it couldn't read the core-data file from that path. Please move your .momd file to that expected path and try building it again.
I got "could not determine generated file path for core data" when I moved my Core Data Model to a different folder. Go to your project file. In your Build Phases tab locate the model under Compile Sources and remove it. Then press + to add it back but DO NOT select it from the list you see right away (does not update the file path). Instead select "Add Other" and go select it from it's new location. Then leave the defaults of "copy if needed". Clean your build folder and you're good to go.
In my case this left me with 2 models in my property pane. I deleted the old and dragged and dropped the new one into the correct Xcode group. And all was right with the world again. Hope this helps someone else out.
Using TextMate:
Is it possible to assign a shortcut to preview/refresh the currently edited HTML document in, say, Firefox, without having to first hit Save?
I'm looking for the same functionality as TextMate's built-in Web Preview window, but I'd prefer an external browser instead of TextMate's. (Mainly in order to use a JavaScript console such as Firebug for instance).
Would it be possible to pipe the currently unsaved document through the shell and then preview in Firefox. And if so, is there anyone having a TextMate command for this, willing to share it?
Not trivially. The easiest way would be to write the current file to the temp dir, then launch that file.. but, this would break any relative links (images, scripts, CSS files)
Add a bundle:
Input: Entire Document
Output: Discard
Scope Selector: source.html
And the script:
#!/usr/bin/env python2.5
import os
import sys
import random
import tempfile
import subprocess
fname = os.environ.get("TM_FILEPATH", "Untitled %s.html" % random.randint(100, 1000))
fcontent = sys.stdin.read()
fd, name = tempfile.mkstemp()
print name
open(name, "w+").write(fcontent)
print subprocess.Popen(["open", "-a", "Firefox", name]).communicate()
As I said, that wont work with relative resource links, which is probably a big problem.. Another option is to modify the following line of code, from the exiting "Refresh Browsers" command:
osascript <<'APPLESCRIPT'
tell app "Firefox" to Get URL "JavaScript:window.location.reload();" inside window 1
APPLESCRIPT
Instead of having the javascript reload the page, it could clear it, and write the current document using a series of document.write() calls. The problem with this is you can't guarantee the current document is the one you want to replace.. Windows 1 could have changed to another site etc, especially with tabbed browsing..
Finally, an option that doesn't have a huge drawback: Use version control, particularly one of the "distributed" ones, where you don't have to send your changes to a remote server - git, mercurial, darcs, bazaar etc (all have TextMate integration also)
If your code is in version control, it doesn't matter if you save before previewing, you can also always go back to your last-commited version if you break something and lose the undo buffer.
Here's something that you can use and just replace "Safari" with "Firefox":
http://wiki.macromates.com/Main/Howtos#SafariPreview
Open the Bundle Editor (control + option + command + B)
Scroll to the HTML Bundle and expand the tree
Select "Open Document in Running Browser(s)"
Assign Activation Key Equivalent (shortcut)
Close the bundle editor
I don't think this is possible. You can however enable the 'atomic saves' option so every time you alt tab to Firefox your project is saved.
If you ever find a solution to have a proper Firefox live preview, let us know.