News Ticker

Latest Posts
Browsing Category "Solution"

TOP 10 Website to Earn Money Online 100% for Jobless

- Monday, July 6 2 Comments
Do you want to work at home or are you jobless. Today we posting out very helpful post for those who really want to earn in good figure. Being a freelancer can be extremely advantageous and is probably a dream for many designers and developers who are tired of the cubicle lifestyle. Not only do you get to choose only the jobs you are really interested in, you also have total flexibility in terms of time, whom you want to work with, and where you want to work at.

TOP 10 Website to Earn Money Online 100% for Jobless NewVijay



The problem now is where can you go to find work that will help you sustain your freelance lifestyle? To help you with this we have listed the best 50 freelancing job sites to help you in your project search. If you a company or individual looking to outsource or hire a freelancer, these sites will be able to serve that purpose as well.

Freelancer No 1

Find or post a project or post on this platform to get the best bids from a gamut of skilled web designers, copywriters or freelance programmers.

Elance

A popular online portal for freelancers, this is the ultimate place to meet professionals with business, technical and marketing expertise to get work done at an affordable price.

Upwork

The average budget size of a job here is around $5,000! It’s no wonder that this online marketplace is a great asset for both service providers and employers.

Toptal

Toptal is a hiring marketplace for developers of (almost) all programming languages; it provides “A”-level developers who truly skillful in their fields. You can apply as a freelance developer with the possibility of working with top tech companies or a cool startup.

99designs

99Designs is where companies go to get their logos, banners and websites designed. Designers are awarded a pre-determined amount of money if their design is chosen.

Envato Studio

A house for creatives and developers of many fields to find freelance gigs from all over the world. Apply as a service providers and once you are accepted, you can name your price for your service.

Fiverr

Want to test the waters of freelancing? Give Fiverr a shot. Projects go for between $5 and $10, and this is a great place to gain some experience to add to your portfolio.

StackOverflow Careers

StackOverflow is not only a solution-churning site, it also provides job listings of tech companies from all over the world. To apply for the job, you will need a Stack Career Accounts (you’ll need to be invited first).

Dribbble

Sign up for a Dribbble Pro account and show the “Hire me” button on your profile page or scour the job board for companies looking for freelancers.

Behance Job

Productivity and creativity go hand in hand at the job list section of this site. This exclusive site is known to convert creativity into lucrative services or products to promote unique ideas.

How to get User Location in JavaScript / jQuery PHP Website

- Monday, June 22 No Comments
How to get User Location in JavaScript / jQuery PHP Website-newvijay

Solution : 1




The HTML5 geolocation API will get you the user's latitude and longitude (assuming they opt in). If you need to get info such as the city, country, or postal code, you'll need to use a reverse-geocoding web service. There are plenty of those out there:

    Google
    Bing
    etc

So take your pick... just make sure to look at the terms & conditions and be sure you won't be in violation once the site goes live.

You should be able to find code samples by googling around a bit, it's a fairly common use case. The steps will be:

    Get the user's lat/lng with your existing code.
    Make an AJAX (JSONP) call to request the reverse-geocode (use your Geocode provider to figure out what URL to use. eg, for Google it is like this).

    Parse the JSON response to extract the info you need (country, city).




Solution : 2


Try this code using the hostip.info service:

$country=file_get_contents('http://api.hostip.info/get_html.php?ip=');
echo $country;

// Reformat the data returned (Keep only country and country abbr.)
$only_country=explode (" ", $country);

echo "Country : ".$only_country[1]." ".substr($only_country[2],0,4);


Solution : 3

MaxMind GeoIP is a good service. They also have a free city-level lookup service.

How to Parse Cloud Code relational query syntax

- Sunday, June 21 No Comments
How to Parse Cloud Code relational query syntax newvijay






 Question:
I have a cloud function on Parse. When it's called it retrieves a PFObject then adds a relation between that object and the user. This part works fine (Seen towards the end of the function). I'm having trouble getting the query that selects the PFObject to ignore those that the user is already related to

I'm sure i'm just not understanding how the relation query syntax works.



Parse.Cloud.define("NextMedia", function (request, response) {

    var LikeRequest = Parse.Object.extend("LikeRequest");
    var query = new Parse.Query(LikeRequest);

    query.equalTo("completed", false);
    console.log("user: " + Parse.User.current().id);

    query.notEqualTo("user", Parse.User.current());

    // Also only fetch if never been sent before
    // HERE SHOULD USE THE BELOW RELATIONSHIP
    var innerQuery = new Parse.Query(Parse.User);
    innerQuery.exists(Parse.User);
    query.matchesQuery("sentTo", innerQuery);

    query.ascending("createdAt");

    query.first({

        success: function (object) {
            // Successfully retrieved the object.
            console.log("Got 1 object: " + object.get('mediaId'));

            // Record that the user has been sent it
            var user = Parse.User.current();
            var relation = object.relation("sentTo"); // RELATION ADDED HERE

            relation.add(user);
            object.save();

            response.success(object);
        },
        error: function (error) {
            console.log("Error: " + error.code + " " + error.message);

            response.error("Error getting next mediaId");
        }
    });
});




Answer:

I think Kerem has it partially correct but notContained in is not dynamic enough for your case. You need to construct the query from the relation and then use doesNotMatchKeyInQuery to exclude those objects from your outer query.

This stretch:

// Also only fetch if never been sent before
// HERE SHOULD USE THE BELOW RELATIONSHIP
var innerQuery = new Parse.Query(Parse.User);
innerQuery.exists(Parse.User);
query.matchesQuery("sentTo", innerQuery);
Could be changed to:

// Also only fetch if never been sent before
query.notContainedIn("sentTo",[Parse.User.current()])


what about Query Constraints?

If you want to retrieve objects that do not match any of several values you can use notContainedIn

  // Finds objects from anyone who is neither Jonathan, Dario, nor Shawn
query.notContainedIn("playerName",
                     ["Jonathan Walsh", "Dario Wunsch", "Shawn Simon"]);