Posts
 
Reputation
Joined
Last Seen
Ranked #27
Strength to Increase Rep
+16
Strength to Decrease Rep
-4
89% Quality Score
Upvotes Received
574
Posts with Upvotes
467
Upvoting Members
183
Downvotes Received
128
Posts with Downvotes
103
Downvoting Members
18
259 Commented Posts
~1.06M People Reached
About Me

Software Engineer

Interests
Software Development
PC Specs
vrooom!!11!
Favorite Tags
Member Avatar for Duki
Member Avatar for zambetta

You could use generics and extensions for this: [code] public static void Shuffle<T>(this IList<T> list) { Random rng = new Random(); int n = list.Count; while (n > 1) { n--; int k = rng.Next(n + 1); T value = list[k]; list[k] = list[n]; list[n] = value; } } [/code] …

Member Avatar for adajames
0
1K
Member Avatar for Bhoot

The problem is both projects can't access one another. There is a compile order you can see (click the "Debug"/"Release" dropdown and select options at the bottom, its in there). It first compiles project A, then project B. But if it cannot compile Project A until Project B has been …

Member Avatar for V._549
0
11K
Member Avatar for gianrocks

Here is another approach. [code] Imports System.Data.SqlClient 'IF OBJECT_ID('PDF', 'U') IS NOT NULL DROP TABLE PDF 'CREATE TABLE PDF '( ' RecordId int identity(1000, 1) PRIMARY KEY, ' PDF varbinary(max) ') Public Class frmPDF Private Sub ButtonUpload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonUpload.Click Using conn As New …

Member Avatar for Owais_4
0
3K
Member Avatar for Shaitan00

You didn't marshal all the strings: [code] using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; using System.Security; using System.Security.Principal; namespace daniweb { public class WindowsLoadUserProfile { /// /// The LogonUser function attempts to log a user on to the local computer. /// [DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = …

Member Avatar for Pooja_20
0
6K
Member Avatar for DdoubleD
Member Avatar for progtick

It could likely be modified somewhere else in your store procedure that you did not post here. Also -- this is not a good idea: [code=sql] IF OBJECT_ID('tempdb..#Test', 'U') IS NOT NULL DROP TABLE #Test Create Table #Test ( PK varchar(5) UNIQUE, Value1 decimal(5,2) ) GO Insert Into #Test (PK, …

Member Avatar for happygeek
0
648
Member Avatar for siddhesh123

Are you running your software on both ends of the connection? [URL="http://en.wikipedia.org/wiki/Media_Access_Control"]MAC addresses[/URL] are only "guaranteed valid" for [URL="http://en.wikipedia.org/wiki/OSI_model#Layer_2:_Data_Link_Layer"]layer 2[/URL] communications in a LAN. They do not traverse a router as you would think. That being said if it is your software running on both ends then you can use …

Member Avatar for JamesCherrill
0
2K
Member Avatar for snakay

Count them: da.UpdateCommand.CommandText = "update per010_ssk set " + " izin_tipi=?, " {1} + " hareket_tipi=?, " {2} + " izin_sure=? ," {3} + " kullanim_sure=?, " {4} + " baslama_tarih=?, " {5} + " bitis_tarih=?, " {6} + " hakedis_tarih=?, " {7} + " sua=? " {8} + " …

Member Avatar for Reverend Jim
0
6K
Member Avatar for metalla_nz

I do the same thing in a number of my applications and there is no "right" or "wrong" answer in my opinion, but the way I chose doesn't seem to be popular to internet folks. What I do is have an "Install Wizard" run as a separate application and it …

Member Avatar for Garr
0
311
Member Avatar for bincy_2050

Page: [code] <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DownloadForm.aspx.cs" Inherits="daniweb.asp.DownloadForm" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" /> </div> </form> </body> </html> [/code] Code behind: [code=c#] using System; using System.Collections.Generic; using System.Linq; using …

Member Avatar for sai_10
0
10K
Member Avatar for q8_dreamy

Here is an example. See if you can modify it to suit your needs: [code=sql] Select Count(*) As CustCnt, (Select Count(*) From Invoice Where Invoice.CustNumber = Customer.CustNumber) As InvCnt From Customer Group By Customer.CustNumber [/code]

Member Avatar for Sirisha_2
0
1K
Member Avatar for G_Waddell

**G_Waddell**: Short answer: You are using the wrong build type. My guess: you are running on a 64-bit version of windows and have your compiler output settings to "Any CPU prefer 32-bit", or "x86". See configuration options for solution: ![build.png](/attachments/large/1/0128138fafc3c9f3a8bace197730f39e.png "align-center") Long answer: The problem is build output on your …

Member Avatar for JOSheaIV
0
341
Member Avatar for santhanalakshmi

Why not just validate on the postback and come back with an error message if it is <10 characters? I can't think of any website that enforces a minimum length validation browser side.

Member Avatar for Sagar_7
0
3K
Member Avatar for Dmennite

Take a look at this thread: [url]http://www.daniweb.com/forums/thread247583.html[/url] [URL="http://www.daniweb.com/forums/member633074.html"]MeSampath[/URL] provided this code: [code] MySqlConnection mcon = null; MySqlCommand cmd = null; FileStream fsObj = null; BinaryReader binRdr = null; try { //converting image to bytes fsObj = File.OpenRead(pictureBox1.ImageLocation); byte[] imgContent = new byte[fsObj.Length]; binRdr = new BinaryReader(fsObj); imgContent = binRdr.ReadBytes((int)fsObj.Length); mcon …

Member Avatar for Ehab_1
0
2K
Member Avatar for yash777

Try this: [code=c#] private void DoExcel() { const string Fname = @"C:\dotnetwin\daniweb\Book1.xlsx"; Microsoft.Office.Interop.Excel.ApplicationClass excel = null; Microsoft.Office.Interop.Excel.Workbook wb = null; Microsoft.Office.Interop.Excel.Worksheet ws = null; Microsoft.Office.Interop.Excel.Range rng = null; object missing = Type.Missing; //bool ReadOnly = false; //true or missing gives the same try { //Excel.Application is abstract class so I …

Member Avatar for creiglee
0
4K
Member Avatar for iamahar

I can't figure out how to preview this post or what Dani did with code tags. I'll let the mods sort that out. My thoughts: You have a few problems 1) You didn't post complete code 2) The 4th argument of File.Open() you have FileShare.Read. You need _exclusive_ file access …

Member Avatar for ddanbe
0
161
Member Avatar for ddanbe

As far as I know you cannot save over a file that already exists. With Excel automation I always save the file to a temp file and overwrite the old file: [code=c#] private void DoExcel() { const string Fname = @"C:\dotnetwin\daniweb\Book1.xlsx"; Microsoft.Office.Interop.Excel.ApplicationClass excel = null; Microsoft.Office.Interop.Excel.Workbook wb = null; Microsoft.Office.Interop.Excel.Worksheet …

Member Avatar for HaiLuong
0
4K
Member Avatar for george_82

It is a code file automatically generated by your designer to hold the form's layout information that was created using the Visual Studio IDE. Previous versions of Visual Studio stored all of the information contained in the .designer.cs file in the main code file but the split it out due …

Member Avatar for asdfiuo
0
7K
Member Avatar for rastafarian

Sometimes malware installs itself and forces an outbound proxy so it can hijack connections. I would run antivirus and antimalware first. If that isn't the issue then post back and we'll go from there.

Member Avatar for yomawm
0
6K
Member Avatar for anithasalavadi

You want to "embed" the excel application inside of the page? That isn't going to be easy... if its' even possible.

Member Avatar for Makara
0
5K
Member Avatar for derekn

I don't know the capabilities of the wrt54g but you could plug a hub in to the router and branch the traffic off to your machine and run a packet sniffer such as wireshark and monitor all network traffic. You would see IM, emails, etc in addition to websites. Before …

Member Avatar for jasonkaven
0
1K
Member Avatar for Gaurav arora

[code=sql] Insert Into aTable (SomeString, SomeDateTime) Values ('abc', GetDate()) [/code] [code=sql] Update aTable Set SomeDateTime = GetDate() [/code]

Member Avatar for Timothy_3
0
212
Member Avatar for arunmagar

Is there any reason you're trying to build it from source rather than installing it from the package repository? [code=bash] sk:~# apt-cache search libpcap | grep ^libp libpcap-dev - Development library for libpcap (transitional package) libpcap-ruby1.8 - Ruby interface for the libpcap packet capture library libpcap0.7 - System interface for …

Member Avatar for Web Spider
0
1K
Member Avatar for VIeditorlover

Sign your assemblies and don't distribute your application. The .NET assemblies are in MSIL so they can always be decompiled.

Member Avatar for JOSheaIV
1
1K
Member Avatar for Bhoot

[quote] KeyboardHookProc() stopped getting called: [/quote] I cant be sure of this without you posting a sample application, but from the sound of it you are either closing the connection OR the connection variables is going out of scope and becomes breakfast for the garbage collector. [quote] Another problem was …

Member Avatar for Jay Cox
0
223
Member Avatar for mansoorhacker

What kind of barcode reader? You can use a [URL="http://www.waspbarcode.com/"]wasp barcode reader[/URL] to scan barcodes and it will send the barcode data over via ps2/usb. Or are you talking about OCR recognition of barcodes in image files? I use [URL="http://www.atalasoft.com/"]Atalasoft[/URL]'s barcode ocr library for image detection. They have a runtime …

Member Avatar for brent-me
0
335
Member Avatar for facadie

Just test the length. [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace daniweb { public partial class frmLoginScreen : Form { public frmLoginScreen() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(textBox1.Text)) { MessageBox.Show("You must enter a …

Member Avatar for vadde
0
4K
Member Avatar for sknake

Here is a sample code snippet of logging in a user against a user table in an MSSQL database with password encryption. Scott Knake

Member Avatar for pritaeas
10
7K
Member Avatar for sivamoni