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
Q

Quake2Player

@Quake2Player
About
Posts
77
Topics
39
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Goal finding: I just need the name of an algorithm
    Q Quake2Player

    Hi, I need to find a goal given the following conditions -I only know my 4 surroundings (N,W,S,E): they can be empty or an obstacle -I know the goal coordinates (x,y) -I know my coordinates I know bug-2 (and bug-1) are complete algorithms (they always find the goal). But it is really bad in some maps with large obstacles. My questions are two. 1. How come there arent quick and well-known solutions to this? Ive been googling for ages and I just find theoretical papers, full of blabla and no pseudocode. 2. A* wouldnt work for this because of my first restriction, right? Thanks

    Algorithms algorithms help question

  • Prolog simple problem
    Q Quake2Player

    wtf are you talkin about anyway the answer was to use findall(X, predicate(X), List)

    Algorithms question help tutorial

  • Prolog simple problem
    Q Quake2Player

    Hello, I have some facts like: asdf(a,b). asdf(b,c). asdf(c,d). etc. I'd like to do some function givemelettersinvolved(L) that instantiates in L a list that contains the constants involved in those facts for example asdf(a,b). asdf(b,c). givemelettersinvolved(L) would give L = [a, b, c] How can I make this? I was trying with ...(L) :- asdf(A,B), member(A,L), member(B,L). But its not working

    Algorithms question help tutorial

  • Layouts in PHP and redirection
    Q Quake2Player

    Thanks for replying Though, I know that, that's why i'm asking for a better way of doing layouts.. so that I dont have the content's logic after heads, body, etc tags Ps. ob_start() and ob_flush() worked for me.. but its not a very elegant solution

    Web Development php database help question

  • Layouts in PHP and redirection
    Q Quake2Player

    Hi, I have an index.php that takes a $_GET variable, "action", like this: index.php?action=someContent And based on the value of "action" I include some php in some div in the body. The problem is that if I have some logic in those included contents, and they need to redirect the user (using header("..")), they can't because of "Warning: Cannot modify header information - headers already sent by" So.. I either need 1. A way to redirect without header 2. or a way to create a layout more efficient than that

    Web Development php database help question

  • Linq2Sql: Adding an object with childs
    Q Quake2Player

    Lets say my Linq 2 Sql model is like this: Class Movement { Products, ... } Class Product { ... } The problem is that if I create a Movement and populate all of its properties, like:

    Movement m = new Movement()
    m.SomeProperty = ...
    m.SomeProperty = ...
    m.Products.Add ( someExistingProduct )
    m.Products.Add ( someExistingProduct )
    m.Products.Add ( someExistingProduct )

    movementsRepository.Add ( m )
    movementsRepository.Save()

    I get an error "An attempt has been made to Attach or Add an entity that is not new" The only why i'm getting to achieve the add is like this:

    Movement m = new Movement()
    m.SomeProperty = ...
    m.SomeProperty = ...

    movementsRepository.Add ( m )
    movementsRepository.Save()

    someExistingProduct = productsRepository.GetById ( ... )
    someExistingProduct.Movement = m
    productsRepository.Save()

    someExistingProduct = productsRepository.GetById ( ... )
    someExistingProduct.Movement = m
    productsRepository.Save()

    etc..

    The problem with this second approach is that if there is a problem with one of the products (which are retrieved by an id specified on a form, etc.) I would need to delete the Movement and etc. I dont find it a very elegant solution. Help please, Thanks

    LINQ help csharp database linq

  • Response.Redirect problem
    Q Quake2Player

    Doesnt work either...

    ASP.NET asp-net help csharp architecture question

  • Response.Redirect problem
    Q Quake2Player

    Hi, I'm using ASP.net MVC, In a certain controller ("Users") I have a "LoginNeeded()" method, this one redirects you if you are not logged in: if (CurrentUser == null) { HttpContext.Response.Redirect("/Users/Login/", true); } The problem: If a method from the Users controller calls this method.. everything works fine. If a method from another controller calls this method.. It doesnt find the action i'm redirecting (it tries to search in "Shared/Users/Login" and "ThisOtherController/Users/Login" Any help?!

    ASP.NET asp-net help csharp architecture question

  • Request.Form in MVC
    Q Quake2Player

    MVC solves the separation of concerns.. thats what it "fixes"

    ASP.NET asp-net csharp json oop architecture

  • Request.Form in MVC
    Q Quake2Player

    But with checkboxes, for example, when you use ASP.NET (not mvc) you can manage them as if their were winforms checkboxes (ie. myCheckBox.Value is bool), And with Listboxes, you can refer to the ith item in the list (because its an array), and so on..

    ASP.NET asp-net csharp json oop architecture

  • Request.Form in MVC
    Q Quake2Player

    Hi, I was wondering if retrieving the input in MVC is always string based? Like requesting.form a "select multiple" (aka listbox).. Is any other method than retrieving the values in a comma-separated string? Like "043,015,091" Or for example a checkbox.. is it possible to retrieve a bool instead of parsing a string? Because everything must be retrieved by using Request.Form Please notice that i'm talking about ASP.NET MVC: That means i'm retrieving the values from a controller (POST) and not in the SomeButton_Click or something. In a NOT MVC way it would be all object oriented by using asp controls and etc.

    ASP.NET asp-net csharp json oop architecture

  • Protecting POST from an action
    Q Quake2Player

    Ok so I'm using sessions now instead of cookies, Can you answer my question now, which is analogue to the previous question: Should I check for the session at the beggining of the POST? Or I dont have to care about someone cloning the form with action=myformpost

    ASP.NET question security

  • Protecting POST from an action
    Q Quake2Player

    Uhm.. 1. Ok lets assume i'm not going to stop using cookies.. Should I check for the cookie in the POST? Yes or no? 2. In asp 3.0 I used to use Sessions, but in ASP.NET (MVC) I don't know how, the usage is similar to cookies? Do you have some link with Session's usage? Also, arent sessions based on cookies though? (Also, I definetly dont wanna use the filters that come with MVC.. like [Auth] and others)

    ASP.NET question security

  • Protecting POST from an action
    Q Quake2Player

    What if I'm just using cookies? For example: Action /SomeForm/ (GET) 1. I check if the user has some cookie. If he does, 2. I show the form to him. Action /SomeForm/ (POST) 1. Should I check if the user has that cookie or not? 2. Process inputs, etc.

    ASP.NET question security

  • Protecting POST from an action
    Q Quake2Player

    Hi, I have a question about security and user access: If I protected a GET action with access only for logged users or for some type of user, should I also protect the POST action? In ASP 3.0 I used to do that because one could clon the form and set the "action=myformpost.asp", Thanks

    ASP.NET question security

  • Popup form notifying other form?
    Q Quake2Player

    Hi, I have a form where there is a combobox, and next to it there is a link "Other" that opens a popup and lets the user to create more options (that dont appear in the combo) How can I notify the parent form (the one with the combo) that the popup form added succesfuly the new option? With winforms is really easy using events.. but in web its confusing Help please! Thx

    ASP.NET question csharp winforms help

  • A form for creating a one to many record in a db
    Q Quake2Player

    That also applies for ASP.NET MVC? Which isnt that event oriented as pure ASP.net? Anyway, is it ok the way im describing? To retrieve "n" and based on that retrieve the inputs.. or is there something like a container where i can do like "for each control in container" ?

    ASP.NET question database windows-admin tutorial

  • A form for creating a one to many record in a db
    Q Quake2Player

    If I'm having a form with n textboxs (n defined by te user by pressing a "new registry" button for example), and the textboxs are named product1, product2, ...productn.. How should I retrieve the data in the POST? Should I send n thrue the form too? What is the typical way of doing this kind of forms??.. that there is a main record in a db (for example some headers) and n records within that record? is there a good practice way? The db would look like table1: mainid, headers table2: id, mainid, etc. (ie. one to many relationship)

    ASP.NET question database windows-admin tutorial

  • Users and Cookies in ASP.NET MVC
    Q Quake2Player

    Hi, The situation is this: I would like to have an static method in some class of the Models library like this static User GetCurrentUser() Which takes a cookie in the user ("currentUserId") and returns the User retrieved from the db.. The problem: I cant have access to the cookies (to the "Request" class) from the Model lib. So what other solution can I use? Should I make that method in the Controllers library? IF i dont add a view to a method of a controller class then that method wont be an action? ALSO: The method needs to be used from other controllers.. so.. is that possible?

    ASP.NET asp-net csharp database architecture help

  • Database design question
    Q Quake2Player

    Oh thats a nice solution.. Though the movements are used in other parts of the software.. so this "dummy" movements would have to have different properties.. like "from = to"

    Database question database design
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups