Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: svar
  • Order by date
  1. svar

    weird storage behaviotr leading to segfault

    I need to pass a set of arrays to a program that does the work (e.g. an ODe solver). Now the way this is written is it allows a parameter array RPAR which is a 1-d double precision array However, the parameters that must be passed are a number of multidimensional arrays, and in once case a...
  2. svar

    What can go wrong with deallocate?

    This is the first time the code is invoked, but the S/R to which the allocated arrays are passed as arguments along with their dimensions is called multiple times(330 times). Interestingly enough it's on the last time the crash occurs...
  3. svar

    What can go wrong with deallocate?

    It is being done in the same routine. Between allocating and deallocating I'm only calling a routine with the allocated arrays and their dimensions as arguments. This routine does not change the array dimensions, so I am really puzzled.
  4. svar

    What can go wrong with deallocate?

    I have rewritten legacy code to use allocatable arrays I am defining these in the Subroutine that calls the ode solver DOUBLE PRECISION, dimension(:), ALLOCATABLE :: ATOL ,RTOL DOUBLE PRECISION, dimension(:), ALLOCATABLE :: WORK integer, DIMENSION(:), allocatable ...
  5. svar

    Debugging issue

    When running the zgees lapack program the actual matrix dimension N (=4) apparently changes to 0 on a statement SDIM=0 that does not affect N I looked for a NaN problem, but could not find something Then I ran gdb and noticed that although the declared matrix dimension LDA=10, these arrays...
  6. svar

    'passing' variables to the same page

    Point taken on not passing variables with ? in actions, but what about storing relevant info in $_SESSION variables? These are not passed, so security and ugliness are non-issues. If anything, it might be an issue of memory(if one needs to pass a huge number of variables), but I would guess...
  7. svar

    Tying listboxes?

    I am trying to do the following: suppose I have a complex structure: $products=[vegetables=>[peppers=>[green,red,orange],lettuce=>[long,curly],...]]; In the page the user must pick a single produce (e.g. red peppers) and what I want is to tie two listboxes so that if peppers is chosen on the...
  8. svar

    'passing' variables to the same page

    So, if I read you right, passing with ..?myvar=... is frowned upon for security, tidyness and other reasons Instead I could store these in $_SESSION variable, which is a sort of global/common memory. If I understand correctly, you would recommend use of $_SESSION variables over ugly urls. Not...
  9. svar

    'passing' variables to the same page

    Thanks to both. And can I also do it with an href?, i.e. click on a link and add the result to the same instead of a different page, e.g: ... $linked='newpage.php?myvar='.$row['myvar'] .'>'.$row['myvar']; $fullentry='<A class=lightblue HREF='. $linked .'</A>'; .... $toprint='<tr> <td>...
  10. svar

    'passing' variables to the same page

    In addition, for modularity, it would be better if the response to run query would appear on the same page, as required, but its code would be a different php file. Essentially I would like the run query to have an action "page2.php", but that output from page2.php should be on the same page...
  11. svar

    'passing' variables to the same page

    A web page has a list of choices, e.g. .... <input type="text" name="mychoice" value="" /> .... At the end of the page there is a buton to run an sql query and return the results ON THE SAME PAGE: ... <th> <FORM method="post"> <input type="submit" name="runquery" value="Run Query">...
  12. svar

    Regular expression question

    Thanks. If $string does not start with \s+AND, I assume this will not change anything, correct?
  13. svar

    Regular expression question

    It is a question: Question is : How do I remove it in PHP? 'Answer' is how I would do it in PERL. So I know how to do it in perl and an looking for a php solution
  14. svar

    Regular expression question

    Can one use str_replace to do this: $string=' AND VALUE=..... AND .....'; should end up removing the leading AND In perl this would be $string=~s/^\s+AND// or$string=~s/^AND// (yes, it can be do in one statement) to remove a leading 'AND' and possibly any whitespaces(blancs) before it.
  15. svar

    odbc connect and check issue

    Thanks! So either $sql="SELECT ISCHECKED FROM KTIMP"; $dsn="C:\users\me\Desktop\sample\Sample.accdb"; $link = new PDO( "odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)}; Dbq=$dsn;Uid=; Pwd=;"); $res = $link->query($sql); // or $res = $link->prepare("$sql"); //...
  16. svar

    odbc connect and check issue

    That's what I did: Created a system dsn called sysdsn in C:\users\me\Desktop\sample\Sample.accdb Also tried / instead of Still get the resource error message
  17. svar

    odbc connect and check issue

    I'm apparently having some trouble with an odbc connection. I deliberately to debug put the connect script in the main, but still no luck. odbc sees a true $link, but thinks it's not a 'resource'. <?php ini_set('display_errors', true); error_reporting(E_ALL); if(session_id() == '')...
  18. svar

    Local vs remote database

    Thanks so a) use www.mybdsite.org or its IP instead of localost and thenmysql_select_db($dbname); (actually its mysqli equivalent) and similarly for other dbs b) good point on traNSACTIONS. I assume if I do a SELECT and nothing comes back due to a connection error and check for errors I...
  19. svar

    Local vs remote database

    Just about to move from a local to a remote database. Is there anything else I should worry about except for : a) specifying the database e.g. $link = new mysqli('localhost', $dbusername, $dbpasswd, $db); changed to $link = new mysqli('http://www.mybdsite.org/database_path/', $dbusername...
  20. svar

    passing options from a static page for a query

    I'm looking for any tips for easy passing of values from a static page to a php page which will do queries. For example I have a static page which is basically a table with lots of different elements, text input, text from listboxes, checkboxes specifying whether one needs an exact match or not...

Part and Inventory Search

Back
Top