w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How can I exclude a file from iTunes file sharing?
There is no way to exclude files from File Sharing. The files you need to share should be put under Documents directory and the files which you don't want to share should be kept in other directories. It'll solve the issue.

Categories : Iphone

svn:ignore exclude a file from being ignored
I don't think you can - svn:ignore takes in a blacklist (files to be ignored), not a whitelist (files that are not to be ignored).

Categories : Svn

Exclude .InstallState file from MSI
I found a workaround for this, During installation i'm doing a File.Delete(). I'm deleteing the file within OnComitting() of installer class. protected override void OnCommitting(System.Collections.IDictionary savedState) { string installedPath = string.Empty; installedPath = Context.Parameters["assemblypath"]; installedPath = installedPath.Substring(0, installedPath.LastIndexOf('\')); File.Delete(Path.Combine(installedPath, "InstallerHelper.InstallState")); base.OnCommitting(savedState); }

Categories : C#

'!' does not exclude file in .gitignore
Replace temp with: temp/* This ignores all files in the directory. In most cases temp, temp/ and temp/* all work the same because in the first two cases, the directory is ignore while in the third case, Git does not track empty directories. Thus, the directory itself will be ignored. To illustrate this, this is essentially what happens when temp/ has temp1.txt temp2.txt temp3.txt: temp # anything with the name of "temp"; a directory, a symlink, a file. temp/ # whole of temp dir temp/* # temp/temp1.txt temp/temp2.txt temp/temp3.txt Thus, the third case will work in your case. The negation pattern must be placed after the pattern that covers it. In this case, !temp/script.txt must come after temp/*. Otherwise, it will not be applied. So, your final .gitignore file should look like

Categories : GIT

How to exclude column header from CSV file in PHP?
With assistance of This article and This forum thread I came up to a viable solution for me with personal assistance of my colleague Ms. Tahmina Aktar Nishi. Hope it will help anyone trying something like this: //get the csv file $file = $_FILES[csv][tmp_name]; $handle = fopen($file,"r"); // read the file ?> <?php // make the loop and do upload $find_header = 0; // a simple counter while( $data = fgetcsv( $handle,6000,",","'") ) { $find_header++; //update counter if( $find_header > 1 ) { $sql = mysql_query( "INSERT INTO table_name ( post_id, name, designation ) V

Categories : PHP

Exclude first line of csv file on import
just use a counter and omit the first line... function ReadTxtData(txtFile) { var line, temp, txtRecord, tempArr; var txtData = []; var counter = 0; txtFile.open("r"); while (!txtFile.eof) { line = txtFile.readln(); if (counter++ > 1) { tempArr = line.split(" "); txtData.push(tempArr); } } txtFile.close(); return txtData; }

Categories : Javascript

Exclude the "." from a file extension in Rails
Would this work for you? File.extname('something.jpg').delete('.') #=> 'jpg' You could even wrap it up in a helper: def file_extension(filename) File.extname(filename).delete('.') end file_extension('something.jpg') #=> 'jpg'

Categories : Ruby On Rails

How to exclude a css file from a requireJS build?
Since knowing when the file has loaded is not reliable, it does not make sense to explicitly support CSS files in RequireJS loading, since it will lead to bug reports due to browser behavior. That's why Requirejs does not support CSS loading.

Categories : Wordpress

use underscore to exclude file and directories
I'm not too familiar with coffeescript, but here's what you'd want (might require fixing up, as I don't know coffeescript): EXCLUDE = [ 'dev', 'README.md', 'config.json' ] results = __.reject locales, (value, index, list) -> return EXCLUDE.indexOf(value) == -1 _.reject returns a new list of any items that the iterator returns true for. In this case, if the item is not in the EXCLUDE list (indexOf === -1), the function returns true, and that item is part of the list it returns.

Categories : Javascript

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

.NET: How to exclude certain file name extensions when matching with a regex?
It seems too easy so something must be wrong, but i am going to post my solution anyway. You only need to replace the + in the first group (.+) with a the non-greedy version +?. The final regular expression becomes this one: ^(.+?)(?:.(?:ready|done|error))*$ And you can try it with this code: string strRegex = @"^(.+?)(?:.(?:ready|done|error))*$"; RegexOptions myRegexOptions = RegexOptions.None; Regex myRegex = new Regex(strRegex, myRegexOptions); string strTargetString = @"Merry Chrismas.ready.yyy"; string strReplace = @"${1}"; return myRegex.Replace(strTargetString, strReplace);

Categories : C#

Exclude code coverage in assemblyinfo file
Use a .runsettings file to configure the code coverage as specified here: http://msdn.microsoft.com/en-us/library/jj159530.aspx in that file use the "Source" element to exclude the source files you want to leave out. <Sources> <Exclude> <Source>.*\Model\.*</Source> </Exclude> </Sources>

Categories : Dotnet

Exclude external javascript file from loading
You can do it like this: if (__FILE__ != $YOUR_PATH_NAME) { $this->headScript()->prependFile($this->basePath('js.js'), 'text/javascript'); echo $this->headScript() } Replace $YOUR_PATH_NAME with the actual path. This script should execute snippet inside if block only if it's not on the index page

Categories : PHP

Exclude a system header file in VS2010
You might want to #define NOMINMAX before #includeing any Windows headers. This is such a common problem that they added this macro to remove the min and max definitions that conflict with the stl versions. I'll try and dig up some MSDN reference for this.

Categories : C++

Concatenate with requirejs and exclude a single file?
You should exclude your file in the same way you included it. Try this way: exclude: ['lib/text!config.json'] But I just stopped using this approach, because it requires existence of config.json file in build phase. Instead I'm using nested require calls (You may use require inside your defined modules to load files in runtime). Unlike define, nested require may not be included in build process (and by default they are not) and validation phase will be fine. Be advised, this approach has at least one disadvantage: Nested require calls are also asynchronous. But in my case that is not a problem.

Categories : Javascript

nginx, exclude single file from location
You're going to kick yourself when you see the answer. What I want to do here is to exclude one single file called piwik.php as it should receive special treatment in a separate location. Ok, you should set that path as a separate location before your default one. e.g. location ~ ^/stats/piwik.php$ { allow 127.0.0.1; deny all; fastcgi_split_path_info ^(.+.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_read_timeout 150; fastcgi_index index.php; include fastcgi_params; } location ~ .php$ { fastcgi_split_path_info ^(.+.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_read_timeout 150; fastcgi_index index.php; include fastcgi_params; } As those are both regular expression location blocks, the one listed

Categories : Nginx

Unable to exclude folders from war file using regex
Try to use a negative lookahead (?!..) to exclude the lib directory: <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> <configuration> <packagingExcludes> %regex[js/backbone/(?!lib/).*] </packagingExcludes> </configuration> </plugin> (?!lib/) means not followed by lib/

Categories : Regex

File Extensions to Include rather than Exclude - Subversion
svn st | grep extension | sed -En 's/^(M|A)[ ]+(.+)/2/p' > targets.txt Then svn commit --targets targets.txt Then rm targets.txt It'd also be easy enough to write a bash script to take the extension as a parameter.

Categories : Svn

How do I setup an .htaccess file to exclude a subdirectory?
This should work: RewriteEngine On # redirect anything that is different than /blog and /product to blog.example.com RewriteCond %{HTTP_HOST} ^example.com$ [NC] RewriteCond %{REQUEST_URI} !/blog.* [NC] RewriteCond %{REQUEST_URI} !/product.* [NC] RewriteRule ^(.*)$ http://blog.example.com/$1 [R=301,L]

Categories : Htaccess

How to show only the modified file names and exclude the deleted ones?
I think the best is to use the diff command with diff-filter applied: git diff --name-only --diff-filter=AM This should give you the list of added and modified files (AM in diff filter) when comparing your working tree to the index. You could also apply the --diff-filter option to show command but this one is. To check more flags you can set on the --diff-filter option check the here.

Categories : GIT

RequireJS: How to exclude certain paths when building to single file?
Setting the paths to "empty:" in my r.js config worked. Example: // This is a RequireJS config file (function(){ return { // Name of input file (without the .js extention) "name": "main", // Directory containing input file "baseUrl": "static/", // Look in this file for the require.config() call and extract it "mainConfigFile": "static/main.js", "paths": { // Don't attempt to include dependencies whose path begins with webapp/ "webapp": "empty:", // Ditto for the following 3rd-party libraries "jquery": "empty:", "fuelux": "empty:", "backbone": "empty:", "underscore": "empty:" }, "optimize": "uglify2", }; })()

Categories : Javascript

Visual Studio 2010 - Exclude file type
Ok in the meantime I figured it out on my own: Environment: VS2010 / C++ project with templates. Templates are declared in *.h and implemented in *.cpp. Each *.cpp file is set to "Exclude from build = Yes" Problem: Each time a new template implementation is added the corresponding *.cpp must be manual set to "Exclude from build = Yes" What I want: A build rule to exclude ALL template implementation files from build process. Action: Renamed *.cpp file within the "Solution Explorer" to *.ipp. Result: When "Exclude from build = No" file is compiled even it has no *.cpp extension. Option A: Set each individual *.ipp file to "Exlcude from build = Yes" -> This is no option for me ! Option B: Remove the *.ipp from the solution and add it again. Within *.vcxproj file is then added as follo

Categories : C++

How to exclude sub-directory from cacls processing in batch file
You need to generate a list of files to be processed and exclude the ones you don't want since CACLS doesn't allow filtering. Here, I use "dir" to generate the list of files to process. You could use "forfiles" as well. (You can make the script more compact using pipes, but I used temporary files instead just to make it more clear). @echo off setlocal set TMPFILE=%TEMP%dirs.txt set TMPFILE2=%TEMP%dirs2.txt @rem Generate the list of dir names to be processed dir "%~1" /ad /s /b /p > %TMPFILE% @rem Filter out the unwanted ones findstr /i /v /C:"myDirABC" < %TMPFILE% > %TMPFILE2% @rem And execute a command on each for /F "delims=;" %%x in (%TMPFILE2%) do call :dostuff "%%x" goto :EOF :dostuff @rem do the directory itself cacls "%~1 /E /G myUser:F @rem do the fil

Categories : Windows

How to limit the values in a file using xsl?
In xslt can't you the xpath substring function: Example: <xsl:value-of select="substring('Beatles',1,4)" /> Result: 'Beat' Replace 'Beatles' with the path to you element.

Categories : Xslt

How to route SQL print output to log file?
Invoke-SqlCmd implements T-SQL PRINT statements and RAISERROR using the verbose parameter. To capture verbose output, first you'll need to include the parameter in your call to invoke-sqlcmd i.e. invoke-sqlcmd -verbose and next you can do one of two things: If you're using Powershell V3 or higher you can redirect verbose output: invoke-sqlcmd -verbose 4>&1 | outfile someoutfile.txt If you're using Powershell V2 you can't redirect verbose output to a file, however you can use start-transcript to send all screen output to a file. One gotcha with this approach--it will not work with SQL Agent Powershell job step. It will however work with a cmdexec job step which calls powershell.exe.

Categories : SQL

C# WP8 Resource file string limit
Solved. Besides the PT and EN resource files I also have a String resource file. That is the original file that I created. PT and EN files are a copy of it with the respective culture code (pt-PT and en-US). I had to add String5 in that file as well.

Categories : C#

about limit of the array output to file in c++
Your arrays are too big to fit on the stack, which has limited size no matter how much RAM you have. A quick-fix is to make them static. The better solution is to allocate them dynamically, either using new or vector. The fact your array is 2d makes it a bit tricky to pass a pointer to the file. Can you do this? vector<double> data(2000000000); fstream outfile("output.dat", ios::out | ios::binary); outfile.write((char*)&data[0], data.size() * sizeof (double)); If this throws std::bad_alloc then your OS didn't have enough memory to provide.

Categories : C++

Laravel 4 Auth Filter: Unable to generate a URL for the named route as such route does not exist
change Route::get('fans/landing', array('uses' => 'FansController@getIndex'))->before('guest'); to Route::get('fans/landing', array('as' => 'fans.landing', 'uses' => 'FansController@getIndex'))->before('guest'); and change Route::filter('auth', function() { if (Auth::guest()) return Redirect::route('fans/landing'); }); to Route::filter('auth', function() { if (Auth::guest()) return Redirect::route('fans.landing'); });

Categories : Authentication

RedirectToAction in MVC3 returns "No route in the route table matches the supplied values"
public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}/{id1}/", // URL with parameters new { controller = "Home", action = "Index", id = UrlParameter.Optional, id1 = UrlParameter.Optional } // Parameter defaults ); routes.MapRoute( "Default", // Route name "{controller}/{action}", // URL with parameters new { controller = "Home", action = "Index" } // Parameter defaults ); } If you pay attention to the above code you were missing the default route without parameters.

Categories : C#

Forward any route with upper case character to equivalent lowercase route in Kohana 3.3
If you do not want any of your routes to be case-sensitive, simply extend the route class: class Route extends Kohana_Route { public static function compile($uri, array $regex = NULL) { return parent::compile($uri, $regex).'i'; } }

Categories : Misc

Rails Route not working despite link being correct and route appearing in "rake routes"
I think you are creating a nested resource for two models app model and content model. right? Here's for show something like /apps/101010/contents/90909090 <%= link_to 'Show', app_content_path(@app, content) %> On controller following like this: def show @content = @app.content.find(params[:id]) end Read this for creating-nested-resources

Categories : Ruby On Rails

How can I pair driving directions route segments with the names of the route in Google Maps API V3?
The DirectionsStep object has a property called end_location. You could get this value and display it in an info window? https://developers.google.com/maps/documentation/javascript/reference#DirectionsLeg

Categories : Javascript

How should I route CMS urls alongside optional paramters / actions in route config?
Eventually I stumbled across the answer here: Dynamic Routes from database for ASP.NET MVC CMS The answer is to provide a custom route constraint that checks the DB for existence of the CMS url.

Categories : C#

Cancel route and redirect to other route without displaying the original content in AngularJS
The first answer should work, but to do it using $q I would use defer.resolve() or defer.reject("rejection_reason") then I would listen for a $routeChangeError in a top-level controller that is bound to an an element outside of the ng-view that the routeProvider manages. So in your HTML, something like: <body ng-app="app" ng-controller="DocumentCtrl"> <div ng-view> </div> </body> Then that route of yours would be defined something like: when('/home', { templateUrl: templateUrl blah, controller: baseName + 'Controller', resolve: { load: function($q, MY_USER_SERVICE){ var defer = $q.defer(); if(~MY USER LOGGED_IN LOGIC RETURNS TRUE~){ defer.resolve(); } else { defer.reject("not_logged_in"); } return defe

Categories : Angularjs

Unable to generate a URL for the named route "regions.index" as such route does not exist
You have not named your routes. You should change Route::get('regions', 'RegionsController@index'); to Route::get('regions', array('as'=>'regions.index', 'uses'=> 'RegionsController@index');

Categories : PHP

jQuery date picker: limit certain months and limit current month upcoming days
This might work: $(function() { $( "#datepicker" ).datepicker({ minDate: "-3M", maxDate: "+0D" }); }); So your code would become: $(document).ready(function () { $("#<%=txtFrmdate.ClientID %>").dynDateTime({ showsTime: true, ifFormat: "%d/%m/%y %H:%M", daFormat: "%l;%M %p, %e %m, %Y", align: "BR", electric: false, singleClick: false, displayArea: ".siblings('.dtcDisplayArea')", button: ".next()", minDate: "-3M", maxDate: "+0D" }); });

Categories : Jquery

camel ftp route and file type converters
hmm, I would recommend to work with a local file (I always do that with the ftp endpoint). There is an option in the ftp endpoint called localWorkDirectory that lets you define a directory to download the file ( typically, /tmp ) before further processing. The idea is to avoid any error due to network issue or being disconnected during process Can you try it It's easy enough (just add &localWorkDirectory =mydir in the uri ) and it will dl the file for you see https://camel.apache.org/ftp2.html. Just make sure you have write right on the directory, of course

Categories : Apache

Magento : file size limit in Varien_File_Uploader
There aren't any related function in Varien_File_Uploader, but you can use Varien_File_Uploader::addValidateCallback($callbackName, $callbackObject, $callbackMethod) to add your own validation method based on the file size, which will be sent the value of $_FILES['editimg']['tmp_name']

Categories : PHP

MySQL File Download Speed Limit
it is in the very last echo line in your code where you would like to implement throtling. Im not familiar with whether php supports throtling output. if not, you can try to split up that content ($DataObj->file_data) you wish to echo, and echo it little piece by little piece with small pauses in between and be sure to disable outbut buffering. otherwise all that you echo will not be outputted until the entire script is done.

Categories : PHP

How does the file descriptor limit the connection in stream3.c
That means every server-push script uses 2 file descriptors. No. See the comet.c example for a server-push script that does not use additional file descriptors. The stream3.c script acts as a client (to call a backend server or system pipe) in addition to generating contents for a remove client. There's no way to do that without a new file descriptor. What if there are 100,000 active and long lasting running scripts as above? G-WAN would allocate the necessary resources. Would it run out all file descriptor? No. How many stystem resouces are held for keeping the connections active? Establish 10 connections and see how much resources have been allocated. Divide this number by 10 to find the overhead by connection.

Categories : Misc



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