CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: andreasblixt

Page 1 of 14 1 2 3 4

Search: Search took 0.13 seconds.

  1. Replies
    6
    Views
    1,134

    Re: Replace. to _ in a string

    Use stringVariable.Replace(".", "_") since you don't seem to know what a regular expression is. stringVariable.Replace(".", "_") will return a new string with "." replaced with "_" in stringVariable,...
  2. Replies
    4
    Views
    2,430

    Re: smooth resize image

    As an answer to your question, I can only quote myself:


    You cannot affect the way the browser renders an image (although it's possible that loading an image through a filter in Internet Explorer...
  3. Replies
    4
    Views
    2,430

    Re: smooth resize image

    If by "messed up" you mean it looks pixelated (even when reducing the size), that depends entirely on how the browser decides to render the image. Certain browsers such as Safari resize the image...
  4. Re: WHERE clause with multiple values from one field [Access]

    For your first problem you could use this:

    SELECT EmployeeID
    FROM r_rights
    WHERE AreaID = 1 OR AreaID = 3
    GROUP BY EmployeeID
    HAVING COUNT(EmployeeID) = 2;

    It'll get the ID's of all...
  5. Replies
    2
    Views
    659

    Re: I'd like to know

    A char will always take up the specified length, while a varchar will only take up the length of its value. I.e.:

    A char(10) value set to 'Hello' will become
    'Hello ' (five spaces in the...
  6. Re: Query the amount of records that repeated in a table

    I'm spoiled with SQL Server 2005 and would do this:

    WITH Temp AS (
    SELECT
    CASE WHEN COUNT(SN) > 1 THEN 1 ELSE 0 END AS Repeating
    FROM YourTable
    GROUP BY SN
    ) SELECT SUM(Repeating) FROM Temp;...
  7. Replies
    2
    Views
    765

    Re: Problem with ON clause in MySQL 5

    That is strange... If offer and currency are the only tables with a column named currency_id, you could try changing

    ON t4.currency_id = t1.currency_id
    to

    USING (currency_id)
    and see if that...
  8. Replies
    3
    Views
    1,582

    Re: use combo box change color.

    The multiple ID shouldn't be ignored if you're using it anywhere (such as in CSS or JavaScript) because it can cause unexpected behavior on your page.

    Anyways, to get the currently selected option...
  9. Re: About to GO insane! ajax + php == :*( Please gurus help me!

    XMLHttpRequest creates an entirely new request, separate from your page. This means it doesn't matter what form(s) you have on your page (which wouldn't make sense anyways - how would it know what...
  10. Replies
    3
    Views
    1,188

    Re: Error Message

    Try this:

    CREATE PROCEDURE uspTryExecute
    @QueryString nvarchar(max),
    @Error nvarchar(2048) = NULL OUTPUT
    AS
    BEGIN TRY
    EXECUTE(@QueryString);
    END TRY
    BEGIN CATCH
  11. Replies
    3
    Views
    1,188

    Re: Error Message

    SQL Server 2000 or 2005?
  12. Thread: help

    by andreasblixt
    Replies
    6
    Views
    1,372

    Re: help

    Oh, that's right, I didn't see you wanted to include those columns as well, sorry.
  13. Replies
    8
    Views
    1,196

    Re: AI for Game Programming

    That's not really a code-related question, in my opinion. It depends mostly on how your game is presented graphically.

    In general you split hair from body so that any hair style can be put on any...
  14. Replies
    8
    Views
    1,196

    Re: AI for Game Programming

    For an MMORPG, A.I. is quite simple when compared to other game genres (especially FPS and RTS.) I'd still go for an FSM, yes, but since an MMORPG server has to handle a great deal of actors at once,...
  15. Replies
    3
    Views
    1,233

    Re: [JS] Write to text file

    JavaScript is contained to the web page it is currently on due to security reasons. Even access to the clipboard is limited in JavaScript. You can save your variables in cookies however, if what you...
  16. Thread: help

    by andreasblixt
    Replies
    6
    Views
    1,372

    Re: help

    May I ask what adjustments you made? I tried your queries above exactly as they stand, with the exception of not putting them in a stored procedure but rather running them as separate batches (first...
  17. Replies
    1
    Views
    743

    Re: normalization

    You've got machine, customer, category and hire occasion. The machine information isn't actually included (it is only referenced), so I haven't listed it as a table below:


    Customers
    ...
  18. Replies
    8
    Views
    1,196

    Re: AI for Game Programming

    Generally FSM are predictable and not very suitable for adaptiveness. The reason I suggested it is because they are simple enough to understand and implement. If you're going for more complex,...
  19. Thread: help

    by andreasblixt
    Replies
    6
    Views
    1,372

    Re: help

    Well, that's pretty vague information and poor names for tables/columns. But assuming that "T2" holds a list of items that should be shown in "T3" (excluding items not in "T2"), this query should do...
  20. Replies
    1
    Views
    802

    Re: How to query TIMESTAMP columns

    The timestamp column is generally returned as the amount of seconds since the Unix epoch. (Edit: Actually, if you only return the column without any functions or operators, it should display as a...
  21. Replies
    8
    Views
    1,196

    Re: AI for Game Programming

    I'd go for a finite state machine (FSM) because they're easy to work with. Basically you give your actor an initial state and let it switch between states depending on what it senses. Say you've got...
  22. Replies
    9
    Views
    2,654

    Re: HttpHandler - dynamic images

    The problem with using .capcha as an extension is that IIS wouldn't know where to send the request (unless ASP.NET was set up to catch all non-handled requests.) It would merely return a 404 error...
  23. Replies
    9
    Views
    2,654

    Re: HttpHandler - dynamic images

    My suggestion is a pretty nasty way of doing it if it's a distributable library you are making because the current page will be executed once for each image requested (until the point your control is...
  24. Replies
    9
    Views
    2,654

    Re: HttpHandler - dynamic images

    Yes, of course it will. Now I'm not sure what you want to accomplish. You know that you can't branch a web request right? It can only ever return one file, which in your case will be either the...
  25. Replies
    9
    Views
    2,654

    Re: HttpHandler - dynamic images

    Ah, I see.

    Try something like this in the RenderContents method:

    HttpResponse response = HttpContext.Current.Response;
    response.Clear();
    response.ContentType = "image/jpeg";
    // Do something...
Results 1 to 25 of 331
Page 1 of 14 1 2 3 4





Click Here to Expand Forum to Full Width

Featured