Javascript share buttons for your website

 

There are just a few steps that need to be followed in order to ensure that the share buttons work.
1. Ensure that jQuery is embedded in the head of the code.
2. Add the JavaScript link of the file which has the share buttons.

<head> 
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>;  
<script src="http://www.steamdev.com/zclip/js/jquery.zclip.min.js">; 
</script>  
<link type="text/css" rel="stylesheet" href="style.css">  
<script src="script.js"></script>  
<link href='http://fonts.googleapis.com/css?family=Exo+2|Audiowide';
rel='stylesheet' type='text/css'>  
<script type="text/javascript" src="/share.min.js"></script  
<title>Colourity</title>  
</head>

3. Trigger the javascript in

 

4. Add text and links to the share properties in HTML.

<body> 
<center> 
<h1 id="color">Colourity</h1> 
<div id="instructions">Press the space bar to get started, then click to 
copy. 
</div>
  
<div class="targetDiv"></div>  

<script type="text/javascript"> 
$('.targetDiv').share({ facebook: { 
name: 'title' 
link: 'url' 
image: 'share image' 
caption: 'picture caption' 
text: 'short description' 
}  

twitter: { 
text: 'tweet text' 
link: 'url' 
}  
gplus: { 
link: 'url' 
}
}); 
</script>

The Network Tab

Important tip from Mat, a Javascript wizpert:

If you’re doing any sort of work on the web it will do you well to get familiar with the Networking tab of your browser. Most browsers have one and it makes troubleshooting a surgical process rather than just shooting in the dark.


https://developer.chrome.com/devtools/docs/network has all the details for chrome.

This tab will show you what’s happening with your page. Any red? You’ve got errors to deal with.

You’ll see quickly which URL is causing trouble and why making issues like “CSS not loading” easy to fix.

The developer tools also have a whole boat load of features. Learn them well and take the guess work out of web development.

Read this wizdom and more like it here

Announcing our partnership with Crossrider

We’re excited to announce our new partnership with Crossrider!

Crossrider is one of the world’s leading platforms for extension development, with over 1 Billion installations. It allows developers to quickly build awesome extensions that support all major browsers, using Javascript.

We are delighted that Crossrider chose Wizpert to provide instant programming help to their community of developers with extensions and related programming questions.

This partnership further validates Wizpert’s reputation as the world’s most helpful community for programmers.

Our experts (wizperts) have helped users with well over 50,000 questions, and we are proud to have been selected for mentoring by students from all the leading online and brick-and-mortar code learning schools and programs.

crossrider

 

 

 

SQL – do you know the basics?

If you can answer these basic questions posed by Simeonc, one of our SQL wizperts, than you are beginning to master SQL.

Answers are provided for your convenience, but no cheating :)



Q.How to retrieve specific columns from a table?
A: The first thing is to know how they are placed into the table.

Q.What is an auto increment?
A: An auto increment is a feature in databases which allows each record to be unique to that table for identification.

Q.What is rownum?
A: A rownum is a special virtual column you get on subqueries in ORACLE.

Q.What is a Sub Query?
A.It’s called a ‘table expression’ and it’s essentially anything that returns a record set, such as views and stored procedures, functions, subqueries.

Q.Can a Sub Query be aliased and considered as a table?
A: Yes it can, only when it is in the FROM statement.

Read this wizdom and more like it here

Testimonial from a serial code learner

This guest post was written by Ron, one of our long time users. [Warning: not for the faint of heart]:

I’ve been working on teaching myself HTML/CSS and JavaScript for the past seven months and have found that virtually all, or at least most of the online tutorials are lacking in several areas.

The main issues are that they do not have the students work through projects, and they do not supply sufficient mentorship to help students in understanding the material and problems put before them.

I have learned the hard way that both of these are essential in learning how to code. You need to have a goal to continuously work towards, a site to build or build upon, and you need to have someone answer your questions and correct you where you went wrong.

This is where Wizpert came in and helped me.

I have worked with Code Academy, Code School, Thinkful, Udemy, Udacity, Lynda, Treehouse, PluralSight, Aquent, Gymnasium and a few others. Some are better than others in teaching the core essentials and all have many good points in the sense that they genuinely appear to want to help people learn to code.

