• Welcome to Valhalla Legends Archive.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Imperceptus

#1
Web Development / WCF of ASMX
December 04, 2009, 11:24 AM
Ive been looking at possibly working with WCF instead of ASMX, anyone have a preference from personal experience?




not sure if this was for .net forum or webdev
#2
Gaming Discussion / Diablo III 2011
November 24, 2009, 09:43 AM
Ive read recently that Diablo III is planned to be released in 2011 :'( :'( :'( :'( :'( :'( :'( :'(
#3
.NET Platform / [asp.net] griview clone
October 20, 2009, 04:01 PM
Is it possible to clone the columns of a gridview?
#4
.NET Platform / [asp.net] Runat Attribute
October 08, 2009, 03:30 PM
Why does asp.net require a runat="server" attribute if you can't specify another option like runat="client".  I am a little confused as to why this attribute even exists.
#5
.NET Platform / Textbox Events [asp.net]
October 06, 2009, 01:42 PM
I have a grid view that I am casting data out of into a textbox.

  Protected Sub gvSpread_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvSpread.RowDataBound

       Select Case e.Row.RowType
           Case DataControlRowType.DataRow

               Dim txtTicker As TextBox = _
                   TryCast(e.Row.Cells(0).FindControl("TextBox1"), TextBox)

               txtTicker.Attributes.Add("onblur", "validate();")
               txtTicker.Attributes.Add("autocomplete", "off")
               txtTickers.Add(txtTicker.UniqueID)

               AddHandler txtTicker.TextChanged, AddressOf txtTicker_Changed

               Dim txtValue As TextBox = TryCast(e.Row.Cells(1).FindControl("TextBox2"), TextBox)
               txtValue.Text = FormatCurrency(txtValue.Text, 2)
               txtValue.Attributes.Add("onKeyUp", "totalfields();")

               AddHandler txtValue.TextChanged, AddressOf txtTicker_Changed
               ValueTotal += Val(txtValue.Text)


Is expecting the AddHandler statements to actually work a fantasy?  
#6
I am trying to color the background color of input fields on a page using javascript

        function notifyDuplicates() {
            var el = document.getElementsByTagName('input');
            for (counter1 = 0; counter1 < el.length; counter1++) {
                var firstEl = el[counter1];
                if ((firstEl.type == 'text') && (firstEl.id.endsWith('TextBox1'))) {                   
                    for (counter2 = 0; counter2 < el.length; counter2++) {
                        var secondEl = el[counter2];
                        firstEl.style.background = ((firstEl.value == secondEl.value) && (counter1!=counter2))?'#FF8684':'#FFFFFF';
                        secondEl.style.background = ((firstEl.value == secondEl.value) && (counter2!=counter1))?'#FF8684':'#FFFFFF';
                    }
                }
            }
        }

If my page looks like

Column1             Column2             
Value1                Value2
Value1                Value3

The background for the element of Value1 ends up being colored red, but the the other Value1 Element does not.  Thoughts?
#7
Web Development / Datatable.Select
October 01, 2009, 05:28 PM
I am trying to get the Select method for datatables to work and It never seems to like msdn says.


        Dim dtTempSnapshot As DataTable = dsTempSnapshot.Tables(0)
        Dim dsExisting As DataSet = UserInfo.Portfolios.Snapshot.Details(PortfolioID, SnapshotDate)
        Dim dtExisiting As DataTable = dsExisting.Tables(0)
        For Each dRow As DataRow In dtTempSnapshot.Rows
            Dim drFound() As DataRow = dtExisiting.Select("Ticker='" & dRow("Ticker") & "'")
        Next

Im hoping to fill drFound with results that would say dtExisting has a ticker that was in dtTempsnapshot.  However which ever why I try I end up with nodda OR I get told that the value for dRow("Ticker") is a column could not be found.  "Ticker" Is a primary key within the dataset.  I am out of Idea's and Coffee.  Any thoughts/suggestions?
#8
Web Development / Javascript Adding Values
September 29, 2009, 05:41 PM
I am trying to add the values from textboxes in a webpage
       function totalfields() {
           var         function totalfields() {
            var total = 0;
            var elements = document.getElementsByTagName("input"); // make a collection of all input elements
            for (var i = 0; i < elements.length; i++)
                if (elements[i].type == "text") {
                    var txtval = elements[i].value;
                    txtval = txtval.replace(/[^\d\.-]/g, '');
                    total += txtval;
            }
            alert(total);       
        }

The popup shows that I am concatenating and not adding, what did I goof on?
#9
.NET Platform / Interfaces
September 25, 2009, 01:57 PM
I keep seeing references on msdn that some objects have interfaces, what are they good for?
#10
Web Development / Datasets
August 27, 2009, 09:21 AM
If a webservice is developed to use datasets will that restrict the audience of sites that use it to .net apps only?
#11
.NET Platform / asp:DropdownList
August 05, 2009, 04:35 PM
I have a drop downlist on a asp.net form that i populate with list items during the load. It looks like
<asp:DropDownList ID="_RiskTolerance" runat="server"
                    Width="150px"></asp:DropDownList>

The CodeBehind I use to add items looks like

    Private Sub FillCombobox(ByVal ComboControl As DropDownList, ByVal dsCombo As DataSet)
        Dim myItem As ListItem
        For Each row As DataRow In dsCombo.Tables(0).Rows
            myItem = New ListItem(row(1), row(0))
            ComboControl.Items.Add(myItem)

        Next
    End Sub


I have tried to figure out what the user is setting the value of a in a dropdownlist.  So far nothing returns what the user chooses.  Item.SelectedItem.value and Item.SelectedIndex both seem like the right choice but the dont return what I thought.

One example

<select name="ctl00$ContentPlaceHolder1$_RiskTolerance" id="ctl00_ContentPlaceHolder1__RiskTolerance" style="width: 150px;">
<option selected="selected" value="1">High Risk</option>
<option value="2">Average Risk</option>
<option value="3">Low Risk</option>
<option value="4">No Risk</option>

</select>

Say I choose Option 4 in my browser and click a button on the page to start the processing of the information on the page.
If I reference _RiskTolerance.SelectedIndex.Value Or _RiskTolerance.SelectedItem.Value, neither of them return a value anywhere close to what I am looking for.

As far as I can figure I have to enable postback for the dropdown for it to fire the "On" events, and preferably I dont want to use postback for this.

Thoughts?
#12
.NET Platform / vb.net for each with step?
July 28, 2009, 01:49 PM
I would like to use step in my code like so
            For Each att As objValue In SearchSet Step 2

            Next

but vs2k8 only seems to want to let me do

            For Each att As objValue In SearchSet
            Next

Is what I want to not possible without possibly doing?

            For Counter as Integer = lbound(searchset) to ubound(searchset) step 2
            Next


Thanks in advance
#13
.NET Platform / web.config question
July 08, 2009, 02:14 PM
Going through someone else's code to familiarize myself with the application and I came to this line

<add name="SubscriptionsConnectionString"
connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Subscriptions.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient"/>

Now I have tried to connect to that database, with no luck. Also I have found that the application is using that line currently and runs and it works great.  But i can't find the database running on any machine within our network.

The creator of the application no longer works for my company =(.  

Any idea's how I might find the database?
#14
.NET Platform / Richtext in a listviewitem
May 11, 2009, 12:25 PM
I would like to put richtext in a listview item, any thoughts? google yielded nodda
#15
General Discussion / Internet Drops
October 04, 2008, 01:51 AM
Ive had cox as my ISP since July, live in the Baton Rouge area and i have been having period service interruption with my service.  I have called and called and called cox.  5 technicians have come out to work on my lines and 1 bucket truck with system engineers.  So far nothing has worked.   

So...I decided to make a program to track when this drop happens.  It pings google every second until the ping fails.  On failing it switches to ping every hop in order from my ISP's DNS to my router.  All Fails but my router.

Now the part I really am trying to figure out, Why is this happening every 13 minutes and 14 seconds like clockwork.  The outage usually lasts for 21 seconds which is long enough to drop me from any game, sometimes its only a few seconds or less than one second. While other times its out for a few minutes.

Anyone have any clue?

Thanks in advance.
#16
Web Development / Javascript Date Time
May 05, 2008, 11:41 AM
Trying to Get JavaScript Date Time.  Perhaps im going about this wrong. but heres what im doing(well trying to make work).

<!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>
<title>testtitle>
  <script type="text/javascript" src="inc/yumjava.js"></script>
  <script language="JavaScript" type="text/javascript">
    alert(CurrentDateTime);
  </script>
</head>
<body>
</body>
</html>


Contents of yumjava.js
function CurrentDate(){
  var currentTime = new Date();
  var month = currentTime.getMonth() + 1;
  var day = currentTime.getDate();
  var year = currentTime.getFullYear();
  var current = month + "/" + day + "/" + year;
  return current;
}

function CurrentTime(){
  var currentTime = new Date();
  var hours = currentTime.getHours();
  var minutes = currentTime.getMinutes();

  if (minutes < 10){
    minutes = "0" + minutes;}
  var current = hours + ":" + minutes + " ";
  if(hours > 11){
    current = current + "PM";
  } else {
    current = current + "AM";
  return current;
  }
}

function CurrentDateTime(){
  var current = CurrentDate;
  current = current + CurrentTime;
  return current;
}


Why wont the alert work?

#17
Battle.net Bot Development / D2GS Connection
April 27, 2008, 07:33 PM
Anyone know where the D2 Client pulls the information from on where to connect to for the d2gs servers?


edit, nm think i found it here, http://forum.valhallalegends.com/index.php?topic=11756.0

unless thats wrong.
#18
.NET Platform / WTF Error
April 26, 2008, 09:01 AM
Happens randomly in my socket class.  Is this from a memory leak?


The Undo operation encountered a context that is different from what was applied in the corresponding Set operation. The possible cause is that a context was Set on the thread and not reverted(undone).
#19
Battle.net Bot Development / D2 Gateways
April 26, 2008, 03:41 AM
How can I add my own gateway option to the list of gateways in the D2 Client?
#20
.NET Platform / Socket.Listen questions
April 25, 2008, 03:15 PM
For the life of me I tried googling and have come up with much.  I am trying to add a listen functionality to my socket class. I figured making it roughly the same way as I made the connect methods would be a good idea. Heres what I have.
   Public Sub Listen()
        Try
            _Socket = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
            _Socket.Listen(1)
            _Socket.BeginAccept(AddressOf ConnectionRequest, Nothing)
        Catch ex As Exception
            RaiseEvent SocketError(ex)
        End Try
    End Sub
    Private Sub ConnectionRequest()
        _Socket.Accept()
        _Socket.BeginReceive(_Buffer, SocketFlags.None, AddressOf DataFromRemoteClient, Nothing)
    End Sub
    Private Sub DataFromRemoteClient()
        _Socket.Receive(_Buffer)
        RaiseEvent DataRecieved(_Buffer.ToString)
    End Sub


Suggestions and related comments welcome.