UTF-8, c’est de la merde en barre !

10 01 2009

Et encore, je pèse mes mots ! Si vous utilisez un CMS comme Wordpress, ça va, vous n’avez pas tellement à vous interesser au choix de l’encodage pour vos pages web. Grosso modo, il y a deux encodage possibles :

  • Utiliser l’encodage local : Latin-1
  • Utiliser l’encodage universel : UTF-8

Alors à première vue, on peut se dire que le mieux est d’opter pour la seconde solution, pour ne pas être bridé par la suite. J’ai fait ce choix pour le développement d’un site, et maintenant je m’en mords les doigts !

Déjà, UTF-8 est rarement l’encodage par défaut des éditeurs de texte, donc dans un premier temps il vous faut convertir tous vos fichiers. Une fois que vous avez terminé cette tâche longue et fastidieuse, vous vous dites que la migration est enfin terminé.

 

Eh bien c’est pas du tout le cas, parce qu’il est maintenant impossible de stocker un texte avec accents dans une base de donnée.

En fait, MySQL a besoin qu’on lui dise qu’on travaille dans un encodage spécial avant toute requête :

SET NAMES ‘utf8′

Mais ce n’est pas terminé, parce qu’il faut toujours veiller à ce que les variables que vous manipulez, et en particulier les chaînes, soient toujours encodés en utf-8 grâce aux fonctions php utf8_encode et utf8_decode.

Et comme certaines fonctions PHP ne fonctionnent pas (un comble pour une fonction !) avec les chaînes UTF-8 (comme strrtr), je vous laisse imaginer le bordel qu’on obtiens à la fin !



Nouveau favicon Google

10 01 2009

Google vient à nouveau de changer de favicon. Le nouveau est beaucoup plus coloré que l’ancien, les onglets Google flashent pas mal maintenant dans firefox :



Multitouch sur Macbook

3 01 2009

Multitouch est le nom de la technologie qui permet à certains produits Apple permettant d’utiliser deux doigts pour par exemple zoomer sur les images.

Cette fonctionnalité n’est disponible que sur les iPhone, iPod Touch, MacBook Pro et MacBook Air, mails il est possible de l’installer du un MacBook simple en changeant le trackpad.

http://www.macbidouille.com/news/2008-07-24/#16799



Problème de DNS chez Azote.org

30 12 2008

Vous avez sans doute eu des difficultés à accéder à ces pages hier, car il y a eu un dysfonctionnement du service qui me fournit gratuitement le nom de domaine.



Opake

24 12 2008

Ce dit d’un objet qui ne laisse passer la lumière.



Crime Scene Investigation

22 11 2008

Crime Scene Investigation and Forensic Science

Introduction and History

Forensic science : application of a broad spectrum of sciences to answer questions of interest to the legal system. The earliest account of fingerprint use to establish identity was during the 7th century. In sixteenth century Europe, medical practitioners in army and university settings began to gather information on cause and manner of death. Ambroise Paré, a French army surgeon, systematically studied the effects of violent death on internal organs.

Crime scene investigation is the meeting point of science, logic and law. “Processing a crime scene” is a long, tedious process that involves purposeful documentation of the conditions at the scene and the collection of any physical evidence that could possibly illuminate what happened and point to who did it.

Every CSI unit handles the division between field work and lab work differently. What goes on at the crime scene is called crime scene investigation (or crime scene analysis), and what goes on in the laboratory is called forensic science.

 

Professions

 

  • Police officers : first to arrive at a crime scene. They arrest the perpetrator and call for an ambulance if necessary. They are responsible for securing the scene so no evidence is destroyed.
  • The CSI unit documents the crime scene in detail and collects any physical evidence.
  • The district attorney is often present to help determine if the investigators require any search warrants to proceed and obtain those warrants from a judge.
  • The medical examiner (if a homicide) may or may not be present to determine a preliminary cause of death.
  • Specialists (entomologists, forensic scientists, forensic psychologists) may be called in if the evidence requires expert analysis.
  • Detectives interview witnesses and consult with the CSI unit. They investigate the crime by following leads provided by witnesses and physical evidence.

Field work

Scene Recognition

Goals :

  • gain an understanding of what this particular investigation will entail
  • develop a systematic approach to finding and collecting evidence

 

At this point, the CSI is only using his eyes, ears, nose, some paper and a pen.

first step : Securing the crime scene and any other areas that might later turn out to be part of the crime scene is crucial.

one chance to perform a thorough, untainted search — furniture will be moved, rain will wash away evidence, detectives will touch things in subsequent searches, and evidence will be corrupted.

the first police officers on the scene secure the core area (the most obvious parts of the crime scene where most of the evidence is concentrated).

 

When the CSI arrives, he will block off an area larger than the core crime scene because it’s easier to decrease the size of a crime scene than to increase it.

Securing the scene:

 

  • creating a physical barrier using crime scene tape or other obstacles like police officers, police cars or sawhorses
  • removing all unnecessary personnel from the scene.

 

 

In the United States and the UK, a CSI needs search warrants. The evidence a CSI recovers is of little value if it’s not admissible in court. A good CSI errs on the side of caution and seldom searches a scene without a warrant.

 

With a search warrant : walk-through of the crime scene.

Follows a pre-determined path (that is likely to contain the least amount of evidence that would be destroyed by walking through it).

He takes immediate note of details that will change with time :

What’s the weather like? What time of day of day is it?

He describes any notable smells (gas? decomposition?), sounds (water dripping? smoke alarm beeping?), and anything that seems to be out of place or missing.

 

Identify any potential hazards, (gas leak, agitated dog guarding the body, and address those immediately).

The CSI uses the information he gathers during scene recognition to develop a logical approach to this particular crime scene.

Once the CSI has formed a plan of attack to gather all of the evidence that could be relevant to this particular crime, the next step is to fully document every aspect of the scene in a way that makes it possible for people who weren’t there to reconstruct it. This is the scene-documentation stage.

Scene Documentation

Goal : create a visual record that will allow the forensics lab and the prosecuting attorney to easily recreate an accurate view of the scene.

 

The CSI uses :

digital and film cameras, different types of film, various lenses, flashes, filters, a tripod, a sketchpad, graph paper, pens and pencils, measuring tape, rulers and a notepad at this stage of the investigation. He may also use a camcorder and a camera boom.

 

Photographs
CSIs take pictures of everything before touching or moving a single piece of evidence.

medical examiner : will not touch the corpse until the CSI is done photographing it and the surrounding area.

3 types of photographs : overviews, mid-views, and close-ups.

 

Overview shots are the widest possible views of the entire scene. If the scene is indoors, this includes:

 

  • views of all rooms (not just the room where the crime seems to have occurred), with photos taken from each corner and, if a boom is present, overhead
  • views of the outside of the building where the crime happened, including photos of all entrances and exits
  • views of the building showing its relation to surrounding structures
  • photos of any spectators at the scene

 

 

These last shots might identity a possible witness or even a suspect. Sometimes, criminals do actually return to the scene of the crime (this is particularly true in arson cases).

 

Mid-range photos come next : show key pieces of evidence in context, so the photo includes not only the evidence but also its location in a room and its distance from other pieces of evidence.

 

Finally, the CSI takes close-ups of individual pieces of evidence, showing any serial numbers or other identifying characteristics.

For these pictures, the CSI uses :

a tripod

professional lighting techniques

ð     achieve the best possible detail and clarity

ð     provide the forensics lab with views to assist in analyzing the evidence.

second set of close-up shots that includes a ruler for scale.

 

Every photo => in the photo log with the details (photograph number, description of the object or scene in the photograph, the location of the object or scene, the time and date the photograph was taken and any other descriptive details that might be relevant).

Without a good photo log, the pictures of the scene lose a lot of their value.

 

Ex : In the investigation of John F. Kennedy’s assassination, the FBI photographers who attended the autopsy didn’t create descriptions of the pictures they were taking, and investigators were later unable to distinguish between entrance and exit wounds in the photos.

 

Sketches
To depict both the entire scene, which is easier to do in a sketch than in a photograph because a sketch can span several rooms, and particular aspects of the scene that will benefit from exact measurements.

The goal is to show locations of evidence and how each piece of evidence relates to rest of scene.

ð     Organisation

Details like the height of a door frame, the exact size of the room, the distance from the window to the door and the diameter of the hole in the wall above the victim’s body.

 

Video
Scene documentation may also include a video walk-through, especially in major cases involving serial killers or multiple homicides.

=>Offer a better feel for the layout of the crime scene (how long it takes to get from one room to another and how many turns are involved, for instance).

 

During a video walk-through :

captures the entire crime scene

surrounding areas from every angle

provides a constant audio narrative.

 

After the CSI has created a full record of the crime scene (exactly as it was when he arrived), it’s time to collect the evidence. Now he starts touching things.

 

Finding the Evidence

Goal :   - find, collect and preserve all physical to recreate the crime

- identify the perpetrator.

 

Typical kinds of evidence :

 

  • Trace evidence (gunshot residue, paint residue, broken glass, unknown chemicals, drugs)
  • Impressions (fingerprints, footwear, tool marks)
  • Body fluids (blood, semen, saliva, vomit)
  • Hair and fibers
  • Weapons and firearms evidence (knives, guns, bullet holes(impacts), cartridge casings)
  • Questioned documents (diaries, suicide note, phone books; also includes electronic documents like answering machines and caller ID units)

 

Examining the body

Before moving the body, the CSI makes note of details like :

 

  1. Are there any stains or marks on the clothing?
  2. Is the clothing bunched up in particular direction? If so, this could indicate dragging.
  3. Are there any bruises, cuts or marks on body? Any defense wounds? Any injuries indicating, consistent with or inconsistent with the preliminary cause of death?
  4. Is there anything obviously missing? Is there a tan mark where a watch or ring should be?
  5. If blood is present in large amounts, does the direction of flow follow the laws of gravity? If not, the body may have been moved.
  6. If no blood is present in the area surrounding the body, is this consistent with the preliminary cause of death? If not, the body may have been moved.
  7. Are there any bodily fluids present beside blood?
  8. Is there any insect activity on the body? If so, the CSI may call in a forensic entomologist to analyze the activity for clues as to how long the person has been dead.

 

Them, the CSI needs to move the body to see the other side of the victim, take the temperature of the body (to determine an estimated time of death, but this is extremely unreliable). He will also take fingerprints.

 

technicians wrap the body in a white cloth and put paper bags over the hands and feet for transportation to the morgue for an autopsy.

 

Examining the scene

several search patterns :

 

The inward spiral search :

perimeter ->  toward the center

use when there is only one CSI

The outward spiral search:

            Center -> perimeter (opposite)

            Same use than inward spiral

Parallel search

            2 parallel searches, offset by 90 degrees

The zone search:

            each team member takes one sector

 

While searching the scene, a CSI is looking for details including :

  • Are the doors and windows locked or unlocked? Open or shut? Are there signs of forced entry, such as tool marks or broken locks?
  • Is the house in good order? If not, does it look like there was a struggle or was the victim just messy?
  • Is there mail lying around? Has it been opened?
  • Is the kitchen in good order? Is there any partially eaten food? Is the table set? If so, for how many people?
  • Are there signs of a party, such as empty glasses or bottles or full ashtrays?
  • If there are full ashtrays, what brands of cigarettes are present? Are there any lipstick or teeth marks on the butts?
  • Is there anything that seems out of place? A glass with lipstick marks in a man’s apartment, or the toilet seat up in a woman’s apartment? Is there a couch blocking a doorway?
  • Is there trash in the trash cans? Is there anything out of the ordinary in the trash? Is the trash in the right chronological order according to dates on mail and other papers? If not, someone might have been looking for something in the victim’s trash.
  • Do the clocks show the right time?
  • Are the bathroom towels wet? Are the bathroom towels missing? Are there any signs of a cleanup?
  • If the crime is a shooting, how many shots were fired? The CSI will try to locate the gun, each bullet, each shell casing and each bullet hole.
  • If the crime is a stabbing, is a knife obviously missing from victim’s kitchen? If so, the crime may not have been premeditated.
  • Are there any shoe prints on tile, wood or linoleum floors or in the area immediately outside the building?
  • Are there any tire marks in the driveway or in the area around the building?
  • Is there any blood splatter on floors, walls or ceilings?

 

Each time the CSI collects an item, he must immediately preserve it, tag it and log it for the crime scene record.

 

Evidence Collection

Goals:  Reconstruct the crime, identify the person who did it, preserve the evidence for analysis and collect it in a way that will make it stand up in court.

 

Trace evidence :

gun-shot residue (GSR), paint residue, chemicals

glass, illicit drugs

 

To collect trace evidence, a CSI might use:

Tweezers(pincettes)

plastic containers with lids

a filtered vacuum device

and a knife (illicit drugs or unknown powder and then seal each sample in a separate, sterile container)

 

Gunshot residue => close shot if in the victim’s clothing

 

He will also have a biohazard kit on hand containing disposable latex gloves, booties, face mask and gown and a biohazard waste bag.

 

Diapo “CBI Denver trace-evidence room”

Body fluids

Like : blood, semen, saliva, and vomit

 

To identify and collect these pieces of evidence, a CSI might use :

smear slides (traces de salissure), a scalpel, tweezers(pincettes), scissors, sterile cloth squares, a UV light, protective eyewear and luminol

 

He’ll also use a blood collection kit to get samples from any suspects or from a living victim to use for comparison.

 

What is luminol ?

Take a peace of rag and put down some blood + water. Wash it and dry, then put down some hydrogen peroxyde : you got some foam

 

Diapo Photo

 

CSI take blood and saliva from the body for DNA Analysis at the crime lab.

The CSI will also scrape the victim’s nails for skin (if there was a struggle, the suspect’s skin)

 

If there is blood at the scene => may also be blood spatter patterns. These patterns can reveal the type of weapon that was used.

 

Hair and Fibers
CSI seals any hair or fiber evidence in separate containers for transport to the lab.

A CSI might recover carpet fibers from a suspect’s shoes.

 

The lab can compare these fibers to carpet fibers from the victim’s home. Analysts can use hair DNA to identify or eliminate suspects by comparison.

 

The presence of hair on a tool or weapon can identify it as the weapon used in the crime. The crime lab can determine what type of animal the hair came from (human? dog? cow?).

If it’s human : person’s race, what part of the body the hair came from, If it fell out, pulled,dyed.

 

Fingerprints
Tools : brushes, powders, tape, chemicals, a magnifying glass and Super Glue

 

3 kinds of fingerprints :

  • Visible: Left by the transfer of blood, paint or another fluid or powder onto a surface that is smooth enough to hold the print; evident to the naked eye
  • Molded: Left in a soft medium like soap, putty or candle wax, forming an impression
  • Latent: Left by the transfer of sweat and natural oils from the fingers onto a surface that is smooth enough to hold the print; not visible to the naked eye

 

3 ways to get fingerprints :

Powder (for non-porous surfaces): Metallic silver powder or velvet black powder

Chemicals (for porous surfaces): Iodine, ninhydrin, silver nitrate

Super Glue (Cyanoacrylate) fuming (for porous or non-porous surfaces)

Footwear Impressions and Tool Marks

Footwear found : photograph it and then make a cast.

Toolmark impressions, a cast is much harder to use for comparison than it is with footwear. Transport the entire item containing the tool mark, a CSI can make a silicone-rubber cast and hope for the best. There are two types of tool marks a CSI might find at a crime scene:

  • Impressed : a hammer mark on a door frame). The tool mark is an impression of the tool’s shape. It’s difficult to make a definite match with an impressed tool mark.
  • Striated: A hard object contacts a softer object and moves back and forth (for example, pry marks on a window frame). The tool mark is a series of parallel lines. It’s easier to make a definite match with a striated tool mark.

Lab can compare marks (same tools ?)

 

Firearms
Puts gloves on, picks up the gun by the barrel (not the grip) and bags everything separately for the lab.

Forensic scientists : serial numbers, match both bullets

Position of the gun : using a laser trajectory kit.

 

Documents
A CSI collects and preserves any diaries, planners, phone books or suicide notes found at a crime scene. He also delivers to the lab any signed contracts, receipts, a torn up letter in the trash or any other written, typed or photocopied evidence that might be related to the crime.

Conclusion

Crime scene investigation is not like TV shows, they don’t works everytimes and this isn(t the ultimate solution to catch criminals.



Chromifox

21 11 2008

Une extension Firefox bien originale vient de sortir, il s’agit de Chromixfox.

Comme son nom l’indique, cette extension permet de donner à Firefox le look du navigateur de la firme de Mountain View : Google Chrome.

Chromifox

Enjoy !



GeoGebra

21 11 2008

GeoGebra est un logiciel qui permet de créer des dessins géométriques. Il est particulièrement destiné aux étudiants et aux lycéens.

GeoGebra

Le fonctionnement est très simple : le programme propose un certain nombre de primitives géométriques, à vous de les assembler pour créer la figure de votre choix.

Son téléchargement est gratuit, contrairement à d’autres programmes de mathématiques scolaires, ce qui est un avantage indéniable.



Matrix fonctionne sous Windows XP !

11 11 2008

Petit moment de détente avec cette nouvelle vidéo de la CHTV.

CHTV

Le pitch : la matrice fonctionne également sous Windows XP, mais cela implique quelques différences avec le film, voici le résultat en images :

Voir la vidéo sur Koreus




Le renard botté

5 11 2008

Ah ils sont marrants ces renards (canidés) dans la neige :

renard dans la neige

Plus d’infos sur la page consacrée au renard de portnawak !