Posts

javascript - Table is not refreshed with knockoutjs -

i using knockoutjs simple 2d array table binding. table gets rendered ok, click function gets fired ok , rightindex getting updated. ui doesnt refresehd. this code: the html: <table> <tbody data-bind="foreach: representation "> <tr data-bind="foreach: $data, click: $parent.clickme"> <td data-bind="text: $data "> </td> </tr> </tbody> </table> the js: $(function () { var viewmodel = function () { var self = this; self.clickme = function (data, event) { var target; if (event.target) target = event.target; else if (event.srcelement) target = event.srcelement; if (target.nodetype == 3) // defeat safari bug target = target.parentnode; self.representation()[target.parentelement.rowindex][target.cellindex] = 1; }; self.representation = ko....

c++ - Calculating the angle between Points -

Image
working c++ , opencv i trying calculate angle between 2 points.....i have 2d plane changing center point of bounding box, if center point in frame 1 has changed location in frame 2 need find angle of these 2 points. here example of trying do: can suggest way of working out.......? kind of mathematical solution or perhaps c++ function. use dot product : v1.v2 = v1.x * v2.x + v1.y * v2.y v1.v2 = |v1| * |v2| * cos(theta) ---------------------------------+ | +--> theta = acos(v1.v2 / |v1|*|v2|) a sample code is: float anglebetween(const point &v1, const point &v2) { float len1 = sqrt(v1.x * v1.x + v1.y * v1.y); float len2 = sqrt(v2.x * v2.x + v2.y * v2.y); float dot = v1.x * v2.x + v1.y * v2.y; float = dot / (len1 * len2); if (a >= 1.0) return 0.0; else if (a <= -1.0) return pi; else return acos(a); // 0..pi } it calculates...

c# - need to get a page heading -

this code when displays, has page heading of main form, how can page heading page? <asp:content id="content1" contentplaceholderid="maincontent" runat="server"> <table cellpadding="5" cellspacing="5" border="0"> <tr> <td colspan="2" style="width:100px;"> <dx:aspxlabel id="aspxlabel1" runat="server" text="facility name:"></dx:aspxlabel> </td> <td colspan="9"> <dx:aspxtextbox id="tbfacility" runat="server" width="800px"></dx:aspxtextbox> </td> </tr> <tr> <td colspan="2"> <dx:aspxlabel id="aspxlabel3" runat="server" text="resident name:"></dx:aspxlabel> ...

component services - Getting a Catalog Error when trying to export a COM+ library -

we've got old vb6 com+ component that's running on 64-bit, windows 2003 r2 server sp2. need install proxy on new pc , found .msi wasn't there, thought i'd component services , export it. tried, got following error message: "catalog error error occurred while processing last operation. error code 8002801d - library not registered. the event log may contain additional troubleshooting information." well, event log didn't contain additional information. anyway, i'm confused error because several applications around site running using com+ service on server, don't know why library isn't registered. more point, see package in component services on server , it's running. why can't export proxy used on new pc?

javascript - Form submission determiend on Ajax response -

there's form users fill out , click submit button. data gets sent server , based on servers server's response form submitted or not (and page redirected or not). problem form submits , page redirects before server's response received. function submitform(name, data1) { var result; var checkresult = function(result) { alert("final value is: "+result) return result } var xmlhttp if (window.xmlhttprequest) {// code ie7+, firefox, chrome, opera, safari xmlhttp=new xmlhttprequest(); } else {// code ie6, ie5 xmlhttp=new activexobject("microsoft.xmlhttp"); } xmlhttp.onreadystatechange=function() { if(xmlhttp.readystate == 4 && xmlhttp.status == 200) { if(xmlhttp.re...

asp.net - Publish to folder disappeared after update 2 - visual studio -

Image
as doing right clicking project clicking publish site below screen appears. no regular publish folder option. this happened after visual studio 2012 update 2 how solve problem ? click drop down menu , create new profile settings want.

html - PHP/MySQL Hide file links -

i using php connect mysql database , customers can login website , lists rows form table based on login etc. i need able display <a href="...."></a> link file name in database don't want users able see link file. for example, can download file 1234.pdf , if can view actual link, might think of going same location doing file 5678.pdf meant user download. so want hide link in long string or i'm not sure start - ideas? thanks edit: lets customer logs in, can view rows table1 table1 customer file_link 1234.pdf 5678.pdf b 8765.pdf b 4321.pdf so, dont want customer able view links customer b. i mean, if customer hovers on link , can see main file path can type in web browser , change file name (guess it) else , download customers file(s) if you're planning on not letting others see file links wouldn't want search engines see them well. typical way of forbidding users trying out ...