However, in the end, they all (yes all) fall short in teaching budding beginners to fully grasp HTML/ CSS and JavaScript. I have also found the teach-yourself books to be of even less help, even when they are touted by experienced web developers as being of value to beginners. They are more useful as reference material than anything else.

Though several sites actually do provide a “mentor,” with whom you meet once a week…this simply. Does. Not. Work. At this day and age, that’s literally no better than me using the US Postal Service to mail someone my code problem and having them mail their answer back to me. I doubt I am alone when I say that when I need help figuring out why my stupid floating divs aren’t floating the way they’re supposed to, I want an answer right g#@damn now. Which is, again, where Wizpert has come in.

They provided me with the essential help at the drop of a hat, 24/7. I cannot be a loud enough cheerleader for them. When Stack Overflow fails to answer one of my questions, Wizpert comes through, every single time.

Go create an account with Stack Overflow and try, just try to ask them a couple of questions. You’ll soon see why they fail in helping the beginner. They’ll send you home crying because you’re asking (god forbid) for someone’s “opinion” on how you should use that new HTML5 semantic [article] and [section] tags that has everyone confused. If there were no opinions in coding then there would be no need for online tutorials or places like Stack Overflow and every program could be nice and neatly packed into one pretty little book. …don’t even get me started. Stack Overflow is definitely NOT for beginners.

And when Google has failed in dredging up an answer to your padding/margin question, Wizpert is there for you at 11:30 at night to also help you center that pesky div or fix the navigation, padding, margin, linking and hover issues of your unorganized list!!

Did Stack Overflow or Google ever help you figure out how to indent that third checkbox, just a few pixels more to the right?? I didn’t think so. It didn’t help me either. Which, again, is where Wizpert comes in. If you need help in understanding why your If/Else isn’t working or why your loop is infinite, crashing your system. Bam! There’s a wizpert right friggin’ there to help right friggin’ now.

The peace of mind of being able to get help right when I need it, any time of the day, has kept me rolling in my learning where I am now no longer getting hung up for hours and hours on one stupid little issue that turned out to be nothing more than an improper relative URL.

Thanks guys. Thanks for being there, saving me an infinite amount of hours. You’ve helped me from giving up.

Entering the field of programming

If you are a new programmer looking to broaden your horizon and seeking how to get hands on practice with programming then keep reading on.

With the competitive market and flood of web application developers all over the globe. There has risen new markets for various applications, every industry values a programmer with certain programming background based on the core structure of their application.

As a new programmer it is always advisable to start with C programming, no matter how simple the others may seem and how much they attract the crowd. With that in mind, it is also important to notice the market trend in order to jump into the other languages once “C programming” is mastered. Even though it may seem challenging, it is by far the best starting point because it teaches the core of all programming language.

Php, python, ruby and similar web frameworks can be easily mastered once C programming has taken root and strong programming applications in C have been mastered. This not only gives birth to a genuine programmer but also one who has the ability to go back and forth between various different programming languages.

Read this wizdom and more like it here

Working with Nested Divs in CSS

When web programmers work with nested divs, they have to take care of a few things in order to ensure that the nesting works.
 
Our wizpert Wilson provided these small tips, which will save you a lot of time and frustration in developing websites:
 

  1. Ensure that the inner divs have margins, in order to differentiate.
  2. Keep the border color different from the that of the div.
  3. Set a margin for the outermost div and give it a height and width.

Read this wizdom and more like it here

Coding a 9 by 9 Sudoku puzzle in Python

Our wizpert Samiksha created this cool Sudoku puzzle solver in Python.

Coding in python means that it is going to a web application, it involves inputs from a file and outputs to web. Creation of Sudoku puzzle involves a lot of math calculation involved in the laying out of grid properties. Further it also allows beginners to get a flow of how things are done in Python.

