Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Setting up Laravel on a Mac php artisan migrate error: No such file or directory

I have all code in github and my project is running properly in Ubuntu system . I want to run and set up my Laravel project on a Mac and I am getting error "No such file or directory" when we write the command php artisan migrate ...

What is the best place to load JS in html

Hello Reader's!, If you need to know which is the best place for putting the JS. You can put the js functions in the head part. But it'll be a good habit to put all of your functions in a separate file. You can also call for the external script...

Introduction and Basic Overview of JavaScript "Strict Mode"

Introduction: Strict Mode is one of the new feature introduced in ECMAScript5 edition. Strict Mode is a group of the language that remove disfavor features. The Strict mode is not mandatory, it means that if we want o...

How to detect if caps lock is on/off

Hello Reader's, If want to make alert when the upper/lower case letter key is pressed. Then by using Javascript you can see it in the code below:- $('#cap').keypress(function(e) { var s = String.fromCharCode( e.which ); if ( s.toU...

logging SQL queries

AJAX request runs a RAW parameterized Postgres SQL Query after receiving request Suppose we have a situation like that Here's my situation in my php view file, I make AJAX request to the server The AJAX request is received and runs a...

Odoo View inheritance

Instead of modifying existing views in place (by overwriting them), Odoo provides view inheritance where children "extension" views are applied on top of root views, and can add or remove content from their parent. Code like below-> <rec...

How to add minutes in a given date using Javascript

Hello Reader's, If you need to add some minutes to a given date, Then by using Javascript you can use as follows:- var d1 = new Date (), d2 = new Date ( d1 ); d2.setMinutes ( d1.getMinutes() + 50 ); //adding 50 min to the date alert ( d...

Difference Between WebService And API

Hello Readers There is difference between webservice and API. A Web Service is basically a type of API, which always operates over HTTP though some (like SOAP) can use alternate transports( like SMTP). An API is a (Application Programming I...

How to refresh a List in Android?

1)Write activity_main.xml: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent...

form_for in Rails

It is a Rails helper method that shows forms on the view For example, while Rendering a partial form: <%= form_for([@post, @post.comments.build]) do |f| %> <div class="field"> <%= f.label :commenter %><br /> ...

Freeze TextView text while restore fragment from Backstack/ onOrientationChange

Some time TextView lost text while getting fragment from Back-stack or when screen orientation changed. I also faced that problem. Here is the solution for save state of TextView forcefully. Add Tag android:freezesText="true...

Odoo Model inheritance

Odoo provides two inheritance mechanisms to extend an existing model in a modular way. The first inheritance mechanism allows a module to modify the behavior of a model defined in another module: 1. add fields to a model, 2. override...

Relational fields in Odoo

If you want to make relational fields in OpenERP(Odoo) follow the below mentioned code and paste it in your model.py file: - name = fields.Char(string="Title", required=True) description = fields.Text() responsible_id = fields.Many2...

How to get mouse swipe input in Unity 3D?

Moving objects on Mouse swipe is a very interesting way of getting user input , it is very different from traditional approach of getting input from keyboard keys . It provids user with unique experience and makes user part of the game. Belo...

How to print featured image in wordpress

Hello Reader's! If you learning the wordpress and want to show the contents of a page from admin panel. Then you can use the code below:- First you need to publish the page with it's title, content and a featured image. Now open the page and...

Relations between models in Odoo

If you want to make relations between models in OpenERP(Odoo) follow the below mentioned code and paste it in your model.py file: - <pre>name = fields.Char(string="Title", required=True) description = fields.Text() class Session(model...

How to check user current notification setting in objective C

hello friends , You can check user's current notification setting by following line of codes. // this method is deprecated in iOS 8.0 UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; i...

Cordova plugin InAppBrowser

Hi All, Today we will discuss in this blog how to use InAppBrowser in your Cordova Application. -InAppBrowser is a web browser view in a Cordova application that displays when calling window.open() function. To use the functionality in your C...

How to create a UILabel & UIButton programmatically in Swift

hello friends, this is how we can create a UIButton and UILabel in swift. Set a UILabel in swift var label = UILabel(frame: CGRectMake(100, 100, self.view.bounds.size.width, 50)) label.center = self.view.center la...

CakePHP Folder Structure

After downlaoding and extracting CakePHP folder, one should see the following files and folders: app cake vendors plugins .htaccess index.php README Three main folders in which one will usually work: 1.The app folder is one...

Blur Effect on screen in iOS

To add the blur Effect on screen please follow the below steps Select an image on which you want to add the blur effect. Add an imageView on screen with the size you want blur effect on screen. Add the effect with the same size on which yo...

Migration in Ruby on Rails

Migrations comes up with the convenient way to alter your database in a structured and organized pattern. it makes use of Ruby DSL so no need to write SQL statements, allowing your schema to reflect changes independently. Anatomy of Migrat...

Working with MathML in HTML5

MathMl is a easy way to insert math symbols, expressions and formulas into your web page. The supported browser can convert them to numeric values and symbols. To start writing the math code you have to use <math></math> tag for creat...

Bundling in Asp.Net MVC

Bundling in Asp.Net MVC What Bundling is actually:         It is a process of grouping files into a Bundle, so that they can be loaded through one HTTP request and can be referenced by a unique Bundle Name. Need of B...

How to make Action Bar in Android?

Here I have created Action Bar in android. In android Action Bar is used to provide navigation and perform some actions. In this blog I have implement a Action Bar in my Android project and perform actions such as switching fragment. Below ex...

Base URL in Wordpress

Hello Reader's! In wordpress you can use the base url as written below <?php echo bloginfo('template_url'); ?> Lets take an example:- If you want to link the CSS <link rel="stylesheet" href="<?php echo bloginfo('temp...

How to create menu using Wordpress

Hello Reader's! If you are new to WordPress and you have to create the menu for first time. You just have to do the steps below:- Step1:- Open or Create a file functions.php in your theme folder and paste the code below:- add_action( 'after...

Website Development: 10 PHP Programming Mistakes Web Developers Should Avoid!

Source: www.finalwebsites.com PHP as a scripting language has gained immense popularity among web developers who strive to ensure that their websites are attractive and have a great functionality. Its because of PHP that developers are ab...

CakePHP request Cycle

When a user requests a page or a resource then the CAKEPHP request cycle starts. It can be explained with the below diagram: Let's now discuss the request cycle diagram with steps: 1.The request is redirected to webroot/index.php ba...

Diiference Between C and C++

Basic difference between C and C++: C C++ C follow procedural programming language C++ follow procedural and object oriented ...

How to get size of a file using HTML 5

Hello Reader's! If you are looking for an HTML 5 validation which tell user the size of an file the code will help you:- In HTML fileL <input type="file" id="file" /> In the JS file //binds to onchange event of your input fiel...

How to detect a textbox's content has changed

Hello Reader's If want to detect if text box value changed the alert box open to user. Then you can perform this function by using the Javascript. The function is written below:- $(function() { var content = $('#txtbox').val(); $...

How to make a simple file reader using Javascript

Hello Readers, If you developing the website to browse any file and showing its's content on the web page, Then by using Javascript you can do this as follows:- function readSingleFile(e) { var file = e.target.files[0]; if (!file) { ...

Rails Server Setup with passenger and nginx

Rails Server setup with Passenger and nginx Hi friends, Today I am going to tell you how to setup rails server with nginx and passenger. First you need to login to your server using ssh using the command ssh -i server_pem_key_path user@...

Add image in panel using swings

Hi All, To add image as background image in JPanel ,JLabel is used for example:- setLayout(new BorderLayout()); try { image = ImageIO.read(new File("D:\\New folder (2)\\fish.jpg")); ...

Implementing Tooltip using jQuery UI

We can use jQuery UI to implement a tooltip in our pages. It contains a set of user interface interactions.Tooltip is used to show some additional information in the context of each field. This is how you can use Jquery UI: <!doctype ht...

How to go back from a page using window.history.back in angularjs?

We can use the history.back() method which loads the previous URL in the history list. It functions the same as clicking the Back button in the browser. Here is the code snippet to show it's usage :, <html> <header ng-controller=...

Using reject in ruby to delete elements selectively from an array

1> To delete an element from an array, use reject as shown below: arr = ['a','b','c','d','e'] arr.reject! { |i| i.match('d')} Result :=> ["a", "b", "c", "e"] 2> To delete particular keys from the array whose elements are ...

Difference among bind(), live(), delegate(), on() methods in jQuery

Hello, Most of the time we have a bit of confusion between the jQuery .bind(), .live(), .delegate(), and .on() methods and when they should be used. Here I am sharing some information regarding this: bind() Method: Syntax: .bind( eventTyp...

Single Table Inheritance in Rails

STI can be considered where single table can be used to represent multiple models based on different type. The parent model inherits from ActiveRecord::Base. Other models inherit from parent model. Data store and accessed from same table for all ...

HTML5 Canvas Game

Canvas can be used to draw graphs, shapes, images, and to make animations. Here is the example below for making the game in canvas <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> ...

Deleting user by userId in liferay

Hello Guys Here, I am writing blog for deleting user by userId in liferay from custom portlet. User : The extended model interface for the User service. Represents a row in the "User_" database table, with each column mapped to a prop...

Javascript DOM -document.getElementByTagName( ) Method

In Javascript, this method is used to get the elements of specified tag name. Parameter values : Parameter : String -> This is required. And you give the tagname of that element you want to get . Syntax: document.getElementByTagName("na...

Display image before upload using javascript/jQuery

This post demonstrates how to display an image prior to uploading it on server. This demo uses the JavaScript's readAsDataURL method of reader API which will read image as url. <html> <head> <script src="https://a...

Pagination in Cakephp

In CakePHP pagination is provided by a Component defined in the controller for making paginated queries much easier. PaginatorHelper View is used for generating pagination links & buttons in a simpler way. Setting up the Query: Le...

How to create Odoo Search views?

If you want to make Search views in OpenERP(Odoo) follow the below mentioned code and paste it in your .xml file: - <="" field=""> <record model="ir.ui.view" id="course_search_view"> <field name="name">cour...

Middleware in Express JS

Middleware is the core idea of Express.js used behind processing the request and routing. By seeing how middleware functions, you can make more maintainble applications with less code. The minute a solicitation is gotten by an Express.js applicat...

Circular graphs in SVG

Hello, Here I am sharing some information related to circular graphs using Javascript. JavaScript provides a library that generates circular graphs in SVG. We need to include circles.js or circles.min.js file in the HTML file. It can be do...

Odoo Form views

If you want to make Form view in OpenERP(Odoo) follow the below mentioned code and paste it in your .xml file: - <group colspan="4"> <group colspan="2" col="2"> <separator string="General stuff" colspan="2"> ...

How to get date with suffix st,th etc

While getting date in rails we do have a requirement where we need to show suffix attached to date like 2nd,3rd etc. There is no direct rails date function to get the same so in order to get date in the following format Thu, Nov 5th 2015 ...
1 184 269
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: