Friday, October 29, 2010
Have A Merino Wool Sweater Too Big Can I Shrink
Wednesday, October 27, 2010
Roller Skate And Party Decorations
Stern TV focused on 27 October 2010 with the theme of false measurements of radar equipment. The experience of our firm with the speed measurements were confirmed. The expert put it his own experience (5000 files fine verified) is, and concluded that with more than half of the processes of proof in the case was correct.
Common mistakes are already filled with incorrect measurement reports. Some photos are missing. Purely formal errors that the test result should not affect as such - as the experts - about 25% of the audited Act have been fulfilled. Here, more often lacked such certificates and certificates of training of officials. Fewer than a fifth of the files examined was completely accurate.
shows the result of his investigation, that there is always problems with velocity measurements. Due to the mass of each measurement method is not reviewed in advance by the competent authority. Certainly would - eliminated some procedures, without there would be a fine process - where conscientious examination. Since, however, defends only a small part of the affected motorists will also only limited value on an extensive review of the results (for cost reasons).
The expert makes it clear that the transition from his experience in court is worth quite. However, sufferers should no traffic insurance on financial risk be aware of. Here, the prosecutor will explain, however, at an early stage.
Even in our daily working mandate, we very often finds that results are vulnerable. Most recently, the measurement results with the device ES 3.0 was found to be error-prone. But in particular, the measurements with the laser measuring device Riegl often appear to be defective. This does, however, to the faulty operation by the measuring officials.
Autograph Seriennummer
Simple Transformations (ST) are a wonderful and efficient way ABAP data in XML documents and transform back. They are conceptually two-way, making it ideal for serialization and deserialization suitable - and also they are able to observe how we, highly efficient. If once you have become incorporated into the concept, they are also really simple
, as the name promises, that is easy to implement.
Thanks to the simple transformations, we have succeeded, an unreliable component of our XI system (the JDBC adapter) with a stable running to replace ABAP programmed adapter, which is exactly about his work in the job log accountable and on top of a much better throughput than the previous solution.
We have a remote database, in the fed throughout the day from different sources always new "Messages" (value of goods and factors). To read this and supply the Java classes mapping to further processing, we've been using the supplied by SAP called
JDBC Adapter: Quite suddenly, he is every now and then his work is a complete - without giving nor any sign of life, but even without that the process breaks happens in the middle of a processing simply nothing more.
, according to the description would be exactly suited for this task. Unfortunately, this adapter (in our system) a vulnerability, which could not resolve despite intensive efforts - he suffers to some extent under
narcolepsy
As the incoming messages are time critical, this has repeatedly led to extra maintenance. It had monitoring programs are written to ensure the timely processing of the messages. The wrong time (something always happens the wrong time!) Our support with SMS alarm was out of bed because it was once again permitted. The manual workaround to the JDBC Adapter to get back to work was, then, is to define a second, identically configured channel and switch to it.
The JDBC adapter Unfortunately for us, a "black box". That's the problem with the Java components provided by SAP (not the Java language itself - is the great language Java). We can use the SAP Java components do not study how an ABAP program to draw our own conclusions. [1] We can fix the no fishing circuit to locate these spontaneously occurring errors in more detail. We are forced to addressieren
any problem to the support of SAP. SAP had no response even close to our problem and had the OSS reports, because the problem's not reproducible.
We have therefore decided, this JDBC adapter from the XI input process eliminated and replaced by a programmed in ABAP component that ultimately called
Plain Adapter
used. This is a the ABAP side ICF Offeree REST-like HTTP Service (accessed through
/ sap / xi / adapter_plain
). In the body of the HTTP request from the Plain adapter expects the XML document in the form in which it is finally processed by the XI mapping. It extends that document them on to the XI mapping layer.
The intrinsically programmed component A started at regular intervals job that the data from the remote database into internal tables reads, transforms the ABAP data to an XML document - this is the place to come where the simple transformations are used - and the XML document passes finally an "internal" HTTP request to the Plain Adapter [2]
In a (typical) job run. , 403 messages with a total of 125 254 notification items processed in 123 seconds. This means a rate of about 1 millisecond per item. This includes reading the position of the database, the mapping of messages in an XML document, and finally the processing in the "Plain Adapter". These are wonderful times! The following chart shows how divided the duration of a typical job run on these steps:
For marshaling , ie the conversion of the ABAP data to an XML document, only 12 of the 125 seconds were needed. The XML conversion, including a step-Prepare in ABAP, in which the data for the transformation can be suitably prepared, ie 10 detail records creates per millisecond. This is more than satisfactory.
It makes sense to implement before the actual call to the ST a preliminary step in which the data for accessing the ST are suitably prepared. Simple transformations are not only easy to understand, they should also be easily designed. For the more simple a Simple transformation unit, the more efficient they will. In this case, the ST produces a sequence of elements ("lines"), each containing data from head and position. The appropriate data structure for this is an internal table with a deep line type: Each line represents one message and the component detail of the line itself is an inter-table containing the items. For nested structures is the increased memory requirements must be ensured. A rough calculation showed us, however, that the main memory is sufficient for the required volume of data for very large messages yet. Moreover, it is indeed only an auxiliary table with extremely short life - she works as a local field "on the stack "and is just broken down in the method and who performs the simple transformation: [3]
* Header / Detail in Table represent a deep line structure loop at it_header assigning \u0026lt;ls_header>
ls_meldung clear..move-corresponding to \u0026lt;ls_header> ls_meldung
loop at it_detail assigning \u0026lt;ls_detail> where sender = senders and \u0026lt;ls_header> meldungs_id = \u0026lt;ls_header>-meldungs_id and meldungs_datum = \u0026lt;ls_header>. - meldungs_datum partition_knoten and
= \u0026lt;ls_header>-And
partition_knoten partition_tag = \u0026lt;ls_header>-partition_tag. Insert into table\u0026lt;ls_detail> ls_meldung-detail.
endloop. ls_meldung insert into table lt_meldungen. endloop.
Calling the transformation is then very simple:
* specific message in XML transformcall transformation (gv_transformation)
source messages = lt_meldungen
result xml ev_xml.
The transformation is called dynamically, we have for each message type, a simple transformation. The previously prepared Message table is passed as source - the result document is received in the parameter ev_xml type xstring (it could string a or an object of type
if_ixml_document be - the transformation automatically detects the expected type). The Simple transformation itself is really simple: After determining the reference data object using \u0026lt;tt:root> the messages with a nested
\u0026lt;tt:loop>
processed. In the inner loop, finally produced the results row by the corresponding source fields from message header or message Position be incorporated into the desired target field by the mapping.
Here is a typical example (we have about a dozen such transformations, and they all look similar):
\u0026lt;? Sap.transform.simple> \u0026lt;- Automatically generated transformation!. Please make adjustments only to the template
(XSLT transformation ZGDBW_TO_XI_CREATE) -> \u0026lt;tt:transform xmlns:tt="http://www.sap.com/transformation-templates"> \u0026lt;tt: root name = "MESSAGES" />
\u0026lt;tt:template> \u0026lt;ns:MT_MVN_DESADV2500 xmlns:ns="http://migros.ch/xi/DESADV2500"> \u0026lt;tt:loop ref=".MELDUNGEN" name="header">
\u0026lt;tt:loop ref="DETAIL"> \u0026lt;row> \u0026lt;sender>
\u0026lt;tt: ref value = "$ header.ABSENDER "/> \u0026lt;/ SENDER> \u0026lt;MELDUNGS_ID> \u0026lt;tt:value ref="$header.MELDUNGS_ID"/> \u0026lt;/ MELDUNGS_ID> (... more header fields ...) \u0026lt;FELD_1> \u0026lt;tt:value ref="FELD_1 "/> \u0026lt;/ Field_1 >
What do you mean "automatically generated"? Another strong advantage of simple transformations (like XSLT transformations) is that it is an easy-to-use API to create a transformation in the repository are - the class CL_O2_API_XSLTDESC . This came to us in our situation very opposite: things like the namespace of the target document and the actually extracting fields namely vary depending on the type of message. We have therefore provided a simple customizing table in which we specify for each message type these differences. A report Z_REGENERATE_ST expands this customizing table provided for all ST-transformations (which he himself used an XSLT transformation). These will be called dynamically. This approach has the advantage that the transformations are as simple and very fast. Also has a transformation in the repository maintained the advantage that it is buffered in operation in the main memory of the server - which speeds up their execution even more.
[1] Although there is next to the disassembler javap
excellent Java Decompiler with exciting user interfaces, such as
jd-gui . However, it is inconvenient to have to decompile a program first, to understand its logic and modify it if necessary. With the increasing in the industry, small-mindedness is also increased with the use of byte-darkening (obfuscation) is expected to complicate the readability of the code continue to decompile.
[2] This is done by means of an internal
HTTP requests - ie, the block HTTP_DISPATCH_REQUEST appears in its own call stack, the request is not processed in a separate task. In particular, the processing of requests is thus synchronous necessarily: If the job has finished, all reports have passed the Plain adapter.
[3] We have a loop through a table of N entering that contains a loop on a second table with N * M entries. This could result in a problem. So here there are no quadratic effects, the position table may not be a standard table. In our case, both tables are sorted. The inner loop with Where condition implicitly uses the sorting order according to the table key, so that there is no performance problem. A - a little more efficient - alternative was to start with the loop at
it_detail
(no WHERE clause) and by
- at the new
-
read head data when switching to a new report. But, as we see the times, is not critical "marshaling Prepare" step in and this form.
Tuesday, October 26, 2010
Kidde Carbon Monoxide Detector Err
Monday, October 25, 2010
Complete Afleveringen Operation Repo
Tuesday, October 19, 2010
Lindsey Dawn Mckenzey Peeing
Wednesday, October 13, 2010
Milena Velba And Nadine Jansen Online
After earlier this year reported the obsolete software for the ES 3.0 (formerly AG casting), the problem seems to be widely fixed. However, it is precisely in this gauge temporarily continue to incorrect measurements. The result: the matter.
... to the appeal of your clients from 16.08.2010, after examination of the substantive and the law stated that the issue is cleared up sufficiently and your client has caused the offense of misdemeanor unlawful and reprehensible. The measurement was carried out by trained personnel with calibrated measuring equipment ...
... This instrument is driven by the measured vehicle speed at the fact that the vehicle several light barriers in the amount of the sensor head passes through the meter. The sensor head is positioned parallel to the road and from the right angle to the road running light barriers results in the measurement line (in height sensor head center). The so-called "Photo Line" be 3 m is seen behind the measuring line from the direction of the measured vehicle.
The ES 3.0 meter off after a detected speed violation, the photo documentation from initial delay. The photo line, which is about 3 feet back from the measuring line, and adapting it to the camera, should therefore ensure that the measured vehicle is clearly documented in photographs.
This allows a clear assignment the measurement of a vehicle when several vehicles pass at a short distance from the measuring line. The vehicle is then measured in the so-called "logical picture position." This is clear from the photo line, the position of the vehicles shown and the measured speed.
The review of the logical picture position can thus be determined not only to map what vehicle if a speeding, but also based on the vehicle position relative to the photo line, whether the determined by the meter rate is locked.
In the instruction manual for the meter ES 3.0 states
"[.. 18.2.3 photo line
for a reliable evaluation is a photo documentation of the line the measurement site is required.
The photo line is an imaginary line across the road and about 3 m in driving direction behind the sensor head (sensor head center )....
Tuesday, October 12, 2010
Make A Dog's Stool Harder
Anyone following a road accident give up his car during the repair needs, you can either claim the cost of a car or so-called loss of use. the repair but drawn out over several months, the victim may be required to purchase an interim vehicle when are predictably much lower than the cost for this car costs or loss of use damages. If the victim for the purchase of a replacement vehicle is not in a financial situation, he has the party in the accident or its liability insurance to point out and demand an appropriate advance payment.
Card Reader Model Rb-539
- if the victim is not repaired, it receives only the replacement value minus residual value
- If the injured part repaired, then he also receives only the replacement value less residual value. For specific billing, however, to the replacement value.
- if the victim fully and properly repaired, it receives the full cost of repairs. Here, the vehicle must be 6 months will continue to be used. (The Supreme Court (BGH VersR 09, 128), provide for the six - month period but no due date required).
If a vehicle as part of the 130% - should be fixed limit to be placed high demands. It is usually referred to in the opinion of the repair pathway mandatory. Extras result here, if it is found only during the repair, that the 130% limit is exceeded.
- if the victim his car repaired is not (because roadworthy), he the repair costs to replacement value, unless he sold it within six months. Then his claim reduced to the replacement cost less residual value.
- if the victim partially repaired (quality does not matter), then he gets the repair costs to replacement value. Without proof (notional billing), he again has the holding period of six months.
- If the victim can be subject vehicle repair and properly, he will receive the repair costs to replacement value. Continued use is then not necessary. This also applies to a self-service.
Saturday, October 9, 2010
Birthday Cakes Of Bicycles
The situation is elementary and is often the case: Any tabular data - for example, the booking of an account - are using a Web application are maintained. Nevertheless, I have found after an initial screening no suitable software for this simplest use case [1].
Specifically, an application for table maintenance
the table data from the server operating
the user to view and care,
affect cell, delete entire rows or add new rows
and finally those changes secure can
which they are written back to the server.
How to design such an application? Sure once you need a physical picture of the table, the be deposited somewhere in the file system needs. On the other hand, it requires a presentation layer (GUI) to display the table to the user and offer him to change. For Web applications, the presentation layer is generally from HTML pages.
Between these two extremes - GUI and file system - are essentially two software components that work together in such an application: A Persistenzkomponente, which is responsible for ensuring that the data exists on the user's session also. And a change in administration, which logs the changes of the user and a user selected point on the Persistenzkomponente passes. inspired
to the jargon of the database programmer, the table is the application in two forms: as
Before Image
it represents the state of data before the user gets to see and manipulate (with the
Image
The maintenance screen meant, to which the user can change the data). The After-Image
therefore modeled the changes that the user has made to the data. From the comparison of
Before Image
the after-image is a series of
insert
-
update
-
and delete operations
derived that must be made to the table.
If the table comes from the server, it is the Before-Image dar. These data are presented, the client in a form that allows the user to change easily. Besides presenting the client manages the user-made changes. The client knows at any time, whether and what changes were made. can really only if changes were made, one needs to offer the user a
Save button, which he just made the changes, "commit" means continuing to write the persistence layer.
Here is my example implementation [2]:
http://www.ruediger-plantiko.net/konto
The application consists of a single HTML page. Client-side logic is shown with JavaScript. Communication with the server via Ajax, which is used as a structure for data exchange in both directions, the JavaScript data format JSON. The HTML page is dynamically manipulated using JavaScript. On the server side receives a Perl CGI program under the request, a query parameter names action tells the server what to do it. For example, shares the URL / cgi-bin/konto.pl action = get_all with the program
konto.pl
that all line items into it from the account file and send the client in JSON format should. In contrast, a second action shares called save
/ cgi-bin/konto.pl? Action = save with
the server that the belly of the HTTP request is a JSON hash of row data to be updated in the account file. He recognized these changes and then sends the client as
get_all
the updated image of the file (again in JSON format). Only these two
action
s are the way required.
The two layers communicate only through this interface and are otherwise completely independent. This means, for example: Instead of using CGI Perl on the request could be also deal with any other technology. In my implementation, the interface between the systems at the same time the interface between the two mentioned software components: The server manages the persistence, while management is the change to the client.
The special features of this implementation is that the data on the client bookings only in the dynamic table
are kept - which is exactly the table that the user sees. There is no picture of this extra data, such as a global array. Similarly with the change management: There is no global flag
data loss
. If the user makes changes to this for him visibly marked in the table as amended. There is no global flag, but a function
data loss ()
that looks easy, whether cells are marked as changed.
But let's start with the data format. I've thought of a simple CSV-like format. You can use comment lines and blank lines. They remain on updates and ignore the rest. Comment lines begin as Perl, with the pound sign (#
). Furthermore, should there be in addition to the entry lines, other lines in the file that could be inserted manually or by another program. For example, a cron job could periodically check the account balance and paste it as a real balance in the file. Our program is designed to reproduce all these lines, but ignore for their own processing.
This can be set up so that the first column in the CSV format, an ID representing the set. This ID for which alone can be taken into account line items have the prefix
book, while other lines have different prefixes. Balance lines for example, could have the prefix
net
initiated IDs. The file can be the following example:
# withdrawals buch1; 01/09/2010; 150.00, Norbert; Fee "Modern JavaScript" buch2, 09.10.2010, 605.00, Petra; Flight to Florence, rental car, accommodation buch3, 09.23.2010, 200.00; Norbert; Donate to Wikipedia
balance1; 09/30/2010; 15362.00
buch4, 10.03.2010, 350.00, Petra; New Smartphone
If, after the table maintenance application is called the Web, given the competent Perl class CsvTableMaintainer
the command to load all line items (
action = get_all ). The above example file is transformed into the following JSON object: { reservations: [ ["buch1", "01/09/2010", "150.00", "Norbert", "Course fee \\" Modern JavaScript \\ ""],
["buch2", "10/09/2010", "605.00", "Petra", "Flight Florence, car, night "],
[" buch3 "," 23/09/2010 "," 200.00 "," Norbert "," donation to Wikipedia "], [" buch4 "," 10/03/2010 "," 350.00 "," Petra "," New Smartphone "] ] user:" Petra, " msg:" "
This hash is now in the browser by the JavaScript function
update page () is received
this. first transmits the user under which the notification is made, in an intended field (unless it is to be displayed, you can set this field to invisible). For every other element of the hash is a function
\u0026lt;key> _update (\u0026lt; ; value>)
called with the key and
- \u0026lt;key>
- \u0026lt;value>
the value of this entry means - if a function exists with this name. If not, - \u0026lt;key>
is simply the ID of an element in the HTML DOM considered to replace its contents with - \u0026lt;value>
is. Finally, the hourglass-graph is set to invisible, which indicated the user the server activity: - / / --- After the return of an Ajax-Requests: side
update function update page (transport) { - / / transport parameters is The Ajax object (ultimately XMLHttpRequest)
var id, newCode;
/ / The user first upgrade
if (newCode.user) {
user_update (newCode.user);
delete newCode.user;}
for (id in newCode) {/ / either with a special method, if implemented ... if (typeof self [id + "_update"] == "function") { self [id + "_update"] (newCode [id]);} / / ... or simply by replacing the HTML content else {$ (id) update (newCode [id]);. reset}} / / Load state $ ("loading") hide ();. }
For the key
reservations there is a designated function buchungen_update ()
, which therefore is the array of line items called. It gets passed an array of arrays (AoA), so it can access any cell of each row. It passes through the cells to be displayed in a nested
each ()
loop and builds each
\u0026lt;tr> - and \u0026lt;td>
elements in the HTML table. The registration of users have also made reservations yet another cell that control cell
with Icons to modify, and delete rows. These must all be made more sensitive click by the doOnClick ()
registered for the event click
is. Finally, the button is hidden for safety: always go through when this feature is, the table contains the pure database state. A backup is therefore unnecessary: / / --- From the server as an array of array (AoA) sent line items / / to HTML take
buchungen_update function (rows) {var tbody = $ ("reservations"). down ("tbody");. var user = $ ("user") innerHTML; tbody.update ("");
was controlling cell code = control (cell);
rows.each (function (cell) { where ROWID = cells.shift (); each row = new Element ("tr", {id: ROWID}); cell . EACH (function (cell data, index) {row.appendChild (
new Element ("td", {className: "c" + (index +1)}) . update (cell data)); }); row.appendChild (
new Element ("td",
{className: "c5"}). update (
(cell [2] == user)? control cell code: ""));
tbody.appendChild (row) ; }); $ ("booking") show ();. / / All the pictures in the book table reservations click sensitive $$("# img ") each (function (img) {img.observe
(. "click", doOnClick);
}); / / database state - Backup is unnecessary
$ ("save") hide ();
} When the user "change" or "New Entry". click to open a form region to maintain a single table row. This form is really only for editing, it is never sent. For locking the user presses the button on the form region "Apply". Then closes the form, and the amended or new cell contents are entered in the table and receive a mark in the form of the CSS class
changed. This mark indicates to the user as well as the program that these fields are different from the database level.
Since the function data loss ()deleted or contains any cell with the CSS class
responsive now is available to back up the button. This is the function
check data loss ()
responsible, that is called after all operations, potentially leading to data changes. This in turn calls to the aforementioned function
data loss ()
to change the status by inspection of the table to determine. This can be formulated with the Prototype framework is very compact. The four terms of the function read like this: check to see if there is any real data line of the reservation table that holds either row-level, the CSS class
changed. Since the functions used any () and down () short-circuit, ie, stop the iteration after the first discovery, the implementation of the method
data loss ()
not only short but also efficient:data loss function () {return $
/ / - - Save button to offer only if data has changed
data loss function check () {$
("save") style.display. = Data loss ()? "Inline": "none";}
/ / --- Determine if data has changed
("booking") down ("tbody")..
select ("tr") any (function (row) {return row.hasClassName ("deleted") ID starts with the prefix new ) are treated the same as this modified line: The line data is added as part of the ID data in the hash. passed for deleted rows, the special keyword deleted as the data part. If the user Petra in the above example, the line buch2 deletes the amount of the line buch4 From 350.00 CHF to 400.00 CHF changes and inserts a new row to capture their Hanover hotel bill, sees the server to the passed hash follows from : { buch2 "deleted",
buch4: 03/10/2010; 400.00, Petra; new smartphone, "
new1: 10/09/2010; 100.00; night Hannover
}strict;
The server receives this JSON hash in the body of the HTTP request, together with the value
save for the URL parameter action
. It evaluates the hash and translates it into instructions to change the . data files also will be awarded for newly created lines of a final ID Finally, he gives -. returns the current state of the line items to the client [3]
The entry point for all internal, from the website - such as the command
get_all
. using Ajax remote requests is the CGI-Perl program
konto.pl
. It evaluates the URL parameter action
. How does it do that? The CGI mechanism is very simple: the query part of a URL is provided to the called program in the form of environment variables. The body of the request can be read from standard input and all output to standard output form the body of the HTTP response. The program
konto.pl
therefore extracted the value of
action from the query string of the URL and then calls dynamically to the sub-program of that name. ! Here's how:
# W: / perl / bin / perl.exe
# CGI Perl request handler that use the account maintenance page communicates
use warnings;
no strict 'refs'; use CsvTableMaintainer; # Table maintenance class use MiniJSON; # Required Perl JSON conversions # URL Query String my $ QueryString = $ ENV {"QUERY_STRING"} ... } sub save { ... }
As you can see,
konto.pl
is the dispatcher who receives the requests and calls the appropriate subroutines.
konto.pl
is narrow and has few subroutines - usually only the
action
s related programs. It is noteworthy that for simple tasks such as these no
use CGI:: \u0026lt;something>
is necessary: Read query parameters and access the payload of the incoming and outgoing HTTP message is in CGI so simple that no further Aid packages are necessary.
konto.pl
is of course also very narrow, because it delegates the actual tasks to the class
CsvTableMaintainer
and to a smaller part of the package
MiniJSON
. These program parts are - like all others, for this example required parts of the program - in my github
-Reposoritory
account. If you take the example application will therefore consider in more detail we refer to this repository.
[1] Perhaps I was not looking hard enough or was not satisfied with the found objects.
[2] In addition to the JavaScript framework Prototype by Sam Stephenso that supported me, read JavaScript to write, I use the Date Picker
by Hugo Ortega Fernandez. And - yes, I like the SAP icons!
avoided [3] To Codeduplizierung, he calls for the design of securing the action simply
get_all
on.
Friday, October 8, 2010
Gel Detergent Cascade
A " Zip code radius search allows "the selection of records within any radius around a given zip code.
Many websites use this technique to your users with the opportunity to search results only from your vicinity (eg 50 km) display a value.
are typically used in the store search (Dealer Locator) or dating sites, real estate portals, on / or sale classifieds and auction sites like Ebay.
This requires is a database of all postal codes and the associated geo-coordinates (longitude / latitude).
Furthermore you need a script that performs the necessary calculation and the calculated eligible postcodes.
The distance calculation on a spherical surface (ground) between two points is called Orthodromie and is given by:
Distance (A, B) = 6371 * ACos (cos (lata) * cos (LatB) * Cos (LngB - Inga) + sin (lata) * Sin (LatB))
The result is the distance between point A and point B in kilometers.
see Below A form based on PHP and MySQL script that implements this calculation:
/ / Form
\u0026lt;form action = "\u0026lt;php echo $ _SERVER ['PHP_SELF'],>?" Method = "get">
\u0026lt;input type = "text" name = "postcode" value = "\u0026lt;php echo $ _GET ['postcode'];?>" maxlength = "5" /> \u0026lt;br />
\u0026lt; ; input type = "text" name = "distance" value = "\u0026lt;php echo $ _GET ['distance'];?>" maxlength = "5" /> \u0026lt;br />
\u0026lt;input type = "submit" name = "search" value = "Search" />
</form>
// PHP-Code
<?php
if(isset($_GET['Search']))
{
$zipcode = $_GET['postcode'];
$distance = $_GET['distance'];
$conn = mysql_connect('127.0.0.1', 'root', '') or die('db connect error: ' . mysql_error());
mysql_select_db('igonow', $conn) or die('could not select database');
$sqlstring = "SELECT * FROM geodb WHERE postcode = '".$zipcode."'";
$result = mysql_query($sqlstring);
$row = mysql_fetch_assoc($result);
$lng = $row["longitude"] / 180 * M_PI;
$lat = $row["latitude"] / 180 * M_PI;
mysql_free_result($result);
$sqlstring2 = "SELECT DISTINCT geodb.postcode,geodb.place,(6367.41*SQRT(2*(1-cos(RADIANS(geodb.latitude))*cos(".$lat.")*(sin(RADIANS(geodb.longitude))*sin(".$lng.")+cos(RADIANS(geodb.longitude))*cos(".$lng."))-sin(RADIANS(geodb.latitude))* sin(".$lat.")))) AS Distance FROM geodb AS geodb WHERE (6367.41*SQRT(2*(1-cos(RADIANS(geodb.latitude))*cos(".$lat.")*(sin(RADIANS(geodb.longitude))*sin(".$lng.")+cos(RADIANS(geodb.longitude))*cos(".$lng."))-sin(RADIANS(geodb.latitude))*sin(".$lat."))) \u0026lt;= '". $ Distance."') ORDER BY distance ";
$ Result = mysql_query ($ sqlstring2) or die ('Failed query:'. Mysql_error ());
$ str =" \u0026lt;table width = \\ "300 \\" border = \\ "0 \\" cellspacing = \\ "0 \\" cellpadding = \\ "0 \\"> ";
$ str .=" \u0026lt;tr> "
$ str .=" \u0026lt;th> postcode \u0026lt;/ th> ";
$ str .=" \u0026lt;th> Town \u0026lt;/ th> ";
$ str .=" \u0026lt;th> Distance \u0026lt;/ th> ";
$ str .= "\u0026lt;/ tr>";
while ($ row = mysql_fetch_array ($ result, MYSQL_ASSOC)) {
$ str .= "\u0026lt;td>. $ row ['postcode "]."\u0026lt;/ ToString .. $ row ['place "]."\u0026lt;/ ToString round ($ row [' Distance'])." km \u0026lt;/ td> \u0026lt;/ tr> ";}
$ str .= "\u0026lt;/ table>";
mysql_free_result ($ result);
mysql_close ($ conn);
echo $ str;?
}
>
The script mentioned in the table, GeoDB 'contains all postal codes from the area in question (eg Germany, Austria, Switzerland) with the following minimum Datendeldern:
post code, town, longitude latitude. Ie Remarks, longitude, latitude
there for this sort of postcode databases is more than one provider.
Good luck!
Tuesday, October 5, 2010
Why Does Oatmeal Make My Stomach Hurt?
Friday, October 1, 2010
Insert Jpg In Autocad 2010
If a traffic light is not already equipped with appropriate measurement system for tracking offenders red light, then help here often from police officers who observe violations and then bring in pursuit. Upon determination of the red light violation by observation, however, very high requirements are placed.
In one of our open cases, a driving instructor accused of a qualified red light violation (over 1 second red). Because this offense was against our clients to pay a fine of 200,00 € and a month driving ban imposed.
Our client was a passenger on a training ride. The learner was on his way to the driving test. The learner driver drove up to the green traffic light and intended to turn right. When the vehicle has already crossed the stop line and the side door onto the traffic light was, the traffic light turned to red As our client - as a driving instructor - the shoulder check undertook the same way as the learner discovered our client as the traffic light at that moment on yellow changed . A braking at this time would have resulted that the vehicle in the intersection area would come to a halt.
few meters behind the intersection of our client was stopped by a patrol car. It has been accused of a red light violation (here, as the responsible have committed a driving instructor) to. After the stated our clients with emphasis was that we could meet again before the criminal court, he did every other statement.
against the penalty decision was opposed and immediate access to the file made. The Act was - as expected - very thin and contained only one completed by the officials Din A 6 registration report with the words "pedestrian ASU already green."
From this it should be concluded that the light signal system for our clients already indicated red light.
As was measured by estimation were to set high standards. In any event, the mere emotional appreciation of a police officer for the detection of a qualified red light violation, since our client was accused of only short-term skilled red light violation (probably quite different if the traffic light already showing several seconds red light). Likewise, it is not enough to count randomly officials present 2 seconds. After our protest, the officials make statements such as the measurement was where they were at the time of the alleged breach and perceived the tasks to the police at this time.
It turned out that the officials just not out of service for targeted surveillance of the light warning device were. Where exactly they were and how the measurement was made, they gave no information about it. The penalty procedure was eventually discontinued completely.
any case shows that not every red light violation sufferers have to accept unconditionally. Even with modern measuring systems connect to measurement errors that cause invalid measurement results. Your traffic law attorney for advice.
traffic law attorneys, visit Schadenfix.de.
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 affected by road accidents and traffic violations to quickly and efficiently.
more info: www.verkehrsrecht-24.de
lawyer Thomas Brunow is a partner of the firm Prof. Dr. string & Partner in Berlin