User Profile

Collapse

Profile Sidebar

Collapse
rythmic
rythmic
Last Activity: Dec 14 '10, 01:43 PM
Joined: Feb 24 '10
Location: Stockholm, Sweden
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I will answer this question myself.

    Here is the problem. I did not only switch versions. I also changed the source of DOJO to a CDN.

    Calling dojo.js from my own server makes the whole library of dojo available at the next line. This is not the case with calling dojo.js from a CDN. The CDN delivers the different components of dojo asynchronously meaning we don't know that the required functionality will be readily available...
    See more | Go to post

    Leave a comment:


  • rythmic
    replied to Check all yellow checkboxes
    How about putting all checkboxes in an array and then iterate through that array.

    I actually don't know VB syntax at all but i do know C# and that approach would work fine.

    Since I don't know VB syntax I can't help you there but a conceptual solution would be this:

    Code:
    Dim cbs As CheckBox[] = {All checkboxes here}
    Dim allYellowStatus As bool = Allyellow.Checked; 
    For Each checkBox As
    ...
    See more | Go to post

    Leave a comment:


  • You can't unless you log the searches in some persistence layer. And if you do log them it should be pretty straight forward.

    Just save each search, or page visit (confusing when you use both browsing history and search history as terminology) with timestamp and a record of which user performed the search. That way you can get ordered data and get lots of information such as navigation patterns, average time spent on pages and so forth....
    See more | Go to post

    Leave a comment:


  • rythmic
    replied to I have query with anchor tag in php mysql?
    As JKing says.
    Have the link call a javascript function which calls a file with server-side code which runs an sql query witch orders the results of your data according to the link that was clicked.

    You can either call two separate files or one file with parameters to decide which order by to use.
    See more | Go to post

    Leave a comment:


  • Dojo 1.4 - 1.5 Migration problem dojo.dnd.Source

    Hi!

    I was successfully using dojo.dnd.Source with Dojo 1.4.3 loaded from my webserver. However, as it is shared hosting or for some other reason the loading was horrifyingly slow. (even something like 1min30 secs occasionally)

    So I am now trying to switch to DOJO 1.5 and googleapis as source. Result is much better loading times but my problem now is that dojo.dnd is not recognized. here is the code I use for loading...
    See more | Go to post

  • A quick reply to my own post. The code works as expected. Solution: Reinstall firefox which had somehow gotten corrupted. No wonder there was so little info on this. :)
    See more | Go to post

    Leave a comment:


  • Why can Dojo Dijit Dialog only show one dialog per pageload in firefox?

    Hi!

    I have developed a system where I use Dojos dijit dialog to show certain information. It works perfectly for all major browsers except for firefox ( where I've tested v3.6 and 4 BETA)

    The first time I try to get a dijit dialog it all works as expected and all is well and I close it. The second time I try to open another dialog I get an error message and nothing happens. If I open the first dialog it is still working....
    See more | Go to post
    Last edited by rythmic; Dec 2 '10, 06:33 PM. Reason: adding code

  • rythmic
    started a topic OOP calling static method of unknown class
    in PHP

    OOP calling static method of unknown class

    Hi!

    PHP is really nifty in the way you can instantiate classes by using string variables like so:

    Code:
    $str_class_name = 'User';
    $instance = new $str_class_name();
    That way you can create flows where classes that are used in the same way can use the same code even if you don't know which class will use the code beforehand.

    My question is whether there is a way to do this...
    See more | Go to post

  • rythmic
    replied to require_once in foreach loop
    in PHP
    ok, now I have looked into it slightly over at php.net, it seems you still need to define the require_once statement? And that would still lead to path problems?
    See more | Go to post

    Leave a comment:


  • rythmic
    replied to require_once in foreach loop
    in PHP
    Because I have not read about that concept. and also if it is a 5.3 feature I can't use it. but I'll look into it.
    See more | Go to post

    Leave a comment:


  • rythmic
    replied to require_once in foreach loop
    in PHP
    It was the space that did it. You should not work with these things after midnight :(

    Thanks for that. It will be really silly to mark that as the best answer, but hey, What can a man do :)

    Code:
    <?php
    
    $levels_down = 1;
    $read_length = 8192;
    $inc_file = 'classes.txt';
    $prefix = '';
    for($i = 0; $i < $levels_down;$i++) {
        $prefix .= '../';
    }
    ...
    See more | Go to post
    Last edited by rythmic; Oct 12 '10, 07:07 AM. Reason: Adding the final resulting code

    Leave a comment:


  • rythmic
    replied to require_once in foreach loop
    in PHP
    I give up this approach.. It simply doesn't work. I modified the code so that it used the complete url to the file in the require statement and it still would not show. It stated it was missing a 404 redirection so I gather the file was not found, although I could paste it fine in the browser window, the very same variable.

    Does anyone have a different approach?
    See more | Go to post
    Last edited by rythmic; Oct 11 '10, 09:59 PM. Reason: Incomplete

    Leave a comment:


  • rythmic
    replied to how to completely end sessions..
    in PHP
    Hi!

    Here is the problem. You check whether a user is logged in or not, but no matter the response you still echo the table data.

    Echoing the table data should also be constrained by the if($_SESSION['id']) statement

    Your code should look like this:

    Code:
    
     <?php
         
        define('INCLUDE_CHECK',true);
      
        require 'connect.php';
    ...
    See more | Go to post

    Leave a comment:


  • rythmic
    started a topic require_once in foreach loop
    in PHP

    require_once in foreach loop

    Why doesn't the following code work?

    Code:
    <?php
    $levels_down = 1;
    $read_length = 8192;
    $inc_file = 'classes.txt';
    $prefix = '';
    for($i = 0; $i < $levels_down;$i++) {
        $prefix .= '../';
    }
    
    $filename = $prefix.$inc_file;
    
    $lines = file($filename);
    $search = 'classes';
    $replace = $prefix . $search;
    foreach($lines as $line) {
    ...
    See more | Go to post

  • In DOJO DND, How do I copy (not move) a node between 2 sources

    Hi!

    So basically what I'm trying to do is overwrite onDropExternal handler for a dnd.Source object.

    I tried the brutal way of using this.inserNodes but it moved the node from the original source even though the original source has copyOnly set to true.

    So how do I copy this node nicely onExternalDrop

    here is my thinking

    Code:
    tgtContainer1.onDropExternal = function(source,nodes,copy)
    ...
    See more | Go to post

  • rythmic
    replied to mysqlimport query
    You are on a windows system.. so how about using software with a neat interface.

    such as mysql administrator from mysql.found here:
    http://dev.mysql.com/downloads/gui-tools/5.0.html...
    See more | Go to post

    Leave a comment:


  • Also if you didn't notice or if it is a simple typo you have used $SESSION in your delete and edit links instead of $_SESSION which you had correctly used in your sql statement....
    See more | Go to post

    Leave a comment:


  • The problem is the AS statment in the sql query.

    AS is used to create an alias of a table name or column name. Say you had a table called very_extremly_l ong_col_name it is much more convenient to reference this as velt

    so you would write

    Code:
    SELECT very_extremly_long_col_name AS c1 FROM some_table WHERE c1=3
    
    // Then the result would be delivered like this in your php code
    $result['c1'];
    ...
    See more | Go to post

    Leave a comment:


  • I'll be around :)

    I was reading through our conversation and started thinking about concepts. Just to make sure we are discussing this from the same point of view, here is an intro to db user concepts and application users.

    If you create a User in C# as a class, this has nothing to do with the user accessing the mysql database

    A good practise is to have two kinds of users for the database. one with read...
    See more | Go to post

    Leave a comment:


  • How to combine DOJO filteringselect and SPRING form handling

    Hi!

    I am trying to use a filteringselect with SPRING form.

    Problem
    I can't get the value showing in the filteringselect to be transmitted to the SPRING controller connected to the form. Instead of sending the displayed value it sends 0 (the value zero).

    Code:

    Code:
    //dojo addonload:
    
    var postadresscomp = new dijit.form.FilteringSelect({
        	store: postadressStore,
    ...
    See more | Go to post
    Last edited by rythmic; Mar 22 '10, 12:26 PM. Reason: Forgot to salut and provide an ending :)
No activity results to display
Show More
Working...