Linux – Find string in files

find . | xargs grep ‘string’ -sl

The -s is for summary and won’t display warning messages such as grep: ./directory-name: Is a directory

The -l is for list, so we get just the filename and not all instances of the match displayed in the results.

I find this useful for just quickly seeing which files contain a search time. I would normally limit the files searched with a command such as :
find . -iname ‘*php’ | xargs grep ‘string’ -sl

Another common search for me, is to just look at the recently updated files:
find . -iname ‘*php’ -mtime -1 | xargs grep ‘string’ -sl

would find only files edited today, whilst the following finds the files older than today:
find . -iname ‘*php’ -mtime +1 | xargs grep ‘string’ -sl

Some commands for cordova project

npm install -g cordova

cordova create workshop com.shen.workshop Workshop

cd workshop

npm install ant


set ANT_HOME=c:\ant
set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_45
set PATH=%PATH%;%ANT_HOME%\bin

cordova platforms add android

///////////cordova cli/////////////////
cordova help
cordova -v
cordova create project_folder
cordova create project_foler app_id app_name
cordova create myapp com.cordovaprogramming.hello Hello

cordova platform add android ios
cordova platforms
cordova platform list

cordova plugin add
cordova plugin add
cordova plugin add
cordova plugin add
cordova plugin add
cordova plugin add
cordova plugin add
cordova plugin add org.apache.cordova.device-orientation
cordova plugin add
cordova plugin add org.apache.cordova.geolocation
cordova plugin add
cordova plugin add
cordova plugin add org.apache.cordova.globalization
cordova plugin add org.apache.cordova.contacts
cordova plugin add
cordova plugin add org.apache.cordova.inappbrowser
cordova plugin add org.apache.cordova.splashscreen

cordova plugin add camera
cordova plugin add c:\dev\plugins\my_plugin_name
cordova plugin add org.apache.cordova.console
cordova plugin rm plugin_name
cordova plugin remove org.apache.cordova.core.file

cordova prepare android
cordova compile android
cordova build android
cordova emulate android
cordova run android

cordova serve android
cordova serve android 8080

npm install –g weinre



D3 gallery


Visual Index

Box Plots
Bubble Chart
Bullet Charts
Calendar View
Non-contiguous Cartogram
Chord Diagram
Force-Directed Graph
Circle Packing
Population Pyramid
Stacked Bars
Node-Link Tree
Voronoi Diagram
Hierarchical Edge Bundling
Voronoi Diagram
Symbol Map
Parallel Coordinates
Scatterplot Matrix
Zoomable Pack Layout
Hierarchical Bars
Epicyclical Gears
Collision Detection
Collapsible Force Layout
Force-Directed States
Azimuthal Projections
Collapsible Tree Layout
Zoomable Treemap
Zoomable Partition Layout
Zoomable Area Chart
Drag and Drop Collapsible Tree Layout
Rotating Cluster Layout
Sankey Diagram
Fisheye Distortion
Hive Plot
Co-occurrence Matrix
Motion Chart
Chord Diagram
Animated Béziers
Zoomable Sunburst
Collatz Graph
Parallel Sets
Word Cloud
Obama’s Budget Proposal
Facebook IPO
Political Influence
Federal Budget
US Trade Deficit
Sequences sunburst
Koalas to the Max
Indented Tree
Rounded Rect
Euro Debt
Labeled Force Layout
Circle-Square Illusion
Voronoi Picking
Zoomable Map
Parallel Coordinates
Hacker News Popularity
Life Expectancy
NCAA Predictions
Wind History
Cubic Hamiltonian Graphs
Force-Directed Voronoi
Trulia Trends
Trulia Trends
Open Budget
Bederson Publications
Force Layout Editor
Open Knowledge Festival
Hierarchical Classification Tree
Gene Expression
d3 Analog Clock Dashboard
Concept network browser
Circular heat chart
Convert any page into bubbles
Directed Graph Editor
Animated wind chart
What makes us happy?
Simple SOM Animation
A mower demo
Map and context with brushing
Binary tree with transitions
D3 JezzBall
Gantt Chart
Day/Hour Heatmap
Sunburst and
Worldwide remittance flows
Language Network
Wimbledon 2012
Force directed tag/site explorer
Bus transit data
Airline data from Fusion Tables
Geographical hexbins
xkcd-style Comic Narrative Charts
GitHub Visualizer
WorldBank Contract Awards
Site or blog concept browser
Global power structure
Choropleth on canvas
Google calendar like visualization
Interactive Sales Data Pie Chart
Wikistalker – Wikipedia Visualization
D3 Cesium – Health and Wealth of Nations
BT Hotspots mapped
CoreNLP Sentence Parse Tree
Publications in journals over time
Another state budget visualization with open api
Interactive Bible contradictions & bar charts [source]
Force Edge Bundling For Graphs
[Source & Docs]
Bullet Charts
Arc Axis
Bar chart with tooltips
Tokyo Wind Map
Dependency Wheel
60 years of french first names
Hip Replacement by State
Compare time series with irregular interval
Table with Embedded Line Chart
Dual-scale Bar Chart
Animated Pie and Line Chart
Multivariate Data Exploration with Scatterplots
Live Power Outages In Maine
Relative Size Of The Planets
AWS EC2 Price Comparison Chart
Hurricane Forecast Path Evolution
Sandy’s Storm Surge
Monthly NCDC Climate Summary
Epidemic Game
UK Temperature Graphs
Data Heatmap with Sorting Functions
Node-Link Tree Showing Branches of Government
3D Force Layout
Rotating Arcs
The Movie Network
Bowls with Liquid
BiPartite Visualization
3D Donut
Graceful Tree Conjecture
Gradient Pie
Top Scorers in 2013/14 Champions League – Breakdown analysis
Sankey: How a Georgia bill becomes law
A game based on d3
Viroscope – virus taxonomy viewer
Twitter & Reddit topics during week one of MH-370′s disappearance
Eurovision song contest voting oddities
Fund Visualization

Basic Charts

Area Chart
Line Chart
Bivariate Area Chart
Multi-Series Line Chart
Stacked Area Chart
Bar Chart
Stacked Bar Chart
Normalized Stacked Bar Chart
Grouped Bar Chart
Donut Chart
Pie Chart
Donut Multiples
Bar Chart with Negative Values
Animated Donut Chart with Labels
Stacked Bar Charts on time scale
Bar Chart Multiples
d3pie – pie chart generator and lib

Techniques, Interaction & Animation

General Update Pattern
Sortable Bar Chart
van Wijk Smooth Zooming
Progress Events
Margin Convention
Focus+Context via Brushing
Difference Chart
Pie Chart Update
Hexagonal Binning
Contour Plot
Build Your Own Graph
Modifying a Force Layout
Spline Interpolation
Dispatching Events
Better force layout selection
v45 web theme using SVG
Interactive force layout

Beginning WebGL for HTML5


  • There are many demos of WebGL, including these:
  • •
  • •
  • •
  • • Google Body (now, parts of Google Maps,
  • and Google Earth
  • •
  • •

Although IE currently has no built in support, plugins are available; for example, JebGL (available at

  •, Chrome Frame (available at, and
  • IEWebGL ( JebGL converts WebGL to a Java applet for deficient browsers; Chrome Frame
  • allows WebGL usage on IE, but requires that the user have it installed on the client side. Similarly, IEWebGL is
  • an IE plugin.

Testing for WebGL Support

  • To check for browser support of WebGL. there are several websites such as, which
  • displays a spinning cube on success; and, which gives a large “Yay”
  • or “Nay” and specific details if the webgl context is supported. We can also programmatically check for WebGL
  • support using modernizr (

• KickJS Shader Editor

  • • WebGL Playground
  • • SpiderGL MeShader
  • • WebglSamples
  • Two nice online applications to play around with blend settings are available at and
  • The application at the first link is written by the creator of the Three.js framework and the second one
  • is written by the most active contributor to the library. In addition,
  • explicitly states the result of each blending factor setting.

Fresnel Shader

  • A Fresnel shader calculates the reflective and refractive components of light using the GLSL functions reflect and
  • refract. It uses a texture cube map for the environment. Although covering the complete implementation details
  • of a Fresnel shader is beyond the scope of this book, good examples of Fresnel shaders in action are as follows:
  • • Bubbles:
  • • Skull:

There are several places to download free or variably priced meshes such as the following:



  • There are a lot of places online to browse and download free high-quality textures, including these:
  • •
  • •
  • •
  • •
  • •


  • Cutting-edge Chrome WebGL experiments
  • Khronos demo repository
  • Nice water demo
  • HTML


  • Project page
  • Documentation
  • Wiki
  • Learning Resources: Paul Lewis
  • Learning Resources: Jerome Etienne
  • Nice Diagrams of Overall Objects


  • Direct Illumination models
  • Phong Reflection Model
  • Figure 3-13 is a variation of
  • which is Licensed under the GNU Free Documentation License
  • Global Illumination Models
  • Ambient Occlusion
  • Reflection and Refraction
  • Shadow Mapping

Matrix and Vector Libraries

  • gl-matrix.js
  • sylvester
  • webgl-mjs
  • Benchmarks

Mesh File Formats

  • Wavefront (obj) format
  • Collada format
  • Three.js internal JSON format

Performance and Best Practices

  • Mozilla Developer Network Best Practices
  • Gregg Tavares Google I/O 2011
  • events/io/2011/static/notesfiles/WebGLTechniquesandPerformancenotes.pdf
  • Profiling with about: tracing


  • Learning
  • WebGL Demos
  • Javascript Libraries:
  • Box 2D Ports
  • Bullet Port
  • Cannon
  • physi.js
  • Tutorials

25 (Free) 3D Modeling Applications You Should Not Miss By Kay Tan

3d modeling tools

Technically, 3 Dimensions refers to objects that are constructed on three plans (X, Y and Z). The process of creating 3D graphics can be divided into three basic phases: 3D modeling, 3D animation and 3D rendering.

Three dimensional (3D) computer graphics are widely used and they are almost too common to see anywhere, let it be movies, products designs, advertisements, etc. Although they are commonly seen, that doesn’t mean they are easily created. In order to interactively control a 3D object, it must be created in a 3D authoring tool which usually cost a lot to a non-professional user.

A 3D model is usually originated on the computer by engineer using some kind of 3d modeling tools. Creating 3D models is not easy and the software alone can cost a fortune Therefore, we thought it might be interesting to check out the availability of open source 3D modeling tools out there. Crawling from sites to sites, reading through end users comments and feedback, we bring you 25 Free 3D Modelling Applications You Should Not Miss. Full list after jump.

  1. Blender

    A free and open source 3D modeling and animation application which can be used for modeling, UV unwrapping, texturing, rigging, water simulations, skinning, animating, rendering, particle and other simulations, non-linear editing, compositing, and creating interactive 3D applications.


  2. K-3D

    K-3D is free-as-in-freedom 3D modeling and animation software. It features a plugin-oriented procedural engine for all of its content, making K-3D a very versatile and powerful package.
    K-3D excels at polygonal modeling, and includes basic tools for NURBS, patches, curves and animation.


  3. Art Of Illusion

    Art of Illusion is a free, open source 3D modelling and rendering studio. Some of the highlights include subdivision surface based modelling tools, skeleton based animation, and a graphical language for designing procedural textures and materials.



    A free 3D modeling and animation software for aspiring game developers and modders. The Mod Tool is a free version of XSI for non commercial game creation. It is made for everyone needing a powerful 3D application to make and mod games. The Mod Tool plugs into all the major game engines and development frameworks for next-generation games, casual games, mods for existing titles and even Flash-based 3D games.


  5. Zmodeler

    ZModeler (or Zanoza Modeler) is a 3D modeling application developed by Oleg Melashenko. It is aimed at modelers who model for computer games. ZModeler is capable of complex modeling, even though it does not support important modeling functions such as extruding, or beveling.


  6. TopMod3d

    TopMod3d is a free, open source, portable, platform independent topological mesh modeling system that allows users to create high genus 2-manifold meshes. It can also create solid models that can be prototyped using various rapid prototyping technology.


  7. Google SketchUp 6

    Google SketchUp

    Google SketchUp is software that you can use to create, share and present 3D models. Whether you want to design a new deck for your house, build models for Google Earth, or teach geometry to your fifth-graders, you can use SketchUp to see your ideas in 3D. And when you’re done, you can export an image, make a movie or print out a view of what you made.

  8. AutoQ3D Community – 3D Editor

    AutoQ3D Community is an easy, light and fast 3D model editor tool that uses the full power of your PC´s graphics hardware, allowing you to rapidly prototype your 3D designs. Its interface is intuitive and easy to use and provided at no charge. It is released under the terms of the GNU General Public License so it will be free to use, modify  and distribute within any educational, professional or commercial purposes.


  9. Anim8or

    Anim8or is a 3D modeling and character animation program which allows users to create and modify 3D models with built-in primitives such as spheres, cylinders, platonic solids, etc.; mesh-edit and subdivision; splines, extrusion, lathing, modifiers, bevel and warps,


  10. Seamless3d

    Seamless3d is free open source 3d modelling software which designed for the artist who is realistic about the time it takes to learn any tool that’s going to offer creative freedom.


  11. BRL-CAD

    BRL-CAD is a powerful cross-platform constructive solid geometry solid modeling system that includes an interactive geometry editor, ray-tracing for rendering & geometric analyses, network distributed framebuffer support, image & signal-processing tools.


  12. 3DPlus

    With 3DPlus you can create outstanding 3D designs in just a few minutes – with no need for any complicated VRML or other programming. 3DPlus is the amazing 3D design software that enables you to create stunning 3D graphics for your home, school or business – no experience required!


  13. 3D Canvas

    3D Canvas is a real-time 3D modeling and animation tool that incorporates an intuitive drag-and-drop approach to 3D modeling. Complex models can be constructed from simple 3D primitives, or created using 3D Canvas’ Object Building Tools. Modeling tools are provided to deform, sculpt, and paint 3D objects.


  14. EDrawings

    eDrawings is a freeware utility which will give the user the power to view, create and share 3D models and 2D drawings. eDrawings offers unique capabilities like point-and-click animations that make it easy for anyone with a PC to interpret and understand 2D and 3D design data.


  15. Blink 3D

    Blink 3D is an authoring tool for creating 3D environments. The 3D environments are immersive, just like today’s modern games and can be viewed using the a Blink 3D Viewer on the Web or locally.

    blink3d builder

  16. Minos

    MINOS extends the capabilities of your existing 2D-or 3D-wireframe-based systems, so you can take advantage of all the benefits solid modeling offers right away. MINOS makes it easy to design 3D parts and assemblies. The design methodology is based on defining simple geometric elements including lines, curves, and circles, and then linking them together to form contours.


  17. FreeCAD

    freeCAD is a basic 3D CAD with advanced Motion Simulation capabilities. It is suitable for anyone interested in learning 3D CAD and Motion Simulation for free before using more sophisticated packages. Its motion simulation capabilities are comparable to the best and can provide accurate answers to engineers and scientists in diverse fields.


  18. Bishop3D

    Bishop3D is an interactive modeler and animation tool for the popular freeware raytracer POV-Ray™, a world-class renderer for creating three-dimensional photo-realistic images. Bishop3D allows you to model the scenes interactively and it will automatically generate the correspondent POV-Ray SDL script. It offers native keyframe animation support, POV-Ray SDL import and a powerful texture editor.


  19. K3DSurf

    K3DSurf is a program to visualize and manipulate Mathematical models in three, four, five and six dimensions. K3DSurf supports Parametric equations and Isosurfaces. K3DSurf can be used by every one interested in 3D Mathematical drawing functions and don’t require any special competences by users.

  20. DesignWorkshop Lite

    DesignWorkshop is a three-dimensional modeling program for architectural design and related endeavors. Its unique interface makes it more profoundly « Mac-like » than any prior modeling software. This interface allows it to support actual design in three dimensions, as opposed to just recording design ideas already worked out with other media.

    DesignWorkshop Lite

  21. GDesign 2.0

    GDesign 2.0 is a 2D/3D free generative art application for Windows. With GDesign you can interactively build, test, and edit complex models. You can create, edit, build and preview huge 2D and 3D objects with extended LSystems and Cellular Automata tools.


  22. Sweet Home 3D

    Sweet Home 3D is a free interior design application that helps you place your furniture
    on a house 2D plan, with a 3D preview. Sweet Home 3D helps people to design their interior quickly. The user may: draw the walls of his rooms upon the image of an existing plan, change the color or the texture of the walls, import additional 3D models created by himself or downloaded from different Web sites, change the size, view the changes in the plan simultaneously in the 3D view, either from an aerial view point, or from a virtual visitor view point, print the home plan and the 3D view.


  23. TrueSpace

    trueSpace7.6 is a fully-featured 3D authoring package that will let you model, texture, light, animate and render 3D content. As well as traditional images and movies, you can also make 3D content for online shared spaces, and for Virtual Earth.


  24. Alibre Design Xpress

    Alibre Design Xpress is a rich and capable 3D solid modeler for creating mechanical parts, assemblies and 2D drawings – and is free. Alibre Design Xpress equips the person needing basic 3D design capabilities. Alibre Design Xpress has a rich set of integrated tutorials that you can use to learn the product quickly.

    Alibre Design Xpress

  25. 3DVIA Shape

    3DVia Shape is a free online 3D modeling application that eases you to create, publish and share ideas in 3D. There are 3DVIA archive of prototypes and modeling software you can choose to create three-dimensional. Each model can be viewed at any angle, spun around and zoomed-in on.

    3DVia Shape

On delete cascade with doctrine2

1. class QuantifiedSelfItem


* @var User\Bundle\Entity\Person
* @ORM\ManyToOne(targetEntity="\User\Bundle\Entity\Person")
* @ORM\JoinColumn(name="idPerson", referencedColumnName="id",nullable=true, onDelete="CASCADE")
* */
private $idPerson;


2. class Person

Extension twig pour encoder les images en base 64

1. src/QuantifiedSelf/Bundle/Twig/Extension/AssetExtension.php

namespace QuantifiedSelf\Bundle\Twig\Extension;

use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Bundle\TwigBundle\Loader\FilesystemLoader;

class AssetExtension extends \Twig_Extension {
public function getFunctions()
return array('image64' => new \Twig_Function_Method($this, 'image64'),

public function image64($path)
$file = new File($path, false);

if (!$file->isFile() || 0 !== strpos($file->getMimeType(), 'image/')) {return;}

$binary = file_get_contents($path);

return sprintf('data:image/%s;base64,%s', $file->guessExtension(), base64_encode($binary));

public function getName()
return 'twigImageBase64';

2. app/config/config.xml


quantifiedself.twig.extension.class: QuantifiedSelf\Bundle\Twig\Extension\AssetExtension

class: %quantifiedself.twig.extension.class%
- { name: twig.extension }


3. index.html.twig


<img width="100%" height="100%" src="{{ image64('bundles/quantifiedself/images/'~qs.logo) }}">


Exporter en PDF avec Symfony2 –

Pour commencer télécharger le bundle :

Première etape :

Décompresser le  Bundle puis déplacer le dans le dossier /vendor

Modifier le fichier app/autoload.php

use Doctrine\Common\Annotations\AnnotationRegistry;
use Composer\Autoload\ClassLoader;
 * @var ClassLoader $loader
$loader = require __DIR__.'/../vendor/autoload.php';
AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
//permettra à l’autoload d’importer la librarie HTML2PDF
$loader->add('Html2Pdf_', __DIR__.'/../vendor/html2pdf/lib'); //ligne à ajouter
return $loader;
Comment utiliser html2pdf dans le controller ?
namespace testPdf\testPdfBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class DefaultController extends Controller
    public function indexAction($name)
        //on stocke la vue à convertir en PDF, en n'oubliant pas les paramètres twig si la vue comporte des données dynamiques
        $html = $this->renderView('testPdfBundle:Default:index.html.twig', array('name' => $name));
        //on instancie la classe Html2Pdf_Html2Pdf en lui passant en paramètre
        //le sens de la page "portrait" => p ou "paysage" => l
        //le format A4,A5...
        //la langue du document fr,en,it...
        $html2pdf = new \Html2Pdf_Html2Pdf('P','A4','fr');
        //SetDisplayMode définit la manière dont le document PDF va être affiché par l’utilisateur
        //fullpage : affiche la page entière sur l'écran
        //fullwidth : utilise la largeur maximum de la fenêtre
        //real : utilise la taille réelle
        //writeHTML va tout simplement prendre la vue stocker dans la variable $html pour la convertir en format PDF
        //Output envoit le document PDF au navigateur internet avec un nom spécifique qui aura un rapport avec le contenu à convertir (exemple : Facture, Règlement…)
        return new Response();