В Unix и Linux (и, возможно, в OS X тоже) текущая Кодировка файловой системы задается параметром локали LC_CTYPE (см. функцию setlocale() http://php.net/manual/ru/function.setlocale.php). Например, он может иметь значение типа en_US.UTF-8, что означает кодировку UTF-8. Затем имена файлов и их пути могут быть созданы с помощью fopen() или получены с помощью dir() с этой кодировкой.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* ***** BEGIN LICENSE BLOCK ***** | |
| * Version: MPL 2.0 | |
| * | |
| * This Source Code Form is subject to the terms of the Mozilla Public | |
| * License, v. 2.0. If a copy of the MPL was not distributed with this | |
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
| * | |
| * ***** END LICENSE BLOCK ***** */ | |
| /* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/perl | |
| foreach my $rev (`git rev-list --all --pretty=oneline`) { | |
| my $tot = 0; | |
| ($sha = $rev) =~ s/\s.*$//; | |
| foreach my $blob (`git diff-tree -r -c -M -C --no-commit-id $sha`) { | |
| $blob = (split /\s/, $blob)[3]; | |
| next if $blob == "0000000000000000000000000000000000000000"; # Deleted | |
| my $size = `echo $blob | git cat-file --batch-check`; | |
| $size = (split /\s/, $size)[2]; | |
| $tot += int($size); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (document.documentElement.offsetHeight + document.documentElement.scrollTop == document.documentElement.scrollHeight) { | |
| // CODE | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $re = '%# Collapse whitespace everywhere but in blacklisted elements. | |
| (?> # Match all whitespans other than single space. | |
| [^\S ]\s* # Either one [\t\r\n\f\v] and zero or more ws, | |
| | \s{2,} # or two or more consecutive-any-whitespace. | |
| ) # Note: The remaining regex consumes no text at all... | |
| (?= # Ensure we are not in a blacklist tag. | |
| [^<]*+ # Either zero or more non-"<" {normal*} | |
| (?: # Begin {(special normal*)*} construct | |
| < # or a < starting a non-blacklist tag. | |
| (?!/?(?:textarea|pre|script)\b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| PROGNAME=${0##*/} | |
| INPUT='' | |
| QUIET='0' | |
| NOSTATS='0' | |
| max_input_size=0 | |
| max_output_size=0 | |
| usage() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Database | |
| { | |
| private $_sTablePrefix; | |
| private $_iMatchesCount = 0; | |
| private $_aReplaceData = []; | |
| private $_oConnection; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // file encoding utf-8 | |
| echo "encoding utf-8\n\n"; | |
| //$a = "\xe1\x84\xbf\x84"; //ᄿ? | |
| $a = "ᄿtest"; //e1 84 bf 74 65 73 74 | |
| echo "string ".$a."\n"; | |
| echo "bytes ".implode(' ', array_map('dechex', unpack('C*', $a)))."\n\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function mb_html_entity_decode($string) | |
| { | |
| if (extension_loaded('mbstring') === true) | |
| { | |
| mb_language('Neutral'); | |
| mb_internal_encoding('UTF-8'); | |
| mb_detect_order(array('UTF-8', 'ISO-8859-15', 'ISO-8859-1', 'ASCII')); |
- Ngspice http://ngspice.sourceforge.net
- LTSpice http://www.analog.com/en/design-center/design-tools-and-calculators/ltspice-simulator.html
- Qucs http://qucs.sourceforge.net
- iCircuit http://icircuitapp.com
- Circuit JS http://www.falstad.com/circuit/circuitjs.html
- Port of Circuit JS http://lushprojects.com/circuitjs/