Search Results

Search found 5136 results on 206 pages for 'comment bot'.

Page 84/206 | < Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >

  • How to make Emacs sql-mode recognize MySQL #-style comments?

    - by Ken
    I'm reading a bunch of MySQL files that use # (to end-of-line) comments, but my sql-mode doesn't support them. I found the syntax-table part of sql.el that defines /**/ and -- comments, but according to this, Emacs syntax tables support only 2 comment styles. Is there a way to add support for # comments in sql.el easily?

    Read the article

  • Why ruby has to_s and inspect?

    - by prosseek
    The p calls inspect, and puts/print calls to_s for representing its object. If I run class Graph def initialize @nodeArray = Array.new @wireArray = Array.new end def to_s # called with print / puts "Graph : #{@nodeArray.size}" end def inspect # called with p "G" end end if __FILE__ == $0 gr = Graph.new p gr print gr puts gr end I get G Graph : 0Graph : 0 Then, why does ruby has two functions do the same thing? What makes the difference between to_s and inspect? If I comment out the to_s or inspect function, I get as follows. ##

    Read the article

  • PHP: Simple, Validate if string is hex?

    - by oni-kun
    I have no clue how to validate this string. I am simply supplying an IV for an encryption, but can find no "is_hex()" or similar function, I can't wrap my head around it! I read on a comment in the php documentation (user contrib. notes) this: if($iv == dechex(hexdec($iv))) { //True } else { //False } But that doesn't seem to work at all.. It only says false. If it helps my input of my IV would be this: 92bff433cc639a6d

    Read the article

  • What is proper etiquette when someone posts copyrighted material? [closed]

    - by Turp
    I just ran into an answer in which the author included a link to a PDF book that was licensed only to them. I'm pretty sure this is copyrighted material and the author does not want copies of the book to be freely available on the web. What is the proper etiquette in this situation? Leave a comment? (I can't yet, I just joined) Mark as offensive? Contact a moderator?

    Read the article

  • Geshi on WebSVN makes my code files appear blank

    - by Travis Johnson
    In config.php, if i uncomment the following line $config->useGehsi(); Suddenly, when I load up a C# file, instead of showing the document, it's just a blank page. As soon as I comment out the code above, I'm able to see my C# file, but there's no syntax highlighting. Anyone have a solution to get GeSHi working with WebSVN when this kind of error occurs?

    Read the article

  • What is mangling tinyurls?

    - by djn
    Hello all. I've noticed that some form processors make a mess out of posted TinyURLs (converting the thing to a broken 'tinyurl": "http:\/?\/?tinyurl.com\/?whatever", "ok": tr') while leaving alone other plain URLs. I've seen it happen in WordPress, and I've seen it here on SO (eg.: http://stackoverflow.com/questions/2508690/whats-the-most-efficient-way-to-setup-a-multi-lingual-website - second comment to first answer). Has anybody looked into what component or function is doing this? Is there a way to prevent it?

    Read the article

  • Advice Needed To Normalise Database

    - by c11ada
    hey all, im trying to create a database for a feedback application in ASP.net i have the following database design. Username (PK) QuestionNo (PK) QuestionText FeedbackNo (PK) Username UserFeedbackNo (PK) FeedbackNo (FK) QuestionNo (FK) Answer Comment a user has a unique username a user can have multiple feedbacks i was wondering if the database design i have here is normalised and suitable for the application

    Read the article

  • Python float copy question

    - by SJA
    Hi, I'm puzzled by some behaviour I'm seeing when copying a float array member into another variable - please help! For example data_entry[1] = 9.6850069951 new_value = data_entry[1] <comment> #print both 9.6850069951 9.6850663300 I'm aware of the problem of binary storage of floats but I thought with a direct copy of memory we would end up with the same value. Any ideas? I need better precision than this! thanks in advance Stuart

    Read the article

  • Help me understand this C code

    - by Benjamin
    INT GetTree (HWND hWnd, HTREEITEM hItem, HKEY *pRoot, TCHAR *pszKey, INT nMax) { TV_ITEM tvi; TCHAR szName[256]; HTREEITEM hParent; HWND hwndTV = GetDlgItem (hWnd, ID_TREEV); memset (&tvi, 0, sizeof (tvi)); hParent = TreeView_GetParent (hwndTV, hItem); if (hParent) { // Get the parent of the parent of the... GetTree (hWnd, hParent, pRoot, pszKey, nMax); // Get the name of the item. tvi.mask = TVIF_TEXT; tvi.hItem = hItem; tvi.pszText = szName; tvi.cchTextMax = dim(szName); TreeView_GetItem (hwndTV, &tvi); //send the TVM_GETITEM message? lstrcat (pszKey, TEXT ("\\")); lstrcat (pszKey, szName); } else { *pszKey = TEXT ('\0'); szName[0] = TEXT ('\0'); // Get the name of the item. tvi.mask = TVIF_TEXT | TVIF_PARAM; tvi.hItem = hItem; tvi.pszText = szName; tvi.cchTextMax = dim(szName); if (TreeView_GetItem (hwndTV, &tvi)) //*pRoot = (HTREEITEM)tvi.lParam; //original hItem = (HTREEITEM)tvi.lParam; else { INT rc = GetLastError(); } } return 0; } The block of code that begins with the comment "Get the name of the item" does not make sense to me. If you are getting the listview item why does the code set the parameters of the item being retrieved? If you already had the values there would be no need to retrieve them. Secondly near the comment "original" is the original line of code which will compile with a warning under embedded visual c++ 4.0, but if you copy the exact same code into visual studio 2008 it will not compile. Since I did not write any of this code, and am trying to learn, is it possible the original author made a mistake on this line? The *pRoot should point to HKEY type yet he is casting to an HTREEITEM type which should never work since the data types don't match?

    Read the article

  • Please explain this Rails method to me like I'm a little kid.

    - by Senthil
    I found this in Ryan Bates' railscast site, but not sure how it works. #models/comment.rb def req=(request) self.user_ip = request.remote_ip self.user_agent = request.env['HTTP_USER_AGENT'] self.referrer = request.env['HTTP_REFERER'] end #blogs_controller.rb def create @blog = Blog.new(params[:blog]) @blog.req = request if @blog.save ... I see he is saving the user ip, user agent and referrer, but am confused with the req=(request) line. Any help is appreciated. Thanks

    Read the article

  • adding comments like facebook with ASP.NET

    - by AZIRAR
    Hey, I'm developing an blog using ASP.NET, and I want that the user can be able to add comments. So I want to implement the idea of facebook on adding comments. The comment will be stored in the database, so I will be able to load it with the page if the user goes to another web page. You have any idea how can I do this thing ( Ajax, Javascript, jQuery, Ajax Toolkit ) ?

    Read the article

  • Internal class and access to external members.

    - by Knowing me knowing you
    I always thought that internal class has access to all data in its external class but having code: template<class T> class Vector { template<class T> friend std::ostream& operator<<(std::ostream& out, const Vector<T>& obj); private: T** myData_; std::size_t myIndex_; std::size_t mySize_; public: Vector():myData_(nullptr), myIndex_(0), mySize_(0) { } Vector(const Vector<T>& pattern); void insert(const T&); Vector<T> makeUnion(const Vector<T>&)const; Vector<T> makeIntersection(const Vector<T>&)const; class Iterator : public std::iterator<std::bidirectional_iterator_tag,T> { private: T** itData_; public: Iterator()//<<<<<<<<<<<<<------------COMMENT { /*HERE I'M TRYING TO USE ANY MEMBER FROM Vector<T> AND I'M GETTING ERR SAYING: ILLEGAL CALL OF NON-STATIC MEMBER FUNCTION*/} Iterator(T** ty) { itData_ = ty; } Iterator operator++() { return ++itData_; } T operator*() { return *itData_[0]; } bool operator==(const Iterator& obj) { return *itData_ == *obj.itData_; } bool operator!=(const Iterator& obj) { return *itData_ != *obj.itData_; } bool operator<(const Iterator& obj) { return *itData_ < *obj.itData_; } }; typedef Iterator iterator; iterator begin()const { assert(mySize_ > 0); return myData_; } iterator end()const { return myData_ + myIndex_; } }; See line marked as COMMENT. So can I or I can't use members from external class while in internal class? Don't bother about naming, it's not a Vector it's a Set. Thank you.

    Read the article

  • not unique ids in a route in Rails

    - by Victor P
    In a blog in Rails I want to have paths like http://mydomain.com/posts/28383/comments#21 This is the 21st comment of the 28383th post. The 21 is not an unique id, but the pair 28383, #21 is unique. How can I do this in Rails? Do I have to change the routes? the model? I will be very thankful if you can point me in the right direction Thanks

    Read the article

  • How to combine Translate and Soft Deletable Behavior in CakePHP 1.2.7?

    - by m99
    Hi guys, i'm trying to combine Translate Behavior and Mariano Iglesias' Soft Deletable Behavior Revision 49. But always if a want to soft delete a record which hasMany other records, which are translated (located in the i18n-table partly), the related hasMany records aren't soft deleted. Example: Post hasMany Comments (dependent = true) Post actsAs SoftDeletable Comments actsAs SoftDeletable, Translate Post record get's soft deleted, but I also get an error for the dependent Comment records and they aren't soft deleted. Any suggestions? Thanks in advance Marco

    Read the article

  • Strip out C Style Multi-line Comments

    - by Olaseni
    I have a C# string object that contains the code of a generic method, preceded by some standard C-Style multi-line comments. I figured I could use System.Text.RegularExpressions to remove the comment block, but I can seem to be able to get it to work. I tried: code = Regex.Replace(code,@"/\*.*?\*/",""); Can I be pointed in the right direction?

    Read the article

  • ruby parseexecel gem - array not implemented

    - by josh
    I am trying to work with two worksheets at the same time. So I have code require 'parseexcel' #Open the excel file passed in from the commandline workbook = Spreadsheet::ParseExcel.parse(ARGV[0]) workbook2 = Spreadsheet::ParseExcel.parse(ARGV[1]) #Get the first worksheet worksheet = workbook.worksheet(0) worksheet2 = workbook2.worksheet(0) However, when I run this code I get an error: array is not implemented This error goes away when I comment out line: workbook2 = Spreadsheet::ParseExcel.parse(ARGV[1]) Why is this happeneing? Way I am running script is: ruby -rubygems traverse.rb excel.xls so.xls

    Read the article

  • Custom description page for the WCF endpoint?

    - by Joannes Vermorel
    I am migrating an ASP.NET Web Service toward WCF. The old Web Service endpoint had a nice extensive description page generated from the comment of the underlying class exposed as a service endpoint. In particular, all available web methods were listed. Is there a way to emulate somehow this behavior with WCF? At least, how can I customize the HTML content of the WCF endpoint?

    Read the article

  • I can not add navigation item to navigation bar

    - by user262325
    Hello everyone I add a Navigation Bar to an view, I noticed that there is no left side arrow(Navigation Item). so I drag a Navigation Item from library to Navigation Bar, the green mark "+" displayed, but the Navigation Item was not added to the Navigation Bar actually. Welcome any comment Thanks interdev

    Read the article

  • Start a git commit message with a hashmark (#)

    - by knittl
    Git treats lines starting with # as comment lines when committing. this is very annoying when working with a ticket tracking system, and trying to write the ticket number at the beginning of the line, e.g. #123 salt hashed passwords git will simply remove the line from the commit message. is there any way to escape the hash? i tried \ and !, but nothing works. whitespaces before # are preserved, so they aren't a working solution to the problem either.

    Read the article

  • how important to register(license) your own components?

    - by XBasic3000
    i am new to component building, and i had notice to other components has a a comment on top of there units like agreement, terms and condition etc. wither its free or commercial. How important is to register(license) your own component and how/where? and when do you need to register it? how about the freeware? must have a licese too?

    Read the article

  • Samples of Scala and Java code where Scala code looks simpler/has fewer lines?

    - by Roman
    I need some code samples (and I also really curious about them) of Scala and Java code which show that Scala code is more simple and concise then code written in Java (of course both samples should solve the same problem). If there is only Scala sample with comment like "this is abstract factory in Scala, in Java it will look much more cumbersome" then this is also acceptable. Thanks!

    Read the article

  • jQuery Lightbox Clone is not initialising properly

    - by Neurofluxation
    Hey, I have the following function on an onClick call: function addComment() { jQuery.noConflict() jQuery('head').append('<link rel="stylesheet" media="screen" type="text/css" href="colorbox/colorbox-images.css" />'); //this doesn't add correctly. jQuery.fn.colorbox({inline:false, href:'boxes/add-comment.html'}); return false; }; However, the STYLESHEET append line doesn't seem to initialise properly. Screenshots below:

    Read the article

  • Code golf - hex to (raw) binary conversion

    - by Alnitak
    In response to this question asking about hex to (raw) binary conversion, a comment suggested that it could be solved in "5-10 lines of C, or any other language." I'm sure that for (some) scripting languages that could be achieved, and would like to see how. Can we prove that comment true, for C, too? NB: this doesn't mean hex to ASCII binary - specifically the output should be a raw octet stream corresponding to the input ASCII hex. Also, the input parser should skip/ignore white space. edit (by Brian Campbell) May I propose the following rules, for consistency? Feel free to edit or delete these if you don't think these are helpful, but I think that since there has been some discussion of how certain cases should work, some clarification would be helpful. The program must read from stdin and write to stdout (we could also allow reading from and writing to files passed in on the command line, but I can't imagine that would be shorter in any language than stdin and stdout) The program must use only packages included with your base, standard language distribution. In the case of C/C++, this means their respective standard libraries, and not POSIX. The program must compile or run without any special options passed to the compiler or interpreter (so, 'gcc myprog.c' or 'python myprog.py' or 'ruby myprog.rb' are OK, while 'ruby -rscanf myprog.rb' is not allowed; requiring/importing modules counts against your character count). The program should read integer bytes represented by pairs of adjacent hexadecimal digits (upper, lower, or mixed case), optionally separated by whitespace, and write the corresponding bytes to output. Each pair of hexadecimal digits is written with most significant nibble first. The behavior of the program on invalid input (characters besides [a-fA-F \t\r\n], spaces separating the two characters in an individual byte, an odd number of hex digits in the input) is undefined; any behavior (other than actively damaging the user's computer or something) on bad input is acceptable (throwing an error, stopping output, ignoring bad characters, treating a single character as the value of one byte, are all OK) The program may write no additional bytes to output. Code is scored by fewest total bytes in the source file. (Or, if we wanted to be more true to the original challenge, the score would be based on lowest number of lines of code; I would impose an 80 character limit per line in that case, since otherwise you'd get a bunch of ties for 1 line).

    Read the article

  • WLI domain with 3 servers - issues on JPD process startup

    - by XpiritO
    Hi there. I'm currently working on a clustered WLI environment which comprehends 3 servers: 1 admin server ("AdminServer") and 2 managed servers ("mn1" and "mn2") grouped as a cluster, as follows: Architecture diagram: http://img72.imageshack.us/img72/4112/clusterdiagram.jpg I've developed a JPD process to execute some scheduled tasks, invoked using a Message Broker. I've deployed this project into a single-server WLI domain (with AdminServer only) and it works as expected: the JPD process is invoked (I've configured a Timer Event Generator instance to start it up). Message broker: http://img532.imageshack.us/img532/1443/wlimessagebroker.jpg Timer event generator: http://img408.imageshack.us/img408/7358/wlitimereventgenerator.jpg In order to achieve fail-over and load-balancing capabilities, I'm currently trying to deploy this JPD process into this clustered WLI environment. Although, I'm having some issues with this, as I cannot get it to work properly, even if it still works. Here is a screenshot of the "WLI Process Instance Monitor" (with AdminServer and mn1 instances up and running): http://img710.imageshack.us/img710/8477/wliprocessinstancemonit.jpg According to this screen the process seems to be running, as it shows in this instance monitor screen. However, I don't see any output coming out neither at AdminServer console or mn1 console. In single-server domain it was visible output from JPD process "timeout" callback method, wich implementation is shown below: @com.bea.wli.control.broker.MessageBroker.StaticSubscription(xquery = "", filterValueMatch = "", channelName = "/SamplePrefix/Samples/SampleStringChannel", messageBody = "{x0}") public void subscription(java.lang.String x0) { String toReturn=""; try { Context myCtx = new InitialContext(); MBeanHome mbeanHome = (MBeanHome)myCtx.lookup("weblogic.management.home.localhome"); toReturn=mbeanHome.getMBeanServer().getServerName(); System.out.println("**** executed at **** " + System.currentTimeMillis() + " by: " + toReturn); } catch (Exception e) { System.out.println("Exception!"); e.printStackTrace(); } } (...) @org.apache.beehive.controls.api.events.EventHandler(field = "myT", eventSet = com.bea.control.WliTimerControl.Callback.class, eventName = "onTimeout") public void myT_onTimeout(long time, java.io.Serializable data) { // #START: CODE GENERATED - PROTECTED SECTION - you can safely add code above this comment in this method. #// // input transform System.out.println("**** published at **** " + System.currentTimeMillis()); publishControl.publish("aaaa"); // parameter assignment // #END : CODE GENERATED - PROTECTED SECTION - you can safely add code below this comment in this method. #// } and here is the output visible at "AdminServer" console in single-server domain testing: **** published at **** 1273238090713 **** executed at **** 1273238132123 by: AdminServer **** published at **** 1273238152462 **** executed at **** 1273238152562 by: AdminServer (...) What may be wrong with my clustered configuration? Am I missing something to accomplish clustered deployment? Thanks in advance for your help.

    Read the article

< Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >