|
To be honest, you have to lie!
You could assume that every video has the same number of votes. The votes that are not 'real' would be neutral or average. If your scale is 1-5 and every video has the same number of votes then the video with the one vote at 5 also has 199 at 2.5.
((199*2.5)+(1*5))/200
video 2 needs 176 votes at 5 to equal video 2's rating
better still assume all videos have 1000 votes (or whatever) - still works out the same
video 1 with 200 votes at 4.7
(200*4.7+800*2.5)/1000=2.94
video 2 with 1 vote at 5
(1*5+999*2.5)/1000=2.503
video 2 with 176 votes at 5
(176*5+(1000-176)*2.5)/1000=2.94
|
|
|
|
|
Hi,
I have seen on G**gle search results; some companies list keywords at the bottom of their webpages so the G**gle search engine will find the page if the term found is on the page.
I would like to try something like this to generate sales leads.
The list of keywords I have is pretty long.
I would like to put 50 keywords on each page. Each page would be the exact same except for the keywords at the bottom.
Is there a program which would auto generate .htm pages with a template and add a certain number of keywords from a list at the bottom of each?
I know it sounds pretty specific... but who knows. There is a lot of specialty software out there
Thanks
D
|
|
|
|
|
I have a aspx vb project, im testing to see if a certain font is installed , if its not
it should be downloaded and installed on the client pc, is there some way of doing it in the background without the
client user knowing of it being done,
or any other suggestions are welcome
thanx
|
|
|
|
|
I'll avoid your site, I don't want anything downloaded and installed automatically without my consent. Doing so is a bad idea and won't be possible with proper security settings. Inform the user they need additional components and let them choose to download and install it.
only two letters away from being an asset
|
|
|
|
|
good answer but not solution
Anshuman Singh
|
|
|
|
|
Yes, there is a solution, don't do it or ask the user to download fonts package.
only two letters away from being an asset
|
|
|
|
|
Even for regional language websites, I refrain visiting websites which require custom fonts. The recommended option is Unicode.
I am voting a '5' for your message.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
If the certain font is just for a title or a small part of your text, you could use an image instead...
|
|
|
|
|
The site is only going to be used inside the company, so no worries about unwanted stuff to be downloaded,
The font I need is for a barcode and its nog going to be the same all the time, its for label printing.
I know the easiest way of making sure its on the client side is to manually installing the font where the app is going to be used, but its not allways going to be guaranteed the user will be on the same pc, so in that case if the font is not dedected it must be placed in the Windows/fonts directory
|
|
|
|
|
I found some script to do it but it only works on server side
Dim objStream
objStream = CreateObject("ADODB.Stream")
objStream.Type = 1 ' adTypeBinary
objStream.Open("URL=http://10.52.223.67/PPE/Font/FRE3OF9X.ttf")
objStream.SaveToFile("C:\Temp\FRE3OF9X.ttf", 2) ' adSaveCreateOverWrite
objStream.Close()
objStream = Nothing
Const FONTS = &H14&
Dim objShell
Dim objFolder
objShell = CreateObject("Shell.Application")
objFolder = objShell.Namespace(FONTS)
objFolder.CopyHere("C:\Temp\FRE3OF9X.ttf")
on the client side I get the following error
System.Runtime.InteropServices.COMException: Write to file failed
[COMException (0x800a0bbc): Write to file failed.]
|
|
|
|
|
THIS IS THE WRONG WAY WHAT YOU WANT TO DO
in this case this link will help you, you need to create EOT file
Procedure to prepare Dynamic Fonts ( EOT) -
Before creating these files keep following points in your mind -
1.Install the desired font on your local machine first.
2.Keep the file name same as your font name.
3.Do not use multiple hindi fonts while authoring.
http://webservices.nic.in/wsmad/ResourceCentre/hindiweb.aspx
|
|
|
|
|
Thank you , I'll look into it, got fed up with all the security restrictions, made a exe to install all the fonts , gave the user only the option of running the app and not downloading it,
used this tag to modify the download dialog
|
|
|
|
|
|
hi,
i'm trying to hide/show content of i-frame, id of all section that i wabt to hid/show is same so it hide/show only first occurance of id, code goes like this:
function hidediv(){
document.getElementById('hideshow').style.visibility = "visible";
}
function showdiv(doc) {
document.getElementById('hideshow').style.visibility = "hidden";
}
function displyXML()
{
var div = document.getElementById("myframe");
var doc = div.contentDocument;
if (doc == undefined || doc == null)
doc = div.contentWindow.document;
doc.open();
doc.write("<script src=\"js/scripts.js\" type=\"text/javascript\" language=\"javascript\"> </script>");
for (i=0;i<title.length;i++)
{
// reading data from XML to display in i-frame
strMsg =title[i].childNodes[0].nodeValue;
strUrl = (link[i].childNodes[0].nodeValue);
txt=description[i].childNodes[0].nodeValue;
doc.write("<a href="+strUrl+">+strMsg+</a>");
doc.write("<a href='javascript:showdiv()'> expand </a>");
doc.write("<a href='javascript:hidediv()'> collapes </a>;");
doc.write(" <p id='hideshow' > ");
doc.write(txt+"</p>"); // text i want to hide n show
doc.write(" <br \>");
}
doc.close();
}
how i can show/hide respective part of i-frame?
thanx.
|
|
|
|
|
The ID attribute of an element must be unique within the scope of a document. If you have multiple elements with the same ID, that is violating the rules of XML/XHTML. If you wish to hide/show multiple sections at once, the simplest solution would be to use jquery and CSS classes to tag each element with a common class, and use JQuery to hide all the ones that match a given CSS selector.
|
|
|
|
|
Hello!
I got a button with this code to reset the page:
javascript:document.aspnetForm.reset();return false;
it works like a charm. Except when the page is reloaded the javascript suddenly doesnt work anymore. Nothing at all happens when I click the button.
Does anyone have an idea why this might be?
|
|
|
|
|
I am just speculating here, but maybe the browser thinks there is nothing to reset if the page has just been loaded? Maybe it keeps of track of whether anything has actually been modified in the form before deciding whether to do anything about a "reset" call.
--
gleat
http://blogorama.nerdworks.in[ ^]
-- Number Two's eyes narrowed and became what are known in the Shouting and Killing People trade as cold slits, the idea presumably being to give your opponent the impression that you have lost your glasses or are having difficulty keeping awake. Why this is frightening is an, as yet, unresolved problem. -- HHGTG
|
|
|
|
|
Thanks for your reply! You´re absolutely right, if I type something after the reload, the new text will be deleted when I click the button, but the old text remains!
I wonder how one should solve this, I wouldn´t want to do a postback just to emtpy a few textboxes.
|
|
|
|
|
I don't know why but I tried this way and it's worked :
<script type="text/javascript">
function resetForm()
{
var tag = document.getElementById("form1").reset();
return false;
}
</script><input type="button" name="button" id="button" value="Button" onclick="resetForm();"/>
|
|
|
|
|
thanks for your reply! I ended up using jquery though.
|
|
|
|
|
you must try once after disable view state every control and all controls are inside form tag
Anshuman Singh
|
|
|
|
|
Hello All:
I send the HTTP request to web Server in my program ,which based on ChtmlView (MFC). and I can get the HTTP response ,the body of response is HTML element. But ,if there are some images in this web page, I think web browser need to download the images from the web server.
I want to know The web browser how to download the images. what is the trigger? When the image is download to temporary file, Is the images URL(like ) need to relocate to temporary file ?
I want to know the whole process HTML by IE or other web browser.
Thank you very much!
Lampa
|
|
|
|
|
Dear All,
In My ASP.NET/ASP web application, I have to generate Read Only or Password Protected excel(.xls)file where end user won't able to do edit in that file.
Please provide me your guidenace and suggestions .
Thanks,
Vivek
|
|
|
|
|
Perhaps someone could tell me what is wrong with this script please. It doesn't work in FireFox.
<asp:Button ID="butAddImg" Text="Image?" runat="server" OnClientClick='return SetViewImg(this,"fuAddImg");' CausesValidation="False" />
<asp:FileUpload ID="fuAddImg" Enabled="false" runat="server" />
<script language="javascript" type="text/javascript">
function FindCont(SourceCont,ContToFind){
var conPf_array = SourceCont.name.split("$");
var countArray = conPf_array.length;
var ContPath = (conPf_array[0] + "$");
for (var i = 1; i <= (countArray - 2); ++i)
{
ContPath = ContPath + (conPf_array[i] + "$");
}
ContPath = ContPath + ContToFind;
return ContPath;
function SetViewImg(controlToEval, fuContName) {
var fuControl = FindCont(controlToEval, fuContName);
if (document.getElementById(fuControl).disabled == true) {
document.getElementById(fuControl).disabled = false;
return false;
}
else {
document.getElementById(fuControl).disabled = true;
return false;
}
}
Thanks in advance.
}
|
|
|
|
|
Ginozzzz wrote: var conPf_array = SourceCont.name.split("$"); //break the name down
always use
document.getElementById(controlname)
|
|
|
|