Search Results

Search found 6735 results on 270 pages for 'pre commit'.

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

  • SQL Server Process Queue Race Condition

    - by William Edmondson
    I have an order queue that is accessed by multiple order processors through a stored procedure. Each processor passes in a unique ID which is used to lock the next 20 orders for its own use. The stored procedure then returns these records to the order processor to be acted upon. There are cases where multiple processors are able to retrieve the same 'OrderTable' record at which point they try to simultaneously operate on it. This ultimately results in errors being thrown later in the process. My next course of action is to allow each processor grab all available orders and just round robin the processors but I was hoping to simply make this section of code thread safe and allow the processors to grab records whenever they like. So Explicitly - Any idea why I am experiencing this race condition and how I can solve the problem. BEGIN TRAN UPDATE OrderTable WITH ( ROWLOCK ) SET ProcessorID = @PROCID WHERE OrderID IN ( SELECT TOP ( 20 ) OrderID FROM OrderTable WITH ( ROWLOCK ) WHERE ProcessorID = 0) COMMIT TRAN SELECT OrderID, ProcessorID, etc... FROM OrderTable WHERE ProcessorID = @PROCID

    Read the article

  • How to implement a memory transaction scope in C#?

    - by theburningmonk
    Hi, we have a cache which I would like to put some transaction scopes around so that any process have to explicitly 'commit' the changes it wants to do to the cached objects and make it possible to rollback any changes when the process fails halfway as well. Right now, we're deep cloning the cached objects on get requests, it works but it's not a clean solution and involves a fair bit of maintenance too. I remember hearing about some MTS (memory transaction scope) solution on .NetRocks a while back but can't remember the name of it! Does anyone know of a good MTS framework out there? Alternatively, if I was to implement my own, are there any good guidelines/patterns on how to do this? Thanks,

    Read the article

  • Windows 7 Activation: Can I use OEM key for retail version? [closed]

    - by Joudicek Jouda
    Possible Duplicate: Windows 7 and Vista Activation FAQ: How do language, version, 64-bit or 32-bit, and source affect ability to install and transfer Windows licenses? I have a Lenovo notebook with pre-installed Windows 7 Professional x64. I just did a clean reinstall with retail installation Win7 Professional x64 disk I got from MSDNAA programme I'm member. I wanted to install the OS as Lenovo OEM with the same key I had before, but when I tried to activate the newly installed Windows, it gave me 0xc004e003 error. So the question is, can I use my OEM key for Win7 installed as retail? If not, can I somehow change the installed OS to OEM? The other think is, the OEM key I have tried is just some key I found in my notes, because I don't have any Windows sticker on beneath my laptop as it used to be on all my previous ones. Can I somehow find out "what is the origin" of the supposed key I'm trying to use?

    Read the article

  • Eclipse code template to insert a bookmark?

    - by Mike
    Eclipse has a nifty feature which allows you to define "templates" for code. I have created one to automatically put in a println and add a "TODO" comment. I'd like for this to also add a bookmark so I can easily find it again. (The codebase I am working with makes it unfeasible to use just the Task List to find what I need to do since there are a lot of TODOs laying around.) My current template is simply System.out.println("don't commit me!"); //TODO: fix this ${cursor}.

    Read the article

  • How do I get Eclipse CDT to ignore files

    - by brianegge
    I have a C++ project in Eclipse. The project uses Perforce and Eclipse has the Perforce plugin installed. Everything was fine, until I decided to create a git repo in my project. I created the git repo to snapshot some changes which I wasn't ready to commit. Everything was fine until I refreshed my files in Eclipse. Two problems have occurred: Eclipse found my .git folder, and indexed all of the files inside of it. Eclipse also decided to add all the git file to my pending change list. If I create a new file within Eclipse, I'd like it to add it to Perforce, but if it happens to find a file, I don't want it to do anything with it. I'd also like to give Eclipse a list of file types to always ignore, just like I do with my .hgignore file.

    Read the article

  • Cabling: What to keep in stock?

    - by pehrs
    I have worked a few different places, each one with a different solution, so I would like to hear your suggestions and ideas. I am looking at a situation with multiple server-rooms. We have a mixture of copper (both ethernet and telephone), multi-mode fibre and single-mode fibre. We have all types of connectors: RJ-11, RJ-45, LC, SC, FC, SMA and several I probably forgot about. We have a lot of people working in the area, and keeping track of cables is turning into a full time job. So, here are a the questions: What types and lengths of cable do you keep in stock on site? Do you make your own or buy pre-made? Adapters? Dampeners? How do you manage cable inventory? How do you label the cables? Any other tricks to stop this from driving me crazy?

    Read the article

  • VPN - What is the complexity involved setting one up across less than a dozen machines?

    - by lucius
    Hello, I have never set up and configured a VPN. I was wondering what it takes to set one up across windows server 2008 servers. What is the complexity involved? How complicated is it to configure? Do I need to set up a Domain controller as a pre-requisite? I am asking because it appears SQL Server 2008 merge replication can only be set up over the internet using VPN and I am trying to gauge what I am up against. Thanks a lot.

    Read the article

  • How can I disable the automatic switch to "library" mode in Windows 7's Media Player 12?

    - by matthews
    Whenever I plug any USB device into my computer while running Windows Media Player 12 in Windows 7, it will automatically swtich the player from the Now Playing mode to Library mode. This is intended to faciliate syncing between Media Player and MP3 players, but it happens for any USB device. I'd like this to not happen since it's infuriating to see this take place while I'm watching something on a separate screen in Media Player just from plugging in a USB key. This has nothing to do with Windows autorun, and nothing to do with versions of Windows pre-7. And no, switching to some other video player is not an option; I've tried them all, none are as good as stock Media Player in 7.

    Read the article

  • Handling android player errors

    - by stack hoss
    I am anew android developer and i made ashoutcast radio player and work good but when i open app it work for afew time but suddenly stop and need to press stop and play again but i need Handling android player errors to automatic restart on errors package com.test.test; import java.io.IOException; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.media.AudioManager; import android.media.AudioManager.OnAudioFocusChangeListener; import android.media.MediaPlayer; import android.os.IBinder; import android.preference.PreferenceManager; import android.util.Log; public class StreamService extends Service { private static final String TAG = "StreamService"; MediaPlayer mp; boolean isPlaying; Intent MainActivity; SharedPreferences prefs; SharedPreferences.Editor editor; Notification n; NotificationManager notificationManager; // Change this int to some number specifically for this app int notifId = 85; private OnAudioFocusChangeListener focusChangeListener = new OnAudioFocusChangeListener() { public void onAudioFocusChange(int focusChange) { switch (focusChange) { case (AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK) : // Lower the volume while ducking. mp.setVolume(0.2f, 0.2f); break; case (AudioManager.AUDIOFOCUS_LOSS_TRANSIENT) : mp.pause(); break; case (AudioManager.AUDIOFOCUS_LOSS) : mp.stop(); break; case (AudioManager.AUDIOFOCUS_GAIN) : // Return the volume to normal and resume if paused. mp.setVolume(1f, 1f); mp.start(); break; default: break; } } }; @Override public IBinder onBind(Intent arg0) { // TODO Auto-generated method stub return null; } @SuppressWarnings("deprecation") @Override public void onCreate() { super.onCreate(); Log.d(TAG, "onCreate"); // Init the SharedPreferences and Editor prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); editor = prefs.edit(); // Set up the buffering notification notificationManager = (NotificationManager) getApplicationContext() .getSystemService(NOTIFICATION_SERVICE); Context context = getApplicationContext(); String notifTitle = context.getResources().getString(R.string.app_name); String notifMessage = context.getResources().getString(R.string.buffering); n = new Notification(); n.icon = R.drawable.ic_launcher; n.tickerText = "Buffering"; n.when = System.currentTimeMillis(); Intent nIntent = new Intent(context, MainActivity.class); nIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent pIntent = PendingIntent.getActivity(context, 0, nIntent, 0); n.setLatestEventInfo(context, notifTitle, notifMessage, pIntent); notificationManager.notify(notifId, n); // It's very important that you put the IP/URL of your ShoutCast stream here // Otherwise you'll get Webcom Radio String url = "http://47.182.19.93:9888/"; mp = new MediaPlayer(); mp.setAudioStreamType(AudioManager.STREAM_MUSIC); try { mp.reset(); mp.setDataSource(url); mp.prepare(); mp.start(); } catch (IllegalArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SecurityException e) { // TODO Auto-generated catch block Log.e(TAG, "SecurityException"); } catch (IllegalStateException e) { // TODO Auto-generated catch block Log.e(TAG, "IllegalStateException"); } catch (IOException e) { // TODO Auto-generated catch block Log.e(TAG, "IOException"); } } @SuppressWarnings("deprecation") @Override public void onStart(Intent intent, int startId) { Log.d(TAG, "onStart"); mp.start(); // Set the isPlaying preference to true editor.putBoolean("isPlaying", true); editor.commit(); Context context = getApplicationContext(); String notifTitle = context.getResources().getString(R.string.app_name); String notifMessage = context.getResources().getString(R.string.now_playing); n.icon = R.drawable.ic_launcher; n.tickerText = notifMessage; n.flags = Notification.FLAG_NO_CLEAR; n.when = System.currentTimeMillis(); Intent nIntent = new Intent(context, MainActivity.class); PendingIntent pIntent = PendingIntent.getActivity(context, 0, nIntent, 0); n.setLatestEventInfo(context, notifTitle, notifMessage, pIntent); // Change 5315 to some nother number notificationManager.notify(notifId, n); AudioManager am = (AudioManager)getSystemService(Context.AUDIO_SERVICE); // Request audio focus for playback int result = am.requestAudioFocus(focusChangeListener, // Use the music stream. AudioManager.STREAM_MUSIC, // Request permanent focus. AudioManager.AUDIOFOCUS_GAIN); if (result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) { // other app had stopped playing song now , so u can do u stuff now . } } @Override public void onDestroy() { Log.d(TAG, "onDestroy"); mp.stop(); mp.release(); mp = null; editor.putBoolean("isPlaying", false); editor.commit(); notificationManager.cancel(notifId); AudioManager am = (AudioManager)getSystemService(Context.AUDIO_SERVICE); am.abandonAudioFocus(focusChangeListener); } }

    Read the article

  • dual boot preinstalled windows 8 laptop with windows 7

    - by sarathi
    I am having a hard disk in gpt partition style and Windows 8 is pre-installed in uefi mode. While trying to dual boot using usb bootable disk(using rufus,gpt partition style,fat32),it displays "Windows is loading files", then while displaying "Starting Windows" it hangs. So, I tried to install it inside Windows using setup.exe. Everything was running fine, but when it gets self restarted again, it got stuck at "Starting Windows". When restarted in Windows 8, it showed a htm file stating that "Windows cannot be installed on a computer using battery power. If the battery runs out of power during the installation, you might lose data. To continue the installation, plug in the computer's power adapter." I am sure that power adapter is connected. I Googled a lot on this, but I didn't get solution.

    Read the article

  • Testing for Active Directory Schema modification (not upgrade)

    - by Darktux
    I am trying to test a schema modification. That is i need to add one of the attributes to global catalog by modifying schema , initially in a lab which is exact replica.My questions are below; - What tests need to be done post schema change to determine if its safe for production? - Apart from measuring changes in DIT size post change, is there a way to find the whole size increase for adding an attribute to GC pre change? please let me know if any extra questions or info required.

    Read the article

  • send dbmail on @@error from sql server 2005

    - by Ved
    Hi, I am trying to send database mail when error occurs inside the transaction.My setup for dbo.sp_send_dbmail is correct , when I execute the proc I do get an email within 1 min. However when I try to use dbo.sp_send_dbmail inside another proc within transactions than I do not get the email. Sql server does show in the result window that "Mail queued" but I never receive it. BEGIN TRANSACTION DECLARE @err int DECLARE @test nvarchar(max) RAISERROR('This is a test', 16, 1) SELECT @err = @@ERROR IF @err < 0 BEGIN SET @test = error_message() EXEC msdb.dbo.sp_send_dbmail @recipients= '[email protected]', @body = 'test inside', @subject = 'Error with proc', @body_format = 'HTML', @append_query_error = 1, @profile_name ='Database Mail Profile'; ROLLBACK TRANSACTION RETURN END COMMIT TRANSACTION And I get result as Msg 50000, Level 16, State 1, Line 7 This is a test Mail queued.

    Read the article

  • Virtual NIC on VM couldn't ping externally after Vmotion

    - by ToreTrygg
    Today I vmotioned 5 MS SQL 2005 servers over to a new DRS Cluster. All SQL servers use the "Production_LAN" network and a single virtual NIC of type "VMXNET 3". The first 4 SQL VM (Windows 2003 Standard or Enterprise x32 bit) vmotioned over without a hitch. The last SQL VM I vmotioned (Windows 2003 Standard x64 bit R2) vmotioned over without error, but I upon completion, I could no longer ping the VM. I went into the VM and could not even ping the gateway, however I could ping the loopback. This SQL server is extremely busy in comparison with the previous 4 VM's. I restarted the server and it came back up with the virtual nic working just fine. The build of both servers (vmotioner and vmotionee) is ESX 4.0.0 175625 - So, pre-update 1. Should I suspect the network switch/VM for possibly not updating the mac table on the switch? Anybody else ever have this issue or know what may have caused it? Thank you!

    Read the article

  • What WYSIWYG software can I use to create a web page?

    - by Roman
    I always made web pages by writing HTML code but now I would like to try to use some WYSIWYG approach. Can anybody recommend me a program which I can use for that? I mean a program in which you can move buttons, tables, pictures by mouse. You can change size and shape by mouse. You can use nice templates for "block of text", buttons, background and so on. I am using Windows 7. May be I already have something pre-installed?

    Read the article

  • How do I reinstall/enable snapper?

    - by Aaron Digulla
    I had errors in my root filesystem (btrfs) so I recreated it from a backup but now, snapper doesn't work anymore: # /usr/bin/snapper -v -v -v -v create --description test IO Error. # snapper -v delete-config Deleting config failed (deleting snapshot failed). # snapper create-config / Creating config failed (subvolume already covered). # snapper -c root create-config / Creating config failed (subvolume already covered). # snapper list Type | # | Pre # | Date | User | Cleanup | Description | Userdata -------+---+-------+------+------+---------+-------------+--------- single | 0 | | | root | | current | I also tries to reinstall/remove and install the package snapper but without any luck. Any ideas how I can make snapper work again? openSUSE 12.3 with kernel 3.7.10-1.1-desktop.

    Read the article

  • Automatically reconnect to ODBC sources?

    - by stefan.at.wpf
    I am using Asterisk 1.8.10.1 and a MySQL database connected via ODBC to store CDRs. When my MySQL database isn't available when Asterisk starts or has an outage while Asterisk is running, I would expect Asterisk to retry to connect to the database, but this doesn't happen! Anyone knows where I can enable some kidn of automatic reconnect to databases in Asterisk? My res_odbc.conf looks like this: [asterisk] enabled => yes dsn => asterisk-connector username => user password => pass pre-connect => yes pooling => no limit => 1 idlecheck => 1 negative_connection_cache => 1

    Read the article

  • Django blog reply system

    - by dana
    hello, i'm trying to build a mini reply system, based on the user's posts on a mini blog. Every post has a link named reply. if one presses reply, the reply form appears, and one edits the reply, and submits the form.The problem is that i don't know how to take the id of the post i want to reply to. In the view, if i use as a parameter one number (as an id of the blog post),it inserts the reply to the database. But how can i do it by not hardcoding? The view is: def save_reply(request): if request.method == 'POST': form = ReplyForm(request.POST) if form.is_valid(): new_obj = form.save(commit=False) new_obj.creator = request.user new_post = New(1) #it works only hardcoded new_obj.reply_to = new_post new_obj.save() return HttpResponseRedirect('.') else: form = ReplyForm() return render_to_response('replies/replies.html', { 'form': form, }, context_instance=RequestContext(request)) i have in forms.py: class ReplyForm(ModelForm): class Meta: model = Reply fields = ['reply'] and in models: class Reply(models.Model): reply_to = models.ForeignKey(New) creator = models.ForeignKey(User) reply = models.CharField(max_length=140,blank=False) objects = NewManager() mentioning that New is the micro blog class thanks

    Read the article

  • .Net opening and closing database connections

    - by Dan
    I designed the data access portion of our framework so that every time a business object needs to interact with the database it would have to open a connection, invoke the data access layer (to execute the query), and then close the connection. Then if it needed to run in a transaction it would open the connection, begin the transaction, invoke the data access layer (to execute the query) and then commit the transaction, close the transaction, and finally close the connection. I did it this way with the mindset of open late and close early... but what if I needed to call other BO's to submit data in a single transaction? Is there a better way to handle opening and closing connections as well as working with transactions? I'm a rookie in designing application architecture so I hope I'm not doing this wrongly... any help is appreciated.

    Read the article

  • Editing remote files over SSH, using TextMate?

    - by Zachary Burt
    I LOVE using TextMate on my MacBook. It's great. Unfortunately, I want to edit some files directly on my dev server, since it's difficult to recreate the environment locally. I'm using Git, so one alternative is to just edit locally, git commit, git push, and then git merge, but that's kind of complicated every time I want to make a simple change. I'd rather just ... use another solution. One thing I tried is mounting a hard drive via MacFusion, and then loading that in an editor. But that's so freaking laggy/slow! Has anyone cooked up a better solution?

    Read the article

  • Updating Cisco VPN config to add vpnc support

    - by Igor Kuzmitshov
    I have a Cisco 1841 configured for VPN connections of two types: Peer-to-peer for partners' routers (IPsec) — using different crypto isakmp key and crypto map with set peer, set transform-set, match address for every peer (same map name, different priorities). That crypto map name is added to the WAN interface. Client access (PPTP) — using vpdn-group with accept-dialin protocol pptp. Now, a new partner wants to connect using vpnc client. The latter needs IPSec ID (group name) and IPSec secret in addition to username and password. I guess that IPSec secret is pre-shared key that can be specified in crypto isakmp key on Cisco. But I could not find any VPN tutorials involving groups. Hence, my questions: How to add IPSec ID (group name) and IPSec secret on Cisco router for vpnc connections? Should I add a new crypto map matching all addresses as well? Is it possible to add this configuration without breaking the existing setup? Thank you.

    Read the article

  • How to create trunk directory in existing svn repo without a trunk, and move all files to new trunk?

    - by stupakov
    Hi all, I've got an svn repo with no trunk dir. I'd like to create the trunk and branches dirs, and move all my files (currently in the root) into trunk. Creating trunk works just fine: macbook[601] # svn mkdir trunk A trunk macbook[602] # svn commit trunk Adding trunk Committed revision 67. moving everything into trunk fails: macbook[604] # svn move * trunk svn: Cannot copy path 'trunk' into its own child 'trunk/trunk' is there a way to do this without giving it all the file and dir names individually? There are threads describing how to do this with TortoiseSVN, but i'd like to know the right way to do it with the svn commandline. Thanks.

    Read the article

  • Give apache write access to DocumentRoot on dev server

    - by Abhi Beckert
    I've got apache running on my mac workstation (OS X 10.7, with the pre-installed copy of apache), and our web applications require write access to certain sections of the filesystem to run (usually just a tmp dir, but sometimes more than that). We have (literally) thousands of clients, and I want to be able to quickly grab a copy of any website's code, and have it "just work", however I always need to manually modify the unix permissions of specific directories after pulling a client's website out of source control (the list of directories varies from one client to another, as it has changed over the years). Since it's a dev server, firewalled off from the general internet, I would like to give apache/php write access to the entire DocumentRoot. How can I do this? I tried chmod 777 on the DocumentRoot, but if I create a directory inside it, the permissions are still 755 (owner: me, group: wheel). I think there should be a way to force all files created inside DocumentRoot to be 777 or perhaps 775, with the _www user added to the wheel group?

    Read the article

  • BigDecimal precision not persisted with javax.persistence annotations

    - by dkaczynski
    I am using the javax.persistence API and Hibernate to create annotations and persist entities and their attributes in an Oracle 11g Express database. I have the following attribute in an entity: @Column(precision = 12, scale = 9) private BigDecimal weightedScore; The goal is to persist a decimal value with a maximum of 12 digits and a maximum of 9 of those digits to the right of the decimal place. After calculating the weightedScore, the result is 0.1234, but once I commit the entity with the Oracle database, the value displays as 0.12. I can see this by either by using an EntityManager object to query the entry or by viewing it directly in the Oracle Application Express (Apex) interface in a web browser. How should I annotate my BigDecimal attribute so that the precision is persisted correctly? Note: We use an in-memory HSQL database to run our unit tests, and it does not experience the issue with the lack of precision, with or without the @Column annotation.

    Read the article

  • GAE Entity Groups/Transaction

    - by bach
    Hi, Say you have a Client Buying Card object and a product object. When the client chooses the buy opition you create the object and then add a product. It should be transactional but it's not on the same entity group as the product and the card already been persisted, isn't it? Is there any way to overcome this simple scenario safely and easily? here's a code sample: Transaction tx = pm.currentTransaction(); tx.begin(); Product prod = pm.getObjectById(Product.class, "TV"); prod.setReserved(true); pm.makePersistent(prod); Card card = pm.getObjectById(Card.class, "user123"); /// <--- will thorw an exception as card and prod aren't on the same entity group card.setProd(prod); pm.makePersistent(card); try { tx.commit(); break; }

    Read the article

  • Need IPSec help on Windows 2003

    - by user37456
    Hey guys, I am trying to configure IPSec between a web and app server in our environment. I want all traffic between these two servers to use IPsec and be encrypted. These servers are on the same domain so i am currently using Kerebos for security, I have also tried pre-defined keys and nothing changed. When I try and ping between the servers I get "Negotiating IP Security" everytime. I have also confirmed that when I change "Require Security" to "Permit" everything works so IPSec is working, I believe its something with my security setup. Under the security tab both servers have the default 3DES keys first and then DES keys. I have also specified tunnel endpoints (the alternate server's IP). What am I missing? Thanks for any help..

    Read the article

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