Posts

Showing posts from March, 2017

php database connection example

php connect to mysql database, oracle database <?php  @$dbcnnct = mysql_connect("localhost", "username", "password"); if(!$dbcnnct) { echo "could not connect"; } @$db=mysql_select_db("project"); if(!$db) { echo "could not select"; } $sql = mysql_query("SELECT * FROM country "); if(!$sql) echo "error==".mysql_error($sql);         while($row = mysql_fetch_array($sql))         {              echo ("$row[table column name]");         } @$dbcls = mysql_close($dbcnnct); ?>

Java Socket Programming (Java Networking Tutorial)

Java Socket Programming using swing. instant messaging program. Server import java.io.*; import java.net.ServerSocket; import java.net.Socket; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class server extends JFrame { private JTextField userText; private JTextArea chatWindow; private ObjectOutputStream output; private ObjectInputStream input; private ServerSocket servers; private Socket connection; public server() { super("Chat Messenger"); userText=new JTextField(); userText.setEditable(false); userText.addActionListener( new ActionListener(){ public void actionPerformed(ActionEvent event){ sendMessage(event.getActionCommand()); userText.setText(""); } }

Recursion

What is Recursion?             A function calls itself is called recursion. Recursion is a useful technique. it is shorter and easier to write. Example: Factorial problems using Recursion.       Java int fact(int n){      if(n==1)         return 1;      else if(n==0)         return 1;      else return n*fact(n-1) } fact(5)       Python def fact(n):       if n==0:           return 1       return n*fact(n-1) print(fact(5))     

How to determine time complexity of an algorithm

      There are some general rules to determining the running time of an algorithm. Below are few Example Loops       The running time of a loop at most, the running time of the statements inside the loop multiplied by the number of iterations. for (i=0; i<=n; i++)  {  total = total + 1;   // constant statement 'c' } Total time =  constant x n = c x n = O(n) Nested loops  Total running time of the sizes of all the loops(inside to out). //outer loop executed n times for (i=1; i<=n; i++) {       // inner loop executed n times         for (j=1; j<=n; j++)         {              k = k+1; //constant time 'c'         }  }

Asymptotic Notation

Image
                       Asymptotic Notation is a concept of analysis Algorithms for best case, average case and worst case. For all the three cases we need to identify the upper bound, lower bounds using syntax and Notation . Big-O Notation This notation gives the tight upper bound of the given function. In general we represent algorithm in the form of function f(n) f(n)= O(g(n)) This means, for larger values of n , The  upper bound of f(n) is g(n) . For example, if algorithm is given f(n)=n 2 +10n+5 Then  n 2 is g(n) , g(n) gives the maximum rate of growth for f(n)  at larger values of n .

Data Structures

Data Structures A data structure is a special structure or format for organize and storing data. Data structure is a way of storing, organizing and manipulating data in a computer. In General data structures includes concepts like array, file, list, stack, queue, tree, graph etc. Data structures are classified into two types:               Linear Data structures:                       Elements are accessed in a sequential order. Example: Arrays, Linked List, stacks, queues               Non- Linear data structures:                         Example:: Trees , graphs

IBM sterling commerce tutorial

What is a hub? Hub is the center of the organization. there can be only one hub for the entire business. What is an enterprise? Enterprise are modeled as high as possible in organization structure. They define business rules, they control the business rules. Enterprise has highest priority ,follow different business rules, then they are configured as a separate Enterprise. Enterprises can inherit the default configuration from hub. What are document types? Document type is used to carry the business rules throughout the workflow. An administrator can create a new document Type.            Process Type level attributes                      Status inventory Types                      Modification Types                      Modification rules       ...

Order Management System, Process and Allocation

Image
Sourcing Rules  Sourcing Rules are the Set ups for determining the nodes from which a product can be sourced for Delivery to the customer. Scheduling Rules  Scheduling Rules are the Set Ups used  to determine “How an Item Needs to be shipped to a customer”

How to create article in wikipedia

Image
If you want to create a article/page in Wikipedia follow this step. Go to https://en.wikipedia.org/wiki/Main_Page Search the article you want to write.                           If the article is already present it will ask you to EDIT           If the article is not present then it will ask you to create                   Click on the name of the article you have entered           It will ask you to login                             

Compare XML using Java

It is developed specially for the SOAP service xml  request and response where you can compare according to names and also you can Find the Difference in values.Refer Below code, Compare two xml files. By Using Difference method you can Get the Difference in values. It Also Comapres XML Bi-Directional.  package com.example.Test; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Set; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.custommonkey.xmlunit.DetailedDiff; import org.custommonkey.xmlunit.Difference; import org.custommonkey.xmlunit.XMLUnit; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.S...

Ping Error Message - Destination Net Unreachable

Destination Net Unreachable If your computer is connected a router or a shared network, and you are requesting for PING from your computer. Your computer fail to find the network destination / IP and your computer will get "Destination net Unreachable" error message. CMD --------------------------------------------------------------------------------------------------------------- Microsoft Windows [Version 6.1.7600] Copyright (c) 2017 Microsoft Corporation.  All rights reserved. C:\Users\xyz> ping 1.2.3.4 Pinging 1.2.3.4 with 32 bytes of data: Reply from 192.168.0.129: Destination net unreachable. Reply from 192.168.0.129: Destination net unreachable. Reply from 192.168.0.129: Destination net unreachable. Reply from 192.168.0.129: Destination net unreachable.

Connection pooling in java example with oracle

Oracle connection pool example Java connection pooling Oracle database connection with JDBC Implementing  own Connection pooling in Java how to implement connection pooling in java with example Here we are creating a class and declaring all database information. This call will execute only one time at the program beaning. If you are using Web server, this call will execute one time at the beginning of the server start.  import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class ConnectionPool { static Connection con; static Statement st; static{ try { Class.forName("oracle.jdbc.driver.OracleDriver"); } catch (ClassNotFoundException e) { e.printStackTrace();

Notepad++ regular expression

Notepad++ regular expression How to go to the end of the line.           Open Notepad++                                => press Ctral and F in a same time.                              => Search mode Regular expression .                              => enter $ in find box to go to the end of the line. How to go to the start of the line.           Open Notepad++                                => press  Ctral and F  in a same time.                              => Search mode  Regular expression . ...

Delete and Rename a file using VBA

 Delete and Rename a file In VBA macro Excel To Delete a file using VBA script use Kill and a file name.           Kill "Filename.txt" To Rename a file use Name keyword and old file name and a new File name.           Name "Old" As "New"

VBA to create a file with utf-8 format

You can create any text or html file or any other file with utf-8 encryption. Dim TempFile As String   TempFile = "TempFileName.html"     Dim fsTrm As Object     Set fsTrm = CreateObject("ADODB.Stream") With fsTrm   .Type = 2             'Stream Type - we want Text Data.   .Charset = "utf-8"    'Specify Character Set.   .Open                 'Open the Stream And write Binary data to the Object   .WriteText "String"   .SaveToFile TempFile, 2      'Save Binary Data to Disk (Overwrite) End With

Excel Macros VBA to read data from a file and store into a string Variable

VBA to read data from a file In this vba script you can read text from Text, HTML, JS and any other file and store into a string variable. Dim oFSO As Object     Dim oFS As Object, sText As String     Set oFSO = CreateObject("Scripting.FileSystemObject")     Set oFS = oFSO.OpenTextFile(sFile)     Do Until oFS.AtEndOfStream         sText = oFS.ReadAll()     Loop     FileToString = sText          Set oFSO = Nothing     Set oFS = Nothing

ConceptWave tool

Conceptwave is web development tool built in Java. Earlier Conceptwave was company established in 1984. From 2000, it is part of Ericsson. With web development, it is also used for order management, catalog management. It supports mostly all the database. 1)       It is built in Java and works on hibernate principle. You will code only in Javascript (more specific Object Oriented Javascript). 2)       It is proprietary tool so hard to find tutorial on web. You can use “Help document” comes with tool.  3)       No idea. Surf Ericsson website.   4)       Many MNC are using this tool. 5)       Very few developer of this tool so it is in demand J

ConceptWave Order Care Product Suite

Image
ConceptWave Order Care® Product Suite Order Negotiations (ON): Provides a highly fl exible, fully customizable order negotiation process that integrates with virtually all back-end systems to speed new services to customers, reduce order errors, and improve flow through. ON capabilities include order entry, telecom sales support, service negotiation, Web/contact center support, customer account management, product data, & front offi ce automation. Catalog Management (CM): An intuitive environment allowing the central defi nition of attributes like product features, availability, and bundles. Workfl ow rules can be tied to the product items at the product catalog level. Easily interfaces with downstream systems to manage and fulfi ll complex multi-product orders.

what is conceptwave?

• Automates manual order and exception handling tasks and system interactions • Graphical work? How management tools enable end users to rapidly create and confgure processes, business logic, ordering screens, and data models  • Integrates easily with other systems through XML/JMS/EAI interfaces • Pre-built service-specic data and How templates minimize implementation costs/timeframes • Fully web-based, intuitive front end supporting guided order entry and negotiation

About ConceptWave

ConceptWave tool ConceptWave now part of Ericsson, is a leading provider of customer, product, and order lifecycle management solutions that enable communications service providers to rapidly introduce new market offers and to empower superior customer experience. ConceptWave's unique offer is to provide an end-to-end catalog-driven suite of order fulfillment automation software with ConceptWave Order Care and Rapid CRM. ConceptWave products and solutions enable service providers to address competitive requirements and simplify the management of customers, products, and orders, for any product, on any network, in any market, using any channel.       ConceptWave tool is order management, catalog management web development tool. ConceptWave tool built in Java and hibernate principle. Many MNC are using this tool for order and product lifecycle management solutions to communications service providers (CSPs). ConceptWave is headquartered in Toronto with presence in A...

Understanding Java Singleton with Example

Singleton Singleton is a design pattern purpose is to control object creation. Which means limiting the number of objects to only one. Example public class Singleton {    private static Singleton singleton = null;        //Private Constructor    private Singleton() {    }    public static Singleton getInstance() {       if(singleton == null) {          singleton = new Singleton();       }       return singleton;    } }

5G in India

expected 5g launch  in India - Mid 2018 In Fab-2017 Reliance Jio has tied up with Samsung to bring 5G in India. Both the company are working on LTE-Advanced Pro and 5G. The project will be utilizing spectrum in the 850, 1800 and 2300MHz bands. expected 5g speed 1000 Mbps (1gbps).