Search Results

Search found 3042 results on 122 pages for 'archive'.

Page 83/122 | < Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >

  • Why does IE prompt a security warning when viewing an XML file?

    - by Tav
    Opening an XML file in Internet explorer gives a security warning. IE has a nice collapsible tree view for viewing XML, but it's disabled by default and you get this scary error message about a potential security hole. http://www.leonmeijer.nl/archive/2008/04/27/106.aspx But why? How can simply viewing an XML file (not running any embedded macros in it or anything) possibly be a security hole? Sure, I get that running XSLT could potentially do some bad stuff, but we're not talking about executing anything. We're talking about viewing. Why can't IE simply display the XML file as text (plus with the collapsible tree viewer)? So why did they label this as a security hole? Can someone describe how simply viewing an XML document could be used as an attack document?

    Read the article

  • Directly embedding JPEGs in an HTML file

    - by roygbiv
    I can embed a mime encoded JPEG in an html page by saving the page from IE using the File-SaveAs menu and selecting (Web Archive, single file (*.mht)). Renaming this .mht file with .eml enables Outlook to open it and send an HTML email. My questions are: How can I embed JPEG images directly in HTML pages (no external files). Are the images just mime encoded inline in the HTML? It appears that this is IE specific. Do any other browsers support this functionality?

    Read the article

  • Shimmed Automation addin

    - by Sandy
    I am developing an Excel addin that has an udf and calls it as a worksheet function. It is a com addin where I am using the IDTExtensibility2 interface and set the class interface type as autodual and then shim it as in the link http://blogs.msdn.com/andreww/archive/2006/07/23/excel-interop-types-in-shimmed-automation-add-ins.aspx Things work fine in my development machine but I am having a tough time packaging the assembly. The addin registers but the formula does not appear in the formula bar of Excel after the installation. Can someone help me with the right way to get it done ? I use VS 2008 and Office 2007 for my testing. Thanks in advance.

    Read the article

  • Entity framework, adding custom entity to diagram

    - by molgan
    Hello I'm using the entity framework that comes with 3.5sp1, and I'm trying to add a custom entity that I will propulate with searchresults from a stored procedure. But I have problems with the designer....... when I pick "Add + Entity" and give it a name, and hit save, the whole diagram stops working...... blah entities namespace could not be found..... all the other entities have lost its reference or summet. Works when I add a "table" to it that exists in database. But when custom it screws everything up. How should I fix this? I've imported the function, I just need to add an entity for it... I've read http://blogs.microsoft.co.il/blogs/gilf/archive/2009/03/13/mapping-stored-procedure-results-to-a-custom-entity-in-entity-framework.aspx but I cant get to step 3 since of all the errors when saving on step 2. /M

    Read the article

  • App-Engine (Java) File Upload

    - by Manjoor
    I managged to upload files on app-engine by using the following example http://stackoverflow.com/questions/1513603/how-to-upload-and-store-an-image-with-google-app-engine-java and http://www.mail-archive.com/[email protected]/msg08090.html The problem is, I am sumitting other fields along with file field as listed below <form action="index.jsp" method="post" enctype="multipart/form-data"> <input name="name" type="text" value=""> <br/> <input name="imageField" type="file" size="30"> <br/> <input name="Submit" type="submit" value="Sumbit"> </form> In my servlet I am getting null when querying name = request.getParameter("name"); Why it is so? Is there a way to retrieve text field value?

    Read the article

  • Uses for static generic classes?

    - by Hightechrider
    What are the key uses of a Static Generic Class in C#? When should they be used? What examples best illustrate their usage? e.g. public static class Example<T> { public static ... } Since you can't define extension methods in them they appear to be somewhat limited in their utility. Web references on the topic are scarce so clearly there aren't a lot of people using them. Here's a couple:- http://ayende.com/Blog/archive/2005/10/05/StaticGenericClass.aspx http://stackoverflow.com/questions/686630/static-generic-class-as-dictionary

    Read the article

  • c# use custom control directly in c# project

    - by PEEK
    hi ...hope someone can help me now: i want to use the listview flicker"less" control found here :http://geekswithblogs.net/CPound/archive/2006/02/27/70834.aspx directly in my c# Project.. i dont want to make a custom user control project, build it to dll and then import it in my project ..i just want this all in my c# Programm iam making.. i think i have to add in my project a class, and add the code, but how can i use the control now directly in my project? hope my problem is clear .. thanks for help

    Read the article

  • iOS app won't compile on device but works fine in simulator

    - by Jhorra
    I'm assuming this has something to do with linking, but I've removed RestKit and re-added it. I made sure all my connections and linking was in place. If I set XCode to use the simulator it runs fine, but as soon as I set it to run on any device it won't even build. The only other thing of note is this didn't start happening till I upgraded to XCode 4.5. Below are the errors it gives me ld: warning: ignoring file /Users/luke/Library/Developer/Xcode/DerivedData/ehrx-btsujlxuhtytahfaikwjeqfjybtt/Build/Products/Debug-iphoneos/libRestKit.a, file was built for archive which is not the architecture being linked (armv7s): /Users/luke/Library/Developer/Xcode/DerivedData/ehrx-btsujlxuhtytahfaikwjeqfjybtt/Build/Products/Debug-iphoneos/libRestKit.a Undefined symbols for architecture armv7s: "_OBJC_CLASS_$_RKClient", referenced from: objc-class-ref in ehrxAppDelegate.o objc-class-ref in ehrxLoginView.o objc-class-ref in ehrxInboxView.o objc-class-ref in ehrxCMView.o objc-class-ref in ehrxEncounterDemoView.o objc-class-ref in ehrxEncounterDiagListView.o objc-class-ref in ehrxEncounterChargeView.o ... ld: symbol(s) not found for architecture armv7s clang: error: linker command failed with exit code 1 (use -v to see invocation)

    Read the article

  • Solr date field tdate vs date?

    - by user550178
    So I have a question about Solr's field date types which is pretty straight forward: what's the difference between a 'date' field and a 'tdate' one? The schema .xml claims that 'For faster range queries, consider the tdate type' and 'A Trie based date field for faster date range queries and date faceting. ' Fair enough... but what's the precisionStep="6" all about? should i change this? does it change the way i would create the query in case I use the tdate? What's the real advantage or what does Solr do that makes it better? P.S went through google, Solr manual, solr wiki and the java docs without any luck so I'd appreciate a kind and explanatory answer :)... Also checked: http://www.lucidimagination.com/blog/2009/05/13/exploring-lucene-and-solrs-trierange-capabilities/ http://web.archiveorange.com/archive/v/AAfXfqRYyLnDFtskmLRi

    Read the article

  • Count the number of rows of a CSV file, with d3.js

    - by user2934073
    Suppose I have this CSV file Day,What 2013-10-27,Apple 2013-10-27,Cake 2013-10-27,Apple 2013-10-28,Apple 2013-10-28,Apple 2013-10-28,Blueberry 2013-10-28,Orange I would like to drawn with D3.js a time-series graph. All I need to do is to display the sum of the number of rows for each day. As an example, the 27 of November should have 3 as value, the 28th should have 4. Is there a way I can archive it? I've been trying to create a new dataset out of the CSV one with no positive results. var dataset; d3.csv("data.csv", function(d) { return { Day: new Date(d.Day), What: d.What }; }, function(error, rows) { dataset = rows; // I SUPPOSE THE FUNCTION THAT GENERATE THE NEW DATASET SHOULD GO THERE });

    Read the article

  • ASP.NET with VS 2008 How to Run Root "/" with Local Web Server

    - by harrije
    I want to use the built-in web server for VS 2008 and have it run my web-site project as the top level root "/". Instructions for VS 2005 can be found at: http://weblogs.asp.net/scottgu/archive/2006/12/19/tip-trick-how-to-run-a-root-site-with-the-local-web-server-using-vs-2005-sp1.aspx My problem is with step 3 of the instructions. When the the web-site project node is selected, right click never gives me an option to select a property-grid like that shown under step 3. Nor could I find another way in the menu or tool bar to get the property-grid. I don't know if the UI difference I'm seeing has to do with me using VS 2008 and the instructions are for VS 2005 or what? How do I get the web-site property-grid for VS 2008, or is there an alternative way to get the root setup I want?

    Read the article

  • Run intent DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN from a service

    - by Zorb
    I have a service and I want the service promote to enable it as Device Admin, until now I launched this kind of UI interactions from the service like Intent intent2 = new Intent(); intent2.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent2.setAction(android.content.Intent.ACTION_VIEW); intent2.setDataAndType(uri, "application/vnd.android.package-archive"); context.startActivity(intent2); and it works, but with DevicePolicyManager I can't find the way: Intent intent = new Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.putExtra(DevicePolicyManager.EXTRA_DEVICE_ADMIN, mAdminName); intent.putExtra(DevicePolicyManager.EXTRA_ADD_EXPLANATION, "some text."); context.startActivity(intent); does't work: do not promote nothing but also do not crash. Without intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); It simply crash because this code is inside a tread inside a service. Ideas?

    Read the article

  • Calling a void async. - Event based pattern, or another method?

    - by alex
    I have a class that basically stores files in amazon s3. Here is what it looks like (simplified) public class S3FileStore { public void PutFile(string ID, Stream content) { //do stuff } } In my client app, I want to be able to call: var s3 = new() S3FileStore(); s3.PutFile ("myId", File.OpenRead(@"C:\myFile1")); s3.PutFile ("myId", File.OpenRead(@"C:\myFile2")); s3.PutFile ("myId", File.OpenRead(@"C:\myFile3")); I want this to be an asynchronous operation - I want the S3FileStore to handle this (i don't want my caller to have to execute PutFile asynchronously so to speak) but, i want to be able to trap exceptions / tell if the operation completed for each file. I've looked at event based async calls, especially this: http://blogs.windowsclient.net/rendle/archive/2008/11/04/functional-shortcuts-2-event-based-asynchronous-pattern.aspx However, I can't see how to call my PutFile (void) method? Are there any better examples?

    Read the article

  • [C++] Wrong EOF when unzipping binary file

    - by djzmo
    Hello there, I tried to unzip a binary file to a membuf from a zip archive using Lucian Wischik's Zip Utils: http://www.wischik.com/lu/programmer/zip_utils.html http://www.codeproject.com/KB/files/zip_utils.aspx FindZipItem(hz, filename.c_str(), true, &j, &ze); char *content = new char[ze.unc_size]; UnzipItem(hz, j, content, ze.unc_size); delete[] content; But it didn't unzip the file correctly. It stopped at the first 0x00 of the file. For example when I unzip an MP3 file, it will only unzip the first 4 bytes: 0x49443303 (ID3\0) because the 5th to 8th byte is 0x00000000. I also tried to capture the ZR_RESULT, and it always return ZR_OK (which means completed without errors). I think this guy also had the same problem, but no one replied to his question: http://www.codeproject.com/KB/files/zip_utils.aspx?msg=2876222#xx2876222xx Any kind of help would be appreciated :)

    Read the article

  • Animating shorthand CSS properties with jQuery

    - by Giulio Piancastelli
    Chapter 3 of jQuery Novice to Ninja starts with a section about animating CSS properties, and its first example suggests the following code should expand padding and add a couple of borders to every paragraph in a page: $('document').ready(function() { $('p').animate({ padding: '20px', borderBottom: '3px solid #8f8f8f', borderRight: '3px solid #bfbfbf' }, 2000); }); However, while the code indeed works with the jQuery 1.4 library included in the downloadable examples archive for the book, it only animates padding when used alongside jQuery 1.6, forgetting the shorthand CSS properties for border-bottom and border-right altogether. What happened in the transition between 1.4 and 1.6, causing the removal of this functionality? Has it been placed in some plugin? Is it possible to run this code as it's written and get back the border animation? If not, how would you animate border properties using jQuery 1.6?

    Read the article

  • How to match the last url in a line containing multiple urls, using regular expressions?

    - by Mert Nuhoglu
    I want to write a regex that matches a url that ends with ".mp4" given that there are multiple urls in a line. For example, for the following line: "http://www.link.org/1610.jpg","Debt","http://www.archive.org/610_.mp4","66196517" Using the following pattern matches from the first http until mp4. (http:\/\/[^"].*?\.mp4)[",].*? How can I make it match only the last url only? Note that, the lines may contain any number of urls and anything in between. But only the last url contains .mp4 ending.

    Read the article

  • How do I refactor this IEnumerable<T> to be thread-safe?

    - by DayOne
    I am looking at Skeet's AtomicEnumerable but I'm not sure how to integrate it into my current IEnumerable exmaple below (http://msmvps.com/blogs/jon_skeet/archive/2009/10/23/iterating-atomically.aspx) Basically I want to foreach my blahs type in a thread-safe way. thanks public sealed class Blahs : IEnumerable<string> { private readonly IList<string> _data = new List<string>() { "blah1", "blah2", "blah3" }; public IEnumerator<string> GetEnumerator() { return _data.GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } }

    Read the article

  • Applet tag error

    - by Yvan JANSSENS
    Hi, I'm getting a FileNotFound error when I try to include my applet. It tries to include a .class file, while I provide a .jar file. Here's the java console output: at java.lang.Thread.run(Thread.java:637) Caused by: java.io.FileNotFoundException: /Users/yvanjanssens/NetBeansProjects/yBlackJack/yBlackJackApplet.class (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at java.io.FileInputStream.<init>(FileInputStream.java:66) And here's my Applet code: <applet code="yBlackJackApplet" archive="yBlackJack.jar" width="100%" height="100%" > </applet> Thanks! Yvan

    Read the article

  • Styling WPF Toolkit DataGrid Column Headers

    - by ChrisFletcher
    Hi, I'm having an issue styling the WPF Datagrid, I've styled the column headers (of type ColumnHeader). But when the data in the columns does not fill the full width of the grid an additional column is added to pad out the grid. This column ignores the ColumnHeader style and looks out of place presumably because the element has a different type, I've looked through the library in object browser but I can't find this element. I've also considered fixing the sizes so this column is unnecessary but thats not a viable option. The problem is demonstrated in the following article: http://blogs.msdn.com/jaimer/archive/2009/01/20/styling-microsoft-s-wpf-datagrid.aspx The element I mean is in the top right, just to the right of green column 3 and just above the cell with the row background arrow.

    Read the article

  • Why is Javascript's Math.floor the slowest way to calculate floor in Javascript?

    - by z5h
    I'm generally not a fan of microbenchmarks. But this one has a very interesting result. http://ernestdelgado.com/archive/benchmark-on-the-floor/ It suggests that Math.floor is the SLOWEST way to calculate floor in Javascript. ~~n, n|n, n&n all being faster. This seems pretty shocking as I would expect that people implementing Javascript in today's modern browsers would be some pretty smart people. Does floor do something important that the other methods fail to do? Is there any reason to use it?

    Read the article

  • match 'article' in url RewriteRule

    - by daniel Crabbe
    hello there. building a site which has content for each section. urls range from; /work/ /work/print/ /work/print/folders etc. however, at any point a user can click on an article so; /work/article/1066 /work/print/article/1066 /work/print/folders/article/1066 using .htaccess i need to detect when there is 'article' in the url and set some different variables. RewriteRule ^([a-zA-Z0-9\-]+)/([a-zA-Z0-9\-]+)/([a-zA-Z0-9\-]+)/([a-zA-Z0-9\-]+)/$ sets index.php?level1=$1&level2=$2&level3=$3&level4=$4 but if 'article/([0-9-]+)' is in the url, say /work/print/article/1066 return index.php?level1=$1&level2=$2&articleID=1066 basically the amount of levels will always be different but i'd like to return those as needed. another example would /work/print/folder/archive/article/1066 return index.php?level1=$1&level2=$2&level3=$3&level4=$4&articleID=1066 any help appreciated! Dan

    Read the article

  • Check result of AX_PYTHON_MODULE in configure.ac

    - by tmatth
    In using the m4_ax_python_module.m4 macro in configure.ac (AX_PYTHON_MODULE), one can know at configure time if a given module is installed. It takes two arguments, the module name, and second argument which if not empty, will lead to an exit, useful when the module is a must-have. In the case where you don't want a fatal exit, how do you test in configure.ac which modules were found or not? They output "yes" or "no" when configure is run, but that's all I've found so far. Basically If I have these lines in configure.ac: AX_PYTHON_MODULE(json,[]) AX_PYTHON_MODULE(simplejson,[]) How do I test which of the two modules were found? See http://www.gnu.org/software/autoconf-archive/ax_python_module.html#ax_python_module for documentation about this macro.

    Read the article

  • Creating a file upload template in Doctrine ORM

    - by balupton
    Hey all. I'm using Doctrine 1.2 as my ORM for a Zend Framework Project. I have defined the following Model for a File. File: columns: id: primary: true type: integer(4) unsigned: true code: type: string(255) unique: true notblank: true path: type: string(255) notblank: true size: type: integer(4) type: type: enum values: [file,document,image,video,audio,web,application,archive] default: unknown notnull: true mimetype: type: string(20) notnull: true width: type: integer(2) unsigned: true height: type: integer(2) unsigned: true Now here is the File Model php class (just skim through for now): <?php /** * File * * This class has been auto-generated by the Doctrine ORM Framework * * @package ##PACKAGE## * @subpackage ##SUBPACKAGE## * @author ##NAME## <##EMAIL##> * @version SVN: $Id: Builder.php 6365 2009-09-15 18:22:38Z jwage $ */ class File extends BaseFile { public function setUp ( ) { $this->hasMutator('file', 'setFile'); parent::setUp(); } public function setFile ( $file ) { global $Application; // Configuration $config = array(); $config['bal'] = $Application->getOption('bal'); // Check the file if ( !empty($file['error']) ) { $error = $file['error']; switch ( $file['error'] ) { case UPLOAD_ERR_INI_SIZE : $error = 'ini_size'; break; case UPLOAD_ERR_FORM_SIZE : $error = 'form_size'; break; case UPLOAD_ERR_PARTIAL : $error = 'partial'; break; case UPLOAD_ERR_NO_FILE : $error = 'no_file'; break; case UPLOAD_ERR_NO_TMP_DIR : $error = 'no_tmp_dir'; break; case UPLOAD_ERR_CANT_WRITE : $error = 'cant_write'; break; default : $error = 'unknown'; break; } throw new Doctrine_Exception('error-application-file-' . $error); return false; } if ( empty($file['tmp_name']) || !is_uploaded_file($file['tmp_name']) ) { throw new Doctrine_Exception('error-application-file-invalid'); return false; } // Prepare config $file_upload_path = realpath($config['bal']['files']['upload_path']) . DIRECTORY_SEPARATOR; // Prepare file $filename = $file['name']; $file_old_path = $file['tmp_name']; $file_new_path = $file_upload_path . $filename; $exist_attempt = 0; while ( file_exists($file_new_path) ) { // File already exists // Pump exist attempts ++$exist_attempt; // Add the attempt to the end of the file $file_new_path = $file_upload_path . get_filename($filename,false) . $exist_attempt . get_extension($filename); } // Move file $success = move_uploaded_file($file_old_path, $file_new_path); if ( !$success ) { throw new Doctrine_Exception('Unable to upload the file.'); return false; } // Secure $file_path = realpath($file_new_path); $file_size = filesize($file_path); $file_mimetype = get_mime_type($file_path); $file_type = get_filetype($file_path); // Apply $this->path = $file_path; $this->size = $file_size; $this->mimetype = $file_mimetype; $this->type = $file_type; // Apply: Image if ( $file_type === 'image' ) { $image_dimensions = image_dimensions($file_path); if ( !empty($image_dimensions) ) { // It is not a image we can modify $this->width = 0; $this->height = 0; } else { $this->width = $image_dimensions['width']; $this->height = $image_dimensions['height']; } } // Done return true; } /** * Download the File * @return */ public function download ( ) { global $Application; // File path $file_upload_path = realpath($config['bal']['files']['upload_path']) . DIRECTORY_SEPARATOR; $file_path = $file_upload_path . $this->file_path; // Output result and download become_file_download($file_path, null, null); die(); } public function postDelete ( $Event ) { global $Application; // Prepare $Invoker = $Event->getInvoker(); // Configuration $config = array(); $config['bal'] = $Application->getOption('bal'); // File path $file_upload_path = realpath($config['bal']['files']['upload_path']) . DIRECTORY_SEPARATOR; $file_path = $file_upload_path . $this->file_path; // Delete the file unlink($file_path); // Done return true; } } What I am hoping to accomplish is so that the above custom functionality within my model file can be turned into a validator, template, or something along the lines. So hopefully I can do something like: File: actAs: BalFile: columns: id: primary: true type: integer(4) unsigned: true code: type: string(255) unique: true notblank: true path: type: string(255) notblank: true size: type: integer(4) type: type: enum values: [file,document,image,video,audio,web,application,archive] default: unknown notnull: true mimetype: type: string(20) notnull: true width: type: integer(2) unsigned: true height: type: integer(2) unsigned: true I'm hoping for a validator so that say if I do $File->setFile($_FILE['uploaded_file']); It will provide a validation error, except in all the doctrine documentation it has little on custom validators, especially in the contect of "virtual" fields. So in summary, my question is: How earth can I go about making a template/extension to porting this functionality? I have tried before with templates but always gave up after a day :/ If you could take the time to port the above I would greatly appreciate it.

    Read the article

  • Speed-up of readonly MyISAM table

    - by Ozzy
    We have a large MyISAM table that is used to archive old data. This archiving is performed every month, and except from these occasions data is never written to the table. Is there anyway to "tell" MySQL that this table is read-only, so that MySQL might optimize the performance of reads from this table? I've looked at the MEMORY storage engine, but the problem is that this table is so large that it would take a large portion of the servers memory, which I don't want. Hope my question is clear enough, I'm a novice when it comes to db administration so any input or suggestions are welcome.

    Read the article

  • Need some testcases on solving this problem

    - by user285825
    I am trying to solve the minesweeper problem of acm problemset archive, http://uva,onlinejudge,org/index,php?option=com_onlinejudge&Itemid=8&category=13&page=show_problem&problem=1130 I tested with all the possible cases that I can imagine of: 1, minimum 1 1 , 1 1 # 2, maximum upto 100 upto 100 repeat until 100 3, for each position I test for mine 4 4 ,,, ,,,, ,,,, 4 4 ,#,, ,,,, ,,,, ,,,, lastly 4 4 ,,,, ,,,, ,,,, ,,,# 4, for each postion I put a ',' and surround it with mines 4 4 ,### # # # 4 4 , # # # lastly 4 4 # # # , I thought that these are reasonable and representative sets of testcases, But still Wrong answer, I am not sure what else could I test for, I would be glad if someone throw some light on further strategy to test this thing,

    Read the article

< Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >