白菜粉条汤
make life remembered
  • 首页
  • 分类
    • 随语
    • 杂志
    • 外贸
    • 技术
    • 图片
    • 电影
    • 音乐
    • 饮食
    • 大学
  • 关于
类别:

技术

技术

修改服务器远程桌面端口

by 曾经沧海 2021年8月15日

@echo off
color 0a
title @@ 修改Windows 2019远程桌面服务端口号 @@
echo ***
echo * 请输入您要更改的远程桌面端口号,范围:1-65535,不能与其他端口冲突 *
echo * 请首先确保新的端口号已经在防火墙被设置放行!! *
echo ***
echo.
set /p port=请输入端口号:
reg add “HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp” /v PortNumber /t reg_dword /d %port% /f
reg add “HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp” /v PortNumber /t reg_dword /d %port% /f
echo.
echo * echo * 重新启动远程桌面* echo *
reg add “HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server” /v fDenyTSConnections /t reg_dword /d 1 /f
reg add “HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server” /v fDenyTSConnections /t reg_dword /d 0 /f
echo.
echo 按任意键退出…
pause>nul
exit

2021年8月15日 0 评论 691 阅读
技术

Magento设置Paypal支付步骤

by 曾经沧海 2011年5月29日

1、Merchant Account:一般可以选美国,再填写你的paypal账号;

2、Select a PayPal Solution:选择Website Payments Standard就好。这样的效果是在客户填写完订单,最后一步转向Paypal主站,此时页面顶部的收款邮箱会显示第一步设置的邮箱,对于多邮箱的Paypal账号很有用;

3、如果在第二步选择了Express Checkout,其实也可以下单,但是不同之处在于:
(1)订单在倒数第二步就会转向paypal;
(2)在paypal主站上显示的会是你Paypal的主要邮箱,而不是你专为本店设置的邮箱;

4、API/Intergration Settings:不需要设置;

5、遇到提示"This invoice has already been paid. For more information, please contact the merchant",那么进去paypal的账户->用户信息->卖家习惯设定->收款习惯设定->拒绝意外付款:否,允许每个账单号多次付款;

6、搞定,吃饭。

2011年5月29日 1 评论 1k 阅读
技术

MYSQL替换语句:批量修改、增加、删除字段内容

by 曾经沧海 2011年4月8日

在MYSQL中使用替换语句可以整批替换某字段的内容,也可以批量在原字段内容上加上或去掉字符。

命令总解:update 表的名称 set  替换字段=REPLACE(替换字段,原来内容,新内容)

举例说明:

1)批量替换

例一:
把“backupfile”表里“url”的字段内容为“http://google.com/”的全部改为“http://google.cn/”

update backupfile set url=REPLACE(url,’http://google.com/’,’http://google.cn/’)

例二:
把“wp_posts”表里的“post_content”字段里的“PJBlog”全部替换成“WordPress”

update wp_posts set post_content=REPLACE(post_content,’PJBlog’,’WordPress’)

例三:
把“wp_comments”表里的“comment_content”字段里的“PJBlog”全部替换成“WordPress”

update wp_comments set comment_content=REPLACE(comment_content,’PJBlog’,’WordPress’)
执行完了这段代码之后就会有提示多少条被替换了:

影响列数: 16 (查询花费 0.1297 秒)

2)根据条件增加字段的内容,如把file_number=1的记录的logical_name字段的内容前面加上tmp,后面加上end。

update backupfile set logical_name=REPLACE(logical_name,logical_name,’tmp’+logical_name+’ end ‘) where file_number=1
3)根据条件去掉指定记录的前面2个字符。

update backupfile set logical_name=REPLACE(logical_name,logical_name,SUBSTRING(logical_name,3,len(logical_name)-2)) where file_number=1
4)根据条件去掉指定记录的后面4个字符。

update backupfile set logical_name=REPLACE(logical_name,logical_name,SUBSTRING(logical_name,1,len(logical_name)-4)) where file_number=2

2011年4月8日 0 评论 497 阅读
技术

ZOHO CRM添加自定义字段公式

by 曾经沧海 2011年1月17日

比如要生成一个字段格式如下:

TS-20110117

“TS-“ 是前缀

2011是今年的年份

01是月份

17是日子

那么可以设置公式是这样的:

Concat(
‘TS-‘,
Tostring(Year(Now())),
Concat(Replace(Tostring(If(Len(Tostring(Month(Now())))>1,1,0)),’1′,”),Tostring(Month(Now()))),
Concat(Replace(Tostring(If(Len(Tostring(Dayofmonth(Now())))>1,1,0)),’1′,”),Tostring(Dayofmonth(Now())))
)

2011年1月17日 0 评论 427 阅读
技术

修改virtuemart的图片上传功能

by 曾经沧海 2010年9月8日

有2个图片上传的地方需要修改:

1 默认产品的大图,要把它修改为不管上传的图片多大,都会自动更改为640×480大小。

The solution for this case is to hack the main product image resize to max height/width 600px, open the the file in administrator/components/com_virtuemart/classes/imageTools.class.php file. Locate the following code.

original code

// Resize the Full Image
if( !empty ( $_FILES[$tmp_field_name]["tmp_name"] )) {
	$full_file = $_FILES[$tmp_field_name]["tmp_name"];
	$image_info = getimagesize($full_file);
}

Replace with the following code

// Beginning of Modify by DesignerSandbox
// resize the full product image dynamically and give it maximal dimensions 600x600 during uploading
// Resize the Full Image
if( !empty ( $_FILES[$tmp_field_name]["tmp_name"] )) {
	$full_file = $_FILES[$tmp_field_name]["tmp_name"];

	$image_info = getimagesize($full_file);
	$original_height =  $image_info[1];
	$original_width =  $image_info[0];

	if ($original_height > $original_width) {
		$largewidth = (480 / $original_height) * $original_width;
		$largeheight = "480px";
	} else {
		$largeheight = (640 / $original_width) * $original_height;
		$largewidth = "640px";
	}

	//Get Image size info
	list($original_width, $original_height, $image_type) = getimagesize($full_file);

	switch ($image_type)
	{
		case 1: $im = imagecreatefromgif($full_file); break;
		case 2: $im = imagecreatefromjpeg($full_file);  break;
		case 3: $im = imagecreatefrompng($full_file); break;
		default:  trigger_error('Unsupported filetype!', E_USER_WARNING);  break;
	}

	$big = imagecreatetruecolor($largewidth, $largeheight);

	/* Check if this image is PNG or GIF, then set if Transparent*/
	if(($image_type == 1) OR ($image_type==3))
	{
		imagealphablending($big, false);
		imagesavealpha($big,true);
		$transparent = imagecolorallocatealpha($big, 255, 255, 255, 127);
		imagefilledrectangle($big, 0, 0, $largewidth, $largeheight, $transparent);
	}
	imagecopyresampled($big, $im, 0, 0, 0, 0, $largewidth, $largeheight, $original_width, $original_height);

	//Generate the file, and rename it to $newfilename
	switch ($image_type)
	{
		case 1: imagegif($big,$full_file); break;
		case 2: imagejpeg($big,$full_file);  break;
		case 3: imagepng($big,$full_file); break;
		default:  trigger_error('Er ging iets fout!', E_USER_WARNING);  break;
	}}
// end of edit by DesignerSandbox

2 上传额外的图片时候,把默认的尺寸设置改为640×480:

打开:/administrator/components/com_virtuemart/html/product.file_form.php 文件,

把下列代码:

<?php echo $VM_LANG->_(‘PHPSHOP_PRODUCT_FORM_HEIGHT’);?>: <input type=”text” name=”fullimage_height” value=”500″ />&nbsp;&nbsp;&nbsp;
<?php echo $VM_LANG->_(‘PHPSHOP_PRODUCT_FORM_WIDTH’);?>: <input type=”text” name=”fullimage_width” value=”500″ /></div>

改为:

<?php echo $VM_LANG->_(‘PHPSHOP_PRODUCT_FORM_HEIGHT’);?>: <input type=”text” name=”fullimage_height” value=”480″ />&nbsp;&nbsp;&nbsp;
<?php echo $VM_LANG->_(‘PHPSHOP_PRODUCT_FORM_WIDTH’);?>: <input type=”text” name=”fullimage_width” value=”640″ /></div>

