Auswertung Experiment

Database tüddelei
DBHanlder läuft gut für DIESE Datanbank struktur...
App begonnen aber weit entfernt von gutem Stand
This commit is contained in:
sioe
2024-11-15 16:51:37 +01:00
parent 553ed19b9f
commit 397cfa61dd
219 changed files with 584 additions and 854 deletions

View File

@@ -0,0 +1,42 @@
%RGBINT2HEX Convert RGB integer into hexadecimal colour
% HEX = RGBINT2HEX(INT) given an RGB integer, convert it into a
% hexadecimal string.
%
% This is a helper function which you can use when manually creating your
% own MATLAB colour schemes. It is the inverse of COLOR2JAVARGBINT.
%
% See also COLOR2JAVARGBINT.
% Copyright (c) 2015-2016, Scott C. Lowe <scott.code.lowe@gmail.com>
% All rights reserved.
%
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions are
% met:
% * Redistributions of source code must retain the above copyright
% notice, this list of conditions and the following disclaimer.
% * Redistributions in binary form must reproduce the above copyright
% notice, this list of conditions and the following disclaimer in
% the documentation and/or other materials provided with the distribution
%
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
% ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
% CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
% SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
% INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
% CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
% ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
% POSSIBILITY OF SUCH DAMAGE.
function hex = RGBint2hex(int)
% Make a Java colour object
jc = java.awt.Color(int);
% Convert R,G,B into hexadecimal
hex = sprintf('%02s', ...
dec2hex(jc.getRed), dec2hex(jc.getGreen), dec2hex(jc.getBlue));
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

View File

@@ -0,0 +1,131 @@
%COLOR2JAVARGBINT Converts a 256-bit color into a corresponding Java int
% INT = COLOR2JAVARGBINT(HEX) converts the hexadecimal string HEX into a
% negative integer INT which is used by Java as an RGB value equivalent
% to the hexadecimal HEX. HEX should be a triple of 256-bit values,
% possibly prepended by a hash ('#'). Alternatively, HEX can be a triple
% of 16-bit values to provide a 16-bit colour instead.
%
% INT = COLOR2JAVARGBINT(RGB) converts the 3-element RGB colour into INT.
%
% INT = COLOR2JAVARGBINT(R, G, B) converts the triple [R G B] into INT.
%
% This is a helper function which you can use when manually creating your
% own MATLAB colour schemes.
% If you have a set of hexadecimal colours which you want to use,
% you can copy the template colour scheme file, then convert each colour
% using COLOR2JAVARGBINT. The output will be a negative integer, which
% should be placed after the appropriate '...=C-' (with a only a single
% minus sign present).
%
% See also SCHEME_EXPORT, RGBINT2HEX.
% Copyright (c) 2013-2016, Scott C. Lowe <scott.code.lowe@gmail.com>
% All rights reserved.
%
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions are
% met:
% * Redistributions of source code must retain the above copyright
% notice, this list of conditions and the following disclaimer.
% * Redistributions in binary form must reproduce the above copyright
% notice, this list of conditions and the following disclaimer in
% the documentation and/or other materials provided with the distribution
%
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
% ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
% CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
% SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
% INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
% CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
% ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
% POSSIBILITY OF SUCH DAMAGE.
function int = color2javaRGBint(X, varargin)
% Input handling
if nargin==3
if ~isnumeric(X) || ~isnumeric(varargin{1}) || ~isnumeric(varargin{2})
error('With three inputs given, all should be scalars');
end
% Concatenate R,G,B together
X = [X(:); varargin{1}(:); varargin{2}(:)];
elseif nargin~=1
error('Incorrect number of inputs. Should be 1 or 3.');
end
if ischar(X)
% Handle Hex string conversion
int = hex2javaRGBint(X);
elseif isnumeric(X)
% Handle RGB conversion
int = RGB2javaRGBint(X);
else
error('Input was neither string nor numeric');
end
end
function int = hex2javaRGBint(hex)
% Input handling
if length(hex)==7 && strcmp(hex(1),'#')
hex = hex(2:end);
end
if length(hex)==3
% Assume a 16-bit colour (fff, 333, 840, etc)
% This should be replicated to make ffffff, 333333, 884400, etc.
% This is sometimes used on the web as shorthand for the 256-bit
% colours, particularly for the grey shades.
hex = reshape(repmat(hex, 2, 1), 1, 6);
elseif length(hex)~=6
% Length should be 6 for a three channel 256-bit hexadecimal
error('Input string was not a hexadecimal number');
end
% Make a Java color object
jc = java.awt.Color(hex2dec(hex));
% Check what the RGB int is equal to
int = jc.getRGB();
% This is equivalent to
% int = hex2dec(hex) - (256^2*255 + 256*255 + 256);
end
function int = RGB2javaRGBint(X)
% Input handling
if numel(X)==1
% Assume input is greyscale
X = repmat(X, 3, 1);
end
if numel(X)~=3
error('Input did not contain three colour channels');
end
if any(X<0)
error('R,G,B cannot be negative');
end
if any(X>255)
error('R,G,B should be not exceed 255');
end
if all(X<1)
% Rescale from 0-1 to 0-255
X = round(X*255);
end
% Convert R, G, and B into a single integer
dec = 256^2 * X(1) + 256 * X(2) + X(3);
% Make a Java color object
jc = java.awt.Color(dec);
% Check what the RGB int is equal to
int = jc.getRGB();
% This is equivalent to
% int = dec - (256^2*255 + 256*255 + 256);
end

View File

@@ -0,0 +1,22 @@
/* Here's a simple Hello World program in C++, which won't
* do much, but does show syntax highlighting.
*/
#include <iostream>
void some_complex_work();
int main()
{
if (2+2==5)
{
// This happens very often indeed
std::cout << "Hello World!";
}
else
{
@ // bad character makes an error
character = 'a';
len = strlen("foobar");
return len;
}
}

View File

@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<title>Latin Lipsum - Hello, World!</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<!-- You may use a different charset if needed -->
<!--[if !IE]><!-->
<link type="text/css" rel="stylesheet" href="/stylesheets/no-ie.css" />
<!--<![endif]-->
</head>
<body class='main'>
<h1>Hello, World!</h1>
<p id='first'>
Lorem ipsum dolor sit amet, appetere disputationi te eam, eu
cum eius nulla everti. Id eam sale nostrud menandri! Pri an
duis probo, splendide consequuntur ne vis.
</p>
<!-- There is an error with the cellpadding value -->
<table border="0" cellpadding=>
<tr>
<td>
<img src="images/foo.png">
</td>
<td>
Dicta iudico eos ne, at <b>iisque</b> persecuti his.
</td>
</tr>
</table>
<p>
Tale iriure <a href="https://en.wiktionary.org/wiki/laboramus">
laboramus</a> te sea, nec iusto veritus cu, id purto patrioque
sea? Mei at dicit propriae.
</p>
</body>
</html>

View File

@@ -0,0 +1,23 @@
/* HelloWorld.java
* Demonstrates syntax highlighting for Java.
*/
package fibsandlies;
import java.util.HashMap;
class HelloWorld {
/*
* Documentation for the method appears here.
* Prints the string "Hello, world!" to the console.
*/
public static void main(String[] args) {
// Make a character
char c = 'A';
// Assemble the output string
string s = "Hello," + " world" + "!";
int len = s.length();
// Print to screen
System.out.println(s);
// Generate an error
##
}
}

View File

@@ -0,0 +1,21 @@
function sample()
% Create an output file with sys command
!touch test_file.txt
fid = fopen('test_file.txt', 'w');
for i=1:20
fprintf(fid, '%d unterminated\n, i);
end
fclose(fid);
end
function unusedFunc(passedInput)
persistent global_value;
global_value = global_value + 1;
%% Title of cell
printed_var = subFunc(global_value)
unused_var = printed_var;
function out = subFunc(scaleFactor)
fprintf('Scale %.4f\n', scaleFactor);
out = passedInput * scaleFactor;
end
end

View File

@@ -0,0 +1,27 @@
%implements Sample "C"
%% Function: SampleFunction ===============================================
%% Abstract:
%% Doesn't do anything, but does contain some TLC code
%% with syntax highlighting.
%%
%function SampleFunction(inputVal, indexVal) void
%% Need this library to use FILE
%<SLibAddToCommonIncludes("<stdio.h>")>
sprintf("index: %i", indexVal)
%openfile testFile
Some text to verbosely go into the file.
%closefile testFile
%assign myVar = STRING(ParamSettings.Input)
char fileName[%<RTWMaxStringLength>] = "%<myVar>";
%if flagTrue
void *tp = %<nulldef>;
%else
%return ""
%endif
%% [EOF] sample.tlc

View File

@@ -0,0 +1,21 @@
/* Sample Verilog code, which doesn't really do anything
* but it does show syntax highlighting
*/
module main(inputVar, flip);
input inputVar;
input flip;
reg flop;
// Comment about dummy code which doesn't work
always @(posedge flip or posedge inputVar)
if (reset)
begin
flop <= (0 & ~inputVar);
end
else
begin
$display("Hello world!");
$finish;
end
endmodule

View File

@@ -0,0 +1,19 @@
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
-- Comment about the Driver here
entity Driver is
port( x : in std_logic;
F : out std_logic
);
end Driver;
architecture gate_level of Driver is
begin
if newx(x downto (x-3))="0000" then
F <= '1';
else
F <= not(x(2) xor x(2)); --XNOR gate with 2 inputs
end if;
end gate_level;

View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN"
"http://www.web3d.org/specifications/x3d-3.0.dtd">
<X3D version='3.0' profile='Interchange'>
<head>
<meta name='filename' content='sample.x3d' />
</head>
<Scene>
<!-- Define scripts -->
<TouchSensor DEF='TS' />
<Script DEF='Script1'>
<field name='touchTime' type='SFTime' accessType='inputOnly' />
<field name='toScript2' type='SFBool' accessType='outputOnly' />
<field name='toScript3' type='SFBool' accessType='outputOnly' />
<field name='string' type='SFString' accessType='outputOnly' />
<![CDATA[
ecmascript:
function touchTime() {
toScript2 = true;
}
function eventsProcessed() {
string = 'Script1.eventsProcessed';
toScript3 = true;
}
]]>
</Script>
<!-- Draw a blue ball -->
<Transform>
<NavigationInfo headlight='false'
avatarSize='0.25 1.6 0.75' type='"EXAMINE"' />
<DirectionalLight />
<Transform translation='2.0 0.0 1.0'>
<Shape>
<Sphere radius='2.3' />
<Appearance>
<Material diffuseColor='0.0 0.0 1.0' />
</Appearance>
</Shape>
</Transform>
</Transform>
<!-- Set the viewpoint -->
<Viewpoint position='7 -1 18' />
<!-- Set up the scripts -->
<ROUTE fromNode='TS' fromField='touchTime'
toNode='Script1' toField='touchTime' />
<ROUTE fromNode='Script1' fromField='string'
toNode='Collector' toField='fromString' />
<ROUTE fromNode='Collector' fromField='string'
toNode='Result' toField='string' />
</Scene>
</X3D>

View File

@@ -0,0 +1,53 @@
#X3D V3.0 utf8
PROFILE Interchange
META "filename" "sample.x3dv"
# Define scripts
DEF Script1 Script {
inputOnly SFTime touchTime
outputOnly SFBool toScript2
outputOnly SFString string
url [ "ecmascript:
function touchTime() {
toScript2 = TRUE;
}
function eventsProcessed() {
string = 'Script1.eventsProcessed';
toScript3 = TRUE;
}
" ]
}
# Draw a blue ball
Transform {
children [
NavigationInfo {
headlight FALSE
avatarSize [ 0.25 1.6 0.75 ]
type [ "EXAMINE" ]
}
DirectionalLight {
}
Transform {
translation 2.0 0.0 1.0
children [
Shape {
geometry Sphere { radius 2.3
}
appearance Appearance {
material Material { diffuseColor 0.0 0.0 1.0
}
}
}
]
}
]
}
# Set the viewpoint
Viewpoint { position 7 -1 18 }
# Set up the scripts
ROUTE TS.touchTime TO Script1.touchTime
ROUTE Script1.string TO Collector.fromString
ROUTE Collector.string TO Result.string

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mysample SYSTEM "mydtd">
<tag>
<!-- Here is a comment -->
<foo name="value">
Lorem ipsum dolor sit amet.
</foo>
<bar missing>Missing value error in bar tag</bar>
<innertag>
Cibo malorum deseruisse nec at. Fabulas quaestio sit eu, nam
viderer percipit deserunt at.
<![CDATA[
This text is part of the innertag and you can use literal
versions of reserved characters < > & ".
]]>
</innertag>
</tag error>

View File

@@ -0,0 +1,15 @@
function short_sample()
% Short syntax highlighting sample
global gbl_value;
gbl_value = 20
hghlghtvar = 'a_string_example_here';
%% Title of cell
badstring = 'unterminated_string;
unusedvar = hghlghtvar;
!echo "Example `!` system command"
for iterval = 1:2:gbl_value
% This is a very informative comment
fprintf('%s:%d\n',hghlghtvar,iterval);
end
end

View File

@@ -0,0 +1,34 @@
# <theme> - MATLAB color scheme
# Created by <you>
# <date>
ColorsUseSystem=Bfalse
ColorsUseMLintAutoFixBackground=Btrue
Editor.VariableHighlighting.Automatic=Btrue
Editor.NonlocalVariableHighlighting=Btrue
EditorCodepadHighVisible=Btrue
EditorCodeBlockDividers=Btrue
Editorhighlight-caret-row-boolean=Btrue
EditorRightTextLineVisible=Btrue
EditorRightTextLimitLineWidth=I1 # Width of bar for right-hand text limit
ColorsText=C- # Main text colour
ColorsBackground=C- # Main background colour
Colors_M_Keywords=C- # Text for keywords (function, for, end, etc)
Colors_M_Comments=C- # Text for comments
Colors_M_Strings=C- # Text for strings
Colors_M_UnterminatedStrings=C- # Text for unterminated strings
Colors_M_SystemCommands=C- # Text for shell commands
Colors_M_Errors=C- #*Editor error messages and underlines, go-to bars
Colors_HTML_HTMLLinks=C- # Text for URLs
Color_CmdWinWarnings=C- #^Command window Warning text
Color_CmdWinErrors=C- #^Command window Error text
Colors_M_Warnings=C- #*Editor Warning underlines and go-to-warning bars
ColorsMLintAutoFixBackground=C- # Background for autofixable
Editor.VariableHighlighting.Color=C- #*Background for occurances of current variable
Editor.NonlocalVariableHighlighting.TextColor=C- # Text for global variables
Editorhighlight-lines=C- # Background of current cell
Editorhighlight-caret-row-boolean-color=C- # Background of current line
EditorRightTextLimitLineColor=C- # Colour of bar for right-hand text limit
#Legend
# * = Preference does not update until after restarting MATLAB
# ^ = Preference not present on all versions of MATLAB