Thursday, October 26, 2017

JavaScript Data structures videos training



https://www.youtube.com/watch?v=Gj5qBheGOEo&list=PLWKjhJtqVAbkso-IbgiiP48n-O-JQA9PJ
  • Stacks
  • Sets
  • Queues
    • Priority Queues
  • Hash tables
  • Linked List
  • Map
  • Binary Search Tree
    • Tree Traversal and Height 
  • Trie
  • Heap
  • Graph
    • Adjacency list and Adjacency Matrix
    • Breadth first search

Friday, July 29, 2016

Bad NaCl helper startup ack ERROR:nacl_fork_delegate_linux.cc

Got following error after installation of google chrome and solved by running solution command: ERROR:nacl_fork_delegate_linux.cc(315)] Bad NaCl helper startup ack (0 bytes)

[4895:4895:0729/220859:ERROR:browser_main_loop.cc(231)] Running without the SUID sandbox! See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the sandbox on.
[4895:4895:0729/220859:ERROR:gconf_listener.cc(117)] Error with gconf key '/apps/metacity/general': Client failed to connect to the D-BUS daemon:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Gkr-Message: couldn't connect to dbus session bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

SOLUTION:
google-chrome --no-sandbox --user-data-dir

intl ICU version installed on your system (56.1) should match the ICU data bundled with Symfony (55.1

intl ICU version installed on your system (56.1) should match the ICU data bundled with Symfony (55.1)
In most cases you should be fine, but please verify there is no inconsistencies between data provided by Symfony and the intl extension. See https://github.com/symfony/symfony/issues/15007 for an example of inconsistencies you might run into.

Configuration Checker

This script analyzes your system to check whether is ready to run Symfony applications.

RECOMMENDATIONS

To enhance your Symfony experience, it’s recommended that you fix the following:

  1. intl ICU version installed on your system (56.1) should match the ICU data bundled with Symfony (55.1)
    In most cases you should be fine, but please verify there is no inconsistencies between data provided by Symfony and the intl extension. See https://github.com/symfony/symfony/issues/15007 for an example of inconsistencies you might run into.
  2. a PHP accelerator should be installed
    Install and/or enable a PHP accelerator (highly recommended).

OCMOD Modification System opencart 2.3 example for Show all products module ecommerce

Things to take care while making OCMOD file:
  1. File extension must be either .ocmod.zip or .ocmod.xml.
  2. Upload from admin section, Admin>>Extensions >> Extension Installer, Upload the .xomod.zip or .ocmod.xml file from here.
Now go to following link and download "Display all Products" module

You will find following ocmod example which shows how to show "All Products" links at the top menu bar.



For example:

<modification>
<version>OpenCart Version 2.2</version>
<vqmver>2.0.0</vqmver>
<author>Rupak Nepali</author>
   <code>List_all_Products</code>
<file name="catalog/view/theme/*/template/common/header.tpl" error="skip">
<operation>
<search position="after"><![CDATA[
<ul class="nav navbar-nav">
]]></search>
<add><![CDATA[
<li><a href="index.php?route=product/allproduct">All Products</a></li>
]]></add>
</operation>
</file>
</modification>


OCMOD is a system that allows store owners to be able to modify their store by uploading a compressed file that contains XML, SQL and PHP files.
If a OCMOD is developed correctly it can modify how a users OpenCart store works without changing any of the core files. This means that if a modification is removed none of the original OpenCart files need to be restored or fixed.

OCMOD Files

OCMOD files can be upload via the opencart admin under:
Extensions / Extension Installer
For a OCMOD file to be uploaded the file extension must be either .ocmod.zip or .ocmod.xml. This is to avoid none OCMOD files from being uploaded to a store users admin.

File Structure

Example file structure for OCMOD compressed files.
  • upload
  • install.sql
  • install.php
  • install.xml

upload

All files under this directory will be uploaded to the to directory of your OpenCart installation.

install.sql

Add any create, drop, insert and update SQL quires here. Make sure each query ends with ;

install.php

If the modification requires any custom PHP code.

install.xml

The XML modification file.
You can view the documentation for this system below.

XML

This is the file that creates a virtual copy of any files that require changes. Use this system instead of overwriting any default installation files. Multiple modifications can be applied to the same file.
Example OCMOD file:
<?xml version="1.0" encoding="utf-8"?>
<modification>
    <name>Modification Default</name>
    <version>1.0</version>
    <author>OpenCart Ltd</author>
    <link>http://www.opencart.com</link>
    <file path="catalog/controller/common/home.php">
        <operation>
            <search><![CDATA[
            $data['column_left'] = $this->load->controller('common/column_left');
            ]]></search>
            <add position="replace"><![CDATA[
            test123
            ]]></add>
        </operation>
    </file>  
</modification>

Tags

File

You can set multiple file locations by spiting up the file locations using commas. The modification system uses PHP function glob.
Example:
Direct file path.
<file path="catalog/controller/common/home.php">
Using braces allows for selecting multiple files and not having to repeat the code operation multiple times.
<file path="system/engine/action.php|system/engine/loader.php|system/library/config.php|system/library/language.php">
also allows braces
<file path="system/{engine,library}/{action,loader,config,language}*.php">
please note that all file paths must start with either admin, catalog or system. you can also use wildcard *

Search

Search code
Allowed Attributes
  • trim="(true|false)"
  • regex="(true|false)"
  • index="(number)"
Example:
<?xml version="1.0" encoding="utf-8"?>
<modification>
    <name>Modification Default</name>
    <version>1.0</version>
    <author>OpenCart Ltd</author>
    <link>http://www.opencart.com</link>
    <file path="catalog/controller/common/home.php">
        <operation>
            <search trim="true|false" index="1"><![CDATA[
            $data['column_left'] = $this->load->controller('common/column_left');
            ]]></search>
            <add position="replace" offset="1"><![CDATA[
            test123
            ]]></add>
        </operation>
    </file>  
</modification>

Add

The code to replace the search with.
Allowed Attributes
  • trim="(true|false)"
  • position="(Replace|Before|After)"
  • offset="(number)"
(note position can not be used if regex is set to true in the search attribute).
Example
<?xml version="1.0" encoding="utf-8"?>
<modification>
    <name>Modification Default</name>
    <version>1.0</version>
    <author>OpenCart Ltd</author>
    <link>http://www.opencart.com</link>
    <file path="catalog/controller/common/home.php">
        <operation>
            <search trim="true|false"><![CDATA[
            $data['column_left'] = $this->load->controller('common/column_left');
            ]]></search>
            <add position="Replace|Before|After" trim="true|false" offset="2"><![CDATA[
            test123
            ]]></add>
        </operation>
    </file>  
</modification>
Regex
Allowed Attributes
  • limit="(number)"
Example:
<?xml version="1.0" encoding="utf-8"?>
<modification>
    <name>Regex Example</name>
    <version>1.0</version>
    <author>OpenCart Ltd</author>
    <link>http://www.opencart.com</link>
    <file path="system/{engine,library}/{action,loader,config,language}*.php">
        <operation>
            <search regex="true" limit="1"><![CDATA[
            ~(require|include)(_once)?\(([^)]+)~
            ]]></search>
            <add><![CDATA[
            $1$2(modification($3)
            ]]></add>
        </operation>
    </file>
</modification>
If you use regex you can not use attributes position, trim or offset as these are handled by the regular expression code you write. The limit attribute is still available.
If, for example, you want to change the 3rd 'foo' to 'bar' on the following line:
lorem ifoopsum foo lor foor ipsum foo dolor foo
^1      ^2      ^3         ^4        ^5
Run:
s/\(.\{-}\zsfoo\)\{3}/bar/
Result:
lorem ifoopsum foo lor barr ipsum foo dolor foo
^1      ^2      ^3=bar     ^4        ^5
You can find more information about the regular expression PHP function OCMOD uses can be found here:
More information about regular expression can be found here:

Tuesday, July 14, 2015

Statement of Purpose (SOP) written for Macquarie University

My name is FULLNAME from ADDRESS. I am very much pleased to write this Statement of Purpose to upfront myself with my intention for the further studies in Australia. I would like to pursue Master of Information Technology with a specialization in Web Engineering for 2013/2014 at Macquarie University, Sydney. Me, working as IT professional and web developer, I found many gaps between the working procedure and use of technology while developing system and websites so I am interested to improve myself thus I researched throughout the internet and find out that my advancements and improvements can be fulfilled by the Master of Information Technology with a specialization in Web Engineering thus I choose this course and your university and will be focused to achieve mastery of subject area and web technology and like to be an integral part for betterment of technology.

I have done my schooling from NAMEOFSCHOOL scoring SCORE and my Higher secondary level in science scoring SCORE. Accordingly, I have completed my four-year bachelor degree Bachelor of Computer Information System with major in programming and web technology in 2011 scoring SGPA SCORE from Nobel College of Pokhara University.

While studying I was attracted with the web technologies and programs to create websites so my goal was to be web developer and continue my profession. After completing bachelors I started working and already gained 3 years of professional experience as web developer with focused on ecommerce sites programming and management. I have worked as freelancer in odesk.com and freelancer.com and have received many good feedbacks from clients and gained popularity between them. I have finished writing a book about programming OpenCart platform with Packt Publication named “Getting Started with OpenCart module”. I can make a complete ecommerce site starting from slicing into HTML and CSS, code it in PHP and Mysql to make a complete product ordering system and receive multiple payments and shipping and am providing annual maintenance support for more than 10 sites. But, I found many gaps between the international market and the way we perform our tasks in our local market while working with international clients thus I planned to broaden my minds and technologies used to make web programs and websites, handle the codes easily, be more productive with more risk management and provide quality products in web technology thus checking your course structure I am interested to join MIT with a specialization in Web Engineering and I firmly believe that this will be an ideal path for me.

There are several reasons due to which I am interested positively in Australia education systems as it provides good balance between theoretical and industry relevant practical knowledge as well as academic excellence, value for money, growing destination, worldwide recognition and merit base scholarships for the deserving students. Moreover, I believed there are many values, qualities and ethical knowledge to be learnt from Australia and the University.

Why study at Macquarie University?

I am trying to get into Macquarie University to pursue my MIT with a specialization in Web Engineering because I believed that my long–term goals, dreams, knowledge, skills and experiences gained through such a dynamic program would bring newer insights in my professional, personal outlook on life, society and the business environment in today’s globalized world. That’s why I believe that your university will be a perfect match to fulfill my management dreams.
I know it will help me to make web application systematic, disciplined, and quantifiable, best approaches to the design, production, deployment, operation, maintenance and evolution of Web-based software products.

I feel that your university is the right place to embark upon an academic career. I am confident that with my commitment and hard work, I can excel and I will leave no stone unturned and I’ll try to make the university feel proud of having me in your University. After completion of the course I am supposed to be one of the best web techs savvy and help to improve the web technology for betterment of the society and teach my locals to use the improved technologies which will help them to improve productivity and quality.

I would therefore request to be considered for granting visa to get a chance to enhance, to develop my skills, throughout my career too.


FULLNAME

Tuesday, April 14, 2015

Searching for best apps to develop class diagram then use nulab Cacoo

Being a developer I have to design class diagram, flow charts, business organizational chart, matrix diagram, venn diagram, SWOT diagram and schedule diagram and many more.

I was looking for free and  private class diagram and found this cacoo and am very happy to use it and it's drag and drop system is so easy to use.

We can draw:

  1. Business Diagram like: Business organizational chart, matrix diagram, venn diagram, SWOT diagram and schedule diagram
  2. Flow Chart
  3. Mind Map
  4. Network Map like: network diagram and AWS design template
  5. Office layout
  6. Sitemap
  7. Wireframe for different devices
  8. UML where you can draw state machine diagram, use case diagram, sequence diagram, class diagram, activity diagram, package diagram
  9. Database design
  10. Greeting Card design, Happy New Year, happy holidays, happy birthday and many more
  11. Electronics diagrams like Ohm's law
  12. And also contained User defined Templates.
So containing many drawing section, I am happy to use it and hope it keeps on providing free account.

Wednesday, March 28, 2012

Android Development, Understanding Hello World



hello world android application development



With that confirmed, let’s take a step back and have a real look at your first Android application. Activity is the base class for the visual, interactive components of your application; it is roughly equivalent to a Form in traditional desktop development. The following snippet shows the skeleton code for an Activity-based class; note that it extends Activity, overriding the onCreate method.

package com.paad.helloworld;
import android.app.Activity;
import android.os.Bundle;
public class HelloWorld extends Activity {
    /** Called when the activity is first created. */
   @Override
   public void onCreate(Bundle icicle) {
       super.onCreate(icicle);
   }
}



What’s missing from this template is the layout of the visual interface. In Android, visual components
are called Views, which are similar to controls in traditional desktop development.

In the Hello World template created by the wizard, the onCreate method is overridden to call setContentView, which lays out the user interface by infl ating a layout resource, as highlighted below:
@Override


public void onCreate(Bundle icicle) {
     super.onCreate(icicle);
     setContentView(R.layout.main);
}
The resources for an Android project are stored in the res folder of your project hierarchy, which includes drawable, layout, and values subfolders. The ADT plug-in interprets these XML resources to provide design time access to them through the R variable.

The following code snippet shows the UI layout defined in the main.xml file created by the Android
project template:

<?xml version=”1.0” encoding=”utf-8”?>
<LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”
android:orientation=”vertical”
android:layout_width=”fill_parent”
android:layout_height=”fill_parent”>

<TextView
android:layout_width=”fill_parent”
android:layout_height=”wrap_content”
android:text=”Hello World, HelloWorld”
/>

</LinearLayout>

Defining your UI in XML and inflating it is the preferred way of implementing your user interfaces, as it neatly decouples your application logic from your UI design.
To get access to your UI elements in code, you add identifier attributes to them in the XML definition. You can then use the findViewById method to return a reference to each named item. The following XML snippet shows an ID attribute added to the TextView widget in the Hello World template:

<TextView
android:id=”@+id/myTextView”
android:layout_width=”fill_parent”
android:layout_height=”wrap_content”
android:text=”Hello World, HelloWorld”
/>

And the following snippet shows how to get access to it in code:
TextView myTextView = (TextView)findViewById(R.id.myTextView);

Alternatively (although it’s not considered good practice), if you need to, you can create your layout directly in code as shown below:

public void onCreate(Bundle icicle) {
super.onCreate(icicle);
LinearLayout.LayoutParams lp;
lp = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.FILL_PARENT);
LinearLayout.LayoutParams textViewLP;
textViewLP = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT);
LinearLayout ll = new LinearLayout(this);
ll.setOrientation(LinearLayout.VERTICAL);
TextView myTextView = new TextView(this);
myTextView.setText(“Hello World, HelloWorld”);
ll.addView(myTextView, textViewLP);
this.addContentView(ll, lp);
}

All the properties available in code can be set with attributes in the XML layout. As well as allowing
easier substitution of layout designs and individual UI elements, keeping the visual design decoupled
from the application code helps keep the code more concise.

Android Application Development Tutorials, installing android sdk, java ide and ecplise



Versions of the SDK, Java, and Eclipse are available for Windows, Mac OS, and Linux.
Android code is written using Java syntax, and the core Android libraries include most of the features from the core Java APIs.
The biggest challenge with Android, as with any new development toolkit, is learning the features and limitations of its APIs.
The power of Android comes from its APIs, not from Java, so being unfamiliar with all the Java specific classes won’t be a big disadvantage.

To get started, you’ll need to download and install the following:
  1.  The Android SDK
  2.  Java Development Kit (JDK)
    http://java.sun.com/javase/downloads/index.jsp
Downloading and Installing the SDK
The Android SDK is completely open.
http://code.google.com/android/download.html

you can use any text editor or Java IDE you’re comfortable with and use the developer tools in the SDK to compile, test, and debug the code snippets and sample applications.

Developing with Eclipse
Using Eclipse with the ADT plug-in for your Android development offers some signifi cant advantages. Eclipse is an open source IDE (integrated development environment) particularly popular for Java  development. It’s available to download for each of the development platforms supported by Android (Windows, Mac OS, and Linux) from the Eclipse foundation homepage:
www.eclipse.org/downloads/




Installing Eclipse consists of uncompressing the download into a new folder. When that’s done, run the Eclipse executable. When it starts for the fi rst time, create a new workspace for your Android development.

The ADT plug-in for Eclipse simplifi es your Android development by integrating the developer tools, including the emulator and .class-to-.dex converter, directly into the IDE. While you don’t have to use the ADT plug-in, it does make creating, testing, and debugging your applications faster and easier.



The ADT plug-in integrates the following into Eclipse:
❑ An Android Project Wizard that simplifi es creating new projects and includes a basic application template
❑ Forms-based manifest, layout, and resource editors to help create, edit, and validate your XML resources
❑ Automated building of Android projects, conversion to Android executables (.dex), packaging to package fi les (.apk), and installation of packages onto Dalvik virtual machines
❑ The Android Emulator, including control of the emulator’s appearance, network connection settings, and the ability to simulate incoming calls and SMS messages
❑ The Dalvik Debug Monitoring Service (DDMS), which includes port forwarding; stack, heap, and thread viewing; process details; and screen capture facilities
❑ Access to the device or emulator’s fi lesystem, allowing you to navigate the folder tree and transfer fi les
❑ Runtime debugging, so you can set breakpoints and view call stacks
❑ All Android/Dalvik log and console outputs






Android SDK,the Java development kit, Java IDE, Dalvik byte code, Android Emulator to run your projects, Dalvik Debug Monitoring Service (DDMS), best practices for writing mobile applications, overcome the inherent hardware and environmental challenges for android application development, good mobile design principles, biggest challenge with Android, some of the specific optimization techniques for android application development, Dalvik virtual machine, Downloading and Installing the Android SDK,  Eclipse with the Android Developer Tool (ADT) plug-in,  Android development environment, Installing the ADT Plug-in,

android development: Collection of libraries in android

Android Libraries for developing the application. Core APIs for android
Android offers a number of APIs for developing your applications. The following list of core APIs
should provide an insight into what’s available; all Android devices will offer support for at least
these APIs:
android libraries, android library
android framework

❑ android.util The core utility package contains low-level classes like specialized containers,
string formatters, and XML parsing utilities.
❑ android.os The operating system package provides access to basic operating system services
like message passing, interprocess communication, clock functions, and debugging.
❑ android.graphics The graphics API supplies the low-level graphics classes that support canvases,
colors, and drawing primitives, and lets you draw on canvases.
❑ android.text The text processing tools for displaying and parsing text.
❑ android.database Supplies the low-level classes required for handling cursors when working
with databases.
❑ android.content The content API is used to manage data access and publishing by providing
services for dealing with resources, content providers, and packages.
❑ android.view Views are the core user interface class. All user interface elements are constructed
using a series of Views to provide the user interaction components.
❑ android.widget Built on the View package, the widget classes are the “here’s one we created
earlier” user-interface elements for you to use in your applications. They include lists, buttons,
and layouts.
❑ com.google.android.maps A high-level API that provides access to native map controls that
you can use within your application. Includes the MapView control as well as the Overlay and
MapController classes used to annotate and control your embedded maps.
❑ android.app A high-level package that provides access to the application model. The application
package includes the Activity and Service APIs that form the basis for all your Android
applications.
❑ android.provider To ease developer access to certain standard Content Providers (such as the
contacts database), the Provider package offers classes to provide access to standard databases
included in all Android distributions.
❑ android.telephony The telephony APIs give you the ability to directly interact with the device’s
phone stack, letting you make, receive, and monitor phone calls, phone status, and SMS messages.
❑ android.webkit The WebKit package features APIs for working with Web-based content,
including a WebView control for embedding browsers in your activities and a cookie manager.

Android Libraries for developing the application. Core APIs for android, core class collection,