» Home » returns » Page 1
Jython returns False to gettattr([alist],'__reversed__') while Python returns True
Category : Programming Languages

While debuging why cmd2 wont load in in Jython, I found out that it breaks because Jython returns False to gettattr([alist],'__reversed__') while Python returns True.


I would assume that the correct result is True as a list is reversible..


Anyone knows what is going on?


my next option is to browse around Jython source.. and I am not looking fo


View Replies


Access: User may select from comboBox (returns a number) or type a name (returns a string)
Category : Databases

So in my Access application, there's a field where the user selects a name from a dropdown list, or types one. The list should return a number (the PersonID of the person selected, if in the People table) or a string (if entering the name of someone not in the DB).


This must be a fairly common requirement, but I don't see any very simple way to do it. The way that first occurs to me


View Replies


CoreData NSFetchRequest returns results but section number of objects returns 0
Category : Operating Systems

I am currently trying to write my first CoreData project and am getting very confused. I am using the following code to setup a fetched results controller:


- (NSFetchedResultsController *)fetchedResultsController {
if (_fetchedResultsController != nil)
return _fetchedResultsController;
Singleton *singleton = [Singleton sharedSingleton];
NSF

View Replies


createfile returns error invalid_handle_value and getlasterror returns can't find file specified
Category : Programming Languages

I'm opening a port to communicate with a device and control the device, but the CreateFile() returns INVALID_HANDLE_VALUE.


The GetLastError() returns 2 which means can't find the file specified.


My code is shown below:


wsprintf( szPort, "COM%d", nPort );
m_hIDComDev = CreateFile( szPort, GENERIC_REA

View Replies


In Objective-C, what difference does it make when initWith returns (Fraction *) and init returns (id)?
Category : Programming Languages

In Stephen Kochan's Objective-C book (I have the 3rd Edition), one init function returns Fraction * and one returns id:


-(Fraction *) initWith: (int) n: (int) d {
self = [super init];
if (self)
[self setTo: n over: d];
return self;
}
-(id) init {
return [self initWith: 0 over: 0];
}

View Replies


Javacard Shareable Interface: lookupAID returns AID but getAppletShareableInterface returns null
Category : Programming Languages

edit 2: Found the mistake. I tried to initialize the Shareable object in the constructor. At that time the client's register method is not yet called, so the JCRE doesn't have its AID. While my server's getShareableInterfaceObject(AID clientaid, byte parameter) method doesn't require the client's AID to be != null the JCRE probably does, since it calls this method for my client. I now initializ


View Replies


java UrlClassLoader: findResources returns null, but loadClass returns classes
Category : Development Tools & Services

I made as default child of UrlClassLoader, added all my jar files by


public void addFile(String path) throws MalformedURLException {
String urlPath = "jar:file:/" + path + "!/";
System.out.println("------------------");
System.out.println("urlPath = " + urlPath);
URL url = new URL(urlPath);
System.out.println("url = " + url);

View Replies


mysql_query() returns returns true, but mysql_num_rows() and mysql_fetch_array() give "not a valid resource errors
Category : Programming Languages

Here is the code in question:


From index.php:


require_once('includes/DbConnector.php');
// Create an object (instance) of the DbConnector
$connector = new DbConnector();
// Execute the query to retrieve articles
$query1 = "SELECT id, title FROM articles ORDER BY id DESC LIMIT 0,5";
$result = $connector->query($query1);
echo "vardump1:"

View Replies


PHP, MySQL, jQuery, AJAX: json data returns correct response but frontend returns error
Category : Programming Languages

I have a user registration form. I am doing server side validation on the fly via AJAX. The quick summary of my problem is that upon validating 2 fields, I get error for the second field validation. If I comment first field, then the 2nd field does not show any error. It has this weird behavior. More details below:


The HTML, JS and Php code are below:


HTML FORM:



View Replies


regex_search returns true, but regex_match returns empty match set
Category : Programming Languages

This is weird, I have the following std::regex (rx)


{{alternate form ofs*|(?:d=)?(.*?)([|#][^|}]*)*}}

which regex_search returns true for when given this string (str)


{{alternate form of|abate|nodot=1}} {{qualifier|abbot}}.

but when I call regex_match(str, m, rx), the match set m is empty. Using JavaScript mode in RegexBudd


View Replies


Next
2012 / 2017 Copyrights BigHow , All Rights Reserved .