Hi,
Is it possible to configure Solr so that the document similarity score would be in the range for example from 0 (no match) to 1 (complete document and query match).
Thanks!
I am implementing a snippet-based content management system into my current project. Snippets can be associated with a page either by exact match of the full url falling back to a wildcard match on a partial url or finally a default snippet.
To implement this I have a created table of page associations with a wildcard flag, the system first checks the current url against the non-wildcard associations and if it doesn't find a match it checks against the partial url's where the wildcard flag is set.
In order to achieve this I am getting all the partial url's from the database and putting them into an array then walking the array to check for a match against the current url:
protected function _check_wildcard($url = NULL)
{
if($url)
{
$q = $this->db->where('wildcard' ,'Y')
->from('content')
->get();
$wildcards = $q->result_array();
foreach($wildcards AS $wildcard)
{
if(strpos($url,$wildcard['url']) > 0)
{
return $wildcard['snipppet_id'];
}
}
}
else
{
return NULL;
}
}
Can anyone suggest a better way to do this - preferably one that doesn't involve having to constantly download the full list of all the wildcards each time I load a page as I am afraid that this will have a negative effect on the scalability of the system down the line?
I basically have a div on my Web Site that always has the same stuff. However, this div is not present on all pages which is why I won't use the dynamic web template. I was wondering if it was possible for PHP to get the code from a document on the server and put in into the div?
Ex:
div id="section...
then my text file contains
(p) hello (p)
basically I want PHP to put it into the div when the user sees it.
If theres a smarter way of acheiving this I'd be open to it aswell.
Thanks
I am developing a project in asp.net web forms. I have a little problem. Whent the page load, I load some data from the dabase and present it on the page. On the same page I have form where I can input some textobox and with the click on the button make update on the same data in the database whis is at the first time loaded on the same page?
The date is update, I can see it in SQL SERVER, but on the web page not. Its still the old data presents.
After I close my application and run it again, then the new data appears on the page.
Hi,
I am developing a website in Sharepoint 2007. I came across a bit tricky problem. I have a document library web part in a web part page. I am using the summary toolbar view. I dont want users to add new documents on first screeen where it shows folders. I want them to open the folders and add documents there. I cannot do a No toolbar view because it will remove the link from every subsequent page. Has anyone implemented something like this. Please help.
I want to develop a web app which user can access it using android default web browser (at least). There are some issue about the app screen control but i still can't find the solution anywhere else and i don't know where can i find for the look-alike. I need the app to be
Full screen
If(No.1 is impossible) navigation bar is either permanently shown or permanently hidden
The app is fixed to the position and can't be scrolled horizontally or vertically and no scroller appear on the right side
Are all or some of these can be done using javascript/css/html?
We have a images folder which has about a million images in it.
We need to write a program which would fetch the image based upon a keyword that is entered by the user.
We need to match the file names while searching to find the right image.
Looking for any suggestions.
Thanks
N
I want to implement a code that loops inside an array that its size is set by the user that means that the size isn't constant.
for example:
A=[1,2,3,4,5]
then I want the output to be like this:
[1],[2],[3],[4],[5]
[1,2],[1,3],[1,4],[1,5]
[2,3],[2,4],[2,5]
[3,4],[3,5]
[4,5]
[1,2,3],[1,2,4],[1,2,5]
[1,3,4],[1,3,5]
and so on
[1,2,3,4],[1,2,3,5]
[2,3,4,5]
[1,2,3,4,5]
Can you help me implement this code?
We work on an internal corporate system that has a web front-end as one of its interfaces.
The front-end (Java + Tomcat + Apache) communicates to the back-end (proprietary system written in a COBOL-like language) through SOAP web services.
As a result, we pass large XML files back and forth.
We believe that this architecture has a significant impact on performance due to the large overhead of XML transportation and parsing. Unfortunately, we are stuck with this architecture.
How can we make this XML set-up more efficient?
Any tips or techniques are greatly appreciated.
I am implementing a FakeDataSet class by implementing IDbSet interface. As part of implementing this interface, I have to implement Find method. All my entity classes has an Guid type Id column. I am trying to implement Find method for this FakeDbSet class but having hard time to write it in a generic way. Below is my attempts for writing this method but since it does not know about Id been Guid type, I am getting compilation error on m.Id call. Any ideas on how this could be accomplished?
public class FakeDataSet<T> : IDbSet<T> where T: class, new()
{
// Other methods for implementing IDbSet interface
public T Find(params object[] keyValues)
{
var keyValue = (Guid)keyValues.FirstOrDefault();
return this.SingleOrDefault(m => m.Id == keyValue); // How can I write this
}
}
Hi everybody,
I'm decommissioning a meeting room scheduling [web] tool in favor of the same Outlook's functionality.
I'd like, however, to publish (read-only) a "Group Schedule" view in a web page.
To make the idea more clear:
On Outlook's Calendar view, select Actions / View Group Schedules and then create a new group for say, Conference Rooms.
This new view will give a global view of Conference Rooms occupancy. I need a way to publish this room's occupancy.
Any idea or suggestion?
Thanks in advance
I want to create a url like www.facebook.com/username just like Facebook does it. Can we use mod_rewrite to do it. Username is name of the user in a table. It is not a sub directory. Please advise.
public static IQueryable<Institution> WithFunds(this IQueryable<Institution> query, IEnumerable<Fund> allowedFunds)
{
return query.
}
I want to get the query to return all Institutions having any of the Fund given in 'allowedFunds' list in Institution.Funds. Please help.
My class hierarchy goes like this.
public partial class Institution
{
public int Id { get; set; }
public virtual ICollection<Fund> Funds { get; set; }
}
public partial class Fund
{
public int Id { get; set; }
public virtual Institution Institution { get; set; }
}
I have a largish array of string that I want to use as a lookup.
I a using in_array(), but I suspect its doing a simple loop through - does anyone know whether the in_array() algo uses a bsearch algo?
Hi all,
I'm trying to sync data from my application onto the server. I'm very
new to this kind of work.
For this i wrote a small web service in php,
insertData($_get['username'], $_get['password']);
?
Now, i'm not able to figure out how to call this web service and how
to send the 2 variable values to the insertData function from the app
using xCode.
Any kind of help on this would be appreciated.
Thanks & Regards,
NR
As you can imagine, Googling or Binging for any phrase containing an '@' is difficult.
In creating a new web service, one of the members of the imported C# proxy class is prefixed with the @. For example:
plan.@event = new Insurance.Event();
I assume that it is Visual Studio's way resolving potential conflicts with reserved words because 'event' is a reserved word. Changing the property in the web service interface to something other than 'event' (i.e. 'healthevent') removes the @ from the property. Is this a correct assumption?
Hi,
i have two models:
class Category
has many :jobs
end
class Job
belongs_to :category
end
So for sure i'm able to do
c = Category.first
c.jobs
My question is: how can i find just categories that has at least one job?
On pageload i want to show all fields in repeater control and on typing licenseid in the textbox i want to show that specific licenceid details
IF I place below code in the datasource of repeater,First one is not working.In the second one i placed a textbox and put its value to 0 on pageload.it is working.But i want both to be working.
SELECT * FROM License WHERE (0 = @selectAll OR LicenseID=@LicenseID) -> Not working
SELECT * FROM License WHERE (0 = @selectAll ) ->working
SELECT * FROM License WHERE (LicenseID=@LicenseID)-> working
Thanks in advance for the help