Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

M Riaz Bashir

@M Riaz Bashir
About
Posts
219
Topics
143
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • PHP - Warning: fopen(): Filename cannot be empty
    M M Riaz Bashir

    I check it Thank you

    Web Development help php

  • PHP - Warning: fopen(): Filename cannot be empty
    M M Riaz Bashir

    Hi, I am facing an error of above mentioned subject, when I try to select the csv file of 3.9mb. Other way, when i select small file like 90kb then it works perfect.. See my following code:

    if ($\_FILES\["file"\]\["error"\] > 0)
    {
      echo "Problem in file! " . "  
    

    ";
    echo "Error: " . $_FILES["file"]["error"] . "
    ";
    }
    else
    {
    echo "Upload: " . $_FILES["file"]["name"] . "
    ";
    echo "Type: " . $_FILES["file"]["type"] . "
    ";
    echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB
    ";
    echo "Stored in: " . $_FILES["file"]["tmp_name"];
    }

    $this\_filename = $\_FILES\["file"\]\["tmp\_name"\]; 
    $csvfile = fopen($this\_filename, 'r');   // << error on this line
    
    Web Development help php

  • MySQL Query Example/Solution of Oracle Query
    M M Riaz Bashir

    thank you sir

    Database database mysql oracle tutorial question

  • MySQL Query Example/Solution of Oracle Query
    M M Riaz Bashir

    Hi, Please let me know the solution of mentioned Oracle Query, that how can I use the same in MySQL.

    SELECT A.CNAME, B.ANAME FROM CLIENT A, DEALER B
    WHERE A.CCODE=B.ACODE(+)

    Thanks (Riaz)

    Database database mysql oracle tutorial question

  • How can you tell if a SQL Server instance max'ed out bottleneck is Memory?
    M M Riaz Bashir

    Thanks alot It works :)

    Database database sql-server sysadmin data-structures performance

  • MySQL Export Problem
    M M Riaz Bashir

    Hi everyone I am facing problem while I write the following syntax on command prompt: c:\>mysqldump

    Error is: "mysqldump: unknown option '--no-beep'"

    please let me know the solution. (Riaz)

    Database help mysql

  • Missing TCP Packets
    M M Riaz Bashir

    thanks for your suggestion

    C# database sysadmin

  • Missing TCP Packets
    M M Riaz Bashir

    thanks for your suggestion

    C# database sysadmin

  • Missing TCP Packets
    M M Riaz Bashir

    Hi, Kindly note that, while capturing network incoming tcp packets using following codes/methods, missing some packets. It is sure that all packets all coming on my network perfectly fine but unfortunately I am missing some packets. Please let me know, what and where, I am doing mistake in my following mentioned codes. Thank you & Regards (Riaz)

        public void Capture()
        {
            \_mainSocket = new Socket(AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.IP);
            \_mainSocket.Bind(new IPEndPoint(IPAddress.Parse("192.168.1.10"), 0));
    
            var byTrue = new byte\[\] { 1, 0, 0, 0 };
            var byOut = new byte\[\] { 1, 0, 0, 0 };
    
            \_mainSocket.IOControl(IOControlCode.ReceiveAll, byTrue, byOut);
    
            \_mainSocket.EnableBroadcast = true;
            \_mainSocket.BeginReceive(\_data, 0, \_data.Length, SocketFlags.None, OnReceive, null);
        }
    
        private void Parse(byte\[\] data, int size)
        {
            ipH = new IPHeader(data, size);
            if (ipH.ProtocolType == Protocol.TCP)
            {
                FilterData(data, size);
            }
            System.Threading.Thread.Sleep(5);
        }
    
        private void FilterData(byte\[\] data, int size)
        {
              // Here i am inserting & updating packets data into my database
        }
    
    C# database sysadmin

  • Sturct - Error
    M M Riaz Bashir

    HI, please let me know correct syntax. Thanks

    #include using namespace std;

    struct student
    {
    int rollNum;
    int myage;
    float fees;
    };

    int main()
    {
    student student1; <<<<<< not working
    student1.rollnum <<<<<< not working

    return 0;
    

    }

    C / C++ / MFC help

  • Good books on JDBC and Java Swing?
    M M Riaz Bashir

    I am also understanding Java using Java How To -=Dietel=-

    Java database java design tutorial question

  • OpenGL - Change Torus color into Red instead Grey Color
    M M Riaz Bashir

    Hi, Kindly let me know, How do I change the torus color into Red instead Grey color and what command lines are required to do the same. Thank you Here are codes:

    #include #include static int spin=0;

    void init(void)
    {
    glClearColor(0.0, 0.0, 0.0, 0.0);
    glShadeModel(GL_SMOOTH);
    glEnable(GL_LIGHTING);
    glEnable(GL_LIGHT0);
    glEnable(GL_DEPTH_TEST);
    }

    void display(void)
    {
    GLfloat position[] = {0.0, 0.0, 1.5, 1.0};

    glClear(GL\_COLOR\_BUFFER\_BIT | GL\_DEPTH\_BUFFER\_BIT);
    glPushMatrix();
    gluLookAt(0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
    glPushMatrix();
    glRotated((GLdouble) spin, 1.0, 0.0, 0.0);
    glLightfv(GL\_LIGHT0, GL\_POSITION, position);
    
    glTranslated(0.0, 0.0, 1.5);
    glDisable(GL\_LIGHTING);
    
    glutWireCube(0.0);
    glEnable(GL\_LIGHTING);	
    glPopMatrix();
    
    glutSolidTorus(0.275, 0.85, 8, 5);
    glPopMatrix();
    glFlush();
    

    }

    void reshape (int w, int h)
    {
    glViewport(0,0, (GLsizei) w, (GLsizei) h);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluPerspective(40.0, (GLfloat) w / (GLfloat) h, 1.0, 20.0);
    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();
    }

    void mouse(int button, int state, int x, int y)
    {
    switch(button)
    {
    case GLUT_LEFT_BUTTON:
    if(state == GLUT_DOWN)
    {
    glEnable(GL_LIGHTING);
    spin = (spin + 30) % 360;
    glutPostRedisplay();
    }
    break;

    default:
    	break;	
    }
    

    }

    void keyboard(unsigned char key, int x, int y)
    {
    switch(key)
    {
    case 27:
    exit(0);
    break;
    }
    }

    int main(int argc, char** argv)
    {
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH);
    glutInitWindowSize(500,500);
    glutInitWindowPosition(100,100);
    glutCreateWindow("My Torus with Mouse Click");
    glutDisplayFunc(display);
    init();
    glutReshapeFunc(reshape);
    glutMouseFunc(mouse);
    glutKeyboardFunc(keyboard);
    glutMainLoop();

    return 0;
    

    }

    C / C++ / MFC graphics game-dev question

  • SendKeys.Send instead SendKeys.SendWait
    M M Riaz Bashir

    Hi, I am trying to send some text to notepad using SendKeys.Send("Hello World!") instead SendKeys.SendWait("Hello World!"). But I could not send and facing problem. Error is: "SendKeys cannot run inside this application because the application is not handling Windows messages. Either change the application to handle messages, or use the SendKeys.SendWait method." Thank you

    namespace Send_Key
    {
    class Program
    {
    [DllImport("user32.dll", SetLastError = true, EntryPoint = "FindWindow", CharSet = CharSet.Auto)]
    static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
    [DllImport("user32.dll", SetLastError = true, EntryPoint = "SetForegroundWindow")]
    static extern bool SetForegroundWindow(IntPtr hWnd);
    [DllImport("user32.dll", SetLastError = true, EntryPoint = "ShowWindow")]
    static extern bool ShowWindow(IntPtr hWnd, int cmCommand);
    static IntPtr hwnd;

        static void Main(string\[\] args)
        {
            Process notePad = new Process();
            notePad.StartInfo.FileName = "notepad.exe";
            notePad.Start();
    
            System.Threading.Thread.Sleep(1000);
    
            SetForegroundWindow(hWnd);
    
            System.Threading.Thread.Sleep(1000);
            SendKeys.Send("Hello World!");
        }
    }
    

    }

    C# help

  • DLLIMPORT - SENDMESSAGE
    M M Riaz Bashir

    Hi, Please let me know, where I am doing wrong. because following program is not receiving text from notepad. Thanks alot

    using System;
    using System.Diagnostics;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Runtime.InteropServices;

    namespace READVALUES
    {
    public partial class Form1 : Form
    {
    [DllImport("user32.dll")]
    static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, long wParam, [MarshalAs(UnmanagedType.LPStr)] StringBuilder lParam);

        public Form1()
        {
            InitializeComponent();
        }
    
        private void Form1\_Load(object sender, EventArgs e)
        {
    
        }
    
        private void button1\_Click(object sender, EventArgs e)
        {
            Process\[\] processes = Process.GetProcessesByName("notepad");
            foreach (Process p in processes)
            {
                string myGotWindow = p.MainWindowTitle;
                IntPtr pFoundWindow = p.MainWindowHandle;
                const uint WM\_GETTEXT = 0x0D;
                StringBuilder sb = new StringBuilder();
                IntPtr retVal = SendMessage(pFoundWindow, WM\_GETTEXT, 100, sb);
                textBox1.Text = sb.ToString();
            }
        }
    }
    

    }

    C# csharp linq graphics

  • Error Using - DLLIMPORT
    M M Riaz Bashir

    Hi, I am facing error while using following:

        \[DllImport("user32.dll")\]
        static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, long wParam, \[MarshalAs(UnmanagedType.LPStr)\] StringBuilder lParam);
    

    error is : Error 1 The type or namespace name 'DllImport' could not be found (are you missing a using directive or an assembly reference?) D:\CS\READVALUES\READVALUES\READVALUES\Form1.cs 16 10 READVALUES

    C# help question

  • Undefined symbol gets2(int, int) in module
    M M Riaz Bashir

    Hi, Please let me know, where am I doing mistake ?

    #include #include void gets2(int, int);
    void main(void)
    {
    int x=2;
    int y=4;

    gets2(x,y);
    getch();
    

    }

    void gets(int xx, int yy)
    {
    printf("X is %d and Y is %d", xx,yy);

    }

    C / C++ / MFC question

  • Store Double Quote in string Variable
    M M Riaz Bashir

    Hi, Please let me know how may I store follow string value into string variable ? string myValue = "aa[a"a]aa"; Thank you in advance

    C# question

  • PDU to Text / String
    M M Riaz Bashir

    Hi, I am reading inbox sms messages from gsm mobile some messages are being received by following format. Please let me know, how may I convert this into text / string to read easily?

    050003B60201AE65F6F8DD2E83E86F50D5FC769743206919CECE83EE693A1A146BCD40F437685E17CFC7F2B4B80CA2A3CBA079596E4F8FCBA0B719549583C6E8777A5C063DA5207919CECE83EE693A1A749A56852750DA0CCABFEBA07B7A8E06D1DFA0795D3C1FCBD3E23288FE0685D96CD0DB0CA2A3CBED9022D6AA52EBEEF21C040049E72E506C450DE35F

    Thank you (Riaz)

    C# question

  • Maping Network Drive
    M M Riaz Bashir

    THANK YOU

    C# csharp database sysadmin question

  • Maping Network Drive
    M M Riaz Bashir

    hi Let me know, How may I use following command using C#?

    net.exe use Y: \\127.0.0.1\\DATABASE

    Thanks (Riaz)

    C# csharp database sysadmin question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups