w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
how to exclude fonts from cassette bundling
Found the answer, at least it solved it for me on Google Groups. Add this to in Web.config: <staticContent> <remove fileExtension=".eot" /> <remove fileExtension=".otf" /> <remove fileExtension=".svg" /> <remove fileExtension=".ttf" /> <remove fileExtension=".woff" /> <mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" /> <mimeMap fileExtension=".otf" mimeType="application/x-font-opentype" /> <mimeMap fileExtension=".svg" mimeType="image/svg+xml" /> <mimeMap fileExtension=".ttf" mimeType="application/x-font-truetype" /> <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" /> </staticContent>

Categories : Misc

exclude a particular directory and exclude a list of files
File#listFiles takes a FileFilter which can be used to determine if certain files should be included or not in the listing returne by File#listFiles... This is okay if you know in advance what you to to include/exclude. If you want to make the process more dynamic, you could pass a list of FileFilters to the copy method and then use a special FileFilter to iterate over them... private void copyFiles(File src, File tgt, FileFilter... filters) { /*...*/ File[] filePaths = src.listFiles(new GroupedFileFiler(filters)); /*...*/ } public class GroupedFileFilter implements FileFilter { private FileFilter[] filters; public GroupedFileFilter(FileFilter... filters) { this.filters = filters; } @Override public boolean accept(File pathname) { boo

Categories : Java

MVC4 bundling javascript or css files from a different domain?
Bundling in ASP.net MVC allows you to optimize the deployment of scripts and stylesheets by replacing the placeholder Scripts.Render() at Runtime rather than at Design time. When the page is parsed and pushed to the client, the bundles registered to the calling server are parsed into the output buffer. Therefore the app serving the content must be running the bundler service. If a web app not running bundling encountered the Scripts.Render() element, it would either output null or throw an exception. you can, however, use CDN references in your RegisterBundles method, like: bundles.UseCdn = true; //enable CDN support //add link to jquery on the CDN var jqueryCdnPath = "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js"; bundles.Add(new ScriptBundle("~/bundles/jquery",

Categories : C#

Why is including multiple files so much slower than bundling into one
My first guess is that it's all the stat system calls going on. What happens if you turn apc.stat off in your config? Even though APC caches the bytecode, if apc.stat=1, it needs to check the mtime on each file via the filesystem to make sure it doesn't need to be re-read. EDIT: going deeper, in response to your comment. How are you referencing the included files? If you're using relative paths, then you're getting the include_path involved. In other words: include "somefile.php"; is likely to be slower than include __DIR__ . '/otherfile.php';

Categories : PHP

ASP.NET MVC Bundling cache. (Detecting css files changes) (internal behaviour)
The ASP.NET Optimization framework caches the bundle response in HttpContext.Cache and uses a CacheDependency to monitor each file in the bundle for changes. This is why updating the files directly invalidates the cache and regenerates the bundle. The bundle file name is a hash of the bundle contents which ensures the URL changes when any of the bundle files are modified. The bundle's virtual path is used as the cache key. The relevant code from the library (note this is slightly out of date but I believe the logic is still the same): internal BundleResponse GetBundleResponse(BundleContext context) { // check to see if the bundle response is in the cache BundleResponse bundleResponse = Bundle.CacheLookup(context); if (bundleResponse == null || context.EnableInstrumentation)

Categories : CSS

Bundling files with Android app and allowing for additional downloads later
I have a similar scenario, I zipped all the files on a single zip and stored it on the res/raw folder. Then on the first startup I extract all the files to the app's internal storage. public static void unzipFiles(Context context, int file) { InputStream stream; context.getFilesDir().mkdirs(); String path = context.getFilesDir().getAbsolutePath(); try { stream = context.getResources().openRawResource(file); if (stream == null) { throw new RuntimeException("Cannot load " + file + " file from raw folder"); } ZipInputStream zis = new ZipInputStream(stream); ZipEntry entry; while ((entry = zis.getNextEntry()) != null) { if (entry.isDirectory()) { File f = new File(path, entry.getName())

Categories : Android

How I can exclude files into the compiled APK?
You need to remove these mp3's from your assets folder. If you want to keep them with the project but not in the APK, just create separate folder (i.e. PROJECT and move your files there). This folder will be omitted by building scripts but you still can have these files in one place and can have them i.e. versioned etc.

Categories : Android

How can I exclude *.DSA and *.SF files from shaded jar?
I had the same problem. It was fixed by making my artifact selector more specific, e.g. <artifact>bouncycastle:*</artifact> The entire block looks like this: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>com.mycompany.MainClass</mainClass>

Categories : Java

Exclude specific files from 'git pull'
git pull is equivalent (almost) to git fetch && git merge. You just have to invoke fetch and than merge only specific files - tutorial.

Categories : GIT

Regular Expression to exclude files
I think this should work: [a-zA-Z][S]*^(ABC|XYZ) but Im not 100% sure of all the details of your requirements. What the regex should be saying is anything that starts with an alphabetic letter and then has as many non-white space characters as it wants and then does NOT end in ABC or XYZ.

Categories : Regex

Can you exclude files on pull requests?
A git repository isn't a file storage, but a database of code, patches and metadata. You can filter what files you pull from a repository, but then, nothing would prevent to have access to other files in this subdirectory. Outside the Git world, to have such by directory ACL control, Subversion is still interesting: http://svnbook.red-bean.com/en/1.7/svn.serverconfig.pathbasedauthz.html In the Git world, what you can do is: to have several Git repositories, one by project component. So you'll be able to give your developer access to a small repository with only the relevant code. to organize these repositories for your project into a main repository, with subrepositories. Git has a feature to achieve that, called submodules — http://git-scm.com/book/en/Git-Tools-Submodules To prep

Categories : GIT

Exclude Some Files From a Maven Build
Look into the maven jar plugin. There is a way to exclude artifacts from the packaged jar. I hope this helps.

Categories : Maven

Exclude css files by default when checking in
If you are using Local Workspaces, you should be able to use a .tfignore file to ignore the css files like so: ###################################### # Ignore .css files in this folder and all its sub-folders *.css If you are using Server Workspaces, I think you will just have to avoid adding them when you use the Add Files to Source Control dialog. You can sort by the file type and select all the css files and choose "Exclude"

Categories : CSS

Use "find" to list all c/h/cc files but exclude symlinks
This definitely works for me. Are you sure your shell isn't expanding the * in your commandline? Or you didn't apply -type f to all your items: find . -type f -and ( -name "*.c" -o -name "*.h" -o -name "*.cc" )

Categories : Linux

How to remove/exclude modules and files from pyInstaller?
I think this is a duplicate, or at least very similar to, this problem that I answered recently: Python: Excluding Modules Pyinstaller

Categories : Python

How to exclude css files from auto formatting in IntelliJ
Since IDEA 13 it is possible to deactivate formatting with /* @formatter:off */ and reactivate with /* @formatter:on */ But you need to enable that first in Settings -> Code Style -> General -> Formatter Control

Categories : CSS

IvyDe Eclipse plugin - how to exclude jar files
I guess that the Ivy configuration you want in Eclipse is the "runtime" one. Then go into the configuration of the classpath container in Eclipse and select the appropriate Ivy configuration in the suggested list. See the online documentation: http://ant.apache.org/ivy/ivyde/history/latest-milestone/cpc/edit.html http://ant.apache.org/ivy/ivyde/history/latest-milestone/images/ivy_file_def.jpg

Categories : Eclipse

Command line to get SVN changed files only (exclude folders)
It's not pretty, but... In Unlx/Linux/MacOS X: $ svn status | while read status file do [ -f "$file" ] && printf "%s \%s " "$status" "$file" done If you are in Kornshell, you can use print "$status $file" instead ofprintf. If you are in BASH, you can simply useechoinstead ofprintf, but only if you've turned onshopt -s xpg_echo` first.

Categories : Svn

Php list ONLY files inside zip archive (exclude folders)
Your foreach is useless. It iteratate over array with one item. Anyway there is two way to detect folder. First, folders are ended with '/'. Second folders has 0 size. $za = new ZipArchive(); $za->open('zip.zip'); $result_stats = array(); for ($i = 0; $i < $za->numFiles; $i++) { $stat = $za->statIndex($i); if ($stat['size']) $result_stats[] = $stat; } echo count($result_stats);

Categories : PHP

gruntjs path filter : exclude files start with _
You can specify an array of strings for src, and can exclude files with ! at the beginning of the string (see the file object format documentation here): src: ['{,basedir/**/}*.jade', '!{,basedir/**/}_*.jade'] Hopefully you can get it from there, I'm not terrible familiar with the globbing syntax.

Categories : Node Js

How can I use PowerShell's -filter parameter to exclude values/files?
-Filter is not the right way. Use the -exclude parameter instead: $srcfiles = Get-ChildItem $srcPath -exclude *.htm* -exclude accepts a string[] type as an input. In that way you can exclude more than one extension/file type as follows: $srcfiles = Get-ChildItem $srcPath -exclude *.htm*,*.css,*.doc*,*.xls* ..And so on.

Categories : Shell

FindBugs Eclipse: specyfying exclude filter files relatively to project
Yes, using a relative path seems to work. I have a global findbugs filter file in one project that every project uses. In .settings/edu.umd.cs.findbugs.core.prefs of each project, I have: excludefilter0=../other.project/findbugs-global-excludes.xml|true If this works it should work for a relative path to the same project. I'm using version 2.0.1.20120712 of the findbugs plugin, for what it's worth.

Categories : Eclipse

Android Studio - Inspect Code - Exclude generated files
I've found answer Excluded folders won't be taken in account for Code Analysis Right-click on top-level element and go to Open Module Settings There you have listed single modules, select correct module In right column select folders to be excluded and either right click -> exclude or button exclude above the file tree In left column remove all leftover references to excluded directories from other groups than Excluded Folders

Categories : Android

Copy files from source directory to target directory and exclude specific file types from specified directories
This is one way to do it $SourceDirectory = 'C:Source' $DestinationDirectory = 'C:Destination' $ExcludeExtentions = '*.txt*', '*.xml*' $ExcludeSubDirectory = 'C:Sourcead_directory1', 'C:Sourcead_directory2' Get-ChildItem $SourceDirectory -Recurse -Exclude $ExcludeExtentions | Where-Object { $ExcludeSubDirectory -notcontains $_.DirectoryName } | Copy-Item -Destination $DestinationDirectory Your best friend here is Where-Object, or where. It takes a scriptblock as parameter and uses that scriptblock to validate each object that goes through pipeline. Only objects that make script return $true are passed through Where-Object. Also, take a look at the object that represents a file you get from Get-ChildItem. It has Name, Directory and DirectoryName containing pieces of file's FullNam

Categories : File

IntelliJ + groovy DSL: How to exclude files from being compiled by groovy plugin?
Try removing the groovy file suffix from the compiler's resources list: Settings -> Compiler

Categories : Java

When NOT to use MVC Bundling?
Minification is a complex process by making scripts/styles smaller using techniques such variable name shortening, white space elimination, comments removal, etc... It uses ASP.NET Web Optimization that depends on WebGrease for minification. Of course, there can have issues but I personnaly never noticed that. Here are some situations, where you should not use bundling There is only one file in your bundle. Why bundling ? You are using only famous frameworks such as JQuery or jQuery UI. Do not redistribute scripts that are already served by someone else. Google/Microsoft/Amazon/... already provide CDN for the most popular, open-source JavaScript libraries. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> Your bundle takes only a few Bytes

Categories : Javascript

Bundling not work for me -MVC
In your web.config you need to set the attribute debug="false" in the <compilation>-tag. This means that you can use this flag to allow javascript debugging locally before deploying (debugging minified and bundled javascript is obviously next to impossible). NOTE: The "Release mode" flag only affects the way the C# (or VB.NET) compiler compiles your classes and is not related to the debug attribute of the <compilation>-tag. Also note that the debug attribute controls whether ASP.NET MVC caches the location of views on disk and thus has a great performance impact: you should always have debug=false in a production environment.

Categories : Asp Net Mvc

asp.net mvc bundling scalability
In practice the version number is a hash of the contents of the files. So if you have the same javascript files on all nodes of your webfarm, they should all get the same version number. If you are getting a different hash this could be an indication that you haven't deployed the same contents of those files on all nodes of your webfarm.

Categories : Asp Net Mvc

CDN path is not working in js bundling in MVC
This example shows how to load resource from CDN in 'release' mode and locally from 'debug' mode. var jqueryCdnPath = "//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"; var jqueryBundle = new ScriptBundle("~/bundles/jqueryCdn", jqueryCdnPath) .Include("~/Scripts/jquery-{version}.js"); BundleTable.Bundles.Add(jqueryBundle); CdnPath refers to a resource you want to get from a CDN, and Include tells where to find that locally. You can change which one is requested from Web.config. Set <compilation debug="true"/> to use local file, and <compilation debug="false"/> to use CDN. See this Bundling and Minification article for more information.

Categories : C#

MVC4 Bundling and Minification with CDN
Yes it is perfectly possibly and a good practice to publish the Minified script to your CDN. I routinely see both on various CDN's. This allows the developer to choose which version they need. ...then in views we access the minified version through CDN url? Yes, you will access the minified version with the CDN url.

Categories : Asp Net

DiscoverMeteor: what is the purpose of bundling?
Bundling creates a production application, optimized to run on the live environment, while your working directory is more suitable for development. For example, bundled app only have one js and one css file instead of tens to hundreds. Additionally, bundled app contains all the engine needed to run with plain node, so that you may run it in an environment without Meteor.

Categories : Meteor

get directory listing for bundling
From the documentation, there is a method IncludeDirectory which should do what you want. bundles.Add(new StyleBundle("~/jQueryUI/themes/baseAll") .IncludeDirectory("~/Content/themes/base", "*.css")); There's a good tutorial on bundling on the asp.net site: http://www.asp.net/mvc/tutorials/mvc-4/bundling-and-minification To iterate them individually, this should work: string virtualDirectory = "~/Styles"; string directory = HttpContext.Current.Server.MapPath(virtualDirectory); foreach (string fileName in Directory.GetFiles(directory)) { bundles.Add(new StyleBundle("~style/minified/" + fileName).Include(virtualDirectory + "/" + fileName)); } You will need to add a using for System.IO.

Categories : C#

MVC 4: Durandal bundling cache
Sigh.. Second time I've been caught out by this. I thought my issue was MVC related, its was Durandal deployment related :P Note to everyone reading this. Once you deploy a Durandal project & if you modify ANY of the existing javascript files or main.js. Remember to run optimizer.exe. ...Appdurandalamdoptimizer.exe

Categories : Asp Net Mvc

How do I use ASP.NET bundling and minification without recompiling?
This isn't possible with the default Bundling/Minification in ASP.NET. The entire point of bundling is to create one single to file to reduce the number of browser requests to load static files such as .JS and .CSS files. Rolling your own is your only option. However, please note that each <script> line will result in a browser request. Since most browsers can only handle 6 requests concurrently, you can have wait times just to load these static files. And FYI, you don't have to recompile DLLs every time you update your .JS files with built-in bundling. You can simply reset the application pool the app is running on. If you're running with an external session persistence model, your users won't notice when this happens.

Categories : Javascript

bundling is turned off but I still want versioning
Here is one way to do what you want. Instead of using Scripts.Render @Scripts.Render("~/ScriptMonkey") you can use Scripts.RenderFormat @Scripts.RenderFormat("<script src="{0}?v=" + DateTime.Now.Ticks.ToString() +""></script>", "~/ScriptMonkey") That will force a download every time... or you can just put a number in there @Scripts.RenderFormat("<script src="{0}?v=1"></script>", "~/ScriptMonkey") Though I think doing this could be a huge pain as you would be responsible for changing that variable every time a script changes.

Categories : Asp Net Mvc

enable bundling only not minification in mvc4
There are built-in no configs/options that allow you to enable bundling without minification. However, Bundles (Script or Style) use IBundleTransform : Microsoft.Web.Optimisation include two defaults transform type JsMinify and CssMinify which is used by ScriptBundle and StyleBundle respectively. However we can create our own custom transform type to process references as per our need or even better do not use IBundleTransform. So, to enable bundling without Minification we could try this : //somewhere after all bundles are registered foreach (var bundle in bundles) { bundle.Transforms.Clear(); }

Categories : Asp Net Mvc

Checking for jQuery using ASP.NET Bundling fails with IE8
As far as I know you are right. Once an error occurs the script execution stops for that file. If you really want to place them in the same file you could try to surround the jQuery declaration with a try/catch/finaly block (not sure it's a good ideea :| ) Also if you are using a .min.js file for production I believe you should not include that in the bundel.

Categories : Jquery

Bundling a linked JavaScript file
Short answer: No in debug mode, yes in release mode. File linking is a Visual Studio concept used to include files stored elsewhere into code and resource compilation. Clearly, linking a file will work if you need to compile it (it's a source file), if you need to embed it as a resource or you need it copied to target directory (if Copy to Output Directory is set to Copy). Why it doesn't work in debug mode In debug mode, bundling is disabled and scripts are linked to individually. Since files are not copied to root of your web application, they will not be accessible to user through IIS. If you try to enable copying of the script file every time you build the application, file will be copied to bin directory of web application. This directory is not accessible through IIS, and again t

Categories : C#

Can't get bundling and minification to work on MVC4
Assuming you've setup that bundle in BundleConfig.cs in your App_Start folder then you should just need to add this line in your _layout.cshtml: @Styles.Render("~/Styles/Layout/CSS") The path of the bundle should be the same as in the BundleConfig.cs file If you don't have a BundleConfig.cs file then the easiest thing to do is create a new MVC application project (internet application template) and follow the example there.

Categories : C#

Bundling multiple versions of Jquery
I think you partly answered your question So you can have bundles.Add(new ScriptBundle("~/bundles/jquery_OLD").Include( "~/Scripts/jquery-1.9.*.js")); bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-2.*.js")); You just need to add two different bundle names one can be jquery old, second just jquery.

Categories : Jquery



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.