Search Results

Search found 312 results on 13 pages for 'invalidate'.

Page 5/13 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Does mprotect flush the instruction cache on ARM Linux?

    - by Adam Goode
    I am writing a JIT on ARM Linux that executes an instruction set that contains self-modifying code. The instruction set does not have any cache flush instructions (similar to x86 in that respect). If I write out some code to a page and then call mprotect on that page, is that sufficient to invalidate the instruction cache? Or do I also need to use the cacheflush syscall on those pages?

    Read the article

  • drag to pan on an UserControl

    - by Matías
    Hello, I'm trying to build my own "PictureBox like" control adding some functionalities. For example, I want to be able to pan over a big image by simply clicking and dragging with the mouse. The problem seems to be on my OnMouseMove method. If I use the following code I get the drag speed and precision I want, but of course, when I release the mouse button and try to drag again the image is restored to its original position. using System.Drawing; using System.Windows.Forms; namespace Testing { public partial class ScrollablePictureBox : UserControl { private Image image; private bool centerImage; public Image Image { get { return image; } set { image = value; Invalidate(); } } public bool CenterImage { get { return centerImage; } set { centerImage = value; Invalidate(); } } public ScrollablePictureBox() { InitializeComponent(); SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true); Image = null; AutoScroll = true; AutoScrollMinSize = new Size(0, 0); } private Point clickPosition; private Point scrollPosition; protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); clickPosition.X = e.X; clickPosition.Y = e.Y; } protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (e.Button == MouseButtons.Left) { scrollPosition.X = clickPosition.X - e.X; scrollPosition.Y = clickPosition.Y - e.Y; AutoScrollPosition = scrollPosition; } } protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); e.Graphics.FillRectangle(new Pen(BackColor).Brush, 0, 0, e.ClipRectangle.Width, e.ClipRectangle.Height); if (Image == null) return; int centeredX = AutoScrollPosition.X; int centeredY = AutoScrollPosition.Y; if (CenterImage) { //Something not relevant } AutoScrollMinSize = new Size(Image.Width, Image.Height); e.Graphics.DrawImage(Image, new RectangleF(centeredX, centeredY, Image.Width, Image.Height)); } } } But if I modify my OnMouseMove method to look like this: protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (e.Button == MouseButtons.Left) { scrollPosition.X += clickPosition.X - e.X; scrollPosition.Y += clickPosition.Y - e.Y; AutoScrollPosition = scrollPosition; } } ... you will see that the dragging is not smooth as before, and sometimes behaves weird (like with lag or something). What am I doing wrong? I've also tried removing all "base" calls on a desperate movement to solve this issue, haha, but again, it didn't work. Thanks for your time.

    Read the article

  • Invalidating the HTTP Cache on read only front servers

    - by Microserf
    We have a CMS system and in the production mode a number of servers only have read-only access to the content (with a few exceptions) and the editors for the site work on the content on servers behind it (which are not available to the public). We're caching the content quite a long time on the front servers, but sometimes we want the content the editors publish to be available for visitors instantly. What would the best way be to invalidate the cache in this situation, should we trigger it from our code?

    Read the article

  • Frequent error in Oracle ORA-04068: existing state of packages has been discarded

    - by martilyo
    Hi, We're getting this error once a day on a script that runs every two hours, but at different times of the day. ERROR at line 1: ORA-04068: existing state of packages has been discarded ORA-04061: existing state of package body "PACKAGE.NAME" has been invalidated ORA-06508: PL/SQL: could not find program unit being called: "PACKAGE.NAME" ORA-06512: at line 1 Could someone list what conditions can cause this error so that we could investigate? Thanks. UPDATE: Would executing 'ALTER SESSION CLOSE DATABASE LINK DBLINK' invalidate a state of the package?

    Read the article

  • How to clear an ImageView in Android?

    - by Pentium10
    I am resusing ImageViews for my displays, but at some point I don't have values to put it. So how to clear an ImageView in Android? I've tried: mPhotoView.invalidate(); mPhotoView.setImageBitmap(null); None of them have cleared the view, it still shows previous image.

    Read the article

  • Can processor cores thrash each other's caches?

    - by Jørgen Fogh
    If more than one core on a processor is accessing the same memory address, will they thrash each other's caches or will some snooping protocol allow each to keep the data in L1-cache? I am interested in a general answer as well as answers for specific processors. How many layers of cache are invalidated? Will accessing another address within the same cache-line invalidate the entire line? What can you do to alleviate these problems?

    Read the article

  • How to set background color of a View

    - by Peter vdL
    I'm trying to set the background color of a View (in this case a Button). I use this code: // set the background to green v.setBackgroundColor(0x0000FF00 ); v.invalidate(); It causes the Button to disappear from the screen. What am I doing wrong, and what is the correct way to change the background color on any View? Thanks.

    Read the article

  • Cache like stackoverflow

    - by Deumber
    I'm creating a ASP.NET MVC 2 application that envolve a section like questions here in stackoverflow (mine is with exams is another kind of application but can be extrapolate to same general idea of SO). OK I'm creating a cache per page, its mean something like this: [OutputCache(Duration=60, VaryByParam="page")] ActionResult AllQuestions(int page){...} But i want to invalidate that cache when a new question is created. What can i do. I'm open to suggestions, perhaps this is not the best way to solve this problem

    Read the article

  • List Box Update Issue

    - by Gaddigesh
    I have a ListBox of constant size 4 I can Add n number of ListBoxItems,Once size exceeds 4 I have enabled scroll bar, Problem:when scroll is enabled(more than 4 items), whenever i delete last item, there is a white patch in place of deleted Item. Patch goes off only when I touch the scroll bar. I tried ListBox.Invalidate(), But no use

    Read the article

  • Hibernate Distributed Cache

    - by DD
    Hi, I'm looking to setup Hibernate with distributed cache where I have one application writing to the DB and another one reading from the DB. Is there an easy way to notify the reading application when the writing one has written through Hibernate? The distributed cache will invalidate the cache but I need the reading application to know a change has been made to refresh its data immediately. Thanks, D

    Read the article

  • C# drawing and invalidating 2 lines to meet

    - by BlueMonster
    If i have 2 lines on a page as such: e.Graphics.DrawLine(blackPen, w, h, h, w); e.Graphics.DrawLine(blackPen, w2, h2, h2, w2); how would i animate the first line to reach the second line's position? I have the following method which calculates the distance between two points (i'm assuming i would use this?) public int Distance2D(int x1, int y1, int x2, int y2) { // ______________________ //d = &#8730; (x2-x1)^2 + (y2-y1)^2 // //Our end result int result = 0; //Take x2-x1, then square it double part1 = Math.Pow((x2 - x1), 2); //Take y2-y1, then sqaure it double part2 = Math.Pow((y2 - y1), 2); //Add both of the parts together double underRadical = part1 + part2; //Get the square root of the parts result = (int)Math.Sqrt(underRadical); //Return our result return result; } How would i re-draw the line (on a timer) to reach the second line's position? I've looked a lot into XAML (story-boarding) and such - but i want to know how to do this on my own. Any ideas? I know i would need a method which runs in a loop re-drawing the line after moving the position a tid bit. I would have to call Invalidate() in order to make the line appear as though it's moving... but how would i do this? how would i move that line slowly over to the other line? I'm pretty sure i'd have to use double buffering if i'm doing this as well... as such: SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true); This doesn't quiet work, i'm not quiet sure how to fix it. Any ideas? protected override void OnPaint(PaintEventArgs e) { Distance2D(w, h, w2, h2); if (w2 != w && h2 != h) { e.Graphics.DrawLine(blackPen, (w * (int)frame), (h * (int)frame), (h * (int)frame), (w * (int)frame)); e.Graphics.DrawLine(blackPen, w2, h2, h2, w2); } else { t.Abort(); } base.OnPaint(e); } public void MoveLine() { for (int i = 0; i < 126; i++) { frame += .02; Invalidate(); Thread.Sleep(30); } } private void button1_Click(object sender, EventArgs e) { t = new Thread(new ThreadStart(MoveLine)); t.Start(); }

    Read the article

  • How can I have a Foo* iterator to a vector of Foo?

    - by mghie
    If I have a class that contains a std::list<Foo>, how can I implement iterators to a Foo* collection, preferably without using boost? I'd rather not maintain a parallel collection of pointers. For now I have std::list<Foo>, mostly so that removing or inserting an element does not invalidate all other iterators, but would it be possible to implement other iterators too, so that the collection type used in the implementation is opaque to the user of the class?

    Read the article

  • Changing the height of an existing, visible TextView

    - by Jim Blackler
    Hi I'd like to programatically increase the height allocated to a TextView, and have the activity layout redrawn accordingly (the text view has a maximum height until the user clicks it, then it takes up all height required, wrap_content). setHeight() isn't working, even coupled with invalidate() or postInvalidate(). I am able to change the contents of the TextBox with setText() but it isn't altering the existing specified height. Android 1.5 under the 1.6 SDK.

    Read the article

  • Invalidating unused ssh keys

    - by JH
    I am using one ssh account for all my Subversion users. They send me their public keys and I put them in .ssh/authorized_key of the svn account, then they can check out the code from Subversion using ssh tunnel. So far everything works fine. The problem though is that I want to invalidate keys that have not been used for some time (say one month). Does anyone know a way to make sshd log the public key when a user signs in? Thanks.

    Read the article

  • VSS error 12293 after system disk clone (Win2003)

    - by carlpett
    Hi! After cloning a windows 2003 installation from a single drive onto two mirrored drives using Acronis Disk Director, VSS no longer works, filing events 12293 and 7001 when trying to use backup tools, and additionally giving error 0x8004230f when accessing the Shadow copy tab of disk properties. I've google-researched this quite throughly, and found a suggested fix[1]: replacing the MBR signature of the disk. This would cause windows to invalidate old shadow copy information, which supposedly would make it all work again. However, I am a bit nervous over this... Is there a possiblity of messing this up somehow, because of the mbr originating from a single disk install, and now residing on a raid mirror? Has anyone here had this problem and solved it? This method or another? [1] http://kb.backupassist.com/articles.php?aid=2971 (under header Resolution 2)

    Read the article

  • Login without running bash_profile or bashrc

    - by Tom Ritter
    So let's say one typoed something in their .bashrc that prevents him (or her) from logging in via ssh (i.e. the ssh login exits because of the error in the file). Is there any way that person could login without executing it (or .bashrc since the one runs the other), or otherwise delete/rename/invalidate the file? Suppose you don't have physical access to the machine, and this is the only user account with the ability to ssh in. For Reference: .bash_profile includes .bashrc: [[ -f ~/.bashrc ]] && . ~/.bashrc Edit: Things I have tried: ssh user@host "rm ~/.bashrc" scp nothing user@host:/RAID/home/tom/.bashrc ssh user@host "/bin/bash --norc" All give the error: /RAID/home/tom/.bashrc: line 16: /usr/local/bin/file: No such file or directory /RAID/home/tom/.bashrc: line 16: exec: /usr/local/bin/file: cannot execute: No such file or directory

    Read the article

  • How to rename a BTRFS subvolume?

    - by hochl
    I have a BTRFS filesystem with a set of subvolumes in it. So far so good. I need to change the name of a subvolume, unfortunately the btrfs program does not allow me to rename a subvolume. Searching with Google has yielded some results, one said I can just mv, the other said I can just snapshot to a new name and delete the old subvolume. Before I crash my partition and have to reload it from the backup (it's quite large), my question is: What is the currently best way to rename a subvolume? Is it ok to just mv it, or will it invalidate some internal structures? Is making a new snapshot and removing the old subvolume the way to go, or has this some drawbacks? I know everything is still experimental, but for my purposes it has been working quite well (so far, and I have incremental backups for each day).

    Read the article

  • Can I tell which installation DVD was used for my Windows XP?

    - by Den
    I have two Windows XP installation DVDs (that came from the OEM with my two laptops). I need to reinstall Windows on one of them but I'm not sure which one is which. Is there any way to tell which DVD was used for each laptop? PS. They both came from the same OEM and there're no distinguishing markings on the DVDs themselves. PS2. The reason for my concern is to avoid installation twice, which may invalidate license for already installed Windows XP on one laptop if I duplicate it to another.

    Read the article

  • Edge Detection on Screen

    - by user2056745
    I have a edge collision problem with a simple game that i am developing. Its about throwing a coin across the screen. I am using the code below to detect edge collisions so i can make the coin bounce from the edges of the screen. Everything works as i want except one case. When the coin hits left edge and goes to right edge the system doesnt detect the collision. The rest cases are working perfectly, like hitting the right edge first and then the left edge. Can someone suggest a solution for it? public void onMove(float dx, float dy) { coinX += dx; coinY += dy; if (coinX > rightBorder) { coinX = ((rightBorder - coinX) / 3) + rightBorder; } if (coinX < leftBorder) { coinX = -(coinX) / 3; } if (coinY > bottomBorder) { coinY = ((bottomBorder - coinY) / 3) + bottomBorder; } invalidate(); }

    Read the article

  • Tyrus 1.3

    - by Pavel Bucek
    I’m pleased to announce that new version of Tyrus was released today. It contains some interesting features, like asynchronous handling of connectToServer method call, optimised broadcast support and lots of stability and performance improvements. As previously – I will follow with more blog posts about selected features later. Some of them are already described in updated User guide. Complete list of bugfixes and new featuresTYRUS-262: @OnOpen fails for programmatically deployed annotated endpoint.TYRUS-261: Text decoder disables Binary decoder if both are configured for the same server endpoint; endpoint cannot receive binary messages anymore.TYRUS-248: Consolidate Extension representationTYRUS-258: Tyrus always creates HTTP sessionTYRUS-251: DecodeException is not passed to @OnError methodTYRUS-252: encoder for primitive types cannot be overridden.TYRUS-250: Sec-WebSocket-Protocol header cannot be present when there is no negotiated subprotocolTYRUS-249: WebSocketContainer MaxSessionIdleTimeout is not propagated to Session (server side)TYRUS-257: Async timeout value set on WebSocketContainer is not propagated to RemoteEndpoints (Session#getAsyncRemote())TYRUS-253: DecodeException is not passed to @OnError method from session.getAsyncRemote().sendObjectTYRUS-243: WebSocketContainer.connectToServer can block for secondsTYRUS-227: Build failure : AsyncBinaryTestTYRUS-226: Tyrus build error : OnCloseTestTYRUS-247: Make all samples use TestContainer for testsTYRUS-238: Refactor WebSocketEngine (SPI and Impl)TYRUS-157: Submitting tasks to an injected ManagedExecutorService in a ServerEndpoint does not workTYRUS-137: Improve subprotocols/extensions headers parsingTYRUS-133: Some Broadcast(er) API is needed in order to opmtimize chat-like usecasesTYRUS-245: ServerEndpointConfig#getConfiigurator returns Configurator not used when getNegotiatedExtensions has been called.TYRUS-240: clean up duplicated static fields (strings)TYRUS-230: When Session is invalidated, the close reason is not 1006TYRUS-190: Remove TyrusServetServerContainer (merge with TyrusServerContainer)TYRUS-65: Implement common utilities for testingTYRUS-242: Tyrus does not run on JDK8 compact2 profileTYRUS-237: RemoteEndpoint.Async#sendBinary does not throw IllegalArgumentException when data is nullTYRUS-239: Improve WebSocketEngine ByteBuffer handlingTYRUS-232: Refactor grizzly/servlet container – Tyrus-SPITYRUS-235: Fix findbugs errors in tests/servletTYRUS-234: Remove support for older protocol versionTYRUS-229: Session#setMaxIdleTimeout() will kill the session whether or not the session actually timed outTYRUS-225: Invalidation of (Servlet) HttpSession does not invalidate WebSocket SessionTYRUS-153: Static map in TyrusRemotEndpointTYRUS-201: Wrong ServletInputStream#isReady() usage in TyrusHttpUpgradeHandlerTYRUS-224: Refactor Connection#write and ConnectionImpl to use CompletionHandler only (no Future)TYRUS-221: wss:// doesn’t appear to function correctly via a http proxy.TYRUS-146: Support request from client to secured services (“wss”)TYRUS-223: Message can be writen multiple times when running on Servlet container TYRUS-71: ErroCollector not properly used in AnnotatedEndpoint class. Tyrus 1.3 will be integrated in Glassfish trunk soon – you can download nightly build or upgrade to newer Tyrus manually (replace all Tyrus jars).

    Read the article

  • DAO/Webservice Consumption in Web Application

    - by Gavin
    I am currently working on converting a "legacy" web-based (Coldfusion) application from single data source (MSSQL database) to multi-tier OOP. In my current system there is a read/write database with all the usual stuff and additional "read-only" databases that are exported daily/hourly from an Enterprise Resource Planning (ERP) system by SSIS jobs with business product/item and manufacturing/SCM planning data. The reason I have the opportunity and need to convert to multi-tier OOP is a newer more modern ERP system is being implemented business wide that will be a complete replacement. This newer ERP system offers several interfaces for third party applications like mine, from direct SQL access to either a dotNet web-service or a SOAP-like web-service. I have found several suitable frameworks I would be happy to use (Coldspring, FW/1) but I am not sure what design patterns apply to my data access object/component and how to manage the connection/session tokens, with this background, my question has the following three parts: Firstly I have concerns with moving from the relative safety of a SSIS job that protects me from downtime and speed of the ERP system to directly connecting with one of the web services which I note seem significantly slower than I expected (simple/small requests often take up to a whole second). Are there any design patterns I can investigate/use to cache/protect my data tier? It is my understanding data access objects (the component that connects directly with the web services and convert them into the data types I can then work with in my Domain Objects) should be singletons (and will act as an Adapter/Facade), am I correct? As part of the data access object I have to setup a connection by username/password (I could set up multiple users and/or connect multiple times with this) which responds with a session token that needs to be provided on every subsequent request. Do I do this once and share it across the whole application, do I setup a new "connection" for every user of my application and keep the token in their session scope (might quickly hit licensing limits), do I set the "connection" up per page request, or is there a design pattern I am missing that can manage multiple "connections" where a requests/access uses the first free "connection"? It is worth noting if the ERP system dies I will need to reset/invalidate all the connections and start from scratch, and depending on which web-service I use might need manually close the "connection/session"

    Read the article

  • Rotate canvas along its center based on user touch - Android

    - by Ganapathy
    I want to rotate the canvas circularly on its center axis based on user touch. i want to rotate based on center but its rotating based on top left corner . so i am able to see only 1/4 for rotation of image. any idea.. Like a old phone dialer . I have tried like as follows onDraw(Canvas canvas){ canvas.save(); // do my rotation canvas.rotate(rotation,0,0); canvas.drawBitmap( ((BitmapDrawable)d).getBitmap(),0,0,p ); canvas.restore(); } @Override public boolean onTouchEvent(MotionEvent e) { float x = e.getX(); float y = e.getY(); updateRotation(x,y); mPreviousX = x; mPreviousY = y; invalidate(); } private void updateRotation(float x, float y) { double r = Math.atan2(x - centerX, centerY - y); rotation = (int) Math.toDegrees(r); }

    Read the article

  • How do I clip an image in OpenGL ES on Android?

    - by Maxim Shoustin
    My game involves "wiping off" an image by touch: After moving a finger over it, it looks like this: At the moment, I'm implementing it with Canvas, like this: 9Paint pTouch; 9int X = 100; 9int Y = 100; 9Bitmap overlay; 9Canvas c2; 9Rect dest; pTouch = new Paint(Paint.ANTI_ALIAS_FLAG); pTouch.setXfermode(new PorterDuffXfermode(Mode.SRC_OUT)); pTouch.setColor(Color.TRANSPARENT); pTouch.setMaskFilter(new BlurMaskFilter(15, Blur.NORMAL)); overlay = BitmapFactory.decodeResource(getResources(),R.drawable.wraith_spell).copy(Config.ARGB_8888, true); c2 = new Canvas(overlay); dest = new Rect(0, 0, getWidth(), getHeight()); Paint paint = new Paint();9 paint.setFilterBitmap(true); ... @Override protected void onDraw(Canvas canvas) { ... c2.drawCircle(X, Y, 80, pTouch); canvas.drawBitmap(overlay, 0, 0, null); ... } @Override 9public boolean onTouchEvent(MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_MOVE: { X = (int) event.getX(); Y = (int) event.getY();9 invalidate(); c2.drawCircle(X, Y, 80, pTouch);9 break; } } return true; ... What I'm essentially doing is drawing transparency onto the canvas, over the red ball image. Canvas and Bitmap feel old... Surely there is a way to do something similar with OpenGL ES. What is it called? How do I use it? [EDIT] I found that if I draw an image and above new image with alpha 0, it goes to be transparent, maybe that direction? Something like: gl.glColor4f(0.0f, 0.0f, 0.0f, 0.01f);

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >