Friday, 15 May 2015

algorithm - Find all the rows given the number of matching attributes and the query -


Below is my problem definition:

Looking at a database d, Are I looking at a query, which is a vector of standard attributes and the number of matches, k how to find all line IDs, such as the number of properties matched in the query is more or more efficiently?

The Easy Edition (I think) is that & lt; A vector of = m has been given -Certual attributes, how to find the AIDS of those rows; = Matches M-secretary attributes.

In some queries (for example), they need to scan the whole data in the query every time it comes in. I think it's not fast enough, I'm not really sure about the complexity on it.

If this is possible, then I want to avoid scanning all the rows in the database. Therefore, I am thinking of building some types of index, but I am thinking that there is no current work for them or not?

In addition, is it a similar problem and what is it called?

Thank you very much for your help.

(Regarding coding, I mainly use Python 2.7 for code 2).


hyperlink - jQuery tabs (clik on tab and link redirect) -


मेरे पास jQuery के टैब हैं

  & lt; div id = "tabs" & gt; & LT; ul & gt; & Lt; li & gt; & lt; a href = "# टैब -1" & gt; पहला & lt; / a & gt; & lt; / li & gt; & Lt; li & gt; & lt; a href = "# टैब -3" & gt; तीसरा & lt; / a & gt; & lt; / li & gt; & Lt; li वर्ग = "अंतिम" & gt; & lt; a href = "/ More.aspx" & gt; अधिक जानें ... & lt; / a & gt; & lt; / li & gt; & Lt; / ul & gt; & Lt; / div & gt; & LT; स्क्रिप्ट & gt; टैब्स ({fx: [{अस्पष्टता: 'टॉगल', अवधि: 'सामान्य'}, {अस्पष्टता: 'टॉगल', अवधि: 'तेज'}]})। AddClass ('ui- टैब खड़ी '); $ ("Li.last a")। Unbind ('click')। प्रत्येक (फ़ंक्शन () {this.href = $ .data (यह, 'href.tabs');}); & Lt; / स्क्रिप्ट & gt;  

यह jquery 1.7.2 में काम है, लेकिन 2.1.0 में नहीं ...

मुझे इस स्थिति में टैब पर क्लिक करने के लिए विकल्प चाहिए, जो कि कुछ लिंक पर पुनर्निर्देशित है सामान्य लिंक की तरह ... मुझे मिल रहा है:

/ अपरिभाषित और अधिक। एस्पैक्स पर रीडायरेक्ट की आवश्यकता

धन्यवाद!

<

आप इस बात को देख रहे हैं

  $ (function () {$ ("# tabs") .tabs (); $ ("li.last a")। Unbind ('click');});  

c# - Issue with datetime "String was not recognized as a valid DateTime" -


I am using the code below to check datetime and it is working fine in my machine, But once deployed, I am getting the

"The string was not recognized as a valid date time."

Please provide me the solution to work in all machines.

  DateTime1 = DateTime Pars ("16/05"); MM / DD string today's date = date time.Now Toaster ("MM / DD"); If convert (broken) (broken) (nowadays)> Convert. Tundetime (Date 1. Toastring ("MM / DD")) {// logic}  

Honestly, since both answers do not satisfy me, this is mine ..

Let's look at our code line through the line;

  DateTime Date = DateTime Pars ("16/05");  

