in house 发布 ipa

企业版IDP,即iOS Development Enterprise Program。注意是$299/Year那种,并不是$99/Year的那种。

这种方式的IDP其最大的好处在于:可以发布“In House”应用。

这种应用使用一种叫做“In House Distribution Provisioning Profile”的文件进行发布,不能发布到Apple Shop进行销售,也不需要经过Apple的评审。你可以把“In House”应用通过任何方式发布给你的企业员工、用户及其他你认可的任何人,尤其适合于企业应用的开发。 (continue reading…)

1 Comment more...

Linux SFTP

由于采用明文传输用户名和密码,FTP协议是不安全的。在同一机房中只要有一台服务器被攻击者控制,它就可能获取到其它服务器上的FTP密码,从而控制其它的服务器。

当然,很多优秀的FTP服务器都已经支持加密。但如果服务器上已经开了SSH服务,我们完全可以使用SFTP来传输数据,何必要多开一个进程和端口呢?

下面,我就从账户设置、SSH设置、权限设置这三个方面来讲讲如何使用SFTP完全替代FTP。 (continue reading…)


js table to csv

$.fn.tableToCSV = function(filename) {
        var csv_str = "";
        function createCSVRow(data) {
            var row = "";
            for (var i = 0; i < data.length; i++) {
                var cell = (""+data[i]).replace('"', '""');
                row += ~cell.indexOf(";") ? '"' + cell + '";' :  cell + ";";
            }
            return row.replace(/(;$)/, "");
        }
        function popup(data){
            $("body").append('
'); $("#exportdata").val(data); $("#exportform").submit().remove(); return true; } this.each(function() { $("tr", this).each(function() { var cells = $("td,th", this).map(function() { return $(this).text(); }).get(); csv_str += createCSVRow(cells) + "\n"; }); }); popup(csv_str); //window.location = "data:application/csv;charset=utf=8;base64," + window.btoa(unescape(encodeURIComponent(csv_str))); };

(continue reading…)


“blindImageOptions” funktioniert nicht mehr

Seit TYPO3 4.3 funktionierte bei mir die Deaktivierung der Registerkarten Zauberbild und Drag & Drop nicht mehr.

Bisher benutzte ich den folgenden Eintrag:

RTE.default.buttons.image.options.removeItems = magic, dragdrop

bzw.

RTE.default.blindImageOptions = magic, dragdrop

Auffällig war, dass dieser Eintrag nur im RTE nicht mehr zu funktionieren schien, bei den Content-Elementen “Text mit Bild” bzw. “nur Bild” funktionierte das Ausblenden ohne Probleme.

Zwischenzeitlich findet man auch den passenden Bug:

http://bugs.typo3.org/bug_view_advanced_page.php?bug_id=13902

Viel interessanter ist jedoch hier die Problemlösung. Einfach die Einträge mit den korrekten Namen der Tabs versehen:

media_plain, media_magic, media_dragdrop, media_upload

Also zum Beispiel, um bei der oben beschriebenen Anforderung zu bleiben:

RTE.default.buttons.image.options.removeItems = media_magic, media_dragdrop
oder
RTE.default.blindImageOptions = media_magic, media_dragdrop

So einfach kann es manchmal sein …


TYPO3 installtool 白屏

Reason:
你的php.ini的variables_order值为”GPCS”,也就是说系统在定义PHP预定义变量时的顺序是GET,POST,COOKIES,SERVER,没有定义Environment(E),你可以修改php.ini文件的variables_order值为你想要的顺序,如:”EGPCS”。这时,$_ENV的值就可以取得了.

Typo3 solution: ss thumb. Comment line 1616. sysext/install/mod/class.xxxxxxxinstall.php

 


精简版uc_client

在应用需要整合ucenter时候需要用到 uc_client 目录,而往往我们并不需要那么多功能,那么有没有简单的方法呢?下面一个文件搞定ucenter 主要接口,包含,注册,登录,退出,同步登录相关接口。

(continue reading…)


德语字符排序

mb_internal_encoding("UTF-8");
$array1 = array('aümg', 'abc', 'aécas', 'bdö', 'äsasf', 'aäfa');
uasort($array1, 'utf_8_german::cmp');
var_dump($array3);
Result: array(6) { [5]=> string(5) "aäfa" [1]=> string(3) "abc" [2]=> string(6) "aécas" [0]=> string(5) "aümg" [4]=> string(6) "äsasf" [3]=> string(4) "bdö" }

(continue reading…)


page title

$GLOBALS['TSFE']->page['title'] = 'your title';
[globalVar = TSFE:id = {$newsSinglePid}] 
temp.newsTitle = RECORDS 
temp.newsTitle { 
source = {GPvar:tx_ttnews|tt_news} 
source.insertData = 1 
tables = tt_news 
conf.tt_news > 
conf.tt_news = TEXT 
conf.tt_news.field=title 
wrap = | 
} 
page.config.noPageTitle = 2 
(Your Object) > 
(Your Object) < temp.newsTitle 
[global]

__destruct函数引起return失效

当在一个function中new一个包含__destruct的对象时,如果__destruct中exit; 将导致function return value失效.

function __destruct() {
	$this->isFinalized = true;
	$cd = null;
	$this->cdRec = null;
	//exit;
}
1 Comment more...

eID ts setup

First you make an instance of the tslib_fe class like:
$GLOBALS['TSFE'] = t3lib_div::makeInstance('tslib_fe',
        $GLOBALS['TYPO3_CONF_VARS'],
        t3lib_div::_GP('id'),
        t3lib_div::_GP('type'),
        and more variables if you want
);
(please check your incoming values 😉

Do some other stuff (check if you need this)
$GLOBALS['TSFE']->connectToMySQL();
$GLOBALS['TSFE']->initFEuser();
$GLOBALS['TSFE']->determineId();
$GLOBALS['TSFE']->getCompressedTCarray();
$GLOBALS['TSFE']->initTemplate();
$GLOBALS['TSFE']->getConfigArray();

And you can get the configuration at:
$configuration =
$GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_yourextension_controller.'];

Copyright © 1996-2010 Add Lives. All rights reserved.
iDream theme by Templates Next | Powered by WordPress