File won't save as .css (sublime) - css

I'm new to web development and I'm just starting to learn CSS. I am having a problem where I can't get any of the styling to work. At first I thought I didn't link back to the style sheet correctly, but now I'm seeing that my css file isn't saving as .css. I keep going to save as, select .css and then I go back to look for it under that file type and it's not there. When I click on it to view the properties in the folder, for the type it just says "file". I've tried several times to save it again as .css and nothing. Does anyone know what could be going on here?
Edit: I tried to save it as HTML now and it wouldn't work either. Everything new I am saving is saving as a plain "file" now and I don't know why.

everytime you want to change the ending yourself, select "Save as", type the "file name + ending" and make sure always to check "Save as Type: All files".
You can also just type the "file name" and select the file type in "Save as Type: for example .css / .html"
Beginners' tip: If you are new to web development, I recommend the notepad. Every careless mistake that you notice here is golden for your future overall knowledge.

Related

ASP.net; automatically generated .js classes cannot be altered in their base files

I am working on something that totally baffles me. In my ASP.net project, I have this file:
It goes by the name of base.js and is a mere 4214 lines long.
If I hit debug in my app, then suddenly, a new folder appears in within my solution that goes by the name of "script documents", and looks like this:
At the very bottom , you see a little file called: base.js.
This file is an exact copy of my base.js from "earlier".
Now, I can even make stop points inside this automatically generated file and they work!
But if I now were to make changes to the base.js file (the OG one), none of the changes are transmitted to the auto generated file.
I guess this has something to do with the version code, but I couldnt really figure out how that works.
How can I alter these auto generated script files?
Thank you!

In GitAhead, how do you open a single file from a specific commit?

In GitAhead, I would like to open/download/save a file from a specific commit.
In sourcetree, slecting a fil gives you two buttons: "Open before" and "Open after".
I'm looking for something similar.
Is there a way to open a specific version of a specific file, without having to checkout the whole commit?
It's not as obvious as it should be. Navigate to the commit that changed the file. Press and hold the pencil icon in the file's header widget. You should see a menu pop up with options to edit the new and old revisions. The old revision is the file as it existed before the change, and new is the file after the change. Unfortunately, as there is no "Save As", you would have to resort to copy/paste to save.
The other option is to switch to the tree view. That shows arbitrary files as they existed in a given revision. If you want to get a file's contents before the change, you have to switch to the parent commit.

how to refresh image in codenameone(netbeans)

Im creating the UI of my application from a PSD file following the instructions in: https://www.codenameone.com/blog/psd-to-app-revisited.html (by using the css support plugin), everything is fine, but i edited one of the images in photoshop and exported it again to my codenameone folder(replacing the original image) and i thought the new image would replace the original one, but the application is still showing the old image(it seems as it is cached or something similar).
I already tried "Clean and build project" but didnt worked, also went to the generated .res file and tried to delete the original image but it says i must first delete the themes that use them(which i dont want to do). Is there any way to "refresh" the images referenced in the .res file so they reflect the latest image in the folder? or a "clear cache" or something similar. For now i renamed the image, and also changed the name in the css,but i think is not the best way cause that implies creating new names for your images, and editing your css with every little change.
If you change the image directly in the file system you need to do this when the designer is closed. Then reopen the designer res file and save it so the image is updated.

Alignment plugin in Sublime Text does not work with style.less (less file)

As the title, i can't find the way to make alignment plugin available with .less file. It's just work on CSS File
I haven't tested this yet, but I have a pretty strong hunch that it might help your case.
Open sublime text, and go to Preferences>Browse Packages
Look for the Alignment plugin folder and enter in it.
Look at the files in there, you will see:
Base File.sublime-settings
CSS.sublime-settings
Javascript.sublime-settings
JSON.sublime-settings
Try your hand at creating a LESS.sublime-settings file in there, copying the contents of another of the settings files, for example, the JSON.sublime-settings contains this:
{ "alignment_chars": ["=", ":"] }
It seems to me, that to enable alignment to work as expected with other filetypes not designed as default with the plugin, one would have to add this settings file to the plugin in order for it to work out.
I am not sure if the file name has to be case sensitive towards the syntax you want align to work with. If you installed the less package, you should see "LESS" shows up in the list as all caps, this is why my guess is to name the file LESS.sublime-settings. You can try different naming if it doesn't go at first...
Open any LESS file in Sublime Text.
Navigate to:
- Preferences
-- Package Settings
--- Alignment
---- Settings-Syntax Specific-User
Alternatively, if you're on a Mac hit Command+Shift+P and start typing 'Alignment' and the option will appear. Once clicked, an empty JSON file will be generated for you: LESS.sublime-settings
As EffectiX mentioned, just type in { "alignment_chars": [":"] } or whatever you want to align on. Save the file. This will work with pretty much any file format if configured correctly.

Flex - Download asset to local

I've got an interactive presentation, and it's all working as it should.
Now I want to add a function to download the currently visible image/video.
Because this presentation has a lot of files (all stored under assets/...) and it's a pain to navigate through the assets, I want an easy way to just click a button and get a "Save as.." window.
I've managed to get the url of the media, so now I just need a way to show a "save as.." dialog to allow the users to save/download the file and save it locally.
This whole presentation should be put online, so all the files are located somewhere in the /assets/.. folder inside the project.
Any ideas of how to do this? =)
Thanks!
EDIT #1:
For now I'm using "navigateToURL" to open a new browser window with the media. This works, but is there a way to show a "Save as.." dialog instead of opening the image?
Or any other ways to do this? =)
You are looking for the FileReference class, in particular the FileReference.save( data:*,defaultFileName:String = null ) method. That will open up a "Save..." dialog to save the corresponding data object and allow you to set a default file name. I'm unsure if this class can also handle the download as I have never had a time when I needed to prompt to save something that was to be downloaded. If it cannot handle it, you'll need to look into the URLStream class. That can handle the download and either on ProgressEvent.PROGRESS or Event.COMPLETE, you simply do a URLStream.readBytes( byteArray ); to save the downloaded bytes to a ByteArray and then that is the data object you save. I would look into the FileReference class, though. Odds are it can handle downloads as well.

Resources