» Home » returns » Page 1
Access: User may select from comboBox (returns a number) or type a name (returns a string)
by Tommy in 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


Jython returns False to gettattr([alist],'__reversed__') while Python returns True
by cbot5000 in 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


createfile returns error invalid_handle_value and getlasterror returns can't find file specified
by ms-access in 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

CoreData NSFetchRequest returns results but section number of objects returns 0
by Ari in 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

java UrlClassLoader: findResources returns null, but loadClass returns classes
by IndyColtsFan in 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);

In Objective-C, what difference does it make when initWith returns (Fraction *) and init returns (id)?
by Al Velella in 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];
}

Javacard Shareable Interface: lookupAID returns AID but getAppletShareableInterface returns null
by Sivavt in 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


mysql_query() returns returns true, but mysql_num_rows() and mysql_fetch_array() give "not a valid resource errors
by Sweden in 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:"

PHP, MySQL, jQuery, AJAX: json data returns correct response but frontend returns error
by Aires in 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:



postgres “Returns Table” returns a string
by Vytautas in Databases

I am using the SQL language on Postgres to return a table using the RETURNS TABLE command:


CREATE OR REPLACE FUNCTION procreadbudget()
RETURNS TABLE(budgetmonth character, budgetincome numeric, budgetexpense numeric) AS
$BODY$
SELECT budget_month, budget_income, budget_expense FROM budget ORDER BY unique_id;
$BODY$
LANGUAGE 'sql' VOLATILE

Next
Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2014 © bighow.org All Rights Reserved .