Daily Archives

Articles indexed Sunday March 28 2010

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

  • Debugging matchit plugin in vim (under Cygwin)

    - by system PAUSE
    The "matchit" plugin for vim is supposed to allow you to use the % key to jump between matching start/end tags when editing HTML, as well as /* and */ comment delimiters when editing other kinds of code. I've followed the exact instructions in ":help matchit", but % still doesn't work for me. It seems silly to ask "Why doesn't this work?" so instead I'm asking How can I diagnose the problem? Pointers to references are welcome, but specific vim-plugin-debugging techniques are preferred. Here is the ~/.vim directory: $ ls -ltaGR ~/.vim /cygdrive/y/.vim: total 0 drwxr-xr-x 1 spause 0 Sep 17 13:20 .. drwxr-xr-x 1 spause 0 Sep 16 13:59 doc drwxr-xr-x 1 spause 0 Sep 16 13:58 . drwxr-xr-x 1 spause 0 Sep 16 13:58 plugin /cygdrive/y/.vim/doc: total 24 -rw-r--r-- 1 spause 1961 Sep 16 13:59 tags drwxr-xr-x 1 spause 0 Sep 16 13:59 . -rw-r--r-- 1 spause 19303 Sep 16 13:58 matchit.txt drwxr-xr-x 1 spause 0 Sep 16 13:58 .. /cygdrive/y/.vim/plugin: total 32 drwxr-xr-x 1 spause 0 Sep 16 13:58 .. -rw-r--r-- 1 spause 30714 Sep 16 13:58 matchit.vim drwxr-xr-x 1 spause 0 Sep 16 13:58 . I am running vim 7.2 under Cygwin (installed Fall 2008). cygcheck shows: 1829k 2008/06/12 C:\cygwin\bin\cygwin1.dll Cygwin DLL version info: DLL version: 1.5.25 DLL epoch: 19 DLL bad signal mask: 19005 DLL old termios: 5 DLL malloc env: 28 API major: 0 API minor: 156 Shared data: 4 DLL identifier: cygwin1 Mount registry: 2 Cygnus registry name: Cygnus Solutions Cygwin registry name: Cygwin Program options name: Program Options Cygwin mount registry name: mounts v2 Cygdrive flags: cygdrive flags Cygdrive prefix: cygdrive prefix Cygdrive default prefix: Build date: Thu Jun 12 19:34:46 CEST 2008 CVS tag: cr-0x5f1 Shared id: cygwin1S4 In vim, :set shows: --- Options --- autoindent fileformat=dos shiftwidth=3 background=dark filetype=html syntax=html cedit=^F scroll=24 tabstop=3 expandtab shelltemp textmode viminfo='20,<50,s10,h Notably, the syntax and filetype are both recognized as HTML. (The syntax colouring is just fine.) If additional info is needed, please comment. UPDATE: Per answer by too much php: After trying vim -V1, I had changed my .vimrc to include a line set nocp so the compatible option is not on. :let loadad_matchit loaded_matchit #1 :set runtimepath? runtimepath=~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim72,/usr/share/vim/vimfiles/after,~/.vim/after (~ is /cygdrive/y) Per answer by michael: :scriptnames 1: /cygdrive/y/.vimrc 2: /usr/share/vim/vim72/syntax/syntax.vim 3: /usr/share/vim/vim72/syntax/synload.vim 4: /usr/share/vim/vim72/syntax/syncolor.vim 5: /usr/share/vim/vim72/filetype.vim 6: /usr/share/vim/vim72/colors/evening.vim 7: /cygdrive/y/.vim/plugin/matchit.vim 8: /cygdrive/y/.vim/plugin/python_match.vim 9: /usr/share/vim/vim72/plugin/getscriptPlugin.vim 10: /usr/share/vim/vim72/plugin/gzip.vim 11: /usr/share/vim/vim72/plugin/matchparen.vim 12: /usr/share/vim/vim72/plugin/netrwPlugin.vim 13: /usr/share/vim/vim72/plugin/rrhelper.vim 14: /usr/share/vim/vim72/plugin/spellfile.vim 15: /usr/share/vim/vim72/plugin/tarPlugin.vim 16: /usr/share/vim/vim72/plugin/tohtml.vim 17: /usr/share/vim/vim72/plugin/vimballPlugin.vim 18: /usr/share/vim/vim72/plugin/zipPlugin.vim 19: /usr/share/vim/vim72/syntax/html.vim 20: /usr/share/vim/vim72/syntax/javascript.vim 21: /usr/share/vim/vim72/syntax/vb.vim 22: /usr/share/vim/vim72/syntax/css.vim Note that matchit.vim, html.vim, tohtml.vim, css.vim, and javascript.vim are all present. :echo b:match_words E121: Undefined variable: b:match_words E15: Invalid expression: b:match_words Hm, this looks highly relevant. I'm now looking through :help matchit-debug to find out how to fix b:match_words.

    Read the article

  • Path.Combine for Urls?

    - by Brian MacKay
    Path.Combine is handy, is there a similiar function in the framework for Urls? I'm looking for syntax like this: Url.Combine("Http://MyUrl.com/", "/Images/Image.jpg") ...Which would return: "Http://MyUrl.com/Images/Image.jpg" ...Of course string concatenation would be fine here since the '//' would be handled intelligently by the browser. But it feels a little less elegant.

    Read the article

  • Convert binary information to regular data type without outside modules in python.

    - by vgm64
    Hello World. I'm tasked with reading a poorly formatted binary file and taking in the variables. Although I need to do it in C++ (ROOT, specifically), I've decided to do it in python because python makes sense to me, but my plan is to get it working in python and then tackle re-writing in in C++, so using easy to use python modules won't get me too far later down the road. Basically, I do this: In [5]: some_value Out[5]: '\x00I' In [6]: ''.join([str(ord(i)) for i in some_value]) Out[6]: '073' In [7]: int(''.join([str(ord(i)) for i in some_value])) Out[7]: 73 And I know there has to be a better way. What do you think?

    Read the article

  • How can I extend DynamicQuery.cs to implement a .Single method?

    - by Yoenhofen
    I need to write some dynamic queries for a project I'm working on. I'm finding out that a significant amount of time is being spent by my program on the Count and First methods, so I started to change to .Single, only to find out that there is no such method. The code below was my first attempt at creating one (mostly copied from the Where method), but it's not working. Help? public static object Single(this IQueryable source, string predicate, params object[] values) { if (source == null) throw new ArgumentNullException("source"); if (predicate == null) throw new ArgumentNullException("predicate"); LambdaExpression lambda = DynamicExpression.ParseLambda(source.ElementType, typeof(bool), predicate, values); return source.Provider.CreateQuery( Expression.Call( typeof(Queryable), "Single", new Type[] { source.ElementType }, source.Expression, Expression.Quote(lambda))); }

    Read the article

  • Article search engine in php

    - by Jason
    Hello, I am using sphinx as a search engine on my website its working perfect and I have no complain with it. The only thing it lacks is, it does not allow me to search articles whose query length is more than 15 words. I know in reality people don't use more than 3-4 words i want to use it for finding duplicate contents. I was wondering if there is any alternative solution to sphinx. I want to cope with duplicate contents. My main articles table is in innodb but I am also caching articles into MyISAM table as well for full text searching but when I search an article it takes ages to perform one search. Its not the query problem, i think mysql lacks the fulltext searching facility. Thanks Jason

    Read the article

  • How to get Autocomplete functionality without a control

    - by rahulchandran
    If you supply a list of strings to an edit control and set the autocomplete mode and source then you automatically get autocomplete functionality. My question is can I get the same functionality in .NET somewhere without a control. In other words I want something like: string[] ProgressivePartialMatch( string[] Strings, string MatchText ) and so I want the strings back that would have showed up in the autocomplete, so to speak.

    Read the article

  • Are there people using scheme out there?

    - by Nick
    Hey, I have just started to study computer sciences at the university where they teach us programming in scheme. Since i have learned c++ for the last 6 years, scheme appears a little odd to me. But they tell me you can write any program you can write in C or Java with it. Is anybody really using this language?

    Read the article

  • SQL Saturday Richmond, VA

    - by Mike
    Very excited to announce that I’ll be holding 2 sessions at SQL Saturday in VA on April 10th. If there are any frequent readers of SQLTeam.com attending, please make sure to say hi! Topics I’m covering are partitioning & loading data real time and an introduction to performance tuning. Hope to see you there! SQL Saturday Richmond Schedule

    Read the article

  • SSL cert install in Mongrel

    - by normalocity
    Running a RoR app. I've created a self-signed SSL cert for my test/dev environment, which consists of a single mongrel, and Mac OS X Leopard. Can I install the SSL cert in such a way that mongrel will use it, or do I have build a different server stack to handle SSL (e.g. Apache in front of a mongrel cluster), and install the cert inside of Apache? For my production server, I'll eventually build a server stack like this, so it's no big deal if I have to go that direction - it's just a question of now or later. Thanks!

    Read the article

  • Cocoa: getting a Table View cell to send action messages

    - by underthetable
    I'm really having trouble getting a Cocoa Table View cell to send action messages. At the most basic level, in IB there is an action assigned for the NSTextViewCell object, and after editing and pressing Return nothing happens. So I have an IBOutlet hooked up to the NSTextViewCell, and have been experimenting with NSActionCell messages to it. But the Table View seems to pretty much just ignore them. I've also tried subclassing NSTextViewCell, but the methods I'm seeing all look like they want to pass values to the object from somewhere, not return a value from inside the object to configure its behavior. I'm pretty new to programming and Cocoa -- can someone explain each thing that needs to be overridden and how and where to do it?

    Read the article

  • Can I can configure cxf to use a specific XML parser?

    - by CJS
    Is there a way to specify which XML parser cxf uses? Either through the cfx.xml file or programmatically? Our app has the Woodstox parser on its classpath, and cxf seems to be using that by default. However, the Woodstox implementation seems to truncate large Base64 encoded byte arrays in the SOAP packet. Removing Woodstox from the classpath eliminates this truncation problem, but that's not an option right now since other parts of our app also depends on Woodstox. It would be ideal if I could simply tell cxf to use another XML parser. Is this possible?

    Read the article

  • IEnumerable<T>.Concat -- A replacement that can work without changing the reference?

    - by Earlz
    Hello, I've recently been bitten by the (way too commmon in my opinion) gotcha of Concat returns it's result, rather than appending to the list itself. For instance. List<Control> mylist=new List<Control>; //.... after adding Controls into mylist MyPanel.Controls.Concat(mylist); //This will not affect MyPanel.Controls at all. MyPanel.Controls=MyPanel.Controls.Concat(mylist); //This is what is needed, but the Controls reference can not be reassigned (for good reason) So is there some other way of combining two lists that will work when the collection reference is read-only? Is the only way to do this with a foreach? foreach(var item in mylist){ MyPanel.Controls.Add(item); } Is there a better way without the foreach?

    Read the article

  • Cakephp, JQuery JCarousel Lite, Error

    - by ion
    I am using the following code to make an unordered list into a carousel with jcarousel lite and jquery: <?php echo $this->Html->script(array('jquery-1.4.2.min','jquery.easing.1.1','jcarousellite_1.0.1.pack','jquery.mousewheel.min'), array('inline' => false)); ?> <?php echo $this->Html->scriptStart(array('inline' => false)); ?> $(document).ready(function() { $(".mouseWheelButtons .jCarouselLite").jCarouselLite({ btnNext: ".mouseWheelButtons .next", btnPrev: ".mouseWheelButtons .prev", mouseWheel: true, circular: false, start: 0, visible: 5, easing: "easein" }); }); <?php echo $this->Html->scriptEnd(); ?> However I'm getting the following javascript error in firebug: a[0] is undefined Does anyone know what is causing the error. I am using the packed version of jcarousel lite. The thing is that the code worked in cakephp 1.2 but now i'm using 1.3 and I have updated the syntax using scriptstart, scriptEnd and Html-script.

    Read the article

  • Good IDE for Mono on Windows

    - by Paja
    I would like to develop Mono application for Win/Linux/Mac in C# on Windows. Is there any really good (Visual Studio comparable) IDE for that? The best would be if I could manage Visual C# Express to compile solutions using the Mono compiler. I've found a #develop IDE, which looks very cool and has many features that Express edition of the Visual Studio hasn't (like plugins for TortoiseSVN, NUnit, etc). Hovewer the 3.* versions dropped support for Mono, so you are no longer able to compile solutions using the Mono compiler. There is also a MonoDevelop. I've tried it and it sucks. Not comparable to Visual Studio at all. No WinForms designer, + tons of other missing features. I would just like if they would drop the development of MonoDevelop and build a plugin for #develop instead. Is there any other good enough IDE, or is it possible to make the Visual C# Express or #develop compile the solutions with Mono compiler?

    Read the article

  • Problem retrieving Strings from varbinary columns using HIbernate and MySQL

    - by user303396
    Hello, Here's my scenario. I save a bunch of Strings containing asian characters in MySQL using Hibernate. These strings are written in varbinary columns. Everything works fine during the saving operation. The DB contains the correct values (sequence of bytes). If I query (again using Hibernate) for the Strings that I saved I get the correct results. But when Hibernate fills the entity to which the Strings belong with the values from the DB I get different values then the ones I used in the query that retrieved them. Instead of receiving the correct values I receive a bunch of FFFD replacement characters. For example: if I store "??" in the DB and then I query for it, the resulting String will be \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD. the DB connection has the following parameters set useUnicode=true&characterEncoding=UTF-8, I've tried using the true UTF-8 configurations for Hibernate but that didn't solve the problem What am I missing? Any suggestions? Thanks

    Read the article

  • Learning Link Building Tactics

    If you ask search engine optimization professionals about most vital factors to get good ranking in SE results, almost all of them will say that it is "backlinks". Backlinks are like votes from other sites to yours and the more votes your site has, the better would be your site's ranking.

    Read the article

  • QT's QGraphicsview clickable icon on screen

    - by goodwince
    I'm working on a project with QT and am trying to draw icons from a database. I have auxiliary information in the table that I would like to display if the user chooses to see it (i.e. the x,y of the icon and some other options from database). I am debating on would it be better to go through and just redraw all the icons with this information added, or do some sort of looping through the icons and setting some value to true to display the information. Thanks in advance.

    Read the article

  • Image cropping in PHP is producing blank result

    - by thinkswan
    I'm simply trying to crop a JPEG image (no scaling) using PHP. Here is my function, along with the inputs. function cropPicture($imageLoc, $width, $height, $x1, $y1) { $newImage = imagecreatetruecolor($width, $height); $source = imagecreatefromjpeg($imageLoc); imagecopyresampled($newImage,$source,0,0,$x1,$y1,$width,$height,$width,$height); imagejpeg($newImage,$imageLoc,90); } When I call it as follows--cropPicture('image.jpg', 300, 300, 0, 0)--the function completes properly, but I'm left with a black image that is 300x300 px (in other words, a blank canvas). Am I passing in the wrong arguments? The image exists and is writeable.

    Read the article

  • jQuery $.ajax success must be a callback function?

    - by b. e. hollenbeck
    I've created a wrapper function for jQuery's $.ajax() method so I can pass different dataTypes and post variables - like so: function doPost(dType, postData, uri){ $.ajax({ url: SITE_URL + uri, dataType: dType, data: postData, success: function(data){ return data; }); } The problem I'm having is getting the data (which is always JSON) back out. I've tried setting a var ret before the $.ajax() function call and setting it as ret = data in the success function. Am I being stupid about this? If I don't set a success function, will the $.ajax simply return the data? Or is it just success: return data? Or does success require a callback function to handle the data, which could just be return data?

    Read the article

  • Understanding glm$residuals and resid(glm)

    - by Michael Bishop
    Hi, Can you tell me what is returned by glm$residuals and resid(glm) where glm is a quasipoisson object. e.g. How would I create them using glm$y and glm$linear.predictors. glm$residuals n missing unique Mean .05 .10 .25 .50 .75 .90 .95 37715 10042 2174 -0.2574 -2.7538 -2.2661 -1.4480 -0.4381 0.7542 1.9845 2.7749 lowest : -4.243 -3.552 -3.509 -3.481 -3.464 highest: 8.195 8.319 8.592 9.089 9.416 resid(glm) n missing unique Mean .05 .10 .25 37715 0 2048 -2.727e-10 -1.0000 -1.0000 -0.6276 .50 .75 .90 .95 -0.2080 0.4106 1.1766 1.7333 lowest : -1.0000 -0.8415 -0.8350 -0.8333 -0.8288 highest: 7.2491 7.6110 7.6486 7.9574 10.1932

    Read the article

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