Search Results

Search found 1295 results on 52 pages for 'hook'.

Page 17/52 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • How do I recover from pushing a gitosis.conf file with parsing errors due to line breaks?

    - by Kasia
    I have successfully set up gitosis for an Android mirror (containing multiple git repositories). While adding a new .git path following writable= in gitosis.conf I managed to insert a few line breaks. Saved, committed and pushed to server when I received the following parsing error: Traceback (most recent call last): File "/usr/bin/gitosis-run-hook", line 8, in load_entry_point('gitosis==0.2', 'console_scripts', 'gitosis-run-hook')() File "/usr/lib/python2.5/site-packages/gitosis-0.2-py2.5.egg/gitosis/app.py", line 24, in run return app.main() File "/usr/lib/python2.5/site-packages/gitosis-0.2-py2.5.egg/gitosis/app.py", line 38, in main self.handle_args(parser, cfg, options, args) File "/usr/lib/python2.5/site-packages/gitosis-0.2-py2.5.egg/gitosis/run_hook.py", line 75, in handle_args post_update(cfg, git_dir) File "/usr/lib/python2.5/site-packages/gitosis-0.2-py2.5.egg/gitosis/run_hook.py", line 33, in post_update cfg.read(os.path.join(export, '..', 'gitosis.conf')) File "/usr/lib/python2.5/ConfigParser.py", line 267, in read self._read(fp, filename) File "/usr/lib/python2.5/ConfigParser.py", line 490, in _read raise e ConfigParser.ParsingError: File contains parsing errors: ./gitosis-export/../gitosis.conf (...) I have removed the line break and amendend the commit by git commit -m "fix linebreak" --amend However git push still yields the exact same error. It leads me to believe gitosis is preventing me from doing any further pushes. How do I recover from this?

    Read the article

  • How do you replicate changes from one excel sheet to another in two separate excel apps?

    - by incognick
    This is all in C# .NET Excel Interop Automation for Office 2007. Say you create two excel apps and open the same workbook for each application: app = new Excel.ApplicationClass(); app2 = new Excel.ApplicationClass(); string fileLocation = "myBook.xslx"; workbook = app.Workbooks.Open(fileLocation, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); workbook2 = app2.Workbooks.Open(fileLocation, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); Now, I want to replicate any changes that occur in workbook2, into workbook. I figured out I can hook up the SheetChanged event to capture cell changes: app.SheetChange += new Microsoft.Office.Interop.Excel.AppEvents_SheetChangeEventHandler(app_SheetChange); void app_SheetChange(object Sh, Microsoft.Office.Interop.Excel.Range Target) { Excel.Worksheet sheetReadOnly = (Excel.Worksheet)Sh; string changedRange = Target.get_Address(missing, missing, Excel.XlReferenceStyle.xlA1, missing, missing); Console.WriteLine("The value of " + sheetReadOnly.Name + ":" + changedRange + " was changed to = " + Target.Value2); Excel.Worksheet sheet = workbook.Worksheets[sheetReadOnly.Index] as Excel.Worksheet; Excel.Range range = sheet.get_Range(changedRange, missing); range.Value2 = Target.Value2; } How do you capture calculate changes? I can hook onto the calculate event but the only thing that is passed is the sheet, not the cells that were updated. I tried forcing an app.Calculate() or app.CalculateFullRebuild() but nothing updates in the other application. The change event does not get fired when formulas change (i.e. a slider control causes a SheetCalculate event and not a SheetChange event) Is there a way to see what formulas were updated? Or is there an easier way to sync two workbooks programmatically in real time?

    Read the article

  • How to disable selective keys on the keyboard?

    - by Vilx-
    I'd like to write an application which disables certain keys on the keyboard while it's working. More specifically I'm interested in keys that might make the application loose focus (like ALT+TAB, WinKey, Ctrl+Shift+Esc, etc.) The need for this is has to do with babies/animals bashing wildly at the keyboard. :) My first idea was to use SetWindowsHookEx, however I ran into a problem. Since I need a global hook, the procedure would have to reside in a .DLL which would get injected in all active applications. But a .DLL can be either 64-bit or 32-bit, not both. And on a 64-bit system there are both types of applications. I guess then that I must write two copies of the hook .DLL - one for 32-bit and the other for 64-bit. And then I'd also have to launch two copies of the application as well, because the application first has to load the DLL itself before it can pass it on to SetWindowsHookEx(). Sounds pretty clumsy and awkward. Is there perhaps a better way? Or maybe I've misunderstood something?

    Read the article

  • dotNet Templated, Repeating, Databound ServerControl: Modifying underlying ServerControl data per te

    - by Campbeln
    I have a server control that wraps an underlying class which manages a number of indexes to track where it is in a dataset (ie: RenderedRecordCount, ErroredRecordCount, NewRecordCount, etc.). I've got the server control rendering great, but OnDataBinding I'm having an issue as to seems to happen after CreateChildControls and before Render (both of which properly manage the iteration of the underlying indexes). While I'm somewhat familiar with the ASP.NET page lifecycle, this one seems to be beyond me at the moment. So... How do I hook into the iterative process OnDataBinding uses so I can manage the underlying indexes? Will I have to iterate over the ITemplates myself, managing the indexes as I go or is there an easier solution? [edit: Agh... writing the problem out is very cathartic... I'm thinking this is exactly what I will need to do...] Also... I implemented the iteration of the underlying indexes during CreateChildControls originally in the belief that was the proper place to hook in for events like OnDataBinding (thinking it was done as the controls were being .Add'd). Now it seems that this may actually be unnecessary. So I guess the secondary question is: What happens during CreateChildControls? Are the unadulterated (read: with various <%-tags in place) controls added to the .Controls collection without any other processing?

    Read the article

  • Module not found

    - by TMP
    Hi There! I've been working on this one quite a bit and haven't gotten any closer to a solution. I juut dug up my old copy of the WindowsHookLib again - It's available with source at http://www.codeproject.com/KB/DLL/WindowsHookLib.aspx. This library allows Global Windows Mouse/Keyboard/Clipboard Hooks, which is very useful. I'm trying to use the Mouse Hook in here to Capture Mouse-Motion (I could use a Timer that always polls Cursor.Position, but I plan on using more features of WindowsHookLib later). Code as follows: MouseHook mh = new MouseHook(); mh.InstallHook(); mh.MouseMove += new EventHandler<WindowsHookLib.MouseEventArgs>(mh_MouseMove); But on the call to InstallHook(), I get an Exception: "The specified Module could not be found". Strange. Searching, I found that someone thought this occurs because a DLL is not in a place included in the Windows PATH variable, and because placing it in system32 didn't help I went the whole hog and translated the thing to C# for inclusion directly in my project (I was curious how it works). However the error was obstinately persistent, so I dug a bit on this, and found the Code in the Library that is responsible: In InstallHook(), we have IntPtr hinstDLL = Marshal.GetHINSTANCE(Assembly.GetExecutingAssembly().GetModules()[0]); this._hMouseHook = UnsafeNativeMethods.SetWindowsHookEx(14, this._mouseProc, hinstDLL, 0); if (this._hMouseHook == IntPtr.Zero) { throw new MouseHookException(new Win32Exception(Marshal.GetLastWin32Error()).Message); } And this (after modification and recompile) tells me that what I'm really getting is a Windows error "ERROR_MOD_NOT_FOUND"! Now, Here I'm stumped. Didn't I just compile the Hook Library directly into my project? (UnsafeMethods.SetWindowsHookEx is just a DllImported Method from user32) Any Answers, or Prods in the right direction, or any hints, pointers or similar are very much appreciated!

    Read the article

  • Drupal theme preprocess function - primary links and suckerfish menus

    - by slimcady
    I have a preprocess function that works fine when the menu is single level list. However I would like it to work w/ suckerfish menus. I want to add a class to the top level menu item so that I can style it. This is the code I used for the single level menu: function cti_flex_preprocess_page(&$vars, $hook) { // Make a shortcut for the primary links variables $primary_links = $vars['primary_links']; // Loop thru the menu, adding a new class for CSS selectors $i = 1; foreach ($primary_links as $link => $attributes){ // Append the new class to existing classes for each menu item $class = $attributes['attributes']['class'] . " item-$i"; // Add revised classes back to the primary links temp variable $primary_links[$link]['attributes']['class'] = $class; $link['title'] = '<span class="hide">' . check_plain($link['title']) . '</span>'; $i++; } // end the foreach loop // reset the variable to contain the new markup $vars['primary_links'] = $primary_links; } I've been trying to use the menu_tree() function to no avail, for example: function cti_flex_preprocess_page(&$vars, $hook) { // Make a shortcut for the primary links variables $primary_links = $vars['primary_links']; // Loop thru the menu, adding a new class for CSS selectors $i = 1; foreach ($primary_links as $link => $attributes){ // Append the new class to existing classes for each menu item $class = $attributes['attributes']['class'] . " item-$i"; // Add revised classes back to the primary links temp variable $primary_links[$link]['attributes']['class'] = $class; $link['title'] = '<span class="hide">' . check_plain($link['title']) . '</span>'; $i++; } // end the foreach loop // reset the variable to contain the new markup $vars['primary_links_tree'] = menu_tree(variable_get('menu_primary_links_source', '$primary_links')); } Any ideas would be greatly appreciated.

    Read the article

  • Updating table row by given id with jQuery

    - by fabrik
    Hello all! I need to update a specific table row (via tr id="unique_key") after a successful AJAX call. HTML fragment: <a name=\"p{$product_id}\" class=\"tr{$product_id}\"></a> <tr id="p{product_id}" class="item-row"> <td><h3>{product_id}</h3><a rel="facebox" href="ajax_url">{product_name}</a></td> <td>{image_information}</td> <td>{image_sortiment}</td> <td>{product_status}</td> </tr> Javascript: // AJAX Call success: function(msg){ $('#p' + prod_id).remove(); $('.tr' + prod_id).after(msg); $('#p' + prod_id + ' a[rel*=facebox]').facebox(); } ... What happens: The table row removed Anchors grouped into one single row (not before their <tr>'s) so my 'hook' disappears AJAX result inserted over the whole table (after my 'hook' but still a wrong place) What's wrong with my idea? How can i force jQuery to 'overwrite' the required table row?

    Read the article

  • Why does the BackgroundWorker in WPF need Thread.Sleep to update UI controls?

    - by user364060
    namespace WpfApplication1 { /// <summary> /// Interaction logic for Window1.xaml /// </summary> public partial class Window1 : Window { BackgroundWorker bgWorker; Action<int> myProgressReporter; public Window1() { InitializeComponent(); bgWorker = new BackgroundWorker(); bgWorker.DoWork += bgWorker_Task; bgWorker.RunWorkerCompleted += myWorker_RunWorkerCompleted; // hook event to method bgWorker.ProgressChanged += bgWorker_ReportProgress; // hook the delegate to the method myProgressReporter = updateProgress; bgWorker.WorkerReportsProgress = true; } private void myWorker_RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e) { object result; result = e.Result; MessageBox.Show(result.ToString()); progressBar1.Value = 0; button1.IsEnabled = true; } private void bgWorker_ReportProgress(object sender, ProgressChangedEventArgs e) { System.Windows.Threading.Dispatcher disp = button1.Dispatcher; disp.BeginInvoke(myProgressReporter,e.ProgressPercentage); //Dispatcher.BeginInvoke(myProgressReporter, DispatcherPriority.Normal, e.ProgressPercentage); } private void updateProgress(int progressPercentage) { progressBar1.Value = progressPercentage; } private void bgWorker_Task(Object sender, DoWorkEventArgs e) { int total = 1000; for (int i = 1; i <= total; i++) { if (bgWorker.WorkerReportsProgress) { int p = (int)(((float)i / (float)total) * 100); bgWorker.ReportProgress(p); } Thread.Sleep(1); // Without Thread.Sleep(x) the main thread freezes or gives stackoverflow exception, } e.Result = "Completed"; } private void button1_Click(object sender, RoutedEventArgs e) { if(!bgWorker.IsBusy) bgWorker.RunWorkerAsync("This is a background process"); button1.IsEnabled = false; } } }

    Read the article

  • How do you use a view with arguments as the site front page in Drupal?

    - by Justin
    I have a Drupal site and I have setup a view to power the front page. My goal is to be able to pass 0-2 arguments to the home page, that get passed into the view. However, I still need the normal Drupal pages to work. The list of arguments is known. For example: mysite.com/berlin/birds would pass in "berlin" as the first argument and "birds" as the second argument to the view that powers the front page. mysite.com/berlin would just pass in one argument, "berlin" mysite.com/admin would load the normal admin pages in Drupal I'm not clear on how to achieve this. Is there a hook I can use? I can't find one or think of one. Is there a way to specify this in the argument for the view itself? Perhaps I can write a hook that interjects when the URL is being loaded, and rewrite in the background? The solution I currently have is to add these paths (since my arguments are known) to the menu system. This works, except that when I the pages they aren't the front page, so the pages don't use the node themes I want (they use the node details theme).

    Read the article

  • Deserialization of a DataSet... deal with column name changes? how to migrate data from one column to another?

    - by Brian Kennedy
    So, we wanted to slightly generalize a couple columns in our typed dataset... basically dropped a foreign key constraint and then wanted to change a couple column names to better reflect their new state. All that is easy. The problem is that our users may have serialized out the old version of the DataSet as XML. We want to be able to read those old XML files and deserialize them into the revised DataSet. It seems that would be a fairly common desire... but I haven't yet figured out the right thing to search the internet for. One possible solution would seem to be some way to give a DataColumn an alias or alternate name such that when it reads the old column name, it knows that data can be read into the column with the new column name. I can find no support for any such thing. Another approach would seem to be an "after deserialization" method of some sort... so, I would let it read in the old column values into a normal DataColumn with that name, and then in the "after deserialization" method I would just move the data from the obsolete column into the new column, and then delete the old columns. That would seem to generalize to many other situations... and having such events or hooks is pretty common in ADO.NET. But I have looked for such a hook and haven't yet found it. If no "after deserialization" hook, it would seem I ought to be able to override ReadXml or ReadXmlSerializable methods to call the base and then do my "after" stuff to fix up old data into new. But it does not appear that is possible. Soooo, I have to think backward compatibility with old serialized DataSets and simple data migration would be a well-solved problem... so, trying to reinvent that wheel seems silly. But so far, I haven't seemed to find any documentation on doing those things. Suggestions? What is best practice for this?

    Read the article

  • dotNet Templated, Repeating, Databound ServerControl: Counting the templates OnDataBind?

    - by Campbeln
    I have a server control that wraps an underlying class which manages a number of indexes to track where it is in a dataset (ie: RenderedRecordCount, ErroredRecordCount, NewRecordCount, etc.). I've got the server control rendering great, but OnDataBinding I'm having an issue as to seems to happen after CreateChildControls and before Render (both of which properly manage the iteration of the underlying indexes). While I'm somewhat familiar with the ASP.NET page lifecycle, this one seems to be beyond me at the moment. So... how do I hook into the iterative process OnDataBinding uses so I can manage the underlying indexes? Will I have to iterate over the ITemplates myself, managing the indexes as I go or is there an easier solution? Also... I implemented the iteration of the underlying indexes during CreateChildControls originally in the belief that was the proper place to hook in for events like OnDataBinding (thining it was done as the controls were being .Add'd). Now it seems that this may actually be unnecessary. So I guess the secondary question is: What happens during CreateChildControls? Are the unadulterated (read: with <%-tags in place) controls added to the .Controls collection without any other processing?

    Read the article

  • How to set up a mini call center?

    - by Ralph
    I'm trying to figure out how to set up a miniature call center for a small business. Like, for 1-4 people to take calls, but hopefully expandable to more. We want to accept nation-wide calls, and then I guess distribute the calls among the available agents. If no one is available, I guess it should either put them in a queue and play some annoying music for them, or forward to call to an agent who has least-recently taken a call who can then quickly answer and say "please hold" until they're done their call. We want to have one phone number that customers can call. I guess we then need some kind of ACD system which would take each call and forward it to an agent based on some algorithm? Then we would need to purchase a separate phone line for each agent, plus one just for the distributor? Or do we need several "extra" lines to maintain a queue (one for each customer waiting too)? This "ACD" thing, is it just a device that you would plug a phone line into (or several?), and maybe connect to a computer, aided by some software? Or is a subscription thing that I would need from my local telephone provider? Next, the business we're running, the callers will be repeat customers. It would be helpful to automatically pull up their profile based on the incoming number. The "software" our agents will be running will just be a website where they can log in (preferably from home) and then enter some information they would obtain through the call. So, the system would have to somehow interface with the website if possible. If not, we'll just have to ask each customer for an identifier (phone number, username, customer number, or something). Is this possible? I guess each computer would need a device that the call would pass through, and then if I can somehow hook into that, then I can write some software that will interface with the site. So, where do I start? What hardware do we need to buy? What subscriptions do we need? We were thinking this magicJack might help us in accepting long-distance calls for cheaper, but my understanding is that they provide you with some weird-looking number, is there a way we could "mask" it with our toll-free number? And then pass the incoming calls through the distributor system, which would then get passed to the call-accepting device which would both allow an agent to answer the call and have a software hook? (I realize this might be partially out of the scope of SU, but I wasn't sure where else to ask. It is about computer(-aided) hardware and software anyway.) P.S.: I don't need any of that "press 1 to talk to..." or "say xyz to..." junk. Just a straight-forward, connect-to-next-available-agent system.

    Read the article

  • external monitor for smart phones

    - by Kevin Nevin
    I use a web based CRM but can view enough of the information displayed once I am logged into the CRM on the HTC Touch Pro2. Ideally I would like to hook up an external portable monitor to the Touch Pro2 to increase my functionality of this CRM.

    Read the article

  • High quality (commercial) Text to English speech software? [closed]

    - by bodacydo
    I'm working on a software project and I am researching text-to-speech products to use. Does anyone know what are the current state of the art text-to-speech systems? Ideally the speech should be indistinguishable from a native American or English speaker. I'm looking for products with SDK or API that I can easily hook into. Just to clarify and iterate on my question - I'm not looking for things like Microsoft's free text-to-speech synthesis program, I'm looking for a high quality professional product.

    Read the article

  • Unable to connect Third monitor to my workstation

    - by Prashant
    I have Dell Optiplex 960 with ATI Radeon HD 3470 graphics card, which allowed me to hook two monitors to it. However there is still VGA port on mother board is unused. I tried plugging another monitor, surprisingly my third monitor doesn't directed. Can any one give me a hint how to fix this problem?

    Read the article

  • Delay after commit before Redmine comments ticket

    - by Paul
    I was used to having a post-commit hook trigger processing of the commit message by Trac (SVN repository). The comment (or action) was added immediately. Now I switched to Mercurial as a VCS and Redmine as a ticketing system. Redmine does recognize information in changeset/commit messages like "refs #185" - but it takes several minutes to appear in the ticket. Any ideas why this is? Is the routine to grab the changesets called periodically somehow?

    Read the article

  • Wireless network relay?

    - by IPX Ares
    Is there hardware (links would be great) that can connect to the wireless internet already in my house and provide hard links to other hardware? Basically the problem is that my basement is not wired up to let me hook up my cable modem. I have some electronics that do not have wireless and need a LAN wire. Is there something I could plug in downstairs to act as a relay hub?

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >