This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="elementToprint"> | |
| Text to be in the PDF, simple function create by Sanix darker!!! | |
| </div> | |
| <input type="button" value="IMPRIME" onclick="PrintElem('elementToprint');"> | |
| <script type="text/javascript"> | |
| function PrintElem(elem) | |
| { | |
| var mywindow = window.open('', 'PRINT', 'height=400,width=600'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <input type="text" class="form-control" onkeypress="return isNumber(event)"> | |
| <script> | |
| function isNumber(evt) { | |
| evt = (evt) ? evt : window.event; | |
| var charCode = (evt.which) ? evt.which : evt.keyCode; | |
| if (charCode > 31 && (charCode < 48 || charCode > 57)) { | |
| return false; | |
| } | |
| return true; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.min.js"></script> | |
| <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.devbridge-autocomplete/1.4.3/jquery.autocomplete.min.js"></script> | |
| <style type="text/css"> | |
| .autocomplete-suggestions { border: 1px solid #999; background: #fff; cursor: default; overflow: auto; } | |
| .autocomplete-suggestion { padding: 10px 5px; font-size: 1.2em; white-space: nowrap; overflow: hidden; } | |
| .autocomplete-selected { background: #f0f0f0; } | |
| .autocomplete-suggestions strong { font-weight: normal; color: #3399ff; } | |
| </style> | |
| <div id="searchfield"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function onProgress(event) { | |
| if (event.lengthComputable) { | |
| var percentComplete = (event.loaded / event.total)*100; | |
| console.log("Envoi en cours: %d%%", percentComplete); | |
| } else { | |
| // Impossible de calculer la progression puisque la taille totale est inconnue | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link href='https://fonts.googleapis.com/css?family=Roboto:100,400,300,500,700' rel='stylesheet' type='text/css'> | |
| <div align="center" class="fond"> | |
| <div style="width:1000px;"> | |
| <div class="style_prevu_kit" style="background-color:#cb2025;"></div> | |
| <div class="style_prevu_kit" style="background-color:#f8b334;"></div> | |
| <div class="style_prevu_kit" style="background-color:#97bf0d;"></div> | |
| <div class="style_prevu_kit" style="background-color:#00a096;"></div> | |
| <div class="style_prevu_kit" style="background-color:#93a6a8;"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Check if a gem is installed | |
| gem list -i "^gem_name$" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # CHeck the version of the ActiveRecord | |
| bundle show activerecord |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #basics: | |
| rails console | |
| rails server | |
| rake | |
| rails generate | |
| rails dbconsole | |
| rails new app_name | |
| #create scaffold | |
| rails generate scaffold level |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.fn.followTo = function (pos) { | |
| var $this = this, | |
| $window = $(window); | |
| $window.scroll(function (e) { | |
| if ($window.scrollTop() > pos) { | |
| $this.css({ | |
| position: 'fixed', | |
| top: 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rails generate migration AddPartNumberToProducts part_number:string |