ambiguity

Sending POST parameters with Python using Mechanize

爱⌒轻易说出口 提交于 2019-12-24 07:54:22
问题 I want to fill out this form using Python: <form method="post" enctype="multipart/form-data" id="uploadimage"> <input type="file" name="image" id="image" /> <input type="submit" name="button" id="button" value="Upload File" class="inputbuttons" /> <input name="newimage" type="hidden" id="image" value="1" /> <input name="path" type="hidden" id="imagepath" value="/var/www/httpdocs/images/" /> </form> As you can see, there are two Parameters that are named exactly the same, so when I'm using

Is this handling of ambiguities in dypgen normal or is it not?

风流意气都作罢 提交于 2019-12-24 01:26:29
问题 I would like to know, if this is a bug or behavior, that is intended by the inventor. Here I have a minimal example of a dypgen grammar: { open Parse_tree let dyp_merge = Dyp.keep_all } %start main %layout [' ' '\t'] %% main: | a "\n" { $1 } a: | ms b { Mt ($1,$2) } | b <Mt(_,_)> kon1 b { Koo ($1, $2, $3) } | b <Mt(_,_)> kon2 b { Koo ($1, $2, $3) } | b { $1 } b: | k { $1 } | ns b { Nt ($1,$2) } /* If you comment this line out, it will work with the permutation, but I need the 'n' ! */ /* | b

VB.NET: Ambiguous class name error when no ambiguity exists

半城伤御伤魂 提交于 2019-12-23 12:46:05
问题 A client of ours reported that when trying to use our .NET .DLL in VB.NET they receive the error: error BC31429: 'OurClass' is ambiguous because multiple kinds of members with this name exist in namespace 'our.company.nspace' I've also been able to reproduce the error with a dummy project containing the single line of Dim x as our.company.nspace.OurClass Normally this is because there are several types with names differing only in case. But in this case there is no such ambiguity. OurClass is

What is wrong with this grammar? (ANTLRWorks 1.4)

感情迁移 提交于 2019-12-21 22:15:06
问题 I have the following code written in ANTLRWorks 1.4 grammar hmm; s : (put_a_in_b)|(put_out_a)|(drop_kick)|(drop_a)|(put_on_a); put_a_in_b : (PUT_SYN)(ID)(IN_SYN)(ID); put_out_a : (PUT2_SYN)(OUT_SYN)(ID) | (E1)(ID); drop_kick : ('drop')('kick')(ID); drop_a : (DROP_SYN)(ID); put_on_a : (E2)(ID); PUT_SYN : 'put' | 'place' | 'drop'; PUT2_SYN : 'put' | 'douse'; IN_SYN : 'in' | 'into' | 'inside' | 'within'; OUT_SYN : 'out'; E1 : 'extinguish'|'douse'; DROP_SYN : 'drop' | 'throw' | 'relinquish'; WS :

LINQ to SQL: How to handle ambiguous column names when joining tables?

僤鯓⒐⒋嵵緔 提交于 2019-12-21 19:24:39
问题 I'm going to bootstrap this question with a previous one I asked: LINQ to SQL: Multiple joins ON multiple Columns. Is this possible? So I have a LINQ query: var query = from t1 in myTABLE1List // List<TABLE_1> join t2 in myTABLE1List on new { t1.ColumnA, t1.ColumnB } equals new { t2.ColumnA, t2.ColumnB } join t3 in myTABLE1List on new { t2.ColumnA, t2.ColumnB } equals new { t3.ColumnA, t3.ColumnB } select new {t1.ColumnA, t2.ColumnA, t3.ColumnA } // Duplicate Anon type 'ColumnA' How can I

C++ method call and type scope resolution ambiguity

余生长醉 提交于 2019-12-20 18:16:44
问题 I hope the title actually describes what I wanted to ask... I wrote a piece of code that compiles with gcc and works as I intended. However, it does not compile with llvm and the code executes differently when compiled with icc! Here is an example of the problem: #include <iostream> using std::cout; using std::endl; class A { public: virtual void foo() { cout << "A::foo()" << endl; } }; class B : public A { public: typedef A base; virtual void foo() { cout << "B::foo()" << endl; } }; int main

Content model ambiguity in a schema

本秂侑毒 提交于 2019-12-20 03:21:43
问题 Maybe I've been staring at this problem for too long, maybe there isn't an answer; either way I'm here now. I'm trying to permit a set of possible combinations in an XSD, but I can't seem to find an approach that doesn't result in ambiguity. Quick regexy respresentation: foo+ ( bar baz* | bar? baz+ qux* ) foo is required ( one-or-more ) If bar exists, baz is optional ( zero-or-more ) If baz exists, bar is optional ( zero-or-one ) and qux is optional ( zero-or-more ) qux can not exist if baz

C++ Operator Ambiguity

好久不见. 提交于 2019-12-19 09:42:12
问题 Forgive me, for I am fairly new to C++, but I am having some trouble regarding operator ambiguity. I think it is compiler-specific, for the code compiled on my desktop. However, it fails to compile on my laptop. I think I know what's going wrong, but I don't see an elegant way around it. Please let me know if I am making an obvious mistake. Anyhow, here's what I'm trying to do: I have made my own vector class called Vector4 which looks something like this: class Vector4 { private: GLfloat

Anonymous Namespace Ambiguity

允我心安 提交于 2019-12-18 05:36:27
问题 Consider the following snippet: void Foo() // 1 { } namespace { void Foo() // 2 { } } int main() { Foo(); // Ambiguous. ::Foo(); // Calls the Foo in the global namespace (Foo #1). // I'm trying to call the `Foo` that's defined in the anonymous namespace (Foo #2). } How can I refer to something inside an anonymous namespace in this case? 回答1: You can't. The standard contains the following section ( §7.3.1.1 , C++03): An unnamed-namespace-definition behaves as if it were replaced by namespace

Django model with 2 foreign keys from the same table

旧时模样 提交于 2019-12-17 15:27:47
问题 I wanted a Django model with 2 foreign keys from the same table. It's an event table which has 2 columns for employees: the 'actor' and the 'receiver'. But I get this error: Error: One or more models did not validate: tasks.task: Intermediary model TaskEvent has more than one foreign key to Employee, which is ambiguous and is not permitted. Is there a better way to model this? Thanks I think I'm going to add a TaskEvent_to_Employee table. There will be two records in it, one for each of the