首页 \ 问答 \ 哪个solrconfig.xml文件呢?(which solrconfig.xml file is it?)

哪个solrconfig.xml文件呢?(which solrconfig.xml file is it?)

我刚从他们的网站下载解压缩的SOLR zip文件。 它在教程中说我必须编辑solrconfig.xml文件。 有几个在不同的位置。

哪一个? 我应该在哪里有这个根文件夹? 在我的网络空间内?

LICENSE.txt  README.txt  client   contrib   docs   lib
CHANGES.txt  NOTICE.txt  build.xml  common-build.xml dist   example   src

我有一个示例/ solr / conf。 是那个吗?

以及data-config-xml。 我应该创建一个,然后在solrconfig.xml中键入它的路径? 该教程不是描述性的。


i have just unzipped SOLR zip file downloaded from their website. and it says in the tutorial i have to edit the solrconfig.xml file. there are several in different locations.

which one is it? and where should i have this root folder? inside my web space?

LICENSE.txt  README.txt  client   contrib   docs   lib
CHANGES.txt  NOTICE.txt  build.xml  common-build.xml dist   example   src

ive got one in example/solr/conf. is it that one?

and about the data-config-xml. should i create one and then type in the path to it in solrconfig.xml? the tutorial isnt that descriptive.


原文:https://stackoverflow.com/questions/1895753
更新时间:2022-03-25 13:03

最满意答案

函数指针可以指向具有相同参数和返回类型的任何函数。 在上面的代码中,“bar”是一个指针, bar=&print表示让bar指向print 。 但是,一个函数不能=一个函数。
对函数指针有用的是,只要函数具有相同的参数和返回类型,它就可以指向ANY函数。 当函数指针用作另一个函数的参数时,这证明非常有用。
当函数用作参数时,传递的真实内容是函数的ADDRESS。 函数不能被解除引用(即它不能作为函数传递)。 我不太清楚,但似乎你的footest是相同的。


A function pointer can point to any function that has the same parameters and return type. In your codes above, "bar" is a pointer, and bar=&print means let bar point to print. However, a function cannot = a function.
What's good for a function pointer is that it can point to ANY function as long as the function has the same parameters and return type. This proves quite useful when a function pointer serves as a parameter of another function.
When function is used as an argument, the real thing that is passed is the ADDRESS of the function. A function cannot be passed dereferenced (i.e. it cannot be passed AS a function). I'm not quite clear, but it seems your implementations of foo and test are identical.

相关问答

更多
  • 您可以使用一个独立的函数来调用将您的实例绑定到它的包装器。 这是一个粗略的例子 #include #include #include // global function which works std::function memberCb; void task_global(float x, float y) { memberCb(x, y); } typedef void(*f_pointer)( ...
  • 感谢@OliCharlesworth和@ user814628的评论,我解决了我的问题。 正确的代码应该是: LONG (CWilExtender::* function)(LPSTR,LPVIPERVAR4,LONG)=&CWilExtender::DllVarHandler; 感谢您的帮助如此之快! Thanks to the comments by @OliCharlesworth and @user814628, I solved my problem. The correct code shou ...
  • 不。成员函数不是一个自由函数。 类型完全不同,并且指向成员函数(PTMF)的指针是函数指针中完全不同的,不兼容的对象。 (例如,PTMF通常要大得多。)最重要的是,指向成员的指针必须总是与指向要调用其成员的对象的实例指针一起使用,所以甚至不能像使用相同的方式使用 PTMF使用函数指针。 与C代码交互的最简单的解决方案是编写一个全局包装函数来调度您的调用,或者使您的成员函数成为静态的 (在这种情况下,它实际上成为一个自由函数): // global! Engine * myEngine; int theCa ...
  • 你可以试试 int functionPtr(int x, int y, int* addition) { // As JustSid mentioned in the comment, it would be good to check the pointer first if (addition) { *addition = x + y; } return x * y; } 要么 int functionRef(int x, int y, int& ...
  • 您在NULL检查中有一个额外的ptr解引用,并且您没有初始化指针。 修复后程序应如下所示: #include #include void changer(int **ptr) { if(*ptr==NULL) // Dereference once, not twice { *ptr=(int *)malloc(sizeof(int)); **ptr=2; } } int main() { int ...
  • 您可以使用模板。 template void foo( void(T::*)(), T&) { ... } 但是,人们更喜欢采用功能对象方法。 您可以动态或静态地执行此操作。 void foo(std::function func) { // std::bind is used to make this out of a member function } template void foo(T t = T()) { t(); ...
  • 那些const意味着不同的事情。 在 int memcmp ( const void * ptr1, const void * ptr2, size_t num ); const void * ptr1意味着memcmp会将ptr1视为指向常量数据并且不会修改它; 类似于const void * ptr2 。 因此,调用者知道所存储的值不会被改变并且可以相应地优化。 在类似的函数调用中 int result = memcmp(ptr1, ptr2, num); 变量ptr1 , ptr2和num被复制到 ...
  • 函数指针可以指向具有相同参数和返回类型的任何函数。 在上面的代码中,“bar”是一个指针, bar=&print表示让bar指向print 。 但是,一个函数不能=一个函数。 对函数指针有用的是,只要函数具有相同的参数和返回类型,它就可以指向ANY函数。 当函数指针用作另一个函数的参数时,这证明非常有用。 当函数用作参数时,传递的真实内容是函数的ADDRESS。 函数不能被解除引用(即它不能作为函数传递)。 我不太清楚,但似乎你的foo和test是相同的。 A function pointer can po ...
  • 与通过强制转换地址声明函数指针的方式相同。 int (*p)(int,int); p = ( int(*)(int,int) ) 0x123456; Just in the same way as how you declared the function pointer by casting the address. int (*p)(int,int); p = ( int(*)(int,int) ) 0x123456;
  • 为了通过指向成员类型的指针调用成员函数,必须使用operator .*或operator ->* 。 而在左侧,您必须指定要调用该成员函数的对象。 在你的情况下,尝试这样做可能看起来如下 A::B b_object; b_object.func = &A::func_to_call; A a_object; A::B other_b_object = (a_object.*b_object.func)(); 请注意,由于指针被声明为指向A的成员,因此.*运算符需要左侧的A类型对象。 然而,在你的具体情况 ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。