I've upgraded to XCode 4 and because IB is now inside none of my old NIB files will open getting a "An instance of ASKNibConnector could not be decoded" error. Is there a way to convert NIBs to XIBs without interface builder? or do you have to do something like reinstall 3, convert the nibs and reinstall 4?
To convert your nib to xib format, use the command line tool ibtool like this:
ibtool foo.nib --upgrade --write foo.xib
Or use this gist to find all your nibs and convert them: https://gist.github.com/254161
Related
I am using Jupyter in Windows.
I mean to change coloring of the QT console.
How can I select one of the built in CSSs as the default, via configuration file?
I mean to avoid passing it as an argument as in jupyter qtconsole --style monokai.
I would rather use a configuration file, e.g. file1 = %USERPROFILE%\.jupyter\jupyter_qtconsole_config.py
What I ultimately want to do is write monokai in some configuration file, and have the QTconsole load the built-in monokai.
What I tried so far:
As a test, execute
jupyter qtconsole --style monokai.
It actually brought monokai (white fgr on dark gray bgr). Moreover, it combined well with my selected c.ConsoleWidget.font_size = 12 in file1.
Then, trying to use my own css.
I copied a monokai.css file in C:\Users\user1 (I have quite a few in my system, but I guess any one should work for the most basic stuff).
In file1 I included one of the lines
c.JupyterQtConsoleApp.stylesheet = u'C:/Users/user1/monokai.css'
c.JupyterQtConsoleApp.stylesheet = 'C:/Users/user1/monokai.css'
c.JupyterQtConsoleApp.stylesheet = 'C:\\Users\\user1\\monokai.css'
None worked.
If I made this work, I would still have to find how to replace the specification of a file as a location by a simple CSS name among the built-in.
PS: I know I could also set a Windows shortcut that launches jupyter qtconsole --style monokai.
I also mean to avoid this.
This is a solution, but I am not certain it is the only one, or if it is the most portable across systems.
Note: there might be some issues, yet to be solved, in the way this configuration works, see https://github.com/jupyter/qtconsole/issues/334
Use
c.JupyterWidget.syntax_style = 'monokai'
in file %USERPROFILE%\.jupyter\jupyter_qtconsole_config.py
or ~\.jupyter\jupyter_qtconsole_config.py.
Inspired by this.
How do i open a specific file from atom. I have in laravel master.blade.php and I want to put shortcut CTRL-1 for example and open it.I use now advanced-open-file but I want something faster because I all the time name some files the same. Is there a plugin for that ?
1. Add command
Add the following to your init.coffee (File > Init Script…)
atom.commands.add 'atom-text-editor',
'open:master-blade': (event) ->
atom.workspace.open('path/to/master.blade.php')
See available options for atom.workspace.open
2. Add shortcut
Now add the following to keymap.cson (File > Keymap…)
'.editor:not(.mini)':
'ctrl+1': 'open:master-blade'
Note: You can use Atom's built-in keybinding-resolver to make sure the shortcut isn't used by one of your installed packages.
It is very simple. In Ubuntu you can do this things following below steps...
Open the terminal.
Go to the folder of your project.
Enter command atom ./<path_of_the_file>
If you want to open whole project then enter atom .
Atom will open that file.
I just spent an infuriating day trying to make a gif out of a series of jpg files in R. I installed ImageMagick to run the following code:
system("convert -delay 40 *.png example_4.gif")
but I get the following error message:
Warning message:
running command 'convert -delay 40 *.png example_4.gif' had status 4
which looks like a path error. Now I've looked for convert in the Imagemagick download and can't see it anywhere. Does anyone know where it is?
Alternately, is there another easier method of making a gif from a series of jpegs in R that isn't ridiculously long?
Thanks
Three options:
Consider using the magick R package instead of using system().
Change your script from convert ... to magick convert ....
Re-install imagemagick, and enable the "Install legacy utilities (e.g. convert)" option.
This change has been around since 7.0.1 (now up to 7.0.7), and is discussed in their porting guide, specifically in the section entitled "Command Changes".
Philosophically, I prefer to not install the legacy utilities, mostly because it can cause some confusion with command names. For instance, the non-ImageMagick convert.exe in windows tries to convert a filesystem ... probably not what you want to accidentally trigger (there is a very low chance that you could get the arguments right to actually make a change, but it's still not 0). The order of directories in your PATH will dictate which you are calling.
EDITs:
From comments, it seems like the difference between "static" and "dll" installers might disable the option to install legacy utilities such as convert.exe. So you can either switch to the "dll" to get the legacy option, or you are restricted to options 1 (magick R package) and 2 ("magick convert ...").
From further comments (thanks to fmw42 and MarkSetchell), it is clear that the old convert.exe and the current legacy mode of magick.exe convert are not the same as the currently recommended magick.exe (without "convert"); the first two are legacy and compatibility modes, but they do not accept all arguments currently supported by magick-alone. So the use of "convert" anywhere in the command should indicate use of v6, not the current v7. This answer is then merely a patch for continued use of the v6 mechanisms; one could argue a better solution would be to use magick.exe's v7 interface, completely removing the "convert" legacy mode.
I'm currently trying to change the build system used for a QT project from Visual Studio to CMake and I'm having trouble figuring out the correct usage of the qt_wrap_ui command. Currently, I'm using it like this:
macro(addQtForProject argLibraryName argSourceList)
...
qt_wrap_ui(${argLibraryName} ${argSourceList} ${argSourceList} ${varUiList})
endmacro()
As I handle the source and headers as a single list, I of course want the generated files to end up in the same list. varUiList contains the four .ui files used by the project.
When using CMakes visual studio 2005 generator with this macro, it adds four .h files, one for each .ui file, to the Visual Studio project file but the files themselves does to seem to exist at all so I must be doing something wrong. CMakes documentation is unfortunatly fairly sparse on this subject. This has been tested with CMake 2.8.10.
You probably want to use the more recent FindQt4 module which has much more documentation.
Specifically, it provides the QT4_WRAP_UI macro:
QT4_WRAP_UI(outfiles inputfile ... OPTIONS ...)
create code from a list of Qt designer ui files.
Options may be given to uic, such as those found
when executing "uic -help"
While I used to compile a single source file with Cmd+K in prior versions of Xcode, how does one do the same in Xcode 4? (Note that this is different than preprocessing or showing the disassembly of the file.) If compiling from a command line is proposed then it must be such that the project's settings, include paths, preprocessor definitions, etc., are all included.
An example use case is where I make a header file change but only want to test the change's effect with respect to a single source file, not all of the files that depend upon that header.
The command has been moved to the Perform Action submenu. Look under
Product > Perform Action > Compile filename.cpp
To assign Cmd+K to it, go to
File > Preferences > Key Bindings > Product Menu group
and you'll find Compile File where you can assign a key. Cmd+K is assigned to Clear Console now by default, so be sure to remove that binding to avoid conflicts.
One way that I have found to do this is to using the following menu commands:
Product -> Generate Output -> Generate Preprocessed File
Product -> Generate Output -> Generate Assembly File
This may not be exactly what you want, but it will compile the single file.
When you build a project, xcode runs compilation command. You can check the log, search for your file and copy paste that command on Terminal. It'll compile only the file for which you copy/pasted on the terminal.
If your file is C (or C++) file, then simply open your terminal, go to the folder in which the file resides and type
gcc -o outputFile inputFile.c
I am not familar with Objective-c that much, but GCC might work since it's only a superset of C, just like C++.
Hope that was helpful :)
The keyboard shortcut Cmd+K on Xcode 3 and before has been remapped to Cmd+B on Xcode 4
Along the same lines, Cmd+Return was remapped to Cmd+R (in case you ever used that)
The common requirement for single file compilation is checking it for syntax errors. (atleast for me). Since xcode4 highlights syntax errors as you type. It seems apple removed that feature.