uses your settings by default , if none IFormatProvider does not provide the second parameter as its overload This means that if you have any DD / MM from your current culture (or your current culture's means the current meaning then I would like to present the date of the current culture In separator ), this parsing operation will be successful. This means that this line throws probably FormatException which relies on existing culture settings.

  string nowadays date = date time.Now Toasting ("MM / dd");  

Datetime.now gives a local working time. With this, ToString () method you try to get it with a string representing the format MM / dd . but wait! You used the / format specifier again and still, you have not used any IFormatProvider . Since this format varies with the current culture date separator from the specifier, so your todaydate can be 05/16 , 05-16 or 05.16 . It relies entirely on the date separator that your current culture is used to.

  Convert. Tutorial (nowadays)  

Convert.ToDateTime method explicitly uses DateTime.Parse , because you have any Also, the IFormatProvider is not provided, it will use your current culture and this is the standard date and time format. As I said, the result may be nowadays can be 05/16 , 05-16 or 05.16 But it's no guarantee that your existing culture parses this string successfully because it can not be in in standard date and time formats MM / dd If it parses "16/05" successfully, it means there is a dd / MM format, in that case, of course can not be MM / dd as a standard date and time format. A culture no can parse DD / MM and MM / DD formats at the same time. In such a case, it does not know that the 01/02 string should be parsed as 2 January or 1 February, okay?

  Convert.ToDateTime (date1.ToString ("MM / DD"))  

Here is the same as todaydate It is a string, it will result in "05/16" result (this depends on the existing culture date separator) and still there is no guarantee of successfully parsing it. / P>

And as stated in the comments, there is no point in parsing your string in datetime, and it also gets the representation of the same string.

I strongly suspect that you try to compare your current date or not, compared to your parsed date time, you can use it to compare it with. This property gets as a datetime in the form of current date part plus midnight time. for example;

  dated DT; If (DateTime.TodayTypeExact ("16/05", "DD / MM", Culture Info. InvoiceTechTech, Datetime Style No, Out DT)) {if (Datetime.DateTime.DT) {// Your Operation}} < / Code> 

javascript - HTML5 Canvas Text not appearing? -


I know this is a frequently asked question, but I am very confused why my code is not working This is for my Bela where I have problems. The main problem is found on lines 85-87 where it is not displayed.

  ctx.fillStyle = "white"; Ctx.font = '80pt Helvetica'; Ctx.fillText ("Hello World!", 100, 100);  

Good, you're updating, then render

For example:

  function draw () {Ctx.fillStyle = "black"; Ctx.fillRect (0, 0, canvas.Wind, canvas.high); If (gamestate) {ctx.fillStyle = "white"; Ctx.fillRect (player.x, player.a, player.method, player.height); Ctx.fillRect (ball.x, ball.y, ball.width, ball.height); } If (gameState === false) {// For example, for example, click here ctx.fillStyle = "White"; Ctx.font = "bold 16px aerial"; Ctx.fillText ("PONG", 100, 100); } // gamestate} The end of the ceremony game () {update (); to present(); } // ... function render () {ctx.clearRect (0, 0, canvas.width, canvas.height); Attract (); }  

Pro-tip: Also consider step-debugging. It is often useful with such situations.


javascript - Meteor: how to open external links in Safari -


I am using meteorite 1.0.3.2 to create a hybrid app that includes links that use vendor websites Are there.

My dilemma: I can not contact Safari. All of my links are being loaded in WebView. I have tried some methods which recommend editing my appellगit with code, But I'm more interested in setting up an HTML and I do not have to do anything.

I'm looking deeply linking but there is not much that can be found on Safari. I've found that only working code, the search engine to paste the contents into the search bar href = "x -web-search: //? Using http: //website.com " I think if I can do this, then targeting me to a website with some variation of the website should be able. If someone knows something about this, please tell me!


Thanks!


Escaping from Equation Editor in VBA Word -


I am opening the equation editor program in MS Word using code

  ObjRange = Selection.Range set objRange = Selection.Math Add (objRange) Selection.TypeText text: = "a ^ 2 + b ^ 2 = c ^ 2" Selection.TypeText text: = "1/2" set objEq = objrange.omaths (1) objEq.Type = wdomathInline objEq .buildUp  

Now I want to exit the equation editor so that I can type some regular text. I could not find a direct route. I have an alternative solution, which means to enter it effectively and then going backspace once.

  Selection.Type Paragraph Selection. Mov Left Unit: = wdCharacter, Calculation: = 1  

But is not there a cleaner way?

Thank you.

OK, it's actually very simple Type:

  Selection. Above right unit: = wdCharacter, calculation: = 1  

is created after the equation.


Using JQuery -> QUnit in jsfiddle without external resources -


I was trying to test a quinn code snippet in jsfiddle, and see if you have frameworks and Under the extension, choose JQuery , a quinn note check box appears. I clicked it and required

  & lt; Div id = "qunit" & gt; & Lt; / Div & gt; & Lt; Div id = "qunit-fixture" & gt; & Lt; / Div & gt;  

then added

  // tried first: exam (work) (ok (true, "test");}) ; // Try again: QUnit.test (Task (emphasis) {OK (true, "test");});  

In the Javascript box, click Run and nothing happens, and Chrome's Dev tool's Javascript console shows that Quinn is not defined.

Googling shows several quick examples where they have included QUnit.css and QUnit.js as external resources, but I am thinking that JSFDL's quinnit external resource option has broken, or If I'm doing something wrong.

"post-text" itemprop = "text">

By comment @ j08691:

In the console I see the resource Failed to load: The server responded with a status of 404 (not found). It seems that the people of JSWલ્ડ people need to update their link.

By 3/16/2015, this is the case.