如何使用PHP GD库制作锐度滤镜?
这样......

转向这......

如果用PHP不可能,那么其他语言能做什么?
是否可以拥有这样的c ++程序......
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello World!";
return 0;
}
Run Code Online (Sandbox Code Playgroud)
并在这样的网页上输出它...
<html>
<head>
<title>C++</title>
</head>
<body>
<div src = "cpp.exe"></div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud) 我正在使用C#和.NET,我有一个看起来像这样的正则表达式
"\D"
Run Code Online (Sandbox Code Playgroud)
这匹配所有非数字字符,但我不希望它匹配小数点(.)和负号( - ).我怎么能用正则表达式做到这一点?
所以我尝试了Chris'并做了一些调整以使其工作:
(我有一个名为"Original"的TextBox)
private void Original_TextChanged(object sender, EventArgs e) {
Regex regex = new Regex(@"[^\d.-]", RegexOptions.IgnoreCase);
Match match = regex.Match(Original.Text);
if (match.Success) {
Original.Text = regex.Replace(Original.Text, "");
Original.SelectionStart = Original.TextLength;
}
}
Run Code Online (Sandbox Code Playgroud)
这Original.SelectionStart = Original.TextLength;是因为每当它被替换时它将选择放在开头,这对用户来说似乎有点奇怪......
我希望我的程序以一个气球图标开始,一旦点击它就会出现一个窗口,但是当我尝试运行一个显示该消息的类时,我无法运行它,因为它不是一个表单.基本上我可以弹出一个气球警告,但一旦点击它就不会打开表格,因为它似乎已经终止程序(Program.cs中的Main()已经完成)
我试过这样的东西:
static void Main() {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
new TrayIcon();
}
Run Code Online (Sandbox Code Playgroud)
但它只显示警报但不起作用.
如果我使我的TrayIcon类成为部分Form并使用Application.Run()它可以工作,但也会弹出一个空的,丑陋的表单.
那么如何在没有程序结束的情况下首先弹出气球呢?
你怎么会从分配的颜色中获得颜色......
$col = imagecolorallocate($im, 255, 50, 5);
//A fake function - rgbfromallocate (that I wish I knew)
$rgb = rgbfromallocate($col);
print $rgb['r'];//255
print $rgb['g'];//50
print $rgb['b'];//5
Run Code Online (Sandbox Code Playgroud) 你能在Windows上用C++创建PNG,GIF等吗?
如果有可能,怎么样?例如,如何使png图像只有一种纯色.
只是一个"你好世界"的例子会很棒......
为什么以下代码不起作用?
#include <iostream>
#include <string>
int main(){
char filename[20];
cout << "Type in the filename: ";
cin >> filename;
strcat(filename, '.txt');
cout << filename;
}
Run Code Online (Sandbox Code Playgroud)
它应该在输入任何文件名的末尾连接".txt"
此外,当我尝试编译它(使用g ++)时,这是错误消息

我有一个类,有一个方法,当没有被调用导致崩溃.
有没有办法在不调用方法时使编译失败?
编辑:
所以我所拥有的基本上是一个类,它可以创建另一个类(一个表单),它是一个带有不再显示选项的信息框.这是一个如何使用它的例子.
public partial class Form1 : Form {
DontShowAgainBox box;
public void AlertYes() {
if (box.form.showagain.Checked)
t1.Text = "You chose yes (checked)!!!";
else
t1.Text = "You chose yes (unchecked)!!!";
}
public void AlertNo() {
if (box.form.showagain.Checked)
t1.Text = "You chose no (checked)!!!";
else
t1.Text = "You chose no (unchecked)!!!";
}
public Form1() {
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e) {
box = new DontShowAgainBox("Warning", "Are you sure?");
Action yesaction = new Action(AlertYes);
box.Bind_Yes(yesaction);
Action noaction …Run Code Online (Sandbox Code Playgroud)