[Solved] Perl module, inhereting from DBI , “Can’t call method ‘prepare'” error [duplicate]

Your code includes this line: if (!my $mysqlopen) { &conexion(); } You call your conexion sub with no arguments. However, this sub expects several arguments, including a blessed object, that you don’t provide. You might want to fix that. $database and $hostname also are expected in the arguments. Your call to conexion will always be … Read more

[Solved] Import data from opened excel files [closed]

Try this code: OleDbConnection oledbConn = new OleDbConnection(); try { string path = HttpContext.Current.Server.MapPath(“~/virtual path for your file”); if (Path.GetExtension(path) == “.xls”) { oledbConn = new OleDbConnection(“Provider=Microsoft.Jet.OLEDB.4.0;Data Source=” + path + “;Extended Properties=\”Excel 8.0;HDR=Yes;IMEX=2\””); } else if (Path.GetExtension(path) == “.xlsx”) { oledbConn = new OleDbConnection(@”Provider=Microsoft.ACE.OLEDB.12.0;Data Source=” + path + “;Extended Properties=”Excel 12.0;HDR=YES;IMEX=1;”;”); } oledbConn.Open(); OleDbCommand … Read more

[Solved] Output is not giving garbage value

Reading uninitialized variable follow below rules, Static variable are by default initialized to zero means local static or file scope variable (global one). Non-static variables which local to function are indeterminate. Reading them prior to assigning a value results in undefined behavior. compiler is free to do any thing. It can be zero, it can … Read more

[Solved] Why is the pseudo-class “:read-only” not working for a “disabled” element?

If you test in Firefox, you will see your code working fine so I assume it’s a bug or a lack of support for Google Chrome .pseudo-test input:read-write { color: blue; } .pseudo-test input:read-only { color: red; } <div style=”margin-top:10px” class=”pseudo-test”> <form action=”another-action.php”> <input type=”search” value=”What do you want to search for?” size=”100″ disabled> </form> … Read more

[Solved] How do i format this project

If you want to show the complete data in first row you can do this: $i = 0; while($job = $result->fetch_object()){ if( $i == 0 ) { echo ‘<tr>’; echo ‘<td>’ . $job->JobDate .'</td>’; echo ‘<td>’ . $job->ReportTime.'</td>’; echo ‘<td>’ .$job->StartTime.'</td>’; echo ‘<td>’.$job->CustomerName.'</td>’; echo ‘<td>’.$job->EmployeeName.'</td>’; echo ‘<td>’.$job->EquipmentNumber.'</td>’; echo ‘<td>’.$job->JobDescription.'</td>’; echo ‘<td>’.$job->JobNotes.'</td>’; echo ‘</tr>’; } else … Read more

[Solved] (“”) printing not working in python [closed]

The parentheses on the while loop are not Python syntax, try: while a <= 999…: # colon, not parenthesis a += 1 # not just a + 1, you need to assign back to a too print(…) Or, more Pythonic: for a in range(999…): print(…) 2 solved (“”) printing not working in python [closed]

[Solved] What means just “” in head of html page? [closed]

<!DOCTYPE html> is the explicit Document Type Declaration From the linked page: The DOCTYPE Declaration (DTD or Document Type Declaration) does a couple of things: 1. When performing HTML validation testing on a web page it tells the HTML (HyperText Markup Language) validator which version of (X)HTML standard the web page coding is supposed to … Read more

[Solved] Search through an array in Java

I would prefere to use a collection of hospital objects instead of the array, but if this is not what you want you may use this: int highestPriorityHospitalIndex(int[] a) { for (int priority = 1; priority <= 7; priority++) { for (int i = 0; i < a.length; i++) { if (a[i] == priority && … Read more

[Solved] Declaration of array size is illegal

A declaration of an array in Java doesn’t require or allow a size specification. This would require to consider int[10] a type, so that, for example, type(int[10]) != type(int[5]). But in Java you can just declare a T[] type without being able to force the size for the declaration. You just create an array of … Read more