Feedjit

Articles for you

Tuesday, December 31, 2013

.asm Coal ASM File Assembly Language: To display 4 items of my personal information Assembly Langugae Sir Asim

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
; Programmed by: SAQIB KHAN
; Purpose: To display 4 items of my personal information
; Date: 27th/april/2012

.model small
.stack 100h
.data
        str db "Name : Saqib Khan $"   ; A string to display
        chr db 65               ; ASCII code of A
        val dw ?                ; Unintialized data item
.code
main:   mov ax, @data           ; Obtain address of data segment
        mov ds, ax              ; Initialize data segment

        lea dx, str             ; Obtain offset address of str
        mov ah, 9h              ; Service # to display a string
        int 21h                 ; Call OS to do the job

        mov dl, 13              ; Place ASCII code of Enter key
        mov ah, 2h              ; Service # to display a char
        int 21h                 ; Call OS to do the operation

        mov dl, 10              ; Place ASCII code of Line feed
        mov ah, 2h              ; Service # to display a char
        int 21h                 ; Call OS to do the operation
        
        mov dl, chr             ; Place ASCII code of char to display
        mov ah, 2h              ; Service # to display a char
        int 21h                 ; Call OS to do the operation

        mov ah, 4ch             ; Service # to terminate a program normally
        int 21h                 ; Call OS to do it
end main

Tuesday, December 24, 2013

How to Create a new Guid CRM 2011 C# xRM Empty Guid or Null Guid

 How to Create/Generate a New GUID using Vb.Net, C# and Vb.Script

 Suppose i have got a guid in Query String like


http://localhost:3214/Default.aspx?id=9D2B0228-4D0D-4C23-8B49-01A698857709


or

like this

// Without Dashes
http://localhost:3214/Default.aspx?id=9D2B02284D0D4C238B4901A698857709










if (Request.QueryString["id"] != null)

string Id = Request.QueryString["id"];

Guid guid = new Guid(Id);

if(guid!= Guid.Empty)
{
  //Use id here to retreive the record.
}








Sunday, September 29, 2013

Software with Source Code to convert RGB to CMYK Converter in C# Image Resizer and Without Using Color Profile

using Photoshop;
using System.IO;
namespace Image_Converter

