sudo apt-get install python-dev
mardi 28 octobre 2014
vendredi 24 octobre 2014
[Python] pip install : gcc: error: unrecognized command line option '-mno-cygwin'
If you are on Windows and get this message :
Then you must :
- edit or create C:\PythonXX\Lib\distutils\cygwinccompiler.py and remove any traces of -mno-cygwin
- open an new cmd and type again your pip install greenlet (or another lib)
Have fun
:o)
gcc: error: unrecognized command line option '-mno-cygwin'when you type pip install greenlet (or another lib)
Then you must :
- edit or create C:\PythonXX\Lib\distutils\cygwinccompiler.py and remove any traces of -mno-cygwin
- open an new cmd and type again your pip install greenlet (or another lib)
Have fun
:o)
mardi 14 octobre 2014
JSON Schema
The official documentation for the JSON Schema (the specification for the JSON Schema is currently published as draft) :
http://json-schema.org
An online JSON validator, using schema :
https://json-schema-validator.herokuapp.com/
A wonderful tutorial explaining the JSON Schema :
http://spacetelescope.github.io/understanding-json-schema/
http://json-schema.org
An online JSON validator, using schema :
https://json-schema-validator.herokuapp.com/
A wonderful tutorial explaining the JSON Schema :
http://spacetelescope.github.io/understanding-json-schema/
mardi 23 septembre 2014
[Python] __code__ and decorator
http://stackoverflow.com/questions/1166118/how-to-strip-decorators-from-a-function-in-python
http://stackoverflow.com/a/1167248
[iOS] viewDidLoad viewDidAppear viewWillAppear
viewWillLoad/viewDidLoad - called when the view is constructed (via
the first call to retrieve the view controller's UIView via it's view
property - aka lazy loading)
viewWillAppear: - when the view is being prepared to appear either immediately (animated == NO) or view a transition (animated == YES)
viewDidAppear: - if the view appearance wasn't cancelled and the view controller's view fully appears
viewWillDisappear: - complements viewWillAppear:
viewDidDisappear: - complements viewDidAppear:
viewWillUnload/viewDidUnload - deprecated APIs when the view is unload due to memory constraints (don't worry about these anymore)
Source : http://stackoverflow.com/questions/22214843/ios-7-difference-between-viewdidload-and-viewdidappear
viewWillAppear: - when the view is being prepared to appear either immediately (animated == NO) or view a transition (animated == YES)
viewDidAppear: - if the view appearance wasn't cancelled and the view controller's view fully appears
viewWillDisappear: - complements viewWillAppear:
viewDidDisappear: - complements viewDidAppear:
viewWillUnload/viewDidUnload - deprecated APIs when the view is unload due to memory constraints (don't worry about these anymore)
Source : http://stackoverflow.com/questions/22214843/ios-7-difference-between-viewdidload-and-viewdidappear
dimanche 21 septembre 2014
[iOS 8] Detected a case where constraints ambiguously suggest a height of zero for a tableview cell's content view. We're considering the collapse unintentional and using standard height instead
If you have this message :
<<
Warning once only: Detected a case where constraints ambiguously suggest a height of zero for a tableview cell's content view. We're considering the collapse unintentional and using standard height instead.
>>
then just write :
<<
- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 44;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 44;
}
>>
vendredi 22 août 2014
[Bootstrap] Sticky left sidebar
Apply affix (http://getbootstrap.com/javascript/#affix) and scrollspy (http://getbootstrap.com/javascript/#scrollspy)
body {
position: relative;
}
<body data-spy="scroll" data-target=".mynav">
<div class="row">
<div class="col-md-3 mynav">
<ul class="nav nav-pills nav-stacked" data-spy="affix" data-offset-top="60" data-offset-bottom="200">
<li>
<a href="#menu1">menu1</a>
</li>
<li>
<a href="#menu2">menu2</a>
</li>
</ul>
</div> <!--div col-md-3-->
<div class="col-md-9">
<div id="menu1">
blabla
</div>
<div id="menu2">
blabla
</div>
</div> <!--div col-md-9-->
<div id="menu1">
blabla
</div>
<div id="menu2">
blabla
</div>
</div> <!--div col-md-9-->
</div> <!--div row-->
</html>
jeudi 21 août 2014
[Bootstrap] Sticky footer
http://stackoverflow.com/a/25075517
$(document).ready(function () {
//http://stackoverflow.com/a/25075517
var $docH = $(document).height();
// The document height will grow as the content on the page grows.
$('.my-footer').css({
/*
The default height of .navbar is 50px with a 1px border,
change this 52 if you change the height of your footer.
*/
top: ($docH - 52) + 'px'
});
});
<div id="footer" class="my-footer">
<div class="container">
<p class="text-muted credit">toto.com</p>
</div>
</div>
$(document).ready(function () {
//http://stackoverflow.com/a/25075517
var $docH = $(document).height();
// The document height will grow as the content on the page grows.
$('.my-footer').css({
/*
The default height of .navbar is 50px with a 1px border,
change this 52 if you change the height of your footer.
*/
top: ($docH - 52) + 'px'
});
});
<div id="footer" class="my-footer">
<div class="container">
<p class="text-muted credit">toto.com</p>
</div>
</div>
[Bootstrap] How to create a sticky left sidebar menu
http://www.bootply.com/82265#
http://www.bootply.com/90936#
http://www.bootply.com/90936#
mercredi 20 août 2014
[Python] How to check if an object has an attribute : hasattr vs __dict__
class A(object):
foo = 1
class B(A):
pass
b = B()
print( hasattr(b, 'foo') )
True
print( 'foo' in b.__dict__)
False
hasattr : checks on super class
__dict__ : does not include super class
foo = 1
class B(A):
pass
b = B()
print( hasattr(b, 'foo') )
True
print( 'foo' in b.__dict__)
False
hasattr : checks on super class
__dict__ : does not include super class
Inscription à :
Articles (Atom)
Categories
- /etc/hosts (1)
- 443 (1)
- 80 (1)
- a2dp (1)
- addsubview (1)
- affix (1)
- amazon (1)
- android (6)
- angularjs (1)
- angularjs cross domain json post (1)
- angularjs ionic ng-click twice (1)
- animate (1)
- ansible (2)
- antlr (1)
- apache2 processes (1)
- app (1)
- app store (1)
- apple (1)
- appstore (1)
- avis (2)
- baignoire (1)
- basics (1)
- bitbucket (1)
- blackberry (1)
- bluetooth (1)
- booster (1)
- bootstrap (3)
- bottle (4)
- browsers (1)
- buffer (1)
- cherrypy (3)
- chromebook real life (1)
- coder (2)
- communicator (1)
- config.txt (1)
- creme chocolat (1)
- crepes bretonnes (1)
- crlf (1)
- css (2)
- cuisine (1)
- database (4)
- datatables (1)
- datetime (1)
- delete (1)
- disconnect (1)
- distributing (1)
- english (2)
- flask (1)
- fontawesome (1)
- francais (51)
- futuristic (1)
- game (1)
- gil (1)
- git (9)
- github (1)
- gratuit (2)
- hadopi (1)
- header (1)
- height zero (1)
- hibernate (1)
- hotel (2)
- http (1)
- https (2)
- ionic (2)
- ios (2)
- ios7 (1)
- iOS8 (1)
- iphone (1)
- jaune (1)
- java (7)
- javamelody (1)
- javascript (1)
- json (3)
- kindle (1)
- knockout (3)
- leaflet (1)
- legere (1)
- lf (1)
- life cycle (1)
- linkedin resume builder profile (1)
- linux (9)
- log (1)
- luxembourg (1)
- machine (1)
- maizena (1)
- minecraft (1)
- mobile (1)
- mongo (1)
- mongodb (3)
- mongodb mongo linux (1)
- multiple (1)
- myspace (1)
- mysql (1)
- netbeans cordova android cordova-plugin-file (1)
- nginx (2)
- nintendo (1)
- number (1)
- opensolaris (1)
- openstreetmap (1)
- oracle (15)
- order by (1)
- output (1)
- overclocking (1)
- packaging (1)
- parameters (1)
- personnaliser bootstrap (1)
- photos (1)
- pip (2)
- pipewire (1)
- prime (1)
- problem (2)
- project (1)
- publish (1)
- python (26)
- raspberry pi (2)
- raspi-config (1)
- recette (1)
- redirect (1)
- restful (2)
- schema (1)
- screen (1)
- screencast (1)
- script (1)
- scrollspy (1)
- serialization (1)
- sessions (2)
- shell (1)
- shutdown reboot linux reinstall apt-get (1)
- smartgwt (1)
- sncf (1)
- software (1)
- spring (1)
- sql (1)
- sticky footer (1)
- supervisor (1)
- systeme (1)
- tile (1)
- timestamp (1)
- title (1)
- tornado (3)
- turbo (1)
- ubuntu (2)
- uialertview (1)
- video capture (1)
- viewdidappear (1)
- viewdidload (1)
- viewwillappear (1)
- weasyprint (1)
- web (1)
- web2py (1)
- windows (5)
- worker (1)
- xbox wireless headset (1)
- xdk barcode scanner intel.xdk.device.barcode.scan (1)
- XDK rename project (1)
- xeno galaxies (1)