The following sample code can be used as a reference point for creation of Sudoku puzzles.

    import os

    cwd = os.getcwd()
    filename = cwd + "/sudoku1.txt"

    grid = []
    l = grid
    with open(filename) as f:
        for line in f:
            grid.append([int(i) for i in line.split()])



    def printGrid(result):  # prints grid with result
        for i in grid:
            print(i)


    def allDifferent1D(l):
        for e in l:
            if e != 0:       # ignores that there are many zeros
                if l.count(e) > 1:    #make sure only has 1 instance of a number
                    return False
        return True



    def allDifferent2D(l):
        for row in l:
            if not allDifferent1D(row):
                return False
        for c in range(len(l)):
            col = []
            for r in range(len(l)):
                col.append(l[r][c])
            if not allDifferent1D(col):
                return False
        return True




    def checkAll3By3s(grid):      #function goes through and assigns numbers in arrays and checks the grid
        for i in [0,3,6]:
            for j in [0,3,6]:
                column = []
                column.append(grid[i][j:j+3])
                column.append(grid[i+1][j:j+3])
                column.append(grid[i+2][j:j+3])
                w =[]
                for k in column:
                    for p in k:
                        w.append(p)

                if allDifferent1D(l) == False:
                    return False
                else:
                    return True 


    def isValidSudoku(grid):  # Check all rows and columns

        if (not allDifferent2D(grid)):
            return False
        if (not checkAll3By3s(grid)):
            return False
        return True


    def complete(grid):   #function that weather parameter is correct solution
        for i in grid:
            for b in i:
                if b == 0:
                    return False    #if it has zeros, then not complete
        else:
            return True    # returns true if there are no zeros



    def checker():       #function to call checkAll3by3
        if checkAll3By3s(grid) == true:
            return grid
        else:
            return False    


    def solveSudoku(grid):     #main function to solve

        if complete(grid) == True:    #
            return grid
        elif isValidSudoku(grid) == False:  #
            return None

        for i in grid:
            for b in range(0,9):   #  goes the indincies
                if i[b] == 0:
                    for w in range(1,10):    # sets w to be a number, 1,2,3,4,5,6,7,8 or 10
                        i[b] = w             # sets the spot in i[b] to the number 
                        c = solveSudoku(grid)   
                        if c != None:        
                            return c   # recursion
                    i[b] = 0      #  sets b back to 0
                    return None   #return none, only happen once we have done everythign





    result = solveSudoku(grid)
    if result != None:
        print("The solution is:")
        printGrid(result)
    else:
        print("There is no solution.")

Read this wizdom and more like it here

Why Bloomberg will never learn how to code

b24584ec

Sorry, Mr. Bloomberg, it’s not personal.

You’ve done some great things for NYC (Wizpert‘s hometown) and you were a great mayor. You’ll just never really know how to code – trust us, it’s something we know a lot about.

It’s easier than ever to learn how to code, and there’s an option for everyone; from free online crash-courses for those who just want to try it out, to full-blown 16 week bootcamps for those who are committed to making it as a fully-fledged developer.

It seems like everybody and their dogs are learning how to code, so it must be really easy, right?

Wrong!

According to a recent article on Mashable: “only 5% of people make it all the way through an online programming course, although 10% complete it if they pay for it.”.

‘Why?’, you ask. Great question! Having helped tens of thousands of code learners, we know what it takes to become a great programmer.

It boils down to these 3 things:

  1. An analytical mind.
  2. Lots of hands-on practice working on real-world projects.
  3. A support network of experienced programmers.

Self-selection ensures the ‘left-brain’ skew among programming learners, and the leading online schools and bootcamps have figured out the importance of letting students get their hands dirty with project work. That covers #1 and #2.

The real challenge, tripping 90%-95% of online code-learners (and many of the brick-and-mortar ones) is the lack of a truly effective support network.

You will have some hard moments, and things will break horribly (guaranteed!). Not having someone there to help you get unstuck often makes giving up the only reasonable option. Sure, there are many helpful resources out there, but they can be extremely overwhelming for a beginner.

Nothing can replace the voice of experience showing you what you did wrong and how to fix it, allowing you to continue to climb up that steep learning curve.

As one of our users explained in a recent email to us (we blanked out the online school names to avoid singling them out): “I’ve tried _____, _____, _____ and _____”, but in the end, I need someone whom I can ask a question at the drop of the hat.”

So, Mr. Bloomberg. You’re clearly very smart and analytical, and could accomplish anything you set your mind to. But even after stepping down as mayor, we question your commitment to spending the time it takes to not only go through some online coursework, but to also to get your hands dirty with ‘Hello World’, Fibonacci sequence and vowel counter.

If you ever do decide to (really) take the plunge though, our wizperts are there for you, and would be happy to serve as your support network, as they’ve done for so many others.

Good luck!