Search Results

Search found 9771 results on 391 pages for 'equivalence classes'.

Page 147/391 | < Previous Page | 143 144 145 146 147 148 149 150 151 152 153 154  | Next Page >

  • Detecting controls of a winform

    - by Ayush Saxena
    I have a circular area cursor which is a circular winform(translucent) hooked to a cursor. On click, I want to get hold of the controls in the region of the parent winform just below the area of the cursor/form. These controls have to be arranged in circular layout on a different form. I am working on C#.NET. Please tell how to access the controls of a winform and change their positions in context with my application described above. Like what classes, procedure , resources i need. I am a newbie but desperate to complete this task.thanks in advance.

    Read the article

  • Difference between spring setter and interface injection?

    - by Satish Pandey
    I know how constructor and setter injection works in spring. Normally I use interfaces instead of classes to inject beans using setter and I consider it as interface injection, but in case of constructor we also use interfaces (I am confused). In following example I use JobProcessor interface instead of JobProcessorImpl class. public class JobScheduler { // JobProcessor interface private JobProcessor jobProcessor; // Dependecy injection public void setJobProcessor(JobProcessor jobProcessor){ this.jobProcessor = jobProcessor; } } I tried to find a solution by googling but there are different opinions by writers. Even some people says that spring doesn't support interface injection in their blogs/statements. Can someone help me by example?

    Read the article

  • Should I get my masters in Game Design and Development or Computer Science?

    - by Christopher Stephenson
    I am a recent grad with a B.S. in IT while I didn't minor in Game Desgin and development, I took few classes in it. During my job search I have seen that most gaming companies seems to want someone that majored in C.S, mathematics, or physics. During my undergrad I never had to take physics nor did I learn much about data structures and algorithms. These seem to be really important when searching for a job in game development. So I am thinking about going back to school to get my masters in either CS, or GDD. The problem though is which one? I am really not looking to create my own games, I just want to work on games.

    Read the article

  • Open Source Errors on Apple Cruch

    - by BluFire
    I've been looking around and I finally got the full source code called Apple-Crunch from google code. But when I put it into my project, the source code included so many errors in the class files such as: cannot be resolved into a type the constructor is undefined the method method() is undefined for the type Sprite class.java I downloaded the source directly from the command-line and noticed errors popping up on my project. Since i couldn't figure out how to import the actual folder into my workspace(it wouldn't show up on existing projects) I decided to copy and overwrite the folders into the project. The Errors were still there so I looked at the class files and noticed that the classes with errors extended from 'RokonActivity'. I then proceeded to add to the libs folder the rokon library in hopes to fix the errors. Sadly it didn't work and now I don't what to do to fix the errors. How do i fix the errors without having to manually change the code? The source code should be fully functional so why is there errors?

    Read the article

  • How forgiving do you need to be on new employees?

    - by Arcturus
    Recently we have a new developer in our team. We are getting him up to speed and he is picking it all up quite fast, but a new developer means new (foreign) coding styles and ways to solve things. It feels kinda petty to start whining about coding styles at the first three classes he codes, but how forgiving are you guys when dealing with new developers? Do you let them muddle on, and point it out later? Or do you wield the scepter of intolerance immediately? When do you draw the line, or if not, why not? P.S. New guy, if you read this: you are doing great, keep up the good work ;) Edit: I've accepted the most up-voted answer, as most answers share the same message: Be nice, but tell them asap! Thanks all for the nice answers! Really appreciated it!

    Read the article

  • Naming: objectAction or actionObject?

    - by DocSalvage
    The question, Stored procedure Naming conventions?, and Joel's excellent Making Wrong Code Look Wrong article come closest to addressing my question, but I'm looking for a more general set of criteria to use in deciding how to name modules containing code (classes, objects, methods, functions, widgets, or whatever). English (my only human language) is structured as action-object (i.e closeFile, openFile, saveFile) and since almost all computer languages are based on English, this is the most common convention. However, in trying to keep related code close together and still be able to find things, I've found object-action (i.e. fileClose, fileOpen, fileSave) to be very attractive. Quite a number of non-English human languages follow this structure as well. I doubt that one form is universally superior, but when should each be used in the pursuit of helping to make sure bad code looks bad?

    Read the article

  • Is is common to use the command pattern for property get/sets?

    - by k rey
    Suppose I have a controller class with a bunch of properties. Each time a property is changed, I would like to update the model. Now also suppose that I use the command pattern to perform model updates. Is it common to use command classes within property get and sets of the controller class or is there a better way? Here is an example of what I am currently using: class MyController { private int _myInt; public int MyInt { get { return _myInt; } set { MyCommand cmd = new MyCommand(); cmd.Argument = _myInt; cmd.Execute(); // Command object updates the model } } }

    Read the article

  • Converting ANTLR AST to Java bytecode using ASM

    - by Nick
    I am currently trying to write my own compiler, targeting the JVM. I have completed the parsing step using Java classes generated by ANTLR, and have an AST of the source code to work from (An ANTLR "CommonTree", specifically). I am using ASM to simplify the generating of the bytecode. Could anyone give a broad overview of how to convert this AST to bytecode? My current strategy is to explore down the tree, generating different code depending on the current node (using "Tree.getType()"). The problem is that I can only recognise tokens from my lexer this way, rather than more complex patterns from the parser. Is there something I am missing, or am I simply approaching this wrong? Thanks in advance :)

    Read the article

  • creating a pre-menu level select screen

    - by Ephiras
    Hi I am working on creating a tower Defence java applet game and have come to a road block about implementing a title screen that i can select the level and difficulty of the rest of the game. my title screen class is called Menu. from this menu class i need to pass in many different variables into my Main class. i have used different classes before and know how to run them and such. but if both classes extend applet and each has its individual graphics method how can i run things from Main even though it was created in Menu. what i essentially want to do is run the Menu class withits action listeners and graphics until a Difficulty button has been selected, run the main class (which 100% works without having to have the Menu class) and pretty much terminate Menu so that i cannot go back to it, do not see its buttons or graphics menus. can i run one applet annd when i choose a button close that one and launch the other one? IF you would like to download the full project you can find it here, i had to comment out all the code that wasn't working my Menu class import java.awt.*; import java.awt.event.*; import java.applet.*; public class Menu extends Applet implements ActionListener{ Button bEasy,bMed,bHard; Main m; public void init(){ bEasy= new Button("Easy"); bEasy.setBounds(140,200,100,50); add(bEasy); bMed = new Button("Medium");bMed.setBounds(280,200,100,50); add(bMed); bHard= new Button("Hard");bHard.setBounds(420,200,100,50); add(bHard); setLayout(null); } public void actionPerformed(ActionEvent e){ Main m = new Main(20,10,3000,mapMed);//break; switch (e.getSource()){ case bEasy: Main m = new Main(6000,20,"levels/levelEasy.png");break;//enimies tower money world case bMed: Main m = new Main(4000,15,"levels/levelMed.png");break; case bHard: Main m = new Main(2000,10,"levels/levelEasy.png");break; default: break; } } public void paint(){ //m.draw(g) } } and here is my main class initialising code. import java.awt.*; import java.awt.event.*; import java.applet.*; import java.io.IOException; public class Main extends Applet implements Runnable, MouseListener, MouseMotionListener, ActionListener{ Button startButton, UpgRange, UpgDamage; //set up the buttons Color roadCol,startCol,finCol,selGrass,selRoad; //set up the colors Enemy e[][]; Tower t[]; Image towerpic,backpic,roadpic,levelPic; private Image i; private Graphics doubleG; //here is the world 0=grass 1=road 2=start 3=end int world[][],eStartX,eStartY; boolean drawMouse,gameEnd; static boolean start=false; static int gridLength=15; static int round=0; int Mx,My,timer=1500; static int sqrSize=31; int towers=0,towerSelected=-10; static int castleHealth=2000; String levelPath; //choose the level Easy Med or Hard int maxEnemy[] = {5,7,12,20,30,15,50,30,40,60};//number of enimies per round int maxTowers=15;//maximum number of towers allowed static int money =2000,damPrice=600,ranPrice=350,towerPrice=700; //money = the intial ammount of money you start of with //damPrice is the price to increase the damage of a tower //ranPrice is the price to increase the range of a tower public void main(int cH,int mT,int mo,int dP,int rP,int tP,String path,int[] mE)//constructor 1 castleHealth=cH; maxTowers=mT; money=mo; damPrice=dP; ranPrice=rP; towerPrice=tP; String levelPath=path; maxEnemy = mE; buildLevel(); } public void main(int cH,int mT,String path)//basic constructor castleHealth=cH; maxTowers=mT; String levelPath=path; maxEnemy = mE; buildLevel(); } public void init(){ setSize(sqrSize*15+200,sqrSize*15);//set the size of the screen roadCol = new Color(255,216,0);//set the colors for the different objects startCol = new Color(0,38,255); finCol = new Color(255,0,0); selRoad = new Color(242,204,155);//selColor is the color of something when your mouse hovers over it selGrass = new Color(0,190,0); roadpic = getImage(getDocumentBase(),"images/road.jpg"); towerpic = getImage(getDocumentBase(),"images/tower.png"); backpic = getImage(getDocumentBase(),"images/grass.jpg"); levelPic = getImage(getDocumentBase(),"images/level.jpg"); e= new Enemy[maxEnemy.length][];//activates all of the enimies for (int r=0;r<e.length;r++) e[r] = new Enemy[maxEnemy[r]]; t= new Tower[maxTowers]; for (int i=0;i<t.length;i++) t[i]= new Tower();//activates all the towers for (int i=0;i<e.length; i++)//sets all of the enimies starting co ordinates for (int j=0;j<e[i].length;j++) e[i][j] = new Enemy(eStartX,eStartY,world); initButtons();//initialise all the buttons addMouseMotionListener(this); addMouseListener(this); }

    Read the article

  • Phoney Windows Phone 7 Project Now Available!

    - by help.net
    UPDATE: Phoney now has a NuGet package. Search on NuGet to add Phoney to your project! I started this project when I found I had a number of small classes that I'd built for my Windows Phone 7 application so I thought it was time to share. here is the information on the new library. It is currently in a very early Alpha stage, but I expect to have it at a release version by MIX 11 (Mid-April). Let me know what you think! By Shawn Wildermuth Read more......(read more)

    Read the article

  • What threading pratice is good 90% of the time?

    - by acidzombie24
    Since my SO thread was closed i guess i can ask it here. What practice or practices are good 90% of the time when working with threading with multiple cores? Personally all i have done was share immutable classes and pass (copy) data to a queue to the destine thread. Note: This is for research and when i say 90% of the time i dont mean it is allowed to fail 10% of the time (thats ridiculous!) i mean 90% it is a good solution while the other 10% it is not so desirable due to implementation or efficiently reasons (or plainly another technique fits the problem domain a lot better).

    Read the article

  • Year 2012 So Far...

    - by rajeshr
    It's hard to seek excuses for not showing up in here for regular updates. I'm not venturing into it hence. Year 2012 has been very engaging, both professionally and personally, and I wish to present before you some wonderful people whom I met in the OU classrooms while delivering training programs on various Oracle technologies. While I went through a number of Oracle products in the last few months, two of 'em were more regular than others: Solaris 11 and MySQL. Not to forget the First Global Teach Live Virtual Class on Java ME. Oracle Solaris 11 Training in Bangalore Oracle Solaris 11 Training in Delhi Oracle Solaris 11 Training in Hyderabad Oracle VM for SPARC Training at OU Hong Kong Oracle VM for SPARC Training at Bangalore Oracle Solaris 11 Training in Bangalore Oracle Solaris 10 Training in Bangalore Oracle Solaris 11 Training in Delhi MySQL training Programs at Kochi, Kerala. Attending Ofir Leitner's Pilot teach on Java ME Oracle Solaris 11 Training in Bangalore Sad, I don't have photographs of some smart people whom I came across in my live virtual classes on various Oracle technologies

    Read the article

  • Why should most logic be in the monitor objects and not in the thread objects when writing concurrent software in Java?

    - by refuser
    When I took the Realtime and Concurrent programming course our lecturer told us that when writing concurrent programs in Java and using monitors, most of the logic should be in the monitor and as little as possible in the threads that access it. I never really understood why and I really would like to. Let me clarify. In this particular case we had several classes. Lift extends Thread Person extends Thread LiftView Monitor, all methods synchronized. This is nothing we came up with, our task was to implement a lift simulation with persons waiting on different floors, and theses were the class skeletons that were given. Then our lecturer said to implement most of the logic in the monitor (he was talking about class Monitor as THE monitor) and as little as possible in the threads. Why would he make a statement like that?

    Read the article

  • Dependency Injection: Only for single-instance objects?

    - by HappyDeveloper
    What if I want to also decouple my application, from classes like Product or User? (which usually have more than one instance) Take a look at this example: class Controller { public function someAction() { $product_1 = new Product(); $product_2 = new Product(); // do something with the products } } Is it right to say that Controller now depends on Product? I was thinking that we could decouple them too (as we would with single-instance objects like Database) In this example, however ugly, they are decoupled: class Controller { public function someAction(ProductInterface $new_product) { $product_1 = clone $new_product; $product_2 = clone $new_product; // do something with the products } } Has anyone done something like this before? Is it excessive?

    Read the article

  • Google ajoute la météo à l'API de Google Maps et l'imagerie de la couche nuageuse

    Google ajoute la météo à l'API de Google Maps Et l'imagerie de la couche nuageuse La météo était disponible sur Google Maps depuis l'année dernière pour les internautes. Elle l'est à présent pour les développeurs. Google vient en effet d'ajouter deux classes (« WeatherLayer » et « CloudLayer ») à la librairie « weather » de l'API de son service de cartographie. La première classe ajoute le temps et les conditions climatiques aux cartes (et des prévisions pour un lieu donné). Ces informations peuvent être modifiées en fonction des besoins (degrés Celsius ou Fahrenheit, vitesse du vent en kilomètres ou en miles). [IMG]http://ftp-developpez.com/gordon-fowler/Goo...

    Read the article

  • Question about Web Programming certificate program

    - by user134226
    I am currently attending St. John's University with a major of Computer Science. I am entering my senior year next year and stumbled upon this certificate program for web development from Hunter College: http://www.hunter.cuny.edu/ce/certificates/computer/web-programming So the question is, would it be beneficial for me to complete this program or to just attend a few elective courses in the summer at a school such as NYU? Would this certificate be good for my resume? The only language I have learned so far is Java and classes I have taken in the field so far are: Programming Fundamentals 1 and 2, Data Security and Cryptography, Networking: Data Communications and Introduction to Data Structures Hope some of you can help me out, thanks

    Read the article

  • Less is More Redux

    In my short happy life as a developer, Ive run into all kinds of development efforts that include frameworks, libraries, web sites, and much more.The one thing that stands out as an irritant to me is complexity. Specifically, unnecessary complexity. Ive seen developers author entire library assemblies that provide wrapper utility methods consisting of calls to .NET BCL methods that take one line of code methods that could have been called inline without even the need for the helper classes.Ive seen...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Independent projects as a student to show off abilities

    - by tufcat
    I'm an inexperienced student (having learned up to data structures and algorithms through various online resources) of computer science, and I'm hoping to get a job as a developer some time after I've gotten a few independent projects done. My question is, how should I choose which projects to work on? I've been looking around stackoverflow-- people usually say to pick whatever you're interested in, but I don't have enough experience to even know what specifically I'm interested in, and possibly more importantly, I don't know what some common beginner project types are. Essentially, I'm at the gap between course work (and the projects entailed in those classes) and real programming, and I don't quite know how to start. If any of you have any ideas, I'd really appreciate it.

    Read the article

  • Logic in Entity Components Systems

    - by aaron
    I'm making a game that uses an Entity/Component architecture basically a port of Artemis's framework to c++,the problem arises when I try to make a PlayerControllerComponent, my original idea was this. class PlayerControllerComponent: Component { public: virtual void update() = 0; }; class FpsPlayerControllerComponent: PlayerControllerComponent { public: void update() { //handle input } }; and have a system that updates PlayerControllerComponents, but I found out that the artemis framework does not look at sub-classes the way I thought it would. So all in all my question here is should I make the framework aware of subclasses or should I add a new Component like object that is used for logic.

    Read the article

  • How to estimate freight / shipping costs ??

    - by Vani
    Hi, I am working on a PHP web application and want to know the best way to estimate freight costs in USA. The site deals with construction materials that uses LTL or Truck loads. I found a few sites like www.freightCenter.com that provide quotes using webservice. Two drawbacks, its paid service and the other, my site response time is slow if I use the webservice. Is there a open source tool/logic avaliable for estimating shipping / freight costs?? Or a way to determine the rate per mile per pound for different freight classes? Thank you, Vani

    Read the article

  • When should one use the Abstract, Implements, or extends keywords?

    - by kdavis8
    I'm just now moving from a beginner to intermediate level android programmer in the java language. i can successfully write a game framework of classes that work together to accomplish a task beyond basic things, like hello world. but i'm having issues with some pretty basic OOP concepts; When should i derive from an abstract class? When is it more efficient to use an Interface instead of simply sub classing a parent? Basically, between extends, implements, and the abstract keywords, which keywords should be used instead of the others? i'm not looking for a basic definition, as i know them. i need to no when and why i should apply them to my code? what advantages does one have over the other? which is best for game development?

    Read the article

  • Structure of a correctly implemented JTable with TableModel and Listeners?

    - by bamboocha
    I am pretty new to Java and its JTables and this is where I am struggling at the moment. I need to create a GUI which shows me results of a sql query like SELECT * FROM tblPeople WHERE name='Doe'. My idea was to create a a JFrame which displays a JTable with all found records. Besides this, I need to also implement some code to handle when a user is double clicking a record or selecting it by using his arrow keys (additional feature: pressing 12(e.g.) should select the 12th record). What is the best way to structure my program (what classes do I need and especially where do I store my logic)? I came up with structuring it the following way: Main.java ("view") SQLConnection.java PeopleTableModel.java (only stores and returns data given by the passed ResultSet, "model" inherits from DefaultTableModel) PeopleTable.java (stores basically all my logic including KeyListener and MouseListener, "controller", inherits from JTable) Are there better ways to achieve my goals? If so, what are they?

    Read the article

  • What is the politically correct way of refactoring other's code?

    - by dukeofgaming
    I'm currently working in a geographically distributed team in a big company. Everybody is just focused on today's tasks and getting things done, however this means sometimes things have to be done the quick way, and that causes problems... you know, same old, same old. I'm bumping into code with several smells such as: big functions pointless utility functions/methods (essentially just to save writing a word), overcomplicated algorithms, extremely big files that should be broken down into different files/classes (1,500+ lines), etc. What would be the best way of improving code without making other developers feel bad/wrong about any proposed improvements?

    Read the article

  • First languages with generic programming support

    - by oluies
    Which was the first language with generic programming support, and what was the first major staticly typed language (widely used) with generics support. Generics implement the concept of parameterized types to allow for multiple types. The term generic means "pertaining to or appropriate to large groups of classes." I have seen the following mentions of "first": First-order parametric polymorphism is now a standard element of statically typed programming languages. Starting with System F [20,42] and functional programming lan- guages, the constructs have found their way into mainstream languages such as Java and C#. In these languages, first-order parametric polymorphism is usually called generics. From "Generics of a Higher Kind", Adriaan Moors, Frank Piessens, and Martin Odersky Generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983 From Wikipedia Generic Programming

    Read the article

  • Jersey 2.0 Integrated into GlassFish 4.0

    - by Jakub Podlesak
    The latest promoted build of GlassFish 4.0 (glassfish-4.0-b43.zip) now contains upgraded Jersey version, 2.0-m05. Users are getting an early access to the implementation of some parts of the JAX-RS 2.0 API Early Draft Review 3. The appropriate JAX-RS bundle, version 2.0-m09 , gets bundled into GlassFish 4.0 as well. What should work The simple answer is: all the basic stuff. We have particularly tested the following two examples: simple hello world webapp multipart webapp Both above linked archives contain adjusted projects, so that resulting war files do not bundle any Jersey dependencies. Both also use Jersey 2 specific Servlet class, org.glassfish.jersey.servlet.ServletContainer, for deployment. See Martin's blog post on how to package war applications capable of running with both Jersey 1 and Jersey 2 ServletContainer classes. What has not been covered yet The main areas, which have not been touched yet in Jersey 2 are: EJB integration CDI integration Validation These are also the areas where we are going to spend the most of our cycles in the coming month.

    Read the article

< Previous Page | 143 144 145 146 147 148 149 150 151 152 153 154  | Next Page >