Search Results

Search found 3093 results on 124 pages for 'weng lock mok'.

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

  • Lock Question - When is an Update (U) lock issued?

    - by Randy Minder
    We are trying to resolve a deadlock problem. The transaction that is getting rolled back is attempting to issue an Update (U) lock on a resource that another transaction has an Exclusive (X) lock on. According to Books Online (http://msdn.microsoft.com/en-us/library/ms175519.aspx), an Update lock is supposed to prevent deadlocks, not cause them. So, my question is, why/when is an Update lock applied to a resource? We're a little confused about this because the resource that is attempting to have the Update lock applied to will not be updated by the process that is having the transaction rolled back. Thanks for your help on this. Randy

    Read the article

  • Multi-threading concept and lock in c#

    - by Neeraj
    I read about lock, though not understood nothing at all. My question is why do we use a un-used object and lock that and how this makes something thread-safe or how this helps in multi-threading ? Isn't there other way to make thread-safe code. public class test { private object Lock { get; set; } ... lock (this.Lock) { ... } ... } Sorry is my question is very stupid, but i don't understand, although i've used it many times.

    Read the article

  • Lock application window movement on Mac

    - by Martin Tóth
    Sometimes, when I use touchpad to control cursor and I'm clicking or double clicking, I move the application window a few pixels because my finger does not tap the touchpad on one place. Is there a way (Mac OS X) to lock application window, so that it can't be moved with cursor unless unlocked again? Is there another way to solve this? (Besides me being more careful when double clicking...) Edit: Is there even an attribute of "window object" that can lock it's position? I can try to write an App that handles just that (or a script run every time I run Application which I want to lock windows for). If there isn't would an OS X Application that "watches" windows movements and counters them (moves back) be hard to code?

    Read the article

  • MySQL Privileges required to GRANT EVENT, EXECUTE, LOCK TABLES, and TRIGGER

    - by Brad
    I have an account, user_a, and I would like to grant all available permissions on some_db to user_b. I have tried the following query: GRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE TEMPORARY TABLES, CREATE VIEW, DELETE, DROP, EVENT, EXECUTE, INDEX, INSERT, LOCK TABLES, REFERENCES, SELECT, SHOW VIEW, TRIGGER, UPDATE ON `some_db`.* TO 'user_b'@'%' WITH GRANT OPTION The result: Access denied for user 'user_a'@'%' to database 'some_db' Some experimentation has shown me that the only permissions my account (user_a) is unable to grant are EVENT, EXECUTE, LOCK TABLES, and TRIGGER. What privileges are required for my account to GRANT these privileges to another user? If I run SHOW GRANTS, I get this output: "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER ON *.* TO 'user_a'@'%' IDENTIFIED BY PASSWORD '1234567890abcdef' WITH GRANT OPTION" "GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE ON `some_other_unrelated_db`.* TO 'user_a'@'%'" "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE ROUTINE, ALTER ROUTINE ON `another_unrelated_db`.* TO 'user_a'@'%' WITH GRANT OPTION"

    Read the article

  • Rename/Move file only if destination does not exist

    - by mikeY
    I would like to know if there is any way a file can be moved only if the destination does not exist - in other words, move only if it does not lead to overwriting. mv --update seemed first to be the solution, however, if the timestamp of the source path is newer than the destination, move will overwrite it and all attempts to circumvent this by modifying the timestamp before the move will fail. I need this behaviour to implement a simple file based lock where existence of a 'lock' file indicates that the lock is acquired.

    Read the article

  • How to swap ctrl and caps lock using xmodmap

    - by Maruti
    Or any other tool, but I prefer xmodmap. I tried this: remove Lock = Caps_Lock remove Control = Control_L keysym Control_L = Caps_Lock keysym Caps_Lock = Control_L add Lock = Caps_Lock add Control = Control_L I also tried this: xmodmap -e "keycode 66 = Control_L" But neither seem to fully work. Here's the event log for pressing caps lock: KeyPress event, serial 28, synthetic NO, window 0x1a00001, root 0x12d, subw 0x0, time 914826, (679,342), root:(680,362), state 0x12, keycode 66 (keysym 0xffe3, Control_L), same_screen YES, XKeysymToKeycode returns keycode: 37 // 37 is the control key code XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False I'm running Ubuntu 10.10 with awesome window manager.

    Read the article

  • Deleting MySQL rows causes lock table error

    - by Dave L
    I had a couple million rows to delete but they can't be deleted at once without this error ERROR 1206 (HY000): The total number of locks exceeds the lock table size So I wrote a script to delete 100,000 rows 10,000 at a time. It ran once but when I run it a second time I get the error on the first attempt to delete 10,000. The way I'm trying to delete the 10,000 rows is to use a delete statement that refers to all 2 million rows but I use a limit clause to affect only 10,000. I've tried adding an "unlock tables;" statement to the script before the first delete but that doesn't help. I still get the lock table error on the first delete. Any ideas how I can do this? Is there a way I can tell it NOT to lock records? I can make sure nothing else is accessing the table.

    Read the article

  • How to swap Escape and Caps Lock?

    - by pexeer
    I am using Archlinux. When I program , I like to swap the Escape and Caps Lock. I know that gnome can do this job. But Gnome 3.6.2 in the Archlinux can not find this. So i use the xmodmap and create a file : ~/.xmodmap clear Lock keysym Caps_Lock = Escape keysym Escape = Caps_Lock add Lock = Caps_Lock when i run: xmodmap ~/.xmodmap it works well. But it can not work automatic when i login the gnome, even though i add xmodmap ~/.xmodmap to ~/.xprofile. Am I doing something wrong ? How can I solve this issue?

    Read the article

  • monitor power and lock screen (Ubuntu Lucid)

    - by xsznix
    Hi, I'm trying to get my screen to turn off whenever I lock my screen. I know that in Power Management, there's an option to turn off the screen after a set amount of time, and I know about xset dpms force off, but the former doesn't allow me to turn off the screen from the logout menu, and the latter only turns the screen off for a short amount of time (1 minute or so. The screen just turns back on by itself). Is there a script I can modify to change what happens when "Lock screen" from the logout menu is selected, or is there a script I can add to the panel to lock the screen and then turn the monitor off (and turning it back on when I shake the mouse or something)? Thanks.

    Read the article

  • July, the 31 Days of SQL Server DMO’s – Day 20 (sys.dm_tran_locks)

    - by Tamarick Hill
    The sys.dm_tran_locks DMV is used to return active lock resources on your server. Locking is a mechanism used by SQL Server to protect the integrity of data when you have multiple users that may potentially access the same data at the same time. Let’s run a query against this DMV so we can analyze the results. SELECT * FROM sys.dm_tran_locks As we can see, its a lot of lock information returned from this DMV. I will not go into detail about each of the columns returned, but I will touch on the ones that I feel are the most important. The first column in the output is the resource_type column which tells you the type of lock a particular row represents. It could be a PAGE lock, RID, OBJECT, DATABASE, or several other lock types. The resource_database_id represents the id of the database for a particular lock resource. The resource_lock_partition column represents the ID of a lock partition. When you have a table that is partitioned, locks can be escalated to the partition level before going to a table level lock. The request_mode column gives us information about the type of lock that is being requested. From the screenshots above we see RangeS-S locks which represent a share range lock and IS locks which represent Intent Shared locks. The request_status column displays whether the lock has been granted or whether the lock is waiting to be acquired. The request_session_id  shows the session_id that is requesting the lock. This DMV is the best place to go when you need to identify the exact locks that are being held or pending for individual requests. You might need this information when you are troubleshooting severe blocking or deadlocking problems on your server. For more information on this DMV, please see the below Books Online link: http://msdn.microsoft.com/en-us/library/ms190345.aspx Follow me on Twitter @PrimeTimeDBA

    Read the article

  • How do I lock the workstation from a windows service?

    - by Brad Mathews
    Hello, I need to lock the workstation from a windows service written in VB.Net. I am writing the app on Windows 7 but it needs to work under Vista and XP as well. User32 API LockWorkStation does not work as it requires an interactive desktop and I get return value of 0. I tried calling %windir%\System32\rundll32.exe user32.dll,LockWorkStation from both a Process and from Shell, but still nothing happens. Setting the service to interact with the desktop is a no-go as I am running the service under the admin account so it can do some other stuff that requires admin rights - like disabling the network, and you can only select the interact with desktop option if running under Local System Account. That would be secondary question - how to run another app with admin rights from a service running under Local System Account without bugging the user. I am writing an app to control my kids computer/internet access (which I plan to open source when done) so I need everything to happen as stealthily as possible. I have a UI that handles settings and status notifications in the taskbar, but that is easy to kill and thus defeat the locking. I could make another hidden Windows Forms app to handle the locking, but that just seems a rather inelegant solution. Better ideas anyone? Thanks! Brad

    Read the article

  • Delphi: how to lock dfm-s to not change...?

    - by durumdara
    Hi! We used Delphi 6 long times ago. Our problem, that Delphi have two problems with DFMs: 1.) When some linked resource (like DataSet) will removed, Delphi many times forget to ask you that "some of the resources are linked, you need to redirect...". This happens, when the actual form is not added to the project, or it is not opened. 2.) When we only open the DFM, and only see some thing, may we change it (active TabSheet, form position). Then Delphi auto save the form - and sometimes it drops the links. Another problem with this that we used SVN, and SVN detect these changes... We thought that we change DFM files to read only, but this can prevent the usage of SVN too... So somebody please help us: have the Delphi some extension (like gexpert) that can lock the DFMs to avoid changes, and some other tool to see that dataset is used in other forms or not? Thanks for your help: dd

    Read the article

  • Can I get rid of this read lock?

    - by Pieter
    I have the following helper class (simplified): public static class Cache { private static readonly object _syncRoot = new object(); private static Dictionary<Type, string> _lookup = new Dictionary<Type, string>(); public static void Add(Type type, string value) { lock (_syncRoot) { _lookup.Add(type, value); } } public static string Lookup(Type type) { string result; lock (_syncRoot) { _lookup.TryGetValue(type, out result); } return result; } } Add will be called roughly 10/100 times in the application and Lookup will be called by many threads, many of thousands of times. What I would like is to get rid of the read lock. How do you normally get rid of the read lock in this situation? I have the following ideas: Require that _lookup is stable before the application starts operation. The could be build up from an Attribute. This is done automatically through the static constructor the attribute is assigned to. Requiring the above would require me to go through all types that could have the attribute and calling RuntimeHelpers.RunClassConstructor which is an expensive operation; Move to COW semantics. public static void Add(Type type, string value) { lock (_syncRoot) { var lookup = new Dictionary<Type, string>(_lookup); lookup.Add(type, value); _lookup = lookup; } } (With the lock (_syncRoot) removed in the Lookup method.) The problem with this is that this uses an unnecessary amount of memory (which might not be a problem) and I would probably make _lookup volatile, but I'm not sure how this should be applied. (John Skeets' comment here gives me pause.) Using ReaderWriterLock. I believe this would make things worse since the region being locked is small. Suggestions are very welcome.

    Read the article

  • After locking the screen in Ubuntu 14.04, password is not accepted, How can it be fixed?

    - by Itai Ganot
    I'm running Ubuntu 14.04 fully updated on my laptop. Since the last update every time I lock the screen (when leaving my room for example) - when I get back and input my password, it is not accepted even though it's the correct password, the error I get is: Password incorrect, please try again I found that clicking the "Switch Account" fixes the issue but it is very annoying, if you know any way to fix it, it would be nice. Thanks in advance

    Read the article

  • Two bugs you should be aware of

    - by AaronBertrand
    In the past 24 hours I have come across two bugs that can be quite problematic in certain environments. LPIM issue with SetFileIoOverlappedRange Last night the CSS team posted a blog entry detailing a potential issue with Lock Pages in Memory and Windows' SetFileIoOverlappedRange API. I tweeted about it at the time, but thought it could use a little more treatment. The potential symptoms can vary, but include the following (as quoted from the blog post): Wide ranging in SQL from invalid write location,...(read more)

    Read the article

  • Xubuntu 14.04, Power Manager, Screensaver

    - by Bathynomus
    When my computer is inactive, I keep getting a black screen and the screen goes into locked mode asking for a password, even though in Power Manager I have "Never" set for actions and monitor and Extended "Lock Screen" is unchecked. I don't see a screensaver, but perhaps that is the issue? Is anyone else experiencing this? Is this a bug? Is there a temporary workaround? I did not see this issue in 12.xx, 13.xx.

    Read the article

  • Mysql Slave stuck in "System lock"

    - by Greg
    My MySQL slave is spending a lot of time in Slave_SQL_Running_State: System lock. I can see that the system is currently I/O write bound, and that it is processing the log, although slowly. Show processlist doesn't show anything other than "Waiting for master to send event" and "System lock" when it is in this state. All my tables (other than the system tables) are InnoDB, and external locking is disabled. What is the slave doing in this state?

    Read the article

  • how to lock screen for Mac?

    - by George2
    Hello everyone, I am using a MacBook Pro running Mac OS X 10.5. I am new to this development environment, and previously worked on Windows. I am wondering how to lock screen for Mac computer, like Windows Key + D to lock screen for Windows PC? thanks in avdance, George

    Read the article

  • Yum lock file problem

    - by David Reynolds
    When there are more than 1 copies of yum running, I get this error: Another app is currently holding the yum lock; waiting for it to exit Is there a way to make yum just exit the first time it can't get the lock rather than stay open waiting for it?

    Read the article

  • Remote Desktop and Num Lock

    - by PressAnyKey
    Whenever I log into my Windows 7 desktop from my Windows 7 laptop using RDC, the Num Lock is enabled on the host computer and it is not disabled after disconnecting. What can I do to stop the Num Lock from being enabled or automatically disable it at the end of the session? (I do not know if this happens only on Windows 7 and have no way of checking, so I went with the generic windows tag)

    Read the article

  • useradd /etc/passwd lock

    - by alexgindre
    I'm trying to add a user (as root) on CentOS 5.5 and I've got this message : useradd: unable to lock password file After reading some post linked to this issue I've deleted two files in /etc : .pwd.lock passwd- However it still doesn't work. Finally, I read a thread where the guy said that using the passwd command to update the passwd file and normally fix this issue. I've tried with the root user But I've got this issue : passwd: Authentication token manipulation error Any idea to add my user ?

    Read the article

  • frame lock networking

    - by kochol
    I'm developing an RTS game and I want to add multiplayer support to my game. I picked the easiest technique to implement for start frame locking technique. I used server client networking architecture (I think it's my first mistake I think using peer to peer is a better one for this) On game update every clients send their commands and maybe receive some command then render the frame and wait for all clients to send their update complete message then all of them can go for the next frame. I send commands and all logic is calculated on the clients based on commands but the clients can go out of sync easily. Every AI controlled units make different decisions on each clients What I have to do to sync my game? Do you suggest me a better network architecture or technique?

    Read the article

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