4DToday.com
4D Net Center Hosting
Home Directory Classifieds Reference Archives
Site Info
About 4DToday.com
Contact Us
Version française
Quote
Developers (721)
4D Developers (597)
Web Developers (339)
Tools Publishers (197)
Instructors (165)
Web Hosts (60)
Resellers (86)
Software Publishers (298)
Search Developers
Products (406)
Plug-Ins (121)
Components (62)
Code Libraries (9)
Books (7)
Tools (42)
Vertical Applications (147)
Search Products
User Groups
All User Groups (22)
Classified Ads (8)
Help Wanted (3)
Opportunities Wanted (5)
Hardware Wanted (0)
Hardware for Sale (0)
Software Wanted (0)
Software for Sale (0)
Other (0)
Resources
4D
4D, Inc.
4D Wiki
4D Partner Central
4D Knowledgebase
4D Doc Center
Example Applications
4D BugDisplayer
4D, Inc. Training
Podcasts on 4D
Message Lists
4D Bulletin Board
4D-Forum
4D Mailing Lists
4D Tech Google Group
iNUG Archives (Nabble)
iNUG Archives (Gmane)
Other
4D Code Exchange
4D Resources
Sviluppo4D.it (Italy)
Quote
I think I've discovered the secret of life - you just hang around until you get used to it.
Charles Schulz  
  Suggest a Quote  
There are no news items at this time.
 Submit Future News    Archive 
Technical Tip
Transform 2D array mxn to nxm
Submitted by Garri Ogata, in8software

//Method: Core_2DArray_Transform(p2DArraySource;p2DArrayDestination;
//      {nSourceStartColumn;nSourceStartRow})
//Description:  This method transforms  source  (CxR) to destination (RxC)
//    starting from the sources Column and Starting Row.  The destination array
//    must come in properly sized.

//    EX  Source (2x3)  Destination (3x2)
//    src   a  d      dst  a   b   c   
//            b  e             d   e  f
//            c  f


C_POINTER($1;$2;$p2DaSource;$p2DaDestination)
C_LONGINT($3;$4;$nSourceStartColumn;$nSourceStartRow;$nDestinationColumns;$nDestinationRows)
C_LONGINT($nNumberOfParameters;$nColumn;$nRow)

$p2DaSource:=$1
$p2DaDestination:=$2

$nSourceStartColumn:=1
$nSourceStartRow:=1

$nNumberOfParameters:=Count parameters

If($nNumberOfParameters>2)
  $nSourceStartColumn:=$3
  $nSourceStartRow:=$4
end if

$nDestinationColumns:=Size of array($p2DaDestination->)
$nDestinationRows:=Size of array($p2DaDestination->{1})

For ($nColumn;1;$nDestinationColumns)
  For ($nRow;1;$nDestinationRows)
    $p2DaDestination->{$nColumn}{$nRow}:=$p2DaSource->{$nSourceStartColumn}{$nSourceStartRow}
    $nSourceStartColumn:=$nSourceStartColumn+1  //Go to the next column
  End for

  $nSourceStartColumn:=$nSourceStartColumn-$nDestinationRows  //Reset the source start column to its original setting
  $nSourceStartRow:=$nSourceStartRow+1  //Go to the next row
End for
  Submit a Tip    Archive 
Spotlight
Fifa World Cup
Fifa World Cup The 2010 FIFA World Cup is the 19th FIFA World Cup, the premier international association football tournament. It is being held in South Africa, beginning on 11 June and scheduled to conclude on 11 July 2010. The tournament is the culmination of a qualification process that began in August 2007 and involved 204 of the 208 FIFA national teams. As such, it matches the 2008 Summer Olympics as the sports event with the most competing nations.
  Suggest a Spotlight  
Survey Results
This weekend, we asked you...
Who is going to win the Fifa World Cup (update)?
Survey Results

Your vote: (no vote)
Total votes received: 140

Survey submitted by Gregorio Diaz
  Suggest a Survey  
Events
There are no events scheduled for the upcoming week.
  Submit an Event