($width) AND $width .= 'px';
$style = " style=\"width: $width\"";
}
$value = $value ? $value : date('H:i');
$s = " ";
return $s;
}
// form_date('start', '2018-07-05') 为空则当前日期
function form_date($name, $value = 0, $width = FALSE)
{
$style = '';
if (FALSE !== $width) {
is_numeric($width) AND $width .= 'px';
$style = " style=\"width: $width\"";
}
$value = $value ? $value : date('Y-m-d');
$s = " ";
return $s;
}
/**用法
*
* echo form_radio_yes_no('radio1', 0);
* echo form_checkbox('aaa', array('无', '有'), 0);
*
* echo form_radio_yes_no('aaa', 0);
* echo form_radio('aaa', array('无', '有'), 0);
* echo form_radio('aaa', array('a'=>'aaa', 'b'=>'bbb', 'c'=>'ccc', ), 'b');
*
* echo form_select('aaa', array('a'=>'aaa', 'b'=>'bbb', 'c'=>'ccc', ), 'a');
*/
?>组保留的标签 余下为需要删除的标签
unset($oldtag[$key]);
}
}
}
if (!empty($oldtag)) {
$tagids = array();
foreach ($oldtag as $tagid => $tagname) {
$tagids[] = $tagid;
}
well_oldtag_delete($tagids, $tid);
}
$r = well_tag_process($tid, $fid, $create_tag, $tagarr);
return $r;
}
// 删除标签和绑定的主题
function well_oldtag_delete($tagids, $tid)
{
$pagesize = count($tagids);
$arrlist = well_tag_find_by_tagids($tagids, 1, $pagesize);
$delete_tagids = array(); // 删除
$tagids = array();
$n = 0;
foreach ($arrlist as $val) {
++$n;
if (1 == $val['count']) {
// 只有一个主题
$delete_tagids[] = $val['tagid'];
} else {
$tagids[] = $val['tagid'];
}
}
!empty($delete_tagids) and well_tag_delete($delete_tagids);
$arlist = well_tag_thread_find_by_tid($tid, 1, $n);
if ($arlist) {
$ids = array();
foreach ($arlist as $val) $ids[] = $val['id'];
well_tag_thread_delete($ids);
}
!empty($tagids) and well_tag_update($tagids, array('count-' => 1));
}
// 标签数据处理 $arr=新提交的数组 $tagarr=保留的旧标签
function well_tag_process($tid, $fid, $new_tags = array(), $tagarr = array())
{
if (empty($tid)) return '';
// 新标签处理入库
if ($new_tags) {
$threadarr = array();
$tagids = array();
$i = 0;
$size = 5;
$n = count($tagarr);
$n = $n > $size ? $size : $size - $n;
foreach ($new_tags as $name) {
++$i;
$name = trim($name);
$name = stripslashes($name);
$name = strip_tags($name);
$name = str_replace(array(' ', '#', "@", "$", "%", "^", '&', '·', '<', '>', ';', '`', '~', '!', '¥', '……', ';', '?', '?', '-', '—', '_', '=', '+', '.', '{', '}', '|', ':', ':', '、', '/', '。', '[', ']', '【', '】', '‘', ' ', ' ', ' ', ' ', ' '), '', $name);
$name = htmlspecialchars($name, ENT_QUOTES);
if ($name && $i <= $n) {
// 查询标签
$read = well_tag_read_name($name);
if ($read) {
// 存在 count+1
$tagids[] = $read['tagid'];
} else {
// 入库
$arr = array('name' => $name, 'count' => 1);
$tagid = well_tag_create($arr);
FALSE === $tagid and message(-1, lang('create_failed'));
$read = array('tagid' => $tagid, 'name' => $name);
}
$tag_thread = array('tagid' => $read['tagid'], 'tid' => $tid);
$threadarr[] = $tag_thread;
$tagarr[$read['tagid']] = $read['name'];
}
}
!empty($threadarr) and tag_thread_big_insert($threadarr);
!empty($tagids) and well_tag_update($tagids, array('count+' => 1));
}
$json = empty($tagarr) ? '' : xn_json_encode($tagarr);
return $json;
}
?>return $r;
}
/**
* @param int $page 页数
* @param int $pagesize 每页显示数量
* @return mixed
*/
function link_find($page = 1, $pagesize = 100)
{
$arr = link__find($cond = array(), array('rank' => -1), $page, $pagesize);
return $arr;
}
/**
* @param $id
* @return bool 返回FALSE失败 TRUE成功
*/
function link_delete($id)
{
if (empty($id)) return FALSE;
$r = link__delete(array('id' => $id));
link_delete_cache();
return $r;
}
//--------------------------kv + cache--------------------------
/**
* @return mixed 返回全部友情链接
*/
function link_get($page = 1, $pagesize = 100)
{
$g_link = website_get('friends_link');
if (empty($g_link)) {
$g_link = link_find($page, $pagesize);
$g_link AND website_set('friends_link', $g_link);
}
return $g_link;
}
// delete kv and cache
function link_delete_cache()
{
website_set('friends_link', '');
return TRUE;
}
?> $v = implode(",", $v);
$temp[] = $v;
}
// 去掉重复的字符串,也就是重复的一维数组
$temp = array_unique($temp);
// 再将拆开的数组重新组装
$output = array();
foreach ($temp as $k => $v) {
if ($stkeep) $k = $starr[$k];
if ($ndformat) {
$temparr = explode(",", $v);
foreach ($temparr as $ndkey => $ndval) $output[$k][$ndarr[$ndkey]] = $ndval;
} else $output[$k] = explode(",", $v);
}
return $output;
}
// 合并二维数组 如重复 值以第一个数组值为准
function array2_merge($array1, $array2, $key = '')
{
if (empty($array1) || empty($array2)) return NULL;
$arr = array();
foreach ($array1 as $k => $v) {
isset($v[$key]) ? $arr[$v[$key]] = array_merge($v, $array2[$k]) : $arr[] = array_merge($v, $array2[$k]);
}
return $arr;
}
/*
* 对二维数组排序 两个数组必须有一个相同的键值
* $array1 需要排序数组
* $array2 按照该数组key排序
* */
function array2_sort_key($array1, $array2, $key = '')
{
if (empty($array1) || empty($array2)) return NULL;
$arr = array();
foreach ($array2 as $k => $v) {
if (isset($v[$key]) && $v[$key] == $array1[$v[$key]][$key]) {
$arr[$v[$key]] = $array1[$v[$key]];
} else {
$arr[] = $v;
}
}
return $arr;
}
?>
Windows 7 64位下如何安装Turbo C++-软件玩家 - 软件改变生活!
Few days ago we have posted an article about installing Turbo C++ on 32 bit Windows 7 . Now we are providing step-by-step procedure how to install Turbo C++ on64 bit Windows 7 .
1. Install the software DOSBox ver 0.73 : download here 2. Create a folder,for example „Turbo “ (c:\Turbo\) 3. Download and extract TC into the Turbo folder (c:\Turbo\):download here 4. Run the DOSBox 0.73 from the icon located on the desktop: 5. Type the following commands at the command prompt [Z]: mount d c:\Turbo\ [The folderTC is present inside the folder Turbo] Now you should get a message which says: Drive D is mounted as a local directory c:\Turbo\ 6. Type d: to shift to d: 7. Next follow the commands below:
cd tc
cd bin
tc or tc.exe [This starts you the Turbo C++ 3.0 ]
8. In the Turbo C++ goto Options>Directories> Change the source of TC to the source directory [D] ( i.e. virtual D: refers to original c:\Turbo\ . So make the path change to something like D:\TC\include and D:\TC\lib respectively )
How to start TurboC++ in the DOSBox automatically: You can save yourself some time by having DOSBox automatically mount your folders and start TurboC++:
For DOSBox versions older then 0.73 browse into program installation folder and open the dosbox.conf file in any text editor. For version 0.73 go toStart Menu and click on “Configuration ” and then “Edit Configuration “. Then scroll down to the very end, and add the lines which you want to automatically execute when DOSBox starts. Automatically mount and start Turbo C++3.0 in DOSBox ver 0.73: Scroll down to the very end, and add the lines: Those commands will be executed automatically when DOSBox starts! Please note:
Full screen: Alt and Enter
When you exit from the DosBox [precisely when u unmount the virtual drive where Turbo C++ 3.0 has been mounted] all the files you have saved or made changes in Turbo C++ 3.0 will be copied into the source directory(The directory which contains TC folder)
Don’t use shortcut keys to perform operations in TC because they might be a shortcut key for DOSBOX also . Eg : Ctrl+F9 will exit DOSBOX rather running the code .
VIDEO tutorial (there is another setup – original path to Turbo C++ is h:\tc\ and drive H is mounted as drive C:)
本文标签:
Windows Turbo
更多相关文章 windows上PostgreSQL和Postgis安装 Windows下PostgreSQL和对应的版本的Postgis安装 PostgreSQL安装 1、官网下载地址 https:www.enterprisedbdownloadspostgres-postgresql-downlo
彻底关闭WSL Windows子系统 net stop LxssManager net start LxssManager
windows操作系统有哪些版本 Windows主要有桌面版和服务器版、移动版三个版本桌面版现在主流是WindowsXP、WindowsVista、Windows7、Windows8、Windows10其中WindowsXP已经被淘汰了,现在主
windows7内存诊断工具有用吗_windows内存诊断工具有什么用 windows内存诊断工具有什么用 导读:内存可以说是电脑的重灾区,很多电脑问题都跟内存有关。内存稍微有点问题都有可能导致系统运行不稳定,最常见的表现就是蓝屏
Redis的安装与配置(Windows系统下) 文章目录 一、Redis简介二、Windows下的安装三、配置1.查看配置2.编辑配置 总结 一、Redis简介 Redis 简介 REmote DIctionary Server(Redis) 是一个由 Salvatore Sanfil
【Git学习】Windows系统下如何删除已经保存的账号密码 一、背景 今天QQ群里有人在使用Git命令去clone Gitlab仓库的代码时,第一次弹框提示输入账号密码的时候输错了,然后后面就一直拒绝,不再重复提示输入账号密码&am
Windows 1011下安装labelImg标注工具 abelImg是深度学习最常用的标注工具之一,下面讲解安装方法! 1、下载windows免安装版本进入下载地址:Releases · HumanSignallabe
Windows 聚焦壁纸种子文件下载分享 种子文件在下方。 更新增磁力链接: magnet:?xturn:btih:8f2949a758f786145ca5c59352b0febd04ddb768&dnwindows%E8%81%9A%E7%84%
Windows Codename“Longhorn“ Build 4074体验 Windows Codename"Longhorn" Build 4074体验 Wimndows Coodename "Longhorn"就是WindowsVista的测试版。今天ÿ
windows系统numpy的下载与安装 1.首先从https:www.lfd.uci.edu~gohlkepythonlibs上下载符合自己电脑的numpy 我是连mkl一起下载的 2.切记一定将文件放到python安装目录下的scripts文件夹中。
记一次windows下安装部署运维监控系统WGCOUD的步骤 首先我们去网站下载安装包,其实windows安装比较简单,解压启动就完了,但是前提我们要准备好mysql和配置好JDK1.8,server端主机需要配置
Windows Server 2019 安装图文教程超详细(2024版) 一,虚拟机安装: VMware Workstation Pro 17 安装图文教程 二,镜像下载: 镜像下载站点:MSDN,
适用Linux的Windows子系统 系列文章目录 文章目录 系列文章目录前言 前言 前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到网站,这篇
Windows系统安装启动Nacos 目录 Nacos一、什么是配置中心二、Nacos简介1. 什么是Nacos2. Nacos的特性 三、安装Nacos四、运行Nacos1. 修改启动方式2. 配置数据源 总结 Nacos 一、什么是配置中心 在微服务架构中
Windows下的Git的配置与使用 Git的配置与使用 一、Git的安装二、Git 的配置三、Git的工作原理四、Git项目的搭建本地仓库搭建1、创建全新的仓库2、克隆远程仓库 五、Git 文件的操作文件的四种状态忽略文件文件忽略的实现与规则 六、码云的使用1、生成SSH公钥
Windows下安装使用ffmpeg 1.ffmpeg是一个开源免费的软件,可以进行各种媒体格式转换 官网上就能下载,下载地址:Download FFmpeg 2.选择window版本下的from gyan.de
windows配置java环境 windows配置java环境 下载JDK安装JDK配置环境变量java9及以上版本配置环境变量(以java17为例,只需要配置JAVA_HOME和Path变量)配置JAVA
Windows单语言版显示语言限制解析与专业版升级指南 Windows单语言版显示语言限制解析与专业版升级指南 现象解析:为何系统仅支持单一显示语言? 当用户收到"Windows许可证仅支持一个显示语言"的提示时,这表明当前系统为Windows 10家庭单语言版。该版本是
Git 安装全攻略Linux、macOS、Windows 与源码编译 1 为什么要先安装(或升级)Git? 新特性 switchrestore 等现代命令只在较新版本提供。兼容性 Git 对旧版本高度兼容,但最新版
【免费下载】 VMware Windows 7 硬盘镜像 VMware Windows 7 硬盘镜像 【下载地址】VMwareWindows7硬盘镜像 VMware Windows 7 硬盘镜像本仓库提供了一项宝贵资源——VMware下适用于Windows 7操作系统的硬盘镜像文件 项目地址:
发表评论