Search Results

Search found 4288 results on 172 pages for 'mark griffin'.

Page 64/172 | < Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >

  • Impossible to remove directory

    - by Mark
    Evidently I've never had to delete a directory using win32 sdk before, because its apparently an impossible task. I've tried anything and everything - RemoveDirectory, SHFileOperation with FO_DELETE, etc. Currently I call CreateDirectory in one thread, start another thread, copy some files to this directory in the new thread, then delete all the files in the directory in the new thread, and then back in the original thread that created the directory, try to delete the now empty directory and it fails. The directory really and truly is empty when I try to delete it, but it makes no difference. The whole thread aspect is irrelevant I think because at one point everything was in one thread and it didn't work. I'm currently setting a SecurityAttributes structure on CreateDirectory to grant access to everyone, but it makes no difference. RemoveDirectory in the past has returned '32' on GetLastError, which I believe is Sharing violation. But even if I just try to delete the empty directory from the command line, it refuses saying, "The process cannot access the file because it is being used by another process." until I shut down the entire application that created the directory. (Note: the directory is created in GetTempPath.)

    Read the article

  • Terminology: opposite of "zero copy"?

    - by Mark Harrison
    We're benchmarking some code that we've converted to use sendfile(), the linux zero-copy system call. What's the term for the traditional read()/write() loop that sendfile() replaces? I.e., in our report I want to say "zerocopy is X millisecs, and ??? is Y millisecs." What word/phrase should I use?

    Read the article

  • Python Application in right click menu of OS X

    - by Mark Underwood
    Hi All, I know that there is the PyObjC bridge is OSX and what I want to do is to put a python application/script in the rightclick context menu of OS X. there is the OnMyCommand plugin but I dont think that supports python. I've had a look at how to do it in Carbon/ Objective-C and i'll admit it im a wuss and am just not smart enough yet to grok how to do it (I aint even close to groking it actually.) Anybody got any idea's on how I might go about this? Cheers

    Read the article

  • jquery: Writing a method

    - by Mark
    This is the same question as this: http://stackoverflow.com/questions/2890620/jquery-running-a-function-in-a-context-and-adding-to-a-variable But that question was poorly posed. Trying again, I'm trying to do something like this: I have a bunch of elements I want to grab data from, the data is in the form of classes of the element children. <div id='container'> <span class='a'></span> <span class='b'></span> <span class='c'></span> </div> <div id='container2'> <span class='1'></span> <span class='2'></span> <span class='3'></span> </div> I have a method like this: jQuery.fn.grabData = function(expr) { return this.each(function() { var self = $(this); self.find("span").each(function (){ var info = $(this).attr('class'); collection += info; }); }); }; I to run the method like this: var collection = ''; $('#container').grabData(); $('#container2').grabData(); The collection should be adding to each other so that in the end I get this console.log(collection); : abc123 But collection is undefined in the method. How can I let the method know which collection it should be adding to? Thanks.

    Read the article

  • How to direct people to fill out a form

    - by Solmead
    What is the best way to get people to fill out a form correctly? For instance I originally had a "Name" field on a form and I want 1 person per form. People filled it out like this: "Mark & Becky Newsman". So I broke it into 2 fields, "First Name" and "Last Name", And people are still filling it out wrong, like "First Name" = "Mark & Becky", "Last Name" = "Newsman". Are there any recommendations on how better to get people to understand that only one person's name should go there? I currently have it on two lines, would it work better to put both fields on one line? If this is on the wrong site go ahead and move it to the correct site.

    Read the article

  • How to OCR a specific region of a MODI.Document?

    - by Mark Kadlec
    I need to OCR a specific region of a scanned document and I am using MODI (Microsoft's Document Imaging COM object). My code currently OCR's the entire page (quite accurately!), but I would like to target a specific region of the page where the text is always static (order number). How can I do this? Here is my code for the page: MODI.Document md = new MODI.Document(); md.Create("c:\\temp\\mpk.tiff"); md.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH, true, true); MODI.Image image = (MODI.Image)md.Images[0]; FileStream createFile = new FileStream("c:\\temp\\mpk.txt", FileMode.CreateNew); StreamWriter writeFile = new StreamWriter(createFile); writeFile.Write(image.Layout.Text); writeFile.Close(); md.Close(); Can I somehow specify the region of the image? Any help would be greatly appreciated!

    Read the article

  • Multiple jQuery UI buttons with same ID

    - by Mark Nolan
    There might be a really simple solution to this question, but i just don't see it! I have a page with a list of items. every item has the same jquery ui button (its inside a dialog and adds that item to a list). i identify the item via the parenting DIV holding the DB id. So far so good... The Problem is only the first button on the list works! The second, third etc. buttons don't show any reaction at all. The buttons all have the same id - as the list is dynamic and the same action is triggered with every click. Only the parenting ID changes. Heres the display part: <div id="2"> <div id="56"> <button id="add-audio-file" class="ui-button ui-state-default ui-corner-all">betty_2.mp3</button> </div> </div> <div id="2"> <div id="57"> <button id="add-audio-file" class="ui-button ui-state-default ui-corner-all">betty_3.mp3</button> </div> </div> And here comes the js Part: $('#add-audio-file').click(function() { assetID = $(this).parent('div').attr('id'); pageID = $(this).parent('div').parent('div').attr('id'); $.post( "modules/portfolio/serialize.php", {id : pageID, assetid : assetID, do : "add-audio-file"}, function(data, textStatus, xhr) { $('#dialog-add-audio').dialog('close'); } ); }); I am using jquery 1.4.2 and jquery ui 1.8rc3 Any ideas?

    Read the article

  • DebuggerDisplay attribute does not work as expected!

    - by mark
    Dear ladies and sirs. I know that this attribute should work in C# and yet, in my case it does not. I have a class with a lazy property Children. Accessing this property may have a side effect of roundtripping to the server. So, naturally, I do not want this to happen when I just watch it in the debugger watch window. Omitting all the irrelevant details the source looks pretty ordinary: [DebuggerDisplay("(Frozen) {m_children}")] public IList<IEntityBase> Children { get { if (m_children == null) { m_children = FetchChildrenFromDB(this); } return m_children; } } And yet, when I watch the object and expand this in the watch window I do not see (Frozen) in the display, meaning the debugger simply ignores the attribute. Provided the image link is still valid it should be visible below: http://i28.tinypic.com/2zxo9s5.jpg The attribute is really there, according to Reflector. I use VS2008. Any ideas?

    Read the article

  • I think my PHP app is being session hijacked?

    - by Mark Sandman
    Hi there, I have a php site that lets registered users login (with a valid passord) and sets up a session based on their UserID. However I'm pretty sure thisis being hijacked and I've found "new" files on my server I didn't put there. My site cleans all user input for SQL injections and XSS but this keeps happening. Has anyone got any ideas on how to solve this?

    Read the article

  • Some web pages (especially Apple documentation) cause heavy CPU usage in Windows IE8

    - by Mark Lutton
    Maybe this belongs in Server Fault instead, but some of you may have noticed this issue (particularly those developing on Mac, using a Windows machine to read the reference material). I posted the same question on a Microsoft forum and got one answer from someone who reproduced the problem, so it's not just my machine. No solution yet. Ever since this month's security updates, I find that many web pages cause the CPU to run at maximum for as long as the web page is visible. This happens in both IE7 and IE8 on at least three different computers (two with Windows XP, one with Vista). Here is one of the pages, running on XP with IE 8: http://learning2code.blogspot.com/2007/11/update-using-subversion-with-xcode-3.html Here is one that does it in Vista with IE8: http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html You can leave the page open for hours and the CPU is still at high usage. This doesn't happen every time. It is not always reproduceable. Sometimes it is OK the second or third time it loads. In IE7 the high usage is in ieframe.dll, version 7.0.6000.16890. In IE8 the high usage is in iertutil.dll, version 8.0.6001.18806.

    Read the article

  • How to make msbuild ItemGroup items be separated with a space rather than semi-colon?

    - by mark
    Dear ladies and sirs. Observe the following piece of an msbuild script: <ItemGroup> <R Include="-Microsoft.Design#CA1000" /> <R Include="-Microsoft.Design#CA1002" /> </ItemGroup> I want to convert it to /ruleid:-Microsoft.Design#CA1000 /ruleid:-Microsoft.Design#CA1002 Now, the best I came up with is @(R -> '/ruleid:%(Identity)'), but this only yields /ruleid:-Microsoft.Design#CA1000;/ruleid:-Microsoft.Design#CA1002 Note the semi-colon separating the two rules, instead of a space. This is bad, it is not recognized by the fxcop - I need a space there. Now, this is a simple example, so I could just declare something like this: <PropertyGroup> <R>/ruleid:-Microsoft.Design#CA1000 /ruleid:-Microsoft.Design#CA1002</R </PropertyGroup> But, I do not like this, because in reality I have many rules I wish to disable and listing all of them like this is something I wish to avoid.

    Read the article

  • drupal jQuery 1.4 on specific pages

    - by Mark
    I'm looking for a way to force drupal to use 1.4 on specific pages. This is the same as this old question:http://stackoverflow.com/questions/2842792/drupal-jquery-1-4-on-specific-pages It look me a while to try the answer which I marked correct. But because I'm new to module dev overall I couldn't figure it out based on the answer. The code from that answer looked like this: /** * Implementation of hook_theme_registry_alter(). * Based on the jquery_update module. * * Make this page preprocess function runs *last*, * so that a theme can't call drupal_get_js(). */ function MYMODULE_theme_registry_alter(&$theme_registry) { if (isset($theme_registry['page'])) { // See if our preprocess function is loaded, if so remove it. if ($key = array_search('MYMODULE_preprocess_page', $theme_registry['page']['preprocess functions'])) { unset($theme_registry['page']['preprocess functions'][$key]); } // Now add it on at the end of the array so that it runs last. $theme_registry['page']['preprocess functions'][] = 'MYMODULE_preprocess_page'; } } /** * Implementation of moduleName_preprocess_hook(). * Based on the jquery_update module functions. * * Strips out JS and CSS for a path. */ function MYMODULE_preprocess_page(&$variables, $arg = 'my_page', $delta=0) { // I needed a one hit wonder. Can be altered to use function arguments // to increase it's flexibility. if(arg($delta) == $arg) { $scripts = drupal_add_js(); $css = drupal_add_css(); // Only do this for pages that have JavaScript on them. if (!empty($variables['scripts'])) { $path = drupal_get_path('module', 'admin_menu'); unset($scripts['module'][$path . '/admin_menu.js']); $variables['scripts'] = drupal_get_js('header', $scripts); } // Similar process for CSS but there are 2 Css realted variables. // $variables['css'] and $variables['styles'] are both used. if (!empty($variables['css'])) { $path = drupal_get_path('module', 'admin_menu'); unset($css['all']['module'][$path . '/admin_menu.css']); unset($css['all']['module'][$path . '/admin_menu.color.css']); $variables['styles'] = drupal_get_css($css); } } } I need the jquery_update 1.3.2 to be unset on the node-types of 'blog' and 'video'. Can someone help me out? Thank you.

    Read the article

  • WCF Service with callbacks coming from background thread?

    - by Mark Struzinski
    Here is my situation. I have written a WCF service which calls into one of our vendor's code bases to perform operations, such as Login, Logout, etc. A requirement of this operation is that we have a background thread to receive events as a result of that action. For example, the Login action is sent on the main thread. Then, several events are received back from the vendor service as a result of the login. There can be 1, 2, or several events received. The background thread, which runs on a timer, receives these events and fires an event in the wcf service to notify that a new event has arrived. I have implemented the WCF service in Duplex mode, and planned to use callbacks to notify the UI that events have arrived. Here is my question: How do I send new events from the background thread to the thread which is executing the service? Right now, when I call OperationContext.Current.GetCallbackChannel<IMyCallback>(), the OperationContext is null. Is there a standard pattern to get around this? I am using PerSession as my SessionMode on the ServiceContract. UPDATE: I thought I'd make my exact scenario clearer by demonstrating how I'm receiving events from the vendor code. My library receives each event, determines what the event is, and fires off an event for that particular occurrence. I have another project which is a class library specifically for connecting to the vendor service. I'll post the entire implementation of the service to give a clearer picture: [ServiceBehavior( InstanceContextMode = InstanceContextMode.PerSession )] public class VendorServer:IVendorServer { private IVendorService _vendorService; // This is the reference to my class library public VendorServer() { _vendorServer = new VendorServer(); _vendorServer.AgentManager.AgentLoggedIn += AgentManager_AgentLoggedIn; // This is the eventhandler for the event which arrives from a background thread } public void Login(string userName, string password, string stationId) { _vendorService.Login(userName, password, stationId); // This is a direct call from the main thread to the vendor service to log in } private void AgentManager_AgentLoggedIn(object sender, EventArgs e) { var agentEvent = new AgentEvent { AgentEventType = AgentEventType.Login, EventArgs = e }; } } The AgentEvent object contains the callback as one of its properties, and I was thinking I'd perform the callback like this: agentEvent.Callback = OperationContext.Current.GetCallbackChannel<ICallback>(); How would I pass the OperationContext.Current instance from the main thread into the background thread?

    Read the article

  • Write Java objects to file

    - by Mark Szymanski
    Is it possible to write objects in Java to a binary file? The objects I want to write would be 2 arrays of String objects. The reason I want to do this is to save persistent data. If there is some easier way to do this let me know. Thanks in advance!

    Read the article

  • Returning objects from another thread?

    - by Mark
    Trying to follow the hints laid out here, but she doesn't mention how to handle it when your collection needs to return a value, like so: private delegate TValue DequeueHandler(); public virtual TValue Dequeue() { if (dispatcher.CheckAccess()) { --count; var pair = dict.First(); var queue = pair.Value; var val = queue.Dequeue(); if (queue.Count == 0) dict.Remove(pair.Key); OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, val)); return val; } else { dispatcher.BeginInvoke(new DequeueHandler(Dequeue)); } } This obviously won't work, because dispatcher.BeginInvoke doesn't return anything. What am I supposed to do? Or maybe I could replace dequeue with two functions, Peek and Pop, where Peek doesn't really need to be on the UI thread because it doesn't modify anything, right? As a side question, these methods don't need to be "locked" either, do they? If they're all forced to run in the UI thread, then there shouldn't be any concurrency issues, right?

    Read the article

  • How to overwrite an excel application without prompting the users..

    - by Mark
    Can anyone help me on how can I overwrite the excel file without prompting the users in VB.Net.. I have try this code but It doesn't work.. Dim xlsApp As New Excel.Application Dim xlsBook As Excel.Workbook Dim xlsSheet As Excel.Worksheet Dim dir As String = Application.StartupPath & "\Template\SampleTemplate.xls" xlsBook = GetObject(dir) xlsSheet = xlsBook.Sheets("Per BPA Error Report") xlsSheet.Range("C2:T2").Merge() xlsApp.DisplayAlerts = False xlsSheet.SaveAs(Application.StartupPath & "\Template\SampleTemplate.xls") xlsBook = Nothing xlsSheet = Nothing xlsApp.Quit()

    Read the article

  • Using a c# .net object in an Excel VBA form

    - by Mark O'G
    Hi I have a .net object that I want to use in Excel. I have an existing VBA script that i need to alter to call this the object from. I have then converted the object to a TLB. I've not really touched on this area before so any help will be appreciated. I have created an interface [Guid("0F700B48-E0CA-446b-B87E-555BCC317D74"),InterfaceType(ComInterfaceType.InterfaceIsDual)] public interface IOfficeCOMInterface { [DispId(1)] void ResetOrder(); [DispId(2)] void SetDeliveryAddress(string PostalName, string AddressLine1, string AddressLine2, string AddressLine3, string AddressLine4, string PostCode, string CountryCode, string TelephoneNo, string FaxNo, string EmailAddress); } I have also created an class that inherits that object. [ClassInterface(ClassInterfaceType.None), ProgId("NAMESPACE.OfficeCOMInterface"), Guid("9D9723F9-8CF1-4834-BE69-C3FEAAAAB530"), ComVisible(true)] public class OfficeCOMInterface : IOfficeCOMInterface, IDisposable { public void ResetSOPOrder() { } public void SetDeliveryAddress(string PostalName, string AddressLine1, string AddressLine2, string AddressLine3, string AddressLine4, string PostCode, string CountryCode, string TelephoneNo, string FaxNo, string EmailAddress) { try { SalesOrder.AmendDeliveryAddress(PostalName, AddressLine1, AddressLine2, AddressLine3, AddressLine4, PostCode); MessageBox.Show("Delivery address set"); } catch (Exception ex) { throw ex; } } }

    Read the article

  • view handler design pattern

    - by Mark Roberts
    I'm trying to figure out the origin of the view handler design pattern in software engineering. Many of the design patterns in software engineering were inspired by things which pre-date computers, and I was wondering if anybody had any insights on the origin of this particular pattern.

    Read the article

  • How can one fetch partial objects in NHibernate?

    - by mark
    Dear ladies and sirs. I have an object O with 2 fields - A and B. How can I fetch O from the database so that only the field A is fetched? Of course, my real application has objects with many more fields, but two fields are enough to understand the principal. I am using NHibernate 2.1. Thanks.

    Read the article

  • How to "uninstantiate" an object?

    - by Mark
    I wrote a function in Python: def instantiate(c): if inspect.isclass(c): return c() elif isinstance(c, object): return c else: raise Exception, '%s is not an object or class.' % c Now I want to do the opposite: get the class from an already instantiated object so that I can re-instantiate it with different parameters. How can I do that?

    Read the article

  • scaleX scaleY increeasing left, top margin, and line spacing

    - by Mark
    If you have Text with a font that is 72 point for example (and scaleX scaleY = 1) you can achieve the same size with a font size of 12 and scaleX,scaleY = 6. For reasons that would take too long to explain I am applying a large scale factor as in the latter example. The problem is, even though the text is the same size, the line spacing and left and top margins have all been increased but I want them to be the same size as well. As far as the line spacing, I discovered that TextFormat.leading was being automatically increased when scaleX, scaleY was greater than 1, so I just had to reset TextFormat.leading back to 0. That leaves the left and top margins, and I have no idea how those are being increased. I tried TextFormat.blockIndent=0 and TextFormat.leftMargin=0 (and also ingnorePadding=true) and it had no effect. And have no clue how to reset the top margin either to its orginal size, in case anyone has an idea for all these.

    Read the article

< Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >