.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

double auction game. How?

Posted By:      Posted Date: October 03, 2010    Points: 0   Category :ASP.Net

Hope you all have great day.

Here's the question:

I'm trying to build double auction economics game (no code yet, just thoughts). How it should work: people go to a website and type in  given password(no registration/username) . then system randomly assign roles (buyer/seller). 

Sellers sell the same product.

 Each seller has a page with a texbox where he/she puts the price they want to get from the product. Also seller screen has all buyers offers in a real time. (If buyer bought product he/she is removed from this list).

 Each buyer has a page with texbox where he/she puts the price they offer for the product. Buyer screen has all sellers prices in a real-time.

For example, if you are the seller and nobody wants to buy you product for $9 you put price of $5 and it is reflected to all sellers/buyers screens.


Technical part. I think it can be achieved using just standard controls of asp.net. I am thinking of two update panels 1st update panel will have all offers/prices from sellers/buyers, second update panel will have textbox and submit button.

It looks to me like a chat. for example http://www.codegod.de/WebAppCodeGod/Chat-with-ASP-NET-and-Ajax-AI

View Complete Post

More Related Resource Links

Advanced Basics: A Match-Making Game in Visual Basic


My four-year-old son has decided that he wants to be like his dad when he grows up. He is planning to work in my office, and write computer programs just like I do. But there is one problem-he thinks I write games.

Duncan Mackenzie

MSDN Magazine October 2005

Split List into sub lists of List of size n

Hi all,   I've been playing around for a little bit trying to find the best way of taking a List<double> of variable size and splitting it in to sub-lists of  size n. So maybe a method stub like   public List<List<double>> splitData(int width,List<double> data) { <br/> }<br/> The problem is i cant get my head around how to iterate through the parameter "data" properly when the data.count is not exactly divisible by the parameter "width". I have been trying for loops but i think i need to switch to do whiles.   I'm not massively familiar with LINQ but could anyone advise if LINQ would provide an alternative way of doing it?   Any help much appreciated   John

two adjacent double quotes in json causes blue screen by JavaScriptSerializer

Hello, I am using System.Web.Script.Serialization.JavaScriptSerializer to deserialize  http requests.  I get the blue screen when the contents I am deserializing has two double quotes, for example:  ""country"". Is there a fix for this?  Currently I replace the "" with a special string and then I deserialization, then I put back the "".  I do this for a given field in the object which I've seen comes in with ""s.  The problem is that I should be doing this for all fields in the input json.  This is a lot of extra code to write as I could be deserializing many different types of Json objects.  The "" is needed by the client to specify a quoted string, so I can't ask for the input to be changed. Any help on this subject would be really appreciated. Many thanks.     I am using .Net framework 3.5.

double.IsNaN throwing ArithmeticException

I have problem when calling double.IsNaN method. It is throwing an ArithmeticException. With a message like "Overflow or underflow in the arithmetic operation." Any ideas as to what is causing this problem?

double spin text in richtextbox

i want to implement this feature : if i have a following sentence : {my name is james vick and iam a {member|user|visitor} on this {forum|website|site} and iam loving it | iam admin and iam a {supervisor|admin|moderator} on this {forum|website|site} and iam loving it} on a click of button i want to generate this : my name is james vick and iam a member on this site and iam loving it or iam admin and iam a admin on this forum and iam loving it The basic need is to randomly choose words between {|} braces I have been able to do this for inner nest i.e. for {member|user|visitor}. But how to include the outer nest of sentences also i.e. {something blah blah {blah1|blah2} and | something else} ? code for inner nest : Private Sub SimpleButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SimpleButton3.Click Dim stringWithTextIn As String = RichTextBox1.Text Dim regex As New Regex("{(.*?)}") Dim r As String = regex.Replace(stringWithTextIn, New MatchEvaluator(AddressOf ReplaceMatch)) RichTextBox2.Text = r End Sub Private Function ReplaceMatch(ByVal m As Match) As String Dim parts = m.Groups(1).Value.Split("|"c) Return parts(r.Next(0, parts.Length)) End Function i know i just have to change the regex but what do i add in it to include outer braces?

bug: subtract value from double returns invalid value!

Dim b as double  = 0.8 Dim a as double = 1 - b a contains the value 0.1999999996 in stead of 0.2 ???????????????????

String StartWith double quote

hi all,my string variable first character starts with " now i want to check whether it has " or not. how to check this from Code Behind.

Double hop delegation problem

Hi,I have an ASP.NET 2.0 web app which calls a one way web method on a web service. This web method contacts remote servers and pulls back config information to confirm the state of new server builds (settings etc) and inserts the collected data into a SQL database. The web app is supposed to pass through the callers kerberos ticket to the web service and then again to the newly built server which is being checked, all via impersonation and delegation using the calling users administrator privileges.The trouble is, I just can't get the web service to run under the callers context. I have the SPN's set up, delegation turned on in the active directory objects for the computer running the web app and service and the worker process domain user service account. I have windows authentication on and impersonation set to true in both the web app and service's web.config, integrated authentication in IIS, and IE settings are all ok. All has been checked out and passes the tests in DelegConfig, but it still won't work.It appears that any data that's is written to the database is written under the context of the web pool service account, and not the calling users, plus along with the fact that I get access denied messages when trying to collect data from the server says impersonation isn't working.Also, is it possible to run the checks under the calling users

How to pass double pointers for COM Interop via MethodInfo.Invoke ?

Hello, I need to make COM IntetrOp at runtime using reflections. My native COM Object's exposed methods have some parameters as pointers (DWORD*) and some double pointers (DWORD**) and some are user defined types(e.g SomeUDTType objSmeUDTType) and its pointer to pointer(i.e. SomeUDTType **pSomeUDTType). I need to pass pointers to pointers. For now how can I be able to populate "object" array as pointers to pointers of SomeUDTType. Working Example:      STDMETHODIMP MyCallableMethod(DWORD *value_1,BSTR *bstrName,WESContext **a_wesContext tlbImp.exe generated output:      DTINIDLLib.RuntimeCallingClass.MyCallableMethod(ref uint, ref string, System.IntrPtr) Regards UsmanMutlithreading

How to prevent combobox drop down from expanding on double click

Hi, I have a requirment to toggle the selected item of a combobox on double click. I am able to achieve this using MouseDoubleClick event for combobox. But the issue is, when I double click the popup for the combobox also drops down, which I need to avoid.   How can I do this.   Please help.   Thanks, P

ListSearchExtender causing double postback when alert() or confirm() is called within PageRequestMan

This is a weird one.   I'm trying to implement a confirmation dialog before an async postback.  The idea is to use the JavaScript confirm() function to allow the user to cancel the postback.  I'm implementing it this way because my page has a bunch of different controls that might trigger an async postback inside an UpdatePanel.  Some of these are Ajax Control Toolkit controls like the ComboBox.  Rather than trying to trap the DOM event that triggers postback for each of these controls, it's easier to write one function and attach it to the client side initializeRequest event of the PageRequestManager, calling set_Cancel(true) or abortPostBack() if the user does not confirm.  This function can also be a central place to undo any changes if the user does not confirm.The problem is that the act of popping up the confirm dialog causes the UpdatePanel to postback twice, but only when the triggering control is a DropDownList (with AutoPostBack enabled, of course) with a ListSearchExtender.  If I replace the confirm() with alert(), the same thing happens.  If I comment out the alert, the problem goes away.  Below is a stripped-down page to reproduce the issue.  (I tested with IE 8/FF 3.5, and also tried both the new ASP.NET Ajax Library Beta 0911 and the old AJAX Control Toolkit Version 3.0.30930.)<%@ Page Language

Passing Double Value to Function

Hi all,The scenario is this:I have a .aspx webform, with code behind to handle data entered by user, most fields are in double.At business layer, at other class, let say there is a function: public SaveData(value1 As double, value2 As double) as BooleanThus, when I call the function at code behind:SaveData(txtDouble.txt, txtDouble2.txt)The problem is when there is a empty text, it will throw an exception invalid cast to double value.Thus, I should change it to:Double value1 = 0.0 Double value2 = 0.0 double.TryParse(txtDouble.txt, out value1) double.TryParse(txtDouble2.txt, out value2) SaveData(value1, value2) I just wondering whether this is the correct way of writing it? And if I have more than 20 fields of double value, then I should declare additional 20 double value?Your input is much appreciated.Cheers!

Tips For Creating simple game .net

Hi. I am developing a simple backgammon. i Designed 3 picture for the game. 1) Black not as png format 2)white not ==>png format 3) board jpg i have sum question about designing game. i want to create it with .NET Framework 4. probably windows application. I'm a bit familiar with wpf but not much. what is the best way for putting png nut on the jpg board? picturebox ? in attention of first question how can i move nuts on board? if possible give me some tips about developing this game. thanks

NullReferenceException in ReHosted Designer on double-click

Hi,   I have a WinForms application with a rehosted workflow designer (WF4) and although my xamlx workflow opens in the designer without error, I find that when I drill down into the SendReceive activities I get a NullReferenceException as follows: NullReferenceException: Object reference not set to an instance of an object, at System.Activities.Core.Presentation.FlowchartDesigner.CleanupFlowchart() at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)... I'm running on Windows 7 x64. Any help with this would be hugely appreciated. Thanks, Stuart  

CompareValidator - double

<asp:CompareValidator ID="CompareValidatorAmountDepositMin" runat="server"        ErrorMessage="Znesek vplacila je premajhen!" ControlToValidate="AmountDeposit" Operator="GreaterThanEqual"        ValidationGroup="ErrormessageValidationGroup" ValueToCompare="1" Type="Double" Display="Dynamic">        <asp:Image ID="Image13" runat="server" ImageUrl="~/Images/warning.png" ImageAlign="TextTop" /></asp:CompareValidator><asp:CompareValidator ID="CompareValidatorAmountDepositMax" runat="server"        ErrorMessage="Znesek vplacila je prevelik!" ControlToValidate="AmountDeposit" Operator="LessThanEqual"        ValidationGroup="ErrormessageValidationGroup" ValueToCompare="10000" Type="Double" Display="Dynamic">        <asp:Image ID="Image14" runat="server" ImageUrl="~/Images/warning.png" ImageAlign="TextTop" /></asp:CompareValidator>The problem is that it does not work if I write "10.5

OpenDialog box to open file with a double-mouse click

Hi, I am having a hard time trying to find an example that opens an opendialog box and allows the users to open the file with a Double-Click. Please help.   Thanks
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend