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 going to write a C# WinForms application which will run a long data-crunching task in a BackgroundWorker, show progress in a ProgressBar and have buttons to start, pause, resume and cancel the operation. I'd like to write the calculation in F#. Do you know of any good examples or readings available in the Web which can help me?
I have this method for downloading a script:
var script = document.createElement('script');
script.setAttribute("src", url);
document.getElementsByTagName("head")[0].appendChild(script);
This gives me a GET like this:
GET http://127.0.0.1:17315/Scripts/abc.js HTTP/1.1
However I need to add a header:
Authorization: Bearer Ipnsfm9h1MWYIM0n1ng
Can anyone tell me how I can add a header when I am using Javascript to perform the GET?
It looks like this:
var objDiv = document.getElementById("code");
objDiv.scrollTop = objDiv.clientHeight;
works in Chrome, but not FF, and this:
var objDiv = document.getElementById("code");
objDiv.scrollTop = objDiv.scrollHeight;
works in FF, but not Chrome.
Is there a better all around way to do this?
I have select, insert, update and delete query.
If I have to write all queries in the same stored procedure that is good for performance or should I write all queries in separate stored procedures?
I have an application (an STA EXE) which is developed in .Net 2.0 has the provided some hooks so that one can write plug-ins. I planned to write a plug-in in .Net 4.0, which will be a dll. Please let me know what is the best way to do two way communication between these two application.
There are two textboxes one for email and other one for phone i have used one custom validation control so that user have to fill any one of textboxes for client side i used javascript
function ValidatePhoneEmail(source, args) {
var tboxEmail = document.getElementById('<%= tboxEmail.ClientID %>');
var tboxPhone = document.getElementById('<%= tboxPhone.ClientID %>');
if (tboxEmail.value.trim() != '' || tboxPhone.value.trim() != '') {
args.IsValid = true;
}
else {
args.IsValid = false;
}
}
how to achieve same result using jquery
I would like to use an XML database like eXist to store and query editable form submissions, with a changelog storing prior versions of each document.
How should I structure the database to easily query the latest version of each document?
I would like to write a small module that can check if anything is connected to my computer's HDMI input, and if so write a frame of video to bitmap once in a while.
Can anyone point me to resources regarding grabbing audio/video from HDMI on windows?
What is the optimal way to write the code which interacts with DB using linq2SQL? I need to add some business logic to the entities. So I guess there are two ways:
Write some wrapper class. The
main minus is that many fields are
the same, so i don't feel it as DRY
style.
Add business logic methods
to linq2sql entities(these classes
are partial) directly
???
Hello,
I am trying to replace a string with a new string in a python file and write the new string permanently to it. When I run the below script it removes part of the string and not all of it. The string in the file is:
self.id = "027FC8EBC2D1"
And the script I have to replace the string is:
def edit():
o = open("test.py","r+") #open
for line in open("test.py"):
line = line.replace("027FC8EBC2D1","NewValue")
o.write(line)
o.close()
edit()
Thanks for any help.
i have an char array b[20] which i want to write into a file . After every iteration the value of b[20] changes , so i would like to write the string in each line of the file in each iteration . So how can i change a new line in a file and also put in a array of character?
I'm trying to write a parser that will read a particular file type, and I need to map the different data types to C# equivalents. Most of them aren't that difficult, but I'm having trouble wrapping my head around what "int16 with a bias of 14" means. I've deduced that it's some kind of floating point type, so my best bet would be to write a converter that would map it to a float, double, or decimal type. I'm not sure where to take it from here, though.
I'm trying to save some text inside an environment for later use. The smallest test case I could come up with is this. The saved text in the sbox isn't available after the environment is closed. How can I work around that? Thanks.
\documentclass{article}
\begin{document}
\newsavebox{\somebox}
\begin{itemize}
\item hello1
\item hello1 \sbox{\somebox}{Some text}
\end{itemize}
This should show something, but does not: "\usebox{\somebox}"
\end{document}
I'd like to write small scripts which feature incremental search (find-as-you-type) on the command line.
Use case: I have my mobile phone connected via USB, Using gammu --sendsms TEXT I can write text messages. I have the phonebook as CSV, and want to search-as-i-type on that.
What's the easiest/best way to do it? It might be in bash/zsh/perl/python or any other scripting language.
Thanks!
I am working with telecom company. I am familiar with Java programming language. But now I have a task to write a script, with Linux operating systems. I have to write a script for fetching data from other computer and check some conditions. How can I do that using Java?
If we need to write a new line to a file we have to code:
file_output.write('Fooo line \n')
Are there any reasons why Python not has a writeln() method?
Hi!
I'm working on a db but i'm kinda new to this so i've bumped into a problem today.
I've got some tables: OFFICE, ROOM, EMPLOYEE and DOCUMENT. Document must specify the sender, which can be a single employee, an entire room or an entire office so it must have a reference to the primary keys of those tables.
Should I do a "parallel" table for handle it (for example i've done one for handle the multiple recipients documents) or there is another way?
Thank you
If we need to write a new line to a file we have to code:
file_output.write('Fooo line \n')
Are there any reasons why Python not has a writeln() method?
i have put in my source code to show live twitter search result on my webpage.
Although it shows the search result but when i open the source code of my webpage it don't shows the tweets text in my source code.iT DYNAMICALLY LOADS IT I GUESS.
iS there a way out to fetch the content of div and write it with some functions like document.write or etc.
1) how to write a code to close a conform box by pressing esc key.
2) how to write a code to save a data what ever we entered in the present web form if we press yes in conform box.... if press no need to be in same web form..
Any one knows how to write and read NSMutableArray or Dictionary data using AsycSocket Library ?
Clarification: I want a way to archive NSMuatbleArray and write this on the stream. seemed pretty forward but running in simulator I get this wierd error
[NSKeyedUnarchiver initForReadingWithData:]: incomprehensible archive
Base question:
Why can I write in Scala just:
println(10)
Why don't I need to write:
Console println(10)
Followup question:
How can I introduce a new method "foo" which is everywhere visible and usable like "println"?
Write a program in C program to find the sum of the following:
The input contain a sequence of two or more positive integers terminated by -1. Write a piece of code to count the ‘incidences’ in this sequence (i.e. the number of pairs of equal, adjacent numbers). For example, the following sequence contains 4 incidences:
4 2 9 9 3 7 7 7 3 3 -1