Search Results

Search found 1071 results on 43 pages for 'jpeg'.

Page 13/43 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Batch file search and replace using wildcards?

    - by user329358
    Batch file search and replace using wildcards I have a html (txt) file I am using as a template or sourcefile to create further html files.  Filename = pg_0001.htm and it contains a line of code thus: pg_0001.jpg I want to parse the pg_0001.htm sourcefile, increment and replace the jpeg string, like this:  "pg_0002.jpg", and then output the edited htm file to a new filename pg_0002.htm I then take each newly created file (pg_0002.htm, pg_0003.htm etc) as the sourcefile and repeat the processing until I have reached my target goal (let's say 100 newly created htm files containing code to display the corresponding jpeg. It must be done this way (fileX.htm containing fileX.jpg) because there is other javascript that uses these incremented filenames as function input. I used to know how to write incrementing batch files many years ago but I'm old & very rusty now.  Can anyone please help me do this?  Many thanks in advance. regards Harry

    Read the article

  • camera captured image default rotating with 90 degree angle.

    - by kamiomar
    Dear, currently i am using android Api 4. my camera initializing code is follow: public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { // Now that the size is known, set up the camera parameters and begin // the preview. Parameters parameters = camera.getParameters(); parameters.set("jpeg-quality", 100); parameters.set("orientation", "portrait"); parameters.set("picture-size", "320X430"); parameters.set("rotation", 0); parameters.setPictureFormat(PixelFormat.JPEG); camera.setParameters(parameters); camera.startPreview(); } i set the orientation portrait, camera preview working appropriately. but when i captured the image ,its rotating the image with 90 degree.In the landscape orientation its working perfectly. so how i can capture normal image using portrait orientation. thanks.

    Read the article

  • Gluing tiles together using imagemagick's montage command

    - by AP257
    This seems like it might be a reasonably common question, so I'm going to ask it using as many keywords as I can think of! I have a bunch of (well, nine) tile jpegs, with standard tile filenames. Each jpeg is 220x175 pixels: (top row) tile_1_0_0.jpg tile_1_1_0.jpg tile_1_2_0.jpg (middle row) tile_1_0_1.jpg tile_1_1_1.jpg tile_1_2_1.jpg (bottom row) tile_1_0_2.jpg tile_1_1_2.jpg tile_1_2_2.jpg How can I use imagemagick/montage to 'glue' or join them all together to make a single, coherent image? I don't want to resize them at all, so I guess the final image should be 660x525. That would be montage with no framing, shadowing, bordering, etc - just the nine original images, glued together to make a single jpeg. I know it should be something along these lines, but I'm struggling with getting the order and sizing right: montage +frame +shadow +label -tile 3x3 -geometry <options> *.jpg joined.jpg

    Read the article

  • Illegal offset type

    - by BFTrick
    Hello, I am having trouble uploading a file through php. I check the file type at the beginning of the process and I get an error. This is the error I am getting: Warning: Illegal offset type in /balblabla/DBfunctions.inc.php on line 183 This is the printed out $_FILES var Array ( [Picture] = Array ( [name] = JPG.jpg [type] = image/jpeg [tmp_name] = /tmp/phpHlrNY8 [error] = 0 [size] = 192221 ) ) Here is the segment of code I am using that is giving me issues: function checkFile($file, $type) { if( in_array($_FILES[$file]['type'], $type) ){ // <--- LINE 183 return true; }//if return false; } // end checkFile() This is the line of code that calls the function if( checkFile( $_FILES['Picture'], array("image/jpeg") ) == true ){ //do stuff }// end if I have used this piece of code on dozens of websites on my own server so i am guessing that this is some different configuration option. How can i modify my code so that it works on this different server?

    Read the article

  • URL Rewrite problem. (Many directory)

    - by marharépa
    Hello! I'd like to make a htaccess file, which can make a good structure for my websites. My .htaccess is now: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|css|js|pl|txt)$ RewriteCond %{REQUEST_URI} !^/admin/* RewriteRule ^(.*)$ index.php?q=$1 [QSA] (based on Sombat's comment) And I want to make this, with it: for every elements but (jpg|jpeg|gif|png|css|js|pl|txt) if domain.xx/admin redirect to the domain.xx/admin directory and don't make a rewrite at all i mean: let me use domain.xx/admin/index.php?asd=1&asdd=2 else rewrite everything as rule one, to index.php. Thanks for the help.

    Read the article

  • How can I use multiple PHP header content types on the same page? is this possible?

    - by Jon
    Is it possible to use multiple header types in one document? For example: header("Content-type: image/jpeg"); header('Content-Type: text/html; charset=utf-8'); returns the whole page as text/html... while header('Content-Type: text/html; charset=utf-8'); header("Content-type: image/jpeg"); Returns the whole page as an image.... How can I use both types of content on the same page? I'm using ob_start() at the top and ob_end_flush() at the beginning.

    Read the article

  • Line by line image swing

    - by user1046017
    I want to show an image as it is downloading, I have the URL, and I am trying to get the image parts like this: InputStream openStream = url.openStream(); DataInputStream dis = new DataInputStream(new BufferedInputStream(openStream)); ByteArrayOutputStream os = new ByteArrayOutputStream(); while ((s = dis.read(b)) != -1) { os.write(b , 0, s); support.firePropertyChange("stream", null, os); } This way, any listener get the stream and creates an image, this way: if("stream".equals(evt.getPropertyName())){ try { ByteArrayOutputStream stream = (ByteArrayOutputStream) evt.getNewValue(); byte[] byteArray = stream.toByteArray(); stream.flush(); Image createImage = Toolkit.getDefaultToolkit().createImage(byteArray); this.getContentPane().add(new JLabel(new ImageIcon(createImage))); } catch (IOException ex) { Logger.getLogger(ImageTest.class.getName()).log(Level.SEVERE, null, ex); } } However, I am getting a "Premature end of JPEG file sun.awt.image.ImageFormatException: JPEG datastream contains no image" error, the image is a JPG image format, is there any library or method known to make something similar?

    Read the article

  • why resubmit after refresh php page

    - by user2719452
    why resubmit after refresh php page? try it, go to: http://qass.im/message-envelope/ and upload any image now try click F5, after refresh page "resubmit" Why? I don't want resubmit after refresh page What is the solution? See this is my form code: <form id="uploadedfile" name="uploadedfile" enctype="multipart/form-data" action="upload.php" method="POST"> <input name="uploadedfile" type="file" /> <input type="submit" value="upload" /> </form> See this is php code upload.php file: <?php $allowedExts = array("gif", "jpeg", "jpg", "png", "zip", "pdf", "docx", "rar", "txt", "doc"); $temp = explode(".", $_FILES["uploadedfile"]["name"]); $extension = end($temp); $newname = $extension.'_'.substr(str_shuffle(str_repeat("0123456789abcdefghijklmnopqrstuvwxyz", 7)), 4, 7); $imglink = 'attachment/attachment_file_'; $uploaded = $imglink .$newname.'.'.$extension; if ((($_FILES["uploadedfile"]["type"] == "image/jpeg") || ($_FILES["uploadedfile"]["type"] == "image/jpeg") || ($_FILES["uploadedfile"]["type"] == "image/jpg") || ($_FILES["uploadedfile"]["type"] == "image/pjpeg") || ($_FILES["uploadedfile"]["type"] == "image/x-png") || ($_FILES["uploadedfile"]["type"] == "image/gif") || ($_FILES["uploadedfile"]["type"] == "image/png") || ($_FILES["uploadedfile"]["type"] == "application/msword") || ($_FILES["uploadedfile"]["type"] == "text/plain") || ($_FILES["uploadedfile"]["type"] == "application/vnd.openxmlformats-officedocument.wordprocessingml.document") || ($_FILES["uploadedfile"]["type"] == "application/pdf") || ($_FILES["uploadedfile"]["type"] == "application/x-rar-compressed") || ($_FILES["uploadedfile"]["type"] == "application/x-zip-compressed") || ($_FILES["uploadedfile"]["type"] == "application/zip") || ($_FILES["uploadedfile"]["type"] == "multipart/x-zip") || ($_FILES["uploadedfile"]["type"] == "application/x-compressed") || ($_FILES["uploadedfile"]["type"] == "application/octet-stream")) && ($_FILES["uploadedfile"]["size"] < 5242880) // Max size is 5MB && in_array($extension, $allowedExts)) { move_uploaded_file($_FILES["uploadedfile"]["tmp_name"], $uploaded ); echo '<a target="_blank" href="'.$uploaded.'">click</a>'; // If has been uploaded file echo '<h3>'.$uploaded.'</h3>'; } if($_FILES["uploadedfile"]["error"] > 0){ echo '<h3>Please choose file to upload it!</h3>'; // If you don't choose file } elseif(!in_array($extension, $allowedExts)){ echo '<h3>This extension is not allowed!</h3>'; // If you choose file not allowed } elseif($_FILES["uploadedfile"]["size"] > 5242880){ echo "Big size!"; // If you choose big file } ?> if you have solution, please edit my php code and paste your solution code! Thanks.

    Read the article

  • How can I rename by CarrierWave file versions?

    - by AKWF
    Upon the uploading of an image in my application, 4 different sizes are created and saved using CarrierWaves version functionality. However, I am converting all of these versions to JPEG. The source file that is uploaded remains unchanged. So I can upload a TIFF file, and CarrierWave will create :large, :medium, :small, and :thumb versions. My problem is that these files all still end in .tif. Yet they are indeed JPEG files, as I've verified this with the file command. How can I write the filenames correctly for each version, and ensure that CarrierWave will report each version's name correctly?

    Read the article

  • MFMailComposeViewController configure mimetype for attachment

    - by user749918
    I need some help. I am trying to attach files to mail using, [mail addAttachmentData:attachmentData mimeType:@"image/png" fileName:fileName]; but the problem is that if i need to send a .jpeg image i need to repeat code just for setting mime type to "mimeType:@"image/jpeg". My question is that is there any general mimeType that can attach any kind of file irrespective of .doc,.ppt,.pdf or an audio or video file. is there any general mimeType: for an kind of attachment. Thanks in advance.

    Read the article

  • Can't store Data URI to database without stripping + characters

    - by citizencane
    I am trying to grab a reference to images with src's in URI scheme. An example would be the images on google.com/news. if I alert(escape(saveObj.image)); I get something like below: data%3Aimage/jpeg%3Bbase64%2C/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABQAFADASIAAhEBAxEB/8QAHAAAAQUBAQEAAAAAAAAAAAAABgIDBAUHAQAI/8QAPhAAAgECBAMFBgIGCwEAAAAAAQIDBBEABRIhEzFhBkFRcYEUIjKRobFCwRUjJFKC0QcWJSZiY3Jzg7Lw4f/EABoBAAIDAQEAAAAAAAAAAAAAAAMEAAIFBgH/xAAmEQABBAEEAQMFAAAAAAAAAAABAAIDESEEEjFBBRMisVFhcZGh/9oADAMBAAIRAxEAPwAr7L5pD2gyY5JXEtLGAFY/EU2sR1U2+nXF/pZFKuffViGPW5ximQUEz1cNdPNKms6g8TlWBufDcHyxsdLUmqoYqhiWZ1BYtsSe+/ I pass that from the js file and am using django to get that into a mysql table of type utf8_unicode_ci using modelform.save, but when i examine what's in the database, I see: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABQAFADASIAAhEBAxEB/8QAHAAAAQUBAQEAAAAAAAAAAAAABgIDBAUHAQAI/8QAPhAAAgECBAMFBgIGCwEAAAAAAQIDBBEABRIhEzFhBkFRcYEUIjKRobFCwRUjJFKC0QcWJSZiY3Jzg7Lw4f/EABoBAAIDAQEAAAAAAAAAAAAAAAMEAAIFBgH/xAAmEQABBAEEAQMFAAAAAAAAAAABAAIDESEEEjFBBRMisVFhcZGh/9oADAMBAAIRAxEAPwAr7L5pD2gyY5JXEtLGAFY/EU2sR1U2 nXF/pZFKuffViGPW5ximQUEz1cNdPNKms6g8TlWBufDcHyxsdLUmqoYqhiWZ1BYtsSe The key difference is that in my database all of the '+' characters from the original have been stripped and replaced with spaces. Any ideas? I'm going blind trying to figure this out! :P

    Read the article

  • C#: Using regular expression (Regex) to duplicate a specific character in a string

    - by user3703944
    Anyone know how to use regex to duplicate a specific character in a string? I have a path that is entered like this: C:/Example/example I would like to use regex (or any other method) to display it like this: C://Example//example Is it possible? This is where I'm getting the file path private void btnSearchImage_Click_1(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "Image Files(*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp"; if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string filenName = ofd.FileName; pictureBox1.Image = new Bitmap(filenName); string path = filenName; txtimgPath.Text = path; } } Thanks

    Read the article

  • All client browsers repeatedly asking for NTLM authentication when running through local proxy server

    - by Marko
    All client browsers repeatedly asking for NTLM authentication when running through local proxy server. When pointing browsers through the local proxy to the internet, some but not all clients are being repeatedley prompted to authenticate to the proxy server. I have inspected the headers using firefox live headers as well as fiddler, and in all cases the authentication prompts happen when requesting SSL resources. an example of this would be as follows: GET http://gmail.google.com/mail/ HTTP/1.1 Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave- flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms- xpsdocument, application/xaml+xml, */* Accept-Language: en-gb User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) Accept-Encoding: gzip, deflate Proxy-Connection: Keep-Alive Host: gmail.google.com GET http://gmail.google.com/mail/ HTTP/1.1 Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave- flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms- xpsdocument, application/xaml+xml, */* Accept-Language: en-gb User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) Accept-Encoding: gzip, deflate Proxy-Connection: Keep-Alive Host: gmail.google.com Proxy-Authorization: NTLM TlRMTVNTUAABAAAAB7IIogkACQAvAAAABwAHACgAAAAFASgKAAAAD1dJTlhQMUdGTEFHU0hJUDc= GET http://gmail.google.com/mail/ HTTP/1.1 Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave- flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms- xpsdocument, application/xaml+xml, */* Accept-Language: en-gb User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) Accept-Encoding: gzip, deflate Proxy-Connection: Keep-Alive Proxy-Authorization: NTLM TlRMTVNTUAADA (more stuff goes here I cut it short) Host: gmail.google.com At this point the username and password prompt has appeared in the browser, it does not matter what is typed into this box, correct credentials, random nonsense the browser does not accept anything in this box it will continue to popup. If I press cancel, I sometimes get a http 407 error, but on other occasions I click cancel the website proceeds to download and show normally. This is repeatable with some clients running through my proxy server, but in other cases it does not happen at all. In the cases where a client computer works normally, the only difference I can see is that the 3rd request for SSL resource comes back with a 200 response, see below: CONNECT gmail.google.com:443 HTTP/1.0 User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; MALC) Proxy-Connection: Keep-Alive Content-Length: 0 Host: gmail.google.com Pragma: no-cache Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAIAAAA A SSLv3-compatible ClientHello handshake was found. I have tried resetting user accounts as well as computer accounts in Active Directory. User accounts and passwords that are being used are correct and the passwords have been reset so they are not out of sync. I have removed the clients and even the proxy server from the domain, and rejoined them. I have installed a complete separate proxy server and get exactly the same problem when I point clients to a different proxy server on a different IP address.

    Read the article

  • Using the HTML5 &lt;input type=&quot;file&quot; multiple=&quot;multiple&quot;&gt; Tag in ASP.NET

    - by Rick Strahl
    Per HTML5 spec the <input type="file" /> tag allows for multiple files to be picked from a single File upload button. This is actually a very subtle change that's very useful as it makes it much easier to send multiple files to the server without using complex uploader controls. Please understand though, that even though you can send multiple files using the <input type="file" /> tag, the process of how those files are sent hasn't really changed - there's still no progress information or other hooks that allow you to automatically make for a nicer upload experience without additional libraries or code. For that you will still need some sort of library (I'll post an example in my next blog post using plUpload). All the new features allow for is to make it easier to select multiple images from disk in one operation. Where you might have required many file upload controls before to upload several files, one File control can potentially do the job. How it works To create a file input box that allows with multiple file support you can simply do:<form method="post" enctype="multipart/form-data"> <label>Upload Images:</label> <input type="file" multiple="multiple" name="File1" id="File1" accept="image/*" /> <hr /> <input type="submit" id="btnUpload" value="Upload Images" /> </form> Now when the file open dialog pops up - depending on the browser and whether the browser supports it - you can pick multiple files. Here I'm using Firefox using the thumbnail preview I can easily pick images to upload on a form: Note that I can select multiple images in the dialog all of which get stored in the file textbox. The UI for this can be different in some browsers. For example Chrome displays 3 files selected as text next to the Browse… button when I choose three rather than showing any files in the textbox. Most other browsers display the standard file input box and display the multiple filenames as a comma delimited list in the textbox. Note that you can also specify the accept attribute in the <input> tag, which specifies a mime-type to specify what type of content to allow.Here I'm only allowing images (image/*) and the browser complies by just showing me image files to display. Likewise I could use text/* for all text formats registered on the machine or text/xml to only show XML files (which would include xml,xst,xsd etc.). Capturing Files on the Server with ASP.NET When you upload files to an ASP.NET server there are a couple of things to be aware of. When multiple files are uploaded from a single file control, they are assigned the same name. In other words if I select 3 files to upload on the File1 control shown above I get three file form variables named File1. This means I can't easily retrieve files by their name:HttpPostedFileBase file = Request.Files["File1"]; because there will be multiple files for a given name. The above only selects the first file. Instead you can only reliably retrieve files by their index. Below is an example I use in app to capture a number of images uploaded and store them into a database using a business object and EF 4.2.for (int i = 0; i < Request.Files.Count; i++) { HttpPostedFileBase file = Request.Files[i]; if (file.ContentLength == 0) continue; if (file.ContentLength > App.Configuration.MaxImageUploadSize) { ErrorDisplay.ShowError("File " + file.FileName + " is too large. Max upload size is: " + App.Configuration.MaxImageUploadSize); return View("UploadClassic",model); } var image = new ClassifiedsBusiness.Image(); var ms = new MemoryStream(16498); file.InputStream.CopyTo(ms); image.Entered = DateTime.Now; image.EntryId = model.Entry.Id; image.ContentType = "image/jpeg"; image.ImageData = ms.ToArray(); ms.Seek(0, SeekOrigin.Begin); // resize image if necessary and turn into jpeg Bitmap bmp = Imaging.ResizeImage(ms.ToArray(), App.Configuration.MaxImageWidth, App.Configuration.MaxImageHeight); ms.Close(); ms = new MemoryStream(); bmp.Save(ms,ImageFormat.Jpeg); image.ImageData = ms.ToArray(); bmp.Dispose(); ms.Close(); model.Entry.Images.Add(image); } This works great and also allows you to capture input from multiple input controls if you are dealing with browsers that don't support multiple file selections in the file upload control. The important thing here is that I iterate over the files by index, rather than using a foreach loop over the Request.Files collection. The files collection returns key name strings, rather than the actual files (who thought that was good idea at Microsoft?), and so that isn't going to work since you end up getting multiple keys with the same name. Instead a plain for loop has to be used to loop over all files. Another Option in ASP.NET MVC If you're using ASP.NET MVC you can use the code above as well, but you have yet another option to capture multiple uploaded files by using a parameter for your post action method.public ActionResult Save(HttpPostedFileBase[] file1) { foreach (var file in file1) { if (file.ContentLength < 0) continue; // do something with the file }} Note that in order for this to work you have to specify each posted file variable individually in the parameter list. This works great if you have a single file upload to deal with. You can also pass this in addition to your main model to separate out a ViewModel and a set of uploaded files:public ActionResult Edit(EntryViewModel model,HttpPostedFileBase[] uploadedFile) You can also make the uploaded files part of the ViewModel itself - just make sure you use the appropriate naming for the variable name in the HTML document (since there's Html.FileFor() extension). Browser Support You knew this was coming, right? The feature is really nice, but unfortunately not supported universally yet. Once again Internet Explorer is the problem: No shipping version of Internet Explorer supports multiple file uploads. IE10 supposedly will, but even IE9 does not. All other major browsers - Chrome, Firefox, Safari and Opera - support multi-file uploads in their latest versions. So how can you handle this? If you need to provide multiple file uploads you can simply add multiple file selection boxes and let people either select multiple files with a single upload file box or use multiples. Alternately you can do some browser detection and if IE is used simply show the extra file upload boxes. It's not ideal, but either one of these approaches makes life easier for folks that use a decent browser and leaves you with a functional interface for those that don't. Here's a UI I recently built as an alternate uploader with multiple file upload buttons: I say this is my 'alternate' uploader - for my primary uploader I continue to use an add-in solution. Specifically I use plUpload and I'll discuss how that's implemented in my next post. Although I think that plUpload (and many of the other packaged JavaScript upload solutions) are a better choice especially for large uploads, for simple one file uploads input boxes work well enough. The advantage of this solution is that it's very easy to handle on the server side. Any of the JavaScript controls require special handling for uploads which I'll also discuss in my next post.© Rick Strahl, West Wind Technologies, 2005-2012Posted in HTML5  ASP.NET  MVC   Tweet !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })();

    Read the article

  • Standard way of allowing general XML data

    - by Greg Jackson
    I'm writing a data gathering and reporting application that takes XML files as input, which will then be read, processed, and stored in a strongly-typed database. For example, an XML file for a "Job" might look like this: <Data type="Job"> <ID>12345</ID> <JobName>MyJob</JobName> <StartDate>04/07/2012 10:45:00 AM</StartDate> <Files> <File name="a.jpeg" path="images\" /> <File name="b.mp3" path="music\mp3\" /> </Files> </Data> I'd like to use a schema to have a standard format for these input files (depending on what type of data is being used, for example "Job", "User", "View"), but I'd also like to not fail validation if there is extra data provided. For example, perhaps a Job has additional properties such as "IsAutomated", "Requester", "EndDate", and so on. I don't particularly care about these extra properties. If they are included in the XML, I'll simply ignore them when I'm processing the XML file, and I'd like validation to do the same, without having to include in the schema every single possible property that a customer might provide me with. Is there a standard way of providing such a schema, or of allowing such a general XML file that can still be validated without resorting to something as naïve (and potentially difficult to deal with) as the below? <Data type="Job"> <Data name="ID">12345</Data> . . . <Data name="Files"> <Data name="File"> <Data name="Filename">a.jpeg</Data> <Data name="path">images</Data> . . . </Data> </Data>

    Read the article

  • SB Timmy

    - by csharp-source.net
    SB Timmy is IMAP mail client for WAP/WML devices. It's written in C#/ASP.NET (works both with MS .NET Framework and Mono). Timmy handles all types of MIME (base64, quoted-printable encoded; multipart messages). It can send mail through SMTP. It's possible to download message attachments to your mobile device (like JPEG photos). Timmy is multi-language (currently english and lithuanian translations).

    Read the article

  • Prevent hotlinking of attachments

    - by reggie
    People are able to embed my forum's attachments (vbulletin). I tried to create an htaccess rule for the hotlinking, but it did not work. RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain\.com.*$ [NC] RewriteRule attachmentid=\d+(\&d=\d*)?|\.([Gg][Ii][Ff]|[Jj][Pp][Gg])$ http://mydomain.com/antihotlink.jpeg [R] Is it not possible to check for numbers in regular expressions in htaccess files?

    Read the article

  • How to detect image dimensions and run commands on them?

    - by Jon
    I have a directory full of images, some of which are portrait-sized instead of landscape-sized, and I want to open the portrait-sized ones with an image editor. I can run the imagemagick command identify and I get an output like something.jpg JPEG 1920x1255 1920x1255+0+0 8-bit DirectClass 159KB 0.000u 0:00.000. How can I have a script interpret this output, i.e. decide which is bigger, the 1920 or the 1255, and then run a command on it if it is?

    Read the article

  • WebP se dote d'un mode de compression d'images sans perte, le format open source de Google veut aussi concurrencer le PNG

    WebP se dote d'un mode de compression d'images sans perte Le format open source de Google veut aussi concurrencer le PNG Mise à jour du 21 novembre 2011 Google voit grand pour son format d'image WebP et veut manifestement en faire un format à tout faire. Positionné au départ (lire ci-devant) comme un concurrent plus optimisé que le JPEG, avec en prime une couche alpha progressive (de transparence), il se dote aujourd'hui de capacités d'optimisation non destructives des images, à l'instar du PNG. Le nouveau mode lossless (sans perte) allierait densité de compression et facilité de décodage d'après un billet...

    Read the article

  • What package (helper app) does recoll need to index images?

    - by hobs
    The File->Show_missing_helpers menu item in the recoll GUI mentions the following missing helper (among others): Perl::Image::ExifTool (image/gif image/jpeg image/png image/tiff image/x-xcf) Per the recoll user manual I installed the perl image exif tool (and library): sudo aptitude install libimage-exif-perl libimage-exiftool-perl but recoll still lists the missing helper and fails to index images. uname -a: Linux AlSSD 3.2.0-30-generic #48-Ubuntu SMP Fri Aug 24 16:52:48 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

    Read the article

  • Where can I find free simple 3D models? [duplicate]

    - by fibo-Nacci
    This question is an exact duplicate of: What are good sites that provide free media resources for hobby game development? [closed] I'm learning OpenGL. Unfortunately can't create 3D models, but I would like to write some really simple games, to improve my programming skills. I need some really basic .obj file, which has one bmp, or jpeg texture. Where can I download some for free? Thanks in advance,

    Read the article

  • Embed album art in OGG through command line in linux

    - by teratomata
    I want to convert my music from flac to ogg, and currently oggenc does that perfectly except for album art. Metaflac can output album art, however there seems to be no command line tool to embed album art into ogg. MP3Tag and EasyTag are able to do it, and there is a specification for it here which calls for the image to be base64 encoded. However so far I have been unsuccessful in being able to take an image file, converting it to base64 and embedding it into an ogg file. If I take a base64 encoded image from an ogg file that already has the image embedded, I can easily embed it into another image using vorbiscomment: vorbiscomment -l withimage.ogg > textfile vorbiscomment -c textfile noimage.ogg My problem is taking something like a jpeg and converting it to base64. Currently I have: base64 --wrap=0 ./image.jpg Which gives me the image file converted to base64, using vorbiscomment and following the tagging rules, I can embed that into an ogg file like so: echo "METADATA_BLOCK_PICTURE=$(base64 --wrap=0 ./image.jpg)" > ./folder.txt vorbiscomment -c textfile noimage.ogg However this gives me an ogg whose image does not work properly. I noticed when comparing the base64 strings that all properly embedding pictures have a header line but all the base64 strings I generate are lacking this header. Further analysis of the header: od -c header.txt 0000000 \0 \0 \0 003 \0 \0 \0 \n i m a g e / j p 0000020 e g \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 0000040 \0 \0 \0 \0 \0 \0 \0 \0 035 332 0000052 Which follows the spec given above. Notice 003 corresponds to front cover and image/jpeg is the mime type. So finally, my question is, how can I base64 encode a file and generate this header along with it for embedding into an ogg file?

    Read the article

  • Batch copy gives errors, xcopy works fine

    - by ndm13
    I am writing a general file backup program. It searches the drive for files matching a set of types and then writes them to a folder on the desktop. I wrote it using xcopy on Windows XP but upon learning that xcopy was deprecated in favor of robocopy in Vista and newer, still wanting to maintain compatibility I decided to switch to the non-deprecated copy. This is where the problems begin. I'm trying to fix the copy routine. I thought I had everything sorted out, but it doesn't copy anything. My output is zero files copied for every iteration. Original Code using xcopy: for /r %%a in (*.bmp *.dds *.gif *.jpg *.jpeg *.png *.psd *.pspimage *.tga *.thm *.tif *.tiff) do ( echo f | xcopy "%%a" "%HOMEDRIVE%%HOMEPATH%\Desktop\LDR\Images\Bitmap\%%~nxa" /q /y /g /c ) Revised (broken) Code using copy: for /r %%a in (*.bmp *.dds *.gif *.jpg *.jpeg *.png *.psd *.pspimage *.tga *.thm *.tif *.tiff) do ( copy "%%a" "%HOMEDRIVE%%HOMEPATH%\Desktop\LDR\Images\Bitmap\%%~nxa" /d /y /z ) Output: The system cannot find the path specified. 0 files copied. I know that it seems everyone uses either xcopy or robocopy but can anyone help with copy? Note: I'm using Batch to keep it very lightweight and command-line accessible.

    Read the article

  • "unrecognized options" while installing php

    - by user1692333
    I want to compile php 5.4.8 on my mac 10.8.2, but get some errors which cant solve by my self, so need your help. Firstly i get default php options with php -i | head, after it do this command ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking --sysconfdir=/private/etc --with-apxs2=/usr/sbin/apxs --enable-cli --with-config-file-path=/etc --with-libxml-dir=/usr --with-openssl=/usr --with-kerberos=/usr --with-zlib=/usr --enable-bcmath --with-bz2=/usr --enable-calendar --disable-cgi --with-curl=/usr --enable-dba --enable-ndbm=/usr --enable-exif --enable-fpm --enable-ftp --with-gd --with-freetype-dir=/BinaryCache/apache_mod_php/apache_mod_php-79~4/Root/usr/local --with-jpeg-dir=/BinaryCache/apache_mod_php/apache_mod_php-79~4/Root/usr/local --with-png-dir=/BinaryCache/apache_mod_php/apache_mod_php-79~4/Root/usr/local --enable-gd-native-ttf --with-icu-dir=/usr --with-iodbc=/usr --with-ldap=/usr --with-ldap-sasl=/usr --with-libedit=/usr --enable-mbstring --enable-mbregex --with-mysql=mysqlnd --with-mysqli=mysqlnd --without-pear --with-pdo-mysql=mysqlnd --with-mysql-sock=/var/mysql/mysql.sock --with-readline=/usr --enable-shmop --with-snmp=/usr --enable-soap --enable-sockets --enable-sqlite-utf8 --enable-suhosin --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-tidy --enable-wddx --with-xmlrpc --with-iconv-dir=/usr --with-xsl=/usr --enable-zend-multibyte --enable-zip --with-pcre-regex --with-pgsql=/usr --with-pdo-pgsql=/usr But get this error config.status: creating Makefile config.status: creating jconfig.h config.status: jconfig.h is unchanged config.status: executing depfiles commands config.status: executing libtool commands configure: WARNING: unrecognized options: --enable-cli, --with-config-file-path, --with-libxml-dir, --with-openssl, --with-kerberos, --with-zlib, --enable-bcmath, --with-bz2, --enable-calendar, --disable-cgi, --with-curl, --enable-dba, --enable-ndbm, --enable-exif, --enable-fpm, --enable-ftp, --with-gd, --with-freetype-dir, --with-jpeg-dir, --with-png-dir, --enable-gd-native-ttf, --with-icu-dir, --with-iodbc, --with-ldap, --with-ldap-sasl, --with-libedit, --enable-mbstring, --enable-mbregex, --with-mysql, --with-mysqli, --without-pear, --with-pdo-mysql, --with-mysql-sock, --with-readline, --enable-shmop, --with-snmp, --enable-soap, --enable-sockets, --enable-sqlite-utf8, --enable-suhosin, --enable-sysvmsg, --enable-sysvsem, --enable-sysvshm, --with-tidy, --enable-wddx, --with-xmlrpc, --with-iconv-dir, --with-xsl, --enable-zend-multibyte, --enable-zip, --with-pcre-regex, --with-pgsql, --with-pdo-pgsql Maybe someone have some suggestions on this?

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >