undefined == null
So, there's no need to write:
if ( firstVar === undefined || firstVar === null) { // your code }This works just the same:
firstVar === undefined || firstVar === null)
undefined == null
if ( firstVar === undefined || firstVar === null) { // your code }This works just the same:
firstVar === undefined || firstVar === null)
ssh -L 3307:localhost:3306 dummy@www.inevergetitright.com
mysql -u asdfsd -p -P 3307 -h 127.0.0.1
Lazy load proxies always contain an instance of Doctrine’s EntityManager and all its dependencies. Therefore a var_dump() will possibly dump a very large recursive structure which is impossible to render and read. You have to use Doctrine\Common\Util\Debug::dump() to restrict the dumping to a human readable level. Additionally you should be aware that dumping the EntityManager to a Browser may take several minutes, and the Debug::dump() method just ignores any occurrences of it in Proxy instances.src: http://www.doctrine-project.org/docs/orm/2.1/en/tutorials/getting-started-xml-edition.html
function x() { } function y() { return; } function z() { return undefined; } x() === y(); // is true x() === z(); // is true"
Fatal error: Call to undefined function Symfony\Component\Form\Extension\Core\DataTransformer\intl_is_failure()
$loader->registerPrefixFallbacks(array( __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs', ));
require_once __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
<html> <head> <title>Overlay Demo</title> <script type="text/javascript" src="https://playground.one45.com/sfweb/one45_dev.php/js/1edeb09_part_1_jquery-1.6.2.min_1.js"></script> </head> <body> <style> .hidden { display: none; } #overlay { background: #cccccc; opacity: 0.5; width: 100%; height: 100%; position: absolute; top: 0px; left: 0px; } #overlay_display { position: absolute; background: white; border: 2px solid black; padding: 0px; width: 500px; height: 100px; top: 50px; } #overlay_toolbar { background: black; height: 25px; width: 494px; padding: 3px; } #overlay_message { float: left; color: white; width: 420px; } #overlay_close { float:right; color:white; width: 30px; height: 25px; cursor: pointer; } </style> <script> var overlay = function() { // this keeps track of the // currently exposed div // allowing you to have multiple hidden divs // inside the overlay var visible_div; /** * Hide the overlay * Size it to cover the document * Position the content area of the overlay */ function initialize() { // attach the close funtionality to the close button // you can do this by writing onclick directly into // the html, but this is cleaner $("#overlay_close").click( overlay.close ); // don't assume the overlay is hidden // force hide it $('#overlay_container').addClass('hidden') // set the position and height of the // overlay's content area, based on // the size of the browser var ctrl = $('#'+'overlay_display'); var height = $(window).height() - ctrl.height(); var left = $(window).width()/2 - ctrl.width()/2; ctrl.css( 'height',height+'px'); ctrl.css( "left", left+"px"); } function closeOverlay() { $('#overlay_container').addClass('hidden'); } /** * Clear the contents of the specified div */ function flushDivContents(div_name) { if (!div_name) { div_name = visible_div; } $('#'+div_name).html('') } /** * Display the targeted div, * And Add a message to the top * message bar */ function showDiv(message, div_name) { prepareLayer(message, div_name); var elem = $('#overlay_container'); elem.removeClass('hidden'); } /** * Reset the styling of the overlay * Resize the overlay */ function prepareLayer(message, div_name) { // stretch the overlay to cover // the entire document $('#overlay_container').height( $(document).height() ); $('#overlay').removeClass // hide all existing overlay content divs $(".overlay_content").each(function(i,el){ $(el).addClass('hidden'); }); // expose the content div in which you are interested var target_div = div_name || 'main_overlay_content'; var contents = $("#"+target_div); contents.removeClass('hidden'); visible_div = target_div; // set the message in the top bar of the overlay content var text_el = $('#'+'overlay_message'); text_el.html( message ); } //===================================================== // THIS IS THE EXPOSED PORTION //=================================================== return{ // initialize the overlay, setting heights, etc // run automatically on page load init: function(){ initialize(); }, // hide the overlay close: function(){ closeOverlay(); }, // clear the overlay of content flush: function(div_name){ flushDivContents(div_name); }, // show the overlay content show: function(message, div_name){ showDiv( message, div_name);}, // append the overlay content with more data update: function(content, message, div_name){showDiv(message, div_name);$('#'+div_name).html( "<hr>"+message + "<br>" ); }, // replace the overlay content with new data write: function(content,message,div_name){showDiv(message, div_name); $('#'+div_name).html( message + "<br>" ); } }; }() $(document).ready( function(){overlay.init(); }); </script> <a href='javascript:overlay.show("Here is the message")'>Click here to see the overlay</a> <div id="overlay_container" class="hidden"> <div id="overlay"></div> <div id="overlay_display"> <div id="overlay_toolbar"> <div id="overlay_message"></div> <div id="overlay_close">X</div> </div> <div id="main_overlay_content" class="overlay_content "> This is the content in the main overlay div </div> <div id="second_overlay_content" class="overlay_content "> This is the content in the second overlay div </div> </div> </div> </body> </html>
function foo() { var x =1; // invisible outside function y = 2; // NOT declared. visible, //and can be modified outside this function //AND INSIDE ANY OTHER FUNCTION }This is especially important when you are trying to pass variables into callback functions. To pass a variable to a callback, you have to define the function precisely at the callback:
function getSomeHtml() { param_one = “shizzangiggles”; param_two = 3.14159; function myCallbackFunction(xr, a, b) { … your code } ajax.makeRequest( ‘getHtml’, function( response) { myCallbackFunction(response,param_one,param_two); } );Be careful when you do this. If you declare param_one and param_two above ( “var param_one”), your callback will error out, because these two variables are now inside the scope of the function in which they were originally declared. The callback actually fires OUTSIDE this function, so scope is lost.
var one = 1; var two = 2; var a = function changeOneAndTwo() { one = "1.0"; // changes global variable var two = "2.0"; // this stays local }() alert( "one="+one+", two="+two); // one=1.0, two=2 three = 3 four = 4 var b = function changeThreeAndFour() { var three = "3.0"; // remains local four = "4.0" // global }() alert( "three="+three+", four="+four); // three=3, 4=4.0 var c = function setFiveAndSix() { var five = 5; six = 6; // this is GLOBAL }() var d = function changeFiveAndSix() { five = "5.0"; // this is GLOBAL var six = "6.0"; //this is local }() var f = function displayFiveAndSix() { alert("five="+five) // five=5.0 alert("six="+six); // six=6 }()
if ($x) { doX();}
else{ doY();}
if ( $x ) { doX(); } else { doY(); }
Granted, installing mysql on any Linux box these days is a no brainer. But installing mysql on ubuntu isn't an exception. It's a couple of steps. Nothing more:
Open a terminal window, and type:
That's the only gotcha! Typing "sudo apt-get install mysql" doesn't work. It needs to be" mysql-server".sudo apt-get install mysql-server
Also, if you are running PHP - and you almost certainly are - you may also need to install the php module for mysql 5:
sudo apt-get install php5-mysql
There endeth the lesson!
Search term | Matching pages |
---|---|
Steve Jobs rules | 238,000,000 |
Steve Jobs drools | 4,800,000 |
Steve Jobs sucks | 7,260,000 |
Steve Jobs is evil | 79,000,000 |
Steve Jobs is kind | 228,000,000 |
Steve Jobs created | 183,000,000 |
Steve Jobs destroyed | 13,000,000 |
Steve Jobs was a woman | 277,000,000 |
Steve Jobs was a man | 515,000,000 |
Steve Jobs was a monster | 4,000,000 |
Steve Jobs was a god | 195,000,000 |
var foo = 'duh', fee = 'der', fuu = 'dur';You'll note this only applies to javascript ...
Fred: I think we should be less careless about all lower case vs Camelcase variables.Closure: what you will never get with a javascript programmer who argues that it is going to be the future of the Internet. See also dotNetheads.
Him: Heh. Camelcase.
Fred: Camelcase. Yes. Camelcase.
Him: Heh.
Fred: It's not the same thing asCameltoe.
Him: Heh. You said Cameltoe.
Missing from the [police department's action] is any recognition of potential benefits to be gained from publicly sharing one’s wireless access point. Lately, the virtues of contributing to any shared commons tends to be overshadowed by fears of bad actors (both real and imagined).
Dang nothing to eat tf lls :P ima ask my dad for money for I can go buy somthing
Opera sucks | 17,200,000 |
Firefox sucks | 14,300,000 |
Chrome Sucks | 11,900,000 |
IE Sucks | 6,400,000 |
Safari Sucks | 6,350,000 |
PHP | 25,270,000,000 |
HTML | 25,270,000,000 |
Javascript | 2,000,000,000 |
CSS | 1,190,000,000 |
Java | 979,000,000 |
Ruby | 289,000,000 |
C# | 182,000,000 |
Python | 183,000,000 |
Perl | 155,000,000 |
Visual Basic | 123,000,000 |
Objective C | 38,000,000 |
Cobol | 14,000,000 |
class bigClass2 { var $inClassArr; function bigClass2() { $this->inClassArr = array(); } function dynamicSort($sortorder) { usort ($this->inClassArr, $sortorder); } }
Single handedly, Steve Jobs defined how the secondBut, despite this resentment of Apple procedures and controls, I couldn't help but hold a great admiration for Steve Jobs. No one in the past 20 years has so affected the world. No one has so changed the course of popular culture, technology, and the path our future is now wandering.
decade of the 21st century will be shaped.