Saturday, December 25, 2010

Anniversary Card In Bangla

Xmas Road Trip

Christmas Eve is over. Since my parents moved into a small hole in Süstedt, the journey there is always an experience.

Up 8km from the finish it was actually quite good. The roads were not in perfect, then at least in passable condition.

some point we had a small but well-cleared road, turn left ... and stuck. A closer inspection revealed

that the road would turn into "we, around 5-10 cm was lower than the street where we were before the move. From the outside, but this was not seen.

Results: We were somewhere in the snowy nowhere, visible far and wide, no house and the car was not yet back.

My brother tried to push the car while I tried, the car carefully backwards maneuver on the more stable road. The only result was that the wheels dug further.

A plan B was needed.

A common method to free a stuck car, is to place the mats under the wheels. The carpet-like mats of today's cars are actually almost too good for such experiments, but even if the navigation system displays only wilderness around you, going from one at some point the alternatives. The most spectacular result was

however, that a mat came out firing with fly front. The situation itself is not improved as a result. While my brother lodged

a smoke break, was I thought about Plan C.

rock After digging out the wheels and multiple back and forth I finally got the car on its own again and we turned around at first to drive a larger location.

From there, we called our parents and let us steer to the target phone. En route we also saw yet another car that was just moved from a stretcher out of the snow.

Almost 3 hours after departure in Bremen, we were finally there, while in summer can expect about 45 minutes.

conclusion of the way: A normal Navi good is on a visit to the province of winter is not too much. worked the last few years it just make it, but with proper winter weather, one now needs a special winter mode, which takes into account only the navigation system roads that are on the roster of Räum-/Streufahrzeuge.

The floor mats have survived the procedure also good. I even have the subjective impression that they are now a little cleaner than before.


At the end of the Christmas family celebration, it was on the return journey.

If you know of an insider that the roads are cleared, you get a lot easier to target. However, the major roads through the snow drifts had become part of small single-lane roads that are sometimes only on the median strip or on the opposite lane at all could ride.

held at this late hour, the oncoming traffic, fortunately limited, so this was the most time possible. If it was a time it was said, however, carefully back into the snowdrifts to dive on our site. Once we were stuck there too fast, but it was just twice as good.

When we reached the B6, it was much better. Although that was not free of drifting snow but there is more traffic there is stable lanes were constructed.

The A1 was finally cleared up the left lane perfect. The A27 completely even.

I'm glad now first, the next Days not to have to leave the house ...

On that note: Happy (left) hard!

Thursday, December 23, 2010

Tooth Brush Sno Cap Refills

Merry Christmas!

Wednesday, December 22, 2010

What Does A Bitches Mucus Plug Look Like

hit and run - Part 5: Insurance coverage

a hit and run insurance law can also lead to consequences and costs. In the event of an accident, your insurer for a fair settlement of claims a legitimate interest, investigate those accidents completely. As a policyholder, you have to contribute to accident information, so you are bound by an obligation to inform. This education requirement expressed in the fact that the policyholder after the occurrence of the accident has the obligation to do everything that could to investigate the matter and to minimize the damage to be useful.

The Federal Court held that this duty of disclosure will be violated if they flee from the scene. With the realization hit and run by § 142 of the Penal Code "as a reflex" also simultaneously violated the intelligence interest of the insurer (BGH VersR 2000 p. 222). The same also when a definite liability situation.

Car Insurance
for the discharge of their liability insurance has the consequence that this initially for the party in the accident costs comes up, they demanded back but you-they are thus deprived of recourse. This freedom of the insurance is not unlimited. It applies to a maximum of 5,000 € (BGH VersR 1983, 333).

insurance
Even if you have taken out insurance (partial or fully comprehensive), you need to adjust the damage to your own vehicle itself, because the insurance is not required in case of a hit and run, to pay the costs incurred (OLG Nürnberg, Case No.: 8 U 2561/96).
legal
general can be stated for traffic offenses that your legal protection insurance provides coverage for legal fees, unless you have acted negligently. They commit a crime or misdemeanor deliberately omitted in the rule, the legal protection.

About the Author: Attorney Thomas Brunow lawyer for traffic law in Berlin. Brunow lawyer is legal counsel of the Volkswagen - Audi Dealers Association of Traffic Law Traffic Law and member of the consortium in Berlin. Attorney Thomas Brunow helps victims and those affected by road accidents on traffic violations (hit and run fine, points on their license, etc.) quickly and efficiently.


Tel: 030 / 226 35 71 13

lawyer Thomas Brunow is a partner Registry Prof. Dr. string & Partner Berlin

Tuesday, December 21, 2010

Herpes Sores On Chest?

A JSON parser in ABAP

When it comes to structured data between different systems, offers himself to the
JSON data format. It supports arrays, hashes, some basic data types for numbers, strings and logical values and allows data objects to nest arbitrarily deeply into each other. The notation is simple and programmers of different languages (C, C + +, C #, Java, JavaScript) in this or a similar form of art. Compared to XML, there is less overhead for defining the structure, so that the essential, the actual data content, a greater presence.
Here are some simple examples:

is a

array of strings. The following
Hash
defines some examples of name-value pairs:
{
"age": 42,
"occupation": "stenographer"
"Smoking": true
} let

course, arrays and hashes any combination, such as a Hash of Arrays (HoA):
{"Adam": ["Cain," "Abel", "Seth"],
"Abraham": ["Ismael", "Isaac" ] "Isaac": ["John", "Esau"]} Since JSON is essentially the notation of data in JavaScript, it is often used in Web applications communication with the server. Parsing in JavaScript layer of a Web application can be done simply with the statement
eval
[1].
 In order to develop the user interface portable and choose the minimum of effort between different backends to be able to recommend a standardized data format such as JSON for both directions of the data transport, for sending as receiving the data. 

Since I have been working recently on a Web application that sends Ajax requests with JSON data to an SAP system and receives from this, I needed the ABAP stack a JSON parser. Since no such apparently in the SAP system does not yet exist, I programmed it myself: the class ZCL_JSON_PARSER can convert a JSON input in a generally typed ABAP data object that can then be searched in the client code or mapped to the application-specific data structures. When mapping tasks such as this, the test-driven development is very efficient: It is because we do not how to do otherwise with side effects - there is virtually no API calls that can so or to go away, and no dependence on the contents of any database tables. We have an input and a depend only on the ouput. It cries out after, the functionality to implement step by step as the fulfillment of test expectations. [3] Before

however, we can write down even a syntactically correct test must be at least the interface of the test method must be set. In our case we have a public method to parse

have certainly looks as follows:
 

methods parse
importing iv_json type string returning
value (es_data) type zut_data
raising
zcx_parse_error.

input is certainly a string. Output is a data object that can be evaluated with ABAP resources and allows arbitrarily deep nesting. For this purpose, we can take take a generic data type that any data objects. The data type can
any
are not able to use, because it represents only an abstraction of the existing data types and the compiler can not say how many bytes of that type are to be allocated. The type ref to data

does not have this problem. He is "a pointer to anything" and requires a known number of bytes: the length of a memory address, usually four bytes.

The above return type is defined in the Data Dictionary. In ABAP, he would be equivalent to the following note:

types: begin of zut_data,
type type c length 1,
data type ref to data,
end of zut_data.

The type code
type
the type of data object Selected, points to the pointer data

. These can be basic data types like String (S), Number (N), Boolean (B), but also composite types such as hash (h) or array (a).

Note that the so-typed interface already contains an important design decision:
The goal of our mapping, a data object, not an instance of a class.
have in the hierarchy of data objects, ABAP objects and instances of classes have no common generic term.

Man, alternatively, a class could have used the definition of the target type in ABAP. That would have certain advantages, for example, would have the type codes can be eliminated [2] - But at the cost of significant performance losses: create has the
CreateDataSource
command significantly better execution times than

object.
For simple data types, we can already write down some tests: test_42 method. data: ls_data type zut_data.
ls_data = go_ref-> parse ('42 ').

* parser recognize '42 'as a figure:
assert_equal (act = type-ls_data
exp =' N ').
 * value of 42 was determined correctly 
_assert_equals (act = ls_data-data
exp = 42 ). ENDMETHOD. * --- A String recognize
test_string method.
data: ls_data type zut_data.
 ls_data = go_ref-> parse ('"abc"'). 

* String is detected
assert_equal (act-type = ls_data
exp = 'S').

* string is read correctly
_assert_equals (act = exp
ls_data-data = 'abc').
 
ENDMETHOD. "Test_string

This is
_assert_equals
a helper method that works essentially like
assert_equal but if
act is a pointer, before he comparison with exp

dereferenced.
If an empty input will be served beginning, to an empty structure to be returned:
* --- No entry -> No output
test_nothing method.
data: ls_data type zut_data.
ls_data = go_ref-> parse ('').
* Empty string is blank value (no exception)
assert_initial (ls_data).
 
ENDMETHOD. "Test_nothing

how is it with composite types - here hashes and arrays, it is natural to map hashes and arrays in ABAP by internal tables with hash or default access for this array is relatively simple.

types: zut_array_tab
type standard table of zut_data.

does what you want: For each array element can indeed turn contain any data object. So the line type of the array again zut_data . hashes are sets of key / value pairs. The key is a string, the value is again an arbitrary data object. A hash element will look as follows then from:

types: begin of zut_hash_element,
key type string
 include zut_data type as value. 
types: end of zut_hash_element.

The hash itself is now in the ABAP sense, a hash table with line type
zut_hash_element
and key column key : types: zut_hash_tab type hashed table of zut_hash_element
with unique key key.
Now we can formulate tests for hashes and arrays, starting with the simplest case:

It is certainly the empty array be detected ( go_ref is the object under test, to meet the test instance of
ZCL_JSON_PARSER
):

 * --- The empty array [] method 
test_empty_array.

data: ls_data type zut_data.

field-symbols: zut_array_tab \u0026lt;lt_array> type.

ls_data = go_ref-> parse ('[]').

* Array type is detected
assert_equal (act-type = ls_data
exp = 'a').

assert_bound (ls_data-data).

assign ls_data-data-> * to \u0026lt;lt_array>.
assert_subrc (act = sy-subrc
msg = 'data object does not have the correct type').

* It has been determined, the empty array
assert_initial (\u0026lt;lt_array>).

ENDMETHOD. "Test_empty_array

The final and complicated test case, parsing a complex nested structure is also designed to show how the resulting structure can be evaluated in ABAP, to the application to extract the required data:

* --- Nested structure
test_complex_nested method.

data: ls_data type zut_data,
lv_array_length
type i. field-symbols: type zut_array_tab \u0026lt;lt_array>, \u0026lt;lt_hash> zut_hash_tab type, \u0026lt;lt_hash2> zut_hash_tab type, type \u0026lt;ls_line> zut_data, \u0026lt;ls_element> type zut_hash_element, \u0026lt;ls_element2> type zut_hash_element.
ls_data = go_ref-> parse (
'[1, {x: [1,2,3], y: {"c": 1}}, "a", true]'
).
 
* array base type is recognized
assert_equal (act-type = ls_data
exp = 'a').

* Outer array View
assign ls_data-data-> * to \u0026lt;lt_array>.

* He has four elements
describe table \u0026lt;lt_array> lv_array_length lines.
assert_equal (lv_array_length
act = exp = 4).
 * position on the second element 
read table \u0026lt;lt_array> assigning \u0026lt;ls_line>
Index 2
assert_equal (act = exp \u0026lt;ls_line>-type = 'h'). assign \u0026lt;ls_line>-data-> * to \u0026lt;lt_hash>.
* The hash (the second element of the external arrays)
* On the key element of View 'y' position
read table \u0026lt;lt_hash> assigning \u0026lt;ls_element>
 table with key key = 'y'. 
assert_subrc (sy-subrc).

* The key element to the 'y' is again a hash
assert_equal (act = exp \u0026lt;ls_element>-type = 'h').
assign \u0026lt;ls_element>-data-> * to \u0026lt;lt_hash2>. * This innermost hash contains the key 'c' is the number 1: read table \u0026lt;lt_hash2> assigning \u0026lt;ls_element2> table with key key = 'c'.
assert_subrc (sy-subrc).
 assert_equal (act-type = \u0026lt;ls_element2> exp = 'N'). 
_assert_equals (\u0026lt;ls_element2> act = exp-data = 1).

ENDMETHOD.

On the draft class
ZCL_JSON_PARSER a few comments: core is the method get_any that reads any JavaScript data object. It is not only on the single public method parse
for the top data object is called, but also at the designated places in arrays and hashes, which leads to recursive calls.
 It pleased me that the class of fully kept free of global variables: It has no attributes at all. The price was only to provide all of methods with a parameter 
cv_pos
that indicates the current position in the string and can be increased by the methods of successful reading of an expression. The calls to the methods of this bit bulkier than they could be: Each method passes by reference the entire string to be parsed and the position in the string when changing parameters. This there are usually export parameters
ev_found
, a flag that indicates whether the part you are looking object was found.

The class can be a bit more than the JSON format: key hashes can be written down without the quotes in JavaScript as they present a valid variable name. And strings can also be limited by single quotes. The only restriction for Strings: Unicode characters in the notation
\\ uXXXX
are not supported.


[1] Because of the theoretical possibility of

code injection attacks is recommended for applications that run in the public Internet, but also in JavaScript -programmed to use a parser that actually evaluated only data objects and executing any JavaScript code. The most popular JavaScript frameworks like Prototype or jQuery contain a JSON parser.
[2] This is Martin Fowler Refactoringmuster: "Replace Type Code with Subclasses.
[3] This is also the reason why often in TDD launches mapping tasks as an example, such a conversion of integers into Roman numbers.


Thursday, December 16, 2010

Images Suitcase Piercing

Wikileaks

Two very nice articles on Wikileaks:

The Berliner Zeitung published an appeal against the attacks on Wikileaks, together with the newspaper, the Friday and the Frankfurter Rundschau.

Spiegel Online: media censorship in the U.S. - What to do with Internet blocking WikiLeaks

I have today finally Christmas holidays, as I come back maybe a little more often to blog.

Monday, December 13, 2010

How Many Calories Are In A Brownie With Frosting

red light violation - No increased fines despite a long period of red light

When a red light violation by over 1 second is called a qualified red light violation. This is followed by one month driving ban, 4 points on their driving and € 200.00 fine.
showed in this case from the year 2009, the traffic light already red light seven seconds. The question was how is the person with such a violation punishable! This failure prompted the District Court zoo to increase the fine and the ban dramatically. The verdict was in before the Supreme Court, however, not last. In the current edition of the fine catalog provided Regelbuße is higher than in so-called simple red light violations already. Consequently, when imposing the Regelbuße for a qualifying offense already takes into account the increased red abstract danger by the long duration of the red light phase.
because the increase of the fine in the case of the presence of a qualified red light violation has its origin in the fact that for more than a second sustained period of red light already may, on cross-traffic in the through the red light suspended driving range (Senate Decision of 7 October 2002-3 Was (B) 364/02 further references). In the case of - as the district court accepted - already seven seconds lasting period of red light is not beyond you can abstract danger that could justify a further increase of the fine. Because of the interaction between the fine and ban the error of law recognized in setting the fine, the entire legal consequence statement, and hence the ban.
The Court of Appeal looked to further increase due to the particularly long duration of the period of red light to right no reason. It remained with the Regelbuße.
For Decision: KG Berlin Decision of 13 January 2010 (3 Was (B) 714/09, 2 Ss 267/09 - 3 Was (B) 714/09)

About the Author: Attorney Thomas Brunow lawyer for traffic law in Berlin. Brunow lawyer is legal counsel of the Volkswagen - Audi Dealers Association of Traffic Law Traffic Law and member of the consortium in Berlin. Attorney Thomas Brunow helps victims and those affected by road accidents on traffic violations (hit and run fine, points on their license, etc.) quickly and unbürokratisch.mehr info: www.verkehrsrecht-24.de
Tel: 030 / 226 35 71 13

lawyer Thomas Brunow is a partner of the firm Prof. Dr. string & Partner Berlin

Friday, December 10, 2010

Community Service Letters For Sororities

hit and run part 4: Fines and side effects

addition to the criminal Consequences may occur periodically after a hit and run accident for the fugitives and to misdemeanor legal consequences and penalties. If the process is stopped because of hit and run in certain circumstances, the matter also to the competent administrative authority or penalty is given.
If there is a conviction, the competent authority, in addition to fines imposed by the registration of its discretion, up to 7 points after the Fines Regulation (BKatV) in the central traffic register of the Federal Motor Vehicle Office in Flensburg.
  • penalty notice
The competent administrative authority may Notice of payment remitted in their view sufficient evidence to support an accusation of hit and run. In the penalty notice, a fine of certain amount and other side effects are fixed. Here, the amount of the fine depends on the fine catalog.
As a side effect is to impose a driving prohibition pursuant to § § 25 Road Traffic Act, 4 BKatV considered. The ban is an extremely comprehensive and relevant topic dar. For example, if a threat to your job, should be examined in each case whether this account can not be an exception. If necessary, the ban will depend on the duration set in a holiday period. Otherwise can also be waived by a ban on payment of a higher fine. For the proper discharge of their interests and to assess whether such steps are legally possible, it is imperative to hire a specialized attorney in the traffic law.
  • logbook edition
If the determination of the driver who has committed a hit and run was not possible, the Authority may in accordance with § 31a StVZO against a vehicle owner for one or more order to it authorized or will be approved vehicles keeping a logbook . In this case, the vehicle owner make future before each ride guarantee that the persons, dates, and the license plate of the vehicle shall be recorded in the logbook. The arrangement to keep a log book, after a traffic stop after an accident for a period of three years to be proportional to (OVG Münster , DAR 2005, 708 f. ). It depends on the individual case, however, regularly.
About the Author: Attorney Thomas Brunow lawyer for traffic law in Berlin. Brunow lawyer is legal counsel of the Volkswagen - Audi Dealers Association of Traffic Law Traffic Law and member of the consortium in Berlin. Attorney Thomas Brunow helps victims and those affected by road accidents on traffic violations (hit and run fine, points on their license, etc.) quickly and efficiently.
more info: www.verkehrsrecht-24.de
Tel: 030 / 226 35 71 13
lawyer Thomas Brunow is a partner of the firm Prof. Dr. string & Partner Berlin

Friday, December 3, 2010

Colloidal Silver Pink Eye

hit and run, Part 3: Punishment and punitive

Part 3: What are the legal consequences of the meeting caused the accident?
  • criminal consequences

The hit and run is a misdemeanor in the criminal sense. is laid down in § 142 I StGB that the unauthorized removal from the scene - like the hit and run law is-punishable by up to three years imprisonment or a fine is
At sentencing, or after a penalty. the court may additionally ban according to § 44 StGB impose. The duration of the ban depends on the one after the damage suffered and the other of whether during the accident flight people were injured. It is usually in damage between 200 and 500 € a month, likely to damage up to 900 € with three months driving ban. The period of the ban begins to run when the license is taken into official custody.
In some cases threatens the withdrawing the license . This could also at major property damage and Threatening bodily harm. Property damage must usually have exceeded € 1,300, to be significant (LG Berlin, DAR 2005, 467). The property damage incurred in this case includes repair and towing costs, expert costs and the depreciation of the victim vehicle (OLG Dresden, NZV 2006, 104; LG Berlin, NZV 2007, 537). Did it further in the accident to an injury, can be expected to manage 12 months without driving. The combination with a drunk driving has a negative impact for those affected.
If the conditions for a conviction under § 142 Criminal Code before, can lessen the court nevertheless referred § 142 IV StGB the sentence or even be exempt from punishment. For this you would need as involved in the accident within 24 hours, the findings of their personal data have allowed the police. have occurred, in which only a minor material damage (to a maximum of 1300 €: LG Bielefeld, NZV 2002, 48) also needs some of the traffic accident "out of moving traffic" - - typically when entering or leaving a parking space has been created. The so-called "active repentance" but offers no means the opportunity for the to release an accident resulting obligations. Again, that others fleeing the accident and your driver may have watched and you will be investigated by the police, but before you meet your statement requirement. In this moment you can no longer rely on § 142 StGB IV. Therefore may not IV § 142 are interpreted as "carte blanche". It is recommended that in the event of an accident, immediately seek an attorney.


also the keeper of a vehicle can make the illicit guilty after a road accident. The at the accident site present holder and owner of a motor vehicle which by him to drive the same enforcement caused the accident does not prevent from proceeding further with his vehicle, although this can be possible to ensure complicity in illicit a road accident (including OLG Frankfurt Main Decision of 27.11.1996 - 3 Ss 364/96 ).
The accused have the right to legal defense. This right should be used in all cases. Especially are strongly advised not to make any statement to the police or other law enforcement authorities could not take your lawyer before access to the investigation file. From this follows only what damage has occurred and whether there are witnesses, and above all, this results only the specific allegation. Only after having regard to all the circumstances, your lawyer, your case for developing effective defense strategy. Since the charge of unauthorized removal from the accident also affected the offense right (driving ban, fines, points, log book edition, etc.), has specialized in the transport of the defense attorney is not isolated criminal conduct. The costs of proceedings shall usually your legal expenses.

Thursday, November 25, 2010

Dvd Player Strap Headrest

No message commands in the business logic!

I recently received e-mail request from a developer, because how he could test it with ABAP units, whether a particular error message that he goes through in its business logic, not be sent or received is. He had already tried in various ways, was at this point but no further.

If something turns out to be testable to be complicated, it is often not the unit test, or even, as has geargwöhnt indirectly, the Unit Test Framework (between the lines I read "Pah! With ABAP Unit can not even be an Error message intercept or . query "), but usually the problem is to test the code itself The same here.

Suppose there is a plausibility test requires that a user enter prices exceed a certain maximum amount must not be. In the transaction bound to the class that checks the input values, we may find the following Code:

if iv_input_price> gv_max_price.
 * The input price & 1 is too high (maximum: & 2) 
message e100 with iv_input_price gv_max_price.
endif.



This works just fine in the GUI completely. But the automatic testing of code there are complications. The unit test, which simulates an excess of the maximum amount, can not run up to the end. When he meets with the error message that passes the test, the control unit bound to the GUI to display the error. But this means that the execution of unit tests stops here. Both - the display of the error and the impossibility of the Unit testing should be completed correctly - of course, is undesirable.

Where is the problem here?

Although the code seems so productive working properly and the problem only occurs when unit test, the problem is not the unit test and certainly not in the Unit Test Framework. The problem is that the above code binds the test logic in the existence of a GUI: the message

command is a statement that is passed to the GUI to run. It is not possible to test independently run by the GUI. This is harmful in many ways:



The code can not run in the background, eg in a Job: An error message will result in immediate termination of the job. But if such a number of documents in the background should be recorded, this is not the desired behavior: So normally, only the processing of the current

document is canceled and must proceed to the next document.


It is not possible to use the class with this assessment in a web application or with a completely different user interface: Since the message

statement can not run, there is an interruption of the process with a short dump - So the Web (HTTP 500) to an "internal server error".


It is not possible, the logic of this offer class as API function, since the failure leads to a situation that is not controlled by the interface.





All problems in computer science can be solved by introducing a new level of indirection be
, a famous quote by Butler Lampson

is. [1] This is also in this case Sun Just separate the treatment of an error by the detection, we invented the exception. Instead of an error to report the situation directly in the GUI, the program should raise an exception, which might best like a class-based. This exception is declared in the interface of the test method. The consumer can then use this method
a try ... catch ...
block to decide what he wants to do in exceptional cases. After the introduction of such exception, the code looks something like this for example: if


iv_input_price> gv_max_price.
RaiseException type zcx_price_exceeds_bound
exporting
price = iv_input_price
bound = gv_max_price.
endif.



The test unit designed according to this logic is simple - and simple unit tests are usually a sign that the productive code has come very good. Here is the test that the test detects a limit violation and raises the expected exception:


test_bound_detected method.
try.
go_validator-> check_price (gc_very_high_price).
* Not OK - exception was not triggered: fail ('is too high a price trigger exception! "). catch zcx_price_exceeds_bound into lo_ex.
* OK - Check the option still the exception parameters:
assert_equal ( act = lo_ex-> price exp = gc_very_high_price msg = 'exception object parameterized false'). assert_equal (
act = lo_ex-> bound = exp
go_validator-> gv_max_price msg = 'exception object parameterized wrong' ). ENDTRY. ENDMETHOD.

The reverse test can be useful, if a sufficiently low price (eg 1) is input to
no exception:

test_no_ex_for_price_in_range method. go_validator-> check_price (1).
ENDMETHOD.
not missing anything else? No! After catching an exception, we can safely leave the Unit Test Framework: If there is one exception, this is a bug in the program. So the unit test framework already responded correctly by the test

test_no_exc_for_price_in_range in the overview as incorrect mark is. See also my blog
Unhandled exceptions as assurance
.

We could consider the case as settled:
 Error Messages in the test logic should be avoided. 
End of story.

Nevertheless, the underlying complaint that the Unit Test Framework could not catch error messages (regardless of whether it makes sense or not). The answer is: It can
- if we are ready to introduce another level of indirection! While I run, how to do that, I certainly do not advise the use of error messages. It could be, however, that knowledge of this possibility in some cases even useful.

fact ABAP offers a way to intercept error messages: function modules always have the built-in Exception error_message

. If this exception is caught explicitly by calling a function module, it is triggered when an error message in the past or from the function module called by code. So you can retrieve by calling the function module as usual the
sy-subrc
to recognize that an error message was triggered. Now there are methods for good reason (see above) no such mechanism. However, we can introduce a function module, the dynamic methods a given object at run time with a given parameter list at run time calls:

    FUNCTION Z_TEST_E_MESSAGE.
  • *"----------------------------------------------- ----------------------- * "*" Local interface: * "IMPORTING
  • *" REFERENCE (IO_OBJECT) TYPE REF TO OBJECT
    * "REFERENCE (IV_METHOD) TYPE CSEQUENCE
  • * "REFERENCE (IT_PARAMETERS) TYPE ABAP_PARMBIND_TAB *"--------------------------------- -------------------------------------
  • call method io_object-> (iv_method)
    parameter- it_parameters table.
  • ENDFUNCTION.


The following example program displays the using a mini object lcl_testee , generated on the request Error Messages, such as the occurrence or non-occurrence of Error Message in the unit test can be considered:
* ---
z_test_e_message report.
 
* --- How to test for error messages within unit tests

* ---
lcl_testee class definition.
public section.
methods unwise_check
importing iv_error type flag.
endclass. "Lcl_testee DEFINITION

* ---
lcl_testee class implementation.
 method unwise_check. 
if iv_error eq 'X'.
message E001 (bl)
with 'Never issue e-message in a validator'.
endif.
endmethod. "unwise_check
endclass. "lcl_testee IMPLEMENTATION

* ---
class lcl_test definition
for testing " #AU Risk_Level Harmless
inheriting from cl_aunit_assert. " #AU Duration Short

private section.
data go_testee type ref to lcl_testee.
methods:
setup,
prepare_parameters
importing iv_error type flag
exporting et_parameters type abap_parmbind_tab,
test_error for testing, test_no_error for testing.

endclass. "lcl_test DEFINITION
  
*
class lcl_test implementation.
*
method setup.
create object go_testee.
endmethod. "setup * method test_error. data: lt_parameters type abap_parmbind_tab, lv_subrc type i.
call method prepare_parameters
exporting iv_error = 'X' importing et_parameters = lt_parameters. call function 'Z_TEST_E_MESSAGE'
exporting
io_object = go_testee iv_method = 'UNWISE_CHECK' it_parameters = lt_parameters
exceptions
error_message = 1. lv_subrc = sy-subrc. assert_not_initial( act = lv_subrc msg = 'Method should issue an error message' ).
endmethod. "test
*
method test_no_error.
data: lt_parameters type abap_parmbind_tab.
     call method prepare_parameters 
exporting iv_error = space
importing et_parameters = lt_parameters.
call function 'Z_TEST_E_MESSAGE'
exporting
io_object = go_testee
iv_method = 'UNWISE_CHECK'
it_parameters = lt_parameters
exceptions
error_message = 1.
assert_subrc( sy-subrc ).
endmethod. "test_no_error
*
method prepare_parameters.
data: ls_parameter type abap_parmbind,
lv_error type ref to flag.
et_parameters clear.
CreateDataSource lv_error.
lv_error-> * = iv_error.
ls_parameter-name = 'IV_ERROR'.
ls_parameter-kind = cl_abap_objectdescr => exporting.
 ls_parameter-value = lv_error. 

ls_parameter insert into table et_parameters.

ENDMETHOD.

endclass. "Lcl_test IMPLEMENTATION



This program shows that it is quite possible error messages in unit tests to catch. The significant amount of test code for such a simple thing like Throwing an error message, however, an unmistakable "

Code Smell" - is used in this case, ensure that the

command message in an inappropriate area.


[1] Quoted from Greg Wilson, Andy Oram [ed]:
Beautiful Code
, O'Reilly, Sebastopol (CA), June 2007, p.279.


Sample Of Speech Anniversary

hit and run - Part 2: The later finding and the visibility of accidents

When is the later finding more immediately?

If they had waited a reasonable time of the accident in vain without the victim or other third parties to identify previously were to be found, may you walk away scot-free from the accident. This requires, however, that you then immediately make the proof of identity and their possible involvement in accidents to the police. The law defines "immediately" the quality of the reporting "without undue delay." Depending on the case and as circumstances permit, they should immediately or promptly as possible the findings. On the other hand, during nighttime accidents satisfying, in principle, a message the next morning (OLG Hamm, NZV 2003, 424). To be sure, but they should report immediately to the police.

· What do I do when I first noticed the accident at home?

In most criminal cases of hit and run are accidents in which it came to light impulses between two vehicles when entering or exiting. Especially in such cases it is possible that the collision caused the accident that has not even noticed. In this context, speaks of the visual, auditory and tactile perceptibility of accidents. One wonders therefore whether the accident seen, heard or been perceived as a jerk. Evidence in the case of an accident Aufprälle, significant accident noise and vibration. Whether and how an accident was perceived, can be retrospectively by expert opinion to determine the basis of the damage pattern. Whereas it is generally not advisable to rely on having not noticed the offense with another car, although this is not true. If you are making a jolt or collision, you should verify that it is not thereby come to external damage.
you notice a damage to their vehicle at home that they should try to remember at which point it could have come to an accident. In this case, you can of course be victim or perpetrator. It is therefore advisable to also notify the police here, as other the accident could have observed. If they are then found to be causing the damage, they still remain , With impunity if it is found that they did not notice the accident or collision could (Federal Constitutional Court, 2 BvR 2273/06).

Because of the many problems in the area of the accident flight it is always a specialist in the traffic law attorney to carry out the defense.

About the Author: Attorney Thomas Brunow lawyer for traffic law in Berlin. Brunow lawyer is legal counsel of the Volkswagen - Audi Dealers Association of Traffic Law Traffic Law and member of the consortium in Berlin. Attorney Thomas Brunow helps victims on traffic accidents and stakeholders on traffic violations (hit and run fine, points on their license, etc.) quickly and efficiently.
Tel: 030 / 226 35 71 13
lawyer Thomas Brunow is a partner of the firm Prof. Dr. string & Partner Berlin



Tuesday, November 23, 2010

Vesta Beef Risotto Pro Points

An object-oriented metalanguage

In computer magazines and books about model-driven software development in recent times often described the framework
Xtext
and praise - which is mainly due to the fact that it is used for the integration of programming in the Eclipse IDE [. 1] Xtext (or its underlying parser
Antlr
) is an easy-to-learn tool to meet the broad development of domain-specific languages - that is why it is also suitable for entry into the area. But there are interesting alternatives that should at least know.

A more interesting option to make run-time maintainable models for code generation and for the development of DSLs in my view, the so-called
Parsing Expression Grammars (PEG) is
, especially developed by Alessandro Warth object-oriented metalanguage
OMeta
. The basic idea of all PEGs is a generic term the pattern matching, such as it is used in regular expressions. PEGs use the knowledge that all usually are the construction of compilers and interpreters related tasks in a way, only variations of a common mechanism - the pattern recognition [2]




The
Tokenizer
(also
Lexer
or
Scanner
called) transforms an array of characters (the input, the source code) into a sequence of basic syntactic units, tokens. Classically used for this purpose a tool like lex

or its Flex development

. In principle, a Lex or Flex file provides a list of regular expressions that will be applied sequentially to the input until a suitable expression is found. Each regular expression is an "action" in the form of C code assigned, which must eventually end with the return of a well-defined tokens, together with a possible token argument. To illustrate how such a flex file is listed, like my serve
Flex Definition File apc_lexer.lex
project
astro
patterns.

The

parser operates on the array of tokens to generate an internal data structure that is suitable for the efficient processing machine particularly well. Usually the result of parsing an abstract syntax tree (AST). Also, the parsing is basically Pattern recognition, only on a higher level: it uses a different kind of "alphabet" consisting of terminal and nonterminal symbols, and the patterns are the syntax rules, called production rules. Parser has a long history, represented in which
yacc
(

y
et
a nother

c
ompiler
c
ompiler
) a first milestone.
yacc
, although developed over 30 years, is still used for the design of programming languages. I have implemented with
Bison
, the successor to yacc, a
astrological DSL
which serve also to illustrate here should. The
Bison grammar of these DSL
shows a structural similarity that is compared here with the input of a number of so-called production rules. If a suitable rule is found, the associated semantic action

executed.


Type Checker
and
optimizer
are transformations of the AST, which recognize certain patterns and replace them with more specific or more efficient designs. As the product of the parser is usually a syntax tree, one often uses the

visitor design pattern to traverse the tree, run depending on the application-specific operations. [3] The same applies

Finally, the code generator

, who transformed the AST program in source code or binary code for a processor or a virtual machine. Also be used for this purpose to the visitor pattern ajar methods, although this task can be formulated in the form of a grammar with production rules.



OMeta The programming language provides a mechanism to formulate all these tasks in the form of a PEG grammar and fix them. The concept is so general that in principle any transformation of code and data-structures in other target structures. The OMeta syntax can be embedded in different host languages, for example, there OMeta implementations many others,
C #
,

JavaScript, Ruby
- for
Squeak
, COLA (a mixture of Scheme and Smalltalk used the first host language) - increases the number of implementations. I find it particularly attractive to the cooperation with host dynamic languages such as JavaScript or Python. For the interpreted languages are obviously very well prepared for the vision of model-driven software development, at run time in a domain-specific language, the system behavior can be. The JavaScript language also has the additional advantage of being a "default language of the Web Browser" at no extra cost in web applications available. Because I think the language OMeta so important, I have posted on my homepage an area for experimentation at the link
http://ruediger-plantiko.net/ometa/

. It is similar to the http://tinlizzie.org OMeta is, as its name says, an object-oriented metalanguage that has many interesting features:

Entering OMeta must not source or even be a string, but can an array of arbitrary objects be the host language. This allows for example the transformation of abstract syntax trees. For each syntax tree iw as any sequence of nested arrays, tokens, and objects can be displayed. The JavaScript statement document.getElementById ("btnSave") click ();

for example, could be represented by the AST.
listof: p = apply (p) ("," apply p ()) *
would match one or more, separated by commas occurrence of "something that usually p enough '. For example, recognizes the term listof ('expression') a comma separated list of expressions (meet a previously defined rule expression ), while
listof ('name')
on a list of names ( the name of the previously defined rule meet
) fits.


I can not find the entire Language OMeta
explain, but only to stimulate their studies. The above statements summarize key parts of Warth's thesis. Who wants to learn more: they have
    http://www.tinlizzie.org/ometa/
    .
  • least I still want a small show in the scene of the "compiler design" favorite example: a "desktop calculator". This concrete calculator can even work with variables, which shows the way that you can build with OMeta also stateful parser. On my test page
    reach its definition by selecting
     Calculator 
    in the list of available grammars. This example is the dissertation of Warth removed. I will discuss briefly here.

    The first line
     
    ometa Calc
    a new grammar (a new transformation, a new parser, a new OMeta object) is declared. In this case, it will inherit from the built-in grammar parser
    . This built-in class currently contains only one basic parser functionality - namely, a token rule, can be identified with the space-separated string. This token
    rule is automatically highlighted in all of

  • parser inheriting grammar definitions included in the string converted commas. More you do not get through this inheritance.
  • The next line
    var = letter spaces: x -> x,

  • shows the typical syntax of a production rule in OMeta. The name of the rule is followed by an equal sign their definition, and by definition can, with an arrow
  • - separated> , a semantic action
    be specified. A semantic action is listed in the code of the host language and will be evaluated for a recognized pattern. The result of the evaluation is the return value of the so-called
  • matchall ()
    method with which you can then call the parser.

  • In this case we have a rule
     var 
    detection of variable names. First, specify that spaces should be ignored just before a variable name. This is achieved with the built-in rule
    spaces, which recognizes "zero or more spaces." Next comes the actual determination of what is to be recognized as a variable: variables should be single letter in our calculator. For this purpose, we use the built-in rule-based OMeta
    letter. After the colon, then followed by a variable name that contains in the successful application of the rule evaluation result of the semantic action (or, if no semantic action is recognized as fitting the part of the input). These variables that are assigned during parsing, then you can in the semantic Action draw - as here. We determine that the return value of the rule is exactly the recognized character.

    A simpler way would be completely equivalent formulation

    var = letter spaces

  • But we do finally learn how OMeta works, and this is the first version better.
  • sets the following variables according to the rule determine the permitted numbers - positive whole numbers: num = num: digit n: d -> (n * 10 + d * 1) The declaration of the alternatives. We also learn that even parts of a rule is already a semantic action, may be assigned. The first part of the rule also contains the already discussed left recursion.
     This rule could have been equivalent to write again: 

    digit num = +: d -> (1 * d.join ('')),
     new here is the quantifier <= c && c <= y) -> + 
    with the same semantics as in regular expressions . Enriched with the Quantifier
    + or *
    expression always evaluates to an array with the individual hits as elements. The array, we can by in the semantic action the method
     join () 
    the JavaScript Array class
    zusammenspleissen to a string, and finally to force by multiplying by 1 (type coercion) in the conversion of the numeric data type. This variant usually
    num
    is certainly instructive.

  • Now follow the
  • primary expressions : Entering a variable name will return the contents of the input of a number of strings is said to have just that number to answer, and complex expressions are intended to be clamped: primaryExpr = spaces var: x -> self . vars [x] ")" -> R, new here is the access to the variable self.vars to initialize in a special, in the so-called Parserinstanziierung
    ()
     method is defined as an empty hash and us as a container ( more precisely, serves as a symbol table) for the variables entered in the calculator website. 

    There are now the multiplication and addition rules: mulExpr = mulExpr: x "*" primaryExpr: y -> (x * y)
    mulExpr: y -> (x + y)
      be encoded. 

    The addExpr is thus more general than
    mulExpr
     and more general than the 
    primaryExpr
    . You latter contains as special cases. The following rule = expr var: x "=" expr: r -> (self.vars [x] = r)
    Expression should be output.

  • doit = (expr: r) * spaces end -> r


follows Here - outside the OMeta grammar that already mentioned initialize () method by which the computer is put into the initial state: Calc.initialize = function () {this.vars = {};}

In my "Workbench" I can now rule on the input doit

x = 1 y = 2 x + y
 get and apply the output <: Parser {

3. This is because the doit rule several expressions separated by blank space identifies and evaluates. I would not have three Entries can be made in sequence: First x = 1 then y = 2

and finally
 x + y 

Even then I would get 3 the output. The reason is that my "workbench" in each dialog step with the same Parserinstanz works and has noticed so all variable assignments already made in the symbol table vars . It's just a stateful parser - and with this property is also suitable for OMeta REPL Shells (
read-evaluate-print
loops). You might want to OMeta my workbench in my OMeta implemented XML parser View: A well-read in my view, only 42 lines of code allows the transformation of an XML document into a JavaScript object modeled tree. These are the variables, with which one can work in OMeta, it is also one of the issues with which the Viewpoints Research Institute is taken up, developed under the roof also OMeta was: To how many orders of magnitude can consist of source code with the use of appropriate, possible expressive programming environments will be reduced to still achieve that for which it now uses computer (word processing, graphics, Internet, etc.)?

This may be a first insight into a very interesting parser Comply with the I can only recommend to closer study. The fields, around the area of domain-specific languages (DSL) seem to me to be very promising. The language is compact and expressive. Its powerful features, such as object orientation, and parameterized rules of recursion is to thank that grammars can be written much more elegantly than previous tools of this kind
 


[1] Thus, in Thomas Stahl, Markus Volter , Sven Efftinge, Arno Haase:
Model-Driven Software Development
, 2 Dpunkt edition, Verlag, Heidelberg 2007th
 Jan Köhnlein and Sebastian Zarnekow, 
Xtext practice
, eclipse-Magazin 1.2010, p. 50
[2] The following ideas of the thesis by Alessandro Warth Experimenting with Programming Languages are removed.
[3] It is, however, even without the visitor design pattern, which unfortunately is intrusive and in the implementation of a certain awkwardness attached (as I have shown in my blog

).
 [4] Here, the application of a method m is 

of the object o with the argument array [args ...] by the construct [APPLY, o, m, [args ...]] modeled.

Friday, November 19, 2010

Verginity Loss Vedios

hit and run - Part 1: Wait duty

When can I remove a road accident?

measured how long is generally a waiting obligation?

each party in an accident, that is, anyone whose conduct has contributed regardless of its fault for causing an accident, is under an obligation to passive observation. If there are no finding people willing to at the scene, first meets the mere waiting. While you can visit neighbors or other residents, but are not obligated to (OLG Stuttgart VRS 73, 191).
is a reasonable waiting time depends on the circumstances of the case, especially on the severity of the accident, time of day, weather conditions and the question of when to expect to identify previously persons. Therefore, the waiting time for example at night accident on the highway are clearly shorter than the death rate in urban areas. Otherwise, for the length of waiting time to the expected damage amount must be removed. In general, a wait is minutes from at least 30. recommended as the accident cause the level of damage usually can not appreciate real. To shorten the waiting time can of course be notified the police immediately. But they do not hit and run penalty if they are taken to the hospital or by the police for blood sample (OLG Köln VRS 57, 406).

When is before a bagatelle or insignificant damage?
This question is difficult to answer. An insignificant loss is usually present when no civil damage claims can be made. However, the same applies here, that caused the accident may never be completely error-free set the amount of loss or damage has been underestimated. The exact extent of accidents can only be determined by using tests of automotive expert. It is therefore not recommended to carry out its own "failure analysis". They meet a certain qualifying period, are On the safe side.

I am committed to dates and have no time to observe the waiting period. What can I do?
Even in the case of an important business appointment, subject to the control room duty. It is often assumed that leave the business card / AG Kiel, Judgement of 07.08.2002) or a slip enough with the personal. However, this is a common mistake, since it is never sure whether the statement the accident opponent achieved. This is true even for minor damage.

May the victims urge to await the arrival of the police?
The § 142 of the Criminal Code is to ensure the victim's civil claims against you. According to § 142 I StGB they must allow findings to you, your vehicle and the nature of their involvement in the accident. Do you have all necessary information to settle claims made, you may not remove, in principle, from the accident. The arrival of the police is to be seen only when an additional evidence interest (eg the driver is drunk).


About the author: Thomas Brunow lawyer is legal counsel of the Volkswagen - Audi Dealers Association of Traffic Law Traffic Law and member of the consortium in Berlin. Attorney Thomas Brunow helps victims and those affected by road accidents on traffic violations quickly and efficiently.
Tel: 030 / 226 35 71 13
lawyer Thomas Brunow is a partner of the firm Prof. Dr. string & Partner Berlin





Clearance Above Recessed

hit and run - meaning and consequences of speeding


What is a hit and run?


In this series, we inform patients and injured on the meaning and consequences of a hit and run. According to the traffic reports from various police every second of hit and run case is resolved. In this case, the accident flight, the approach taken in most criminal traffic offense dar.

Basics:
When leaving a parking space, maneuvering, or even in moving traffic, there are always accidents. So that any insurance or civil legal issues can be resolved, must identify the perpetrator and the victim together the damage to the vehicle. All too often the perpetrator to commit a hit and run in order to remain undetected and do not stand up for the costly repairs to have to.

achieve with this action but they the criminal offense of unauthorized leave from the scene of an accident pursuant to § 142 StGB. Accordingly, the one who makes a criminal offense, which is removed as a participant in a traffic accident from the scene before the other party in an accident to determine his personal or his vehicle has allowed or maintained in the circumstances of the accident has reasonable time.

Removes the accident but the cause of the accident, after he has been waiting a while, he must make the findings immediately afterwards. The hit and run not only attracts harsh consequences in the area of criminal law and the offenses for themselves, but also has an impact on the insurance benefits of the hull and liability insurance. The driver is a fugitive threatened imprisonment or a fine and possibly a ban, in certain circumstances must he even lose the license.

Therefore, it important to know how to behave in the event of an accident the law. This applies particularly to the questions on the length of waiting time, the manner of determining the identity and the event that you have not noticed the accident.

Part 1 deals with the duty of the waiting involved in the accident.

About the author: Thomas Brunow lawyer is legal counsel of the Volkswagen - Audi Dealers Association of Traffic Law Traffic Law and member of the consortium in Berlin. Attorney Thomas Brunow helps victims and those affected by road accidents on traffic violations quickly and efficiently.

Tel: 030 / 226 35 71 13
lawyer Thomas Brunow is a partner of the firm Prof. Dr. string & Partner Berlin

