Some short programs in `examples` are related to specific libraries. Therefore to improve coupling and cohesion, these examples are moved into a subdirectory of their associated libs.
Basically, it means moving `examples/foo` into `lib/foo/examples`
Pull-Request: #1656
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
+++ /dev/null
-#: langannot::langannot 22--10:32, langannot::langannot 29--7:29
-msgid "This String is a test"
-msgstr ""
-
-#: langannot::langannot 31--7:3
-msgid "Multiline string\n\nexample\n\n\nof the language annotation capacities\n"
-msgstr ""
-
-#: langannot::langannot 39--9:17
-msgid "example"
-msgstr ""
-
-#: langannot::langannot 41--7:34, langannot::langannot 43--7:33
-msgid "This superstring %1 rocks"
-msgstr ""
-
-# Generated file, do not modify
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
- limitations under the License.
+ limitations under the License.
-->
<html>
<head>
var input = $("#in").val();
// Invoke the full Nit program
- ret = Module['callMain']([input]);
+ ret = Module['callMain']([input]);
}
</script>
</head>
<h2>Program Output</h2>
<samp id="console"></samp>
-
+
<script src="fibonacci.js"></script>
</div>
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
- limitations under the License.
+ limitations under the License.
-->
<html>
<head>
<h1>Program output</h1>
<samp id="console"></samp>
-
+
<script src="hello_world.js"></script>
</body>
--- /dev/null
+langannot.pot
-default:
+default:
../../../bin/nitc --semi-global converter.nit
HTTPD_PY := python $(NACL_SDK_ROOT)/tools/httpd.py
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
-# limitations under the License.
+# limitations under the License.
-->
<!DOCTYPE html>
<html>
<div class="form-group">
<label for="inputConvert" class="col-sm-2 control-label">Convert</label>
<div class="col-sm-9">
- <div class="row">
+ <div class="row">
<div id="pre-input" class="col-xs-2">
<input id="input" type="text" class="form-control" placeholder="ex: 300" required>
</div>
<div class="col-xs-3">
<select id="from" class="form-control" required>
- <option selected="selected" disabled="disabled">Currency</option>
+ <option selected="selected" disabled="disabled">Currency</option>
<option>EUR</option>
<option>CAD</option>
<option>USD</option>
<div class="form-group">
<label for="inputTo" class="col-sm-2 control-label">to</label>
<div class="col-sm-9">
- <div class="row">
+ <div class="row">
<div class="col-xs-2">
<input id="rez" type="text" class="form-control" placeholder=".col-xs-2" disabled="disabled" style="visibility: hidden">
</div>
<div class="col-xs-3">
<select id="to" class="form-control" required>
- <option selected="selected" disabled="disabled">Currency</option>
- <option>EUR</option>
- <option>CAD</option>
- <option>USD</option>
- </select>
+ <option selected="selected" disabled="disabled">Currency</option>
+ <option>EUR</option>
+ <option>CAD</option>
+ <option>USD</option>
+ </select>
</div>
</div>
</div>
// Checks that the text in the input is numeric and not null
// and then if two currencies where chosen sends a dictionary to Nit.
$( "#button" ).click(function() {
- $("#pre-input").removeClass("has-error");
- if (($('#input').val() == "")||($.isNumeric($('#input').val()) == false)) {
- $("#pre-input").addClass("has-error");
- }
- else
- {
- if (($('#from').val() != null) && ($('#to').val() != null)) {
- var dictionary = {
- value: parseFloat($('#input').val()).toFixed(2),
- from: $('#from').val(),
- to: $('#to').val(),
+ $("#pre-input").removeClass("has-error");
+ if (($('#input').val() == "")||($.isNumeric($('#input').val()) == false)) {
+ $("#pre-input").addClass("has-error");
+ }
+ else
+ {
+ if (($('#from').val() != null) && ($('#to').val() != null)) {
+ var dictionary = {
+ value: parseFloat($('#input').val()).toFixed(2),
+ from: $('#from').val(),
+ to: $('#to').val(),
+ }
+ converterModule.postMessage(dictionary);
}
- converterModule.postMessage(dictionary);
}
- }
});
}
static PP_Bool Instance_HandleDocumentLoad(PP_Instance pp_instance, PP_Resource pp_url_loader) {
- // TODO
+ // TODO
return PP_FALSE;
}
var native_value = native_get(native_key)
return native_value.to_nit
end
-
- # Set function using PepperVars.
+
+ # Set function using PepperVars.
#
# Sets the value associated with the specified key.
# 'key' must be a String typed PepperVar.
fun native_delete(key: PepperVar) `{
g_varDictionaryInterface->Delete(*self, *key);
`}
-
+
# Deletes the specified key and its associated value, if the key exists.
#
# Takes a String.
- fun delete(key: String)
+ fun delete(key: String)
do
var native_key = key.to_pepper
native_delete native_key
cocoa
mpi
emscripten
+ui_test
../examples/*/src/*_android.nit \
../examples/*/src/*_linux.nit \
../examples/*/src/*_null.nit \
- ../examples/pnacl/converter/converter.nit \
../examples/nitcorn/src/*.nit \
- ../examples/mpi/src/*.nit \
../lib/*/examples/*.nit \
+ ../lib/*/examples/*/*.nit \
../contrib/friendz/src/solver_cmd.nit \
../contrib/neo_doxygen/src/tests/neo_doxygen_*.nit \
../contrib/pep8analysis/src/pep8analysis.nit \
fibonacci_word
shootout_nsieve
test_ropebuffer
+ui_test
fibonacci_word
shootout_nsieve
test_ropebuffer
+ui_test