Search Results

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

Page 134/206 | < Previous Page | 130 131 132 133 134 135 136 137 138 139 140 141  | Next Page >

  • the use of private keyword

    - by LAT
    Hi everyone I am new to programming. I am learning Java now, there is something I am not really sure, that the use of private. Why programmer set the variable as private then write , getter and setter to access it. Why not put everything in public since we use it anyway. public class BadOO { public int size; public int weight; ... } public class ExploitBadOO { public static void main (String [] args) { BadOO b = new BadOO(); b.size = -5; // Legal but bad!! } } I found some code like this, and i saw the comment legal but bad. I don't understand why, please explain me.

    Read the article

  • How to redirect on apache after running a script through cgi

    - by Yotam
    I have an ubuntu machine which I have installed apache on. I want to use a web page to run some simple shell script through cgi and then go back to my home screen. I also want to the go-back step to be automatic. I have set a redirect in my apache.conf which works fine but the script doesn't run at all. Is there a way to run the script and only then apply the redirect? Comment: I think this may be the answer but I'm not sure.

    Read the article

  • Image links work but show "broken image" in IE.

    - by Path
    I have a problem. I have made some image files for a menu. They work fine in Firefox, but IE (8, haven't tested with others) and Chrome show a broken image.. Image, on top. Even though the images work. The page is here: http://www.silkeborgmuseum.dk/udvikling/index.php This is a very old page of mine but I need to make it work. I have tried searching google and stackoverflow, but have not so far been able to find anyone else having this problem or what is causing it. Can anyone help? As a parting comment, I will say that I have only been developing websites for a few months, but wow, i already hate IE with a fiery passion.

    Read the article

  • negative look ahead to exclude html tags

    - by Remoh
    I'm trying to come up with a validation expression to prevent users from entering html or javascript tags into a comment box on a web page. The following works fine for a single line of text: ^(?!.(<|)).$ ..but it won't allow any newline characters because of the dot(.). If I go with something like this: ^(?!.(<|))(.|\s)$ it will allow multiple lines but the expression only matches '<' and '' on the first line. I need it to match any line. This works fine: ^[-_\s\d\w"'.,:;#/&\$\%\?!@+*\()]{0,4000}$ but it's ugly and I'm concerned that it's going to break for some users because it's a multi-lingual application. Any ideas? Thanks!

    Read the article

  • Missing the Rails 2.3.4 gem. Even though it's installed!

    - by Shereef
    Running Snow Leopard. Tried uninstalling, and re-installing. Still getting the same error whenever I run a rake task. mbpro:redmine shereef$ ruby -v ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.0.0] mbpro:redmine shereef$ rails -v Rails 2.3.4 mbpro:redmine shereef$ which rails /usr/local/bin/rails mbpro:redmine shereef$ gem -v 1.3.5 mbpro:redmine shereef$ which gem /usr/local/bin/gem mbpro:redmine shereef$ rake -v (in /Users/shereef/Documents/Code/BetterMeans/redmine) Missing the Rails 2.3.4 gem. Please gem install -v=2.3.4 rails, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed. mbpro:redmine shereef$ which rake /usr/bin/rake mbpro:redmine shereef$ $PATH -bash: /usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin: No such file or directory mbpro:redmine shereef$

    Read the article

  • where id = multiple artists

    - by pixel
    Any time there is an update within my music community (song comment, artist update, new song added, yadda yadda yadda), a new row is inserted in my "updates" table. The row houses the artist id involved along with other information (what type of change, time and date, etc). My users have a "favorite artists" section where they can do just that -- mark artists as their favorites. As such, I'd like to create a new feature that shows the user the changes made to their various favorite artists. How should I be doing this efficiently? SELECT * FROM table_updates WHERE artist_id = 1 and artist_id = 500 and artist_id = 60032 Keep in mind, a user could have 43,000 of our artists marked as a favorite. Thoughts?

    Read the article

  • Why I am forced to write the (Data Constructor) name with first letter in small case?

    - by Optimight
    Why I am forced to write "liOfLi" in place of "LiOfLi"? Please guide. code in baby.hs LiOfLi = [ [1,3,4,5,6,8], [ 12, 13, 15, 16, 19, 20], [23, 24, 25, 45, 56] ] ghci response: ghci :l baby [1 of 1] Compiling Main ( baby.hs, interpreted ) Failed, modules loaded: none. ghci baby.hs:29:1: Not in scope: data constructor `LiOfLi' When changing the initial letter to smaller case code in baby.hs liOfLi = [ [1,3,4,5,6,8], [ 12, 13, 15, 16, 19, 20], [23, 24, 25, 45, 56] ] ghci response: ghci :l baby [1 of 1] Compiling Main ( baby.hs, interpreted ) Ok, modules loaded: Main. Following are the SO questions I refered but I failed to understand the rules/ logic and get the answer for (my) abovementioned question. Why does Haskell force data constructor's first letter to be upper case? the variable names need to be lowercase. The official documentation related to this is at haskell.org/onlinereport/intro.html#namespaces – (the SO comment by) Chris Kuklewicz

    Read the article

  • mysql query to concat information from 3 tables - getting incorrect result count

    - by iPfaffy
    I have 3 tables in my database. ab_contacts id first_name last_name addressbook_id ab_addressbooks name id co_comments id link_id comment I'd like to create a query that will let me select all the contacts and comments related to them in a given addressbook. To select all the people in a given addressbook, I can use: select count(*) from ab_contacts where addressbook_id = '50'; This returns 8152 people. However, when I run my query: select ab_contacts.first_name, ab_contacts.last_name, ab_contacts.email, ab_addressbooks.name, co_comments.comments from ab_contacts JOIN ab_addressbooks ON (ab_contacts.addressbook_id = ab_addressbooks.id) JOIN co_comments ON (ab_contacts.id = co_comments.link_id) WHERE ab_contacts.addressbook_id = '50';` the format works, but I only get 1045 results. I'm sure there is something I am missing, but I cannot figure it out. Any help would be greatly appreciated.

    Read the article

  • Instantiate a javascript module only one time.

    - by Cedric Dugas
    Hey guys, I follow a module pattern where I instantiate components, however, a lot of time a component will only be instantiate one time (example: a comment system for an article). For now I instantiate in the same JS file. but I was wondering if it is the wrong approach? It kind of make no sense to instantiate in the same file and always only once. But at the same time, if this file is in the page I want to have access to my module without instantiate from elsewhere, and IF I need another instance, I just create another from elsewhere... Here is the pattern I follow: ApplicationNamespace.Classname = function() { // constructor function privateFunctionInit() { // private } this.privilegedFunction = function() { // privileged privateFunction(); }; privateFunctionInit() }; ApplicationNamespace.Classname.prototype = { Method: function(){} } var class = new ApplicationNamespace.Classname(); What do you think, wrong approach, or is this good?

    Read the article

  • How to add Transparency information to a HEX color code?

    - by TK123
    I have to modify some code and the previous developer left this comment: color: color, // e.g. '#RRGGBBFF' - Last 2 digits are alpha information On the page there is a color picker that let's the user change text color. It gives HEX values like so: #RRGGBB And there is a slider that allows the user to change a text's transparency. It runs from 0.1 to 1 Somehow I need to get a 2 digit letter from this transparency amount and append it to the HEX value for it to work. Does anyone know how to append Alpga information to HEX color codes? What is the math formula for it? I guess the question can also be answered if anyone knows how to concert RGBA color values with transparency into HEX: rgba(255, 255, 255, 0.6)

    Read the article

  • Why do I have to give an identifier?

    - by Knowing me knowing you
    In code: try { System.out.print(fromClient.readLine()); } catch(IOException )//LINE 1 { System.err.println("Error while trying to read from Client"); } In code line marked as LINE 1 compiler forces me to give an identifier even though I'm not using it. Why this unnatural constrain? And then if I type an identifier I'm getting warning that identifier isn't used. It just doesn't make sense to me, forcing a programmer to do something unnecesarry and surplus. And after me someone will revise this code and will be wondering if I didn't use this variable on purpouse or I just forgot. So in order to avoid that I have to write additional comment explaining why I do not use variable which is unnecessary in my code. Thanks

    Read the article

  • problem with generating PDF and session_start()

    - by gillian
    Hi All, I've been using PDF class produced by R&OS successfully in a number of recent developments. I'd like to use it in a page that performs a database query before generating a PDF (it's basically a summary of the session, so I'm using session_id() as part of the query) All is fine if I run this in Firefox - not fine in IE. I think the loading of session_start() is doing something with headers that's upsetting IE as it appears unable to load the page (comment off session_start and the page loads fine). I'm getting a little concerned as, on further investigation, it appears that R&OS is not supported ... bad newbie learning experience and I really don't want to have to try adopt another class system this late in the day. Have you any thoughts as to what I could try next? Thankx G

    Read the article

  • Integrate Facebook Like button in website... With comments option

    - by Sebien
    Hello, Please see: http://developers.facebook.com/docs/reference/plugins/like I successfully integrated a [Like] button in my website using this link. On the developers website, when I click the [Like] button, a popup appears telling this: You like this. Share it on Facebook with a comment... [ ] [Post to Facebook] [Cancel] On my website, there is no such popup. I tested both iframe and FBML versions. Does anyone has a solution, or is this feature only reserved for www.facebook.com ? Thanks.

    Read the article

  • Objective-C: Cannot Change Value of Instance Variable Inside a Function

    - by user262325
    Hello everyone, I cannot change the value of an instance variable inside a function. I have defined a class: // info.h #import <Foundation/Foundation.h> @interface NSMyObject : NSObject { NSInteger i; } -(void) setI:(NSInteger)v; @end #import "info.h" @implementation NSMyObject -(void) setI:(NSInteger)v ; { i=v; } - (void)dealloc { [super dealloc]; } @end I call a function 'myFunction' with parameter temObj which is a NSMyObject instance. myFunction(temObj);//temObj is NSMyObject In the function, I can change the value of the instance variable of parameter obj. -(void)myFunction:(NSMyObject*) obj; { [obj setI:0]; } ... expecting this to change the content of temObj. But when I check the results of operation on obj in function myFunction the value of temObj.i has not changed. Welcome any comment Thanks

    Read the article

  • jquery ajax calls with scope safety

    - by acidzombie24
    My gut tells me that if i am on a laggy server and the user fires two events fast enough on the success function c will be the value of the most recent event causing func1 to use the wrong value. <--- This is a guess, i haven't proved it. Its a feeling. How do i ensure that i use the right value when calling func1? I prefer not to send c to the server and i dont know if or how to serialize the data and deserialize it back. How do i make this code safe? $('.blah').click(function (event) { var c = $(this).closest('.comment'); ... $.ajax({ url: "/u", type: "POST", dataType: "json", data: { ... }, success: function (data) { func1(c. data.blah);//here

    Read the article

  • When did people first start thinking 'C is portable assembler' ?

    - by Jacques Carette
    It seems to be an 'accepted concept' in the popular culture of programming languages that 'C is portable assembler'. I have first heard this at least 15 years ago. But when did it really become part of the popular culture? Note: if you don't agree that 'C is portable assembler', please just skip this question. This question is about 'popular culture of programming'. I'll add a comment to this question which you can up-vote for those who disagree with that statement.

    Read the article

  • mysql++ compile error

    - by rizzo0917
    when i complie code that includes mysql headers i get the following errors: c:\qt\2010.03\mingw\bin../lib/gcc/mingw32/4.4.0/../../../../include/stdint.h:27: error: 'int8_t' has a previous declaration as 'typedef signed char int8_t' c:\qt\2010.03\mingw\bin../lib/gcc/mingw32/4.4.0/../../../../include/stdint.h:31: error: 'int32_t' has a previous declaration as 'typedef int int32_t' c:\qt\2010.03\mingw\bin../lib/gcc/mingw32/4.4.0/../../../../include/stdint.h:32: error: 'uint32_t' has a previous declaration as 'typedef unsigned int uint32_t' Literally all I do is this. include cppconn/driver.h include cppconn/exception.h include cppconn/resultset.h include cppconn/statement.h include Now I can go into the file and comment the lines out that give me errors //typedef signed char int8_t; //typedef int int32_t; //typedef unsigned uint32_t; It compiles, but when I try to run the mysql code: sql::Driver *driver; driver = get_driver_instance(); I get this output test.exe exited with code -1073741515 Any Ideas?

    Read the article

  • Software Engineering Component Repository Tool

    - by user320480
    Hello, I'm working as a software engineer for a company. We are going to apply some software engineering standards in our development process. We need a tool which provides a repository for our peripheral products (functions, classes, libraries, ...) which is created during software development process for later use. The tool should provide some functionalities (e.g Name of the component, it's functionality, withing which projects it is used?, author, publication date, list of known bugs, user rating, comment, ...) and it's better to have a web-based interface. Does anybody know such a software?

    Read the article

  • phpMyAdmin "No database selected" MySQL

    - by user1751660
    I downloaded a MySQL backup file and promptly imported into MAMP's phpMyAdmin. I got this return: Error SQL query: -- -- Database: `mysql` -- -- -------------------------------------------------------- -- -- Table structure for table `columns_priv` -- CREATE TABLE IF NOT EXISTS `columns_priv` ( `Host` CHAR( 60 ) COLLATE utf8_bin NOT NULL DEFAULT '', `Db` CHAR( 64 ) COLLATE utf8_bin NOT NULL DEFAULT '', `User` CHAR( 16 ) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` CHAR( 64 ) COLLATE utf8_bin NOT NULL DEFAULT '', `Column_name` CHAR( 64 ) COLLATE utf8_bin NOT NULL DEFAULT '', `Timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP , `Column_priv` SET( 'Select', 'Insert', 'Update', 'References' ) CHARACTER SET utf8 NOT NULL DEFAULT '', PRIMARY KEY ( `Host` , `Db` , `User` , `Table_name` , `Column_name` ) ) ENGINE = MYISAM DEFAULT CHARSET = utf8 COLLATE = utf8_bin COMMENT = 'Column privileges'; MySQL said: #1046 - No database selected I did not alter the .sql file at all. Any hints on how i can get this puppy going locally? Thanks!

    Read the article

  • JQuery Tabs; Google Map is shown with just one tile

    - by java_dude
    Yes this problem is common and I have seen numerous solution on this site but none of them were helpful. I know that re-sizing will fix the problem. Not a jQuery expert and I don't know how to re-size the map after the page has been loaded and Headline 3 is active. I have created a JFiddle example. Any help is appreciated. http://jsfiddle.net/KhwZS/1300/ Thanks Ignore the top comment and the links provided by @Dr.Molle as these links do not provide the solution that I have been looking for, check out the solution I have accepted.

    Read the article

  • soft stoppped working

    - by Jack Morton
    this is might be really weird, but I have no idea what kinda wizardry of this. Basically, my Visual Studio stopped responding to my changes, it stopped building solution. I can comment code, which would completely ruin the logic of program, and Visual Studio will still run program that I guess it has in memory. It's really annoying, and I have no idea what it is. I keep restarting software, but it's still does the same. It's a licensed software. I was wondering If someone knew what was going on. Thanks!

    Read the article

  • call function and change value of parameter

    - by user262325
    Hello everyone I have constructed one object: // info.h #import <Foundation/Foundation.h> @interface NSMyObject : NSObject { NSInteger i; } -(void) setI:(NSInteger)v; @end #import "info.h" @implementation NSMyObject -(void) setI:(NSInteger)v ; { i=v; } - (void)dealloc { [super dealloc]; } @end Is it possible I call a function 'myFunction' with parameter temObj (NSMyObject) myFunction(temObj);//temObj is NSMyObject in the function I can change the content of parameter obj -(void)myFunction:(NSMyObject*) obj; { [obj setI:0]; } then I hope the content of temObj also can be changed. But I check the operation on obj in function myFunction can not affect temObj where I call myFunction. Welcome any comment Thanks

    Read the article

  • Understanding NoSQL Data Modeling - blog application

    - by Rushabh RajeshKumar Padalia
    I am creating an blogging application in Node.js + MongoDB Database. I have used relational Database like MySQL before but this is my first experience with NoSQL database. So I would like to conform my MongoDB data models before I move further. I have decided my blogDB to have 3 collections post_collection - stores information about that article comment_collection - store information about comments on articles user_info_collection - contains user inforamtion PostDB { _"id" : ObjectID(...), "author": "author_name", "Date": new Date(....), "tag" : ["politics" , "war"], "post_title": "My first Article", "post_content": "Big big article" "likes": 23 "access": "public" } CommentDB { "_id" : Objectid(...), "POST": "My First Article", "comment_by": "User_name", "comment": "MY comments" } UserInfoDB { "_id": ObjectID(...), "user": "User_name", "password": "My_password" } I would appreciate your comments.

    Read the article

  • Binding Data to Word 2007 Content Controls Using Visual Studio Tools for the Office System (3.0)

    - by Simon Lomax
    Hi, I found this article (http://msdn.microsoft.com/en-us/library/bb967663.aspx) and thought great thats exactly what I'm trying to do. I want to programatically build a product brochure using content controls and openXML. The article in question refers to an accompanying video which unfortunately does not appear to be available, nor does the code. I posted a comment to ask where they are but in the meantime does anybody know of a good example. There are plenty of examples of binding/merging one record into a openXML Word document. But I want to bind a whole list of records to create a product brochure. Can anyone point me to good tutorial? Thanks

    Read the article

  • Notepad++ regular expression find and replace $_REQUEST with $_GET but a more secure

    - by David
    What I am doing is replacing, in a large program, all $_REQUEST['var'] and mysql_escape_string($_REQUEST['var']) with either the 1st or 2nd line below the dotted line. Now, I have figured out this much of the regular expression but I would like to make it simpler. Instead of having to run the top one first then the 2nd one I would like to just run one all together. I tried this but it did not work. (mysql_escape_string\()*$_REQUEST\[\'([^']*)\'\]\)(\)*) So below is what works but again have to do it twice. $_REQUEST\[\'([^']*)\'\] mysql_escape_string\($_REQUEST\[\'([^']*)\'\]\) (isset($_GET['\1'])?mysql_real_escape_string($_GET['\1']):false) (isset($_POST['\1'])?mysql_real_escape_string($_POST['\1']):false) ============================ Update: Yeah, after some research I figured out that Notepad++ does not support most regular expressions. I guess one additional step can not hurt a person. It's just laziness. *NOTE: BUT if anyone wants to try feel free to comment. At least it is just 2 steps and not 20.

    Read the article

< Previous Page | 130 131 132 133 134 135 136 137 138 139 140 141  | Next Page >