Thursday, November 18, 2010

Filmy. Sk Online Zdarma

- negligence or intent

speeding - Negligence or intent

The question of whether a speed violation is committed intentionally or negligently, plays a crucial role in determining the amount of the fine.

According to § 3 para 4 a the fine catalog-regulation: a fact of Section I of the fine catalog is intentionally caused for which a set of rules is provided by more than 35 €, then the rule set is given there to double ...

The Federal Council justified this change with the increase of traffic safety by improving the general and specific deterrence, greater differentiation in the prosecution of traffic offenses, depending on their culpability.

In practice, however, it is not so easy to determine whether the speed violation was committed intentionally or negligently. The authorities make it just fine in the rule and provide only for the established speed from.

The case law is overwhelmingly on the idea that the amount of detected speeding alone in committing an intentional can not be justified. Only based on local conditions can be combined with other circumstances, which include the speed at which to draw conclusions on the existence of intent or negligence.

cases from the case:

If the person concerned the permissible speed exceeded by more than 100% has to assume it is intentional. If the violation in a recognizable site area occurred, you need a mistake to overlook the speed limit does not discuss becoming (OLG Celle Dec. of 25 August 2005)

A resolution adopted is not objectionable if the speed limit of 100 km / h was exceeded on a main road by 57 km / hr. At a speed exceeding this size is already due to the visual impact of the environment during the trip possible that the driver is not aware. This applies even if found Is that the vehicle has developed this significant noise (OLG Hamm Dec. of 14 July 2008)

With three violations in a short time despite adequate signage is also speeding 13-19 km / h of intent be considered . The violations, however, are in such a case to be considered as concomitance ( OLG Jena decision of 29.10.2007).

to shake the accusation is not enough even to make known, to have overlooked the signs for simple negligence. Required is, of course, that the driver - Has complied with relevant speed limit - the rate-limiting without the signs. Thus in the case hard to see to it at a gross breach of duty no drivers to load, if it already exceeds the allowed maximum speed without traffic signals. This is usually sufficient even minor transgressions. (Example: drivers driving in a 30 - urban area with 55 km / h).

About the author: Thomas Brunow lawyer is legal counsel of the Volkswagen - Audi Dealers Association of Traffic Law and member of the consortium Traffic Law in Berlin. Attorney Thomas Brunow helps victims and those affected by road accidents on traffic violations quickly and efficiently.
Tel: 030 / 226 35 71 13
lawyer Thomas Brunow is a partner Registry Prof. Dr. string & Partner Berlin