assets folder (Xaringan) gets overwhelmed with new folders - r-markdown

as of recently I am noticing that the assets folder of my Xaringan presentations fill up with loads of weird folders, after knitting. I have several useful subfolders (e.g., css, images, js), but there are easily 200 folders created after knitting. All of then have random names like "00e3144c-c556-4b66-b50a-c44d64246b85-9.9.9" (the "-.9.9.9" seems the only non-random repetitive part of the folder names).
Where do these folders come from/what causes their appearance? And: are they strictly necessary or can I prevent them from being created? They are empty, but totally flock the assets folder.

I experienced the same overwhelming empty directory problem.
Yihui gave a possible cause - HTML dependency. I went down that route and discovered it was xaringanExtra which uses htmltools that would lead to empty directories - xaringan alone wouldn't.
It seems Garrick (author of xaringanExtra) has been aware of such issue, hence this PR. I'd wait for it to be merged then try again. Hope this is helpful.

Related

Current predicate configuration does not have any valid root items defined

Being new to unicorn I'm facing an interesting problem. Which raises a couple of questions. Number one is where can I review my predicate configuration?
Number two do I need to view this predicate configuration or is there some other way to resolving my valid root item.
Thanks
#Kamsars slightly unusual use of the word predicate; "Logic. that which is affirmed or denied concerning the subject of a proposition." might not be helping much either ;-)
Anyway. Unicorn 3 does come with a number of .config files, but as far as I can tell, no predicates are defined by default.
Look in App_Config\Include\Unicorn and find "Unicorn.Configs.Default.example". You can probably just remove the .example extension and fire up Unicorn with the default settings - that should get you started.
I also faced same issue recently and after spending around 2 hours found that Serialization folders was empty (No Serialization files was present under folder) for features and foundation projects.
After copying serializations files in features and foundations it start working for me.

Restoration of identical files from the recycle bin with the replacement or copying

As mentioned in header, my goal is to restore files from recycle bin with collisions handling.
I'm quite new to this API, so any tips about approach, that will allow me to resolve the collision(e.g. recycle bin contains two files with identical names but different size) automatically would be appreciated.
Right now I have unpleasant popup window, that is absolutely unacceptable.
Complete working example can be found here here.

Wix multi-disc layout requirement - Caching and locating media

