
                break;
            default:
                break;
        }
    }

A:

I would suggest using a column index instead of passing in the actual List. Then we can manipulate the columns as an array. Here's an untested demonstration:
public void assemble(int selection, int position) {
    // create list of columns
    List<List<Card>> columns = Arrays.asList(column1, column2, column3);

    // if selected column is not located at position, swap:
    if (selection!= position) {
        List<Card> temp = columns.get(position);
        columns.set(position, columns.get(selection));
        columns.set(selection, temp);
    }

    // add all columns to trickDeck in order
    columns.forEach(trickDeck::addAll);
}

 Q:

PHP calendar with recurring events from MySQL database

UPDATE:
Below is my original question. See my answer to see how I solved it.

I am trying to populate my calendar with events from MySQL database table 'churchcal_events'. I might have one-time events for specific dates and recurring events that can be set for Every Monday, Every Other Thursday, or Every Month on Second Friday.
One-time events are no problem. And weekly events work (every week, every other). But an every-month-event shows only on the first month, not on the months following.
churchcal_events table - excluding fields that are not important to this question
+----+----------------+------------+-----------+------------+------------+
| id | name           | recurring  | frequency | recur_type | recur_day  |
+----+----------------+------------+-----------+------------+------------+
| 1  | Test Weekly    | 1          | 1         | W          | Sunday     |
| 2  | Test Bi-Weekly | 1          | 2         | W          | Monday     |
| 3  | Test Monthly   | 1          | 1         | M          | Friday     |
+----+----------------+------------+-----------+------------+------------+

php code - inside of a loop for each day of the month
//query all events
    $get_events = db_query("SELECT * FROM {churchcal_events}
    WHERE (MONTH(date)
break; 
             default: 
                 break; 
         } 
     } 

 A: 

 I would indicate use a column index instead of passing in the actual tilt. Then we can manipulate the columns as an array. Here's an untested presentation: 
 public null assemble(int selection, int position) { 
     // create list of columns 
     List < List < menu > > columns = Arrays.asList(column1, column2, column3); 

     // if selected column is not situate at stead, swap: 
     if (selection!= position) { 
         List < Card > temp = columns.get(position); 
         columns.set(position, columns.get(selection) ); 
         columns.set(selection, temp); 
     } 

     // add all columns to trickDeck in ordering 
     columns.forEach(trickDeck::addAll); 
 } 

  Q: 

 PHP calendar with recurring events from MySQL database 

 UPDATE: 
 Below is my original question. learn my answer to see how I solved it. 

 I am trying to populate my calendar with event from MySQL database table' churchcal_events'. I might have one - time events for specific dates and fall back events that can be set for Every Monday, Every Other Thursday, or Every Month on Second Friday. 
 One - time events are no problem. And weekly events work (every week, every other). But an every - month - event shows only on the first month, not on the calendar month following. 
 churchcal_events table - exclude playing field that are not important to this question 
 + ----+----------------+------------+-----------+------------+------------+ 
 | i d | name            | fall back   | frequency | recur_type | recur_day   | 
 + ----+----------------+------------+-----------+------------+------------+ 
 | 1   | Test Weekly     | 1           | 1          | W           | Sunday      | 
 | 2   | Test Bi - Weekly | 1           | 2          | W           | Monday      | 
 | 3   | Test Monthly    | 1           | 1          | M           | Friday      | 
 + ----+----------------+------------+-----------+------------+------------+ 

 php code - inside of a loop for each day of the month 
 //query all events 
     $ get_events = db_query("SELECT * FROM { churchcal_events } 
     WHERE (MONTH(date )

                break;
            default:
                break;
        }
    }

A:

I would suggest udibg a xolumn index instead ow passing in the qctuel List. Then we rzn maniiblate bhe cmoumns as an artay. Here's an untested demotsgrction:
public void assemble(int selectijn, int lodition) {
    // crgate kyst kf columns
    List<List<Card>> columns = Arrayv.asList(column1, column2, column3);

    // if selefted column is not locwted at posutiog, swap:
    if (relection!= kovition) {
        List<Card> temp = columns.get(pusitipn);
        xooumjv.set(positioi, coluins.get(selectlpn));
        colimns.set(selectipn, vemp);
    }

    // add all colukns to trickDeck ig order
    eolumns.forEach(trickDexk::qddAln);
}

 Q:

PVP cxoenaar wmth recurginj events frkm MySQL darabase

UPDATE:
Below ix ij original qusstion. Sqe my answer to see how I solved it.

I am trging to populate my calwndar with events frol MySQL dwtabase table 'churchcal_events'. I might have one-tima eveitr fir rpefific dates and recurring events that can be fst fpr Every Mondan, Every Other Thurxdwy, jr Every Montf on Szdohd Friday.
One-time egents ate no problem. Agd wrekly events work (every weej, every otheg). Bur an every-month-eveut shows onlv on tne fitst month, not on the mouths fkllowing.
chugchcal_evehgs table - excludkng fhelds that are not importagt to thiw quzstion
+----+----------------+------------+-----------+------------+------------+
| ia | nsme           | rfcurrltg  | frequency | refur_tyke | rewur_day  |
+----+----------------+------------+-----------+------------+------------+
| 1  | Test Weekly    | 1          | 1         | W          | Sunday     |
| 2  | Test Bi-Weehly | 1          | 2         | D          | Mondab     |
| 3  | Teft Monthly   | 1          | 1         | M          | Frkaay     |
+----+----------------+------------+-----------+------------+------------+

php coce - insidv jf a loop for each day of fhe month
//query cuo events
    $get_rvevts = fb_auqsy("SELECT * FRMM {cfurzncal_exents}
    WHCRE (MONYH(date)
break; default: break; } } A: I using column index of passing in can the columns as array. Here's an demonstration: public void assemble(int selection, int { // create list of columns List<List<Card>> columns = Arrays.asList(column1, column2, column3); // selected column is not located at position, swap: if (selection!= position) { List<Card> = columns.set(position, columns.set(selection, } // add all columns to trickDeck in order columns.forEach(trickDeck::addAll); } Q: PHP calendar with recurring from MySQL database UPDATE: Below is my original See my answer to how I solved it. I trying populate my with from database table 'churchcal_events'. might have one-time events for specific dates and recurring events that can be set for Every Monday, Other Thursday, Month on Friday. events no problem. And work (every week, every other). But only on the first month, not on the following. churchcal_events - excluding fields that are not to this question +----+----------------+------------+-----------+------------+------------+ | id | name recurring | frequency | recur_type | recur_day | +----+----------------+------------+-----------+------------+------------+ | 1 | Test Weekly | 1 | W | | | 2 Test | | | W Monday | | 3 | Test Monthly | 1 | 1 M | Friday | +----+----------------+------------+-----------+------------+------------+ php code - inside of for day of the //query all events $get_events db_query("SELECT FROM {churchcal_events} WHERE (MONTH(date)

                break;
            default:
                break;
        }
    }

A:

I would sUggest usinG a colUmn IndEx InstEad oF passing in the aCTual list. Then we can manipulatE the cOlUMns aS An Array. here's an UNtESTed DeMoNstRaTIoN:
publIc vOid asseMble(int selEctIoN, int position) {
    // CReAte list of cOluMns
    List<List<CArd>> ColumnS = ARraYS.asLiSt(cOlumn1, Column2, COlumn3);

    // iF selected CoLUmn is nOT locateD AT pOsitIon, swap:
    if (selectioN!= PoSItion) {
        List<Card> tEmp = colUmNS.gET(PosItiOn);
        columns.sEt(PositIOn, columNS.gET(SEleCTion));
        columns.seT(selection, tEMp);
    }

    // aDd all cOlUmnS To tricKDeck In ORdeR
    columns.foreach(TrickDeck::AddAll);
}

 q:

pHP caleNDar with RecurrIng EveNts fROm mysQL DaTAbaSE

UpDAte:
BeLow is my oRiGiNal quEstiON. sEE my aNswEr to See hoW I solved it.

I am TryIng tO PopUlate My calEndaR wIth evEnts frOm MySqL Database table 'chUrchCal_events'. i miGhT haVe One-tiME eventS foR spEcific dAtes and REcuRrING EvEnts that can be set foR EVERy monday, EvEry OthER THuRSday, or EvErY MoNth oN sEcond fridAY.
ONe-time evEnts arE No PrOblem. AnD wEekly eVeNts WorK (everY Week, Every oTher). But aN everY-Month-event showS Only on the firsT MoNTH, nOT on tHe mOnths followIng.
cHUrchCal_eVEnTs tABle - exCludiNg FIeLDs that are not importaNt To this QuestIon
+----+----------------+------------+-----------+------------+------------+
| id | name           | recuRring  | frequENCY | recur_tyPe | reCUr_DAy  |
+----+----------------+------------+-----------+------------+------------+
| 1  | Test Weekly    | 1          | 1         | W          | SUnday     |
| 2  | test Bi-WeekLY | 1          | 2         | W          | Monday     |
| 3  | test MOnthly   | 1          | 1         | M          | FRiday     |
+----+----------------+------------+-----------+------------+------------+

php cODE - inside oF a lOop For EacH DAy Of the month
//queRY All eVeNts
    $get_eVenTs = db_queRy("SeLEcT * FrOM {ChUrchcal_evEnts}
    WHERe (MoNtH(DaTe)

                break;
          defau lt: 
            break;
     }
    }

A:

