Welcome to TiddlyWiki created by Jeremy Ruston; Copyright © 2004-2007 Jeremy Ruston, Copyright © 2007-2011 UnaMesa Association
*Membre de la commission de réflexion et d'action du PRES euro-méditerranéen de l'UNS
*Expert auprès de ''l’Agence d’évaluation de la recherche et de l’enseignement supérieur'' ([[AERES|http://www.aeres-evaluation.fr/]]) (2008-2010)
*Directeur de ''l'Institut Universitaire professionnalisé MIAGE'' (2003-2008)
*Coordinateur de la Maitrise MIAGE (2001-2002)
*Membre du conseil de l'UFR sciences (2002-2005)
*Membre du Comité des Projets du laboratoire I3S (2002-2004)
*Membre de la Commission de Spécialistes 27ème section (2002-2004)
!1 -- Format des données
|!Option|!Syntaxe|!Résultat|!Anglais|h
|texte en gras|{{{''gras''}}}|''gras''|''bold''|
|texte en italique|{{{//italique//}}}|//italique//|//italic//|
|texte souligné|{{{__souligné__}}}|__souligné__|__underlined__|
|texte barré|{{{--barré--}}}|--barré--|--strikethrough--|
|texte mis en exposant|{{{texte^^exposant^^}}}|texte^^exposant^^|text^^super^^|
|texte mis en indice|{{{texte~~indice~~}}}|texte~~indice~~|text~~sub~~|
|texte mis en évidence|{{{@@mis en évidence@@}}}|@@mis en évidence@@|@@highlighted@@|
|texte en de taille fixe|{{{ {{{taille fixe}}} }}}|{{{taille fixe}}}|{{{monospaced}}}|
|texte bleu|{{{@@color:#00f;texte bleu@@}}}|@@color:#00f;texte bleu@@| .|
|fond vert|{{{@@bgcolor:#0f0;fond vert@@}}}|@@bgcolor:#0f0;fond vert@@| .|
/***
|Name|CalendarPlugin|
|Source|http://www.TiddlyTools.com/#CalendarPlugin|
|Version|1.5.1|
|Author|Eric Shulman|
|Original Author|SteveRumsby|
|License|unknown|
|~CoreVersion|2.1|
|Type|plugin|
|Description|display monthly and yearly calendars|
NOTE: For //enhanced// date popup display, optionally install:
*[[DatePlugin]]
*[[ReminderMacros|http://remindermacros.tiddlyspot.com/]]
!!!Usage:
<<<
|{{{<<calendar>>}}}|full-year calendar for the current year|
|{{{<<calendar year>>}}}|full-year calendar for the specified year|
|{{{<<calendar year month>>}}}|one month calendar for the specified month and year|
|{{{<<calendar thismonth>>}}}|one month calendar for the current month|
|{{{<<calendar lastmonth>>}}}|one month calendar for last month|
|{{{<<calendar nextmonth>>}}}|one month calendar for next month|
|{{{<<calendar +n>>}}}<br>{{{<<calendar -n>>}}}|one month calendar for a month +/- 'n' months from now|
<<<
!!!Configuration:
<<<
|''First day of week:''<br>{{{config.options.txtCalFirstDay}}}|<<option txtCalFirstDay>>|(Monday = 0, Sunday = 6)|
|''First day of weekend:''<br>{{{config.options.txtCalStartOfWeekend}}}|<<option txtCalStartOfWeekend>>|(Monday = 0, Sunday = 6)|
<<option chkDisplayWeekNumbers>> Display week numbers //(note: Monday will be used as the start of the week)//
|''Week number display format:''<br>{{{config.options.txtWeekNumberDisplayFormat }}}|<<option txtWeekNumberDisplayFormat >>|
|''Week number link format:''<br>{{{config.options.txtWeekNumberLinkFormat }}}|<<option txtWeekNumberLinkFormat >>|
<<<
!!!Revisions
<<<
2011.01.04 1.5.1 corrected parameter handling for {{{<<calendar year>>}}} to show entire year instead of just first month. In createCalendarMonthHeader(), fixed next/previous month year calculation (use parseInt() to convert to numeric value). Code reduction (setting options).
2009.04.31 1.5.0 rewrote onClickCalendarDate() (popup handler) and added config.options.txtCalendarReminderTags. Partial code reduction/cleanup. Assigned true version number (1.5.0)
2008.09.10 added '+n' (and '-n') param to permit display of relative months (e.g., '+6' means 'six months from now', '-3' means 'three months ago'. Based on suggestion from Jean.
2008.06.17 added support for config.macros.calendar.todaybg
2008.02.27 in handler(), DON'T set hard-coded default date format, so that *customized* value (pre-defined in config.macros.calendar.journalDateFmt is used.
2008.02.17 in createCalendarYear(), fix next/previous year calculation (use parseInt() to convert to numeric value). Also, use journalDateFmt for date linking when NOT using [[DatePlugin]].
2008.02.16 in createCalendarDay(), week numbers now created as TiddlyLinks, allowing quick creation/navigation to 'weekly' journals (based on request from Kashgarinn)
2008.01.08 in createCalendarMonthHeader(), 'month year' heading is now created as TiddlyLink, allowing quick creation/navigation to 'month-at-a-time' journals
2007.11.30 added 'return false' to onclick handlers (prevent IE from opening blank pages)
2006.08.23 added handling for weeknumbers (code supplied by Martin Budden (see 'wn**' comment marks). Also, incorporated updated by Jeremy Sheeley to add caching for reminders (see [[ReminderMacros]], if installed)
2005.10.30 in config.macros.calendar.handler(), use 'tbody' element for IE compatibility. Also, fix year calculation for IE's getYear() function (which returns '2005' instead of '105'). Also, in createCalendarDays(), use showDate() function (see [[DatePlugin]], if installed) to render autostyled date with linked popup. Updated calendar stylesheet definition: use .calendar class-specific selectors, add text centering and margin settings
2006.05.29 added journalDateFmt handling
<<<
!!!Code
***/
//{{{
version.extensions.CalendarPlugin= { major: 1, minor: 5, revision: 1, date: new Date(2011,1,4)};
// COOKIE OPTIONS
var opts={
txtCalFirstDay: 0,
txtCalStartOfWeekend: 5,
chkDisplayWeekNumbers: false,
txtCalFirstDay: 0,
txtWeekNumberDisplayFormat: 'w0WW',
txtWeekNumberLinkFormat: 'YYYY-w0WW',
txtCalendarReminderTags: 'reminder'
};
for (var id in opts) if (config.options[id]===undefined) config.options[id]=opts[id];
// INTERNAL CONFIGURATION
config.macros.calendar = {
monthnames:['Jan','Feb','Mar','Avr','Mai','Jun','Jul','Aout','Sep','Oct','Nov','Dec'],
daynames:['L','Ma','Me','J','V','S','D'],
todaybg:'#ccccff',
weekendbg:'#c0c0c0',
monthbg:'#e0e0e0',
holidaybg:'#ffc0c0',
journalDateFmt:'DD MMM YYYY',
monthdays:[31,28,31,30,31,30,31,31,30,31,30,31],
holidays:[ ] // for customization see [[CalendarPluginConfig]]
};
//}}}
//{{{
function calendarIsHoliday(date)
{
var longHoliday = date.formatString('0DD/0MM/YYYY');
var shortHoliday = date.formatString('0DD/0MM');
for(var i = 0; i < config.macros.calendar.holidays.length; i++) {
if( config.macros.calendar.holidays[i]==longHoliday
|| config.macros.calendar.holidays[i]==shortHoliday)
return true;
}
return false;
}
//}}}
//{{{
config.macros.calendar.handler = function(place,macroName,params) {
var calendar = createTiddlyElement(place, 'table', null, 'calendar', null);
var tbody = createTiddlyElement(calendar, 'tbody');
var today = new Date();
var year = today.getYear();
if (year<1900) year+=1900;
// get journal format from SideBarOptions (ELS 5/29/06 - suggested by MartinBudden)
var text = store.getTiddlerText('SideBarOptions');
var re = new RegExp('<<(?:newJournal)([^>]*)>>','mg'); var fm = re.exec(text);
if (fm && fm[1]!=null) { var pa=fm[1].readMacroParams(); if (pa[0]) this.journalDateFmt = pa[0]; }
var month=-1;
if (params[0] == 'thismonth') {
var month=today.getMonth();
} else if (params[0] == 'lastmonth') {
var month = today.getMonth()-1; if (month==-1) { month=11; year--; }
} else if (params[0] == 'nextmonth') {
var month = today.getMonth()+1; if (month>11) { month=0; year++; }
} else if (params[0]&&'+-'.indexOf(params[0].substr(0,1))!=-1) {
var month = today.getMonth()+parseInt(params[0]);
if (month>11) { year+=Math.floor(month/12); month%=12; };
if (month<0) { year+=Math.floor(month/12); month=12+month%12; }
} else if (params[0]) {
year = params[0];
if(params[1]) {
month=parseInt(params[1])-1;
if (month>11) month=11; if (month<0) month=0;
}
}
if (month!=-1) {
cacheReminders(new Date(year, month, 1, 0, 0), 31);
createCalendarOneMonth(tbody, year, month);
} else {
cacheReminders(new Date(year, 0, 1, 0, 0), 366);
createCalendarYear(tbody, year);
}
window.reminderCacheForCalendar = null;
}
//}}}
//{{{
// cache used to store reminders while the calendar is being rendered
// it will be renulled after the calendar is fully rendered.
window.reminderCacheForCalendar = null;
//}}}
//{{{
function cacheReminders(date, leadtime)
{
if (window.findTiddlersWithReminders == null) return;
window.reminderCacheForCalendar = {};
var leadtimeHash = [];
leadtimeHash [0] = 0;
leadtimeHash [1] = leadtime;
var t = findTiddlersWithReminders(date, leadtimeHash, null, 1);
for(var i = 0; i < t.length; i++) {
//just tag it in the cache, so that when we're drawing days, we can bold this one.
window.reminderCacheForCalendar[t[i]['matchedDate']] = 'reminder:' + t[i]['params']['title'];
}
}
//}}}
//{{{
function createCalendarOneMonth(calendar, year, mon)
{
var row = createTiddlyElement(calendar, 'tr');
createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon]+' '+year, true, year, mon);
row = createTiddlyElement(calendar, 'tr');
createCalendarDayHeader(row, 1);
createCalendarDayRowsSingle(calendar, year, mon);
}
//}}}
//{{{
function createCalendarMonth(calendar, year, mon)
{
var row = createTiddlyElement(calendar, 'tr');
createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon]+' '+ year, false, year, mon);
row = createTiddlyElement(calendar, 'tr');
createCalendarDayHeader(row, 1);
createCalendarDayRowsSingle(calendar, year, mon);
}
//}}}
//{{{
function createCalendarYear(calendar, year)
{
var row;
row = createTiddlyElement(calendar, 'tr');
var back = createTiddlyElement(row, 'td');
var backHandler = function() {
removeChildren(calendar);
createCalendarYear(calendar, parseInt(year)-1);
return false; // consume click
};
createTiddlyButton(back, '<', 'Previous year', backHandler);
back.align = 'center';
var yearHeader = createTiddlyElement(row, 'td', null, 'calendarYear', year);
yearHeader.align = 'center';
yearHeader.setAttribute('colSpan',config.options.chkDisplayWeekNumbers?22:19);//wn**
var fwd = createTiddlyElement(row, 'td');
var fwdHandler = function() {
removeChildren(calendar);
createCalendarYear(calendar, parseInt(year)+1);
return false; // consume click
};
createTiddlyButton(fwd, '>', 'Next year', fwdHandler);
fwd.align = 'center';
createCalendarMonthRow(calendar, year, 0);
createCalendarMonthRow(calendar, year, 3);
createCalendarMonthRow(calendar, year, 6);
createCalendarMonthRow(calendar, year, 9);
}
//}}}
//{{{
function createCalendarMonthRow(cal, year, mon)
{
var row = createTiddlyElement(cal, 'tr');
createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon], false, year, mon);
createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+1], false, year, mon);
createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+2], false, year, mon);
row = createTiddlyElement(cal, 'tr');
createCalendarDayHeader(row, 3);
createCalendarDayRows(cal, year, mon);
}
//}}}
//{{{
function createCalendarMonthHeader(cal, row, name, nav, year, mon)
{
var month;
if (nav) {
var back = createTiddlyElement(row, 'td');
back.align = 'center';
back.style.background = config.macros.calendar.monthbg;
var backMonHandler = function() {
var newyear = year;
var newmon = mon-1;
if(newmon == -1) { newmon = 11; newyear = parseInt(newyear)-1;}
removeChildren(cal);
cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);
createCalendarOneMonth(cal, newyear, newmon);
return false; // consume click
};
createTiddlyButton(back, '<', 'Previous month', backMonHandler);
month = createTiddlyElement(row, 'td', null, 'calendarMonthname')
createTiddlyLink(month,name,true);
month.setAttribute('colSpan', config.options.chkDisplayWeekNumbers?6:5);//wn**
var fwd = createTiddlyElement(row, 'td');
fwd.align = 'center';
fwd.style.background = config.macros.calendar.monthbg;
var fwdMonHandler = function() {
var newyear = year;
var newmon = mon+1;
if(newmon == 12) { newmon = 0; newyear = parseInt(newyear)+1;}
removeChildren(cal);
cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);
createCalendarOneMonth(cal, newyear, newmon);
return false; // consume click
};
createTiddlyButton(fwd, '>', 'Next month', fwdMonHandler);
} else {
month = createTiddlyElement(row, 'td', null, 'calendarMonthname', name)
month.setAttribute('colSpan',config.options.chkDisplayWeekNumbers?8:7);//wn**
}
month.align = 'center';
month.style.background = config.macros.calendar.monthbg;
}
//}}}
//{{{
function createCalendarDayHeader(row, num)
{
var cell;
for(var i = 0; i < num; i++) {
if (config.options.chkDisplayWeekNumbers) createTiddlyElement(row, 'td');//wn**
for(var j = 0; j < 7; j++) {
var d = j + (config.options.txtCalFirstDay - 0);
if(d > 6) d = d - 7;
cell = createTiddlyElement(row, 'td', null, null, config.macros.calendar.daynames[d]);
if(d == (config.options.txtCalStartOfWeekend-0) || d == (config.options.txtCalStartOfWeekend-0+1))
cell.style.background = config.macros.calendar.weekendbg;
}
}
}
//}}}
//{{{
function createCalendarDays(row, col, first, max, year, mon) {
var i;
if (config.options.chkDisplayWeekNumbers){
if (first<=max) {
var ww = new Date(year,mon,first);
var td=createTiddlyElement(row, 'td');//wn**
var link=createTiddlyLink(td,ww.formatString(config.options.txtWeekNumberLinkFormat),false);
link.appendChild(document.createTextNode(
ww.formatString(config.options.txtWeekNumberDisplayFormat)));
}
else createTiddlyElement(row, 'td');//wn**
}
for(i = 0; i < col; i++)
createTiddlyElement(row, 'td');
var day = first;
for(i = col; i < 7; i++) {
var d = i + (config.options.txtCalFirstDay - 0);
if(d > 6) d = d - 7;
var daycell = createTiddlyElement(row, 'td');
var isaWeekend=((d==(config.options.txtCalStartOfWeekend-0)
|| d==(config.options.txtCalStartOfWeekend-0+1))?true:false);
if(day > 0 && day <= max) {
var celldate = new Date(year, mon, day);
// ELS 10/30/05 - use <<date>> macro's showDate() function to create popup
// ELS 05/29/06 - use journalDateFmt
if (window.showDate) showDate(daycell,celldate,'popup','DD',
config.macros.calendar.journalDateFmt,true, isaWeekend);
else {
if(isaWeekend) daycell.style.background = config.macros.calendar.weekendbg;
var title = celldate.formatString(config.macros.calendar.journalDateFmt);
if(calendarIsHoliday(celldate))
daycell.style.background = config.macros.calendar.holidaybg;
var now=new Date();
if ((now-celldate>=0) && (now-celldate<86400000)) // is today?
daycell.style.background = config.macros.calendar.todaybg;
if(window.findTiddlersWithReminders == null) {
var link = createTiddlyLink(daycell, title, false);
link.appendChild(document.createTextNode(day));
} else
var button = createTiddlyButton(daycell, day, title, onClickCalendarDate);
}
}
day++;
}
}
//}}}
//{{{
// Create a pop-up containing:
// * a link to a tiddler for this date
// * a 'new tiddler' link to add a reminder for this date
// * links to current reminders for this date
// NOTE: this code is only used if [[ReminderMacros]] is installed AND [[DatePlugin]] is //not// installed.
function onClickCalendarDate(ev) { ev=ev||window.event;
var d=new Date(this.getAttribute('title')); var date=d.formatString(config.macros.calendar.journalDateFmt);
var p=Popup.create(this); if (!p) return;
createTiddlyLink(createTiddlyElement(p,'li'),date,true);
var rem='\\n\\<\\<reminder day:%0 month:%1 year:%2 title: \\>\\>';
rem=rem.format([d.getDate(),d.getMonth()+1,d.getYear()+1900]);
var cmd="<<newTiddler label:[[new reminder...]] prompt:[[add a new reminder to '%0']]"
+" title:[[%0]] text:{{store.getTiddlerText('%0','')+'%1'}} tag:%2>>";
wikify(cmd.format([date,rem,config.options.txtCalendarReminderTags]),p);
createTiddlyElement(p,'hr');
var t=findTiddlersWithReminders(d,[0,31],null,1);
for(var i=0; i<t.length; i++) {
var link=createTiddlyLink(createTiddlyElement(p,'li'), t[i].tiddler, false);
link.appendChild(document.createTextNode(t[i]['params']['title']));
}
Popup.show(); ev.cancelBubble=true; if (ev.stopPropagation) ev.stopPropagation(); return false;
}
//}}}
//{{{
function calendarMaxDays(year, mon)
{
var max = config.macros.calendar.monthdays[mon];
if(mon == 1 && (year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0)) max++;
return max;
}
//}}}
//{{{
function createCalendarDayRows(cal, year, mon)
{
var row = createTiddlyElement(cal, 'tr');
var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
if(first1 < 0) first1 = first1 + 7;
var day1 = -first1 + 1;
var first2 = (new Date(year, mon+1, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
if(first2 < 0) first2 = first2 + 7;
var day2 = -first2 + 1;
var first3 = (new Date(year, mon+2, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
if(first3 < 0) first3 = first3 + 7;
var day3 = -first3 + 1;
var max1 = calendarMaxDays(year, mon);
var max2 = calendarMaxDays(year, mon+1);
var max3 = calendarMaxDays(year, mon+2);
while(day1 <= max1 || day2 <= max2 || day3 <= max3) {
row = createTiddlyElement(cal, 'tr');
createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;
createCalendarDays(row, 0, day2, max2, year, mon+1); day2 += 7;
createCalendarDays(row, 0, day3, max3, year, mon+2); day3 += 7;
}
}
//}}}
//{{{
function createCalendarDayRowsSingle(cal, year, mon)
{
var row = createTiddlyElement(cal, 'tr');
var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
if(first1 < 0) first1 = first1+ 7;
var day1 = -first1 + 1;
var max1 = calendarMaxDays(year, mon);
while(day1 <= max1) {
row = createTiddlyElement(cal, 'tr');
createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;
}
}
//}}}
//{{{
setStylesheet('.calendar, .calendar table, .calendar th, .calendar tr, .calendar td { text-align:center; } .calendar, .calendar a { margin:0px !important; padding:0px !important; }', 'calendarStyles');
//}}}
@@color(red):''Philippe Collard''@@
''Professeur des universités''
Université Nice ~Sophia-Antipolis
<<<
Département Informatique
Laboratoire ~I3S
Institut des Systèmes Complexes, Paris ~Île-de-France (~ISC-PIF)
Equipe Systèmes Artificiels Complexes ~Bio-Inspirés (SCOBI)
<<<
[[Envoyer un courriel|mailto: philippe.collard@gmail.com]]
/***
| Name:|Clock2|
| Author:|Simon Baird|
| Description:|A skinnable, sizeable analog clock|
| Source:|http://tiddlyspot.com/mptw/#Clock2|
| Requires:|Firefox 1.5.x or maybe Safari|
| Version:|1.0.6|
| Date:|8-Jul-2008|
!!Note
* Does not work in IE or Opera due to lack of canvas support.
* If you make a nice skin send it to me and I will include it here.
*I'm not actively maintaining this plugin
* See also http://randomibis.com/coolclock/
!!Ideas
* Can we support IE with this? http://sourceforge.net/projects/excanvas
* Skin should specify order of drawing so things can be on top of other things
* Fix it so we can have filled and/or stroked elements
* Skin should allow any number of moving and static elements
* Make download and example for non-TW use
* Make floating draggable?
!!Examples
{{{
<<clock2 fancy>><<clock2 120>>
<<clock2 chunkySwiss>> <<clock2 60 chunkySwiss noSeconds>><<clock2 '{
outerBorder: { lineWidth: 60, radius:55, color: "#dd8877", alpha: 1 },
smallIndicator: { lineWidth: 4, startAt: 80, endAt: 95, color: "white", alpha: 1 },
largeIndicator: { lineWidth: 12, startAt: 77, endAt: 89, color: "#dd8877", alpha: 1 },
hourHand: { lineWidth: 15, startAt: -15, endAt: 50, color: "white", alpha: 1 },
minuteHand: { lineWidth: 10, startAt: 24, endAt: 200, color: "#771100", alpha: 0.6 },
secondHand: { lineWidth: 3, startAt: 22, endAt: 83, color: "green", alpha: 0 },
secondDecoration: { lineWidth: 1, startAt: 52, radius: 26, fillColor: "white", color: "red", alpha: 0.2 }
}'>>
}}}
<<clock2 fancy>><<clock2 120>>
<<clock2 chunkySwiss>> <<clock2 60 chunkySwiss noSeconds>><<clock2 '{
outerBorder: { lineWidth: 60, radius:55, color: "#dd8877", alpha: 1 },
smallIndicator: { lineWidth: 4, startAt: 80, endAt: 95, color: "white", alpha: 1 },
largeIndicator: { lineWidth: 12, startAt: 77, endAt: 89, color: "#dd8877", alpha: 1 },
hourHand: { lineWidth: 15, startAt: -15, endAt: 50, color: "white", alpha: 1 },
minuteHand: { lineWidth: 10, startAt: 24, endAt: 200, color: "#771100", alpha: 0.6 },
secondHand: { lineWidth: 3, startAt: 22, endAt: 83, color: "green", alpha: 0 },
secondDecoration: { lineWidth: 1, startAt: 52, radius: 26, fillColor: "white", color: "red", alpha: 0.2 }
}'>>
See also BigClock.
!!Code
***/
//{{{
window.CoolClock = function(canvasId,displayRadius,skinId,showSecondHand) {
return this.init(canvasId,displayRadius,skinId,showSecondHand);
}
CoolClock.config = {
clockTracker: {},
tickDelay: 1000,
longTickDelay: 15000,
defaultRadius: 85,
renderRadius: 100,
defaultSkin: "swissRail",
skins: {
// try making your own...
swissRail: {
outerBorder: { lineWidth: 1, radius:95, color: "black", alpha: 1 },
smallIndicator: { lineWidth: 2, startAt: 89, endAt: 93, color: "black", alpha: 1 },
largeIndicator: { lineWidth: 4, startAt: 80, endAt: 93, color: "black", alpha: 1 },
hourHand: { lineWidth: 8, startAt: -15, endAt: 50, color: "black", alpha: 1 },
minuteHand: { lineWidth: 7, startAt: -15, endAt: 75, color: "black", alpha: 1 },
secondHand: { lineWidth: 1, startAt: -20, endAt: 85, color: "red", alpha: 1 },
secondDecoration: { lineWidth: 1, startAt: 70, radius: 4, fillColor: "red", color: "red", alpha: 1 }
},
chunkySwiss: {
outerBorder: { lineWidth: 5, radius:97, color: "black", alpha: 1 },
smallIndicator: { lineWidth: 4, startAt: 89, endAt: 93, color: "black", alpha: 1 },
largeIndicator: { lineWidth: 8, startAt: 80, endAt: 93, color: "black", alpha: 1 },
hourHand: { lineWidth: 12, startAt: -15, endAt: 60, color: "black", alpha: 1 },
minuteHand: { lineWidth: 10, startAt: -15, endAt: 85, color: "black", alpha: 1 },
secondHand: { lineWidth: 4, startAt: -20, endAt: 85, color: "red", alpha: 1 },
secondDecoration: { lineWidth: 2, startAt: 70, radius: 8, fillColor: "red", color: "red", alpha: 1 }
},
fancy: {
outerBorder: { lineWidth: 5, radius:95, color: "green", alpha: 0.7 },
smallIndicator: { lineWidth: 1, startAt: 80, endAt: 93, color: "black", alpha: 0.4 },
largeIndicator: { lineWidth: 1, startAt: 30, endAt: 93, color: "black", alpha: 0.5 },
hourHand: { lineWidth: 8, startAt: -15, endAt: 50, color: "blue", alpha: 0.7 },
minuteHand: { lineWidth: 7, startAt: -15, endAt: 92, color: "red", alpha: 0.7 },
secondHand: { lineWidth: 10, startAt: 80, endAt: 85, color: "blue", alpha: 0.3 },
secondDecoration: { lineWidth: 1, startAt: 30, radius: 50, fillColor: "blue", color: "red", alpha: 0.15 }
}
}
};
CoolClock.prototype = {
init: function(canvasId,displayRadius,skinId,showSecondHand) {
this.canvasId = canvasId;
this.displayRadius = displayRadius || CoolClock.config.defaultRadius;
this.skinId = skinId || CoolClock.config.defaultSkin;
this.showSecondHand = typeof showSecondHand == "boolean" ? showSecondHand : true;
this.tickDelay = CoolClock.config[ this.showSecondHand ? "tickDelay" : "longTickDelay"];
this.canvas = document.getElementById(canvasId);
this.canvas.setAttribute("width",this.displayRadius*2);
this.canvas.setAttribute("height",this.displayRadius*2);
this.renderRadius = CoolClock.config.renderRadius;
var scale = this.displayRadius / this.renderRadius;
this.ctx = this.canvas.getContext("2d");
this.ctx.scale(scale,scale);
CoolClock.config.clockTracker[canvasId] = this;
this.tick();
return this;
},
fullCircle: function(skin) {
this.fullCircleAt(this.renderRadius,this.renderRadius,skin);
},
fullCircleAt: function(x,y,skin) {
with (this.ctx) {
save();
globalAlpha = skin.alpha;
lineWidth = skin.lineWidth;
if (!document.all)
beginPath();
arc(x, y, skin.radius, 0, 2*Math.PI, false);
if (skin.fillColor) {
fillStyle = skin.fillColor
fill();
}
else {
// XXX why not stroke and fill
strokeStyle = skin.color;
stroke();
}
restore();
}
},
radialLineAtAngle: function(angleFraction,skin) {
with (this.ctx) {
save();
translate(this.renderRadius,this.renderRadius);
rotate(Math.PI * (2 * angleFraction - 0.5));
globalAlpha = skin.alpha;
strokeStyle = skin.color;
lineWidth = skin.lineWidth;
if (skin.radius) {
this.fullCircleAt(skin.startAt,0,skin)
}
else {
beginPath();
moveTo(skin.startAt,0)
lineTo(skin.endAt,0);
stroke();
}
restore();
}
},
render: function(hour,min,sec) {
var skin = CoolClock.config.skins[this.skinId];
this.ctx.clearRect(0,0,this.renderRadius*2,this.renderRadius*2);
this.fullCircle(skin.outerBorder);
for (var i=0;i<60;i++)
this.radialLineAtAngle(i/60,skin[ i%5 ? "smallIndicator" : "largeIndicator"]);
this.radialLineAtAngle((hour+min/60)/12,skin.hourHand);
this.radialLineAtAngle((min+sec/60)/60,skin.minuteHand);
if (this.showSecondHand) {
this.radialLineAtAngle(sec/60,skin.secondHand);
this.radialLineAtAngle(sec/60,skin.secondDecoration);
}
},
nextTick: function() {
setTimeout("CoolClock.config.clockTracker['"+this.canvasId+"'].tick()",this.tickDelay);
},
stillHere: function() {
return document.getElementById(this.canvasId) != null;
},
refreshDisplay: function() {
var now = new Date();
this.render(now.getHours(),now.getMinutes(),now.getSeconds());
},
tick: function() {
if (this.stillHere()) {
this.refreshDisplay()
this.nextTick();
}
}
}
config.macros.clock2 = {
counter: 0,
handler: function (place,macroName,params,wikifier,paramString,tiddler) {
var size,skin,seconds,skinData;
for (var i=0;i<params.length;i++)
if (/^\d+$/.exec(params[i]))
size = params[i];
else if (params[i] == "noSeconds")
seconds = false;
else if (/^\{/.exec(params[i]))
eval("skinData = " + params[i]);
else
skin = params[i];
if (skinData) {
CoolClock.config.skins.customSkin = skinData;
skin = "customSkin";
}
var canvas = createTiddlyElement(place,"canvas","clockcanvas"+this.counter);
var clock = new CoolClock("clockcanvas"+this.counter,size,skin,seconds);
this.counter++;
}
}
//}}}
<<tag interface>> <<tag syntaxe>>
<<<
*LMD INFORMATIQUE
**[[Licence|Licence Informatique]]
**[[Master|Master Informatique]]
*[[Licence MASS]]
*[[Licence MIAGE]]
<<<
[[Cours/TD]]
[[Diffusion de la connaissance]]
@@color(red):Les automates cellulaires et le vivant@@
Philippe Collard,
[[La Science au Présent|http://www.universalis.fr/encyclopedie/automates-cellulaires/]] : complément annuel scientifique de l'Encyclopædia Universalis, [[2005]]
Encyclopædia Universalis ISBN 2-85229-512-1
http://www.universalis.fr/encyclopedie/automates-cellulaires/
----
@@color(red):Vie Artificielle@@
http://www.universalis.fr/encyclopedie/vie-artificielle/
----
Encyclopædia Universalis (notice), [[2001]]
@@color(red):Algorithmes Génétiques@@
http://www.universalis.fr/encyclopedie/algorithmique/6-algorithmes-genetiques/
----
Encyclopædia Universalis (notice), [[2001]]
@@color(red):Programmation Déclarative et Impérative en Prolog@@
----
[[Ed. Masson|http://www.amazon.fr/Programmation-imp%C3%A9rative-programmation-d%C3%A9clarative-Prolog/dp/2225828091]], Collection Manuels Informatiques, Paris, [[1992]]
http://books.google.fr/books/about/Programmation_d%C3%A9clarative_et_imp%C3%A9rativ.html?id=4pGGAAAAIAAJ
----
@@color(red):Programmation Structurée en Assembleur@@ (Trois ouvrages : 6502-8080-68000)
[[Ed. Masson|http://www.amazon.fr/Programmation-structur%C3%A9e-assembleur-8086-80286/dp/2225813639]], Collection Manuels Informatiques, Paris, [[1990]]
http://www.guideinformatique.com/livre-programmation_structuree_en_assembleur_8_086_et_80_286-4817.htm
<div class='toolbar' macro='toolbar +saveTiddler
-cancelTiddler deleteTiddler'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div class="editLabel"> </div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span
macro='message views.editor.tagPrompt'></span><span
macro='tagChooser'></span></div>
<div class='editor' macro='edit text'></div>
@@color(blue):Me Contacter au [[Département Informatique]]@@ ([[UNSA|http://portail.unice.fr/jahia/jsp/index.jsp]])
/***
|Name|FullScreenPlugin|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#FullScreenPlugin|
|Version|1.1|
|Requires|~TW2.x|
!Description:
Toggle between viewing tiddlers fullscreen and normally. Very handy for when you need more viewing space.
!Demo:
Click the ↕ button in the toolbar for this tiddler. Click it again to turn off fullscreen.
!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.
Edit the ViewTemplate to add the fullscreen command to the toolbar.
!History:
*25-07-06: ver 1.1
*20-07-06: ver 1.0
!Code
***/
//{{{
var lewcidFullScreen = false;
config.commands.fullscreen =
{
text:"FullScreen",
tooltip:"Fullscreen mode"
};
config.commands.fullscreen.handler = function (event,src,title)
{
if (lewcidFullScreen == false)
{
lewcidFullScreen = true;
setStylesheet('#sidebar, .header , #mainMenu{display:none;} #displayArea{margin:0em 0 0 0 !important;}',"lewcidFullScreenStyle");
}
else
{
lewcidFullScreen = false;
setStylesheet(' ',"lewcidFullScreenStyle");
}
}
config.macros.fullscreen={};
config.macros.fullscreen.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
var label = params[0]||" «Screen» ";
var tooltip = params[1]||"Fullscreen mode";
createTiddlyButton(place,label,tooltip,config.commands.fullscreen.handler);
}
var lewcid_fullscreen_closeTiddler = Story.prototype.closeTiddler;
Story.prototype.closeTiddler =function(title,animate,slowly)
{
lewcid_fullscreen_closeTiddler.apply(this,arguments);
if (story.isEmpty() && lewcidFullScreen == true)
config.commands.fullscreen.handler();
}
Slider.prototype.lewcidStop = Slider.prototype.stop;
Slider.prototype.stop = function()
{
this.lewcidStop();
if (story.isEmpty() && lewcidFullScreen == true)
config.commands.fullscreen.handler();
}
//}}}
*You can create ''Bold'' text by enclosing it in pairs of single quotes ('''')
*You can create ==Strikethrough== text by enclosing it in pairs of equal signs (====)
*You can __Underline__ text by enclosing it in pairs of underscores (____)
*You can create //Italic// text by enclosing it in pairs of forward slashes (////)
*You can create ^^superscript^^ text by enclosing it in pairs of carrats (^^^^)
*You can create ~~subscript~~ text by enclosing it in pairs of tildes (~~~~)
*You can change the text's @@color(green):color@@ by enclosing it in pairs of at-signs (@@@@) and specifying a text color using the phrase ''color(yourcolorhere):''
*You can change the text's @@bgcolor(red):background color@@ by enclosing it in pairs of at-signs (@@@@) and specifying a background text color using the phrase ''bgcolor(yourcolorhere):''
*__CONTROLE TERMINAL__ : JEUDI 5 MAI (8h-10H) sans document dans la salle habituelle de cours (Bâtiment chimie)
*__PROJET__ : PAR BINÔME A RENDRE LE VENDREDI 22 AVRIL 2011
!1- Jeudi 3 février 2011 : Introduction aux Systèmes Complexes
>[[Introduction|./enseignement_fichiers/licenceInfo/IntroSC/introduction.pdf]]
>[[POA|./enseignement_fichiers/licenceInfo/IntroSC/progNetLogo/ProgrammationNetLogo.pdf]]
>[[TP|./enseignement_fichiers/licenceInfo/IntroSC/progNetLogo/IntroNetLogo.html]]
!2- jeudi 10 février 2011 : Programmation Orientée Agent
>[[MicroVersusMacro|./enseignement_fichiers/licenceInfo/IntroSC/projet/micro-macro.pdf]]
>[[TP|./enseignement_fichiers/licenceInfo/IntroSC/procession/procession.html]]
>[[PROJET|./enseignement_fichiers/licenceInfo/IntroSC/projet/projet2011.html]]
!3- Jeudi 17 février 2010 : Intelligence Collective (Ant)
>[[COURS|./enseignement_fichiers/licenceInfo/IntroSC/ant/cours-ic.ppt]]
>[[TP|./enseignement_fichiers/licenceInfo/IntroSC/ant/tp-ant.html]]
!4- Jeudi 24 février 2010 : Chaos déterministe
>[[COURS|./enseignement_fichiers/licenceInfo/IntroSC/Logistique/equation-logistique.ppt]]
>[[TP|./enseignement_fichiers/licenceInfo/IntroSC/Logistique/TP-logistique.html]]
!5- Jeudi 10 mars 2011 : Automate Cellulaire
>[[COURS|./enseignement_fichiers/licenceInfo/IntroSC/AC/AC.ppt]]
>[[TP|./enseignement_fichiers/licenceInfo/IntroSC/AC/AC.html]]
!6- Jeudi 17 mars 2011 : Morphogénèse
>[[COURS|./enseignement_fichiers/licenceInfo/IntroSC/morphogenese1/morphogenese.pdf]]
>[[TP|./enseignement_fichiers/licenceInfo/IntroSC/morphogenese1/TP-Morphogenese.html]]
!7- Jeudi 24 mars 2011 : Propagation des épidémies & percolation
>[[COURS|./enseignement_fichiers/licenceInfo/IntroSC/epidemie/epidemie.pdf]]
>[[TP|./enseignement_fichiers/licenceInfo/IntroSC/epidemie/TP-epidemie.html]]
!8- Jeudi 1 avril 2010 : Computational Sociologie
>[[COURS|./enseignement_fichiers/licenceInfo/IntroSC/computationalSociologie/cs.pdf]]
>TP : voir cours
!9- Jeudi 8 avril 2010 : Particule Swarm Optimisation (PSO)
>[[COURS|./enseignement_fichiers/licenceInfo/IntroSC/pso/pso.pdf]]
>TP : terminer le TP 8 + [[TP|./enseignement_fichiers/licenceInfo/IntroSC/pso/tp-pso.html]]
----
!10- Jeudi 15 avril 2010 : ?
10 TP : le lundi à partir du 15 septembre (13h-15h)
5 TD : le mercredi à partir du 17 septembre (8h-10h) PAS DE TD le mercredi 8 octobre
-- CC le mercredi 22 octobre 8h-10h--
>[[serie1|./enseignement_fichiers/L3 MASS LP/serie1.html]] [[solution|./enseignement_fichiers/L3 MASS LP/serie1solution.html]]
>[[serie2|./enseignement_fichiers/L3 MASS LP/serie2.html]] [[solution|./enseignement_fichiers/L3 MASS LP/serie2solution.html]]
>[[serie3|./enseignement_fichiers/L3 MASS LP/serie3.html]] [[solution|./enseignement_fichiers/L3 MASS LP/serie3solution.html]]
>[[serie4|./enseignement_fichiers/L3 MASS LP/serie4.html]] [[solution|./enseignement_fichiers/L3 MASS LP/serie4solution.html]]
>[[serie5|./enseignement_fichiers/L3 MASS LP/serie5.html]] [[solution|./enseignement_fichiers/L3 MASS LP/serie5solution.html]]
>[[serie6|./enseignement_fichiers/L3 MASS LP/serie6.html]] [[solution|./enseignement_fichiers/L3 MASS LP/serie6solution.html]]
>[[serie7|./enseignement_fichiers/L3 MASS LP/serie7.html]] [[solution|./enseignement_fichiers/L3 MASS LP/serie7solution.html]]
5 COURS (2h) : le jeudi à partir du jeudi 26 janvier 2012 (13h-15h salle M-2-3)
5 TP (2h) : le jeudi à partir du jeudi 26 janvier 2012 (15h-19h salle 312-313)
!Projet à rendre le jeudi 11 mars
!1- Jeudi 26 janvier : Introduction aux Système complexes et à la Programmation Orienté Agent en ~NetLogo
>[[Intro|./enseignement_fichiers/L3MassPOA/introduction.pdf]]
>[[TP|./enseignement_fichiers/L3MassPOA/IntroNetLogo.html]]
!2- Jeudi 2 février : Procession d'agents
>[[Programmation Netlog|./enseignement_fichiers/L3MassPOA/ProgrammationNetLogo.pdf]]
>[[TP|./enseignement_fichiers/L3MassPOA/procession/procession.html]]
!3- eudi 9 février : Automate cellulaire 1D et 2D (+ Présentation projet)
>[[COURS|./enseignement_fichiers/L3MassPOA/AC.ppt]]
>[[TP|./enseignement_fichiers/L3MassPOA/AC.html]]
>[[MicroVersusMacro|./enseignement_fichiers/L3MassPOA/projet/projet2011/micro-macro.pdf]]
>[[PROJET|./enseignement_fichiers/L3MassPOA/projet/projet2011/projet2011.html]]
!4- Jeudi 16 février : Intelligence Collective : cours 13h-15h + TDM 15h-17h
>[[COURS|./enseignement_fichiers/L3MassPOA/IC/cours-ic.ppt]]
>[[TP|./enseignement_fichiers/L3MassPOA/IC/tp-ant.html]]
!5- Jeudi 23 février : Chaos déterministe
>[[COURS|./enseignement_fichiers/L3MassPOA/Logistique/equation-logistique.ppt]]
>[[TP|./enseignement_fichiers/L3MassPOA/Logistique/TP-logistique.html]]
!Jeudi 8 mars 2012 : Contrôle Terminal (14h-16h) + TDM (finalisation projet) 16h30-18h30
!Vendredi 11 mars 2012 : Fin du projet & [[envoi des fichiers attachés à philippe.collard@gmail|mailto: philippe.collard@gmail.com]] avant minuit !
''Évaluation''
~CC1 : Travaux en TDM (25%)
~CC2 : projet (en binôme) (35%) @@color(red): A rendre au plus tard le __dimanche 18 décembre 2011__@@
CT : écrit (40%) : @@color(blue): lundi 28 novembre 2011, 10h-12h sans document (amphi Math)@@
''10 séances'' le lundi à partir du 12 septembre 2011 :
>''__Cours__'' : 10h-12h (Amphi M)
>>[[Cours1.ppt|./enseignement_fichiers/licenceMASS/cours/coursJava1.ppt]]
>>[[Cours2.ppt|./enseignement_fichiers/licenceMASS/cours/coursJava2.ppt]]
>>[[Cours3.ppt|./enseignement_fichiers/licenceMASS/cours/coursJava3.ppt]]
>>[[Cours4.ppt|./enseignement_fichiers/licenceMASS/cours/coursJava4.ppt]]
> ''__Travaux pratiques__'' : groupe 1 (13h-15h) - groupe 2 (15h-17h) salle ~PV312
>>[[SERIE1|./enseignement_fichiers/licenceMASS/TD/serie1/serie1.html]]
>>[[SERIE2|./enseignement_fichiers/licenceMASS/TD/serie2/serie2.htm]]
>>[[SERIE3|./enseignement_fichiers/licenceMASS/TD/serie3/serie3.htm]]
>>[[SERIE4|./enseignement_fichiers/licenceMASS/TD/serie4/serie4.htm]]
>>[[SERIE5|./enseignement_fichiers/licenceMASS/TD/serie5/serie5.htm]]
>[[Projet|./enseignement_fichiers/licenceMASS/projet/projet2011/projet2011.html]] @@color(red):A rendre au plus tard le __dimanche 18 décembre 2011__@@
#--lundi 12 septembre 2011--
#--lundi 19 septembre 2011--
#--lundi 26 septembre 2011--
#--lundi 3 octobre 2011--
#--lundi 10 octobre 2011--
#--lundi 17 octobre 2011-- @@color(red): SUJET DU PROJET DISPONIBLE [[ici|./enseignement_fichiers/licenceMASS/projet/projet2011/projet2011.html]] @@
#--lundi 24 octobre 2011--
#--lundi 7 novembre 2011--
#--lundi 14 novembre 2011--
#--lundi 21 novembre 2011--
#''lundi 28 novembre 2011 : '' @@color(red): Contrôle Terminal : 10h-12h sans document (amphi Math)@@ + @@color(green): Aide au Projet 13h-17h en salle de TP@@
[[Exemple de sujet de CT|./enseignement_fichiers/licenceMASS/examen/2005/exam.htm]]
Correction du sujet :
[[Monome.java|./enseignement_fichiers/licenceMASS/examen/2005/Monome.java]]
[[Polynome.java|./enseignement_fichiers/licenceMASS/examen/2005/Polynome.java]]
[[Trinome.java|./enseignement_fichiers/licenceMASS/examen/2005/Trinome.java]]
[[Solution.java|./enseignement_fichiers/licenceMASS/examen/2005/Solution.java]]
!!@@L2+L3@@
*[[IA-Prolog|./enseignement_fichiers/licenceInfo/prolog/td.html]]
!!@@L3@@
*[[Introduction Systèmes Complexes|Licence 3/Informatique/Introduction Systèmes Complexes]]
*[[Licence 3/MASS/Programmation Orientée Objet & Langage Java]]
*[[Licence 3/MASS/Programmation Orientée Agents]]
*[[Licence 3/MASS/Programmation C]]
*[[Séances Préparatoires: POO/JAVA|./enseignement_fichiers/L3Miage/mise-a-niveau/TD.html]]
*[[Travaux Pratique : POO/JAVA]]
^^[[. |MainMenu]]^^
----
<<search>> @@bgcolor(red):<<toggleSideBar "" :: hide >>@@
----
@@bgcolor(orange):Semaine <<today 0WW>>/52@@
<<calendar thismonth>>
----
<<clock2 70>>
----
<<closeAll>> @@bgcolor(red): <<toggleSideBar ' ' ':' show>>@@
----
<<search>> @@bgcolor(red):<<toggleSideBar "" :: hide >>@@
!@@M2@@
*[[Natural Computing]]
*Algorithmes Evolutionnaires
**[[Cours|./enseignement_fichiers/xxx.ppt]] [[TD|./enseignement_fichiers/xxx.doc]]
!@@M1@@
*Systèmes Artificiels Complexes (SAC)
**[[Cours|./enseignement_fichiers/MaitriseINFO/SAC2011/SACintroduction.pdf]]
*Micro-préférences versus Macro-comportement
**[[Cours|./enseignement_fichiers/MaitriseINFO/SAC2011/SACmicro-macro.pdf]]
**[[TD|./enseignement_fichiers/MaitriseINFO/SAC2011/SACschelling.html]]
*Ant Colony Optimization :
**[[Cours|./enseignement_fichiers/MaitriseINFO/SAC2011/SAC2011-ACO.pdf]]
**[[TD|./enseignement_fichiers/MaitriseINFO/SAC2011/tdACO.html]]
__Contrôle terminal__ : lundi 7 mars 2011, 14h-16h, salle 316, sans document
__Rendu mini-projet__ : par binôme, vendredi 11 mars, un fichier attaché .pdf par email [[ici|mailto:philippe.collard@gmail.com]]
!Objectifs:
>Dans le but de créer des systèmes autonomes, robustes et évolutifs, une nouvelle forme d'ingénierie trouve son inspiration dans les systèmes complexes naturels. Par exemple, pour concevoir des systèmes sécurisés contre les intrusions, il est possible d'imaginer de nouveaux mécanismes inspirés des défenses immunitaires. Les systèmes inspirés par la Nature doivent être pensés comme des entités auto-organisées, adaptatives et distribuées ; ils reproduisent le comportement et les schéma organisationnels qui existent dans les systèmes naturels complexes.
>Ce cours est une introduction aux principes et méthodes de "l'informatique Nature-inspirée" : il présente différents systèmes utilisés en ingénierie (optimisation, communication, etc.). Il fait le lien entre les sciences de la Nature (éthologie, socio-biologie, évolution neo-darwienne, ...) et les méthodes informatiques. Nous insisterons sur le fait que la Nature doit être une source d'inspiration et non une contrainte.
!Programme (5 séance de 4 heures)
#Introduction NaturalComputing : From micro-motive to macro-behavior [[CoursTD|./enseignement_fichiers/M2info/naturalComputing/micro-macro/micro-macro.pdf]]
#Optimisation par Colonie de fourmis (Ant optimization) [[Cours|./enseignement_fichiers/M2info/naturalComputing/ANT/Fourmis.ppt]]+ [[TDM|./enseignement_fichiers/M2info/naturalComputing/ANT/tdACO.html]]
#Transposition du modèle de Schelling sur un réseau invariant d'échelle (Scale-free network) [[CoursTD|./enseignement_fichiers/DEA/naturalComputing/micro-macro.pdf]]
# [[voir site de Sébastien Vérel|http://www.i3s.unice.fr/~verel/]]
# [[voir site de Sébastien Vérel|http://www.i3s.unice.fr/~verel/]]
# Évaluation (soutenance des projets)
!Bibliographie :
* Machine Nature: The Coming Age of Bio-Inspired Computing, by Moshe Sipper, McGraw-Hill, New York, 2002
* Les Systèmes complexes : mathématiques & biologie, H. P. Zwirn, ed.Odile Jacob
* Outil de simulation : http://ccl.northwestern.edu/netlogo
* Réseau National de Sciences de la Complexité : http://complexsystems.lri.fr/RNSC
/***
|''Name:''|RearrangeTiddlersPlugin|
|''Source:''|http://www.TiddlyTools.com/#AttachFilePlugin|
|''Author:''|Joe Raii|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|''~CoreVersion:''|2.0.10|
adapted from: http://www.cs.utexas.edu/~joeraii/dragn/#Draggable
changes by ELS:
* hijack refreshTiddler() instead of overridding createTiddler()
* find title element by className instead of elementID
* set cursor style via code instead of stylesheet
* set tooltip help text
* set tiddler "position:relative" when starting drag event, restore saved value when drag ends
* update 2006.08.07: use getElementsByTagName("*") to find title element, even when it is 'buried' deep in tiddler DOM elements (due to custom template usage)
***/
//{{{
Story.prototype.rearrangeTiddlersHijack_refreshTiddler = Story.prototype.refreshTiddler;
Story.prototype.refreshTiddler = function(title,template,unused1,unused2,unused3,unused4,unused5)
{
this.rearrangeTiddlersHijack_refreshTiddler(title,template,unused1,unused2,unused3,unused4,unused5);
var theTiddler = document.getElementById(this.idPrefix + title); if (!theTiddler) return;
var theHandle;
var children=theTiddler.getElementsByTagName("*");
for (var i=0; i<children.length; i++) if (hasClass(children[i],"title")) { theHandle=children[i]; break; }
if (!theHandle) return theTiddler;
Drag.init(theHandle, theTiddler, 0, 0, null, null);
theHandle.style.cursor="move";
theHandle.title="drag title to re-arrange tiddlers"
theTiddler.onDrag = function(x,y,myElem) {
if (this.style.position!="relative")
{ this.savedstyle=this.style.position; this.style.position="relative"; }
y = myElem.offsetTop;
var next = myElem.nextSibling;
var prev = myElem.previousSibling;
if (next && y + myElem.offsetHeight > next.offsetTop + next.offsetHeight/2) {
myElem.parentNode.removeChild(myElem);
next.parentNode.insertBefore(myElem, next.nextSibling);//elems[pos+1]);
myElem.style["top"] = -next.offsetHeight/2+"px";
}
if (prev && y < prev.offsetTop + prev.offsetHeight/2) {
myElem.parentNode.removeChild(myElem);
prev.parentNode.insertBefore(myElem, prev);
myElem.style["top"] = prev.offsetHeight/2+"px";
}
};
theTiddler.onDragEnd = function(x,y,myElem) {
myElem.style["top"] = "0px";
if (this.savedstyle!=undefined)
this.style.position=this.savedstyle;
}
return theTiddler;
}
/**************************************************
* dom-drag.js
* 09.25.2001
* www.youngpup.net
**************************************************
* 10.28.2001 - fixed minor bug where events
* sometimes fired off the handle, not the root.
**************************************************/
var Drag = {
obj:null,
init:
function(o, oRoot, minX, maxX, minY, maxY) {
o.onmousedown = Drag.start;
o.root = oRoot && oRoot != null ? oRoot : o ;
if (isNaN(parseInt(o.root.style.left))) o.root.style.left="0px";
if (isNaN(parseInt(o.root.style.top))) o.root.style.top="0px";
o.minX = typeof minX != 'undefined' ? minX : null;
o.minY = typeof minY != 'undefined' ? minY : null;
o.maxX = typeof maxX != 'undefined' ? maxX : null;
o.maxY = typeof maxY != 'undefined' ? maxY : null;
o.root.onDragStart = new Function();
o.root.onDragEnd = new Function();
o.root.onDrag = new Function();
},
start:
function(e) {
var o = Drag.obj = this;
e = Drag.fixE(e);
var y = parseInt(o.root.style.top);
var x = parseInt(o.root.style.left);
o.root.onDragStart(x, y, Drag.obj.root);
o.lastMouseX = e.clientX;
o.lastMouseY = e.clientY;
if (o.minX != null) o.minMouseX = e.clientX - x + o.minX;
if (o.maxX != null) o.maxMouseX = o.minMouseX + o.maxX - o.minX;
if (o.minY != null) o.minMouseY = e.clientY - y + o.minY;
if (o.maxY != null) o.maxMouseY = o.minMouseY + o.maxY - o.minY;
document.onmousemove = Drag.drag;
document.onmouseup = Drag.end;
Drag.obj.root.style["z-index"] = "10";
return false;
},
drag:
function(e) {
e = Drag.fixE(e);
var o = Drag.obj;
var ey = e.clientY;
var ex = e.clientX;
var y = parseInt(o.root.style.top);
var x = parseInt(o.root.style.left);
var nx, ny;
if (o.minX != null) ex = Math.max(ex, o.minMouseX);
if (o.maxX != null) ex = Math.min(ex, o.maxMouseX);
if (o.minY != null) ey = Math.max(ey, o.minMouseY);
if (o.maxY != null) ey = Math.min(ey, o.maxMouseY);
nx = x + (ex - o.lastMouseX);
ny = y + (ey - o.lastMouseY);
Drag.obj.root.style["left"] = nx + "px";
Drag.obj.root.style["top"] = ny + "px";
Drag.obj.lastMouseX = ex;
Drag.obj.lastMouseY = ey;
Drag.obj.root.onDrag(nx, ny, Drag.obj.root);
return false;
},
end:
function() {
document.onmousemove = null;
document.onmouseup = null;
Drag.obj.root.style["z-index"] = "0";
Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style["left"]), parseInt(Drag.obj.root.style["top"]), Drag.obj.root);
Drag.obj = null;
},
fixE:
function(e) {
if (typeof e == 'undefined') e = window.event;
if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;
if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;
return e;
}
};
//}}}
^^[[. |SideBarOptions]]^^ <<saveChanges>>
<<closeAll>>
<<newTiddler>>
----
[[Aide Mémoire]]
<<slider chkSliderOptionsPanel OptionsPanel options 'Change TiddlyWiki advanced options'>> [[© tiddlywiki|http://www.tiddlywiki.com/]]
VERSION : <<version>>
[img[picturename|./logo_UNSA-01.jpg]] [[Philippe|SiteTitle]] @@color(orange):Collard@@
div#mainmenu hr {margin:0px;padding:1px;padding-top:10px;
border-style:none;
border-width:1px;
border-color:#ccc;
border-bottom-style:solid;
}
.header {height: 100px}
.siteTitle {font-size:2.5em;}
.headerShadow {position:relative; padding:1em 0em 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:1em 0em 1em 1em; left:0px; top:0px;}
.viewer pre { font-size:75%; }
/* colour scheme begin */
div#titleLine { padding-top:30px; background:#369;}
div#sidebarOptions { background:#696; }
div#sidebarOptions a.button { color:#eef;}
div#sidebarOptions a.button:hover { color:#fff; background:#252;}
div#mainmenu .tiddlyLink { font-weight:bold;color:#369; }
div#mainmenu .tiddlyLink:hover { background:#369;color:white; }
div#mainmenu .button { font-weight:bold; color:#363; }
div#mainmenu .button:hover { background:#363;color:white; }
div.viewer a.tiddlyLink { color:#369; }
div.viewer a.tiddlyLink:hover { background:#acd; }
div.footer a.tiddlyLink { color:#369; }
div.footer a.tiddlyLink:hover { background:#acd; }
.editorFooter a.button, .tiddler .button { color: #369; background:#eee; }
.editorFooter a.button:hover, .tiddler .button:hover { color: #fff; background: #369; }
.editorFooter a.button:active, .tiddler .button:active { color: #fff; background: #369; }
.editorFooter a:link { color: #369; }
#popup {color:#eee; background:#369;}
#popup a {color:#fff; background:#369; }
#popup a:hover {color:black; background:#eee;}
div.tabset {background:#696;}
a.tab {background:#369;}
#mainMenu .externalLink { color:#252; }
#mainMenu .externalLink:hover { color:white;background:#696; }
.tiddler .externalLink { color:#252; }
.tiddler .externalLink:visited { color:#252; }
.tiddler .externalLink:hover { color:#252;background:#ada; }
.viewer a:link { color: #252; }
.viewer a:visited { color: #252; }
.viewer a:hover { color:#252; background:#ada; }
#titleLine a {color:white;}
a.tabSelected {background:#369;font-weight:bold;}
#sidebarTabs {color: white;background-color: #69b;}
#sidebarTabs .tabSelected {color: white;background-color: #369;}
#sidebarTabs .tabUnselected {color: white;background-color: #369;}
#sidebarTabs .tabContents {background-color: #69c;}
#sidebarTabs .txtMoreTab .tabSelected {background-color: #7ad;}
#sidebarTabs .txtMoreTab .tabUnselected {background-color: #369;}
#sidebarTabs .txtMoreTab .tabContents {background-color: #7ad;}
#sidebarTabs .txtMoreTab .tabset {background-color: #69b;}
#sidebarTabs .tabContents .tiddlyLink {color: #135;}
#sidebarTabs .tabContents .tiddlyLink:hover {background-color: #eee;color: black;}
#sidebarTabs .tabContents .button {color: #eee;}
#sidebarTabs .tabContents .button:hover {color: #white;background-color: #252;}
/* colour scheme end */
#displayArea {
margin-right: 15.1em;
margin-left: 14.3em;
}
// this works great in firefox but breaks something with ie. help??
// .toolbar { float:right; }
.viewer h1,
.viewer h2,
.viewer h3,
.viewer h4,
.viewer h5 { font-family: 'Trebuchet MS' Arial sans-serif; background:#f8f8f8; }
.viewer h1 { font-size:1.2em; }
.viewer h2 { font-size:1.1em; }
.viewer h3 { font-size:1.0em; }
.viewer h4 { font-size:0.9em; }
.viewer h5 { font-size:0.8em; }
body {
background:#eee;
}
div.tiddler {
background:white;
border-top:solid #ccc 2px;
border-left:solid #ccc 2px;
border-bottom:solid #aaa 2px;
border-right:solid #aaa 2px;
margin-bottom:5px;
padding-bottom:10px;
}
div.title {
font-family:'Trebuchet MS' Arial sans-serif;
font-size:150%;
}
div.editor input,
div.editor textarea {
background:#ffe;
border:solid #aa9 2px;
margin:4px;
}
@media print {
div.tiddler {border:none white 0px; border-top:solid #bbb 1px;}
div.tagged {border:none white 0px;}
#titleLine { display:none; }
#displayArea { margin-right: 0px; margin-left: 0px; }
.toolbar { display:none; }
}
/*
{{{
*/
body {
background-color: #ffffff;
}
#siteSubtitle {
font-weight: bold;
}
#displayArea {
margin: 0em 15em 0em 0.5em;
background-color: #ffffff;
}
#titleLine {
color: #ffffff;
background-color: #330000;
padding: 1em 1em;
}
#sidebarOptions .sidebarSubHeading {
color: #000000;
}
.tiddler .button {
padding: 0.2em 0.4em 0.2em 0.4em;
background-color: #ffffef;
color: #000000;
border-left: 1px solid #bcbcbc;
border-top: 1px solid #bcbcbc;
border-right: 1px solid #330000;
border-bottom: 1px solid #330000;
}
.tiddler .button:hover {
color: #000000;
background-color: #ffe271;
border-left: 1px solid #330000;
border-top: 1px solid #330000;
border-right: 1px solid #bcbcbc;
border-bottom: 1px solid #bcbcbc;
}
#tiddlerDisplay {
}
.tiddler {
}
.selectedTiddler {
background-color: #ffffcc;
font-size: 9pt;
padding-top: 10px;
padding-left: 10px;
padding-bottom: 10px;
padding-right: 10px;
border-left: 1px solid #330000;
border-top: 1px solid #330000;
border-right: 1px solid #330000;
border-bottom: 1px solid #330000;
}
.unselectedTiddler {
font-size: 9pt;
padding-top: 10px;
padding-left: 10px;
padding-bottom: 10px;
padding-right: 10px;
border-left: 1px solid #ffffff;
border-top: 1px solid #ffffff;
border-right: 1px solid #ffffff;
border-bottom: 1px solid #ffffff;
}
.title {
font-size: 13pt;
padding-left: 5px;
background-color: #ffff77;
border-left: 1px solid #330000;
//border-top: 1px solid #330000;
border-right: 1px solid #330000;
//border-bottom: 1px solid #330000;
// background-color: #cccc99;
}
.viewer pre { width: 100%; overflow: auto; }
}}}
/***
''Name:'' TWUpdate
''Author:'' Tom Otvos
''Version:'' 0.2
***/
//{{{
version.extensions.twupdate = {major: 0, minor: 2, revision: 0, date: new Date(2006,3,13,0,0,0,0), source: ""};
config.macros.twupdate = {
label: "mise à niveau",
sourceUrl: "http://www.tiddlywiki.com/empty.html",
lingo: {
prompt: "Mettre à niveau ce TiddlyWiki à partir de la dernière version de TiddlyWiki.com",
warning: "Ce document va être mis à jour avec la dernière version de TiddlyWiki.\n\nSi vous confirmez, un backup du document actuel sera d'abord sauvegardé.",
success: "Mise à niveau effectuée. Cliquer 'OK' pour recharger votre document mis à niveau",
errNoHttp: "Echec de la requête HTTP de mise à jour",
progressLoading: "Accès à la dernière version de TiddlyWiki.com...",
progressLoadSuccess: "Le fichier a été téléchargé",
progressLoadFailure: "Echec du téléchargement (%0)",
progressMerging: "Fusion en cours avec votre document..."
}
}
config.macros.twupdate.handler = function(place)
{
if(!readOnly)
createTiddlyButton(place, this.label, this.prompt, this.onClick, null, null, null);
}
config.macros.twupdate.onClick = function(e)
{
if (!confirm(config.macros.twupdate.lingo.warning)) return;
try {
// force a save with backup
var saveBackups = config.options.chkSaveBackups;
config.options.chkSaveBackups = true;
saveChanges();
config.options.chkSaveBackups = saveBackups;
var ajax = new AjaxHelper();
displayMessage(config.macros.twupdate.lingo.progressLoading);
ajax.getText(config.macros.twupdate.sourceUrl, config.macros.twupdate.performUpdate);
}
catch (e) {
alert(e);
}
return false;
}
config.macros.twupdate.performUpdate = function(emptyHtml, status, statusText)
{
// note that this is begin called from a callback from an event handler, so
// "this" is most definitely not defined!
if (status == 200)
displayMessage(config.macros.twupdate.lingo.progressLoadSuccess);
else {
displayMessage(config.macros.twupdate.lingo.progressLoadFailure.format([statusText]));
return;
}
displayMessage(config.macros.twupdate.lingo.progressMerging);
// the bulk of this is cribbed from saveChanges()...
var originalPath = document.location.toString();
// Check we were loaded from a file URL
if (originalPath.substr(0,5) != "file:") {
alert(config.messages.notFileUrlError);
if (store.tiddlerExists(config.messages.saveInstructions))
displayTiddler(null,config.messages.saveInstructions);
return;
}
var localPath = getLocalPath(originalPath);
// Locate the storeArea div's
var posOpeningDiv = emptyHtml.indexOf(startSaveArea);
var posClosingDiv = emptyHtml.lastIndexOf(endSaveArea);
if ((posOpeningDiv == -1) || (posClosingDiv == -1)) {
alert(config.messages.invalidFileError.format(['empty.html']));
return;
}
// Save new file
var revised = emptyHtml.substr(0,posOpeningDiv + startSaveArea.length) +
convertUnicodeToUTF8(allTiddlersAsHtml()) + "\n\t\t" +
emptyHtml.substr(posClosingDiv);
var newSiteTitle = convertUnicodeToUTF8((wikifyPlain("SiteTitle") + " - " + wikifyPlain("SiteSubtitle")).htmlEncode());
revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
revised = revised.replaceChunk("<!--PRE-HEAD-START--"+">","<!--PRE-HEAD-END--"+">","\n" + store.getTiddlerText("MarkupPreHead","") + "\n");
revised = revised.replaceChunk("<!--POST-HEAD-START--"+">","<!--POST-HEAD-END--"+">","\n" + store.getTiddlerText("MarkupPostHead","") + "\n");
revised = revised.replaceChunk("<!--PRE-BODY-START--"+">","<!--PRE-BODY-END--"+">","\n" + store.getTiddlerText("MarkupPreBody","") + "\n");
revised = revised.replaceChunk("<!--POST-BODY-START--"+">","<!--POST-BODY-END--"+">","\n" + store.getTiddlerText("MarkupPostBody","") + "\n");
var save = saveFile(localPath, revised);
if (save) {
displayMessage(config.messages.mainSaved, "file://" + localPath);
store.setDirty(false);
alert(config.macros.twupdate.lingo.success);
document.location.reload();
}
else
alert(config.messages.mainFailed);
}
function AjaxHelper()
{
this.http = null;
try
{
this.http = new XMLHttpRequest()
}
catch(e)
{
// if we don't get an internal object, try allocating it using ActiveX, with successive
// fallbacks to earlier MSXML versions as necessary
try
{
this.http = new ActiveXObject("Msxml2.XMLHTTP.4.0")
}
catch(e)
{
try
{
this.http = new ActiveXObject("MSXML2.XMLHTTP")
}
catch(e)
{
try
{
this.http = new ActiveXObject("Microsoft.XMLHTTP")
}
catch(e)
{
this.http = null
}
}
}
}
if (!this.http) throw 'Unable to allocate an HTTP request object';
}
AjaxHelper.prototype.getText = function(url, callback, async, force)
{
if (!this.http) return;
if (async == undefined) async = true;
if (force == undefined) force = false;
// ??? right now, we are not handling "forced" requests
this._request("GET", url, callback, async, true, false);
}
AjaxHelper.prototype.getXML = function(url, callback, async, force)
{
if (!this.http) return;
if (async == undefined) async = true;
if (force == undefined) force = false;
// ??? right now, we are not handling "forced" requests
this._request("GET", url, callback, async, true, true);
}
AjaxHelper.prototype.getHead = function(url, callback, async, force)
{
if (!this.http) return;
if (async == undefined) async = true;
if (force == undefined) force = false;
// ??? right now, we are not handling "forced" requests
this._request("HEAD", url, callback, async, false, false);
}
AjaxHelper.prototype.abort = function()
{
if (this.http) this.http.abort();
}
AjaxHelper.prototype.setRequestHeader = function(name, value)
{
if (this.http) this.http.setRequestHeader(name, value);
}
AjaxHelper.prototype._request = function(method, url, callback, async, hasResponse, hasResponseXML)
{
if (!this.http) return;
// get reference to request object so we can use it in closure
var xmlHttp = this.http, helper = this;
xmlHttp.onreadystatechange = function()
{
if (!async) return;
if (xmlHttp.readyState == 4)
callback((hasResponse ? (hasResponseXML ? xmlHttp.responseXML : xmlHttp.responseText) : null), xmlHttp.status, xmlHttp.statusText, helper._parsedResponseHeaders());
}
try {
// need some cross-domain privileges for Firefox
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
}
catch (e)
{
}
xmlHttp.open(method, url, async);
xmlHttp.send(null);
if (!async) callback((hasResponse ? (hasResponseXML ? xmlHttp.responseXML : xmlHttp.responseText) : null), xmlHttp.status, xmlHttp.statusText, this._parsedResponseHeaders());
}
catch (e)
{
alert(e);
}
}
AjaxHelper.prototype._parsedResponseHeaders = function()
{
if (this.http) {
var headersArray = new Array();
var headers = this.http.getAllResponseHeaders().split("\n");
for (var i = 0; i < headers.length; i++) {
var h = headers[i].trim();
if (h.length == 0) continue;
// value can have ':' so do not use split here!
var sep = h.indexOf(':');
headersArray[h.substring(0, sep).trim()] = h.substr(sep + 1).trim();
}
return headersArray;
}
else
return null;
}
//}}}
/***
|Name|ToggleSideBarMacro|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#ToggleSideBarMacro|
|Version|1.0|
|Requires|~TW2.x|
!Description:
Provides a button for toggling visibility of the SideBar. You can choose whether the SideBar should initially be hidden or displayed.
!Demo
<<toggleSideBar "Toggle Sidebar">>
!Usage:
{{{<<toggleSideBar>>}}} <<toggleSideBar>>
additional options:
{{{<<toggleSideBar label tooltip show/hide>>}}} where:
label = custom label for the button,
tooltip = custom tooltip for the button,
show/hide = use one or the other, determines whether the sidebar is shown at first or not.
(default is to show the sidebar)
You can add it to your tiddler toolbar, your MainMenu, or where you like really.
If you are using a horizontal MainMenu and want the button to be right aligned, put the following in your StyleSheet:
{{{ .HideSideBarButton {float:right;} }}}
!History
*23-07-06: version 1.0: completely rewritten, now works with custom stylesheets too, and easier to customize start behaviour.
*20-07-06: version 0.11
*27-04-06: version 0.1: working.
!Code
***/
//{{{
config.macros.toggleSideBar={};
config.macros.toggleSideBar.settings={
styleHide : "#sidebar { display: none;}\n"+"#contentWrapper #displayArea { margin-right: 1em;}\n"+"",
styleShow : " ",
arrow1: "«",
arrow2: "»"
};
config.macros.toggleSideBar.handler=function (place,macroName,params,wikifier,paramString,tiddler)
{
var tooltip= params[1]||'toggle sidebar';
var mode = (params[2] && params[2]=="hide")? "hide":"show";
var arrow = (mode == "hide")? this.settings.arrow1:this.settings.arrow2;
var label= (params[0]&¶ms[0]!='.')?params[0]+" "+arrow:arrow;
var theBtn = createTiddlyButton(place,label,tooltip,this.onToggleSideBar,"button HideSideBarButton");
if (mode == "hide")
{
(document.getElementById("sidebar")).setAttribute("toggle","hide");
setStylesheet(this.settings.styleHide,"ToggleSideBarStyles");
}
};
config.macros.toggleSideBar.onToggleSideBar = function(){
var sidebar = document.getElementById("sidebar");
var settings = config.macros.toggleSideBar.settings;
if (sidebar.getAttribute("toggle")=='hide')
{
setStylesheet(settings.styleShow,"ToggleSideBarStyles");
sidebar.setAttribute("toggle","show");
this.firstChild.data= (this.firstChild.data).replace(settings.arrow1,settings.arrow2);
}
else
{
setStylesheet(settings.styleHide,"ToggleSideBarStyles");
sidebar.setAttribute("toggle","hide");
this.firstChild.data= (this.firstChild.data).replace(settings.arrow2,settings.arrow1);
}
return false;
}
setStylesheet(".HideSideBarButton .button {font-weight:bold; padding: 0 5px;}\n","ToggleSideBarButtonStyles");
//}}}
|~ViewToolbar|fullscreen closeTiddler closeOthers collapseTiddler collapseOthers +editTiddler > fields syncing permalink references jump|
|~EditToolbar|+saveTiddler -cancelTiddler deleteTiddler|
<<newTiddler>> <<newJournal "DD MMM YYYY">>
<<<
[[Configurer]]
----
[[Administration Française|http://www.service-public.fr/]]
[[Education Nationale|http://www.education.gouv.fr/index.php]]
[[LegiFrance|http://www.legifrance.gouv.fr/]]
[[Bulletin Officiel|http://www.education.gouv.fr/bo/default.htm]]
[[Université de Nice-Sophia Antipolis|http://portail.unice.fr/jahia/jsp/index.jsp]]
----
[[Pages Jaunes|http://www.pagesjaunes.fr/]]
[[Météo|http://www.meteofrance.com/FR/index.jsp]]
[[Le Conjugueur|http://www.leconjugueur.com/]]
A WikiWord is a word composed of a bunch of other words slammed together with each of their first letters capitalised. WikiWord notation in a conventional WikiWikiWeb is used to name individual pages while TiddlyWiki uses WikiWord titles for smaller chunks of MicroContent. Referring to a page with a WikiWord automatically creates a link to it. Clicking on a link jumps to that page or, if it doesn't exist, to an editor to create it. This ThirdVersion of TiddlyWiki also adds NonWikiWordLinks.