我想WordPress第一次创建一个php网站.
当我创建一个页面时,它会创建一个永久链接http://localhost/?p=123.我不知道是否有相应的文件.

我已经安装了insert-php插件来读取PHP代码.它在静态页面上工作正常.但是我如何包含另一个php文件?我想要包含my_utilities其中包含所有后端函数的内容login.它有一个永久链接'http://localhost/?page_id=45'.
该怎么办?
include 'http://localhost/?page_id=45' 不起作用.
我正在创建XMLHttpRequest,如下所示:
function checkDependencyFormFilledStatus(appName,formName){
var xmlhttp;
xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET","checkFormDependency.action formName="+formName+"&applicationName="+appName,false);
xmlhttp.send();
var dependentFormEmptyStatus = Ext.JSON.decode(xmlhttp.responseText);
alert(xmlhttp.responseText);
return dependentFormEmptyStatus;
}
Run Code Online (Sandbox Code Playgroud)
对象返回的响应取决于操作类正在使用的数据库.
这在Firefox 10.0中运行良好.
但是对于IE7,它只是第一次返回正确的响应.对于其余的函数调用,它返回相同的响应(无论我们在数据库中做了什么更改).它仅在我关闭选项卡并打开它时才更新其响应(即使在重新加载页面时也是如此).
如何使它在IE 7中工作?
我正在使用segmentio/kafka-go连接到Kafka。
// to produce messages
topic := "my-topic"
partition := 0
conn, _ := kafka.DialLeader(context.Background(), "tcp", "localhost:9092", topic, partition)
conn.SetWriteDeadline(time.Now().Add(10*time.Second))
conn.WriteMessages(
kafka.Message{Value: []byte("one!")},
kafka.Message{Value: []byte("two!")},
kafka.Message{Value: []byte("three!")},
)
conn.Close()
Run Code Online (Sandbox Code Playgroud)
我可以使用此代码生成到我的 Kafka 服务器中。
// to consume messages
topic := "my-topic"
partition := 0
conn, _ := kafka.DialLeader(context.Background(), "tcp", "localhost:9092", topic, partition)
conn.SetReadDeadline(time.Now().Add(10*time.Second))
batch := conn.ReadBatch(10e3, 1e6) // fetch 10KB min, 1MB max
b := make([]byte, 10e3) // 10KB max per message
for {
_, err := batch.Read(b)
if err …Run Code Online (Sandbox Code Playgroud) 我正在通过这个再次研究复制构造函数.
码:
#include <iostream>
using namespace std;
class Line
{
public:
int getLength( void );
Line( int len ); // simple constructor
Line( const Line &obj); // copy constructor
~Line(); // destructor
private:
int *ptr;
};
// Member functions definitions including constructor
Line::Line(int len)
{
cout << "Normal constructor allocating ptr" << endl;
// allocate memory for the pointer;
ptr = new int;
*ptr = len;
}
Line::Line(const Line &obj)
{
cout << "Copy constructor allocating ptr." << …Run Code Online (Sandbox Code Playgroud) 在下面的类,我想分配color为Color.White用于构造1; 当通过构造函数2调用时,应为其分配参数值.但是在这样做时,它首先调用构造函数1,然后构造函数1首先分配coloras Color.White,然后分配所需的值.
当涉及许多构造函数并包含对象时,问题变得合理.
有没有办法处理这些不必要的步骤?我想我错过了一些基本的东西.
public class Image
{
Texture2D texture;
Rectangle frame;
Rectangle offsetBound;
Color color;
// Constructor 1
public Image(Texture2D texture, Rectangle frame, Rectangle offsetBound)
{
this.texture = texture;
this.frame = frame;
this.offsetBound = offsetBound;
this.color = Color.White; // This is irrelevant
}
// Constructor 2
public Image(Texture2D texture, Rectangle frame, Rectangle offsetBound, Color color)
: this(texture, frame, offsetBound)
{
this.color = color;
}
}
Run Code Online (Sandbox Code Playgroud) apache-kafka ×1
c# ×1
c++ ×1
constructor ×1
go ×1
javascript ×1
oop ×1
php ×1
webpage ×1
wordpress ×1
xml ×1