I would like to add the "c" file in the "New File" button in the Resources Explorer by the System Register Editor:
I followed a tutorial on how to add options to the "New File" button in the Resources Explorer, and I added a "NewFile" Value in the ".c>ShellNew" Key I just made, with the value Template.c, after creating an empty file in the folder Windows>ShellNew (The folder is correct since I have AutoHotkey installed and there is "Template.ahk").
This is the register structure:
│ ├─.c
│ │ ├OpenWithProgids
│ │ ├PersistentHandler
│ │ └ShellNew
And these are the Values in each Key:
OpenWithProgids: (Default) REG_SZ (value not set)
PersistentHandler: (Default) REG_SZ {5e941d80-bf96-11cd-b579-08002b30bfeb}
ShellNew: (Default) REG_SZ (value not set)
FileName REG_SZ Template.c
My default handler for ".c" files is Notepad++.
I would like to know if the infos I provided are enough to solve the problem, and I am sorry if I have chosen the wrong platform to ask, I am new to coding, Register editing and Stack Overflow in general.
Related
I'm making a documentation site using Mkdocs and mkdocs-material theme (https://squidfunk.github.io/mkdocs-material/getting-started/). I need to make a multilanguage project ('pt' and 'en' for now). What i'm in need is a way to change the site name according to language that the person ir reading.
E.G: I'm in Brazil, so i'll read in portuguese (pt), and the site name must be "Name in Portuguese". Another reader, in USA, for example, will read in english so the site name muste be changed to "Name in English".
My project till now is with a tree of docs like this:
docs/
|
|__ index.md
|
├─ en/
│ ├─ somefile1.md
| |__ somefile2.md
├─ pt/
│ ├─ otherfile1.md
| |__ otherfile2.md
My yaml mkdocs.yml file configuration is in the root of project, one level above the docs dir (standard for mkdocs).
site_name: Name in Portugese
site_url: mysiteproject.com
nav:
- index.md
- Ajuda:
- pt/otherfile1.md
- pt/otherfile2.md
- Help:
- en/somefile1.md
- en/somefile2.md
theme:
name: material
logo: imgs/logo-serpro.png
favicon: imgs/favicon.png
language: pt
font:
text: Open Sans
markdown_extensions:
attr_list: {}
admonition: {}
codehilite: {}
meta: {}
extra_css:
- css/extra.css
So, what I need is, when the reader is navigating the site on "Ajuda" section, the site name will be in portuguese. If the reader is on "Help" section the site name change to "Name in English".
I'm sorry, I know this has been asked before, but the other answers are not doing anything for me.
PhpStorm keeps using 4 spaces for indents, and it is driving me mad. The file is a .php file, and all the settings I know of are correctly set. I have checked these things:
1.) Editor | Code Style | 'Detect and use existing file indents' is not checked (and the file uses 2 spaces anyway)
2.) Editor | Code Style | PHP | 'Tab size' & 'Indent' are set to 2 spaces
3.) I have restarted PhpStorm
4.) I have closed and reopened the file.
5.) My PhpStorm is the most recent version, 2016.3.2
6.) There is only one .editorconfig in the path of the file, and here are its contents:
# Drupal editor configuration normalization
# #see http://editorconfig.org/
# This is the top-most .editorconfig file; do not search in parent directories.
root = true
# All files.
[*]
end_of_line = LF
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[composer.json]
indent_size = 4
I have also tried removing the last two lines, just out of paranoia, and after restarting PhpStorm again, it did nothing.
As it turn out it's a bug in PhpStorm:
"Tab size" value is ignored if php file isn't started with <?php i.e.:
#!/usr/bin/env drush
<?php
For those who are interested here is a ticket on PhpStorm's Issue Tracker: https://youtrack.jetbrains.com/issue/WI-34735 -- watch it (star/vote/comment) to get notified on any progress.
Also for newer IDE versions, check if .editorconfig config-file exists (in any directory of directory-chain leading to your script-file), because Settings from said config-file have higher priority, and will overwrite your IDE settings.
When I create a new project, I must edit the current project location each time, because our global projects are on:
~/Sites/
However, PHPStorm sets it default as:
~/PhpstormProjects/
How can I change the default location as mine?
There is no GUI for that.
PhpStorm should remember last used folder (when you successfully created new project) and use it by default for next one (does for me; although I'm using the same path since v1 .. maybe this was broken since then).
If it does not and if you have brave heart .. you can edit config file directly :)
PhpStorm v8 and earlier:
Close IDE
Open this file in any text editor: C:\Users\USERNAME\.WebIde80\config\options\ide.general.xml (path is for PhpStorm v8 on Windows 7; for other OS/versions please see this link: https://intellij-support.jetbrains.com/entries/23358108-Directories-used-by-the-IDE-to-store-settings-caches-plugins-and-logs )
File is very short -- just find <option name="lastProjectLocation" node and edit value attribute -- put desired path there
Save changes, Launch IDE and see if it worked for you.
PhpStorm v9 and newer: such setting is now located in recentProjectDirectories.xml file -- look for <option name="lastProjectLocation" value="LAST_PATH_HERE" /> entry.
There is a ticket asking for a GUI setting for this: https://youtrack.jetbrains.com/issue/WI-8839 -- watch it (star/vote/comment) to get notified on progress.
For default folder for "Open Folder" kind of dialogs -- follow IDEA-84622 ticket.
UPDATE 2018-05-25:
2018.2 will have a GUI field for that (Settings/Preferences | Appearance & Behavior | System Settings) -- see this comment.
Create the folder the you wanna use(Ex: /ProgramasBMO), and then go to:
1) File --> Settings (It will open a window)
2) Click on "System Settings"
3) Write the path to your folder
4) Done :)
You see that it is adivsed to create your file with your app-specific mime type. Is it right way? I wonder because google drive somehow associates files with the application that created them for Open with functionality. Can this be exploited for the file picker?
FYI-- You mentioned your project ID being alpine-dogfish-833. If you login to the developer console, then click on your project (which takes you to the project "Overview" page), you will see 2 identifiers at the top: Project ID: alpine-dogfish-833 and Project Number: 1088706429537. "Project Number" == "App ID" == "the numeric prefix on the Client ID"
If the file has custom contents that only your app can understand, use the app specific mime type. Otherwise, use the standard mime type for whatever kind of file you are working with.
I have finally discovered that when your app (identified with CLIENT_ID) creates a file with mime-type application/vnd.google-apps.drive-sdk, the mime-type is expanded with .<AppID>. The AppID is the first part of your CLIENT_ID. Basically, project ID looked like alpine-dogfish-833 in mine case. I have then generated Client_ID 1088706429537-4oqhqr7o826ditbok23sll1rund1jim1.apps.googleusercontent.com and 1088706429537 is the AppID that we are looking for because when my app creates a file, using
gapi.client.drive.files.insert({
'resource': {
mimeType: application/vnd.google-apps.drive-sdk,
title: file_name
}
Note mime-type is application/vnd.google-apps.drive-sdk -- it does not contain any app ID. Querying the file reveals that the effective mime type of resulting file is actually application/vnd.google-apps.drive-sdk.1088706429537. Google can even fix the mime type even if you misspel application/vnd.google-apps.drive-sdk a bit.
This answers my question because eliminates all the confusions. The major confusion is that your project has additional application id, that you get even before the CLIENT-ID but it has nothing to do with signing the files with app-specific mime-type. I did not find that in the referred q&a. Secondly, this answers my question because it basically says that mime-type contains APP_ID so that app id and mime-type is therefore the same thing and there is no difference/redundancy/conflict to choose between two.
At the first, i am new to sass/compass and think it is a big step forward. But I still have a small problem. I try to set a default folder structure for new projects.
So, if i create a new project with:
compass create
it outputs the following folder structure for example:
├───.sass-cache
├───sass
│ ├───ie.scss
│ ├───print.scss
│ └───screen.scss
└───stylesheets
├───ie.css
├───print.css
└───screen.css
what can I do now, to say compass that I want a structure like that, for every new project:
├───.sass-cache
├───css
│ ├───ie.css
│ ├───print.css
│ └───screen.css
├───img
│ ├───ico
│ ├───jpg
│ └───png
├───js
│ ├───jquery-1.7.2.min.js
│ └───scripts.js
└───sass
├───ie.scss
├───print.scss
├───screen.scss
├───_config.scss
└───_mixins.scss
Is there a default-config.rb where i can define which files to load or do I have to create this structure manually for every new project?
I thank you in advance!
EDIT
Okay, I have found the best answer by myself:
Just create an extension for compass. So you can build your own folder & file structure.
Here is a nice starting point.
To create then a new project enter that compass create <project-name> -r extension_name -u gem_name into the terminal/console.
For everyone who needs a starter kit for that, take a look at my port of the "Kube Framework": compass-kube
Your preferred project structure isn't something Compass should handle. Instead, you should have your own skeleton, barebones, bootstrapped, template starting point which you copy to start new projects:
cp -r ~/barebones-project-starter .
or clone from a hosted version control system:
git clone https://github.com/kumiau/default-project
I don't think compass have this particular functionality. The closest thing i think you could do is fork the project on GitHub and modify it to your needs.
https://github.com/chriseppstein/compass
Just set dirs you need here:
%Ruby_Folder%\lib\ruby\gems\2.2.0\gems\compass-1.0.3\lib\compass\app_integration\stand_alone\configuration_defaults.rb