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
V

venomation

@venomation
About
Posts
223
Topics
63
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Speech recognition and drawing
    V venomation

    I have a small article on the tool I used to move a tank via voice commands. http://boxhacker.com/blog/2011/11/22/speech-recognition-for-net/[^] Part 2 explains how I converted the speech into commands (parsing) and such: http://boxhacker.com/blog/2011/11/25/voice-parsing/[^] Its ok if you have time to train the speech recognition software, but out of the box stuff would require something more powerful. - Could help :-D

    C# csharp winforms graphics

  • Working in a team question
    V venomation

    Thanks again for the helpful feedback! :-D From all of the replies we decided that it would be best to: x - Not assign global roles x - Assign "local" roles on a per scenario/stint basis We might still have a lead programmer role somewhere in there, but over all we will tackle subdivision depending on the problem. - Thanks again :laugh:

    The Lounge question sharepoint game-dev collaboration tutorial

  • Working in a team question
    V venomation

    Thanks for a nice logical separation of responsibilities :-D

    The Lounge question sharepoint game-dev collaboration tutorial

  • Working in a team question
    V venomation

    So far it seems that a key pattern is, someone overlook the flow of information through the system and the others can add to it over time somewhat multi-responsibly. Big Grin | :-D Similar answer to what me and the team thought, but we are noobs - what do we know? xD

    The Lounge question sharepoint game-dev collaboration tutorial

  • Working in a team question
    V venomation

    Hello I am about to work in a team of four (all programmers) on a small game at university. It should take around three to four months of development time and I have hit a wall already! What roles could be subdivided logically in such a small team? Looking on-line only really shows how larger teams are broken down, for example one person working on the GUI is probably over kill for what we need, yet I still don't know what roles we could assign... Any suggestions? :laugh: Also we have a similar skill set, so speciality based on skills wont really come into play.

    The Lounge question sharepoint game-dev collaboration tutorial

  • how to read only integers from a file with c
    V venomation

    This sounds like a course assignment... :suss: Think about it logically: x - Find a way to read the file line by line x - What could you do when you obtain a line? x - Is there a way to split the line apart, maybe separate name and mark? x - When you find a way to separate them, it is simply the case of casting the string to an int and visa versa. If you get really stuck here is a nice link of tools you could use to help with the string: http://www.cplusplus.com/reference/string/string/[^]

    C / C++ / MFC help tutorial

  • I am not having a good day
    V venomation

    Good point!

    The Lounge visual-studio help question

  • I am not having a good day
    V venomation

    Should had used an SVN! :laugh:

    The Lounge visual-studio help question

  • Suggestion to do a multilanguage project
    V venomation

    Some way or another your are going to end up storing a collections of string elements (to be mapped onto your GUI) that relate to many language versions. EnterButton => English:"Enter",Spanish:... Localization I think is the only way you can achieve such effect... Maybe look at http://ondotnet.com/pub/a/dotnet/2002/09/30/manager.html[^], a four part series that could help?

    C# question database help

  • Problem with Ninject
    V venomation

    I have the following code:

            IKernel kernal = new StandardKernel();
    
            kernal.Bind().To();
            kernal.Bind().To();
            kernal.Bind().To();
            
    
            package = kernal.Get();
            package.Get().Force = new Vector2(10,10);
            package.Get().Position = new Vector2(2,2);
    

    LocationCom:

    \[Family("Location")\]
    class LocationCom : BaseComponent, ILocationComponent
    {
        public Vector2 Position { get; set; }
    }
    

    MovementCom:

    \[Family("Movement")\]
    class MovementCom : BaseComponent, IRealtimeComponent
    {
        private readonly ILocationComponent locationCom;
        public Vector2 Force { get; set; }
    
        \[Inject\]
        public MovementCom(ILocationComponent locationCom)
        {
            this.locationCom = locationCom;
        }
    
        public void Update(GameTime gameTime)
        {
            locationCom.Position += Force \* (float)gameTime.ElapsedGameTime.TotalSeconds;
        }
    }
    

    ComponentPackage:

        public ComponentPackage(IEnumerable components)
        {
            foreach (var component in components)
            {
                Add(component);
            }
        }
    

    The idea is that the movement component will get a reference to location component when injected into the package. The problem is that MovementCom receives a new instance of LocationCom, thus when it applies force it is applying it to an unrelated position (not inside the package). Does Ninject resolve this issue or would I have to write some "adaptor" code for the dependencies to work, I am fairly new to using an IOC container so it is likely to be an easy question ;P

    C# help docker question announcement

  • Alternative to using a string as a key?
    V venomation

    The idea is that other components can get another component based on its key. At the moment there is no configuration file aspects, but I may consider it... The problem is that one type of component can be added multiple times, some of them can be configured to act more generically, in theory I could install two OffScreenSensor's but with different keys.

    C# tutorial question

  • Alternative to using a string as a key?
    V venomation

    Ok thanks, sounds like I am on the right track :)

    C# tutorial question

  • Alternative to using a string as a key?
    V venomation

    I sometimes come across situations where I could use a string type to represent a unique key in something (sorry for being vague)... An example:

    ConnectSensor(new OffScreenSensor(),"screen");

    Where the "screen" part is used to identify the OffScreenSensor object in a dictionary somewhere. I could use an Enum as a replacement but was wondering if any one here has a better way of dealing with stuff like this? I don't like the idea of having to look back to see the names of keys I have named before :laugh:

    C# tutorial question

  • How to Check If Your Account is Hacked..!
    V venomation

    This sort of post normally raises an eye brow or two, but the pwnlist site could actually be useful! Yet I still hesitate to put my email in, anything related to warez or its affiliates I stay well away from...

    The Lounge tutorial

  • JTable cell not going away! SOLVED
    V venomation

    SOLUTION: This works for me but I still do not know why it was behaving like that...

    if (table.getCellEditor() != null) {
    table.getCellEditor().stopCellEditing();
    }

    Was called when deleting the row, forcing the cell that is being edited to stop editing. PROBLEM: I have the following CellEditor that is used to validate cells on a column:

    public class CellEditor extends AbstractCellEditor implements TableCellEditor {

    protected TextField source = new TextField();
    private ArrayList validators = new ArrayList();
    
    public CellEditor WithValidation(IValidator validator) {
        validators.add(validator);
        return this;
    }
    
    public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
    
        source.setText(String.valueOf(value));
        return source;
    }
    
    public Object getCellEditorValue() {
        return source.getText();
    }
    
    @Override
    public boolean stopCellEditing() {
        String s = ((String) this.getCellEditorValue());
        if (s == null) {
            this.fireEditingCanceled();
            return false;
        }
    
        for (IValidator v : this.validators) {
            if (!v.isValid(s)) {
                JOptionPane.showMessageDialog(null, v.getErrorMessage());
                this.fireEditingCanceled();
                return false;
            }
        }
        return super.stopCellEditing();
    }
    

    }

    And I attach the code to my table like this:

    this.jTable1.getColumnModel()
    .getColumn(0)
    .setCellEditor(new loyaltyapp.validation.CellEditor()
    .WithValidation(new TextLengthValidator(1, 12)));

    When the second snippet of code is commented everything works as intended (but of course not including any validation)... The problem is that when I do attach the CellEditor to my table when I remove a row WHILE a cell is being edited the rest of the row gets deleted, leaving behind a rogue cell! Image of selecting a cell: http://www.mediafire.com/?8n999a4djacdj84[^] Image of deleting the row while selecting the validation cell: http://www.mediafire.com/?mozjjzc53ju12b2[<

    Java com json help question learning

  • Strange windows forms control bug?
    V venomation

    I have the following code inside a Derived "Panel" control in C# 4:

        public void ForceMoveScrollBar(int distX, int distY)
        {
    
            if (Math.Abs(distX) > HorizontalScroll.Maximum - HorizontalScroll.Value)
            {
                HorizontalScroll.Value = HorizontalScroll.Maximum;
            }
            else
            {
                HorizontalScroll.Value += distX;
            }
        }
    

    It is meant to scroll the horizontal scroll inside the panel by a certain amont when a key is clicked on the keyboard. However I have to tap the key twice for it to work, the first time make my panel flicker and the second time works. The only fix I have is:

    public void ForceMoveScrollBar(int distX, int distY)
    {

            if(Math.Abs(distX) >HorizontalScroll.Maximum - HorizontalScroll.Value) 
            {
                HorizontalScroll.Value = HorizontalScroll.Maximum;
            }
            else
            {
                //The value does not set on the first assigment!
                HorizontalScroll.Value += distX;
                //so I add another one!?
                HorizontalScroll.Value += distX;
            }
        }
    

    Why does it do this strange behaviour?

    C# help question csharp winforms

  • Some advise on the following code
    V venomation

    I read through it and I can see how that would be useful however "perform a particular action that needs performed once only", I intended those methods to be used more than once and to increase the usability of the code. So when people see:

    Controller.BuildSingleRow(_sheet);

    They realise that it constructs the object set to a single row sprite sheet... It seems ok to me but im sure there is someone out there who would slap me in the face... :laugh:

    C# regex question workspace

  • Some advise on the following code
    V venomation

    Hello I have the "following" code:

    controller = Controller.BuildSingleRow(_sheet);

    _animator = Animator
    .WithStartupInfo(_controller, PlayMode.Normal, 1f);

    I have used a static method in the Controller class to setup some method of build pattern, I was going to use a constructor but a static instantiation won it for me. Is this bad to do this? Thanks :-D

    C# regex question workspace

  • Windows Form control property issue
    V venomation

    Thanks :-D

    C# csharp visual-studio help

  • Windows Form control property issue
    V venomation

    I need to have one of my properties in a custom control to open the "open file dialogue" window when selected. I have googled around but it keeps throwing me .net controls! At present I have a property and when "set" opens the dialogue, but this forces me to enter some text and open it only when deselected... Just to clarify: 1: Click on the property name in visual studio designer property area 2: it opens the open file dialogue Thanks :)

    C# csharp visual-studio help
  • Login

  • Don't have an account? Register

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