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
venomation
Posts
-
Speech recognition and drawing -
Working in a team questionThanks 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:
-
Working in a team questionThanks for a nice logical separation of responsibilities :-D
-
Working in a team questionSo 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
-
Working in a team questionHello 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.
-
how to read only integers from a file with cThis 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/[^]
-
I am not having a good dayGood point!
-
I am not having a good dayShould had used an SVN! :laugh:
-
Suggestion to do a multilanguage projectSome 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?
-
Problem with NinjectI 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
-
Alternative to using a string as a key?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.
-
Alternative to using a string as a key?Ok thanks, sounds like I am on the right track :)
-
Alternative to using a string as a key?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:
-
How to Check If Your Account is Hacked..!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...
-
JTable cell not going away! SOLVEDSOLUTION: 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[<
-
Strange windows forms control bug?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?
-
Some advise on the following codeI 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:
-
Some advise on the following codeHello 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
-
Windows Form control property issueThanks :-D
-
Windows Form control property issueI 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 :)