w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to let batch script browse through folders?
Try something like this: @echo off setlocal set DRIVES=C D E F G H I J K L M N O P Q R S T U V W X Y Z (for %%d in (%DRIVES%) do ( if exist "%%d:" ( pushd "%%d:" for /r %%f in (*.BLA) do ( findstr /m "BLABLABLA" "%%~f" && ( BLABLABLA ) ) popd ) )) > bla.bla A somewhat more elegant approach would enumerate the local drives via WMI: @echo off setlocal (for /f %%d in ( 'wmic logicaldisk where drivetype^=3 get caption ^| find ":"' ) do ( pushd "%%d" for /r %%f in (*.BLA) do ( findstr /m "BLABLABLA" "%%~f" && ( BLABLABLA ) ) popd )) > bla.bla

Categories : Batch File

Renaming folders with VBScript
Use absolute paths (C:images715). It would look like this: Set FS = CreateObject("Scripting.FileSystemObject") FS.MoveFolder "C:images715", "C:imagesV14" If you are using a -nix system then keep in mind that the first / is the root directory - ensure you do indeed have an images folder in the root directory path. Also note that in order to rename the folder there cannot be trailing 's after the folder names and the script must be run on the local machine. If you keep getting path errors, you're passing it incorrectly somehow. Build in some error checking to see what is going wrong: Dim tmpPath = "ifpimages715" Dim newPath = "ifpimagesV14" If FS.FolderExists(sCurPath & tmpPath) Then Response.Write("The folder exists.") FS.MoveFolder sCurPath & tmpPath, sCurPath &

Categories : Vbscript

WiX - Renaming files/folders in next versions of setup
It sounds like you're doing a major upgrade with a late scheduling of RemoveExistingProducts. When you do that, you have to strictly follow the component rules. My blog post on upgrades covers ways of avoiding that, such as by using an early scheduling of RemoveExistingProducts.

Categories : Wix

Batch Renaming Folders in AppleScript, Will Only Change Names of Every Other Folder
Jart, the main issue was with the second loop, you need to be looping through every folder of the x folder variable instead. It appears that looping through the folder worked, but when you renamed them it caused an index issue resulting in only reading every 2nd folder. Here is a little reworking. renamed your variables from y and x to be less cryptic. changed the length test to support names > 9. i was unsure about the item at the end of the new name, and if it should be an incremented number instead. (you can easily revert) left in some log calls for your reference, these can help debug stuff tell application "Finder" -- Defining Pro Folders set pro_folder to folder POSIX file "/Users/Jart/Desktop/test" set all_pro_folders to every folder of pro_folder -- Iter

Categories : Osx

Browse button without file upload in html
This just isn't possible because of security issues that would be exposed by this functionality, i.e. being able to log the user's file directories. When a user browses for a file, the dialog is created by the browser and none of this information is relayed back, only the contents of the selected file. The only solution I can think of without hitting up ActiveX or similar is to force the user to select a file from within their chosen directory and upload it. This has obvious drawbacks in that they may not want their files to be uploaded and also that they may not have any files within their desired folder. However, assuming that a) they have a file and b) that they don't care about how you deal with that file you can: <form name="folderForm"> <input type=file name="file">

Categories : HTML

HTML5 - Browse for html file, and add code into textarea
Basically just use FileReader to read the file from a file input and place the result in a text area. <input type="file" onchange="loadfile(this)"> <textarea id="text"></textarea> function loadfile(input){ var reader = new FileReader(); reader.onload = function(e){ document.getElementById('text').value = e.target.result; } reader.readAsText(input.files[0]); } http://jsfiddle.net/8zVWk/

Categories : HTML

How can I implement renaming an option in an HTML select?
You can loop over the options: for(var i = 0, l = select.options.length; i < l; i++) { var option = select.options[i]; var obj = {}; if(option.value == "...") { option.innerHTML = "..."; obj[option.value] = option.innerHTML; } } return obj; I would put that in a function and pass a value you search and the replacement, or a map. Something like: setOptionText(select, 'value', 'text'); // or setOptionText(select, {'value': 'text', 'value': 'text', ...}); Reference: HTMLSelectElement

Categories : Javascript

turn off auto-renaming of html elements' id in visual studio 2012
Go into Tools -> Options Scroll down to Text Editor. Expand it, then select HTML and expand it. Then click Miscellaneous and you should see the following. Deselect the first option and try it.

Categories : HTML

Can browse using IP address but cannot browse using URL
It sounds like you need to enable ASP.NET in IIS. On your web server, open up IIS Manager, in the left-hand pane select your web server, in the content pane, in the group labeled "IIS", find the the tile labled "ISAPI and CGI Restrictions". Double-click on that to open it. You should see a list of ISAPI and CGI extensions. Ensure that ASP.NET is set to "Allowed".

Categories : HTML

.htaccess - hide both "/index.html" and "/index" in root and directories
Check it here i think, its your problem. Also you can check this

Categories : Apache

.htaccess way to serve index.html/index.php based on timestamp
I would set up a Cron Job that runs every hour no matter if a visitor has hit your site or not. http://www.thesitewizard.com/general/set-cron-job.shtml 0 * * * * wget -O - -q http://www.website.com/cron.php

Categories : PHP

CakePHP and AngularJs in routing harmony: htaccess rules to send user to index.html or bootstrap index.php
Keep it simple One of Cake's main principles is KISS ("Keep it Simple (Stupid)"). You don't need any rewrite rule changes if the response for the url / is that of your index.html file i.e. do the equivalent of this: cd app mv webroot/index.html View/Pages/home.ctp <edit View/Pages/home.ctp> If you put the following at the top of the view file: <?php $this->layout = false; ?> You can also leave the contents as the complete raw html file. Doing this would remove the need for any .htaccess modifications. A specific note about one of the bullet points: If the user goes to domain.com/#/home, display index.html and let Angular take care of the hash route Nothing needs doing for that, as a url fragment is not sent by browsers with requests - the url received on the

Categories : Htaccess

priority to index.html for index.php in .htaccess
If you define via DirectoryIndex that the server should deliver index.html if it is there, and you access the url /?page_id=16, then index.html with that parameter is delivered. And the parameter does nothing - it's static HTML. You cannot use BOTH index.html and index.php as DirectoryIndex for / and expect it to work. Add code to index.php that returns the content of index.html if no parameter is given. readfile('index.html'); exit(); might be enough. Only use index.php as DirectoryIndex.

Categories : PHP

return to index.html from images.html by using phone back button in phonegap android
Try putting $.mobile.phonegapNavigationEnabled = true in your mobileinit handler per http://jquerymobile.com/demos/1.2.0/docs/pages/phonegap.html instructions.

Categories : Javascript

Rails - three renders as HTML, as */* and as HTML on one query to root#index
No, this doesn't look normal. Probably something wrong in your server setup so requests to some assets or favicons or anything else end up routing to WelcomeController#index. It is quite hard to guess why this happens. So you should provide http requests recorded in your browser dev console (network tab), front-end server config (if you use one) and config/routes.rb file.

Categories : Ruby On Rails

ActiveRecord::StatementInvalid in Pins#index Showing /app/app/views/pins/index.html.erb where line #4 raised:
The error PG::UndefinedTable: ERROR: relation "pins" does not exist, means that the table is missing. You have to migrate the database on Heroku After you push to Heroku, you can do heroku run rake db:migrate

Categories : Ruby On Rails

Batch: Create a list of folders and then copy multiple files/folders into all of them
Try this: @echo off &setlocal cd /d "RootFolder=X:folder omy data" for /d %%a in (*) do xcopy "_TEMPLATE" "%%~fa" /sihrky For xcopy options see xcopy /?, to test the command without writing add option /l.

Categories : List

How to stop threads of following type in Java used for watching folders for files using WatchService for folders by using jToggleButton
There is a Thread.stop() method, but is has been deprecated, because it's unsafe. Instead of using the deprecated method(s), you can modify some variable to indicate that the target thread should stop running.

Categories : Java

MATLAB: Opening and Editing Files nested in folders in folders
Check out subdir! On the file exchange, its an awesome function that can return all folders and all files in expansive subfolders, and you can filter file names by extension and whatnot. http://www.mathworks.com/matlabcentral/fileexchange/15859-subdir-a-recursive-file-search

Categories : Matlab

JQuery File Upload and Carrierwave to Detect Folders and Sub Folders
I don't think this is possible. See here: http://www.codeproject.com/Questions/573788/HoeplustoplusGetplustheplusOriginalplusfilepluspat It appears that you can't know the context of the uploaded file on the source operating system. Therefore you can't create it's original parent folder structure on your system.

Categories : Jquery

Batch file creating folders in all folders of current directory
Total rewrite of answer. This will make a "Outlook Archive" folder in only the DataMy Documents subfolders of wherever the batch file resides. for /f "delims=" %%i in ('dir /ad/s/b') do if EXIST "%%iDataMy Documents" MKDIR "%%iDataMy DocumentsOutlook Archive" pause Credit to here

Categories : Windows

Display new.html.erb as a partial in index.html.erb
You can't render part of the template, only whole templete. If you have a part that same for several templates, than put it to the partial and render partial as part of the template. This is very simple example: _partial.rb: <%= form_for ... %> ... <% end %> new.html.erb: render 'partial' index.html.erb: render 'partial' More about partials and rendering you can read in rails guides.

Categories : Ruby On Rails

Delete all folders except 2 lastest folders in Windows
for /f "skip=2 delims=" %G in ('dir /B /ad-h /o-d') DO echo going to delete %G For /f to process lines of "output" from single-quoted DIR... Delims= is better. tokens=* will work here, but suppresses leading spaces. /b to suppress header output from dir /o-d for REVERSE-date order. You want to KEEP the two skipped dirs, which occur FIRS in a reverse-date sort. ...good echo safety measure.

Categories : Windows

"Webpage not found" "file:///android_asset/html-nl/index.html not found" error on android device
Solution: I found that ZXing auto-loads HelpActivity when a new version of the app is installed. In that activity, there's the redirect to html-userlanguage. Easy to fix: just tell the script (it's in com.google.zxing.client.android) not to load the HelpActivity.

Categories : Android

Can index.html be used as home page and index.php as internal page?
Splash pages are generally an antipattern, but the better way to implement it would be to put the splash content in the same page as your index.php and then map index.php to the default page for the root domain resource (http://yourdomain.com/). This also decouples php from your page URIs (URIs should not indicate backend technology). You can use a number of javascript lightbox or modal dialog packages to get this effect for the first login and then avoid showing it later on. Showing a splash page is an anti-pattern for usability since when people are visiting your site they generally want to do something or get something, not see a pretty splash page. I have never gone to a website and been happy that they wasted my time with a big useless splash page.

Categories : PHP

How to add a php file in index.html
You can not include php file in html file, but you can load php data to your html page by using $.ajax() like, $(function(){ $.ajax({ type: "POST", url: 'page.php', success: function(data){ $(data).appendTo('body');// data is html } }); });

Categories : PHP

Serving index.py on GAE without HTML?
The problem is the "input" function... It doesn't quite make sense in a web setting, as the HTTP protocol doesn't have a mechanism for prompting for user input while it is delivering a page. Here are a couple of things to try: Read through the Python appengine example and try to see how that might be applicable You could develop a page that has a HTML form that requests the input. When the user presses the form's "ok" button, it would make another request to the server, which would provide the result.

Categories : Python

How do I anchor my html index?
Unless you have an anchor in the URL like www.yourdomain.com/#middleofpage, you will need to do this in javascript: Check out the scrollTo function. <script type="text/javascript"> window.scrollTo( x-coord, y-coord ) </script> If you want 50% down the page, you could calculate like: <script type="text/javascript"> var pageSize = (document.body.scrollHeight - document.body.clientHeight); window.scrollTo(0,Math.ceil(pageSize/2); </script>

Categories : HTML

Is it possible to apply Z-index using HTML?
The short answer is NO, it is not possible to do that with HTML only unless and until you are willing to change the order of your markup, else as far as the CSS goes, you can use z-index inline for that particular element. So for example <div style="z-index: /* Whatever */"></div>

Categories : HTML

Redirect index.html to root
You could do this I believe: RewriteCond %{THE_REQUEST} /index.html? [NC] RewriteRule ^(.*/)?index.html?$ /$1 [R=301,L] You should also learn to google these things because this is quite common question.

Categories : Htaccess

Is there a way in PHP to get the index of a currently selected HTML
<form method="post"> <select name="iface" id="iface"> <option>vlan10</option> <option>br0</option> <option>br1</option> <option>eth3</option> </select> <input type="submit" value="Print selected option"/> </form> <?php if (isset($_POST['iface'])) { echo $_POST['iface']; } ?>

Categories : PHP

How to combine 2 index.html,both of different directories
I guess it is some kind of home page or dashboard for your app. For such cases I typically create a separate controller not to mess in my other RESTful ones. To render two other views you may do <%= render template: "generators/index" %> <%= render template: "results/index" %> Just remember to set all required variables (probably @generators & @results) in controller action

Categories : Ruby On Rails

index.html.erb not displaying content
You have not defined @question variable anywhere in controller and you are using it in view, so it will be blank and display blank. Try this code in questions_controller.rb class QuestionsController < ApplicationController before_action :set_question, only: [:show, :edit, :update, :destroy] def index @comment = Comment.find params[:comment_id] @questions = @comment.questions end ... end And use @questions variable in view.

Categories : Ruby On Rails

How to get the column index of particular value of td in HTML tables
I suggest using jQuery index for this: var trCollection = $('table tr'); $('table td').each(function () { console.log(trCollection.index($(this).parent())); });

Categories : HTML

Add css template in other than index.html(masterpage) in asp.net
if you link same master page to another blank page say - Default.aspx then it will automatically use css apply in master page read master page related tutorial here http://www.asp.net/web-forms/tutorials/master-pages

Categories : Asp Net

Index HTML in solr using ajax
You need to insert the value of the variable, not the text. See edit below. function signupcall() { var variable=document.getElementById('newemail').value; $.ajax({ type : "POST", url : "http://localhost:8080/solr/User/update?commit=true", data : "{ "add": { "doc": { "emailaddr": "" + variable + ""}} }", contentType: "application/json", dataType : "jsonp" }); }

Categories : Jquery

How to get the right html colored index of array
You need a more reliable method of extracting the number than intval(). Intval() will just convert anything that is not an obvious number to "0". I would suggest you try with preg_match() for example. Try experementing with this: preg_match('|>([0-9]+)<|', $index2, $matches); print_r($matches); Or a simpler solution would be: echo strip_tags($index2);

Categories : PHP

Amazon S3 downloads index.html instead of serving
Running curl -I against the url you posted gives the following result: curl -I http://speakeasylinguistics.com.s3-website-us-east-1.amazonaws.com/ HTTP/1.1 200 OK x-amz-id-2: DmfUpbglWQ/evhF3pTiXYf6c+gIE8j0F6mw7VmATOpfc29V5tb5YTeojC68jE7Rd x-amz-request-id: E233603809AF9956 Date: Sun, 18 Aug 2013 07:58:55 GMT Content-Disposition: attachment Last-Modified: Sun, 18 Aug 2013 07:05:20 GMT ETag: "eacded76ceb4831aaeae2805c892fa1c" Content-Type: text/html Content-Length: 2585 Server: AmazonS3 This line is the culprit: Content-Disposition: attachment If you are using the AWS console, I believe this can be changed by selecting the file in S3 and modifying its meta data by removing this property.

Categories : Amazon

What HTTP header indicates when Index.html has been served?
Can you just try to change this: <link rel="stylesheet" href="mycss.css" /> to this: <link rel="stylesheet" href="/myFolder/mycss.css" /> ?

Categories : Http

jquery color pick on index.html
Add an element which will hold your ColorPicker: <input type="text" id="colorPicker"> Initialize the ColorPicker on that element: $("#colorPicker").ColorPicker({ ... You should also use ready to make sure that your element is loaded when executing the js: $(document).ready(function() { //Your code }); And if you have multiple color pickers on your page, you'll have to use classes instead of the id.

Categories : Jquery



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