2010年9月8日 7 评论 477 阅读
技术

最简单的去掉Virtuemart Cart中的logo方式

by 曾经沧海 2010年8月21日

原文地址:

http://www.newworlddesigns.co.uk/blog/removing-hiding-the-virtuemart-logo-from-an-empty-cart-module/

I have wrote many times on the VirtueMart forums, on how to remove/hide the VirtueMart logo fro the Virtuemart Cart Module, but thought I would add it in here as well.

.vmCartModule img {
        display: none;
}

If you add this to your main template style sheet and refresh your page, it should work, you may need to do a cache refresh as well by holding down Shift+Reload (Shift+F5)
/templates/xxxxx/css/template.css

Is the usual path to your template css.

Some people say it should be here

/components/com_virtuemart/themes/theme.css

But to be honest it makes no difference at all, as long as it is loaded in, it can be anywhere you like.

2010年8月21日 0 评论 344 阅读
技术

VirtueMart 配置gamil发信技巧-Mail Settings设置

by 曾经沧海 2010年8月21日

当使用Virtuemart做为joomla的商店程序时,如果网站配置的发信邮箱是gmail的,可能会出现错误,导致无法发送信件。

解决方法如下:

在Site – Global Configuration – Server – Mail Settings下按如下设置:

mail server: SMTP server
Adress: name@gmail.com
Name: name
SMTP identification: Yes
SMTP security: none
Port: 25
User: name@gmail.com
Passwd: passwd
Smtp host: ssl://smtp.gmail.com:465

And IT IS NOT EQUIVALENT TO

(如果用下面的设置,目前来看会出错!)

mail server: SMTP server
Adress: name@gmail.com
Name: name
SMTP identification: Yes
SMTP security: SSL
Port: 465
User: name@gmail.com
Passwd: passwd
Smtp host: smtp.gmail.com

原文地址:http://forum.virtuemart.net/index.php?topic=58983.15

2010年8月21日 1 评论 459 阅读
技术

如何让IIS7显示ASP错误的详细信息

by 曾经沧海 2010年8月12日

在网站目录下建立web.config文件,内容如下:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpErrors errorMode="Detailed" />
        <asp scriptErrorSentToBrowser="true"/>
    </system.webServer>
</configuration>

这样就可以重新显示详细信息了。在Godaddy的虚拟主机上测试可行。

原文如下:

地址:http://internetoptimizers.com/2010/01/24/classic-asp-using-iis7-error-handling-500-internal-server-error-godaddy/

Classic ASP using IIS7 – Error Handling – 500 Internal Server

Howdy All,

This is a common problem I see lots of people running into since GoDaddy upgraded from IIS 6 to IIS 7.  The below story is a similar situation that I had while trying to work on a Classic ASP web site hosted at GoDaddy. I have included the answer/fix below.
Original Story:  I am with godaddy for webhosting right now. The have me using IIS7.
When I run my ASP page I get the error :

Error 500 :There is a problem with the resource you are looking for,
and it cannot be displayed.

Basically, there is an error in my code, however, it doesn’t tell me
the line number the error was found on. After searching the web I
found out how to turn on the more detailed error reporting… but you
have to do it on the webserver. I don’t have access to the webserver.

After spending allot of time chatting with godaddy, they claim I can
turn this on in the web.config file. I know this can be turn on for
ASP.NET in the web.config file… but as far as I know, not classic
asp.

OK…. Here is the web.config file I use that gives you the old school error handling data:

Step 1.  Open a text document.

Step 2.  Insert this code:

<configuration>
    <system.webServer>
        <httpErrors errorMode="Detailed"/>
        <asp scriptErrorSentToBrowser="true"/>
    </system.webServer>
</configuration>

Step 3.  Save the file as Web.Config

Step 4.  Upload the Web.Config file to your host web directory.

I hope this helps people avoid the few hours I was on the phone with GoDaddy technical support.  :)   Please let me know if this helps anyone out.

2010年8月12日 0 评论 401 阅读
技术

TYPO3: TYPO3 vs. Joomla – The definite answer

by 曾经沧海 2010年1月24日

原文地址:http://www.essentialdots.com/int_en/blog/typo3_typo3_vs_joomla_the_definite_answer/index.html

A lot of clients have asked us why is TYPO3 better than Joomla, as these two both aim for the title of the best PHP open-source CMS. If you try to "google" the answer you can mostly find just Joomla developers writing that TYPO3 is indeed more advanced but way more complex to set up – but without detailed comparison.

As we don’t offer any services on Joomla, I have invested some time in researching the differences between these two. For this article I have used information provided on the CMS Matrix web site as well as the list of Joomla flaws stated in the book Professional Joomla! by Dan Rahmel.

Document version control

Joomla completely lacks document version control. TYPO3 on other hand has great version control – you can control absolutely every record and content element in the page tree – you can undo changes, browse history etc. When creating custom record type, adding version control features is as easy as clicking on the "Enable versioning" check box in the Kickstarter.

Workflow feature

Joomla completely lacks workflow as well. For example, if you have many editors who write articles, it won’t be possible to allow chief editor to make decision what will be published and what will be returned for revision.

TYPO3 has great feature called "Task center" where you can define tasks for each user and workflow. For example:

  • a chief editor can create a task for editor to create a news article
  • once editor writes the article it passes it for review
  • once the chief editor reviews the article he can publish the article to the news archive, censor the article or he can return it to the editor for revision.

While the workflow system in TYPO3 certainly needs improvement, what is currently present is a great advantage over Joomla.

Import/Export of the content

Joomla lacks export functionality. In order to transfer content from one website to another you would have to dig into MySQL tables directly and manually copy all the files using FTP.

TYPO3 has built-in import/export functionality. You can export and import content using TYPO3’s native .t3d archives. These archives can contain both records and content elements from the database and files stored on a server’s file system. While this feature can be a little tricky on a complex web sites when you try to use it on just one part of the page tree, it certainly helps a lot in manipulating data and is very easy to use in most of the cases.

继续阅读
2010年1月24日 0 评论 434 阅读
技术

vbs批量重命名脚本

by 曾经沧海 2009年12月3日

功能::假设有个文件夹的所有文件名称前面有个AA_开头,这个小脚本的作用就是删除这个AA_。只是简单的小脚本,如果还有多个”_”字符的时候,重复使用有可能会全部都删除了。

使用:dir填写实际文件所在目录;target填写要分割的字符,保存为.VBS文件,双击运行。做好备份,因为是直接修改原始文件!

dir=("C:\Users\海军\Desktop\104CANON")
target=("_")

Set fso = CreateObject("Scripting.FileSystemObject")
set rfd=fso.getfolder(dir)
set fs=rfd.files
for each f in fs

        If InStr(f.name,target) Then
            length=Len(f.name)
            star=InStr(f.name,target)
            newname=Right(f.name,length-star)
            f.name=newname
        End If

Next

2009年12月3日 0 评论 395 阅读
加载更多

热门

  • 无线餐饮点菜系统–去年的毕业设计

    2008年9月21日 36 评论 2.4k 阅读
  • Magento设置Paypal支付步骤

    2011年5月29日 1 评论 1k 阅读
  • 垃圾

    2017年3月12日 0 评论 892 阅读
  • 办公室的两只猫

    2017年12月19日 0 评论 873 阅读
  • 记录

    2007年10月6日 0 评论 870 阅读

最新

  • 每天都好难过

    2023年3月3日 0 评论 24 阅读
  • 梦见

    2023年3月1日 0 评论 26 阅读
  • 再没有机会当面叫伯伯了

    2023年2月27日 0 评论 28 阅读
  • 我对不起你

    2023年2月7日 0 评论 48 阅读
  • 我回来了

    2023年2月6日 0 评论 50 阅读

分类

  • 图片 (71)
  • 外贸 (6)
  • 大学 (103)
  • 技术 (75)
  • 杂志 (290)
  • 电影 (13)
  • 资源 (1)
  • 随语 (66)
  • 音乐 (96)
  • 饮食 (3)

归档

  • 2023年3月 (2)
  • 2023年2月 (3)
  • 2023年1月 (27)
  • 2021年8月 (2)
  • 2021年1月 (1)
  • 2020年3月 (1)
  • 2019年3月 (1)
  • 2017年12月 (2)
  • 2017年3月 (2)
  • 2011年10月 (3)
  • 2011年8月 (1)
  • 2011年7月 (1)
  • 2011年5月 (1)
  • 2011年4月 (1)
  • 2011年1月 (2)
  • 2010年12月 (1)
  • 2010年9月 (2)
  • 2010年8月 (5)
  • 2010年7月 (1)
  • 2010年6月 (1)
  • 2010年5月 (2)
  • 2010年4月 (3)
  • 2010年2月 (4)
  • 2010年1月 (9)
  • 2009年12月 (3)
  • 2009年11月 (3)
  • 2009年9月 (11)
  • 2009年8月 (6)
  • 2009年7月 (1)
  • 2009年6月 (2)
  • 2009年5月 (7)
  • 2009年4月 (13)
  • 2009年3月 (14)
  • 2009年2月 (2)
  • 2009年1月 (12)
  • 2008年12月 (19)
  • 2008年11月 (1)
  • 2008年10月 (9)
  • 2008年9月 (12)
  • 2008年8月 (5)
  • 2008年7月 (7)
  • 2008年6月 (13)
  • 2008年5月 (4)
  • 2008年4月 (10)
  • 2008年3月 (7)
  • 2008年2月 (7)
  • 2008年1月 (11)
  • 2007年12月 (4)
  • 2007年11月 (8)
  • 2007年10月 (30)
  • 2007年9月 (25)
  • 2007年8月 (29)
  • 2007年7月 (32)
  • 2007年6月 (2)
  • 2007年4月 (1)
  • 2007年3月 (2)
  • 2007年2月 (5)
  • 2007年1月 (7)
  • 2006年12月 (11)
  • 2006年11月 (24)
  • 2006年10月 (13)
  • 2006年9月 (16)
  • 2006年8月 (21)
  • 2006年7月 (18)
  • 2006年6月 (9)
  • 2006年5月 (27)
  • 2006年4月 (44)
  • 2006年3月 (21)
  • 2006年2月 (9)
  • 2006年1月 (6)
  • 2005年12月 (12)
  • 2005年11月 (17)
  • 2005年10月 (44)
  • 2005年9月 (12)

标签

asp错误 (1) cache (1) django (1) joomla (8) joomla extension (3) magento (2) magento connect (1) Magento Email Templates (1) pink (1) Plone (1) python (3) QTP (1) sef (2) so what (1) stop 0x0000007b (1) Sugar In The Marmalade (1) vbs (1) virtuemart (3) Virtuemart Menu (1) Zope (1) 专升本 (4) 周慧敏 (2) 喜爱 (1) 国庆 (1) 域名注册,域名 (1) 学生处 (6) 我爱谁 (1) 我的大学 (6) 我的大学编年史 (6) 拉肚子 (1) 樊海军 (6) 物理学系 (6) 物理系 (4) 电子信息工程 (4) 简单电话薄 (1) 聚会 (1) 肇庆 (4) 肇庆学院 (6) 计算机系 (4) 谭咏麟 (3) 软件测试 (4) 邓奎元,蔡金生,喝酒 (1) 酸 (1) 黎明 (2) 黎明 对不起 (1)
  • 首页
  • 分类
    • 随语
    • 杂志
    • 外贸
    • 技术
    • 图片
    • 电影
    • 音乐
    • 饮食
    • 大学
  • 关于

@2005-2023 - 白菜粉条汤

白菜粉条汤
  • 随语
  • 杂志
  • 资源
  • 外贸
  • 技术
  • 图片
  • 电影
  • 音乐
  • 饮食
  • 大学
登入

保持登录状态,直到我退出

忘记密码了吗?

找回密码

新密码将通过电子邮件发送给您。

收到新密码了吗? Login here