<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nafiz Ishtiaque Ahmed on Medium]]></title>
        <description><![CDATA[Stories by Nafiz Ishtiaque Ahmed on Medium]]></description>
        <link>https://medium.com/@Nafiz_Ishtiaque?source=rss-4d39c570ee82------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*-Nq2sHvesaweleM3.jpg</url>
            <title>Stories by Nafiz Ishtiaque Ahmed on Medium</title>
            <link>https://medium.com/@Nafiz_Ishtiaque?source=rss-4d39c570ee82------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 19:40:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Nafiz_Ishtiaque/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Searching Algorithm with auto-correction]]></title>
            <link>https://medium.com/@Nafiz_Ishtiaque/searching-algorithm-with-auto-correction-94cf8b39951b?source=rss-4d39c570ee82------2</link>
            <guid isPermaLink="false">https://medium.com/p/94cf8b39951b</guid>
            <category><![CDATA[search-engines]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Nafiz Ishtiaque Ahmed]]></dc:creator>
            <pubDate>Thu, 22 Dec 2016 21:17:31 GMT</pubDate>
            <atom:updated>2016-12-22T21:17:31.229Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>Searching Algorithm with auto-correction</em></blockquote><blockquote><em>import java.util.*;<br>public class AIsoft { <br> public static void main(String[] args) {<br> int sw;<br> System.out.println(“ select which u want to parform : “); <br> System.out.println(“ AUTO or HETARIO “);<br> System.out.println(“ press 1 for AUTO else press 2 for HETARIO :”);<br> Scanner kkk = new Scanner( System.in );<br> sw=kkk.nextInt();<br> if (sw==1){hop_field();};<br> if(sw==2){bam();};<br> System.out.println(“Thank you for using the system .”);</em></blockquote><blockquote><em>}<br> <br> public static void hop_field(){<br> boolean a11,a22,a33,err=true;<br> int a1[]=new int [4],a2[]=new int [4],a3[]=new int [4];<br> Scanner kk = new Scanner( System.in );<br> System.out.println(“ please enter ur 3 patern &amp; each patern size must be 4 &amp; only[1||-1]”);<br> <br> System.out.println(“enter patern A1 : “);<br> for (int i=0;i&lt;4;i++){<br> a1[i]=kk.nextInt();<br> }<br> <br> System.out.println(“enter patern A2 : “);<br> for (int i=0;i&lt;4;i++){<br> a2[i]=kk.nextInt();<br> }<br> System.out.println(“enter patern A3 : “);<br> for (int i=0;i&lt;4;i++){<br> a3[i]=kk.nextInt();<br> }<br> <br> int p[]=new int [4];<br> int A1[][]=new int [a1.length][a1.length], A2[][]=new int [a2.length][a2.length],A3[][]=new int [a3.length][a3.length];<br> A1=bar(a1);<br> A2=bar(a2);<br> A3=bar(a3);<br> int f[][]=new int [a1.length][a1.length],R[]=new int [a1.length];<br> f= adder(A1,A2,A3);<br> System.out.println(“ Learning patern matrix = “);<br> for (int i=0;i&lt;a1.length;i++){<br> for (int j=0;j&lt;a1.length;j++)<br> {<br> System.out.print(f[i][j]+” “);<br> }System.out.println();<br> }<br> System.out.print(“energy function of A1,f,A1 is = “);<br> energy_func(a1,f,a1);<br> System.out.print(“energy function of A2,f,A2 is = “);<br> energy_func(a2,f,a2);<br> System.out.print(“energy function of A3,f,A3 is = “);<br> energy_func(a3,f,a3);<br> System.out.println(“please enter ur patern for RECALL else NOISY patern for MATCHE : “);<br> <br> for (int i=0;i&lt;4;i++){<br> p[i]=kk.nextInt();<br> }<br> <br> R=recall(p,f);<br> System.out.print(“So Patren = “);<br> for (int j=0;j&lt;a1.length;j++)<br> {<br> System.out.print(R[j]+” “);<br> }<br> a11= patern_match(R,a1);<br> a22=patern_match(R,a2);<br> a33=patern_match(R,a3);<br> <br> System.out.println();<br> if(a11){System.out.println(“ patern match with a1 .”);err=false;}<br> if(a22){System.out.println(“ patern match with a2 .”);err=false;}<br> if(a33){System.out.println(“ patern match with a3 .”);err=false;}<br> if(err){System.out.println(“ patern doesnt match with saved patern .”);}<br> }<br> <br> public static int[][] bar(int a[]){<br> int t[][]=new int [a.length][a.length];<br> for (int i=0;i&lt;a.length;i++)<br> for (int j=0;j&lt;a.length;j++)<br> {<br> t[i][j]=a[i]*a[j];<br> }<br> <br> return t;<br> }<br> <br> public static int[][] adder(int A[][],int B[][],int C[][]){<br> int[][] F= new int[A.length][A.length];<br> int i,j;<br> for (i = 0; i &lt;A.length; i++) {<br> for (j = 0; j &lt;A.length; j++) {<br> F[i][j] = 0;<br> }<br> }<br> for(i=0;i&lt;A.length;i++){<br> for(j=0;j&lt;A.length;j++){<br> F[i][j]=A[i][j]+B[i][j]+C[i][j];</em></blockquote><blockquote><em>}</em></blockquote><blockquote><em>}<br> <br> return F;<br> }<br> public static int[] recall(int A[],int P[][]){<br> <br> int o[][]= new int[A.length][A.length],pat[]=new int[A.length];<br> int i,j;<br> <br> for(i=0;i&lt;4;i++){<br> for(j=0;j&lt;4;j++){<br> o[i][j]=P[j][i]*A[j];</em></blockquote><blockquote><em>}</em></blockquote><blockquote><em>}<br> System.out.println(“So now M matrix is :”);<br> for(i=0;i&lt;A.length;i++){<br> for(j=0;j&lt;A.length;j++){<br> System.out.print(o[i][j]+” “);</em></blockquote><blockquote><em>}System.out.println();<br> }<br> /* for(i=0;i&lt;A.length;i++){<br> for(j=0;j&lt;A.length;j++){<br> o[i][j]=P[i][j]*A[j];</em></blockquote><blockquote><em>}</em></blockquote><blockquote><em>}*/<br> for(i=0;i&lt;A.length;i++){<br> for(j=0;j&lt;A.length;j++){<br> pat[i]=o[i][j]+pat[i];</em></blockquote><blockquote><em>}</em></blockquote><blockquote><em>}<br> System.out.println(“After addition patern is : “);<br> for ( j=0;j&lt;pat.length;j++)<br> {<br> System.out.print(pat[j]+” “);<br> }System.out.println();<br> <br> for(i=0;i&lt;A.length;i++){<br> <br> if(pat[i]&gt;=1||pat[i]==0){<br> pat[i]=1;<br> }<br> if(pat[i]&lt;1){<br> pat[i]=-1;<br> }<br> }</em></blockquote><blockquote><em>return pat;<br> }<br> public static boolean patern_match(int A[],int P[]){<br> boolean bb= true;<br> for(int i=0;i&lt;A.length;i++){<br> if(A[i]==P[i])<br> {}<br> else<br> {<br> bb= false; break;<br> <br> }<br> }<br> <br> return bb;<br> }<br> <br> <br> public static void bam() {<br> int a1[]=new int [6],a2[]=new int [6],a3[]=new int [6];<br> int b1[]=new int [5],b2[]=new int [5],b3[]=new int [5];<br> int d1[]=new int [6],d2[]=new int [6],d3[]=new int [6];<br> int f1[]=new int [5],f2[]=new int [5],f3[]=new int [5];<br> Scanner kk = new Scanner( System.in );<br> System.out.println(“ please enter ur 3 A patern &amp; each patern size must be 6 &amp; only[1||0]”);<br> System.out.println(“enter patern A1 : “);<br> for (int i=0;i&lt;6;i++){<br> d1[i]= a1[i]=kk.nextInt();<br> } <br> System.out.println(“enter patern A2 : “);<br> for (int i=0;i&lt;6;i++){<br> d2[i]= a2[i]=kk.nextInt();<br> }<br> System.out.println(“enter patern A3 : “);<br> for (int i=0;i&lt;6;i++){<br> d3[i]= a3[i]=kk.nextInt();<br> }<br> <br> System.out.println(“ please enter ur 3 B patern &amp; each patern size must be 5 &amp; only[1||0]”);<br> <br> System.out.println(“enter patern B1 : “);<br> for (int i=0;i&lt;5;i++){<br> f1[i]= b1[i]=kk.nextInt();<br> }<br> <br> System.out.println(“enter patern B2 : “);<br> for (int i=0;i&lt;5;i++){<br> f2[i]= b2[i]=kk.nextInt();<br> }<br> <br> System.out.println(“enter patern B3 : “);<br> for (int i=0;i&lt;5;i++){<br> f3[i]=b3[i]=kk.nextInt();<br> }</em></blockquote><blockquote><em>a1=bypoler(a1);<br> a2=bypoler(a2);<br> a3=bypoler(a3);<br> b1=bypoler(b1);<br> b2=bypoler(b2);<br> b3=bypoler(b3);<br> <br> int A1[][]=new int [a1.length][b1.length], A2[][]=new int [a2.length][b2.length],A3[][]=new int [a3.length][b3.length];<br> A1=barr(a1,b1);<br> A2=barr(a2,b2);<br> A3=barr(a3,b3);<br> <br> int f[][]=new int [a1.length][b1.length],R[]=new int [b1.length];<br> f= adderr(A1,A2,A3);<br> <br> System.out.println(“ Learning patern matrix : “);<br> for (int i=0;i&lt;f.length;i++){<br> for (int j=0;j&lt;f[0].length;j++)<br> {<br> System.out.print(f[i][j]+” “);<br> }System.out.println();<br> }<br> <br> System.out.print(“energy function of A1,f,B1 is = “);<br> energy_func(a1,f,b1);<br> System.out.print(“energy function of A2,f,B2 is = “);<br> energy_func(a2,f,b2);<br> System.out.print(“energy function of A3,f,B3 is = “);<br> energy_func(a3,f,b3);<br> System.out.println(“ input A from here “); <br> for (int i=0;i&lt;6;i++){<br> System.out.print( d1[i]);<br> }System.out.print(“ “);<br> for (int i=0;i&lt;6;i++){<br> System.out.print( d2[i]);<br> }System.out.print(“ “);<br> for (int i=0;i&lt;6;i++){<br> System.out.print( d3[i]);<br> }System.out.println(“”);<br> int p[]=new int [6];<br> for (int i=0;i&lt;6;i++){<br> p[i]=kk.nextInt();<br> }<br> <br> <br> p=bypoler(p);<br> R=recalll(p,f);<br> R=binory(R);<br> System.out.println(“ its B is :”);<br> for (int j=0;j&lt;b1.length;j++)<br> {<br> System.out.print(R[j]+” “);<br> }System.out.println(“”);<br> <br> <br>}</em></blockquote><blockquote><em>public static int[][] barr(int a[],int b[]){<br> int t[][]=new int [a.length][b.length];<br> for (int i=0;i&lt;a.length;i++)<br> for (int j=0;j&lt;b.length;j++)<br> {<br> t[i][j]=a[i]*b[j];<br> }<br> <br> return t;<br>}</em></blockquote><blockquote><em>public static int[][] adderr(int A[][],int B[][],int C[][]){<br> int[][] F= new int[A.length][A[0].length];<br> int i,j;<br> for (i = 0; i &lt;A.length; i++) {<br> for (j = 0; j &lt;A[0].length; j++) {<br> F[i][j] = 0;<br> }<br> }<br> for(i=0;i&lt;A.length;i++){<br> for(j=0;j&lt;A[0].length;j++){<br> F[i][j]=A[i][j]+B[i][j]+C[i][j];</em></blockquote><blockquote><em>}</em></blockquote><blockquote><em>}</em></blockquote><blockquote><em>return F;<br>}<br>public static int[] recalll(int A[],int P[][]){<br> int o[][]= new int[P[0].length][A.length],pat[]=new int[A.length];<br> int i,j;<br> for(i=0;i&lt;P[0].length;i++){<br> for(j=0;j&lt;A.length;j++){<br> o[i][j]=P[j][i]*A[j];<br> }<br> }<br> <br> for(i=0;i&lt;P[0].length;i++){<br> for(j=0;j&lt;A.length;j++){<br> pat[i]=o[i][j]+pat[i];<br> }<br> }<br> <br> for(i=0;i&lt;P[0].length;i++){<br> <br> if(pat[i]&gt;=1){<br> pat[i]=1;<br> }<br> if(pat[i]&lt;1){<br> pat[i]=-1;<br> }<br> }</em></blockquote><blockquote><em>return pat;<br>}<br> <br>public static int[] bypoler(int A[]){<br> <br> for (int i=0;i&lt;A.length;i++){<br> if(A[i]==0){A[i]=-1;}<br> <br> }<br> <br> return A;<br>}</em></blockquote><blockquote><em>public static int[] binory(int A[]){<br> <br> for (int i=0;i&lt;A.length;i++){<br> if(A[i]==-1){A[i]=0;}<br> <br> }</em></blockquote><blockquote><em>return A;<br>}</em></blockquote><blockquote><em>public static void energy_func(int A[],int P[][],int B[]){<br> int o[][]= new int[P.length][P[0].length],pat[]=new int[P.length],d[]=new int [A.length];<br> int i,j,energy=0,t=-1;<br> <br> for(i=0;i&lt;o.length;i++){<br> for(j=0;j&lt;o[0].length;j++){<br> o[i][j]=P[i][j]*A[i];</em></blockquote><blockquote><em>}</em></blockquote><blockquote><em>}<br> <br> for(i=0;i&lt;P[0].length;i++){<br> for(j=0;j&lt;B.length;j++){<br> o[i][j]=o[j][i]*B[j];<br> }<br> }<br> for(i=0;i&lt;o.length;i++){<br> for(j=0;j&lt;o[0].length;j++){<br> pat[i]=o[i][j]+pat[i];</em></blockquote><blockquote><em>}<br> }<br> for ( j=0;j&lt;pat.length;j++)<br> {<br> energy=energy+pat[j];<br> }<br> energy=energy*t;<br> System.out.println(energy);<br> <br>}</em></blockquote><blockquote><em>}</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94cf8b39951b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Genetic Algorithm]]></title>
            <link>https://medium.com/@Nafiz_Ishtiaque/genetic-algorithm-6ea078f23011?source=rss-4d39c570ee82------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ea078f23011</guid>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[mutation]]></category>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[genetic-algorithm]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Nafiz Ishtiaque Ahmed]]></dc:creator>
            <pubDate>Thu, 22 Dec 2016 21:12:09 GMT</pubDate>
            <atom:updated>2016-12-22T21:18:54.656Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Genetic Algorithm</blockquote><blockquote>import java.util.*;<br>public class GA {</blockquote><blockquote>public static void main(String[] args) {<br> //value must be 4 bit 2⁴//<br> int value[]={8,14,4,12},i,min=9999,bin[][]=new int[4][4],sum=0,avgof=0,sumof=0,fi[]=new int[4],mx[]=new int[4],val2[][]=new int [4][2];<br> int offspring[]=new int[4],val[]=new int[4],count=1;<br> float ofsp[]=new float[4],avg=0;<br> <br> for(i=0;i&lt;4;i++){<br> binary(value,bin); <br> print(value,bin,fi,ofsp,offspring,sum,sumof,avg,avgof,mx,count);<br> min=min_cpy(value,val,val2,min,offspring);<br> sort( mx);<br> sort(val);<br> reproduction(val2,mx,min, val,value);<br> count++;<br> <br> }<br> mutation(bin);<br> <br> <br> }<br> public static int min_cpy(int value[],int val[],int val2[][],int min,int offspring[]){<br> int i;<br> for (i=0;i&lt;4;i++)<br> {<br> if(offspring[i]&lt;min)<br> {min=offspring[i];}<br> }<br> for (i=0;i&lt;4;i++){<br> val2[i][0]=value[i];<br> val2[i][1]=offspring[i];<br> val[i]=value[i];<br> }<br> <br> return min;<br> }<br> <br> public static void sort(int m[]){<br> int j;<br> for ( j=0; j &lt; 4; j++) {<br> int key = m[j];<br> int o = j — 1;<br> while (o &gt;= 0 &amp;&amp; m[o] &lt; key) {<br> m[o + 1] = m[o];<br> o = o — 1;<br> m[o + 1] = key;<br> <br> }<br> <br>}<br> <br> }</blockquote><blockquote>public static void binary(int value[],int bin[][]){<br> int i,j,m=0;<br> for (i=0;i&lt;4;i++)<br> {<br> m=value[i];<br> for (j=3;j&gt;=0;j — )<br> {<br> if(m%2==0){<br> bin[i][j]=0;<br> m=m/2;<br> }<br> else<br> {<br> bin[i][j]=1;<br> m=m/2;<br> <br> }<br> }<br> }<br> <br> <br>}</blockquote><blockquote>public static void print(int value[],int bin[][],int fi[],float ofsp[],int offspring[],int sum,int sumof,float avg,int avgof,int mx[],int count){<br> int i,j;<br> for (i=0;i&lt;4;i++){<br> fi[i]=value[i]*value[i];<br> sum=sum+fi[i];<br> }<br> <br> avg=sum/4;<br> for (i=0;i&lt;4;i++){<br> ofsp[i]= (fi[i]/avg);<br> }<br> for (i=0;i&lt;4;i++){<br> mx[i]= offspring[i]= Math.round(ofsp[i]);<br> }<br> for (i=0;i&lt;4;i++){sumof=sumof+offspring[i];}<br> for (i=0;i&lt;4;i++){avgof=sumof/4;}<br> System.out.println(“Genaration “+count);<br> for (i=0;i&lt;4;i++)<br> {<br> <br> System.out.print(value[i]+” “);<br> for (j=0;j&lt;4;j++)<br> { System.out.print(bin[i][j]);}<br> System.out.println(“ “+fi[i]+” “+ofsp[i]+” “+offspring[i]);<br> }</blockquote><blockquote>System.out.println(“sum “+sum+” “+sumof);<br> System.out.println(“avg “+Math.round(avg)+” “+avgof);</blockquote><blockquote>}<br>public static void reproduction(int val2[][],int mx[],int min,int val[],int value[]){<br> int i,j;<br> for (i=0;i&lt;4;i++){<br> <br> if(val2[i][1]==min){<br> j=0;<br> if(mx[j]==0){j=j+1;}<br> if(mx[j]!=0){<br> val2[i][0]=val[j];<br> mx[j]=mx[j]-1;<br> }<br> <br> <br> }<br> }<br> for (i=0;i&lt;4;i++){<br> value[i]=val2[i][0];<br> }<br> <br> <br>}<br>public static void mutation(int bin[][]){<br> <br> System.out.println(“ mutation :”);<br> Scanner keyboard = new Scanner(System.in);<br> System.out.println(“enter which[0,1,2,3] one :”);<br> int l,k,i;<br> int w =keyboard.nextInt();<br> System.out.println(“enter two mutation position : “);<br> <br> l= keyboard.nextInt();<br> k= keyboard.nextInt();<br> <br> <br> <br> if(bin[w][l]==1){bin[w][l]=0;}<br> else{bin[w][l]=1;}<br> <br> if(bin[w][k]==1){bin[w][k]=0;}<br> else{bin[w][k]=1;}<br> <br> System.out.println(“after mutation in “+l+” &amp; “+k+” position :” );<br> for (i=0;i&lt;4;i++){<br> System.out.print(bin[w][i]);<br> <br> }<br> <br> <br>}<br>}</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ea078f23011" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[String parser, grammar for compiler 02]]></title>
            <link>https://medium.com/@Nafiz_Ishtiaque/string-parser-grammar-for-compiler-02-9f075ca9e6e5?source=rss-4d39c570ee82------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f075ca9e6e5</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[compilers]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[parse]]></category>
            <dc:creator><![CDATA[Nafiz Ishtiaque Ahmed]]></dc:creator>
            <pubDate>Thu, 22 Dec 2016 21:07:04 GMT</pubDate>
            <atom:updated>2016-12-22T21:07:04.865Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>String parser, grammar for compiler 02</blockquote><blockquote>/*<br> Name: Ahmed , Nafiz Ishtiaque<br> ID: 11–19911–3<br> SEC: A</blockquote><blockquote>Grammar</blockquote><blockquote>type → simple || id || array [ simple ] of type<br> simple → integer || char || num dotdot num</blockquote><blockquote>*/</blockquote><blockquote>#include&lt;iostream&gt;<br>#include&lt;sstream&gt;<br>#include &lt;string&gt;</blockquote><blockquote>using namespace std;</blockquote><blockquote>string language, splite_language[100] , LA ; ///////language decleared to input the string ; splite_language decleared to save the splited string of language; LA is decleared to point the token</blockquote><blockquote>int i=0 ,j=0 , result=0 , ptr=0 ; ///////i =j=result=ptr=0;global variable;</blockquote><blockquote>int error() //////the function defines the result as 1 {1 treated as error in main function};returns int type<br> {<br> result=1; //////declear result value as 1 ; before it was 0<br> return 0; /////return type<br> }</blockquote><blockquote>void Match(string t) ////match function matches ‘terminals’ with token(LA);<br> {</blockquote><blockquote>if (LA == t) /////compare terminals’ with token(LA) ;<br> {<br> if(j&lt;i) /////length of splite_language is saved on i so the statment checks for unwanted exception<br> LA=splite_language[++j]; /////LA assign to the next token</blockquote><blockquote>}<br> else<br> error();<br> }</blockquote><blockquote>void check_end() /////////the function checks the language is end or not — -&gt;NULL<br> {<br> if(ptr==0) ////////points that its not in a block<br> {</blockquote><blockquote>if (LA.empty()){} ///////token(LA)is NULL<br> else<br> error();<br> }<br> else<br> {<br> if(LA!=”]”) ///////else pointer is 1 that means it is surrounded by a block( [] )<br> error();<br> }</blockquote><blockquote>}</blockquote><blockquote>void simple() ///////each “veriable” defines a function in code<br> {</blockquote><blockquote>int s; ////local variable used for switching purpose<br> if(LA == “integer” ) s=1;<br> else if(LA==”char”) s=2;<br> else if(LA==”num”) s=3;<br> else s=4;</blockquote><blockquote>switch (s)<br> {<br> case 1:<br> Match(“integer”);check_end();break; ///////check_end function checks the next token is NULL or not<br> case 2:<br> Match(“char”);check_end();break; ///////check_end function checks the next token is NULL or not<br> case 3:<br> Match(“num”);Match(“dotdot”);Match(“num”);check_end();break; ///////check_end function checks the next token is NULL or not<br> default:<br> error(); //////if only NULL then it returns ERROR as no EPSILON in its rule<br> }<br> }<br> void type() ///////each “veriable” defines a function in code<br> {<br> int s; ////local variable used for switching purpose<br> if(LA == “integer” || LA == “char” || LA == “num”) s=1;<br> else if(LA==”id”) s=2;<br> else if(LA==”array”) s=3;<br> else s=4;</blockquote><blockquote>switch (s)<br> {<br> case 1:<br> simple();check_end();break; ///////call simple function<br> case 2:<br> Match(“id”);check_end();break; ///////check_end function checks the next token is NULL or not<br> case 3:<br> Match(“array”);Match(“[“);ptr=1;simple();ptr=0;Match(“]”);Match(“of”);type();check_end();break; /////// pointer is 1 that means it is surrounded by a block( [] ) so next token must be ‘] ‘ if NULL or else thes ERROR<br> default:<br> error(); //////if only NULL then it returns ERROR as no EPSILON in its rule<br> }<br> }</blockquote><blockquote>int main(){ //////main function<br> i=0;<br> cout&lt;&lt;”*** *** *** *** *** *** *** *** *** *** ***”&lt;&lt;endl;<br> cout&lt;&lt;” type → simple || id || array [ simple ] of type “&lt;&lt;endl;<br> cout&lt;&lt;” simple → integer || char || num dotdot num “&lt;&lt;endl;<br> cout&lt;&lt;”*** *** *** *** *** *** *** *** *** *** *** \n”&lt;&lt;endl;<br> cout&lt;&lt;” Input a Language to varify :: “&lt;&lt;endl;</blockquote><blockquote>getline(cin,language); //////input language<br> istringstream splite(language); //////splite function declearation and splite language<br> do<br> {<br> string xch;<br> splite &gt;&gt; xch;<br> splite_language[i++]=xch; /////swap the splited string in a array<br> }while(splite);<br> LA=splite_language[0]; /////assigning token to LA<br> type(); /////start variable call<br> if(result==1) ///// 1 means it return a ERRor in the syntex of the language<br> {<br> cout&lt;&lt;endl&lt;&lt;”!!!!!! LANGUAGE INCORRECT !!!!!!!”&lt;&lt;endl; ////output<br> cout&lt;&lt;”!!!!!! SYNTEX ERROR !!!!!!!”&lt;&lt;endl;<br> }<br> else<br> cout&lt;&lt;endl&lt;&lt;”***** CORRECT LANGUAGE ********”&lt;&lt;endl; ////output<br> return 0;<br> }</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f075ca9e6e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[String parser, grammar for compiler 01]]></title>
            <link>https://medium.com/@Nafiz_Ishtiaque/string-parser-language-grammar-for-compiler-01-f60d67ce72bf?source=rss-4d39c570ee82------2</link>
            <guid isPermaLink="false">https://medium.com/p/f60d67ce72bf</guid>
            <category><![CDATA[parser]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[compilers]]></category>
            <dc:creator><![CDATA[Nafiz Ishtiaque Ahmed]]></dc:creator>
            <pubDate>Thu, 22 Dec 2016 20:59:34 GMT</pubDate>
            <atom:updated>2016-12-22T21:02:06.111Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>String parser, grammar for compiler 01</blockquote><blockquote>#include &lt;iostream&gt;<br>#include &lt;stack&gt;<br>#include &lt;queue&gt;<br>#include&lt;sstream&gt;<br>#include &lt;string&gt;<br>using namespace std;</blockquote><blockquote>char E[3]={‘T’,’e’,’\0&#39;};<br>char e[3]={‘+’,’T’,’e’};<br>char e1[3]={‘#’,’\0&#39;};<br>char T[3]={‘F’,’t’,’\0&#39;};<br>char t[3]={‘*’,’F’,’t’};<br>char t1[3]={‘#’,’\0&#39;};<br>char F[3]={‘(‘,’E’,’)’};<br>char F1[3]={‘i’,’\0&#39;};<br>char EE[2],ee[2],TT[2],tt[2],FF[2];<br>char EEE[4],eee[4],TTT[4],ttt[4],FFF[4];<br>char variable[5]={‘E’,’e’,’T’,’t’,’F’};<br>int fl=0,i=0;<br>char n;<br>char parse_table[5][6];</blockquote><blockquote>char first(char var[],char vv[])<br>{<br> if(var[0]==’E’){first(E,vv);};<br> if(var[0]==’e’){vv[0]=first(e,vv);vv[1]=first(e,vv);};<br> if(var[0]==’T’){first(T,vv);};<br> if(var[0]==’t’){vv[0]=first(t,vv);vv[1]=first(t1,vv);};<br> if(var[0]==’F’){vv[0]=first(F,vv);vv[1]=first(F1,vv);};<br>}<br>char first(char var[],char vt[],char vv[])<br>{<br> int i=0;<br> if(var[0]==’E’){first(E,vt,vv);i=1;};<br> if(var[0]==’e’){vv[0]=first(e,vt,vv);vv[1]=first(e,vt,vv);i=1;};<br> if(var[0]==’T’){first(T,vt,vv);i=1;};<br> if(var[0]==’t’){vv[0]=first(t,vt,vv);vv[1]=first(t1,vt,vv);i=1;};<br> if(var[0]==’F’){vv[0]=first(F,vt,vv);vv[1]=first(F1,vt,vv);i=1;};<br> if(i==0){vv[0]=var[0];vv[1]=vt[0];}<br>}</blockquote><blockquote>char follow_rule_3(char vvv[],int i,char xyu[]){<br>for(int k=0;k❤;k++)<br> {<br> vvv[i]=xyu[k];<br> i++;<br> }<br> }<br>char follow_rule_2(char var[],char vv[],int k,char vvv[],char xyu[])<br>{<br>if(var[k]==’)’ ){vvv[1]=var[k];}<br>else{for(int i=0;i&lt;4;i++){if(vv[i]!=’#’){vvv[i]=vv[i];}else{follow_rule_3(vvv,i,xyu);break;}}}<br>}<br>char follow(char var[],char vvv[],int l)<br>{<br> int j=0;int w=0;</blockquote><blockquote>for(int i=0;i❤;i++)<br> {if(E[i]==var[l]&amp;&amp; w==0)<br> {w=1;n=’E’;w=1;if(E[i+1]!=NULL)<br> {follow_rule_2(E,ee,i+1,vvv,EEE);}<br> else<br> {if(variable[l]!=’E’)<br> {follow_rule_3(vvv,j,EEE);}}<br> break;}}</blockquote><blockquote>for(int i=0;i❤;i++){if(e[i]==var[l]&amp;&amp; w==0){w=1;n=’e’;w=1;if(e[i+1]!=NULL){follow_rule_2(e,ee,i+1,vvv,eee);}else {if(variable[l]!=’e’){follow_rule_3(vvv,j,eee);}}break;}}<br> for(int i=0;i❤;i++){if(T[i]==var[l]&amp;&amp; w==0){w=1;n=’T’;w=1;if(T[i+1]!=NULL){follow_rule_2(T,tt,i+1,vvv,TTT);}else {if(variable[l]!=’T’){follow_rule_3(vvv,j,TTT);}}break;}}<br> for(int i=0;i❤;i++){if(t[i]==var[l]&amp;&amp; w==0){w=1;n=’t’;w=1;if(t[i+1]!=NULL){follow_rule_2(t,tt,i+1,vvv,ttt);}else {if(variable[l]!=’t’){follow_rule_3(vvv,j,ttt);}}break;}}<br> for(int i=0;i❤;i++){if(F[i]==var[l]&amp;&amp; w==0){w=1;n=’F’;w=1;if(F[i+1]!=NULL){follow_rule_2(F,FF,i+1,vvv,FFF);}else {if(variable[l]!=’F’){follow_rule_3(vvv,j,FFF);}}break;}}</blockquote><blockquote>}</blockquote><blockquote>char parse(char var[],int r,char vv[],char vvv[])<br>{<br> for(int i=0;i&lt;2;i++)<br> {<br> if(vv[i]==’i’){parse_table[r][0]=var[r];}<br> if(vv[i]==’+’){parse_table[r][1]=var[r];}<br> if(vv[i]==’*’){parse_table[r][2]=var[r];}<br> if(vv[i]==’(‘){parse_table[r][3]=var[r];}<br> if(vv[i]==’)’){parse_table[r][4]=var[r];}<br> if(vv[i]==’#’)<br> {<br> for(int i=0;i&lt;4;i++){<br> if(vvv[i]==’i’){parse_table[r][0]=var[r];}<br> if(vvv[i]==’+’){parse_table[r][1]=var[r];}<br> if(vvv[i]==’*’){parse_table[r][2]=var[r];}<br> if(vvv[i]==’(‘){parse_table[r][3]=var[r];}<br> if(vvv[i]==’)’){parse_table[r][4]=var[r];}<br> if(vvv[i]==’$’){parse_table[r][5]=var[r];}<br> }<br> }<br>}<br>}</blockquote><blockquote>int main()<br>{<br> EEE[0]={‘$’};<br> /////////////////////////////FIRST FUNCTION CALL //////////////////////////////////////////<br> cout&lt;&lt;” FIEST FUNCTION “&lt;&lt;endl;<br> first(E,EE);cout&lt;&lt;”E -&gt; “;<br> for (int i=0;i&lt;2;i++){cout&lt;&lt;” “&lt;&lt;EE[i];}cout&lt;&lt;endl;<br> first(e,e1,ee);cout&lt;&lt;”e -&gt; “;<br> for (int i=0;i&lt;2;i++){cout&lt;&lt;” “&lt;&lt;ee[i];}cout&lt;&lt;endl;<br> first(T,TT);cout&lt;&lt;”T -&gt; “;<br> for (int i=0;i&lt;2;i++){cout&lt;&lt;” “&lt;&lt;TT[i];}cout&lt;&lt;endl;<br> first(t,t1,tt);cout&lt;&lt;”t -&gt; “;<br> for (int i=0;i&lt;2;i++){cout&lt;&lt;” “&lt;&lt;tt[i];}cout&lt;&lt;endl;<br> first(F,F1,FF);cout&lt;&lt;”F -&gt; “;<br> for (int i=0;i&lt;2;i++){cout&lt;&lt;” “&lt;&lt;FF[i];}cout&lt;&lt;endl;<br> int g;<br> g=0;<br> /////////////////////////////FOLLOW FUNCTION CALL //////////////////////////////////////////<br> cout&lt;&lt;” FOLLOW FUNCTION “&lt;&lt;endl;<br> follow(variable,EEE,g);cout&lt;&lt;”E -&gt; “;<br> for (int i=0;i&lt;5;i++){cout&lt;&lt;” “&lt;&lt;EEE[i];}cout&lt;&lt;endl;<br> g++;<br> follow(variable,eee,g);cout&lt;&lt;”e -&gt; “;<br> for (int i=0;i&lt;5;i++){cout&lt;&lt;” “&lt;&lt;eee[i];}cout&lt;&lt;endl;<br> g++;<br> follow(variable,TTT,g);cout&lt;&lt;”T -&gt; “;<br> for (int i=0;i&lt;5;i++){cout&lt;&lt;” “&lt;&lt;TTT[i];}cout&lt;&lt;endl;<br> g++;<br> follow(variable,ttt,g);cout&lt;&lt;”t -&gt; “;<br> for (int i=0;i&lt;5;i++){cout&lt;&lt;” “&lt;&lt;ttt[i];}cout&lt;&lt;endl;<br> g++;<br> follow(variable,FFF,g);cout&lt;&lt;”F -&gt; “;<br> for (int i=0;i&lt;5;i++){cout&lt;&lt;” “&lt;&lt;FFF[i];}cout&lt;&lt;endl;<br> g++;<br> /////////////////////////////PARCING TABLE //////////////////////////////////////////<br> cout&lt;&lt;” PARCING TABLE “&lt;&lt;endl;<br> cout&lt;&lt;” ID + * ( ) $ “;cout&lt;&lt;endl;<br> char p[6]={‘i’,’+’,’*’,’(‘,’)’,’$’};<br> g=0;<br> parse(variable,g,EE,EEE);cout&lt;&lt;”E -&gt; “;<br> for (int i=0;i&lt;6;i++){cout&lt;&lt;” “&lt;&lt;parse_table[g][i];}cout&lt;&lt;endl;<br> g++;<br> parse(variable,g,ee,eee);cout&lt;&lt;”e -&gt; “;<br> for (int i=0;i&lt;6;i++){cout&lt;&lt;” “&lt;&lt;parse_table[g][i];}cout&lt;&lt;endl;<br> g++;<br> parse(variable,g,TT,TTT);cout&lt;&lt;”T -&gt; “;<br> for (int i=0;i&lt;6;i++){cout&lt;&lt;” “&lt;&lt;parse_table[g][i];}cout&lt;&lt;endl;<br> g++;<br> parse(variable,g,tt,ttt);cout&lt;&lt;”t -&gt; “;<br> for (int i=0;i&lt;6;i++){cout&lt;&lt;” “&lt;&lt;parse_table[g][i];}cout&lt;&lt;endl;<br> g++;<br> parse(variable,g,FF,FFF);cout&lt;&lt;”F -&gt; “;<br> for (int i=0;i&lt;6;i++){cout&lt;&lt;” “&lt;&lt;parse_table[g][i];}cout&lt;&lt;endl;<br> g++;<br> ///////////////////////////STACK_I/O_//////////////////////////////////////////<br> g=0;<br> stack &lt;char&gt; stk;<br> stk.push(‘$’);<br> stk.push(‘E’);<br> queue &lt;char&gt; input;<br> string language, splite_language[100];<br> char sl[100];<br> cout &lt;&lt; “Input your Language (no space &amp; give “”$”” after it) ::”&lt;&lt;endl;<br> cout &lt;&lt; “ — — — — → “;<br> getline(cin,language);<br> parse_table[1][4]=’#’;parse_table[1][5]=’#’;parse_table[4][0]=’i’;<br> parse_table[3][1]=’#’;parse_table[3][4]=’#’;parse_table[3][5]=’#’;<br> istringstream splite(language);<br> do<br> {<br> string xch;<br> splite &gt;&gt; xch;<br> splite_language[i++]=xch;<br> }while(splite);</blockquote><blockquote>int s=language.size();<br> for (int a=0;a&lt;=s;a++)<br> {<br> sl[a]=language[a];<br> }<br> do {<br> input.push (sl[g]);<br> g++;<br> if(g==20){cout &lt;&lt; “put “”$”” after language =&gt; input error “&lt;&lt;endl; break;}<br> }while (input.back()!=’$’);</blockquote><blockquote>int t=0;<br>int y=0;</blockquote><blockquote>while (!stk.empty())<br> {</blockquote><blockquote>int i,j;int m=0;</blockquote><blockquote>for(j=0;j&lt;5;j++){<br>if(input.front()==p[j]){m=1;break;}<br>}<br> if(stk.top() != input.front())<br>{<br> do{<br>if(m==1||input.front()==’$’){</blockquote><blockquote>for(int h=0;h&lt;5;h++){<br> if(stk.top()==variable[h]){i=h;break;}<br> }</blockquote><blockquote>if(parse_table[i][j]==stk.top()){}<br> if(parse_table[i][j]==stk.top()||parse_table[i][j]==’i’||parse_table[i][j]==’#’){<br> stk.pop();</blockquote><blockquote>if(parse_table[i][j]==’E’){stk.push(‘e’);stk.push(‘T’);}<br> if(parse_table[i][j]==’e’){stk.push(‘e’);stk.push(‘T’);stk.push(‘+’);}<br> if(parse_table[i][j]==’T’){stk.push(‘t’);stk.push(‘F’);}<br> if(parse_table[i][j]==’i’){stk.push(‘i’);}<br> if(parse_table[i][j]==’t’){stk.push(‘t’);stk.push(‘F’);stk.push(‘*’);}<br> if(parse_table[i][j]==’F’){stk.push(‘)’);stk.push(‘E’);stk.push(‘(‘);}<br> if(parse_table[i][j]==’#’){}<br> t++;<br> }<br> else{cout&lt;&lt;” — — — — -&gt; Language error ← — — — — — “&lt;&lt;endl;t=1;break;}<br>}</blockquote><blockquote>else{cout&lt;&lt;” — — — — -&gt; Language error ← — — — — — “&lt;&lt;endl;t=1;break;}</blockquote><blockquote>}while(stk.top()!=input.front());</blockquote><blockquote>}<br> if(stk.top() == input.front()){<br> if(input.front()!=’$’){<br> stk.pop();<br> input.pop();}<br> }</blockquote><blockquote>if(t==1){break;}<br>y++;<br>/*if(input.front() ==’$’)*/{if(stk.top() ==’$’){cout&lt;&lt;” — — — — -&gt; Language Correct ← — — — — — “;break;}}</blockquote><blockquote>}</blockquote><blockquote>cout &lt;&lt; ‘\n’;</blockquote><blockquote>return 0;<br>}</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f60d67ce72bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Graph operations extracted component from an image in openCV]]></title>
            <link>https://medium.com/@Nafiz_Ishtiaque/graph-operations-extracted-component-from-an-image-in-opencv-144306e2deea?source=rss-4d39c570ee82------2</link>
            <guid isPermaLink="false">https://medium.com/p/144306e2deea</guid>
            <category><![CDATA[c]]></category>
            <category><![CDATA[opencv]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[computer-vision]]></category>
            <dc:creator><![CDATA[Nafiz Ishtiaque Ahmed]]></dc:creator>
            <pubDate>Thu, 22 Dec 2016 20:07:12 GMT</pubDate>
            <atom:updated>2016-12-22T20:07:12.132Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>#include&lt;opencv/cvaux.h&gt;<br>#include&lt;opencv/highgui.h&gt;<br>#include&lt;opencv/cxcore.h&gt;</blockquote><blockquote>#include&lt;stdio.h&gt;<br>#include&lt;stdlib.h&gt;</blockquote><blockquote>int main(int argc, char* argv[])<br>{<br> <br> CvSize size640x480 = cvSize(640, 480); // use a 640x480 size for all windows, also make sure webcam is set to 640x480</blockquote><blockquote>CvCapture* p_capwebcam; // assign web cam video stream to this later....</blockquote><blockquote>IplImage* p_imgOriginal; // = cvCreateImage(cvSize(640, 480), IPL_DEPTH_32F, 1); // pointer to an image structure, this will be the input imge from webcam<br> IplImage* p_imgProcessed; // pointer to an imgae structure, this will be the processed imgae</blockquote><blockquote>CvMemStorage* p_strStorage; // nesseary storage variable to pass into cvHougCircles()</blockquote><blockquote>CvSeq* p_seqCircles; // pointer to an OpenCV sequence, will be returned by cvHough Circle() and contain all circles</blockquote><blockquote>float* p_fltXYRadius; // Pointer to 3 element array of floats</blockquote><blockquote>int i; // loop counter<br> char charForcheckEscKey; // char for checking key press</blockquote><blockquote>p_capwebcam = cvCaptureFromCAM(0); // 0 =&gt; use 1st webcam</blockquote><blockquote>if(p_capwebcam == NULL)<br> {<br> printf(&quot;error: capture is NULL \n&quot;);<br> getchar();<br> return (-1);</blockquote><blockquote>}</blockquote><blockquote>// declare 2 windows</blockquote><blockquote>cvNamedWindow(&quot;Original&quot;, CV_WINDOW_AUTOSIZE); // original image from webcam<br> cvNamedWindow(&quot;Processed&quot;, CV_WINDOW_AUTOSIZE); // the process image will be use for detecting circles</blockquote><blockquote>p_imgProcessed = cvCreateImage(size640x480, IPL_DEPTH_8U, 1); // 8 bit, 1channel</blockquote><blockquote>while(1)<br> {<br> p_imgOriginal = cvQueryFrame(p_capwebcam); // get frame from webcam<br> if(p_imgOriginal == NULL)<br> {<br> printf(&quot;error: frame is NULL \n&quot;);<br> getchar();<br> break;<br> <br> }</blockquote><blockquote>cvInRangeS(p_imgOriginal, CV_RGB(175, 0, 0), CV_RGB(256, 100, 100),p_imgProcessed); // min and max filtering value and function output</blockquote><blockquote>p_strStorage = cvCreateMemStorage(0); // allocate neccessary memory variable to pass into cyHoughcircle()</blockquote><blockquote>// smoth the processd image, this will make it easer for the next function to pick out the circle<br> cvSmooth(p_imgProcessed, p_imgProcessed, CV_GAUSSIAN, 9, 9);</blockquote><blockquote>// fill sequential structure with all circles in processed image<br> p_seqCircles = cvHoughCircles(p_imgProcessed,<br> p_strStorage,<br> CV_HOUGH_GRADIENT,<br> 2, p_imgProcessed-&gt;height / 4,<br> 100,<br> 50,<br> 10,<br> 400);</blockquote><blockquote>for(i = 0; i &lt; p_seqCircles -&gt; total; i++)<br> {<br> p_fltXYRadius = (float*)cvGetSeqElem(p_seqCircles, i);</blockquote><blockquote>printf(&quot;Ball Position x = %f, Y = %f, Radious = %f \n&quot;,p_fltXYRadius[0], p_fltXYRadius[1], p_fltXYRadius[2]);</blockquote><blockquote>cvCircle(p_imgOriginal,<br> cvPoint(cvRound(p_fltXYRadius[0]), cvRound(p_fltXYRadius[1])),<br> 3,<br> CV_RGB(0, 255, 0),<br> CV_FILLED);</blockquote><blockquote>//draw a red circle around the detected object</blockquote><blockquote>cvCircle(p_imgOriginal,<br> cvPoint(cvRound(p_fltXYRadius[0]),<br> cvRound(p_fltXYRadius[1])),<br> cvRound(p_fltXYRadius[2]),<br> CV_RGB(255, 0, 0),<br> 3);<br> } // end for</blockquote><blockquote>cvShowImage(&quot;Original&quot;, p_imgOriginal);<br> cvShowImage(&quot;Processed&quot;, p_imgProcessed);</blockquote><blockquote>cvReleaseMemStorage(&amp;p_strStorage);</blockquote><blockquote>charForcheckEscKey = cvWaitKey(10);<br> if(charForcheckEscKey == 27) break;</blockquote><blockquote>}<br> <br> <br> cvReleaseCapture(&amp;p_capwebcam);</blockquote><blockquote>cvDestroyWindow(&quot;Original&quot;);<br> cvDestroyWindow(&quot;Processed&quot;);</blockquote><blockquote>return 0;<br>}</blockquote><blockquote>#include “cv.h”<br>#include “highgui.h”<br>int main()<br>{<br>IplImage* newImg; // original image<br>IplImage* grayImg; // gray image for the conversion of the original image<br>IplImage* trackingImg; // gray image for the tracking edge detection<br>//load original image<br>newImg = cvLoadImage(“D:\lena.png”,1);<br>//create a single channel 1 byte image (i.e. gray-level image)<br>grayImg = cvCreateImage( cvSize(newImg-&gt;width, newImg-&gt;height), IPL_DEPTH_8U, 1 );<br>//convert original color image (3 channel rgb color image) to gray-level image</blockquote><blockquote>CvMemStorage* storage = cvCreateMemStorage(0);<br>cvCvtColor( newImg, grayImg, CV_BGR2GRAY );<br>trackingImg = cvCreateImage(cvGetSize(newImg), IPL_DEPTH_8U, 1);<br>// tracking edge detection</blockquote><blockquote>cvSmooth(grayImg, grayImg, CV_GAUSSIAN, 3, 3, 0, 0 );</blockquote><blockquote>CvSeq* circles = cvHoughCircles(grayImg, storage, CV_HOUGH_GRADIENT,<br> 11, // inverse ratio of the accumulator resolution<br> 1, // minimum distance between circle centres<br> 40, // higher threshold value for Canny<br> 20, // accumulator threshold for the circle centers; smaller-&gt;more false circles<br> 6, // minimum radius<br> 20); // maximum radius</blockquote><blockquote>printf(“ recognization item == %d\n”, circles-&gt;total);<br> int i;<br> for (i = 0; i &lt; circles-&gt;total; i++) {<br> float *p = (float*)cvGetSeqElem(circles, i);<br> CvPoint center = cvPoint(cvRound(p[0]),cvRound(p[1]));<br> CvScalar val = cvGet2D(grayImg, center.y, center.x);<br> if (val.val[0] &lt; 1) continue;<br> printf(“%d %d %d\n”, cvRound(p[0]),cvRound(p[1]), cvRound(p[2]));<br> cvCircle(newImg, center, cvRound(p[2]), CV_RGB(0,255,0), 1, CV_AA, 0);<br> }</blockquote><blockquote>cvCanny(grayImg, trackingImg, 50, 150, 3);<br>cvNamedWindow(“src”, 1);<br>cvNamedWindow(“tracking”,1);<br>cvShowImage( “src”, newImg );<br>cvShowImage( “tracking”, trackingImg );<br>cvWaitKey(0);<br>cvDestroyWindow( “src” );<br>cvDestroyWindow( “tracking” );<br>cvReleaseImage( &amp;newImg );<br>cvReleaseImage( &amp;grayImg );<br>cvReleaseImage( &amp;trackingImg );<br>return 0;<br>}</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=144306e2deea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A developers love with UX]]></title>
            <link>https://medium.com/@Nafiz_Ishtiaque/a-developers-love-with-ux-96a14a2b091a?source=rss-4d39c570ee82------2</link>
            <guid isPermaLink="false">https://medium.com/p/96a14a2b091a</guid>
            <category><![CDATA[interesting]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[ux]]></category>
            <dc:creator><![CDATA[Nafiz Ishtiaque Ahmed]]></dc:creator>
            <pubDate>Thu, 01 Dec 2016 15:53:44 GMT</pubDate>
            <atom:updated>2016-12-01T15:53:44.893Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*27PDG9dQ4F0f-1tJ4jL3uA.jpeg" /></figure><p>UX is a engineering with users lovely experience with system .</p><p>Building a button it doesn’t make any interest but building a button knowing users interest , psychological interest , human motor behaviour , colour fidelity makes lots interest with it .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96a14a2b091a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Developer nailing with React-Native part : 1]]></title>
            <link>https://medium.com/@Nafiz_Ishtiaque/android-developer-nailing-with-react-native-part-1-6567402e85e5?source=rss-4d39c570ee82------2</link>
            <guid isPermaLink="false">https://medium.com/p/6567402e85e5</guid>
            <category><![CDATA[ux-design]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <dc:creator><![CDATA[Nafiz Ishtiaque Ahmed]]></dc:creator>
            <pubDate>Tue, 29 Nov 2016 12:55:22 GMT</pubDate>
            <atom:updated>2016-11-29T15:41:26.705Z</atom:updated>
            <content:encoded><![CDATA[<p>Very much bored with solving same types of problem with different types of mechanism having new flavors of framework . Every solution is good enough but not optimal . Where UI goes complex day by day and previous libraries becomes useless or mass.</p><p>There Facebook comes with React-Native . Social Engineering with developers . Better for developers life .</p><p>Without fully graduated with React-Native , diving into live project from scratch . For a java developer its harder to code with HTML , CSS , JS for the first phase . But day by day it makes developers life much easier.</p><p>First fight with React-Naive with a custom tabbar . React libraries are always good for IOS then Android .But Android libraries are improving (actually we are making improvement). A focusing parallelogram background in tabbar .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/382/1*w8zB6KkZqH-E3KgWB47qKg.png" /><figcaption>Tabbar</figcaption></figure><p>Here is the code thats works for me.</p><h4><strong>JS :</strong></h4><blockquote>parallelogram_layout( isSelected ){<br> if(isSelected){<br> return(<br> &lt;View style={styles.main_view}&gt;<br> &lt;View style={styles.left_view}/&gt;<br> &lt;View style={styles.right_view}/&gt;<br> &lt;/View&gt;<br> )<br> }<br> };</blockquote><h4><strong>CSS:</strong></h4><blockquote>left_view: {<br> flex : 1,<br> borderLeftWidth: 30,<br> borderBottomWidth: 80,<br> borderLeftColor: ‘transparent’,<br> borderBottomColor: ‘red’,<br> },<br> right_view: {<br> flex : 1,<br> borderRightWidth: 30,<br> borderTopWidth: 80,<br> borderRightColor: ‘transparent’,<br> borderTopColor: ‘red’,<br> },<br> main_view:{<br> flexDirection:’row’,<br> alignItems:’center’,<br> justifyContent: ‘center’,<br> alignSelf: ‘stretch’,<br> flex: 1,</blockquote><blockquote>},</blockquote><p>Thats it ; yea thats it ; its done .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6567402e85e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>