w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Why images folder is not copied when generating an Octopress with jekyll-assets blog?
Have you rewritten your source to use Jekyll-Assets to render image paths? In my experience, Jekyll-Assets needs to know you'll be using an asset before it will copy it to the output directory. It will know when you use a corresponding Liquid tag or filter. According to the Jekyll-Assets readme, URLs for assets that are neither scripts nor stylesheets may be included with the following Liquid tag: {% asset_path logo.png %} Additionally, the following Liquid filter is available: {{ 'logo.png' | asset_path }}: Returns resulting URL for logo.png Both examples come from the URL above. So in this case the following two lines would be equivalent: <img src="{% asset_path logo.png %}" alt="Logo"> <img src="{{ 'logo.png' | asset_path }}" alt="Logo"> If you are indeed alread

Categories : Misc

Images of nivo slider distorted
Well...First of all, instead of using visibility: hidden;, which only hides the object but it physically remains there. Try using display: none;. That should fix the problem with the infinite space created below the footer.

Categories : HTML

java android - why images are distorted?
Check this method, it gets the Bitmap object of the image file and then sets is on the imageView: File ifile = new File(“PATH/anyPngYouWant.png”); if(ifile.exists()){ Bitmap bmp = BitmapFactory.decodeFile(ifile.getAbsolutePath()); ImageView iv = (ImageView) findViewById(R.id.imageView1); iv.setImageBitmap(bmp); }

Categories : Java

Add an EXE file to a project, so that it will be copied to the Bin/Debug folder just like a DLL?
You could add the executable as item to your C# project and in its properties set its Copy to Output Directory property to Copy always. This way the executable will be copied to the output folder (binDebug or binRelease) everytime you compile your project.

Categories : C#

dll.config not copied to temporary asp.net files folder
I solved this by using the following code: // The dllPath can't just use Assembly.GetExecutingAssembly().Location as ASP.NET doesn't copy the config to shadow copy path var dllPath = new Uri(Assembly.GetExecutingAssembly().GetName().CodeBase).LocalPath; var dllConfig = ConfigurationManager.OpenExeConfiguration(dllPath); // Get the appSettings section var appSettings = (AppSettingsSection) dllConfig.GetSection("appSettings"); return appSettings.Settings; The key there is: new Uri(Assembly.GetExecutingAssembly().GetName().CodeBase).LocalPath I came up with that solution after reading Zhaph - Ben Duguid's answer here: http://stackoverflow.com/a/2434339/103778. Now I'm able to pick up my DLL's configuration file that is in the bin directory of my web app. I have since written up a blo

Categories : Asp Net

Save file uploaded by user to wordpress uploads folder
user insert_attachment of wordpress to save attachment, then you will also have the functionality to get the images with different styles, get_attachment(id, 'full/medium/thumbnail'). $files = $_FILES['upload_attachment']; foreach ($_FILES as $file => $array) { $newupload = insert_attachment($file,null); // save the $newupload with you from data, as psot id for the attachment } function insert_attachment($file_handler,$post_id,$setthumb='false') { // check to make sure its a successful upload if ($_FILES[$file_handler]['error'] !== UPLOAD_ERR_OK) __return_false(); require_once(ABSPATH . "wp-admin" . '/includes/image.php'); require_once(ABSPATH . "wp-admin" . '/includes/file.php'); require_once(ABSPATH . "wp-admin" . '/includes/media.php'); $atta

Categories : PHP

Linked project references aren't being copied to target folder
For C++ projects, the Visual Studio template/wizard sets the Output Directory to a subfolder of the solution: $(SolutionDir)$(Configuration). This is so the DLL Search Path works well for the developer. It even works if you have added projects to the solution from outside the solution folder hierarchy; The build will put all binaries into the output folder for that solution. If this isn't working, check the Output Directory property on all platform/configuration combinations of all your projects. Also make sure that the Build Configuration Manager shows that your selected solution build is building all the projects appropriate for the solution platform/configuration. The Copy Local in Project References that you are trying applies only to referenced .NET assemblies. The docs are ambigu

Categories : Visual Studio 2010

Copied my asp.net project folder to open it in my laptop, and css stoped working
I think one common mistake is having mismatching paths when you copy from one machine to another (at least in my workarea it is!) did you double check the paths to your CSS in code and filesystem? if the ASP.Net engine cant find the files it wont be able to use them.

Categories : Asp Net

Efficient compression of folder with same file copied multiple times
No, there is no such API exposed by well-known ones (such as GZip, PPMd, Zip, LZMA). They all operate per file (or stream of bytes to be more specific). You could catenate all the files, ie using a tar-ball format and then use compression algorithm. Or, it's trivial to implement your own check: compute hash for a file and store it in the a hash-filename dictionary. If hash matches for next file you can decide what you want to do, such as ignore this file completely, or perhaps note its name and save it in another file to mark duplicates.

Categories : C#

What's the quickest way from a hook script to determine if a Subversion folder has been copied from somewhere else?
use file:// URLS which are quite faster use a first svn log <FILEURL> -q --stop-on-copy get the revision from last entry use a svn log <FILEURL> -v --limit 1 and examine the copyfrom path

Categories : Svn

Pulling Random Images From A Folder Above The public_html Folder
Why not use an absolute path instead of: header('Content-Type: image/jpeg'); readfile('home/folder/my image.jpg'); like this: // notice the absolute path prefix if(!is_file($image_path = '/home/folder/my image.jpg')){ header('Content-Type: text/plain', 404); echo 'Image file not found!'; } // We got a file, keep going... header('Content-Type: image/jpeg'); header('Content-Length: '.filesize($image_path)); readfile($image_path); die; // done here Or use the path relative to current directory of .php script with __DIR__.'/path/to/image.jpg'.

Categories : PHP

Unlink images in images folder on webserver that are not present in csv file field column
Description First put all the images you want removed into regex as a | delimited list. Then use the regex to replace on the string. Regex: ,?(?:WG06HGY2.JPG|WG06HGY4.JPG|HELP1.JPG|HELP4.JPG)(?=[ ,]|) Replace with: nothing Example Sample Text FULL REG WG06HGY1.JPG,WG06HGY2.JPG,WG06HGY3.JPG,WG06HGY4.JPG WXT55331.JPG,WXT553312.JPG,WXT553313.JPG,WXT553314.JPG,HELP1.JPG,HELP2.JPG,HELP3.JPG,HELP4.JPG Code <?php $sourcestring="your source string"; echo preg_replace('/,?(?:WG06HGY2.JPG|WG06HGY4.JPG|HELP1.JPG|HELP4.JPG)(?=[ ,]|)/imsx','',$sourcestring); ?> After Replacement FULL REG WG06HGY1.JPG,WG06HGY3.JPG WXT55331.JPG,WXT553312.JPG,WXT553313.JPG,WXT553314.JPG,HELP2.JPG,HELP3.JPG

Categories : PHP

Loading all images from folder & make named Images from them
Find the 'real path' to that directory on the server. Use it to establish a File object. Create a FilenameFilter for PNG. Use File.listFiles(FilenameFilter) on that source directory. That will return a File[] containing references to the PNG files. That is assuming the images are on the class-path, as loose File resources. If they are in a Jar, we must iterate the ZipEntry objects of the Jar to dynamically discover what it contains.

Categories : Java

How to add a file thats copied from one directory to a folder in another directory thats incremented
I would recommend using time stamps rather than sequential numbering. Also here is everything in one command and it is user independent. @xcopy "%LocalAppData%GoogleChromeUser DataDefaultookmarks*" "%UserProfile%DesktopBackup of Bookmarks\%Date:~10,4%-%Date:~4,2%-%Date:~7,2%" /I /Y This will copy both the bookmarks and bookmarks.bak file to a time-stamped folder inside the Backup of Bookmarks folder.

Categories : Batch File

How to download images from the URL to images folder-Grails
You should not download anything into web application inner folder, because when you redeploy the application the files inside will be lost. Instead, you have to create a folder on your hard-drive and make it accessible (permissions) to the application server. After that follow this answer to save the file How to create file in current system from within grails controller action and save data fetched from database? . Note, you're dealing with binary file format!

Categories : Image

how to show images from ftp folder with folder names and images names in asp.net c#
Here is what you want You can use Jquery tree view with Asp.net http://www.programmingsolution.net/useful-js/jquery-treeview.php For jquery try this http://jquery.bassistance.de/treeview/demo/

Categories : Asp Net

c# load images from folder
It's because you return the image path.. You probably want the ArrayList you're making. change: return imPath; to: return arrayList; and change: public string GetImage() to: public ArrayList GetImage() I also reccomend renaming that arraylist, and try to do a little more research before asking questions. If you understood what return is, you would've know what the problem is. And as you can read in the comments of your question, you shouldn't be using ArrayList. I'm no expert on C# so that will have to be answered by someone else.

Categories : C#

Gallery having images of a particular url folder
it is clearly written that you are doing network operation on main thread which is not allowed. You can consider using async or can create your own runnables to run in background. You can use Universal Loader 08-29 10:43:21.756: E/AndroidRuntime(1991): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.Bardo/com.example.Bardo.Galeries}: android.os.NetworkOnMainThreadException

Categories : Multithreading

How to access many images from folder
You can get list of images in directory and then process them. #include <vector> #include <stdio.h> #include <windows.h> #include <iostream> #include <string> using namespace std; //---------------------------------------------------------------------- // Get list of files // Usage: // string ImagesDir=tmp+"C:\Images\*.jpg"; // vector<string> files=listFilesInDirectory(ImagesDir); //---------------------------------------------------------------------- vector<string> listFilesInDirectory(string directoryName) { WIN32_FIND_DATA FindFileData; HANDLE hFind = FindFirstFile(directoryName.c_str(), &FindFileData); vect

Categories : Visual C++

Get all images from a folder in my project/solution
If it is in a compiled section of code you should be able to just hit the root and then come back up to the directory e.g. /Resources/Images/HelpIcons/ If you are accessing the images from a front end file e.g .aspx try ~/Resources/Images/HelpIcons

Categories : C#

Drupal upload images folder
You definitely can do this with Drupal. Install the FileField Paths module. Node tokens, for example, the node creation time will be available to use as a token.

Categories : Image

Fetching particular count of images from folder
You can maintain a global list of all files names of all pictures present (say in session variable) and in a page when you are going to add an image to a picture box, remove it from the global list, so in this way in the other pages it won't get repeated. Something like this Session["filenames"] = GetFilesToShow();

Categories : C#

store folder contents (images) to var
To do this on the client only you will need a trick or a hardcoded value So var images = []; // you tell the script how many and they all have numbers from 0 to here 87 for (var i=0; i<87; i++) { images.push(i+".jpg"); } If you do NOT know how many you have, you need to preload them var images = [],done=false,i=0; while (!done) { var image = new Image(); image.onerror=function() { done=true; } image.onload=function() { images.push(this.src); } image.src=i+".jpg"; i++; } and if they all have different names, then you need a server script that will build the array for you.

Categories : Javascript

preloading images from specific folder
Brifly: jQuery use Ajax to call PHP script which get filenames from that folder. Or PHP generate page (HTML) at once with embed javascript which has array of filenames. In both situation PHP can test file date and time to sort filenames in array.

Categories : Jquery

How do i Load images from a folder into flash AS3?
Not sure if this is what you are asking for, but if you want to embed the images at compile time, you can do this : [Embed(source="img/lamp.png")] private var Lamp:Class; And then to create an instance : var lamp:Bitmap = new Lamp(); As noted in the comments, this requires compiling with the flex compiler. If you are using flash pro, you can create library symbols for each image, and then set linkage so they are included at compile time. Still not sure if this is what you are looking to do.

Categories : Actionscript

Include folder with images c# project
You could always embed the images as resources into your executable. There are a number of different options detailed in this post: Load image from resources in C#. If you are referencing files by their path on disk, you will always need to copy the folders and files to wherever your code is being deployed.

Categories : C#

Delete folder from gallery but images are still there
I solved the problem by using this instead of the other sendBroadcast sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES),"Dir"))));

Categories : Android

MATLAB Reading several images from folder
Since you know the names of the files in advance, you can skip the dir and go ahead and read the files: for l = 'ABC' for n=1:10 nm = sprintf('C%d%c_Base.jpg', n, l ); fnm = sprintf('%c%d', l, n ); imgs.(fnm) = imread( fullfile('images','BasePics', nm ) ); end end Now you have a struct imgs with fields A1...C10 for each image.

Categories : Matlab

How can I link a combobox to a folder of images?
You can pass reference of combo Box to function <input type="file" id="img" multiple><br> <input type="submit" onclick="loadfiles(this)"> function loadfiles(obj) { var selectedOption = obj.val(); }

Categories : Javascript

