Search Results

Search found 721 results on 29 pages for 'bruno finger'.

Page 10/29 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Pointer inside a struct / thread

    - by bruno
    Hi! I have this warning "warning: assignment from incompatible pointer type " in this line: data1->transformed_block[l] = &transformed_block[l]; - void print_message_function ( void *ptr ) { dt *data; data = (dt *) ptr; printf("Dentro da thread Numero0: %ld\n", data->L_norm_NewBlock); pthread_exit(0); } typedef struct data_thread { long L_norm_NewBlock; int Bsize_X; int Bsize_Y; int *transformed_block[MAX_LEVEL]; long L_norm_OrigBlock; } dt; void function() { int *transformed_block[MAX_LEVEL]; pthread_t thread1; dt *data1; pthread_attr_t attr; pthread_attr_init(&attr); //Fills structure data1 = (dt *) malloc(sizeof(dt)); data1->transformed_block[l] = &transformed_block[l]; data1->L_norm_NewBlock=0; data1->Bsize_Y = Bsize_Y; data1->Bsize_X = Bsize_X; pthread_create(&thread1, &attr, (void *) &print_message_function, (void *) &data1); } I want to get rid of that warning, and the values i get inside the thread are wrong. For example data1-L_norm_NewBlock=0; in the thread guives me a differente value (not 0 like it should be).

    Read the article

  • Convert long number as string in the serialization

    - by Bruno
    I have a custom made class that use a long as ID. However, when I call my action using ajax, my ID is truncated and it loses the last 2 numbers because javascript loses precision when dealing with large numbers. My solution would be to give a string to my javascript, but the ID have to stay as a long on the server side. Is there a way to serialize the property as a string? I'm looking for some kind of attribute. Controller public class CustomersController : ApiController { public IEnumerable<CustomerEntity> Get() { yield return new CustomerEntity() { ID = 1306270928525862486, Name = "Test" }; } } Model public class CustomerEntity { public long ID { get; set; } public string Name { get; set; } } JSON Result [{"Name":"Test","ID":1306270928525862400}]

    Read the article

  • Should I worry about running out of HierarchyIDs?

    - by Bruno Martinez
    When you ask for a new HierarchyID between two others, the result gets progressively longer. For example, between 2/5.6 and 2/5.7 there's only 2/5.6.1 and other 4 component paths. The HierarchyID data type is limited to 800 some bytes, so you can't repeat this forever. Then again, integer types are also limited, but it isn't a problem in practice. Should I periodically defragment my table so that height doesn't grow unbounded?

    Read the article

  • How to refer to enum constants in c# xml docs

    - by Bruno Martinez
    I want to document the default value of an enum typed field: /// <summary> /// The default value is <see cref="Orientation.Horizontal" />. /// </summary> public Orientation BoxOrientation; The compiler warns that it couldn't resolve the reference. Prefixing F: or M: silences the compiler, but E: also does, so I'm unsure what prefix is correct.

    Read the article

  • How to get the action argument of a wp-login.php request?

    - by Bruno De Barros
    I am trying to integrate my custom user system with Wordpress, and I have recently asked a question on how to redirect requests to wp-login.php to my own login/registration page, but as I was working on the pluggable functions, I realized that requests to wp-login.php can either be for login, registration, or log out. This is set in the action argument that's made in the request. What I am trying to figure out is how to get this action argument, so I can redirect the request to my custom pages. Is there any way of doing this? Thank you in advance.

    Read the article

  • Separation of business logic

    - by bruno
    When I was optimizing my architecture of our applications in our website, I came to a problem that I don't know the best solution for. Now at the moment we have a small dll based on this structure: Database <-> DAL <-> BLL the Dal uses Business Objects to pass to the BLL that will pass it to the applications that uses this dll. Only the BLL is public so any application that includes this dll, can see the bll. In the beginning, this was a good solution for our company. But when we are adding more and more applications on that Dll, the bigger the Bll is getting. Now we dont want that some applications can see Bll-logic from other applications. Now I don't know what the best solution is for that. The first thing I thought was, move and separate the bll to other dll's which i can include in my application. But then must the Dal be public, so the other dll's can get the data... and that I seems like a good solution. My other solution, is just to separate the bll in different namespaces, and just include only the namespaces you need in the applications. But in this solution, you can get directly access to other bll's if you want. So I'm asking for your opinions.

    Read the article

  • Application stops on back button in new activity

    - by Bruno Almeida
    I have this application, that have a listView, and when I click in a item on listView, it opens a new activity. That works fine! But, if I open the new activity and than press the "back button" the application "Unfortunately, has stopped". Is there something I'm doing wrong? Here is my code: First activity: public class AndroidSQLite extends Activity { private SQLiteAdapter mySQLiteAdapter; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ListView listContent = (ListView)findViewById(R.id.contentlist); mySQLiteAdapter = new SQLiteAdapter(this); mySQLiteAdapter.openToRead(); Cursor cursor = mySQLiteAdapter.queueAll(); startManagingCursor(cursor); String[] from = new String[]{SQLiteAdapter.KEY_NOME,SQLiteAdapter.KEY_ID}; int[] to = new int[]{R.id.text,R.id.id}; SimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(this, R.layout.row, cursor, from, to); listContent.setAdapter(cursorAdapter); listContent.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Toast.makeText(getBaseContext(), id + "", Toast.LENGTH_LONG).show(); Intent details = new Intent(getApplicationContext(),DetailsPassword.class); startActivity(details); } }); mySQLiteAdapter.close(); } } Second Activity: public class DetailsPassword extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView text = new TextView(getApplicationContext()); text.setText("Text to show"); setContentView(text); } } // ===== EDITED ===== here is the Stack Track 10-30 08:55:05.744: E/AndroidRuntime(28046): FATAL EXCEPTION: main 10-30 08:55:05.744: E/AndroidRuntime(28046): java.lang.RuntimeException: Unable to resume activity {com.example.sqliteexemple2/com.example.sqliteexemple2.AndroidSQLite}: java.lang.IllegalStateException: trying to requery an already closed cursor android.database.sqlite.SQLiteCursor@4180a370 10-30 08:55:05.744: E/AndroidRuntime(28046): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2701) 10-30 08:55:05.744: E/AndroidRuntime(28046): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2729) 10-30 08:55:05.744: E/AndroidRuntime(28046): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1250) 10-30 08:55:05.744: E/AndroidRuntime(28046): at android.os.Handler.dispatchMessage(Handler.java:99) 10-30 08:55:05.744: E/AndroidRuntime(28046): at android.os.Looper.loop(Looper.java:137) 10-30 08:55:05.744: E/AndroidRuntime(28046): at android.app.ActivityThread.main(ActivityThread.java:4931) 10-30 08:55:05.744: E/AndroidRuntime(28046): at java.lang.reflect.Method.invokeNative(Native Method) 10-30 08:55:05.744: E/AndroidRuntime(28046): at java.lang.reflect.Method.invoke(Method.java:511) 10-30 08:55:05.744: E/AndroidRuntime(28046): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 10-30 08:55:05.744: E/AndroidRuntime(28046): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558) 10-30 08:55:05.744: E/AndroidRuntime(28046): at dalvik.system.NativeStart.main(Native Method) 10-30 08:55:05.744: E/AndroidRuntime(28046): Caused by: java.lang.IllegalStateException: trying to requery an already closed cursor android.database.sqlite.SQLiteCursor@4180a370 10-30 08:55:05.744: E/AndroidRuntime(28046): at android.app.Activity.performRestart(Activity.java:5051) 10-30 08:55:05.744: E/AndroidRuntime(28046): at android.app.Activity.performResume(Activity.java:5074) 10-30 08:55:05.744: E/AndroidRuntime(28046): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2691) 10-30 08:55:05.744: E/AndroidRuntime(28046): ... 10 more

    Read the article

  • Composing adaptors in Boost::range

    - by bruno nery
    I started playing with Boost::Range in order to have a pipeline of lazy transforms in C++]1. My problem now is how to split a pipeline in smaller parts. Suppose I have: int main(){ auto map = boost::adaptors::transformed; // shorten the name auto sink = generate(1) | map([](int x){ return 2*x; }) | map([](int x){ return x+1; }) | map([](int x){ return 3*x; }); for(auto i : sink) std::cout << i << "\n"; } And I want to replace the first two maps with a magic_transform, i.e.: int main(){ auto map = boost::adaptors::transformed; // shorten the name auto sink = generate(1) | magic_transform() | map([](int x){ return 3*x; }); for(auto i : sink) std::cout << i << "\n"; } How would one write magic_transform? I looked up Boost::Range's documentation, but I can't get a good grasp of it.

    Read the article

  • Cannot .Count() on IQueryable (NHibernate)

    - by Bruno Reis
    Hello, I'm with an irritating problem. It might be something stupid, but I couldn't find out. I'm using Linq to NHibernate, and I would like to count how many items are there in a repository. Here is a very simplified definition of my repository, with the code that matters: public class Repository { private ISession session; /* ... */ public virtual IQueryable<Product> GetAll() { return session.Linq<Product>(); } } All the relevant code in the end of the question. Then, to count the items on my repository, I do something like: var total = productRepository.GetAll().Count(); The problem is that total is 0. Always. However there are items in the repository. Furthermore, I can .Get(id) any of them. My NHibernate log shows that the following query was executed: SELECT count(*) as y0_ FROM [Product] this_ WHERE not (1=1) That must be that "WHERE not (1=1)" clause the cause of this problem. What can I do to be able .Count() the items in my repository? Thanks! EDIT: Actually the repository.GetAll() code is a little bit different... and that might change something! It is actually a generic repository for Entities. Some of the entities implement also the ILogicalDeletable interface (it contains a single bool property "IsDeleted"). Just before the "return" inside the GetAll() method I check if if the Entity I'm querying implements ILogicalDeletable. public interface IRepository<TEntity, TId> where TEntity : Entity<TEntity, TId> { IQueryable<TEntity> GetAll(); ... } public abstract class Repository<TEntity, TId> : IRepository<TEntity, TId> where TEntity : Entity<TEntity, TId> { public virtual IQueryable<TEntity> GetAll() { if (typeof (ILogicalDeletable).IsAssignableFrom(typeof (TEntity))) { return session.Linq<TEntity>() .Where(x => (x as ILogicalDeletable).IsDeleted == false); } else { return session.Linq<TEntity>(); } } } public interface ILogicalDeletable { bool IsDeleted {get; set;} } public Product : Entity<Product, int>, ILogicalDeletable { ... } public IProductRepository : IRepository<Product, int> {} public ProductRepository : Repository<Product, int>, IProductRepository {} Edit 2: actually the .GetAll() is always returning an empty result-set for entities that implement the ILogicalDeletable interface (ie, it ALWAYS add a WHERE NOT (1=1) clause. I think Linq to NHibernate does not like the typecast.

    Read the article

  • How to get a nicely formatted PHP Web Service response?

    - by Bruno
    I called an API like this: $service = new Class_Service(); $parameters = new GetClasses(); $parameters->Request = new GetClassesRequest(); $parameters->Request->SourceCredentials = new SourceCredentials(); $parameters->Request->SourceCredentials->SourceName = "Name"; $parameters->Request->SourceCredentials->Password = "Pass"; $parameters->Request->SourceCredentials->SiteIDs = array( 12 ); $classes = $service->GetClasses($parameters); var_dump($classes); And received a response like this: object(GetClassesResponse)#7 (1) { ["GetClassesResult"]=> object(GetClassesResult)#8 (6 { ["Classes"]=> object(stdClass)#9 (1) { ["Class"]=> array(25) { [0]=> object(Mi_Class)#10 (21) { ["ClassScheduleID"]=> int(15) ["Visits"]=> NULL ["Clients"]=> NULL ["Location"]=> object(Location)#11 (30) { ["BusinessID"]=> NULL ["SiteID"]=> int(12) ["BusinessDescription"]=> NULL ["AdditionalImageURLs"]=> object(stdClass)#12 (0) { } ["FacilitySquareFeet"]=> NULL Does a response normally look like this? How do I go about getting the data in a formatted manner?

    Read the article

  • Abstract over X

    - by Bruno Bieth
    Sorry for this english related question but I only came across that expression in the context of IT. What does abstracting over something mean ? For example abstracting over objects or abstracting over classes. Thanks

    Read the article

  • Chrome back button issue for cross browser login

    - by Bruno
    I am logging in to the site using Janrain facebook login. On successful authentication from facebook i ll taken to the home page. From the home page i m navigating to other page. From that page when i click chrome browser back button, i am not taken to the home page. Instead i m taken to janrain page. Its working fine in chrome version 20. Problem in other version of chrome. Please help me in fixing this. Thanks.

    Read the article

  • Override `drop` for a custom sequence

    - by Bruno Reis
    In short: in Clojure, is there a way to redefine a function from the standard sequence API (which is not defined on any interface like ISeq, IndexedSeq, etc) on a custom sequence type I wrote? 1. Huge data files I have big files in the following format: A long (8 bytes) containing the number n of entries n entries, each one being composed of 3 longs (ie, 24 bytes) 2. Custom sequence I want to have a sequence on these entries. Since I cannot usually hold all the data in memory at once, and I want fast sequential access on it, I wrote a class similar to the following: (deftype DataSeq [id ^long cnt ^long i cached-seq] clojure.lang.IndexedSeq (index [_] i) (count [_] (- cnt i)) (seq [this] this) (first [_] (first cached-seq)) (more [this] (if-let [s (next this)] s '())) (next [_] (if (not= (inc i) cnt) (if (next cached-seq) (DataSeq. id cnt (inc i) (next cached-seq)) (DataSeq. id cnt (inc i) (with-open [f (open-data-file id)] ; open a memory mapped byte array on the file ; seek to the exact position to begin reading ; decide on an optimal amount of data to read ; eagerly read and return that amount of data )))))) The main idea is to read ahead a bunch of entries in a list and then consume from that list. Whenever the cache is completely consumed, if there are remaining entries, they are read from the file in a new cache list. Simple as that. To create an instance of such a sequence, I use a very simple function like: (defn ^DataSeq load-data [id] (next (DataSeq. id (count-entries id) -1 []))) ; count-entries is a trivial "open file and read a long" memoized As you can see, the format of the data allowed me to implement count in very simply and efficiently. 3. drop could be O(1) In the same spirit, I'd like to reimplement drop. The format of these data files allows me to reimplement drop in O(1) (instead of the standard O(n)), as follows: if dropping less then the remaining cached items, just drop the same amount from the cache and done; if dropping more than cnt, then just return the empty list. otherwise, just figure out the position in the data file, jump right into that position, and read data from there. My difficulty is that drop is not implemented in the same way as count, first, seq, etc. The latter functions call a similarly named static method in RT which, in turn, calls my implementation above, while the former, drop, does not check if the instance of the sequence it is being called on provides a custom implementation. Obviously, I could provide a function named anything but drop that does exactly what I want, but that would force other people (including my future self) to remember to use it instead of drop every single time, which sucks. So, the question is: is it possible to override the default behaviour of drop? 4. A workaround (I dislike) While writing this question, I've just figured out a possible workaround: make the reading even lazier. The custom sequence would just keep an index and postpone the reading operation, that would happen only when first was called. The problem is that I'd need some mutable state: the first call to first would cause some data to be read into a cache, all the subsequent calls would return data from this cache. There would be a similar logic on next: if there's a cache, just next it; otherwise, don't bother populating it -- it will be done when first is called again. This would avoid unnecessary disk reads. However, this is still less than optimal -- it is still O(n), and it could easily be O(1). Anyways, I don't like this workaround, and my question is still open. Any thoughts? Thanks.

    Read the article

  • gVIM "put" driving me mad, how do I "put" at the beginning of a line

    - by crgnz
    I'm learning gVIM on Windows, and as I slowly learn more of the keystrokes I find myself using the mouse less and less, which is great. I have a couple of questions I've yet to figure out: I do a lot of copy and paste. So I use 'v' to enter VISUAL mode, use k/j to move up/down and select the lines, then hit 'y' to yank. I then go to the line where I want to insert, and hit 'p' to put, BUT the darn thing pastes after the 1st character. I can't move any further left, so I am definitely at the start of the line, so I find the 'p'ut behaviour of pasting 1 char after my cursor position to be supremely annoying. I switch between edit and command mode an awful lot, and my poor little finger on my left hand is getting sore from being stretched out to hit the 'Esc' key (to enter command mode) every few seconds. Is there a more finger-friendly way to enter command mode?

    Read the article

  • PhysicsMouseJoint problem in andengine + Box2d

    - by Nikhil Lamba
    What we can remove from this code i.e from PhysicsMouseJointExample to remove the functionality of drag and drog of sprite but i need all functionality except this only user move the sprite with some force and velocity of fling but user can't move the ball as like drag and drop like moving a finger on screen and sprite move with finger plz plz help me I am Using Below method for Mouse Joint CODE : public MouseJoint createMouseJoint(final IShape pFace, final float pTouchAreaLocalX, final float pTouchAreaLocalY) { final Body body = (Body) pFace.getUserData(); final MouseJointDef mouseJointDef = new MouseJointDef(); final Vector2 localPoint = Vector2Pool.obtain((pTouchAreaLocalX - pFace.getWidth() * 0.5f) / PhysicsConstants.PIXEL_TO_METER_RATIO_DEFAULT, (pTouchAreaLocalY - pFace.getHeight() * 0.5f) / PhysicsConstants.PIXEL_TO_METER_RATIO_DEFAULT); this.groundBody.setTransform(localPoint, 0); mouseJointDef.bodyA = this.groundBody; mouseJointDef.bodyB = body; mouseJointDef.dampingRatio = 0.95f; mouseJointDef.frequencyHz = 30; mouseJointDef.maxForce = (200.0f * body.getMass()); mouseJointDef.collideConnected = true; mouseJointDef.target.set(body.getWorldPoint(localPoint)); Vector2Pool.recycle(localPoint); return (MouseJoint)mPhysicsWorld.createJoint(mouseJointDef); }

    Read the article

  • Microsoft Researchers shows off best Touch Screen ever made. Better than Apple touch screens!

    - by Gopinath
    All the touch devices we have in market today like iPads, iPhones, Samsung tablets and phones, etc.  have a very small issue – 100 milliseconds of lag. The lag is the amount of time a touch device takes to respond after you touch the device. The 100 milliseconds of lag may not be an issue when you are tapping and swapping the interface elements on a device, but they are apparent when you wing your finger around the screen faster. For example if you use any painting app, the lag is very obvious and screen responds slowly than an artist can paint with his finger. Researchers at Microsoft labs came out with a prototype of touch device that drastically cuts down the 100 milliseconds of lag time to just 1 millisecond. That’s 100 times faster than today’s touch screen devices. Check out the video embedded below for a demo of new touch screen. Over at TechCrunch, Chris Velazco says: The difference is staggering, especially when Dietz trots out the slow-motion footage. With the delay between touch input and screen response slashed by orders of magnitude, a device that sports the sort of super-low-latency Dietz envisions has the potential to feel far more (for lack of a better term) natural than its brethren. There’s zero delay when you slide a checker across a board, for example, and bringing that sort of instantaneous feedback to the many screens in our lives could help to bridge the gap between operating a bit of software and the feeling of interacting with objects.   It will be great boost to Microsoft’s tablet strategy if they succeed in bringing this research into mass market and allow it’s partners to use the technology on Windows 8 tablets.

    Read the article

  • How does a trackball reduce pain caused by RSI? [closed]

    - by gunbuster363
    I developed RSI (Repetitive Strain Injury) in my index fingers due excessive mouse clicking. I might consider a trackball as many people suggested. But how does trackball help? I can see it get 2 buttons and a ball which require some fingers to operate on. Will I RSI while I click on the buttons with other healthy fingers? Logitech TrackMan Wheel: I highly doubt this trackball, I assume we are still using the index and middle finger for clicking. Logitech Marble Mouse: I think we will use the thumb to click the left button, will I develop RSI on my thumb? And the right button, which finger should I use? If you know other trackball which might help, please tell me which is the design that help to avoid the stress.

    Read the article

  • Synaptics touchpad scroll doesn't work on many applications

    - by Juliana Pena
    The Synaptics touchpad in my new laptop doesn't scroll at all in a number of applications, including Steam and Zune. I've narrowed the problem down to Synaptics not sending mouse wheel messages, but rather manipulating scroll bars. I'm only looking into one-finger side-of-touchpad scrolling, not two-finger scrolling. Is there a way to make it send wheel messages so that it is compatible with all applications? Configuration: Windows 7 64-bit Dell XPS 14 Latest Synaptics driver (have tried both from Synaptics and Dell) My Synaptics options window looks like this and I've tried moving all the options to no avail:

    Read the article

  • How to move an UIView along a curved CGPath according to user dragging the view

    - by Felipe Cypriano
    I'm trying to build a interface that the user can move his finger around the screen an a list of images moves along a path. The idea is that the images center nevers leaves de path. Most of the things I found was about how to animate using CGPath and not about actually using the path as the track to a user movement. I need to objects to be tracked on the path even if the user isn't moving his fingers over the path. For example (image bellow), if the object is at the beginning of the path and the user touches anywhere on the screen and moves his fingers from left to right I need that the object moves from left to right but following the path, that is, going up as it goes to the right towards the path's end. This is the path I've draw, imagine that I'll have a view (any image) that the user can touch and drag it along the path, there's no need to move the finger exactly over the path. If the user move from left to right the image should move from left to right but going up if need following the path. This is how I'm creating the path: CGPoint endPointUp = CGPointMake(315, 124); CGPoint endPointDown = CGPointMake(0, 403); CGPoint controlPoint1 = CGPointMake(133, 187); CGPoint controlPoint2 = CGPointMake(174, 318); CGMutablePathRef path = CGPathCreateMutable(); CGPathMoveToPoint(path, NULL, endPointUp.x, endPointUp.y); CGPathAddCurveToPoint(path, NULL, controlPoint1.x, controlPoint1.y, controlPoint2.x, controlPoint2.y, endPointDown.x, endPointDown.y); Any idead how can I achieve this?

    Read the article

  • How can I install an Apple Magic Trackpad on a PC without Boot Camp?

    - by rymo
    I have a Apple Magic Trackpad and I'd like to use it with my PC. I have no other Apple hardware besides the Trackpad. I do not have OSX and thus no Boot Camp CD. The Trackpad uses Bluetooth and will pair with Windows 7 without specific drivers (appears as an HID-Compliant Mouse), but all it will do is point and left click (physical click, no touch tap). With Apple's Windows driver update, I should be able to achieve: Tap to click Dragging Drag lock Secondary click Two-finger scrolling Two-finger secondary tap/click But how can I obtain this driver without Boot Camp installed? Apple's Boot Camp update EXE will not install on my PC (non-Apple hardware).

    Read the article

  • Odd Android touch event problem

    - by user22241
    Overview When testing my game I came across a bizarre problem with my touch controls. Note this isn't related to multi-touch as I completely removed my ACTION_POINTER_UP and ACTION_POINTER_DOWN along with my ACTION_MOVE code. So I'm simply working with ACTION_UP and ACTION_DOWN now and still get the problem. The problem I have a left and right button on the left of the screen and a jump button on the right. Everything works as it should but if I touch a large area of my hand (the fleshy part at the base of the thumb for instance) onto the screen, then release it and then press one of my arrows, the sprite moves in that direction for a few seconds, and then ACTION_UP is mysteriously triggered. The sprite stops and then if I release my finger and re-apply it to an arrow, the same thing happens. This goes on and on and eventually (randomly??) stops and everything work OK again. Test device & OS Google Nexus 10 Tablet running Jellybean 4.2.2 Code //Action upon which to switch actionMask = event.getActionMasked(); //Pointer Index of the currently touching pointer pointerIndex = event.getActionIndex(); //Number of pointers (for multi-touch) pointerCount = event.getPointerCount(); //ID of the pointer currently being processed (Multitouch) pointerID = event.getPointerId(pointerIndex); switch (actionMask){ //Primary pointer down case MotionEvent.ACTION_DOWN: { //if pressing left button then set moving left if (isLeftPressed(event.getX(), event.getY())){ renderer.setSpriteLeft(); } //if pressing right button then set moving right else if (isRightPressed(event.getX(), event.getY())){ renderer.setSpriteRight(); } //if pressing jump button then set sprite jumping else if (isJumpPressed(event.getX(),event.getY())){ renderer.setSpriteState('j', true); } break; }//End of case //Primary pointer up case MotionEvent.ACTION_UP:{ //When finger leaves the screen, stop sprite's horizontal movement renderer.setSpriteStopped(); break; }

    Read the article

  • How can one select an application to switch to in task switcher with track pad (MacBook Pro, Mac OS

    - by index
    Three finger swipe left/right - Task switcher shows up (a horizontal bar with app symbols). Two finger swipe - highlights an icon and shows app name. ?? - switches to highlighted app. Since the highlighting is independent of the mouse cursor, a click doesn't work here without moving the mouse cursor. But I don't want this (locate mouse cursor, move the extra mile..). Maybe Better Touch Tool allows to configure a click to act as SPACE or RETURN in the task switcher? But how did Apple intend to use this?

    Read the article

  • How to set up Mac Os X like dragging behaviour on Linux

    - by ticking
    I would like to use Linux(Fedora) on a Aluminum MacBook Pro, but since the Touchpad on a MacBook Pro is only a giant button Apple does some custom tracking. When there is one finger placed, and a second follows (the click can occur before or after that) it will be interpreted as a drag. So the strong thumb can be used to hold pressure and the more accurate index finger can do the pointing. But Linux interprets this as a right click, since it only cares if two fingers are on the pad. Is there a way to achieve said behaviour? Cheers Jan

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >