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
S

Stevo Z

@Stevo Z
About
Posts
188
Topics
64
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Web Server serving as a TCP/IP communication server as well
    S Stevo Z

    That's very true. I've checked with a couple of hosting sites and they are not really keen to do it this way. Also, because of my poor C++ skills (hey I'm working with Silverlight 4, that's a different world...) I want to keep the C++ part as simple as possible. After a lot of swearing and effort I've managed to use CURL, pthreads and JSON to send the data from the plugin to the webserver and there I'm handling it with a custom handler. This way it's also simple for anyone to deploy the plugin - that's one of the important things as well - KISS :) . I've never done database stuff in C++ and I'm scared even to google for that :laugh: . I'd like to keep all the business logics on the webserver. Thanks for your imput though, I still don't know how is it going to turn out, it's an interesting project. :thumbsup:

    zilo

    ASP.NET question csharp c++ asp-net game-dev

  • Web Server serving as a TCP/IP communication server as well
    S Stevo Z

    Hi Guys, I want to implement following architecture and want to check with you if it generally makes sense, what you think about it and whether I could do it in a better way. There is a gaming server which can provide information on the fly using a C++ plugin. I'd like to use this information, process it and display on web so people can look and see what's happening in the game without having the actual game. So I decided to open a TCP/IP connection between the gaming server and a web server (which will be sitting on a web hosting site, haven't decided which one yet). My worry is whether I'll be able to use the web server as a TCP/IP communication server, so the game plugin can connect to my web server listening for incomming connections on a background thread and receive the information. Facts:

    Gaming server running C++ game and a TCP/IP client sending data potentionally every second

    Web Server (ASP.NET + Silverlight 4) running a TCP/IP server on a background thread listening for game server(s - will be potentionally more) and waiting for data.

    I know it's a very trick question, but do you think that this architecture makes sense? Do you think I'll be able to connect to my webserver using TCP/IP from outside? Or would a different protocol by better? (sending data using http, but I'd like to avoid that as I think it would be slower and I would not be able to talk back to the gaming server if I needed). Regards, Stevo

    zilo

    ASP.NET question csharp c++ asp-net game-dev

  • Visual Studio unmanaged C++ TCP/IP client-server examples
    S Stevo Z

    Why can't everything be in C# ;P :laugh:

    zilo

    C / C++ / MFC c++ visual-studio csharp sysadmin

  • Visual Studio unmanaged C++ TCP/IP client-server examples
    S Stevo Z

    Thanks Moak for such an exhaustive answer, currently I've managed to make Practical C++ Sockets[^] work, that will be hopefully enough for the moment. :thumbsup:

    zilo

    C / C++ / MFC c++ visual-studio csharp sysadmin

  • Visual Studio unmanaged C++ TCP/IP client-server examples
    S Stevo Z

    Thanks a lot to all reponses! In the meantime, I've managed to make Practical C++ Sockets[^] work with only little tweaking and my poor knowledge of unmanaged C++ world

    zilo

    C / C++ / MFC c++ visual-studio csharp sysadmin

  • Visual Studio unmanaged C++ TCP/IP client-server examples
    S Stevo Z

    Hi Guys, I'm building a simple TCP/IP client/server application and can't find any examples that I could run in Visual Studio IDE. Everything seems to be MFC and it's not compiling under Visual Studio 2010 Express C++ for some reason. I'm not very skilled in the C++ area so please be patient with me. Something that compiles and runs out of the box please. Regards, Stevo

    zilo

    C / C++ / MFC c++ visual-studio csharp sysadmin

  • Dynamically assign values to instance
    S Stevo Z

    I ment the classes are not present withing the same solution or assembly when compiling the code. When working with linq, I'm using strong types. This is a sample of one of the classes:

    [Table(Name = "Books")]
    public partial class Book : IDALEntity
    {
    private int _BookId;
    private string _Title;
    private int _Price;
    private int _PublisherID;

        public Book()
        {   }
    
        \[Column(Storage = "\_BookId", AutoSync = AutoSync.OnInsert, DbType = "Int NOT NULL", IsPrimaryKey = true)\]
        public int BookId
        {
            get
            {
                return this.\_BookId;
            }
            set
            {
               this.\_BookId = value;                 
            }
        }
    

    ...
    }

    zilo

    C# csharp linq performance tutorial question

  • Dynamically assign values to instance
    S Stevo Z

    It doesn't have to, I'm using those classes to work with linq as well and it's working fine. Thanks for the suggestion, that looks to be the only way to go.

    zilo

    C# csharp linq performance tutorial question

  • Dynamically assign values to instance
    S Stevo Z

    Anyhow, whether is it extension methods or not, I'll have to create them dynamically using reflection and then just call those methods. I think I have a better idea now, thanks

    zilo

    C# csharp linq performance tutorial question

  • Dynamically assign values to instance
    S Stevo Z

    Do you suggest to create a method using reflection on the fly:

    void AssingAValue(AClass aInstance, object value)
    {
    aInstance.AValue = value;
    }

    and then just call this method?

    zilo

    C# csharp linq performance tutorial question

  • Dynamically assign values to instance
    S Stevo Z

    Kind of. Something that does the job but keeps the speed on same level as direct access.

    zilo

    C# csharp linq performance tutorial question

  • Dynamically assign values to instance
    S Stevo Z

    Yes. I'm loading the class from dll as

    Assembly.LoadFile(string file);

    And I'd like to keep AClass as simple as possible, without any specific code to read or write values into it. It's just a data container.

    zilo

    C# csharp linq performance tutorial question

  • Dynamically assign values to instance
    S Stevo Z

    Interesting idea, but... It's not only one, there will be many properties like this within AClass. And it needs to be done outside of constructor.

    zilo

    C# csharp linq performance tutorial question

  • Dynamically assign values to instance
    S Stevo Z

    thanks for the idea, for now something like that is my workaround solution. However I wanted to avoid writing special code into the AClass itself as well. I was thinking of something generic that could either AClass inherit from or a Wrapper class.

    zilo

    C# csharp linq performance tutorial question

  • Dynamically assign values to instance
    S Stevo Z

    Hi Guys, I'd like to dynamically assign values to a known class instance based on the Property name. An example describes perfectly what I want to do: There is a class

    public class AClass
    {
    public string _aValue;

        public string AValue
        {
            get { return \_aValue; }
            set { \_aValue = value; }
        }
    }
    

    and I want to assing value to AClass.AValue without actually explicitly writing:

    AClass aInstance = new AClass();
    aInstance.AValue = "value";

    and now comes the best part. I'd like to avoid reflection as much as possible, because performance matters. I could go and look for a property named "AValue" and do

    typeof(AClass).GetProperty("AValue").SetValue(aInstance, "value", null);

    however that's veery slow. It's got to be possible to do that some other way, Linq works like this and it's not slow. any ideas?

    zilo

    C# csharp linq performance tutorial question

  • GridView height to 100%
    S Stevo Z

    Hi guys, I have following problem: I want to display two GridViews A, B one next to the other. So I've created a simple table with one row and two columns a put griview A into the left column and the GridView B into to right column:

    <table>
    <tr>
    <td>
    A
    </td>
    <td>
    B
    </td>
    </tr>
    </table>

    I know that after items are loaded, the A will always be higher than B, so I would like to stretch B so it takes same amount of height as A. I've set the Height property on B to 100%:

    <asp:GridView ID="B" runat="server" AutoGenerateColumns="False" Height="100%">
    ...
    </asp:GridView>

    But the B keeps the minimum height it requires to render all rows and won't stretch to same size as A. Note that A and B are in cells of the same row, so B has available height to strech to. After some investigation I've discovered that by default, a GridView is a <table> encapsulated within a <div>. And its the div that prevents the table to stretch above its minimum required height. Is there a way how to tell ASP.NET to NOT render the (empty) <div> html tag around the table? Or change the behaviour of the <div> to not prevent table to be stretched to any available size?

    zilo

    ASP.NET csharp html asp-net sysadmin help

  • Is linq capable of using same querry on different type of data?
    S Stevo Z

    Hi guys, first I want to say that it's an excelent idea to have a different forum for linq and .NET 3.5 , good job codeproject :) Now to my question: First let me discribe the application I'm working on. Its purpose is to convert data from one format into another. Looks very simply, doesn't it ;) . However if we realize that it could be technicly anything to anything using different kind of source and destination (file, stream, database) and that the source and destination are specified via a single configuration file, then it becomes quite complex. The application design consists (very simplified) of 3 parts - reader, middle stage and a writer. The reader is capable of reading items from source, the writer writes items to the output and the middle stage is responsible of doing whatever processing is required. When I say processing, I mean selection and projection - agregating, sorting and ordering data. So there are few questions that need to be answered regarding the middle stage. 1) how is all the data (that is read by the reader) stored in the middle part, what will be the structure. 2) based on it's structure, how will be the data processed. Note that the User needs to be able to define the processing via another configuration file, that means using some kind language that needs to be parsed from the configuration file text. I have the answer to question 1: The data will be stored in 3 different ways - in memory, in a file or in a database. That also kind of determines the structure: 2D arrays (in other words tables for the databse, arrays for the memory and lines of data separated with some kind of sepator in file - or xml). I don't know yet whether there will be more tables in normalized form 3 or if we will use only one table that holds all the data, that's yet to decide, however it should not matter now. And what needs to be answered is question 2: How do we do processing on this 3 different kinds of data types, so it is unified. Ideally, it would be SQL queries. And I was hoping that with help of Linq, I could run some king of SQL queries on any kind of data. And accoring to my investigation, that is not entirely true. I'm able to use the Select, Where, Order etc... extensions on IEnumerable but, for that, the configuration text would need to be parsed to call those methods explicitly. I would like to avoid defining and parsing a language simillar (if not same) to SQL. Let me put a very very simplified example of how it works together: Input:

    <Pa

    LINQ csharp database question linq design

  • Vista C# developer basics
    S Stevo Z

    Thanks John, You have partly answered my needs, however I was more searching for an article saying why it is important to do it than the actual procedure. although this is helpful as well, thanks a lot !

    zilo

    C# csharp security tutorial question

  • Vista C# developer basics
    S Stevo Z

    Hi guys, Some time ago I've found a very nice (there are probobly more of them) tutorial about developing application for Windows Vista. The article was talking about Vista security model and why it is important to specify application security level using mt.exe tool. Can anybody point me to a similar article? thanks a lot!

    zilo

    C# csharp security tutorial question

  • Determine incorrect String.Format format
    S Stevo Z

    Hi All, is there way (except running the method in try - catch block) how to determine (without considering the input arguments) if a format string is correct? String.Format(string format, params object[] argumens); thanks, Stevo

    zilo

    C# tutorial 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