Crowdfunding

Das leise Sterben der Crowdfunding-Plattformen

6 Crowdinvesting-Plattformen im Vergleich
5 weitere Crowdinvesting-Plattformen im Vergleich


Crowdfunding – Der Schwarm sammelt lieber in Amerika

Schwarmfinanzierung: Krautfunder warten auf den Kickstarter-Effekt
“Crowdfunding verzeichnet in der Schweiz ein beeindruckendes Wachstum”
Start der Crowdfunding-Plattform c-crowd
c-crowd: Crowdfunding professionalisiert
Crowdfunding Da kommt eine ganze Menge zusammen

C Integer Power / Integer Potenz

#include <math.h>
double pow(double x, double y);

period = pow(2, log_inter_message_period);
rate   = 1 / period;

printf("every %lg seconds", period);

Wikipedia

Potenz

stackoverflow

Why is my power operator (^) not working?
power of an integer in c++
Integer power in c
The most efficient way to implement an integer based power function pow(int, int)

Divers

Bit Twiddling Hacks – Determining if an integer is a power of 2

RegEx: Regular Expression

regexr
regex101
regextester

A Practical Guide to Regular Expressions – Learn RegEx with Real Life Examples

abc         Letters
123         Digits
\.          Period

[abc]       Only a, b, or c
[^abc]      Not a, b, nor c
[a-z]       Characters a to z
[0-9]       Numbers 0 to 9

{m}         m Repetitions
{m,n}       m to n Repetitions
*           Zero or more repetitions
+           One or more repetitions
?           Optional character
.           Any Character

^…$         Starts and ends
(…)         Capture Group
(a(bc))     Capture Sub-group
(.*)        Capture all
(abc|def)   Matches abc or def

\s          Any Whitespace
[ ]         Whitespace
\S          Any Non-whitespace character
\d          Any Digit
\D          Any Non-digit character
\w          Any Alphanumeric character [a-zA-Z_0-9]
\W          Any Non-alphanumeric character

Non-capturing group:
(?:expression)

Look-around assertions:
(?<=expression) = positive look-behind assertion
(?=expression)  = positive look-ahead assertion

Capture Groups

Capturing Groups and Backreferences
What is a non-capturing group in regular expressions?

The only difference between capture groups and non-capture groups is that the former captures the matched character sequences for possible later re-use with a numbered back reference while a non-capture group does not.

RegexOne – with Exercises

Lesson 11: Match groups / Capture group

Exercise

List of single characters

File:
hat
tut
cat
blue
red
zat
bet
tat
met
mat

RegEx:
[htm]at => matches "hat", "tat", "mat"

RegEx:
[^htm]at => matches ".at" except "hat", "tat", "mat"
Result: "cat", "zat"

Whitespace at the beginning or end of a line

^[ \t]+|[ \t]+$

Explanation:
^   Start of line
[ ] List of single characters: Space and Tab
+   One or more occurrences
|   OR
$   End of line

Remove newlines

File:
aaa
bbb
ccc

RegEx: '(?<=^.+)\n'

Result:
aaabbbccc

Cut out only define name

#define DEFAULT_CLOCK_BLA                      MAC_ADD_HEAD_1,0xff,0xfe,MAC_ADD_HEAD_2,SR_NR

Remove #define:

DEFAULT_CLOCK_BLA                      MAC_ADD_HEAD_1,0xff,0xfe,MAC_ADD_HEAD_2,SR_NR
Search:  '(?<=(^[\w]+))[\s]*[\w\,]*(?=($))'
Replace: ''
DEFAULT_CLOCK_BLA

Append parameter list

default_clock_bla
Search:  '(?<=(^[\w]+))\s*(?=($))'
Replace: '(void);'
default_clock_bla(void);

Trim to only have one space

bool                            default_clock_bla(void);
Search:  '(?<=(^[\w]+))\s+'
Replace: ' '
bool default_clock_bla(void);

Separate result type from function name

bool default_clock_bla(void);
Search:  '(?<=(^[\w]+))\s'
Replace: '\n'
bool
default_clock_bla(void);

Add curly brackets

bool
default_clock_bla(void);
Search:  ';(?=($))'
Replace: '\n{\n    \n}\n'
bool
default_clock_bla(void)
{
    
}

Add to every line

DEVICE_I2CSLAVE=1
TARGET_LIKE_MBED
DEVICE_PORTOUT=1
DEVICE_PORTINOUT=1
TARGET_RTOS_M4_M7
Search:  '(?<=.*)^'
Replace: '<name>'

Search:  '=1$'
Replace: '</name><value>1</value>'
<name>DEVICE_I2CSLAVE</name><value>1</value>
<name>TARGET_LIKE_MBED
<name>DEVICE_PORTOUT</name><value>1</value>
<name>DEVICE_PORTINOUT</name><value>1</value>
<name>TARGET_RTOS_M4_M7

Add suffix if line-end is NOT “>”

<name>DEVICE_I2CSLAVE</name><value>1</value>
<name>TARGET_LIKE_MBED
<name>DEVICE_PORTOUT</name><value>1</value>
<name>DEVICE_PORTINOUT</name><value>1</value>
<name>TARGET_RTOS_M4_M7
Search:  '(?<=[^>]$)'
Replace: '</name><value/>'
<name>DEVICE_I2CSLAVE</name><value>1</value>
<name>TARGET_LIKE_MBED</name><value/>
<name>DEVICE_PORTOUT</name><value>1</value>
<name>DEVICE_PORTINOUT</name><value>1</value>
<name>TARGET_RTOS_M4_M7</name><value/>

Embrace lines

<name>DEVICE_I2CSLAVE</name><value>1</value>
<name>TARGET_LIKE_MBED</name><value/>
<name>DEVICE_PORTOUT</name><value>1</value>
<name>DEVICE_PORTINOUT</name><value>1</value>
<name>TARGET_RTOS_M4_M7</name><value/>
Search:  '^(?=<name>.*)'
Replace: '<macro>\n'

Search:  '(?<=.*</value>|<value/>)'
Replace: '\n</macro>'
<macro>
<name>DEVICE_I2CSLAVE</name><value>1</value>
</macro>
<macro>
<name>TARGET_LIKE_MBED</name><value/>
</macro>
<macro>
<name>DEVICE_PORTOUT</name><value>1</value>
</macro>
<macro>
<name>DEVICE_PORTINOUT</name><value>1</value>
</macro>
<macro>
<name>TARGET_RTOS_M4_M7</name><value/>
</macro>

Table to SQL

Adding Quotation marks around string with regex

Joy F 11 51.3 50.5
Jane F 12 59.8 84.5
Jim M 12 57.3 83.0
Alice F 13 56.5 84.0
Jeff M 13 62.5 84.0
Bob M 14 64.2 90.0
Philip M 16 72.0 150.0
Search:  '[ ]'
Replace: ', '

Search:  '([^\s,.0-9]+)'
Replace: ''$1''
'Joy', 'F', 11, 51.3, 50.5
'Jane', 'F', 12, 59.8, 84.5
'Jim', 'M', 12, 57.3, 83.0
'Alice', 'F', 13, 56.5, 84.0
'Jeff', 'M', 13, 62.5, 84.0
'Bob', 'M', 14, 64.2, 90.0
'Philip', 'M', 16, 72.0, 150.0
Search:  '(?<=^)'
Replace: ') ,(\n    '
) ,(
    'Joy', 'F', 11, 51.3, 50.5
) ,(
    'Jane', 'F', 12, 59.8, 84.5
) ,(
    'Jim', 'M', 12, 57.3, 83.0
) ,(
    'Alice', 'F', 13, 56.5, 84.0
) ,(
    'Jeff', 'M', 13, 62.5, 84.0
) ,(
    'Bob', 'M', 14, 64.2, 90.0
) ,(
    'Philip', 'M', 16, 72.0, 150.0

Strip CC, only use source file

One-Liner

Original: CC -m64 -instances=global   -c -fast -g0 -I/opt/include -o build/testGlobals.o ../app/testGlobals.cpp
Search:   ^.* (.*)$
Replace:  $1
Result:   ../app/testGlobals.cpp

Multi-Liner

mkdir -p build/x86_Release 
CC  -c -fast -g0  -I/opt/include -o build/x86_Release/dynamoGlobals.o dynamoGlobals.cpp
CC: Warning: -xchip=native detection failed, falling back to -xchip=generic
mkdir -p build/x86_Release /_ext/710760585
CC  -c -fast -g0  -I/opt/include   -o build/x86_Release/_ext/710760585/TValueList.o ../dynamo_base/TValueList.cpp
CC: Warning: -xchip=native detection failed, falling back to -xchip=generic
mkdir -p build/x86_Release /_ext/710760585
CC  -c -fast -g0  -I/opt/include   -o build/x86_Release/_ext/710760585/UProductConstructor.o ../dynamo_base/UProductConstructor.cpp
CC: Warning: -xchip=native detection failed, falling back to -xchip=generic
mkdir -p build/x86_Release /_ext/710760585
Search:  '^(?!CC ).*$\n?'
Replace: ''

Search:  '^.* (.*)$'
Replace: '$1'
dynamoGlobals.cpp
../dynamo_base/TValueList.cpp
../dynamo_base/UProductConstructor.cpp

Hirn Infarkt

Synonyme (de): apoplektischer Insult, Apoplex, Schlaganfall, Gerhirnschlag
Synonyme (en): brain attack, cerebrovascular accident, stroke

Arten (de):
– Ischämie (= ischämischem Hirninfarkt) in 80-85%
– Als Folge einer Hirnblutung (= hämorrhagischer Infarkt, Intrazerebrale Blutung) in 15-20%
Arten (en): ischemic, hemorrhagic

	
TIA     Transiente ischämische Attacke                                    vollst. Remission innerhalb 24h
PRIND   Prolongierte reversible ischämischs neurologisches Defizit        vollst. Remission > 24h
CVI     Cerebrovaskulärer Insult                                          höchstens teilweise Remission

Zerebrovaskuläre Insuffizienz (CVI)
Cerebrovaskulärer Insult (CVI)

Logitech Quickcam Pro 9000

$ lsusb
Bus 001 Device 008: ID 046d:0990 Logitech, Inc. QuickCam Pro 9000

$ sudo gedit /etc/udev/rules.d/80-uvcdynctrl.rules
ACTION=="add", SUBSYSTEM=="video4linux", DRIVERS=="uvcvideo", RUN+="/lib/udev/uvcdynctrl"

$ dmesg | tail
[162799.904121] usb 1-3: new high-speed USB device number 7 using ehci-pci
[162800.162762] usb 1-3: New USB device found, idVendor=046d, idProduct=0990
[162800.162769] usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=2
[162800.162772] usb 1-3: SerialNumber: 7606FCDD
[162800.624344] Linux video capture interface: v2.00
[162800.715345] usb_audio: Warning! Unlikely big volume range (=3072), cval->res is probably wrong.
[162800.715352] usb_audio: [5] FU [Mic Capture Volume] ch = 1, val = 4608/7680/1<6>[162800.715736] usbcore: registered new interface driver snd-usb-audio
[162800.746098] uvcvideo: Found UVC 1.00 device <unnamed> (046d:0990)
[162800.762570] input: UVC Camera (046d:0990) as /devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3:1.0/input/input13
[162800.762693] usbcore: registered new interface driver uvcvideo
[162800.762696] USB Video Class driver (1.1.1)

$ sudo apt-get install guvcview

Logitech Webcam Pro 9000 – running under Ubuntu 11.04 Linux
Logitech Quickcam Pro 9000
Logitech Quickcam Pro 9000 drivers?