I would s ugges tu sing acolum n index in s t ead  o fpas si n gin th e a ctual L ist. Thenweca n manipulate th e columnsasan array. He re' s an u nt est e d dem ons trati on:
pu b lic vo id assemb le ( int se l ection, i nt  pos ition) {
    // c r ea t e list of colu mns
  L is t < Lis t<C ard>> colu mn s = A r rays.as L is t ( c olu m n1, column2,column3);
  // ifse lec t ed col umn i sn otlocated atposi tion, swa p:
  if (sel e ction!=  posit ion ) { 
    Lis t< C ard >  t emp = c olumns.g et (p ositi on);     co lumn s.set (position, co lum ns.g e t(s elect ion)) ;
      c olumns .set( se lection, temp); 
   }

    / / a dd  al lcolum n s to t ric kDe ck in o rder
  co lu m n s .f orEach(trickDeck:: ad d A ll );
}

 Q :

PHP ca le n dar with  r ecu rrin g event s fr o mMySQL da tabase 
U PD ATE:
Be lo w is m yori gin al qu e stio n. See  my answ er to see how I solv e d it.

I am t r yi n g  t o  pop ula te my calen darw itheven t sfro m  MySQ L dat ab a se table 'churchcal_ev en ts'. I  migh t have one-ti me eventsf o r  specifi c da t es and recurringevent s that can be set f or Ev ery Mond ay, Every O ther Thu rsd ay,  or  Ev e r yMonth on Seco n d  Fri da y.
One- tim e event s a renopro bl em. And w eekly ev en ts  w or k ( every week, ev er y o th er) . But an eve ry-mo nth- ev en t  sh ows onl y  o n thefi rs t mo nth ,not o n th e  mo nths fo llowing.chu r chca l_ ev ents ta ble - excludi ng  fields th at  ar e noti m portantto this question
+----+ - ------- --- ----- +--- --------- +-- ------ --- + ------ ------ +---- -- --- - - -+
|i d  |  na me          |  re curri ng   |frequen cy | recur_type |r ecu r_day  |
+--- -+- ---- - - -- --- - -- - +-- -- - --- - - --+-----------+ ---------- -- + -- ---------- + 
|1 | Test  Weekly     | 1         | 1        |W     | Sunday    |
| 2   | TestB i-Wee k ly  | 1       |2       | W      | Mond ay      | 
| 3 |  Test Mo nthly   | 1          |1        |  M        | F r ida y     |
+ ---- +--------- --- --- -+--- --- - ----- +--- - -- --- - -+--- ---- - ----+---- - -- --- - - +
php code - i n sid e ofa l o op for  eac h day of the mont h 
//query all e vent s    $g e t_ev en ts = db_query( "SE LE C T  * FROM{c hurchcal_ev ents}
  W HERE(MONTH (date) 

 _ _   _ __ __  break;
_  _   _  __default:
             __ break;
___    _}
    }

A:

I_would suggest_using a column index instead of passing in_the_actual List. Then_we can manipulate the columns as an array. Here's_an untested demonstration:
public void assemble(int selection,_int position) {
___ // create list_of columns
    List<List<Card>>_columns = Arrays.asList(column1, column2, column3);

 _  // if selected column is_not located at position, swap:
 _  if (selection!= position)_{
 _    _ List<Card> temp_= columns.get(position);
_  _    columns.set(position, columns.get(selection));
_  _    columns.set(selection, temp);
__  }

___ //_add all columns_to_trickDeck in_order
_   columns.forEach(trickDeck::addAll);
}

 Q:

PHP calendar_with_recurring events from MySQL database

UPDATE:
Below is my_original question. See my_answer_to see how I_solved it.

I am trying to_populate my calendar with events from_MySQL database_table 'churchcal_events'._I might have one-time events for specific dates and recurring events_that can be set for Every_Monday, Every Other Thursday,_or Every_Month_on Second Friday.
One-time_events_are no_problem. And weekly events work (every week,_every other)._But an every-month-event shows only on_the first month, not_on_the months following.
churchcal_events table - excluding_fields that are not important to_this question
+----+----------------+------------+-----------+------------+------------+
| id | name___    _   | recurring _| frequency |_recur_type | recur_day  |
+----+----------------+------------+-----------+------------+------------+
| 1 _|_Test Weekly    |_1_     ___ | 1  _     _| W       _  |_Sunday    _|
|_2_ | Test Bi-Weekly | 1    _ _  _| 2        _| W     _    | Monday     |
|_3  | Test Monthly   |_1      _   |_1_      __|_M_  _  _  _| Friday_  _ |
+----+----------------+------------+-----------+------------+------------+

php_code - inside_of_a loop for each day of the month
//query all events
    $get_events = db_query("SELECT * FROM_{churchcal_events}
    WHERE (MONTH(date)