Skip to content

Integrate JS Lint / JS Hint with Visual Studio 2010

Step 1 : Download JSLint from following URL.

http://goo.gl/EmLn5

Step 2 : Run this tool.

Step 3 : Open Visual Studio 2010

Step 4 : Open Tools -> JS Lint  Options… (see screensot)

Image

 

 

 

 

 

 

 

 

Step 5 : Select your settings :

Image

 

Step 6 : Choose JS Hint Settings :

Image

 

Step 7 : JS Lint / JS Hint ready to use :

Image

How to retrieve all choice field values using ecmascript – SharePoint 2010

I had a requirenment to get all the choice values in one of my choice colums in a list, and I want to add these values into a html dropdown on page load.

Just copy and paste the bellow code inside script tag and change ListName, ColumnName and Dropdown Id :

  • window.onload = retrieveListItems;
    var deptChoiceField;
  • function retrieveListItems() {
            varclientContext = SP.ClientContext.get_current();
            var webSite = clientContext.get_web();
            var lists = webSite.get_lists();
            var oList = lists.getByTitle(“ListName“);
    deptChoiceField = clientContext.castTo(oList.get_fields().getByInternalNameOrTitle(“ColumnName“),SP.FieldChoice);
    clientContext.load(deptChoiceField);
    clientContext.executeQueryAsync(
    Function.createDelegate(this, this.fillDropDown),
    Function.createDelegate(this, this.onListDataLoadQueryFailed));
    }
  • function onListDataLoadQueryFailed(sender, args) {
    alert(‘Request failed. ‘ + args.get_message() + ‘\n’ + args.get_stackTrace());
    }
  • function fillDropDown() {
    var choices = deptChoiceField.get_choices();
         var ddlCategory = document.getElementById(‘ddl‘);
         if (ddlCategory != null)
    {
                for (var i = 0; i < choices.length; i++)
    {
                      var theOption = new Option;
    theOption.text = choices[i];
    ddlCategory.options[i] = theOption;
    }
    }
    }

How to remove all hyperlinks in Microsoft word – 2003/2007

Just follow some simple steps given below and see the magic.

  • Open your MS word Document.
  • Press “Alt+F11″ – it will open the Visual Basic Editor
  • Click Insert on Menu bar
  • Click Module

In the new pop-up window copy following:

  • Sub RemoveHyperlinks()
  • Dim oField As Field
  • For Each oField In ActiveDocument.Fields
  • If oField.Type = wdFieldHyperlink Then
  • oField.Unlink
  • End If
  • Next
  • Set oField = Nothing
  • End Sub

Then click File and Close and return to Microsoft Word

After that Run Macro – Tools > Macro > Macro and then Run “RemoveAllHyperlinks”

If you are using word 2007 then click word option
Word Option

then check Show Developer tab in the Ribbon and click OK.

Now click Developer tab Macros and  Run “RemoveAllHyperlinks”.

HTML Color Codes and Names

Major hexadecimal color codes

Color Color Code Color Color Code
Red #FF0000 White #FFFFFF
Cyan #00FFFF Silver #C0C0C0
Blue #0000FF Grey #808080
Dark Blue #0000A0 Black #000000
Light Purple #FF0080 Orange #FFA500
Purple #800080 Brown #A52A2A
Yellow #FFFF00 Maroon #800000
Lime #00FF00 Green #008000
Fuchsia #FF00FF Olive #808000

Other Colors