First time asking a question here, and might not be my last. This is in regards to WiX 3.8
My company is starting to go into the installer business, and one of the requirements I have been tasked to do is to create a multi-disc installation for our product. I have used WiX before for simple patches, but now we want to create a full installation. Some of the requirements include:
Creating external cab files for multiple discs [Which I enabled with setting the 'EmbedCab' property in the media tag to 'no' and setting the disc ID's to each file element with Compression to low]
The finished build will have the 5 discs in separate folders, with the respected external cab files in each [Media tag 'layout' set to destination]
Executing the .msi file inside the 'Disc1' folder [Which works...almost]
The problem I am running into is that when the .msi file is located on the hard disk, either outside the Disc layouts or inside the 'Disc1' subfolder, it cannot find the other .cab files. The requirement I have is that I need to find a way to be able to only prompt for a disc if and only if after searching inside the next subfolder 'Disc2' and finding the next .cab file to install. Therefore it can not only look in the root where the .msi is located, but also check the subfolders for the required cab files. (This almost mimic's InstallShield, but I REALLY don't want to go that route.)
The second issue I have is regards to the bootstrapper. The .exe file needs to embed the .msi file as per the requirement. However, even when disabling caching of the msi file, the bootstrapper seems to start caching all the other .cab files (we are talking about a 20GB installation). Even disabling repair and rollback, the bootstrapper continues to try to cache the cab files into the PackageCache area on my system.
I've looked online and read the WiX books to help find a solution, but I seem to finally hit a dead end. Can anyone give me any thoughts or insight to help with this issue?
Some things I have tried so far:
- Using a custom action (C++) to perform a 'ResolveSource' to try to change the 'SourceDir' property to continue installation
- Thought about making a custom bootstrapper to disable the package caching event entirely, but I have no idea where to start.
Any advice, direction or even a sample to help would be greatly appreciated.
Thanks!

coldfusion application.cfc not found

I've been having a sporadic problem for a few weeks where on restarting the CF Server (Enterprise 9) one of my applications runs without ColdFusion referencing all the variables in the Application.cfc file. It's in the same folder as the CFML pages, it IS properly capitalised as Application.cfc, but it seems to just be ignored. Obviously this causes problems with datasource name and all the other variables I set in Application.cfc. For reference, I'm using an Application.cfc file based on Ben Nadel's excellent intro at http://www.bennadel.com/blog/726-ColdFusion-Application-cfc-Tutorial-And-Application-cfc-Reference.htm . Usually my requested template runs as an include and I can see it in the stack using debugging output, now I can't see it there at all. It's as if the file just doesn't exist.
Has anyone else experienced this, or can you think of possible solutions? Note that at times a restart has got the whole thing running perfectly smoothly.
Re folder structure it's really simple: the Application.cfc file is in the web root along with executable CFML templates - included templates, images, CSS etc are in separate folders referenced via relative paths.
There is another application with its own similar Application.cfc file that is in a sub-directory of the web root. This is running perfectly.
Try clearing your template cache. I've see cases where CF just gets flakey and the cached files are causing issues. Another option: Does ColdFusion have permissions to read/execute the Application.cfc? If this WAS an issue but is no longer an issue I've seen cases where the template cache was causing these files not to be found. Again, delete these files (from disk, not the cfadmin) and try again.

Web-Developer's Project Template Directory

IMPORTANT: The accepted answer was accepted post-bounty, not necessarily because I felt it was the best answer.
I find myself doing things over and over when starting new projects. I create a folder, with sub-folders and then copy over some standard items like a css reset file, famfamfam icons, jquery, etc.
This got me thinking what the ideal starting template would be. The reason I'm asking is that I'm going through once again and am wondering what I should include in my template so that I don't have to go back in the future and do this all over again with every new site I start.
What I currently have follows:
Project Template Folder
index.html -- XHTML 1.0 Strict Doctype. Meta Tags. CSS/js Files Referenced.
css/
default.css -- Empty. Reserved for user-styles.
960/ -- 960 Grid System for CSS Layouts.
960.css
reset.css
text.css
js/
default.js -- Empty. Reserved for user-scripts.
jQuery/ -- Light-Weight Javascript Framework
jquery-1.3.1.min.js
img/
famfamfam/ -- Excellent collection of png icons
icons/
accept.png
add.png
...etc
I have a similar structure and naming convention but for CSS, I use BluePrint which I find is more extensible. Also prefer jQuery having recently switched from prototype. In addition I have a common.js file that is an extension with custom functions for jQuery.
A /db/ folder with .sql files containing schema definitions. A /lib/ folder for common middle-tier libraries.
I will also have a /src/ folder which will sometimes have raw files such as Photoshop templates, readme's, todo lists etc.
If you have a lot of projects with a lot of static content in common (e.g. jquery, css framework, etc) make yourself a media server to serve all these. Then, instead of creating a bunch of folder structure from a "template" all you do is include the right files in your project's html. If you really want a template, your template becomes one html file instead of a directory structure.
This also gives you an easy way to update the static media for your sites (e.g. moving to the next version of 960). you only have to do it in one place. Of course, you still have to make sure that your updates don't break existing sites! :)
You can make the scheme a bit more complicated if certain projects have overlapping needs but are different from others. Just have a directory at the top level of the server for each setup and to each setup corresponds one html "template". The main idea is to have to deal with only one copy of everything that is common.
You can certainly do this on a small VM (e.g. linode) for $20/mo or a virtual web-server on your current web server. You don't really need a server, for that matter, you just need a folder. However, I think you can have some significant performance gains by having a dedicated media servers. I'd recommend using a fine-tuned apache or nginx for this purpose.
As for site-specific static files, it is also a good idea that they live on the media server and the directory structure would probably be exactly what you have, but they would/should be empty directories.
My web development framework sits in a git repository. Common code, such as general purpose PHP classes gets developed in the master branch. All work for a particular website gets done on a branch, and then changes that will help in future work get merged back into master.
This approach works well for me because I have full revision control of all the websites, and if I happen to fix a bug or implement a new feature while working on a branch I can do the merge, and then everything benefits.
Here's what my template looks like:
/
|-.htaccess //mod_rewrite skeleton
|-admin/ //custom admin frontend to the CMS
|-classes/ //common PHP classes
|-dwoo/ //template system
|-config/ //configuration files (database, etc)
|-controllers/ //PHP scripts that handle particular URLs
|-javascript/
|-tinyMCE/
|-jquery/
|-modules //these are modules for our custom CMS
|-news/
|-mailing_list/
|-others
|-private/ //this contains files that won't be uploaded (.fla, .psd, etc)
|-.htaccess //just in case it gets uploaded, deny all
|-templates/ //template source files for dwoo
I use a similar layout, but with one major exception: all of these directories live under a top-level media/ directory. This is for a few reasons:
This directory is rsync'd to two other servers which handle all of the static media requests.
Having multiple hosts allows some browsers to make more parallel requests for support files.
The media/ directory has its own .htaccess file which strips off a psuedo directory from the path which is the date-time last modified of the image (or whatever).
A custom template tag (I have used this with 2 Django projects, but you could do it in PHP, etc.) generates urls which a) semi-randomly choose one of the media servers, b) add the time-based pseudo directory to the path, and c) give the object an Expires time of now + 10 years.
I think the structure is good. The addition of a few other folders depends on what type of work you are completing.
For freelancing and the like, the addition of PSD folders, client comments would be a nice addition.
A very MS skewed view, but my SOP right now is along the lines of:
documentation/
architecture/ (what you might call code documentation)
communications/ (important client docs)
spec/
whitepapers/
graphics/
*.psd
source/
com.mycompany.projectname.solutionA/
com.mycompany.projectname.solutionB/
com.mycompany.projectname.solutionC/
com.mycompany.projectname.solutionX/ (project in the business sense here)
businesslogic/
*.cs (or whatever)
(further projects - in the visual studio sense)
site/
handlers/ (rarely do I use actual .html these days)
modules/
resources/
img/ (pngs jpegs, gifs whatever)
skin/
icons/
backgrounds/
js/ (compressed when published)
library/ (standard code)
common/ (app specific code)
*.js (app specific code, hopefully nil)
css/
skinX/ (even if there is only "default")
extension.css
base.css
transforms/(always hidden from public by config or build process)
*.xslt
unittests/
mocks/
testmain.cs (or whatever)
thirdparty/
dependencies
I definitely love the idea of having a skeleton template folder like this, but if you use a few different technologies, definitely pay close attention to the structure. My VB.net folder structure has a totally different setup compared to PHP. It sounds like common sense, but I have seen people approach both the same way.
At work we use Code Igniter as a PHP framework for our web applications and have created a new project template which does exactly that: Simple directory structure, Blueprint CSS, jQuery and the Code Igniter application folder, filled with a couple of commonly used libraries (Authentication, some speciales models for often used databases...).
The main motto here is: It's always easier to delete components than to add them. So fill your template up.
(And when I'm starting a new project in my spare time I sorely miss that template...)
I think what you have here is great.... What you've listed is of course all about the public front end of your app. My only addition to this, is to keep all your backend code and source out of the public web space if possible, as the less things you have in the public space, the more secure your app is.
So I'd suggest you take your entire tree, and put it in:
httpdocs/(all you had in your project template folder)
then put all your backend code (e.g. php libraries, sql files, etc) in adjacent subdirectories:
httpdocs/(all you had in your project template folder)
phplibs/
sql/
etc.
And, even for your front end stuff, make sure you don't copy in any example files that may come with your front end libraries, as the examples themselves may have security problems that would allow people to XSS or otherwise compromise your site.
I have been using the following setup for a while now with great results:
/site: This is where my actual working website will live. I'll install my CMS or platform in this directory after the templates are created.
.htaccess (basic tweaks I usually find myself enabling anyway)
robots.txt (so I don't forget to disallow items like /admin later)
/source: Contains any comps, notes, documents, specifications, etc.
/templates: Start here! Create all static templates that will eventually need to be ported into the CMS or framework of /site.
/behavior
global.js (site-specific code; may be broken out into multiple files as needed)
/media: Images, downloadable files, etc. Organized as necessary
/style: I prefer modular CSS development so I normally end up with many stylesheet for each unique section of the website. This is cleaned up greatly with Blender - I highly recommend this tool!
behavior.css (any styling that requires a JS-enabled browser)
print.css (this eventually gets blended, so use #media print)
reset.css (Eric Meyer's)
screen.css (for #media screen, handheld)
/vendor: all 3rd party code (jQuery, shadowbox, etc.)
Blendfile.yaml (for Blender; see above)
template.html (basic starting template; can be copied and renamed for each unique template)
I like OPs as a default start point. your standard template should err on simplicity, with the ability to add complexity only if it's needed.
one addition:
/robots.txt