{
    public partial class Form1 : Form
    {
Photoshop.Application appRef = default(Photoshop.Application);
        Photoshop.Document currentDoc = default(Photoshop.Document);
public Form1()
        {
            InitializeComponent();
         
        }
private void convert_Click(object sender, EventArgs e)
        {
            long originalWidth;
            long originalHeight;
         
            if (txtFrom.Text != "" && txtTo.Text!= "")
            {
                Thread th_1 = new Thread(new ThreadStart(show));
                try
                {
                 
                 
                    th_1.Start();
                    appRef = new Photoshop.Application();
                    appRef.Visible = false;
                    appRef.DisplayDialogs = PsDialogModes.psDisplayNoDialogs;

                    String[] files = Directory.GetFiles(txtFrom.Text);
                    foreach (string fl in files)
                    {
                        if (fl.EndsWith(".jpg") || fl.EndsWith(".jpeg"))
                        {
                            currentDoc = appRef.Open(fl);
                            currentDoc.ChangeMode(PsChangeMode.psConvertToCMYK);
                            appRef.Preferences.RulerUnits = Photoshop.PsUnits.psPixels;
                            originalHeight = (long)currentDoc.Height;
                            originalWidth = (long)currentDoc.Width;
                            int targetHeight = (int)(originalHeight);
                            int targetWidth = (int)(originalWidth);
                            Photoshop.JPEGSaveOptions jpeg = new Photoshop.JPEGSaveOptions();
                            jpeg.Quality = 8;
                            currentDoc.ResizeImage(targetWidth, targetHeight, 300, PsResampleMethod.psBicubic);
                            string temp = txtTo.Text + Path.GetFileName(fl);
                            currentDoc.SaveAs(txtTo.Text + "\\" + Path.GetFileName(fl), jpeg);
                            currentDoc.Close(PsSaveOptions.psDoNotSaveChanges);

                        }
                    }

                }

                catch (Exception ex) {
                    MessageBox.Show(ex.ToString());
                    label3.Hide();
                }

Sunday, September 15, 2013

Simplest and Fastest File Searcher in C#. How to Copy Zip Files from Source to Destination Using C#, .NET

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows.Forms;

namespace Utillity_1
{
    public partial class Form1 : Form
    {
        public string source_path = "E:\\Received files";
        public string destination_path = "D:\\Saqib\\Approved";
        public Form1()
        {
            InitializeComponent();
        }

     

     
        private void btn_Browse_Click(object sender, EventArgs e)
        {
            openFileDialog1.Title = "Open CSV/TSV File";
            openFileDialog1.Filter = "CSV(*.csv)|*.csv";//|TSV(*.tsv)|*.tsv";
            openFileDialog1.Multiselect = false;
           // openFileDialog1.ShowDialog();
            try
            {
                string[] filePaths = Directory.GetFiles(source_path,"*.zip");
         
                if (openFileDialog1.ShowDialog() == DialogResult.OK)
                {
                    StreamReader csv_reader = new StreamReader(openFileDialog1.FileName);
                    //string temp = csv_reader.ReadToEnd();
                    string temp=null;
                    while (!csv_reader.EndOfStream)
                    {
                        string line = csv_reader.ReadLine();
                        if (!(string.IsNullOrEmpty(line)))
                        {
                            string[] values = line.Split(',');

                           // temp += values[0];
                           // temp += Environment.NewLine;
                            foreach (string file in filePaths)
                            {
                                //Console.WriteLine(file);
                                if (file.EndsWith(".zip"))
                                {
                                  string path = Path.GetFileName(file);
                                  string[] to_get_filename = path.Split('.');
                                  string filename = to_get_filename[0];
                                  if (filename.Equals(values[1]))
                                  {
                                      // MessageBox.Show(file);
                                     // source_path +="\\"+ filename+".zip";
                                      destination_path = Path.Combine(destination_path, path);
                                     // File.Move(file, destination_path);
                                      File.Copy(file, destination_path, true);
                                   
                                  }
                                }
                            }
                        }
                    }
                    MessageBox.Show(temp);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
        private void btn_Close_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Really Close?", "Confirm close", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                this.Close();
            }
         
        }

    }
}

Tuesday, August 20, 2013

How to Get All Uparas from the XML using XPATH and C#. XSL XSLT XPATH XML Using Regular Expression REGEX

using System.IO;
using System.Collections;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;
using System.Xml.Xsl;
namespace XML_Parser
{
    class Program
    {
        public static Hashtable hash_table = new Hashtable();
        static void Main(string[] args)
        {
            string path = @"C:\Documents and Settings\saqib\My Documents\OMessenger\Received files\KOKODA-With Index.xml";
            string pattern = @"[a-z][a-z]+\.[a-z]+";
            XslCompiledTransform myxsl = new XslCompiledTransform();
            myxsl.Load("XSLTFile1.xslt");
            myxsl.Transform(path, "To_Table.html");
          //  var xDocument = XDocument.Load(path);
          //  string xmll = xDocument.ToString();
            XmlDocument xml =new XmlDocument();
            xml.Load(path);

XmlNodeList xnList = xml.SelectNodes("//upara");
//Console.WriteLine(xnList.Count);
foreach (XmlNode xn in xnList)

{
    //Console.WriteLine(xn.InnerText);
    string upara = xn.InnerText;
 
    MatchCollection matches = Regex.Matches(upara, pattern);
    foreach (Match match in matches)
    {
        foreach (Capture capture in match.Captures)
        {
            Console.WriteLine("Index={0}, Value={1}", capture.Index, capture.Value);
            hash_table.Add(capture.Index, capture.Value);
        }
    }

}
Console.ReadKey();
        }          
                    }
                }
         
        

Light Box in JQuery with Login Form. CSS3 Buttons and Tags. HTML5 Form

Download Here My Light Box

This is my webpage...

Open Lightbox

x

Physics Game CiviBalls 2 Try Your Mind and Sharpen for Programming

Read More

Articles for you