An algebraic structure or algebraic system is a nonempty set together with one or more binary operations on that set.
An algebraic structure or algebraic system is a nonempty set together with one or more binary operations on that set.
Ahead-of-time (AOT) compilation
از قبل با ngc کامپایل کنیم.
Angular module
برای شکستن قابلیت ها به اجزای کوچک تر. هر module دارای component ها، directive ها و pipe هایی است.
Annotation
همان Decoration
Attribute directives
دسته ای از directive ها که می توانند ویژگی های عناصر HTML را تغییر دهند.
Proctactor
یک چارچوب کامل تست برنامه های Angular می باشد.
spec
Observable
برای کار بصورت آسنکرون با collection ها به کار می رود و در کار با داده های سنگین تاثیر زیادی دارد و جدیدتر از Promise می باشد.
چه زمانی پای Observable وسط می آید؟ وقتی که قرار است یک Collection از دیتا، Fetch شود.
چرا آسنکرون؟ شما درخواست دریافت داده های یک لیست را به سرور از طریق یک API داده اید. حالا باید صبر کنید تا داده برگردد. در این صورت همه چیز فریز می شود. در روش آسنکرون این اتفاق نمی افتد. به قول بعضی اساتید ما شبیه ترمز ABS عمل می کند: میخ نمی شود.
ionic framework
چارچوبی است که با استفاده از آن می توان از کد AngularJS 2 خروجی Anroid و iOS گرفت. به عنوان IDE می توان از Android Studio برای کار با آن استفاده کرد. ionic framework مشابه react native می باشد.
Postman
یک افزودنی Google Chrome که برای تست API ها بسیار مفید است. این مورد مستقیماً به Angular مربوط نیست ولی چون عملاً در پروژه ها کاربرد دارد در اینجا آورده شود.
import { Injectable } from '@angular/core'; | |
import { Router, CanActivate } from '@angular/router'; | |
import { tokenNotExpired } from 'angular2-jwt'; | |
@Injectable() | |
export class AuthGuard implements CanActivate { | |
constructor(private router: Router) {} | |
canActivate() { | |
if (tokenNotExpired()) { | |
return true; | |
} | |
this.router.navigate(['/login']); | |
return false; | |
} | |
} RouterOutlet |
Acts as a placeholder that Angular dynamically fills based on the current router state.
USE [DB_Name]
ALTER TABLE Foreign_Key_Table
ADD CONSTRAINT FK_ForiegnKeyTable_PrimaryKeyTable FOREIGN KEY (ForeignKeyColumn)
REFERENCES PrimaryKeyTable(PrimaryKeyTable_PrimaryKeyColumn);
You can try this. Open Device Manager and expand Sound, video and game controllers. Right click your audio controller (if you have two showing start with the top one) select Update driver software... and in the pop-up select 'Browse my computer for driver software'. Select 'Let me pick from a list of drivers on my computer', the resulting pop-up will show a list. The one with the blue tinted certificate icon is the one currently used and doesn't work. Start from the bottom if you have a list and click on it, then select the next tab. You might get an error warning that the device won't work if you install that driver. Just carry on installing. The sound icon might also show the red diagonal line. Reboot and let the driver install for a few seconds then try the volume slider on the speaker icon in the notification area. Repeat this untill you find one that works. If none work return to the original driver and keep checking windows update.
یک تفاوت مهم این است که datalength تعداد بایت و len تعداد کاراکتر را می شمارد.
http://sqlhints.com/tag/sql-len-vs-datalength/
شخصی به نام پل آدریان موریس دیراک (Paul Adrien Maurice Dirac)، نمادگذاری جمع و جور و قدرتمندی را معرفی کرد که هم در فضای برداری و هم در فضای هیلبرت کاربرد دارد. به هر تابع موج ψ یک بردار حالت نسبت داده میشود که به آن «کت» گفته میشود. همچنین به هر مزدوج مختلطِ تابع موجِ φ، یعنیφ* ، یک بردار حالت نسبت داده میشود که «برا» نام دارد. ضرب داخلی(φ,ψ) ، با «برا-کت» نشان داده میشود.
--تابع بررسی معتبر بودن کد ملی --tsql
ALTER FUNCTION [dbo].[Is_A_Valid_National_ID](@NationalID CHAR(10))
RETURNS BIT
AS
BEGIN
DECLARE @National_ID_Validation_Result BIT = 1--true;
IF LEN(@NationalID)>10
BEGIN
SET @National_ID_Validation_Result = 0--false;
RETURN @National_ID_Validation_Result;
END
--تکمیل کمبود احتمالی صفرهای سمت چپ کد ملی
SET @NationalID=REPLICATE('0',10-LEN(@NationalID))+@NationalID
-- اندازه کد ملی نباید بیشتر از ده کاراکتر باشد
-- کد ملی تنها باید شامل ارقام 0 تا 9 باشد
IF ISNUMERIC(@NationalID+'.0e0')=0
BEGIN
SET @National_ID_Validation_Result = 0--false;
RETURN @National_ID_Validation_Result;
END
--بیش از دو صفر در سمت چپ کد ملی معتبر نیست
IF SUBSTRING(@NationalID, 1, 1)=0 AND SUBSTRING(@NationalID, 2, 1)=0 AND SUBSTRING(@NationalID, 3, 1)=0
BEGIN
SET @National_ID_Validation_Result = 0--false;
RETURN @National_ID_Validation_Result;
END
--تمام ارقام کد ملی نمیتواند یکسان باشد
IF (@NationalID='0000000000' OR @NationalID='1111111111' OR @NationalID='2222222222' OR @NationalID='3333333333'
OR @NationalID='4444444444' OR @NationalID='5555555555' OR @NationalID='6666666666' OR @NationalID='7777777777'
OR @NationalID='8888888888' OR @NationalID='9999999999' )
BEGIN
SET @National_ID_Validation_Result = 0--false;
RETURN @National_ID_Validation_Result;
END
--مقدار خانه کنترل باید صحیح باشد
-- خانه کنترل رقم سمت راست میباشد. در صورتی که باقیمانده مجموع ضرب موقعیت در مقدار
-- خانهها کنتر از دو باشد همین مقدار باقیمانده باید در خانه کنترل قرار گرفته باشد و در غیر اینصورت
-- تفاضل یازده با باقیمانده فوق مقدار خانه کنترل را تشکیل می دهد
BEGIN
DECLARE @b AS INT;
SET @b=((10*SUBSTRING(@NationalID, 1, 1)+9*SUBSTRING(@NationalID, 2, 1)+8*SUBSTRING(@NationalID, 3, 1)+7*SUBSTRING(@NationalID, 4, 1)+6*SUBSTRING(@NationalID, 5, 1)+5*SUBSTRING(@NationalID, 6, 1)+4*SUBSTRING(@NationalID, 7, 1)+3*SUBSTRING(@NationalID, 8, 1)+2*SUBSTRING(@NationalID,9, 1))%11)
DECLARE @ControlBit AS TINYINT=SUBSTRING(@NationalID,10,1)
IF @b<2
BEGIN
IF @ControlBit!=@b SET @National_ID_Validation_Result = 0--false;
END
IF @b>=2
BEGIN
IF @ControlBit!=11-@b SET @National_ID_Validation_Result = 0;
END
END
RETURN @National_ID_Validation_Result;
END
GO
-- شیوه تست تابع
DECLARE @code AS CHAR(10)
SET @code='123456789'--این مقدار را به دلخواه خود تنظیم نمایید.
PRINT dbo.Is_A_Valid_National_ID(@code)
The TRY…CATCH construct cannot be used in a user-defined function.
Error handling is restricted in a user-defined function. A UDF does not support TRY…CATCH, @ERROR or RAISERROR.
function checkMelliCode(varmellicode)
{
var meli_code;
meli_code=varmellicode.value;
if (meli_code.length == 10)
{
if(meli_code==’1111111111′ ||
meli_code==’0000000000′ ||
meli_code==’2222222222′ ||
meli_code==’3333333333′ ||
meli_code==’4444444444′ ||
meli_code==’5555555555′ ||
meli_code==’6666666666′ ||
meli_code==’7777777777′ ||
meli_code==’8888888888′ ||
meli_code==’9999999999′ )
{
alert(”کد ملی صحیح نمی باشد”);
objcode.focus();
return false;
}
c = parseInt(meli_code.charAt(9));
n = parseInt(meli_code.charAt(0))*10 +
parseInt(meli_code.charAt(1))*9 +
parseInt(meli_code.charAt(2))*8 +
parseInt(meli_code.charAt(3))*7 +
parseInt(meli_code.charAt(4))*6 +
parseInt(meli_code.charAt(5))*5 +
parseInt(meli_code.charAt(6))*4 +
parseInt(meli_code.charAt(7))*3 +
parseInt(meli_code.charAt(8))*2;
r = n - parseInt(n/11)*11;
if ((r == 0 && r == c) || (r == 1 && c == 1) || (r > 1 && c == 11 - r))
{
return true;
}
else
{
alert(”کد ملی صحیح نمی باشد”);
objcode.focus();
return true;
}
}
else
{
return true;
}
1. Play Earth and Moon
2. Create "scrap boxes" for favorite places
3. Build a simple bird feeder
4. Put on a show with toys
5. Arrange food art
6. Make bubbles
7. Camp out in the living room
8. Watch the clouds
9. Shake, rattle, and roll
10. Tell stories to music
By Melissa Sandness
Last updated: October 2015
When you're playing with your preschooler, even favorite games can lose their appeal after a while – for both of you. Here are some easy activities to try when the old standbys become a little ho-hum.
1. Play Earth and Moon
Bill Herbert, father of three and longtime third-grade teacher, invented the game Earth and Moon with his daughter Melanie when she was 4 years old.
To play, give your child a flashlight with a wide beam and grab a flashlight that has a narrow beam (a laser pointer will also work). Lie together faceup on a bed in a dark room. Your child's job is to make the Earth (the wide beam) move in large, slow circles around the ceiling. Your job is to keep the moon (the narrow beam) orbiting the Earth.
2. Create "scrap boxes" for favorite places
On an outing to a favorite place – a park or another place you like to visit – gather things particular to that spot, like shiny rocks or acorns. Take photos of mementos that won't last, like colorful leaves.
Once you're home, help your child decorate a box to store your collection. For example, have her draw a picture (or print out a photo) of the place and glue it to the box top. Then let her color and embellish it any way she'd like. Make a different box for each of your favorite places.
Then on those days you need to stay inside, you can snuggle up with your child and relive your favorite outings as you sift through the treasures you've collected.
Crafts: Toilet paper roll animals
Play Video
Watch how toilet paper rolls can be used to create three fun animal crafts. Add a little imagination and you're ready to rock! See all videos
3. Build a simple bird feeder
To attract more feathered friends to your yard, here are two quick ideas for DIY bird feeders. You'll need birdseed, peanut butter, empty toilet paper rolls or cut-up empty paper towel rolls, an orange or a grapefruit, and twine.
To make the first feeder, sprinkle birdseed on a container that has a rim, like plate or pie tin. Help your child spread a thin layer of peanut butter on the outside of the paper rolls, then have him roll the peanut butter coating in the birdseed until it's well covered.
Slip the feeders right over tree branches or use twine to hang them up.
You can make two feeders from an orange. (You can also use a grapefruit.)
Parent prepwork: Cut the fruit in half and carefully scoop out the fruit, leaving plenty of thick rind. Use a skewer to poke a small hole in opposite sides of each orange half, about a half inch from the top. Then thread a long piece of twine through both holes, and knot the ends of the twine together to make a hanger.
Help your child combine the peanut butter and birdseed and spoon the mixture into each orange half. Hang it up outside.
4. Put on a show with toys
Have your child help you gather a cast of dolls, stuffed animals, and toy figures. Divide them up between the two of you and act out a play, using different voices for the different dolls and animals. Improvise as you go – half the fun is taking the action in a silly direction.
Another option: Host a talent show and have each character sing a song or tell a joke or story.
5. Arrange food art
Raid the refrigerator and fruit bowl for "art supplies" that you and your child can arrange into pictures on a large plate. Cut up carrots, cucumbers, grapes, or other colorful fruits and vegetables for inspiration. The two of you can create anything from a clown or train to a beautiful piece of abstract art. Use olives for eyes, round crackers for wheels, slices of cheese as windows – the possibilities are endless.
And then the real fun begins: Eating your masterpiece!
6. Make bubbles
Make your own bubble solution by mixing one part dishwashing detergent with 10 parts water and adding a little glycerin or corn syrup to make the bubbles hold. Your child can use almost any open-ended object to make bubbles, like the rings from a six-pack of soda. Try making bigger and bigger bubbles!
7. Camp out in the living room
Campouts are always fun, but the ones in your living-room have the added bonus of such creature comforts as carpeting and access to the kitchen and bathroom.
Pitch a small pup tent, or make your own by draping blankets over carefully arranged furniture. Then pull out the sleeping bags, pillows, and flashlights for a real camping experience. The "tent" can stay up for as long as you want, making it easy for you and your child to go camping anytime.
8. Watch the clouds
Grab a blanket, lie on your back in the backyard or in a park with your child, and watch the clouds float by. Talk to your child about what shapes he sees and compare notes: Where your child sees a pony, you may see a whale. Feel free to get silly ("Is that a dog with an umbrella?") or contemplative. ("That cloud looks like love.")
9. Shake, rattle, and roll
Turn on the music and move! "My daughter Ashley and I love to dance around the living room," says Steve Brum, a father of three from Hayward, California. "It's one activity that's guaranteed to get us both laughing." You and your child can jam to the Funky Chicken or make up your own moves.
10. Tell stories to music
Kids love to hear you make up stories, and you can get your inspiration from your own music collection (and increase your child's appreciation of music to boot). Start simple with a recognizable, instrumental tune and storyline, like Prokofiev's "Peter and the Wolf."
You don't have to tell the story exactly as you remember it – embellish a little, replacing the main character with your child or introducing a new character that will fascinate your child, like a dinosaur. Stop often and ask your child if he'd like to add to the story.
You'll be amazed at how music helps you both move the plot line along: Beating drums sound like someone trotting through the forest. A flute is a little bird in the sky, telling the animals which direction to go, and a violin means the sun is setting. Before long, you'll most likely hit on some favorites that both you and your child will enjoy recounting.
Discuss this topic