Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.
This is a template for a simple marketing or informational website. It includes a large callout called a jumbotron and three supporting pieces of content. Use it as a starting point to create something more unique.
20 |
21 |
--------------------------------------------------------------------------------
/fw1-crud/model/beans/user.cfc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/fw1-crud/framework/MyApplication.cfc:
--------------------------------------------------------------------------------
1 | component extends="framework.one" {
2 | // Version: FW/1 4.3.0-SNAPSHOT
3 |
4 | // if you need to provide extension points, copy this to
5 | // your web root, next to your Application.cfc, and add
6 | // functions to it, then in Application.cfc use:
7 | // request._framework_one = new MyApplication( config );
8 | // instead of:
9 | // request._framework_one = new framework.one( config );
10 | // in the _get_framework_one() function.
11 | //
12 | // if you do not need extension points, you can ignore this
13 |
14 | function setupApplication() { }
15 |
16 | function setupEnvironment( env ) { }
17 |
18 | function setupSession() { }
19 |
20 | function setupRequest() { }
21 |
22 | function setupResponse( rc ) { }
23 |
24 | function setupSubsystem( module ) { }
25 |
26 | function setupView( rc ) { }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/fw1-crud/customtags/paging.cfm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
24 |
--------------------------------------------------------------------------------
/helloworld-3-session/Application.cfc:
--------------------------------------------------------------------------------
1 | component {
2 |
3 | this.name = "helloWorldSession";
4 |
5 | // application will be stopped after 6 hours of inactivity
6 | this.applicationTimeout = CreateTimeSpan(0, 6, 0, 0);
7 |
8 | // allow storing user sessions
9 | this.sessionManagement = true;
10 | // session data will be forgotten after 30 minutes of inactivity
11 | this.sessionTimeout = CreateTimeSpan(0, 0, 30, 0);
12 |
13 | function onApplicationStart(){
14 | // we will put variable into APPLICATION scope
15 | // this variable can be used globally across application
16 | APPLICATION.message = "Hello World!";
17 | }
18 |
19 | function onSessionStart(){
20 | // variables specific to requests, originating from one (same) browser
21 | SESSION.started = now(); // current date-time
22 | }
23 |
24 | function onRequest(){
25 | var message = APPLICATION.message & ' Session started ' & dateTimeFormat(SESSION.started, "short") & ", now it's " & dateTimeFormat(now());
26 | writeOutput(message);
27 | }
28 |
29 | }
--------------------------------------------------------------------------------
/templates-4-variables/Application.cfc:
--------------------------------------------------------------------------------
1 | component {
2 |
3 | this.name = "helloWorldTemplates";
4 |
5 | // this variable means how long application will live on server if not accessed by requests
6 | this.applicationTimeout = CreateTimeSpan(0, 6, 0, 0);
7 |
8 | function onRequestStart(){
9 | var message = new Message();
10 | REQUEST.message = message.getGreeting(APPLICATION.message, SESSION.started);
11 | }
12 |
13 | // onRequest method as argument receives name of the template (filename) to be executed
14 | // default template depends on your server setup (DirectoryIndex in Apache HTTPD)
15 | // usually default template is named index.cfm, so `template` argument will be `index.cfm`
16 | // we can override this behavior and include different template
17 | //
18 | // here we include layout which in turn will include file set by `template` argument
19 | function onRequest(String template){
20 | try {
21 | include "layout.cfm";
22 | } catch (Any e) {
23 | // process exception here
24 | }
25 | }
26 |
27 | }
--------------------------------------------------------------------------------
/fw1-crud/framework/methodProxy.cfc:
--------------------------------------------------------------------------------
1 | component {
2 | variables._fw1_version = "4.3.0-SNAPSHOT";
3 | /*
4 | Copyright (c) 2018, Sean Corfield
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License");
7 | you may not use this file except in compliance with the License.
8 | You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing, software
13 | distributed under the License is distributed on an "AS IS" BASIS,
14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | See the License for the specific language governing permissions and
16 | limitations under the License.
17 | */
18 |
19 | function init( fw, method ) {
20 | variables.fw = fw;
21 | variables.method = method;
22 | return this;
23 | }
24 |
25 | // implements Java 8 Function interface
26 | function apply( arg ) {
27 | return invoke( variables.fw, method, [ arg ] );
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/templates-3-includes/someothertemplate.cfm:
--------------------------------------------------------------------------------
1 |
Included template
2 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
3 | Aenean vel nibh est. Aenean placerat nibh odio, a convallis quam eleifend non.
4 | Curabitur vehicula metus in aliquet tincidunt. Pellentesque hendrerit nulla in quam bibendum,
5 | et scelerisque mauris vestibulum. Curabitur vitae fermentum enim, sit amet vehicula risus.
6 | Sed vel sem in lacus semper porttitor vitae at nisi. Nulla congue finibus massa quis porttitor.
7 | Ut consequat neque id ipsum eleifend, eget placerat est convallis. Nulla ornare maximus purus,
8 | vel accumsan quam pretium et. Ut at risus nulla.
9 |
10 |
11 | Cras vel augue in dolor tincidunt imperdiet. Vivamus a placerat enim.
12 | Nulla scelerisque dolor eget ligula semper, porttitor fringilla tortor aliquet.
13 | Donec fringilla eros eu sagittis posuere. Nulla arcu mauris, bibendum id massa at,
14 | interdum auctor leo. Morbi ac ante justo. Nulla libero purus, hendrerit quis mattis vel,
15 | porttitor a arcu. Curabitur vitae nisi tempus, venenatis odio sit amet, mollis tellus.
16 |
--------------------------------------------------------------------------------
/helloworld-5-components/Application.cfc:
--------------------------------------------------------------------------------
1 | component {
2 |
3 | this.name = "helloWorldComponents";
4 |
5 | // application will be stopped after 6 hours of inactivity
6 | this.applicationTimeout = CreateTimeSpan(0, 6, 0, 0);
7 |
8 | // allow storing user sessions
9 | this.sessionManagement = true;
10 | // session data will be forgotten after 30 minutes of inactivity
11 | this.sessionTimeout = CreateTimeSpan(0, 0, 30, 0);
12 |
13 | function onApplicationStart(){
14 | // we will put variable into APPLICATION scope
15 | // this variable can be used globally across application
16 | APPLICATION.message = "Hello World!";
17 | }
18 |
19 | function onSessionStart(){
20 | // variables specific to requests, originating from one (same) browser
21 | SESSION.started = now(); // current date-time
22 | }
23 |
24 | function onRequestStart(){
25 | var message = new Message();
26 | REQUEST.message = message.getGreeting(APPLICATION.message, SESSION.started);
27 | }
28 |
29 | function onRequest(){
30 | writeOutput(REQUEST.message);
31 | }
32 |
33 | }
--------------------------------------------------------------------------------
/templates-2-output/index.cfm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Second template example: dynamic output -- Lucee Minute
6 |
7 |
8 |
9 |
Hello from CFML template!
10 |
This is plain HTML
11 |
Any CFML or CFScript be put between <CF*> tag, e.g. <CFOUTPUT> tags, will be processed by Lucee engine:
12 |
Expressions or function calls must be put between ##'s to be evaluated.
13 |
Example function call
14 |
Current date: <CFOUTPUT>#DateFormat(Now(), "long")#</CFOUTPUT>
15 |
Lucee dynamic output is below:
16 |
Current date: Current date #DateFormat(Now(), "long")#.
17 |
Example math expression
18 |
<CFOUTPUT>2x2=#2*2#</CFOUTPUT>
19 |
Lucee dynamic output is below:
20 |
2x2=#2*2#
21 |
22 |
--------------------------------------------------------------------------------
/fw1-crud/framework/WireBoxAdapter.cfc:
--------------------------------------------------------------------------------
1 | component extends="wirebox.system.ioc.Injector" {
2 | variables._fw1_version = "4.3.0-SNAPSHOT";
3 | /*
4 | Copyright (c) 2010-2018, Sean Corfield
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License");
7 | you may not use this file except in compliance with the License.
8 | You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing, software
13 | distributed under the License is distributed on an "AS IS" BASIS,
14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | See the License for the specific language governing permissions and
16 | limitations under the License.
17 | */
18 |
19 | // the FW/1 requirements for a bean factory are very simple:
20 |
21 | public boolean function containsBean( string beanName ) {
22 | return super.containsInstance( beanName );
23 | }
24 |
25 | public any function getBean( string beanName ) {
26 | return super.getInstance( beanName );
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Rodion Bykov
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/fw1-crud/framework/facade.cfc:
--------------------------------------------------------------------------------
1 | component {
2 | variables._fw1_version = "4.3.0-SNAPSHOT";
3 | /*
4 | Copyright (c) 2016-2018, Sean Corfield
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License");
7 | you may not use this file except in compliance with the License.
8 | You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing, software
13 | distributed under the License is distributed on an "AS IS" BASIS,
14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | See the License for the specific language governing permissions and
16 | limitations under the License.
17 | */
18 |
19 | function init() {
20 | try {
21 | return request._fw1.theFramework;
22 | } catch ( any e ) {
23 | throw(
24 | type = "FW1.FacadeException", message = "Unable to locate FW/1 for this request",
25 | detail = "It appears that you asked for the facade in a request that did not originate in FW/1?"
26 | );
27 | }
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/lucee_apache_general_setup.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 | Allow from 127.0.0.1
4 |
5 | ProxyPreserveHost On
6 | ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ http://127.0.0.1:8888/$1$2
7 | ProxyPassMatch ^/(.+\.cfchart)(/.*)?$ http://127.0.0.1:8888/$1$2
8 | ProxyPassMatch ^/(.+\.cfml)(/.*)?$ http://127.0.0.1:8888/$1$2
9 | # optional mappings
10 | #ProxyPassMatch ^/flex2gateway/(.*)$ http://127.0.0.1:8888/flex2gateway/$1
11 | #ProxyPassMatch ^/messagebroker/(.*)$ http://127.0.0.1:8888/messagebroker/$1
12 | #ProxyPassMatch ^/flashservices/gateway(.*)$ http://127.0.0.1:8888/flashservices/gateway$1
13 | #ProxyPassMatch ^/openamf/gateway/(.*)$ http://127.0.0.1:8888/openamf/gateway/$1
14 | #ProxyPassMatch ^/rest/(.*)$ http://127.0.0.1:8888/rest/$1
15 | ProxyPassReverse / http://127.0.0.1:8888/
16 |
17 |
18 | LoadModule modcfml_module /opt/lucee/sys/mod_cfml/centos6-httpd24-x64/mod_cfml.so
19 | CFMLHandlers ".cfm .cfc .cfml"
20 | ModCFML_SharedKey "2cd04393c4603845df6605cf941012c2bdf35df9896808640daf6d9deacfe7a4"
21 | LogHeaders false
22 | LogHandlers false
23 | LogAliases false
24 | VDirHeader false
25 |
26 |
--------------------------------------------------------------------------------
/html-css-basics/div-and-float.html:
--------------------------------------------------------------------------------
1 |
2 |
float: right; float: left;
3 |
4 |
It's always good to have a lot of float elements.
5 |
Always put float element width, no sense otherwise, block always has its parent's block
6 |
Blocks are floated up, aligned by top side
7 |
String elements are always start with new line, height of line is a height of tallest element.