Search Results

Search found 11001 results on 441 pages for 'native drag drop'.

Page 138/441 | < Previous Page | 134 135 136 137 138 139 140 141 142 143 144 145  | Next Page >

  • Setting Anchor Point

    - by Siddharth
    I want to set anchor point for the sprite like cocos2d has done for their implementation. I do not found any thing like that in andengine so please provide guidance on that. I want to move the sprite on touch so I use following code but that does not work for me. super.setPosition(pX - this.getWidthScaled() / 2, pY - this.getHeightScaled() / 2); Because I touch on the corner of the image but automatically it comes at center of the image because of above code. I want to remain the touch at desire position and drag it. For me the anchor point became useful. But I don't found anything in andengine.

    Read the article

  • Simulating an object floating on water

    - by Aaron M
    I'm working on a top down fishing game. I want to implement some physics and collision detection regarding the boat moving around the lake. I would like for be able to implement thrust from either the main motor or trolling motor, the effect of wind on the object, and the drag of the water on the object. I've been looking at the farseer physics engine, but not having any experience using a physics engine, I am not quite sure that farseer is suitable for this type of thing(Most of the demos seem to be the application of gravity to a vertical top/down type model). Would the farseer engine be suitable? or would a different engine be more suitable?

    Read the article

  • Vancouver .NET User Group

    - by pluginbaby
    While in Vancouver for my Silverlight training in early May, I will give a free Silverlight presentation at the local .NET User Group, .netBC. When: May 5, 2010, 6:30 PM Where: Building SW3 room 1750, BCIT Burnaby Campus, 3700 Willingdon Ave, Burnaby, BC, V5G 3H2 What: Silverlight 4 Business Applications “In this session a live demo will be built to show the new features of Silverlight 4 that helps you create business-oriented applications easier than ever. Importing/exporting data, printing, drag drop target, data visualization, context menu, WCF RIA Services and design-time enhancements in Visual Studio 2010.” Read all the details here: http://www.netbc.ca/DNCal/EventDetail.aspx?date=2010/05/05 See you there!   Thanks Telerik for helping this event to happen!   Technorati Tags: Silverlight,Silverlight Training

    Read the article

  • Windows move to external monitor when closing lid

    - by Martijn
    I'm using Cinnamon (on 12.10) on a laptop (Compaq 6710b business model) with an external monitor. Both screens run at 1680 x 1050, the external monitor is located on the right. During normal operation everything works fine; windows open in whatever monitor my mouse pointer is when they open and I can freely drag them to the other monitor. When I close the lid of my laptop both displays shut down as expected. When I open the lid, however, the lock window opens on the external monitor and any windows that were open on the laptop screen have moved to the external monitor as well. Nothing happens between closing the lid and opening it; no suspend, powerdown, hibernate or anything, monitor stays attached; even mouse is untouched (pointer on laptop screen). Is there any way to fix it so my windows stay on whatever monitor I left them before closing the lid? Alternative solutions are welcome.

    Read the article

  • Internet Explorer 10 Platform Preview 2 disponible, support accru du HTML5, CSS3

    Internet Explorer 10 Platform Preview 2 disponible Support accru du HTML5, CSS3 Mise à jour du 30/06/11, par Hinault Romaric Microsoft vient de publier la seconde Platform Preview d'Internet Explorer 10, et ce moins de trois mois après la présentation de la première lors de conférence Mix 10 de Las Vegas (lire ci-avant). Cette version embarque en natif le « moteur HTML5», déjà présenté dans une démonstration sur Windows 8, qui améliore encore le support du standard avec notamment la prise en charge du HTML5 Drag-drop et la validation HTML 5 Forms. On notera également le soutien de plusieurs technologies comme le ...

    Read the article

  • How can I make the draggable window border thicker, without changing the appearance?

    - by Bruce Connor
    When you want to resize a window in gnome (as well as in other systems) you can click-and-hold at the window's border and than drag it. The problem is (and do correct me if I'm wrong here) that the draggable border is just a couple of pixels thick in gnome. That tends to be a little frustrating, and contributes to my wrist pains from using the mouse, as it requires very careful movement of the mouse. How can I change the thickness of the area I can click in order to resize a window? I don't want to increase the appearance of the window border, I'm not talking about eye candy here. I want to fine tune this functionality where I can resize a window by dragging its border. Is there a setting somewhere that will change this?

    Read the article

  • XNA RenderTarget2D Sample

    - by Michael B. McLaughlin
    I remember being scared of render targets when I first started with XNA. They seemed like weird magic and I didn’t understand them at all. There’s nothing to be frightened of, though, and they are pretty easy to learn how to use. The first thing you need to know is that when you’re drawing in XNA, you aren’t actually drawing to the screen. Instead you’re drawing to this thing called the “back buffer”. Internally, XNA maintains two sections of graphics memory. Each one is exactly the same size as the other and has all the same properties (such as surface format, whether there’s a depth buffer and/or a stencil buffer, and so on). XNA flips between these two sections of memory every update-draw cycle. So while you are drawing to one, it’s busy drawing the other one on the screen. Then the current update-draw cycle ends, it flips, and the section you were just drawing to gets drawn to the screen while the one that was being drawn to the screen before is now the one you’ll be drawing on. This is what’s meant by “double buffering”. If you drew directly to the screen, the player would see all of those draws taking place as they happened and that would look odd and not very good at all. Those two sections of graphics memory are render targets. All a render target is, is a section of graphics memory to which things can be drawn. In addition to the two that XNA maintains automatically, you can also create and set your own using RenderTarget2D and GraphicsDevice.SetRenderTarget. Using render targets lets you do all sorts of neat post-processing effects (like bloom) to make your game look cooler. It also just lets you do things like motion blur and lets you create mirrors in 3D games. There are quite a lot of things that render targets let you do. To go along with this post, I wrote up a simple sample for how to create and use a RenderTarget2D. It’s available under the terms of the Microsoft Public License and is available for download on my website here: http://www.bobtacoindustries.com/developers/utils/RenderTarget2DSample.zip . Other than the ‘using’ statements, every line is commented in detail so that it should (hopefully) be easy to follow along with and understand. If you have any questions, leave a comment here or drop me a line on Twitter. One last note. While creating the sample I came across an interesting quirk. If you start by creating a Windows Game, and then make a copy for Windows Phone 7, the drop-down that lets you choose between drawing to a WP7 device and the WP7 emulator stays grayed-out. To resolve this, you need to right click on the Windows Phone 7 version in the Solution Explorer, and choose “Set as StartUp Project”. The bar will then become active, letting you change the target you which to deploy to. If you want another version to be the one that starts up when you press F5 to start debugging, just go and right-click on that version and choose “Set as StartUp Project” for it once you’ve set the WP7 target (device or emulator) that you want.

    Read the article

  • Making a Background Scrolling in Stacking Game

    - by David Dimalanta
    Hmmm...Is it a good idea to use a LibGDX parallax background for making a stacking game (i.e. PAPA STACKer Lite)? For example, I'm starting to use the blocks to drag-n-drop it. Next, when the next piece reaches the top of the screen, it automatically scrolls to the next one where the available space left. Aside from that, is it also involved with the camera code (Orthographic Camera) that the screen size appeared like 720x1280 but actually it's 1440x2560 for example? And another thing, does the background scrolling have the option to scroll from start to finish and infinite?

    Read the article

  • CircuitLab Offers Easy Circuit Building on the Web and iPad

    - by Jason Fitzpatrick
    If you like to sketch out your circuit designs rapidly, cleanly, and on the web or your iPad, CircuitLab makes it dead simple. The free tool includes an easy drag-and-drop interface, circuit analysis, easy printing, and more. Watch the video above to see the creators of CircuitLab whipping up a simple circuit to showcase the app, then hit up the link below to try it out. CircuitLab [via Hacked Gadgets] How to Make Your Laptop Choose a Wired Connection Instead of Wireless HTG Explains: What Is Two-Factor Authentication and Should I Be Using It? HTG Explains: What Is Windows RT and What Does It Mean To Me?

    Read the article

  • SQL Server Date Comparison Functions

    - by HighAltitudeCoder
    A few months ago, I found myself working with a repetitive cursor that looped until the data had been manipulated enough times that it was finally correct.  The cursor was heavily dependent upon dates, every time requiring the earlier of two (or several) dates in one stored procedure, while requiring the later of two dates in another stored procedure. In short what I needed was a function that would allow me to perform the following evaluation: WHERE MAX(Date1, Date2) < @SomeDate The problem is, the MAX() function in SQL Server does not perform this functionality.  So, I set out to put these functions together.  They are titled: EarlierOf() and LaterOf(). /**********************************************************                               EarlierOf.sql   **********************************************************/ /**********************************************************   Return the later of two DATETIME variables.   Parameter 1: DATETIME1 Parameter 2: DATETIME2   Works for a variety of DATETIME or NULL values. Even though comparisons with NULL are actually indeterminate, we know conceptually that NULL is not earlier or later than any other date provided.   SYNTAX: SELECT dbo.EarlierOf('1/1/2000','12/1/2009') SELECT dbo.EarlierOf('2009-12-01 00:00:00.000','2009-12-01 00:00:00.521') SELECT dbo.EarlierOf('11/15/2000',NULL) SELECT dbo.EarlierOf(NULL,'1/15/2004') SELECT dbo.EarlierOf(NULL,NULL)   **********************************************************/ USE AdventureWorks GO   IF EXISTS       (SELECT *       FROM sysobjects       WHERE name = 'EarlierOf'       AND xtype = 'FN'       ) BEGIN             DROP FUNCTION EarlierOf END GO   CREATE FUNCTION EarlierOf (       @Date1                              DATETIME,       @Date2                              DATETIME )   RETURNS DATETIME   AS BEGIN       DECLARE @ReturnDate     DATETIME         IF (@Date1 IS NULL AND @Date2 IS NULL)       BEGIN             SET @ReturnDate = NULL             GOTO EndOfFunction       END         ELSE IF (@Date1 IS NULL AND @Date2 IS NOT NULL)       BEGIN             SET @ReturnDate = @Date2             GOTO EndOfFunction       END         ELSE IF (@Date1 IS NOT NULL AND @Date2 IS NULL)       BEGIN             SET @ReturnDate = @Date1             GOTO EndOfFunction       END         ELSE       BEGIN             SET @ReturnDate = @Date1             IF @Date2 < @Date1                   SET @ReturnDate = @Date2             GOTO EndOfFunction       END         EndOfFunction:       RETURN @ReturnDate   END -- End Function GO   ---- Set Permissions --GRANT SELECT ON EarlierOf TO UserRole1 --GRANT SELECT ON EarlierOf TO UserRole2 --GO                                                                                             The inverse of this function is only slightly different. /**********************************************************                               LaterOf.sql   **********************************************************/ /**********************************************************   Return the later of two DATETIME variables.   Parameter 1: DATETIME1 Parameter 2: DATETIME2   Works for a variety of DATETIME or NULL values. Even though comparisons with NULL are actually indeterminate, we know conceptually that NULL is not earlier or later than any other date provided.   SYNTAX: SELECT dbo.LaterOf('1/1/2000','12/1/2009') SELECT dbo.LaterOf('2009-12-01 00:00:00.000','2009-12-01 00:00:00.521') SELECT dbo.LaterOf('11/15/2000',NULL) SELECT dbo.LaterOf(NULL,'1/15/2004') SELECT dbo.LaterOf(NULL,NULL)   **********************************************************/ USE AdventureWorks GO   IF EXISTS       (SELECT *       FROM sysobjects       WHERE name = 'LaterOf'       AND xtype = 'FN'       ) BEGIN             DROP FUNCTION LaterOf END GO   CREATE FUNCTION LaterOf (       @Date1                              DATETIME,       @Date2                              DATETIME )   RETURNS DATETIME   AS BEGIN       DECLARE @ReturnDate     DATETIME         IF (@Date1 IS NULL AND @Date2 IS NULL)       BEGIN             SET @ReturnDate = NULL             GOTO EndOfFunction       END         ELSE IF (@Date1 IS NULL AND @Date2 IS NOT NULL)       BEGIN             SET @ReturnDate = @Date2             GOTO EndOfFunction       END         ELSE IF (@Date1 IS NOT NULL AND @Date2 IS NULL)       BEGIN             SET @ReturnDate = @Date1             GOTO EndOfFunction       END         ELSE       BEGIN             SET @ReturnDate = @Date1             IF @Date2 > @Date1                   SET @ReturnDate = @Date2             GOTO EndOfFunction       END         EndOfFunction:       RETURN @ReturnDate   END -- End Function GO   ---- Set Permissions --GRANT SELECT ON LaterOf TO UserRole1 --GRANT SELECT ON LaterOf TO UserRole2 --GO                                                                                             The interesting thing about this function is its simplicity and the built-in NULL handling functionality.  Its interesting, because it seems like something should already exist in SQL Server that does this.  From a different vantage point, if you create this functionality and it is easy to use (ideally, intuitively self-explanatory), you have made a successful contribution. Interesting is good.  Self-explanatory, or intuitive is FAR better.  Happy coding! Graeme

    Read the article

  • SQL SERVER – Finding Different ColumnName From Almost Identitical Tables

    - by pinaldave
    I have mentioned earlier on this blog that I love social media – Facebook and Twitter. I receive so many interesting questions that sometimes I wonder how come I never faced them in my real life scenario. Well, let us see one of the similar situation. Here is one of the questions which I received on my social media handle. “Pinal, I have a large database. I did not develop this database but I have inherited this database. In our database we have many tables but all the tables are in pairs. We have one archive table and one current table. Now here is interesting situation. For a while due to some reason our organization has stopped paying attention to archive data. We did not archive anything for a while. If this was not enough we  even changed the schema of current table but did not change the corresponding archive table. This is now becoming a huge huge problem. We know for sure that in current table we have added few column but we do not know which ones. Is there any way we can figure out what are the new column added in the current table and does not exist in the archive tables? We cannot use any third party tool. Would you please guide us?” Well here is the interesting example of how we can use sys.column catalogue views and get the details of the newly added column. I have previously written about EXCEPT over here which is very similar to MINUS of Oracle. In following example we are going to create two tables. One of the tables has extra column. In our resultset we will get the name of the extra column as we are comparing the catalogue view of the column name. USE AdventureWorks2012 GO CREATE TABLE ArchiveTable (ID INT, Col1 VARCHAR(10), Col2 VARCHAR(100), Col3 VARCHAR(100)); CREATE TABLE CurrentTable (ID INT, Col1 VARCHAR(10), Col2 VARCHAR(100), Col3 VARCHAR(100), ExtraCol INT); GO -- Columns in ArchiveTable but not in CurrentTable SELECT name ColumnName FROM sys.columns WHERE OBJECT_NAME(OBJECT_ID) = 'ArchiveTable' EXCEPT SELECT name ColumnName FROM sys.columns WHERE OBJECT_NAME(OBJECT_ID) = 'CurrentTable' GO -- Columns in CurrentTable but not in ArchiveTable SELECT name ColumnName FROM sys.columns WHERE OBJECT_NAME(OBJECT_ID) = 'CurrentTable' EXCEPT SELECT name ColumnName FROM sys.columns WHERE OBJECT_NAME(OBJECT_ID) = 'ArchiveTable' GO DROP TABLE ArchiveTable; DROP TABLE CurrentTable; GO The above query will return us following result. I hope this solves the problems. It is not the most elegant solution ever possible but it works. Here is the puzzle back to you – what native T-SQL solution would you have provided in this situation? Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL System Table, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • WIn API Basic Paint program

    - by Tom Burman
    Just trying to learn a bit of Win API. Im trying to make a basic drawing app, a bit like MS Paint. For the time being im trying to get one function to work which is, when you left click and drag the mouse around the screen a line is drawn behind the mouse. Heres what i have so far, but for some reason: 1) the line starts drawing straight away rather then waiting for the left click 2) the line isn't solid its very dotty. case WM_MOUSEMOVE: { if(MK_LBUTTON){ hdc = GetDC(hwnd); hPen = CreatePen(PS_SOLID,5,RGB(0, 0, 255)); SelectObject(hdc, hPen); int x = LOWORD(lParam); int y = HIWORD(lParam); MoveToEx(hdc,x,y,NULL); LineTo(hdc, LOWORD(lParam), HIWORD(lParam)); ReleaseDC(hwnd,hdc); } else break; } } Thanks for any help!

    Read the article

  • Enchanted Swing in the Forest Wallpaper

    - by Asian Angel
    Magic [DesktopNexus] Latest Features How-To Geek ETC How To Make Hundreds of Complex Photo Edits in Seconds With Photoshop Actions How to Enable User-Specific Wireless Networks in Windows 7 How to Use Google Chrome as Your Default PDF Reader (the Easy Way) How To Remove People and Objects From Photographs In Photoshop Ask How-To Geek: How Can I Monitor My Bandwidth Usage? Internet Explorer 9 RC Now Available: Here’s the Most Interesting New Stuff Never Call Me at Work [Humorous Star Wars Video] Add an Image Properties Listing to the Context Menu in Chrome and Iron Add an Easy to View Notification Badge to Tabs in Firefox SpellBook Parks Bookmarklets in Chrome’s Context Menu Drag2Up Brings Multi-Source Drag and Drop Uploading to Firefox Enchanted Swing in the Forest Wallpaper

    Read the article

  • How likely are IE9 jumplists to be useful?

    - by Grant Palin
    Having installed the Internet Explorer 9 release, I've experimented with the jumplists feature available in Windows 7 - drag a site tab down to the taskbar to create a jumplist. Works for Facebook and Twitter, anyway. I have my suspicions about the utility of this feature - it's a neat and possibly useful feature, yet is limited to the combination of IE9 and Windows 7, plus sites implementing the appropriate code. Given the relatively small audience at this point, is there any value in adding code to support this feature? And would it likely be more useful for a web application (e.g. Twitter, Facebook) than a typical website?

    Read the article

  • Why is there no service-oriented language?

    - by Wolfgang
    Edit: To avoid further confusion: I am not talking about web services and such. I am talking about structuring applications internally, it's not about how computers communicate. It's about programming languages, compilers and how the imperative programming paradigm is extended. Original: In the imperative programming field, we saw two paradigms in the past 20 years (or more): object-oriented (OO), and service-oriented (SO) aka. component-based (CB). Both paradigms extend the imperative programming paradigm by introducing their own notion of modules. OO calls them objects (and classes) and lets them encapsulates both data (fields) and procedures (methods) together. SO, in contrast, separates data (records, beans, ...) from code (components, services). However, only OO has programming languages which natively support its paradigm: Smalltalk, C++, Java and all other JVM-compatibles, C# and all other .NET-compatibles, Python etc. SO has no such native language. It only comes into existence on top of procedural languages or OO languages: COM/DCOM (binary, C, C++), CORBA, EJB, Spring, Guice (all Java), ... These SO frameworks clearly suffer from the missing native language support of their concepts. They start using OO classes to represent services and records. This leads to designs where there is a clear distinction between classes that have methods only (services) and those that have fields only (records). Inheritance between services or records is then simulated by inheritance of classes. Technically, its not kept so strictly but in general programmers are adviced to make classes to play only one of the two roles. They use additional, external languages to represent the missing parts: IDL's, XML configurations, Annotations in Java code, or even embedded DSL like in Guice. This is especially needed, but not limited to, since the composition of services is not part of the service code itself. In OO, objects create other objects so there is no need for such facilities but for SO there is because services don't instantiate or configure other services. They establish an inner-platform effect on top of OO (early EJB, CORBA) where the programmer has to write all the code that is needed to "drive" SO. Classes represent only a part of the nature of a service and lots of classes have to be written to form a service together. All that boiler plate is necessary because there is no SO compiler which would do it for the programmer. This is just like some people did it in C for OO when there was no C++. You just pass the record which holds the data of the object as a first parameter to the procedure which is the method. In a OO language this parameter is implicit and the compiler produces all the code that we need for virtual functions etc. For SO, this is clearly missing. Especially the newer frameworks extensively use AOP or introspection to add the missing parts to a OO language. This doesn't bring the necessary language expressiveness but avoids the boiler platform code described in the previous point. Some frameworks use code generation to produce the boiler plate code. Configuration files in XML or annotations in OO code is the source of information for this. Not all of the phenomena that I mentioned above can be attributed to SO but I hope it clearly shows that there is a need for a SO language. Since this paradigm is so popular: why isn't there one? Or maybe there are some academic ones but at least the industry doesn't use one.

    Read the article

  • Uploading or attaching files that located on a shared drive doesn't work?

    - by Alex
    I have this odd, quite minor, but annoying issue that I am quite perplexed about. Whenever I try to upload a file via my browser(let's say attach a file to an email in GMail), I click 'Browse' button and it opens standard file selection dialog, that doesn't show network drives. Further more if I try to drag a file from a network drive into GMail, it doesn't work either, it just doesn't let me do that. This issue has been around for quite sometime now, and I am just curious if this is something on my side or if it's a bug or a misconfiguration of some sort. FWIW, I am currently running 10.10, network drive is a samba share on NAS. This happens in FF and Chrome and this is only happens with Samba mounts. As a matter of fact, NFS volumes that are located on the same network operate perfectly fine.

    Read the article

  • Resources on concepts/theory behind GUI development?

    - by ShrimpCrackers
    I was wondering if there were any resources that explain concepts/theory behind GUI development. I don't mean a resource that explains how to use a GUI library, but rather how to create your own widgets. For example a resource that explains different methods on how to implement scrollable listboxes. I ask because I have an idea for a game tool where I would like to create my own widgets and let users drag and drop them onto some kind of form. How do GUI libraries usually draw widgets? I'm not sure if reskinning widgets from a GUI library fits my needs, since widget behavior needs to be dynamic based on user interaction.

    Read the article

  • When clicking below window title bar in KDE, window dragging is initiated. Can I change this behavior?

    - by hdpq
    this one is regarding KDE in Ubuntu 12.04. The thing is that whenever I click below the window title bar in KDE, the window manager always assumes I want to drag the window, not just activate it. Clicking the title bar activates the window without dragging it just fine, however I sometimes find it hard to click because it's rather narrow :) Is there any way to change this behavior (besides the obvious "make your title bar larger" thing)? I also assume this is happening to Gtk applications only (Firefox, Thunderbird, Synaptic), as I have tried it with several KDE apps (KWrite, KTorrent, Gwenview, Konsole) and noticed no such behavior. Thanks in advance!

    Read the article

  • Lost the system tray-bar and side panel dockbar disappears when touched

    - by defaye
    I have complete confidence that this problem will be resolved by restarting, however, it seems very odd that it should disappear randomly during my session. To put it simply, I've lost the top tray-bar and the side panel disappears when the mouse moves within touch, however if it click and drag the window by the side it comes back (but disappears instantly when touched again (however I can still click on the buttons where they should be). The only guess I have as to why it's happened is a bug, or I've lost a file these GUI things depend on. This is a real pain as some applications now have lost the "File, Edit" menu items as a result of this.

    Read the article

  • Is the "App" side of Windows 8 practical for programmers?

    - by jt0dd
    I like the tablet-friendliness of Windows 8 Apps, and some of the programming apps seem pretty neat, but there are many aspects that make me think I would have difficulty using this format for an efficient programming environment: Unlike the desktop + multiple windows setup, I can't simply drag my files around from source, to FTP or SFTP file managers, between folders, web applications, and into other apps, etc. I can't switch between apps as fast. This could have different implications with different monitor setups, but it seems like a shaky setup for an agile workflow. The split screen functionality is cool, but it doesn't seem to allow for as much maneuverability as the classic desktop setup. This could just require me getting used to the top-left corner shortcut, but it does bother me that I have to move my mouse all the way up there to see my different windows. These aspects could become relevant in the event that Windows were to move further towards their "app" structure and less towards the Windows 7 style. I'm wondering if anyone has been able to utilize the "App" side of Windows 8 for an efficient programming workflow.

    Read the article

  • How to copy a part of a link in google chrome?

    - by Mikhail Morfikov
    Is there a way to copy a part of text of a link which is located on a website in google chrome browser? For instance: If we see a link on a website, and we hover mouse on it, we can click on it, but we can also highlight it if we press left mouse button and drag mouse pointer starting from either the beginning or the end of the link. But what if we have a link -- http://sourceforge.net/ , and we want to copy only the word "forge"? Remember that this is not the same as copying from the address bar in google chrome browser.

    Read the article

  • Android Bitmap : collision Detecting [on hold]

    - by user2505374
    I am writing an Android game right now and I would need some help in the collision of the wall on screen. When I drag the ball in the top and right it able to collide in wall but when I drag it faster it was able to overlap in the wall. public boolean onTouchEvent(MotionEvent event) { int x = (int) event.getX(); int y = (int) event.getY(); switch (event.getAction()) { // if the player moves case MotionEvent.ACTION_MOVE: { if (playerTouchRect.contains(x, y)) { boolean left = false; boolean right = false; boolean up = false; boolean down = false; boolean canMove = false; boolean foundFinish = false; if (x != pLastXPos) { if (x < pLastXPos) { left = true; } else { right = true; } pLastXPos = x; } if (y != pLastYPos) { if (y < pLastYPos) { up = true; } else { down = true; } pLastYPos = y; } plCellRect = getRectFromPos(x, y); newplRect.set(playerRect); newplRect.left = x - (int) (playerRect.width() / 2); newplRect.right = x + (int) (playerRect.width() / 2); newplRect.top = y - (int) (playerRect.height() / 2); newplRect.bottom = y + (int) (playerRect.height() / 2); int currentRow = 0; int currentCol = 0; currentRow = getRowFromYPos(newplRect.top); currentCol = getColFromXPos(newplRect.right); if(!canMove){ canMove = mapManager.getCurrentTile().pMaze[currentRow][currentCol] == Cell.wall; canMove =true; } finishTest = mapManager.getCurrentTile().pMaze[currentRow][currentCol]; foundA = finishTest == Cell.valueOf(letterNotGet + ""); canMove = mapManager.getCurrentTile().pMaze[currentRow][currentCol] != Cell.wall; canMove = (finishTest == Cell.floor || finishTest == Cell.pl) && canMove; if (canMove) { invalidate(); setTitle(); } if (foundA) { mapManager.getCurrentTile().pMaze[currentRow][currentCol] = Cell.floor; // finishTest letterGotten.add(letterNotGet); playCurrentLetter(); /*sounds.play(sExplosion, 1.0f, 1.0f, 0, 0, 1.5f);*/ foundS = letterNotGet == 's'; letterNotGet++; }if(foundS){ AlertDialog.Builder builder = new AlertDialog.Builder(mainActivity); builder.setTitle(mainActivity.getText(R.string.finished_title)); LayoutInflater inflater = mainActivity.getLayoutInflater(); View view = inflater.inflate(R.layout.finish, null); builder.setView(view); View closeButton =view.findViewById(R.id.closeGame); closeButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View clicked) { if(clicked.getId() == R.id.closeGame) { mainActivity.finish(); } } }); AlertDialog finishDialog = builder.create(); finishDialog.show(); } else { Log.d(TAG, "INFO: updated player position"); playerRect.set(newplRect); setTouchZone(); updatePlayerCell(); } } // end of (CASE) if playerTouch break; } // end of (SWITCH) Case motion }//end of Switch return true; }//end of TouchEvent private void finish() { // TODO Auto-generated method stub } public int getColFromXPos(int xPos) { val = xPos / (pvWidth / mapManager.getCurrentTile().pCols); if (val == mapManager.getCurrentTile().pCols) { val = mapManager.getCurrentTile().pCols - 1; } return val; } /** * Given a y pixel position, return the row of the cell it is in This is * used when determining the type of adjacent Cells. * * @param yPos * y position in pixels * @return The cell this position is in */ public int getRowFromYPos(int yPos) { val = yPos / (pvHeight / mapManager.getCurrentTile().pRows); if (val == mapManager.getCurrentTile().pRows) { val = mapManager.getCurrentTile().pRows - 1; } return val; } /** * When preserving the position we need to know which cell the player is in, * so calculate it from the centre on its Rect */ public void updatePlayerCell() { plCell.x = (playerRect.left + (playerRect.width() / 2)) / (pvWidth / mapManager.getCurrentTile().pCols); plCell.y = (playerRect.top + (playerRect.height() / 2)) / (pvHeight / mapManager.getCurrentTile().pRows); if (mapManager.getCurrentTile().pMaze[plCell.y][plCell.x] == Cell.floor) { for (int row = 0; row < mapManager.getCurrentTile().pRows; row++) { for (int col = 0; col < mapManager.getCurrentTile().pCols; col++) { if (mapManager.getCurrentTile().pMaze[row][col] == Cell.pl) { mapManager.getCurrentTile().pMaze[row][col] = Cell.floor; break; } } } mapManager.getCurrentTile().pMaze[plCell.y][plCell.x] = Cell.pl; } } public Rect getRectFromPos(int x, int y) { calcCell.left = ((x / cellWidth) + 0) * cellWidth; calcCell.right = calcCell.left + cellWidth; calcCell.top = ((y / cellHeight) + 0) * cellHeight; calcCell.bottom = calcCell.top + cellHeight; Log.d(TAG, "Rect: " + calcCell + " Player: " + playerRect); return calcCell; } public void setPlayerRect(Rect newplRect) { playerRect.set(newplRect); } private void setTouchZone() { playerTouchRect.set( playerRect.left - playerRect.width() / TOUCH_ZONE, playerRect.top - playerRect.height() / TOUCH_ZONE, playerRect.right + playerRect.width() / TOUCH_ZONE, playerRect.bottom + playerRect.height() / TOUCH_ZONE); } public Rect getPlayerRect() { return playerRect; } public Point getPlayerCell() { return plCell; } public void setPlayerCell(Point cell) { plCell = cell; }

    Read the article

  • Personalize your Experience with the Oracle Partner Store

    - by Kristin Rose
    Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} "Any sufficiently advanced technology is indistinguishable from magic." - Arthur C. Clarke So it may not be magic, but it’s definitely close!  Partners can now personalize their experience with the Oracle Partner Store and control what and who receives notifications. Let’s take a look at the MyOPS tab in Partner Store and explore more: Under “My Account” select Personal Information.  In the additional Email Addresses box, you can add in email addresses, including distribution lists that you want to be copied for every OPS notification that you receive. If you select Preferences in the drop-down you set the following options: What language you want to receive alerts in Whether or not you want to receive order confirmation and order booked alerts Your default installation country and currency Your default support offering and duration when you add items to the cart Other preferences you can select from the drop down include: Bill to Addresses Ship to Addresses Preferred Bill to/ Ship to Company information Credit Cards Please note that these settings will only affect your account in the Oracle Partner Store – they will not affect other users from your company.  For more information please refer to our training page. So take a moment to set up the Partner Store to meet your needs and save you some time. Abracadabra, Simon Davis Senior Director WW A&C Quote To Order Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

    Read the article

  • Curiosity on any Smartphones that Run on Android 2.3.3 with Different Screen Reoslution

    - by David Dimalanta
    I have a question regarding about any smartphones that run only in Android 2.3.3. Is the size of screen or the screen resolution is always HVGA or does it have capable of running this OS (Android 2.3.3) on big screen size (4" to 5") at about 720x1280? I'm thinking of the game's compatibility depending on the version of the Android OS and the screen resolution, which affects the change of coordinates especially for assigning touch buttons and drag-n-drop at exact location, before I'm gonna decide to make one. My program works on the Android 4 ICS and Jellybean, however, will that work on Android 2.3.3 in spite of precise touch coordinate or just dependent on the screen resolution (regardless how large it is) as the X and Y coordinate? And take note, I'm using Eclipse IDE for Java developers.

    Read the article

  • Guaranteed Restore Points as Fallback Method

    - by Mike Dietrich
    Thanks to the great audience yesterday in the Upgrade & Migration Workshop in Utrecht. That was really fun and I was amazed by our new facilities (and the  "wellness" lights surrounding the plenum room's walls). And another reason why I like to do these workshops is that often I learn new things from you So credits here to Rick van  Ek who has highlighted the following topic to me. Yesterday (and in some previous workshops) I did mention during the discussion about Fallback Strategies that you'll have to switch on Flashback Database beforehand to create a guaranteed restore point in case you'll encounter an issue during the database upgrade. I knew that we've made it possible since Oracle Database 11.2 to switch Flashback Database on without taking the database into MOUNT status (you could switch it off anyway while the database is open before in all releases). But before Oracle Database 11.2 that did require MOUNT status. SQL> create restore point rp1 guarantee flashback database ; create restore point rp1 guarantee flashback database * ERROR at line 1: ORA-38784: Cannot create restore point 'RP1'. ORA-38787: Creating the first guaranteed restore point requires mount mode when flashback database is off. But Rick did mention that I won't need to switch Flashback Database On to create a guaranteed restore point. And he's right - in older releases I would have had to go into MOUNT state to define the restore point which meant to restart the database. But in 11.2 that's no necessary anymore. And the same will apply when you upgrade your pre-11.2 database (e.g. an Oracle Database 10.2.0.4) to Oracle Database 11.2. As soon as you start your "old" not-yet-upgraded database in your 11.2 environment with STARTUP UPGRADE you can define a guaranteed restore point. If you tail the alert.log you'll see that the database will start the RVWR (Recovery Writer) background process - you'll just have to make sure that you'd define the values for db_recovery_file_dest_size and db_recovery_file_dest. SQL> startup upgrade ORACLE instance started. Total System Global Area  417546240 bytes Fixed Size                  2228944 bytes Variable Size             134221104 bytes Database Buffers          272629760 bytes Redo Buffers                8466432 bytes Database mounted. Database opened. SQL> create restore point grpt guarantee flashback database; Restore point created.SQL> drop restore point grpt; And don't forget to drop that restore point the sooner or later as it is guaranteed - and will fill up your Fast Recovery Area pretty quickly Just on the side: in any case archivelog mode is required if you'd like to work with restore points. - Mike

    Read the article

< Previous Page | 134 135 136 137 138 139 140 141 142 143 144 145  | Next Page >