Deleting images from folder by gridview
If gridview row will be in edit mode, then only you can find the control that are inside <EditItemTemplate> tag. in editmode, you will get rowindex as -1. in other mode, rowindex will be greater than -1, then you can find controls that are inside <ItemTemplate> tag. Otherwise you will get null values. So, you can try this way, protected void gvStory_RowDeleting(object sender, GridViewDeleteEventArgs e) { GridView gvQuestion = (GridView)sender; int row = e.RowIndex; string fileName =""; if(row==-1) { string imageName = (TextBox)gvStory.Rows[row].Cells[0].FindControl("TextBox1"); fileName = Path.Combine(Server.MapPath(@"Story/Food Fit For A King"),imageName); } else { Image img = (Image)gvStory.Rows[row].Cells[0].FindControl(

Categories : C#

How to access subdir within images folder (getting 404)?
You are halfway there with the mvc-dispatcher-servlet line you added, but you need to change it to: <mvc:resources mapping="/images/**" location="/content/images/" /> Also try changing the method in your controller where you are attempting to access the images to something like: @RequestMapping(value = "/staticImages", method = RequestMethod.GET) public String showImage() { return "/images/subdir/mysubdirimage.png"; } And finally, with the example above try the URL (as you were doing above): http://localhost:8080/mywebapp/images/subdir/mysubdirimage.jpg You should also be able to access the images through the @RequestMapping pattern defined in your controller. For example, using the example I gave you above, you would enter the URL: http://localhost:8080/my

Categories : Spring

Combining all the images in folder into a video
You can use the FFMpeg command line interface. You invoke it from the shell. Download the binary and run it by pointing it at the desired directory. %05d is simply string formatting for numbers. %05d just says pad with 4 leading zeros 0001.jpg or whatever. # Create a directory and copy the original images there for manipulation: mkdir temp cp *.JPG temp/. # Resize the images: mogrify -resize 200x200 temp/*.JPG # Create the morph images convert temp/*.JPG -delay 10 -morph 5 temp/%05d.jpg # Stitch them together into a video ffmpeg -r 50 -qscale 2 -i temp/%05d.jpg output.mp4 from http://www.itforeveryone.co.uk/image-to-video.html

Categories : Linux

Django can't see images in /media/ folder
Putting images in your static folder will work, as the files in the static folder are served on the site. This is a potential solution and this discussion seems to suggest it's reasonable for some images. On my site the images in the media folder are located at /uploads/<name of the image>. This is what MEDIA_URL is set to. However I never explicitly call MEDIA_URL as all my images are tied into models so django handles that for me. My guess would be double check the name of the folder you're storing the images in and make sure you're looking at the right place. Second I would make sure that {{MEDIA_URL}} isn't undefined in the template.

Categories : Python

HorizontalScrollView Getting Images from /drawable folder
Which one should I use in order to reach /drawable folder inside this way? None of them. Those are all for files on the filesystem. Drawable resources are not files on the filesystem. Use getResources().getDrawable() to retrieve a Drawable given its ID (e.g., R.drawable.foo).

Categories : Android

how to replace images in image folder in vb
MSDN said The file remains locked until the Image is disposed Set nothing to your pictbox first before rename your pic file PictureBox1.Image = nothing If you still want rename picture that shown in the picture box, you may do this My.Computer.FileSystem.CopyFile("C:1.jpg","C:Temp.jpg") '--> your pict shown always named temp.jpg PictureBox1.Image = Image.FromFile("C:Temp.jpg") My.Computer.FileSystem.RenameFile("C:1.jpg", "C:whatever.jpg")

Categories : Vb.Net

images are not loading inside WEB-INF folder?
Your own text answers the question: you're using the wrong file path: $('#theform #formProgress').html('<img src="/public/images/ajax-loader.gif" /> Saving&hellip;'); If the image is in /public/images, why try loading it from /images?

Categories : Java

Add a BitmapImage to Project Images Folder in C#
You need to copy the image to the folder Shared/ShellContent/ in the Isolated Storage of your app. From there you can reference to it via an Uri with the "isostore:/" scheme that you give it to the primary tile. For example: tile.BackBackgroundImage = new Uri("isostore:/Shared/ShellContent/" + myCoolImageThatIWantToShow, UriKind.Absolute);

Categories : C#

Pull images from web or store them in a folder?
If targeted application is using Internet, go for fetching the images from web, it would make the application light-weight. But, if your application is not using internet, and is locally executed, go for a local database, and keep sizes as low as possible. Also, to fetch from internet, you can do it in a efficient way, by not downloading the image and displaying it. Alternatively, you can directly show image from web without downloading it. Please check the below function . It will show the images from the web into your image view. public static Drawable LoadImageFromWebOperations(String url) { try { InputStream is = (InputStream) new URL(url).getContent(); Drawable d = Drawable.createFromStream(is, "src name"); return d; } catch (Exception e) { r

Categories : Android

Display images from local folder to datalist using Asp.net
Please try with the below code snippet. <ItemTemplate> <asp:Image Width="100" ID="Image1" ImageUrl='<%# String.Format("{1}\{0}", Eval("Name"), Eval("Directory")) %>' runat="server" /> <br /> <asp:Label id="lblImageSrc" runat="server" Text='<%# String.Format("{1}\{0}", Eval("Name"), Eval("Directory")) %>'></asp:Label> </ItemTemplate>

Categories : C#

How to make all images of same size and write them in a folder
Here is an example for how to resize an image: Mat img = imread("C:\foo.bmp"); Mat img_resize; resize(img, img_resize, Size(144, 33)); EDIT: Supposed that you have several images named as image001.jpg, image002.jpg, image003.jpg, image004.jpg, image005.jpg..., and want to save them after resizing. Hopes the following code works it out. #include <cv.h> #include <highgui.h> using namespace cv; char pathLoading[255]; char pathSaving[255]; char num[10]; char jpg[10] = ".jpg"; int counter = 1; int main(int argc, char** argv) { while (1) { if (counter < 6) { // To load 5 images strcpy(pathLoading, "c:\image"); sprintf(num, "%03i", counter); strcat(pathLoading, num); strcat(pathLoading, jpg);

Categories : C++



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