- by admin
This is a Netscape plugin viewer.- by admin
Just some examples:$filename = 'sample.gif';
// 1. The "explode/end" approach
$ext = end(explode('.', $filename));
// 2. The "strrchr" approach
$ext = substr(strrchr($filename, '.'), 1);
// 3. The "strrpos" approach
$ext = substr($filename, strrpos($filename, '.') + 1);
// 4. The "preg_replace" approach
$ext = preg_replace('/^.*\.([^.]+)$/D', '$1', $filename);
// 5. The "never use this" approach
// From: http://php.about.com/od/finishedphp1/qt/file_ext_PHP.htm
$exts = split("[/\\.]", $filename);
$n = count($exts)-1;
$ext = $exts[$n];
$path_parts = pathinfo('/www/htdocs/inc/lib.inc.php');
echo $path_parts['dirname'], "\n";
echo $path_parts['basename'], "\n";
echo $path_parts['extension'], "\n";
echo $path_parts['filename'], "\n"; // since PHP 5.2.0
/www/htdocs/inc
lib.inc.php
php
lib.inc
- by admin
SummaryExt | MIME Type |
.doc | application/msword |
.dot | application/msword |
.docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
.dotx | application/vnd.openxmlformats-officedocument.wordprocessingml.template |
.docm | application/vnd.ms-word.document.macroEnabled.12 |
.dotm | application/vnd.ms-word.template.macroEnabled.12 |
.xls | application/vnd.ms-excel |
.xlt | application/vnd.ms-excel |
.xla | application/vnd.ms-excel |
.xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
.xltx | application/vnd.openxmlformats-officedocument.spreadsheetml.template |
.xlsm | application/vnd.ms-excel.sheet.macroEnabled.12 |
.xltm | application/vnd.ms-excel.template.macroEnabled.12 |
.xlam | application/vnd.ms-excel.addin.macroEnabled.12 |
.xlsb | application/vnd.ms-excel.sheet.binary.macroEnabled.12 |
.ppt | application/vnd.ms-powerpoint |
.pot | application/vnd.ms-powerpoint |
.pps | application/vnd.ms-powerpoint |
.ppa | application/vnd.ms-powerpoint |
.pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation |
.potx | application/vnd.openxmlformats-officedocument.presentationml.template |
.ppsx | application/vnd.openxmlformats-officedocument.presentationml.slideshow |
.ppam | application/vnd.ms-powerpoint.addin.macroEnabled.12 |
.pptm | application/vnd.ms-powerpoint.presentation.macroEnabled.12 |
.potm | application/vnd.ms-powerpoint.presentation.macroEnabled.12 |
.ppsm | application/vnd.ms-powerpoint.slideshow.macroEnabled.12 |
936496: Description of the default settings for the MimeMap property and for the ScriptMaps property in IIS
- by admin
Actually explode() isn’t the same as split().- by admin
This property specifies whether the current rendered line should break if the content exceeds the boundary of the specified rendering box for an element (this is similar in some ways to the ‘clip’ and ‘overflow’ properties in intent.) This property should only apply if the element has a visual rendering, is an inline element with explicit height/width, is absolutely positioned and/or is a block element.div { word-wrap: break-word } <div style=”word-wrap: break-word”>Here is some content for the div element</div> |
Value | Description |
---|---|
normal | Content will exceed the boundaries of the specified rendering box. |
break-word | Content will wrap to the next line when necessary, and a word-break will also occur if needed. |
- by admin
JsFiddle is a playground for web developers, a tool which may be used in many ways. One can use it as an online editor for snippets build from HTML, CSS and JavaScript. The code can then be shared with others, embedded on a blog, etc. Using this approach, JavaScript developers can very easily isolate bugs.- by admin
Q:I have an encrypted XML file that needs to be decrypted and displayed in Flash. The Encrypted XML file contains over 33000 characters, Flash crashes when I try to decrypt it. Is there a limit to amount of data that Flash can decrypt? I'm using rijndael to decrypt and Actionscript 2.0.
A:
Your problem is caused by the non-existing multithreading capabilities in Flash: All calculations are supposed to happen "in-between frames", i.e. user algorithms should not take longer to execute than the interval at which the screen is refreshed. If your calculation takes too long to finish, the Flash player will first start to drop frames, and (unless you changed settings) after 15 seconds show the warning you described.
You can get around this by "spreading" your algorithm across multiple frames, making sure only part of the calculation is executed until the screen is refreshed. You can do so by simply splitting up your encrypted string into small enough parts and executing an enterFrame loop to decrypt one at a time, or by implementing something like Alex Harui's PseudoThread class (which essentially does the same, but comes with encapsulation and all that Jazz).
- by admin
Vim is an editor to create or edit a text file.- by admin
$('#select').val('the_value');