ATOM - CSSLINT ignore ids - css

Is there a way to make csslint in Atom ignore "ids", so I don't get the warning "Don't use IDs in selectors"?
Edit: My question was identified as a possible duplicate of "Disable warnings (ids selector) in linter-csslint on Atom?", but I mentioned in my own answer that I could not understand how to make the process to solve my problem. I ended up finding out.

Well, guys, I ended up discovering how to do that. The other questions similar to mine did solve the problem, but they were not so clear TO ME on how to make the solution work. If you guys go to github "https://github.com/ebednarz/csslintrc/blob/master/.csslintrc", there are some lines to ignore the elements. What wasn't that clear to me was "ok, what should I do with it?".
So you have two options (I use Windows). You either create a file in Atom or command line called ".csslintrc" and place it INSIDE THE FOLDER OF THE PROJECT you are working on OR you can place this file in your USER FOLDER IN WINDOWS. Like, "C:\Users\yourUserName". If you put it there, all the projects will use this file.

Related

Saving <file.php>: Running 'phpcbf' Formatter (configure)

I've recently set up WP coding standards in VSCode by following https://www.edmundcwm.com/setting-up-wordpress-coding-standards-in-vs-code/.
With this setup files aren't getting saved and shows this message at the bottom right:
Saving ‘plugin.php’: Running ‘phpcbf’ Formatter (configure).
The only way to save is to press Cancel when this appears.
Any idea?
Please use which phpcs & which phpcbf to find the paths.
which phpcs
e.g. "C:\Users{Your username}\AppData\Roaming\Composer\Vendor\bin\phpcs
which phpcbf
e.g. C:\Users{Your username}\AppData\Roaming\Composer\Vendor\bin\phpcbf
once you find the paths to the executables, open your vscode json settings and add double check that the executable settings for phpcs & phpcbf match the paths.
Examples:
"phpcs.executablePath": "C:\Users\{Your username}\AppData\Roaming\Composer\Vendor\bin\phpcs.bat",
"phpcbf.executablePath": "C:\Users\{Your username}\AppData\Roaming\Composer\Vendor\bin\phpcbf.bat",
I think this issue is pretty widespread despite the lack of answers in this thread. Setting the paths as above does not fix things. For me, this happens when saving a file and there is nothing for the formatter to fix.
There is an open pull request for this issue that has been open for over a year now.
A fork of the project has popped up that specifically fixes this issue. Look for phpcbf in VSCode and find the one by Simone Baldini.
Try installing that to see if it resolves the problem.

R Working Directory "cannot change"

Working Direcotry Cannot Change It's saying that there's an error in my code but I've tried it multiple times with countless variations on the code (I wiped my past attempts sorry) and it refuses to change the working directory. It won't change to other things either so it's not just this folder. What's the issue?
This probably means that the directory you want to change to does not exist. From the image I think you are using Windows, in which case the proper path to the directory would look like this:
setwd("C:/Users/$USER$/Desktop/r-novice-inflammation"
Change the $USER$ to your own username and it should work.
Paths always start with the letter of the hard drive in Windows. The easiest way to find the proper path to a directory is, in my opinion, to right click on the folder and look for the "Location" in properties. The IDE RStudio has a menu which you can use to change the working directory, which may be easier than using vanilla R.
The exception is setwd("~") which links to the Documents folder of your current user (i.e. C:/Users/$USER$/Documents). Based on the comments I realised that other commands such as setwd("..") (i.e. one folder up in the hierarchy) can be combined with ~ which explains what you are doing. In this case the following works for me:
setwd("~/../Desktop/")

different versions of the shared library

I have a -lelf option in my makefile, I want to know: how does it choose the version of libelf.so to link (e.g. libelf.so.0 or libelf.so.1)? I do have a libelf.so.1 in my system, as well as a libelf.so which links to libelf.so.1. When I compile the code, everything is fine, however, when I try to run the binary, it reports: "can not find libelf.so.0". Any guide on solving this problem? Thanks in advance.
Ok, finally I understand something. I can specify which version of the .so at compile-time (I can force it to link to libelf.so.1, while it will cause some problem at run-time). It seems the best way is to find the required libelf.so.0 anyhow.

Sort File List in Xcode4?

This was answered for XCode 3, but not XCode4. Answer for XCode3 has not gotten an answer for 4.
So:
Is there a way in Xcode4 to sort my list of files under say the Classes folder Alphabetically? It appears this option has disappeared.
I am happy to remove this question and move to the XCode3 answer after it has been answered, if that makes folks happier.
Update: Good news, everyone! As of Xcode version 4.5, you can now sort by name or type. Select the files you want to sort and choose Edit > Sort > By Name. Thanks to #Snow-Crash for mentioning this in the comments below. Please upvote the comment!
This was, sadly, left out of Xcode4 -- I loved that feature. You can fix it though. Here's how:
First, jump over to Apple's Bug Reporter and file a feature request. Seriously, go ahead. I'll wait until you are back.
Back? Great! We are one step closer to getting that feature. Nice job!
Now for the poor man's substitute until Apple fixes it: Re-organize your project so most of your files sit in sub-directories (real ones, not Xcode logical "group" folders). Typically I have my files arranged in Classes, Controllers, Resources, Images, Foundation, and Supporting files. This covers about 95% of all my files. Whenever you need to reorder the files in Xcode, simply remove a folder reference and add it back -- the files in that folder will once again be in alphabetical order.
Admittedly, not as nice as in Xcode3, but once you have your project folder structure organized, it just takes a moment to re-alphabetize things without too much effort.
You can have it sorted in the jump bar: XCode 4 Sort Files By Name

JGit unstaging files/removing files from the index and ammending a commit

I figured out how to do a lot of things in the JGit library, such as commit files, find out the status of all files (ie. changed, modified, untracked etc), but i can't figure out how to unstage files i added to the index. Could someone let me know how to do this and maybe point me to some documenation as the eclipse site has none, and i can't find any on Google.
Also if anyone know how to ammend a commit i would much appreciate knowing that too.
Thanks.
Looks like you found a way to unstage files but ran into trouble as explained in your other question:
repository.getIndex().remove(getWorkignDirectoryAsFile(), new File(getWorkignDirectoryAsFile(), fileName));
repository.getIndex().write();
Did you solve your issue with the above? I notice that repository.getIndex() is deprecated and org.eclipse.jgit.dircache.DirCache should be used instead.
To amend a previous commit, you should look at
org.eclipse.jgit.api.CommitCommand.setAmend(boolean)
Would be great if you could report on your own answers if you found any.

Resources