COLOR NAME CODE COLOR
Black #000000 Black
Gray0 #150517 Gray0
Gray18 #250517 Gray18
Gray21 #2B1B17 Gray21
Gray23 #302217 Gray23
Gray24 #302226 Gray24
Gray25 #342826 Gray25
Gray26 #34282C Gray26
Gray27 #382D2C Gray27
Gray28 #3B3131 Gray28
Gray29 #3E3535 Gray29
Gray30 #413839 Gray30
Gray31 #41383C Gray31
Gray32 #463E3F Gray32
Gray34 #4A4344 Gray34
Gray35 #4C4646 Gray35
Gray36 #4E4848 Gray36
Gray37 #504A4B Gray37
Gray38 #544E4F Gray38
Gray39 #565051 Gray39
Gray40 #595454 Gray40
Gray41 #5C5858 Gray41
Gray42 #5F5A59 Gray42
Gray43 #625D5D Gray43
Gray44 #646060 Gray44
Gray45 #666362 Gray45
Gray46 #696565 Gray46
Gray47 #6D6968 Gray47
Gray48 #6E6A6B Gray48
Gray49 #726E6D Gray49
Gray50 #747170 Gray50
Gray #736F6E Gray
Slate Gray4 #616D7E Slate Gray4
Slate Gray #657383 Slate Gray
Light Steel Blue4 #646D7E Light Steel Blue4
Light Slate Gray #6D7B8D Light Slate Gray
Cadet Blue4 #4C787E Cadet Blue4
Dark Slate Gray4 #4C7D7E Dark Slate Gray4
Thistle4 #806D7E Thistle4
Medium Slate Blue #5E5A80 Medium Slate Blue
Medium Purple4 #4E387E Medium Purple4
Midnight Blue #151B54 Midnight Blue
Dark Slate Blue #2B3856 Dark Slate Blue
Dark Slate Gray #25383C Dark Slate Gray
Dim Gray #463E41 Dim Gray
Cornflower Blue #151B8D Cornflower Blue
Royal Blue4 #15317E Royal Blue4
Slate Blue4 #342D7E Slate Blue4
Royal Blue #2B60DE Royal Blue
Royal Blue1 #306EFF Royal Blue1
Royal Blue2 #2B65EC Royal Blue2
Royal Blue3 #2554C7 Royal Blue3
Deep Sky Blue #3BB9FF Deep Sky Blue
Deep Sky Blue2 #38ACEC Deep Sky Blue2
Slate Blue #357EC7 Slate Blue
Deep Sky Blue3 #3090C7 Deep Sky Blue3
Deep Sky Blue4 #25587E Deep Sky Blue4
Dodger Blue #1589FF Dodger Blue
Dodger Blue2 #157DEC Dodger Blue2
Dodger Blue3 #1569C7 Dodger Blue3
Dodger Blue4 #153E7E Dodger Blue4
Steel Blue4 #2B547E Steel Blue4
Steel Blue #4863A0 Steel Blue
Slate Blue2 #6960EC Slate Blue2
Violet #8D38C9 Violet
Medium Purple3 #7A5DC7 Medium Purple3
Medium Purple #8467D7 Medium Purple
Medium Purple2 #9172EC Medium Purple2
Medium Purple1 #9E7BFF Medium Purple1
Light Steel Blue #728FCE Light Steel Blue
Steel Blue3 #488AC7 Steel Blue3
Steel Blue2 #56A5EC Steel Blue2
Steel Blue1 #5CB3FF Steel Blue1
Sky Blue3 #659EC7 Sky Blue3
Sky Blue4 #41627E Sky Blue4
Slate Blue #737CA1 Slate Blue
Slate Blue #737CA1 Slate Blue
Slate Gray3 #98AFC7 Slate Gray3
Violet Red #F6358A Violet Red
Violet Red1 #F6358A Violet Red1
Violet Red2 #E4317F Violet Red2
Deep Pink #F52887 Deep Pink
Deep Pink2 #E4287C Deep Pink2
Deep Pink3 #C12267 Deep Pink3
Deep Pink4 #7D053F Deep Pink4
Medium Violet Red #CA226B Medium Violet Red
Violet Red3 #C12869 Violet Red3
Firebrick #800517 Firebrick
Violet Red4 #7D0541 Violet Red4
Maroon4 #7D0552 Maroon4
Maroon #810541 Maroon
Maroon3 #C12283 Maroon3
Maroon2 #E3319D Maroon2
Maroon1 #F535AA Maroon1
Magenta #FF00FF Magenta
Magenta1 #F433FF Magenta1
Magenta2 #E238EC Magenta2
Magenta3 #C031C7 Magenta3
Medium Orchid #B048B5 Medium Orchid
Medium Orchid1 #D462FF Medium Orchid1
Medium Orchid2 #C45AEC Medium Orchid2
Medium Orchid3 #A74AC7 Medium Orchid3
Medium Orchid4 #6A287E Medium Orchid4
Purple #8E35EF Purple
Purple1 #893BFF Purple1
Purple2 #7F38EC Purple2
Purple3 #6C2DC7 Purple3
Purple4 #461B7E Purple4
Dark Orchid4 #571B7e Dark Orchid4
Dark Orchid #7D1B7E Dark Orchid
Dark Violet #842DCE Dark Violet
Dark Orchid3 #8B31C7 Dark Orchid3
Dark Orchid2 #A23BEC Dark Orchid2
Dark Orchid1 #B041FF Dark Orchid1
Plum4 #7E587E Plum4
Pale Violet Red #D16587 Pale Violet Red
Pale Violet Red1 #F778A1 Pale Violet Red1
Pale Violet Red2 #E56E94 Pale Violet Red2
Pale Violet Red3 #C25A7C Pale Violet Red3
Pale Violet Red4 #7E354D Pale Violet Red4
Plum #B93B8F Plum
Plum1 #F9B7FF Plum1
Plum2 #E6A9EC Plum2
Plum3 #C38EC7 Plum3
Thistle #D2B9D3 Thistle
Thistle3 #C6AEC7 Thistle3
Lavender Blush2 #EBDDE2 Lavender Blush2
Lavender Blush3 #C8BBBE Lavender Blush3
Thistle2 #E9CFEC Thistle2
Thistle1 #FCDFFF Thistle1
Lavender #E3E4FA Lavender
Lavender Blush #FDEEF4 Lavender Blush
Light Steel Blue1 #C6DEFF Light Steel Blue1
Light Blue #ADDFFF Light Blue
Light Blue1 #BDEDFF Light Blue1
Light Cyan #E0FFFF Light Cyan
Slate Gray1 #C2DFFF Slate Gray1
Slate Gray2 #B4CFEC Slate Gray2
Light Steel Blue2 #B7CEEC Light Steel Blue2
Turquoise1 #52F3FF Turquoise1
Cyan #00FFFF Cyan
Cyan1 #57FEFF Cyan1
Cyan2 #50EBEC Cyan2
Turquoise2 #4EE2EC Turquoise2
Medium Turquoise #48CCCD Medium Turquoise
Turquoise #43C6DB Turquoise
Dark Slate Gray1 #9AFEFF Dark Slate Gray1
Dark Slate Gray2 #8EEBEC Dark slate Gray2
Dark Slate Gray3 #78c7c7 Dark Slate Gray3
Cyan3 #46C7C7 Cyan3
Turquoise3 #43BFC7 Turquoise3
Cadet Blue3 #77BFC7 Cadet Blue3
Pale Turquoise3 #92C7C7 Pale Turquoise3
Light Blue2 #AFDCEC Light Blue2
Dark Turquoise #3B9C9C Dark Turquoise
Cyan4 #307D7E Cyan4
Light Sea Green #3EA99F Light Sea Green
Light Sky Blue #82CAFA Light Sky Blue
Light Sky Blue2 #A0CFEC Light Sky Blue2
Light Sky Blue3 #87AFC7 Light Sky Blue3
Sky Blue #82CAFF Sky Blue
Sky Blue2 #79BAEC Sky Blue2
Light Sky Blue4 #566D7E Light Sky Blue4
Sky Blue #6698FF Sky Blue
Light Slate Blue #736AFF Light Slate Blue
Light Cyan2 #CFECEC Light Cyan2
Light Cyan3 #AFC7C7 Light Cyan3
Light Cyan4 #717D7D Light Cyan4
Light Blue3 #95B9C7 Light Blue3
Light Blue4 #5E767E Light Blue4
Pale Turquoise4 #5E7D7E Pale Turquoise4
Dark Sea Green4 #617C58 Dark Sea Green4
Medium Aquamarine #348781 Medium Aquamarine
Medium Sea Green #306754 Medium Sea Green
Sea Green #4E8975 Sea Green
Dark Green #254117 Dark Green
Sea Green4 #387C44 Sea Green4
Forest Green #4E9258 Forest Green
Medium Forest Green #347235 Medium Forest Green
Spring Green4 #347C2C Spring Green4
Dark Olive Green4 #667C26 Dark Olive Green4
Chartreuse4 #437C17 Chartreuse4
Green4 #347C17 Green4
Medium Spring Green #348017 Medium Spring Green
Spring Green #4AA02C Spring Green
Lime Green #41A317 Lime Green
Spring Green #4AA02C Spring Green
Dark Sea Green #8BB381 Dark Sea Green
Dark Sea Green3 #99C68E Dark Sea Green3
Green3 #4CC417 Green3
Chartreuse3 #6CC417 Chartreuse3
Yellow Green #52D017 Yellow Green
Spring Green3 #4CC552 Spring Green3
Sea Green3 #54C571 Sea Green3
Spring Green2 #57E964 Spring Green2
Spring Green1 #5EFB6E Spring Green1
Sea Green2 #64E986 Sea Green2
Sea Green1 #6AFB92 Sea Green1
Dark Sea Green2 #B5EAAA Dark Sea Green2
Dark Sea Green1 #C3FDB8 Dark Sea Green1
Green #00FF00 Green
Lawn Green #87F717 Lawn Green
Green1 #5FFB17 Green1
Green2 #59E817 Green2
Chartreuse2 #7FE817 Chartreuse2
Chartreuse #8AFB17 Chartreuse
Green Yellow #B1FB17 Green Yellow
Dark Olive Green1 #CCFB5D Dark Olive Green1
Dark Olive Green2 #BCE954 Dark Olive Green2
Dark Olive Green3 #A0C544 Dark Olive Green3
Yellow #FFFF00 Yellow
Yellow1 #FFFC17 Yellow1
Khaki1 #FFF380 Khaki1
Khaki2 #EDE275 Khaki2
Goldenrod #EDDA74 Goldenrod
Gold2 #EAC117 Gold2
Gold1 #FDD017 Gold1
Goldenrod1 #FBB917 Goldenrod1
Goldenrod2 #E9AB17 Goldenrod2
Gold #D4A017 Gold
Gold3 #C7A317 Gold3
Goldenrod3 #C68E17 Goldenrod3
Dark Goldenrod #AF7817 Dark Goldenrod
Khaki #ADA96E Khaki
Khaki3 #C9BE62 Khaki3
Khaki4 #827839 Khaki4
Dark Goldenrod1 #FBB117 Dark Goldenrod1
Dark Goldenrod2 #E8A317 Dark Goldenrod2
Dark Goldenrod3 #C58917 Dark Goldenrod3
Sienna1 #F87431 Sienna1
Sienna2 #E66C2C Sienna2
Dark Orange #F88017 Dark Orange
Dark Orange1 #F87217 Dark Orange1
Dark Orange2 #E56717 Dark Orange2
Dark Orange3 #C35617 Dark Orange3
Sienna3 #C35817 Sienna3
Sienna #8A4117 Sienna
Sienna4 #7E3517 Sienna4
Indian Red4 #7E2217 Indian Red4
Dark Orange3 #7E3117 Dark Orange3
Salmon4 #7E3817 Salmon4
Dark Goldenrod4 #7F5217 Dark Goldenrod4
Gold4 #806517 Gold4
Goldenrod4 #805817 Goldenrod4
Light Salmon4 #7F462C Light Salmon4
Chocolate #C85A17 Chocolate
Coral3 #C34A2C Coral3
Coral2 #E55B3C Coral2
Coral #F76541 Coral
Dark Salmon #E18B6B Dark Salmon
Salmon1 #F88158 Pale Turquoise4
Salmon2 #E67451 Salmon2
Salmon3 #C36241 Salmon3
Light Salmon3 #C47451 Light Salmon3
Light Salmon2 #E78A61 Light Salmon2
Light Salmon #F9966B Light Salmon
Sandy Brown #EE9A4D Sandy Brown
Hot Pink #F660AB Hot Pink
Hot Pink1 #F665AB Hot Pink1
Hot Pink2 #E45E9D Hot Pink2
Hot Pink3 #C25283 Hot Pink3
Hot Pink4 #7D2252 Hot Pink4
Light Coral #E77471 Light Coral
Indian Red1 #F75D59 Indian Red1
Indian Red2 #E55451 Indian Red2
Indian Red3 #C24641 Indian Red3
Red #FF0000 Red
Red1 #F62217 Red1
Red2 #E41B17 Red2
Firebrick1 #F62817 Firebrick1
Firebrick2 #E42217 Firebrick2
Firebrick3 #C11B17 Firebrick3
Pink #FAAFBE Pink
Rosy Brown1 #FBBBB9 Rosy Brown1
Rosy Brown2 #E8ADAA Rosy Brown2
Pink2 #E7A1B0 Pink2
Light Pink #FAAFBA Light Pink
Light Pink1 #F9A7B0 Light Pink1
Light Pink2 #E799A3 Light Pink2
Pink3 #C48793 Pink3
Rosy Brown3 #C5908E Rosy Brown3
Rosy Brown #B38481 Rosy Brown
Light Pink3 #C48189 Light Pink3
Rosy Brown4 #7F5A58 Rosy Brown4
Light Pink4 #7F4E52 Light Pink4
Pink4 #7F525D Pink4
Lavender Blush4 #817679 Lavender Blush4
Light Goldenrod4 #817339 Light Goldenrod4
Lemon Chiffon4 #827B60 Lemon Chiffon4
Lemon Chiffon3 #C9C299 Lemon Chiffon3
Light Goldenrod3 #C8B560 Light Goldenrod3
Light Golden2 #ECD672 Light Golden2
Light Goldenrod #ECD872 Light Goldenrod
Light Goldenrod1 #FFE87C Light Goldenrod1
Lemon Chiffon2 #ECE5B6 Lemon Chiffon2
Lemon Chiffon #FFF8C6 Lemon Chiffon
Light Goldenrod Yellow #FAF8CC Light Goldenrod Yellow

 

Integrate JSLint in Visual Studio .net

Step 1 : Download JSLint from following url.

http://www.javascriptlint.com/download.htm

Step 2 : Extract all the files to your ‘ C ‘ hard drive.

Step 3 : Open Visual Studio 2005/2008/2010

Step 4 : Open Tools -> External Tools (see screensot)

External-tools

External-tools

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Dialog appears.

Step 5 : Add new external tool (see screenshot)

 JS LINT

JS LINT

 

 

 

 

 

 

 

 

 

 

 

 

 

  • Click on Add Button
  • Type Title e.g. JSLint
  • Type Command: C:\jsl-0.3.0\jsl.exe
  • Type Arguments: –conf C:\jsl-0.3.0\jsl.default.conf -process $(ItemPath)
  • Type Initial directory[x]
  • Check “Use Output window” checkbox
  • Click on “Apply” button
  • Click on “OK” button

Some Interesting Laws

  • Law of Mechanical Repair – After your hands become coated with grease, your nose will begin to itch and you’ll have to pee.
  • Law of Gravity – Any tool, nut, bolt, screw, when dropped, will roll to the least accessible corner.
  • Law of Probability -The probability of being watched is directly proportional to the stupidity of your act
  • Law of Random Numbers – If you dial a wrong number, you never get a busy signal and someone always answers.
  • Law of the Alibi – If you tell the boss you were late for work because you had a flat tire, the very next morning you will have a flat tire.
  • Variation Law – If you change lines (or traffic lanes), the one you were in will always move faster than the one you are in now (works every time).
  • Law of the Bath – When the body is fully immersed in water, the telephone rings.
  • Law of Close Encounters -The probability of meeting someone you know increases dramatically when you are with someone you don’t want to be seen with.
  • Law of the Result – When you try to prove to someone that a machine won’t work, it will.
  • Law of bio mechanics – The severity of the itch is inversely proportional to the reach.
  • Law of the Theater and Hockey Arena – At any event, the people whose seats are furthest from the aisle, always arrive last. They are the ones who will leave their seats several times to go for food, beer, or the toilet and who leave early before the end of the performance or the game is over. The folks in the aisle seats come early, never move once, have long gangly legs or big bellies, and stay to the bitter end of the performance. The aisle people also are very surly folk.
  • The Coffee Law – As soon as you sit down to a cup of hot coffee, your boss will ask you to do something which will last until the coffee is cold.
  • Murphy’s Law of Lockers – If there are only two people in a locker room, they will have adjacent lockers.
  • Law of Physical Surfaces – The chances of an open-faced jelly sandwich landing face down on a floor, are directly correlated to the newness and cost of the carpet or rug.
  • Law of Logical Argument – Anything is possible if you don’t know what you are talking about.
  • Brown’s Law of Physical Appearance – If the clothes fit, they’re ugly.
  • Oliver’s Law of Public Speaking – A closed mouth gathers no feet.
  • Wilson’s Law of Commercial Marketing Strategy – As soon as you find a product that you really like, they will stop making it.
  • Doctors’ Law – If you don’t feel well, make an appointment to go to the doctor, by the time you get there you’ll feel better. But don’t make an appointment, and you’ll stay sick.

LAILATUL-QADR, What,When and how to seek ? (via ISLAMIC SOCIETY FOR LEARNING AND HUMANITY)

Its excellence is great, since in this night the Noble Qur'aan was sent down, which leads one who clings to it, to the path of honour and nobility, and raises him to the summit of distinction and everlasting life. The Muslims who adhere strictly to the Sunnah of Allaah's Messenger SAW do not raise flags on this night, nor suspend colourful decorations. Rather they vie in standing during it (Lailatul-Qadr) in Prayer out of sincere faith and hoping … Read More

via ISLAMIC SOCIETY FOR LEARNING AND HUMANITY

Follow

Get every new post delivered to your Inbox.

Join 47 other followers

%d bloggers like this: