Search Results

Search found 5784 results on 232 pages for 'points'.

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

  • Android card based game, need help to start

    - by user331296
    Hello, I'm just setting out in android development. I want to make a kind of card based game. I'm just looking for suggestions really on how I might start it. I know I have to make the menu layout and view, then use an Intent from that to get to the main game view. My sticking points are: -There's going to be a deck of cards. It's going to be a set number so I was thinking I could just have each card defined as a button in the layout. I don't know if that is the right way to do it though. -Storage of card details. I'm thinking of using an xml file to store these. Thanks in advance.

    Read the article

  • Interview Question: What are the characteristics of a good programmer?

    - by froadie
    I was asked this question on an interview a few months ago - "What would you say are the characteristics of a good programmer?" What would you answer to this? What, as a hiring manager, would you be looking for in an answer? I did get the job and am currently working with this company, although I don't know if that means I answered what they wanted to hear, but here were a couple of the points I mentioned: Passion PATIENCE Logic Teamwork etc. I'm especially curious to hear from the hiring side of things what would impress as an answer...

    Read the article

  • Obtain all keys of a Neo4j index

    - by MattiSG
    I have a Neo4j database whose content is generated dynamically from a big dataset. All “entry points” nodes are indexed on a named index (IndexManager.forNodes(…)). I can therefore look up a particular “entry point” node. However, I would now like to enumerate all those specific nodes, but I can't know on which key they were indexed. Is there any way to enumerate all keys of a Neo4j Index? If not, what would be the best way to store those keys, a data type that is eminently non-graph-oriented? UPDATE (thanks for asking details :) ): the list would be more than 2 million entries. The main use case would be to never update it after an initialization step, but other use cases might need it, so it has to be somewhat scalable. Also, I would really prefer avoiding killing my current resilience abilities, so storing all keys at once, as opposed to adding them incrementally, would be a last-resort solution.

    Read the article

  • In the generic programming/TMP world what exactly is a model / a policy and a "concept" ?

    - by Hassan Syed
    I'd like to know the precise yet succinct definitions of these three concepts in one place. The quality of the answer should depend on the following two points. Show a simple code snippet to show how and what the concept/technique is used for. Be simple enough to understand so that a programmer without any exposure to this area can grasp it. Note: There are probably many correct answers since each concept has many different facets. If there are a lot of good answers I will eventually turn the question into CW and aggregate the answers. -- Post Accept Edit -- Boost has a nice article on generic programming concepts

    Read the article

  • Why isn't IE displaying this alert()?

    - by George Edison
    I have the following piece of code: // setup the AJAX request var pageRequest = false; if(window.XMLHttpRequest) pageRequest = new XMLHttpRequest(); else if(window.ActiveXObject) pageRequest = new ActiveXObject("Microsoft.XMLHTTP"); // callback pageRequest.onreadystatechange = function() { alert('pageRequest.readyState: ' + pageRequest.readyState + '\npageRequest.status: ' + pageRequest.status); } pageRequest.open('POST','ajax.php',true); // q_str contains something like 'data=value...' pageRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); pageRequest.setRequestHeader("Content-length", q_str.length); pageRequest.setRequestHeader("Connection", "close"); pageRequest.send(q_str); This works fine in Chrome, but IE chokes on it, spitting out an "Unspecified error." and it points to the line with the alert() in it. Why can't it display the alert?

    Read the article

  • How to generate entities with Objects?

    - by 01
    I want to generate @Enities with seam-gen from existing database. However its generates very simple version only. For Example @Entity @Table(name = "badges") public class Badges implements java.io.Serializable { private Integer id; private **Integer userId**; private String name; private String date; I want him to generate @Entity @Table(name = "badges") public class Badges implements java.io.Serializable { private Integer id; private **User user**; private String name; private String date; I even have constrain on userId and it points to column User.id P.S. Im using MySQL5 and seam gen is using hbm2java to generate entities.

    Read the article

  • adding org.springframework.test package to spring-2.5.6-SEC01.jar in netbeans

    - by John
    This is probably very simple, however I can't get this to work. I want to use AbstractDependencyInjectionSpringContextTest class which is in org.springframework.test package. This package is not included in Netbeans' spring library, so I want to add it. So what I have tried so far is: copy and paste "test" directory (downloaded from spring) into the Netbeans' spring-2.5.6-SEC01.jar file (copy it to org.springframework directory in that jar so I can use org.springframework.test to import it). If I go to project/libraries in Netbeans it is there, but when I try to import org.springframework.test.*; the autocomplition doesn't give me the option to choose test directory from org.soringframework package. create a new library which points to "test" directory and add it to the project- as there is no any jar file in "test" I'm not sure what path should I use to import it. I'm pretty sure this is something very simple but I'm still a novice and can't figure this out.

    Read the article

  • Optimising Androidplot

    - by Zammbi
    Seems Androidplot (androidplot.com) website/forums are down so I'll try asking this question here. I have multi touch zoom and scrolling. Similar code to http://mlepicki.com/2012/03/androidplot-multitouch-zoom-scroll/ except that I have a bar graph instead. However with 100 data points it has noticeable lag. Even with 10 bars are just showing. Sounds like its drawing/calculating/etc all bars. Any idea on how I could optimise this? I can't use hardware rendering as I want to support Android 2.1 and the library doesn't support it(it breaks).

    Read the article

  • Minimum number of training examples for Find-S/Candidate Elimination algorithms?

    - by Rich
    Consider the instance space consisting of integer points in the x, y plane, where 0 = x, y = 10, and the set of hypotheses consisting of rectangles (i.e. being of the form (a = x = b, c = y = d), where 0 = a, b, c, d = 10). What is the smallest number of training examples one needs to provide so that the Find-S algorithm perfectly learns a particular target concept (e.g. (2 = x = 4, 6 = y = 9))? When can we say that the target concept is exactly learned in the case of the Find-S algorithm, and what is the optimal query strategy? I'd also like to know the answer w.r.t Candidate Elimination. Thanks in advance.

    Read the article

  • Creating a WCF Restful service, concurrency issues

    - by pmillio
    Hi i am in the process of creating a restful service with WCF, the service is likely to be consumed by at least 500 people at any given time. What settings would i need to set in order to deal with this. Please give me any points and tips, thanks. Here is a sample of what i have so far; [ServiceBehavior(IncludeExceptionDetailInFaults = true, InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple)] And this is an example of a method being called; public UsersAPI getUserInfo(string UserID) { UsersAPI users = new UsersAPI(int.Parse(UserID)); return users; } [OperationContract] [WebGet(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, UriTemplate = "User/{UserID}")] [WebHelp(Comment = "This returns a users info.")] UsersAPI getUserInfo(string UserID);

    Read the article

  • Creating a computer with pencil and paper [closed]

    - by Justian Meyer
    This concept has been brought to my attention before, but many people might know it from this popular comic here, where he uses stones instead of points on a paper. This concept is so abstract to me. A full-functioning computer that can manage algorithms, input, output, etc. without electricity? Surely, it's difficult to visualize because my definition of a computer is not exactly what the word sounds like COMPUTE-ER. Can someone help me bring the concept to light - the understanding, how to make one, etc? It seems like it'd be an interesting read, although I think I wouldn't be able to make it do anything. Many thanks in advance for responses. I've tried searching Google, but all I got were ways to diagram code and chart ideas. -.Justian.

    Read the article

  • Level designing with Cocos2d and Box2d

    - by Majster
    I want to learn how to make levels using cocos2d and box2d (for iOS). I am talking about a 2d platformer such as Limbo or Braid or something like that. How can I design and build levels like this? I have seen Level Helper for cocos2d but its not free and I don't think it makes physic objects for box2d. How is this accomplished in real games? How to make camera move with character and so on. Any starting points would be much appreciated.

    Read the article

  • Can review changes in Acrobat Reader (Pro, or not) be 'applied' to a PDF?

    - by Danjah
    Hi there, As part of an enhancement to my workplace processes, we're trying to streamline review of various documents. Yeah, there's way better alternatives to what I'm about to suggest, but the reality is that I have no time allocated to investigate things like DAV, repo setups and such. What I do have time allocated for is improving workflow around tools we already use. So I tried to work through the Adobe PDF collaborative review cycle. I have to say it was pretty amazing, from the notify toolbar icon to doc merging, to user access control. They offer it all, EXCEPT the ability to actually apply review changes to a PDF!?! To clarify, after sending a PDF through the collab review cycle (involving a bunch for external editors and internal staff) the end result was a PDF full of rich feedback - but I can see no way to finalised and apply those 'accepted' review points to the PDF in question. I hope this is clear enough, feel free to ask questions to clarify - perhaps I'm just missing something obvious, but perhaps applying changes to an already existing PDF is not possible? -d

    Read the article

  • Best keyboards for emacs?

    - by catphive
    For emacs users out there, what are your recommended keyboards? Bonus points for keyboards that: Have no capslock key. Instead, a control key in that position. Alt keys that are closer to the center, and easier to use with meta key combos. I find alt keys too far to the left to be a bit awkward to hit with my thumb in some key combos. Help ergonomically with emacs in other ways. I'm not a huge fan of model M style high and clacky keys. I instead prefer laptop style flat keys; however, I'm not disqualifying either category.

    Read the article

  • misleading plot issue in mathematica

    - by Qiang Li
    I want to study some "strange" functions by plotting them out in mathematica. One example is the following: mod2[x_] := Which[Mod[x, 2] >= 1, -2 + Mod[x, 2], True, Mod[x, 2]]; f[x_] := Which[-1 <= x <= 1, Abs[x], True, Abs[mod2[x]]]; fn[x_, n_] := Sum[(3/4)^i*f[4^n*x], {i, 0, n}] Plot[{fn[x, 0], fn[x, 1], fn[x, 2], fn[x, 5]}, {x, -2, 2}] However, the plot I got from mma is misleading, in the sense that the maxima and minima of fn[x, 5] should be on the same two levels. But due to high oscillation of the function, and the fact that clearly mma only takes limited number of points to draw the function, you see the plot exhibit strange behavior. Is there any option in plot to remedy for this? Many thanks.

    Read the article

  • pyplot.scatter changes the data limits of the axis

    - by Erotemic
    I have some code which plots some points. I substituted ax.scatter for ax.plot so I could control the color of each point individually. However when I make this change the axis x and y ranges seem to increase. I can't pinpoint why this is happening. The only thing I've changed is plot to scatter. This code makes an axis that is too big ax.scatter(x, y, c=color_list, s=pts_size, marker='o', edgecolor='none') #ax.plot(x, y, linestyle='None', marker='o', markerfacecolor=pts_color, markersize=pts_size, markeredgewidth=0) This code does the right thing (but I can't control the color) #ax.scatter(x, y, c=color_list, s=pts_size, marker='o', edgecolor='none') ax.plot(x, y, linestyle='None', marker='o', markerfacecolor=pts_color, markersize=pts_size, markeredgewidth=0) Is there a way I can call scatter such that it doesn't mess with my current axis limits?

    Read the article

  • Sorting related objects in the Django Admin form interface

    - by Carver
    I am looking to sort the related objects that show up when editing an object using the admin form. So for example, I would like to take the following object: class Person(models.Model): first_name = models.CharField( ... ) last_name = models.CharField( ... ) hero = models.ForeignKey( 'self', null=True, blank=True ) and edit the first name, last name and hero using the admin interface. I want to sort the objects as they show up in the drop down by last name, first name (ascending). How do I do that? Context I'm using Django v1.1. I started by looking for help in the django admin docs, but didn't find the solution As you can see in the example, the foreign key is pointing to itself, but I expect it would be the same as pointing to a different model object. Bonus points for being able to filter the related objects, too (eg~ only allow selecting a hero with the same first name)

    Read the article

  • Is there a ways to make google store coordinates in the android map?

    - by Pavel
    Hi. I'm in the middle of developing android app using google map. My question is - how to store coordinates with google map and display them later on? I know how to use canvas, how to draw it etc. but I want to store those coordinates with google map - just like with the google maps feature on internet. When I log in I can see points I've put on the map straight away. Can someone please tell me how to do that? There must be a way. Any answers greatly appreciated!

    Read the article

  • Truncating a table referenced by a foreign key

    - by born to hula
    Hey, We have two tables in a SQL Server 2005 database, A and B.There is a service which truncates table A every day. Recently, a foreign key constraint was added to table B, referencing table A. As a result, it isn't possible truncating table A anymore, even if table B is empty. Is there any workaround to get the same result as truncating table A? I've already tried the approach below but the identity wasn't reset. DBCC CHECKIDENT (TABLENAME, RESEED, 0) PS. before anyone points this as a duplicate, the different thing here is that I'm not allowed to drop constraints, nor creating any.

    Read the article

  • C++ Vector of pointers

    - by xbonez
    For my latest CS homework, I am required to create a class called Movie which holds title, director, year, rating, actors etc. Then, I am required to read a file which contains a list of this info and store it in a vector of pointers to Movies. I am not sure what the last line means. Does it mean, I read the file, create multiple Movie objects. Then make a vector of pointers where each element (pointer) points to one of those Movie objects? Do I just make two vectors - one of pointers and one of Movies and make a one-to-one mapping of the two vectors?

    Read the article

  • Android ImageButton not firing the onclick event, what is wrong with my code?

    - by kimo
    I have very simple code that includes ImageButton with OnClickListener that points to another Activity, the click on the ImageButton doesn't fire the onClick (The same problem was with Button) : public class ToolsActivity extends Activity { private ImageButton btnCamera; final Context context = ToolsActivity.this; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_tools); this.btnCamera = (ImageButton) findViewById(R.id.cameraButton); this.btnCamera.setOnClickListener(new OnClickListener() { public void onClick(View v) { Intent intent = new Intent(context,MainActivity.class); startActivity(intent); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_tools, menu); return true; } XML: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingLeft="16dp" android:paddingRight="16dp" > <ImageButton android:id="@+id/cameraButton" android:layout_width="100dp" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:background="@drawable/btncamera" android:contentDescription="@string/desc" />

    Read the article

  • Check if a symlink has changed

    - by BCS
    I have a daemon that, when it's started, loads its data from a directory that happens to be a symlink. Periodically, new data is generated and the symlink updated. I want a bash script that will check if the current symlink is the same as the old one (that the daemon started with) and if not, restart the daemon. My current thought is: if [[ ! -e $old_dir || $(readlink "$data_dir") == $(readlink "$old_dir") ]]; then echo restart ... ln "$(readlink "$data_dir")" "$old_dir" -sf else echo no restart fi The abstract requirement is: each time the script runs, it needs to check if a symlink on a given path now points to a something other than it did the last time and if so do something. (The alternative would be to check if the data at the path has changed but I don't see that being any cleaner.) My questions: Is this a good approach? Does anyone have a better idea? Where should I put $old_dir?

    Read the article

  • Drupal menu item disappears for Anonymous User, I dont want that happening!

    - by Busk
    Good day I'm using Drupal 6, and I have a menu item that points to a Forum page. I only want the forums accesible by registered users, but if they aren't logged in/registered I want drupal to display a login/register page. Im using a 403redirect module to handle that, and that is fine. My problem is, I have the menu item pointing to /forum. And when I'm not logged in, the menu item disappears. How can I stop that from happening? Thanks

    Read the article

  • Tags php improving database speed and user experience

    - by Doodle
    How did stackOverFlow, excuse me if it wasn't the first implementation of this system. Decide what its initial tags where? I want to provide users with the best experience on my site and am implementing a tags system. I don't care about search engines or any of that. I just care about my users. Does any one have any advice about things that have failed or succeeded when they allowed users to tag things? Does any one know some good resources about the methodologies of user tagging? Does any one know some good resources about implementing a tags system from a programming perspective, database structures, theories, etc ? I'll give my check to who ever I feel points me in the best direction on the subject.

    Read the article

  • Adding text labels to sliders in iPhone Settings application

    - by Kevin L.
    When configuring a Settings.bundle as part of an iPhone application bundle, it's trivial to add minimum and maximum value images to sliders (PSSliderSpecifier), but not simple maximum and minimum text labels. http://developer.apple.com/iPhone/library/documentation/PreferenceSettings/Conceptual/SettingsApplicationSchemaReference/Articles/PSSliderSpecifier.html iPhone gurus: Is anyone aware of a simple means to apply text labels to these sliders for use within the Settings application (therefore, no slider subclassing shenanigans; it all has to be done via a plist)? I suppose I could just use an image of the label but...ew. Bonus points if there's a way to show the current value of a slider in some sort of number format.

    Read the article

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