Software development tutorials and demos lasting no more than 60 seconds.
No in-depth explanations, no off-topic rants, and no slides. One small topic per video - only code, console, config, and client.
All videos come with a corresponding blog entry, and all code is available on GitHub.
if(!Array.prototype.map){
Array.prototype.map =function(callback/*, thisArg*/){var T, A, k;if(this==null){thrownew TypeError('this is null or not defined');}var O = Object(this);var len = O.length>>>0;if(typeof callback !=='function'){thrownew TypeError(callback +' is not a function');}if(arguments.length>1){
T = arguments[1];}
A =new Array(len);
k =0;while(k < len){var kValue, mappedValue;if(k in O){
kValue = O[k];
mappedValue = callback.call(T, kValue, k, O);
A[k]= mappedValue;}
k++;}return A;};}
If you need a left join in Entity Framework, you have a couple options. First, if you’re using a real foreign key that just happens to be nullable, then you can use the regular navigation properties. But if you’re doing a left join manually, or with other factors, then you need to do things just a little differently: Suppose we have the following database: create table dbo . Foods ( FoodID int not null identity primary key , FoodName varchar ( 100 ) not null ) ; go insert dbo . Foods ( FoodName ) values ( 'Pizza' ) , ( 'Chicken' ) , ( 'Potatoes' ) , ( 'Broccoli' ) ; go create table dbo . People ( PersonID int not null identity primary key , FirstName varchar ( 100 ) not null , FavoriteFoodID int null , constraint FK_Person_FavoriteFoodID foreign key ( FavoriteFoodID ) references dbo . Foods ( FoodID ) ) ; go insert dbo . People ( FirstName , FavoriteFoodID ) values ( 'John' , 1 ) , ...
With JavaScript's spread operator, you can clone an array, or inject the values into another array, or into the parameters of a function. You also can combine the properties of two objects when you build it using an object literal. View code on GitHub
I've had amazingly bad luck with different programs and operating systems, just trying to create bootable thumb drives. In Windows, when creating a Windows bootable USB, this seems to work, with the instructions found here : No promises that this will work everywhere. C:\> diskpart Diskpart> list disk Diskpart> sel disk 1 <-- (the number of your usb) Diskpart> clean Diskpart> create part pri Diskpart> format fs=ntfs quick Diskpart> Active Diskpart> Assign Now copy the install files to the drive, and use it to boot.
Comments
Post a Comment