Search Results

Search found 9 results on 1 pages for 'panzerschreck'.

Page 1/1 | 1 

  • Is there a way to programatically set the printer properties in windows ?

    - by panzerschreck
    Hello, As a paper saving drive throughout the organization, we plan to set 2 page printing as default setting on all the windows machines. I would like to contribute to this by writing a small script that can do that for all the machines, maybe send an email to all the users, and let them run the batch file. Is that possible, can you please guide me. I have no knowledge about windows scripting, I program in java for my living. Thanks for your time.

    Read the article

  • How to attach a scroll bar to a canvas in android ?

    - by panzerschreck
    Hello, I am drawing up a grid on a canvas as below, I have not been able to get the scroll bar to appear, I looked around for examples, but none of them give details on drawing scroll bars for custom views. Your help is much appreciated. public class GridActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // i tried to do as in the documentation nothing seems to happen LinearLayout lLayout = new LinearLayout(this); lLayout.addView(new CustomDrawableView(this), new ViewGroup.LayoutParams(800,600)); FrameLayout fLayout = new FrameLayout(this); fLayout.addView(lLayout, new ViewGroup.LayoutParams(800,600)); setContentView(fLayout); } private class GridView extends ScrollView { private ShapeDrawable[] mDrawable; public GridView (Context context) { // some initialization } protected void onDraw(Canvas canvas) { for each i mDrawable[i].draw(canvas) } } }

    Read the article

  • How to store the path of a game pawn in a turn based game ?

    - by panzerschreck
    Hello, I have a square grid, for a turn based game ( grid is similar to the chess board ), but the moves in the games are different based on whether you have lapped your opponent pawn at least once or not. i.e if you have not lapped (beaten any of the opponents pawns) in the outer most grid as below if you have lapped your opponent pawn once at least, then you get to reach home,this way.Any player having all his pawns reaching "home" first wins. The ones in yellow are safe-houses, i.e both the opponent pawn and the player's pawn get to stay in the same grid, this is not considered to be lapping ( the opponent ).The lapped pawn will return to its start point. Now the question is, what is the effective way to store the paths for the all the pawns.we will have 4 pawns for the player and 4 opponent pawns. Is there any pattern to store such static information, in a elegant way ? Thanks for your time

    Read the article

  • How do you create your own drag-n-drop GUI designer ?

    - by panzerschreck
    Hello I was looking at creating a UI for developing web forms, similar to the Netbeans Visual JSF form designer.It will be targeted to use GWT/GXT components.I am looking at a look very similar to VS/Netbeans. Any thoughts on where/how to start ? Initially, I would prefer to have it as a standalone application, later develop it as eclipse plugin. I have already evaluated the extjs designer and the eclipse plugin from instantiations, but i would prefer to have it developed on my own, as it looks challenging, Also, I have few custom components that have been developed. Thanks

    Read the article

  • Can we create a class from a xml file ?

    - by panzerschreck
    Hello, Is it possible to create a class dynamically by reading an xml file ( in java preferably) ? if yes, please provide pointers on how to do it. In the process of development, we have come up with a class that has 5 attributes, all these attributes correspond to an entry in the xml file, now if the user adds/modifies the xml entry the object corresponding to it must change automatically, one approach would be generate the source code, before compile time.Is there any other way ? Is there any common pattern to model such changes in the system ? Thanks,

    Read the article

  • Best datastructure for frequently queried list of objects

    - by panzerschreck
    Hello, I have a list of objects say, List. The Entity class has an equals method,on few attributes ( business rule ) to differentiate one Entity object from the other. The task that we usually carry out on this list is to remove all the duplicates something like this : List<Entity> noDuplicates = new ArrayList<Entity>(); for(Entity entity: lstEntities) { int indexOf = noDuplicates.indexOf(entity); if(indexOf >= 0 ) { noDuplicates.get(indexOf).merge(entity); } else { noDuplicates.add(entity); } } Now, the problem that I have been observing is that this part of the code, is slowing down considerably as soon as the list has objects more than 10000.I understand arraylist is doing a o(N) search. Is there a faster alternative, using HashMap is not an option, because the entity's uniqueness is built upon 4 of its attributes together, it would be tedious to put in the key itself into the map ? will sorted set help in faster querying ? Thanks

    Read the article

  • Project Implementation estimates with TDD

    - by panzerschreck
    Are there any guidelines when quoting estimates for projects/tasks involving TDD? For example, when compared to normal development of a task taking 1 day to complete, how much more should a TDD driven task take? 50% more time or 70% more time? Are there any statistics available, assuming the developer is well versed with the language and the test framework?

    Read the article

  • What is the best way to restore(rollback) data in an application to a specified state(date) ?

    - by panzerschreck
    Hello, An example would set the context right, the example below captures the various states of the entity, which needs to be reverted(rolled back) . State 1 - Recorded on 01-Mar-2010 Column1 Column2 Data1 0.56 State 2 - Recorded on 02-Mar-2010 Column1 Column2 Data1 0.57 State 3 - Recorded on 03-Mar-2010 Column1 Column2 Data1 0.58 User notices that state3 is not what he intended to be in, decides to revert back to state2. One approach that I can think of, without modifying the entity is via "auditing" all the inserts/updates, as below, the rollback information captures the data just before the updates/modifications on the entity, so that it can be applied in an order when you need to revert.Please note that changing the entity's schema, is not an option. Rollback - R1 recorded on 01-Mar-2010 Column1 Column2 Data1 0.56 Rollback - R2 Recorded on 02-Mar-2010 Column1 Column2 Data1 0.56 Rollback - R3 Recorded on 03-Mar-2010 Column1 Column2 Data1 0.57 So, to get to state2 , we would start with rollback information R1,apply R2 onto it. Is there a better approach to achieve this ? Thanks for your time.

    Read the article

1