Search Results

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

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

  • How come $(this) is undefined after ajax call

    - by JohnnyQ
    I am doing an ajax request when an anchor tag is clicked with an ID set to href. Btw, this anchor tag is dynamically created. <a href="983" class="commentDeleteLink">delete</a> When the anchor tag is clicked the following code is executed: $('.commentDeleteLink').live('click', function(event) { event.preventDefault(); var result = confirm('Proceed?'); if ( result ) { $.ajax({ url: window.config.AJAX_REQUEST, type: "POST", data: { action : 'DELCOMMENT', comment : $('#commentText').val(), comment_id : $(this).attr('href') }, success: function(result) { alert($(this).attr('href')); //$(this).fadeOut(slow); } }); } }); When I tried to display $(this).attr('href') it says it's "undefined". What I really want to do is fadeOut the anchor tag but when I investigated the value of $(this) it is "undefined". What could be wrong with the snippet above?

    Read the article

  • MySQL TEXT field performance

    - by Jonathon
    I have several TEXT and/or MEDIUMTEXT fields in each of our 1000 MySQL tables. I now know that TEXT fields are written to disk rather than in memory when queried. Is that also true even if that field is not called in the query? For example, if I have a table (tbExam) with 2 fields (id int(11) and comment text) and I run SELECT id FROM tbExam, does MySQL still have to write that to disk before returning results or will it run that query in memory? I am trying to figure out if I need to reconfigure our actual db tables to switch to varchar(xxxx) or keep the text fields and reconfigure the queries.

    Read the article

  • Problems making an accurate Visual Studio scheme for Vim (vim scheme specialist needed) .

    - by janoChen
    I'm trying to make an accurate Visual Studio scheme. I set hi function to blood color (#9A1102) for the "CSS function" (selector). But now the brackets with properties (id, class) in html elements also have blood color: (ironically the same color here in Stackoverflow). But I want them blue (#2902FC) e.g.: <div class="first"> <div id="nopic"> Sample of code: " Syntax highlighting hi Comment guifg=#777777 gui=none hi Todo guifg=#8f8f8f gui=none hi Constant guifg=#e5786d gui=none hi String guifg=#2902FC gui=none hi Identifier guifg=#2902FC gui=none hi Function guifg=#9A1102 gui=none hi Type guifg=#EF2811 gui=none hi Statement guifg=#9A1102 gui=none hi Keyword guifg=#9A1102 gui=none hi PreProc guifg=#2902FC gui=none hi Number guifg=#2902FC gui=none hi Special guifg=#2902FC gui=none " Bottom hi Question guifg=white gui=none hi Question ctermfg=white term=none hi ModeMsg guifg=white gui=none

    Read the article

  • Poll: What is stopping you from switching (from Java) to Scala ?

    - by Lukasz Lew
    What would make you to switch to Scala ? If you are negative on the switching to Scala, please state the reason as well (or upvote). As with all StackOverflow Poll type Q&As, please make certain your answer is NOT listed already before adding a new answer If it already exists, vote that one up so we see what the most popular answer is, rather than duplicating an existing entry. If you see a duplicate, vote it down. If you have interesting or additional information to add, use a comment or edit the original entry rather than creating a duplicate.

    Read the article

  • Problem removing a dynamic form field in jquery

    - by rshivers
    I'm trying to remove a dynamic form field by click a button. It will also subtract whatever values it had from the total amount from my calculation. This is the code: function removeFormField(id) { var id = $(id).attr("name"); $('#target1').text($("#total" + id).map(function() { var currentValue = parseFloat(document.getElementById("currentTotal").value); var newValue = parseFloat($("#total" + id).text()); var newTotal = currentValue - newValue; document.getElementById("currentTotal").value = newTotal; return newTotal; }).get().join()); $(id).remove(); } Okay, it will do the subtraction portion of the code with no problem, this issue is with the last line to remove the field. If I comment out the rest of the code it will work, but not with the rest of the code. I know this is something simple, yet I can't seem to wrap my mind around it. Can someone please help?

    Read the article

  • VS JavaScript intellisense with paramaters

    - by TonyB
    here is some sample javascript: SomeObjectType = function() { } SomeObjectType.prototype = { field1: null, field2: null } SomeOtherObject = function() { } SomeOtherObject.prototype = { doSomething: function(val) { /// <param name="val" type="SomeObjectType"></param> var val2 = new SomeObjectType(); //val2. shows intellisense correctly //val1. does NOT } } Shouldn't visual studio be giving me intellisence when i do "val." inside the "doSomething" function? I would expect it to give me field1 and field2 as options, but it doesn't. I DO get field1 and field2 if I type "val2." so intellisence works when I create a new object of the same type that I specify in the param comment. Any ideas what I am doing wrong or is this just not supported?

    Read the article

  • extended permissions

    - by melimoreno
    Hi i'm doing a fb app that update the status box(what's in your mind), i'm using set_status from facebooker .. first i have this error: set_status needs extended permission so i google it and find this: before_filter :ensure_has_status_update .. so i put it in my controller and that solves the problem, but when i try to update the status, all ways redirect me to a fb page that says: You have already granted permissions to this application. so i go to the controller comment before_filter :ensure_has_status_update and then go to my app again and it works.. so i want to do this if (has_status_update == false) ask for permision else update the status i google it for a long time but i can't find an answer..

    Read the article

  • [C++] Passing around objects to network packet handlers ?

    - by xeross
    Hey, I've been writing a networking server for a while now in C++ and have come to the stage to start looking for a way to properly and easily handle all packets. I am so far that I can figure out what kind of packet it is, but now I need to figure out how to get the needed data to the handler functions. I had the following in mind: Have a map of function pointers with the opcode as key and the function pointer as value Have all these functions have 2 arguments, packet and ObjectAccessor ObjectAccessor class contains various functions to fetch various items such as users and alike Perhaps pass the user's guid too so we can fetch it from the objectaccessor I'd like to know the various implementations others have come up with, so please comment on this idea and reply with your own implementations. Thanks, Xeross

    Read the article

  • How to fast rendering UITableView

    - by pubudu
    In my program has two view controller. first one has one button.and second one has tableview with custom cell. in this cell has 5 textviews. when i click button of first tableview.it shows second view controller. Its is very slow rendering table view with 5 , 6 rows.it is working well with simulator.but it is very slow with actual i pad. when i click the button i have to wait 2,3 second with button pressed status.and after it view the second view controller it also very slow rendering.i can see it render rows. [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; this one also i used.when i comment this table from my second view.it navigate first view controller to second view controller very fast. how can i solve this issue?

    Read the article

  • How does the #! work?

    - by mocybin
    In a script you must include a #! on the first line followed by the path to the program that will execute the script (e.g.: sh, perl). As far as I know though, the # character denotes the start of a comment and that line is supposed to be ignored by the program executing the script. It would seem though, that this first line is at some point read by something in order for the script to be executed by the proper program. Could somebody please shed more light on the workings of the #! ? Edit: I'm really curious about this, so the more in-depth the answer the better.

    Read the article

  • Targeting row when responding with js rails

    - by berto77
    I have an application where a user can vote on reviews. They can vote up or down. Now when there's a listing of reviews, I have a problem targeting the review the user voted on. I'm using a respon_to block in my rails controller and responding with js. So for instance, I have a vote_up method, and a vote_up.js.erb template. in that template, I have the following: var id = $('article.comment').attr('id').split('_')[1]; alert("id: " + id); $('.votecomment_' + id).find('.score').html("<%= @review2.vote_total %>"); I'm just alerting the id. The problem is that the id always returns the value of the first review found on the page. How can I pass the context aka this, to javascript, so I can figure out which review to target?

    Read the article

  • AddClass onClick won't work

    - by QTaylor
    I'm having some problems getting some simple jQuery to work; I'm trying to add a class called fadeInLeft to my body element on click. Here's the code: $('.contact-button').click(function() { $('body').addClass('fadeInLeft') }); HTML (from comment left by OP, below): <div id="contact" class="bounceInRight animated four"> <a href="#" class="contact-button"> Say Hello </a> </div><!--End of contact--> contact-button is the class of the link, fadeInLeft is the class I want to add when the link is clicked. Any idea why this would not work ?

    Read the article

  • C# method contents validation

    - by user258651
    I need to validate the contents of a C# method. I do not care about syntax errors that do not affect the method's scope. I do care about characters that will invalidate parsing of the rest of the code. For example: method() { /* valid comment */ /* <-- bad for (i..) { } for (i..) { <-- bad } I need to validate/fix any non-paired characters. This includeds /* */, { }, and maybe others. How should I go about this? My first thought was Regex, but that clearly isn't going to get the job done.

    Read the article

  • Whats the best way to parse a file in Java

    - by chitresh
    Hi All, I have a text file with Tag - Value format data. I want to parse this file to form a Trie. What will be the best approach? Sample of File: (String inside "" is a tag and '#' is used to comment the line.) #Hi, this is a sample file. "abcd" = 12; "abcde" = 16; "http" = 32; "sip" = 21;

    Read the article

  • MySql query and table optimisation

    - by Cheeky
    Hi everyone. I am trying to run the following simple query on a table with 500K records. SELECT COUNT(*) AS impressionCount FROM impression WHERE 0 = 0 AND impressionObjectId1 = 'C69A54B8-B828-E2E4-2319A93011DF4120' AND impressionObjectId2 = '1'; This query is taking 10 seconds to run. I have tried creating individual indexes for the impressionObjectId1 and impressionObjectId2 columns, as well as a composite index using both. The composite worked well for a while, but now it is also slow. Here is my table structure: DROP TABLE IF EXISTS `impression`; CREATE TABLE `impression` ( `impressionId` varchar(50) NOT NULL, `impressionObjectId1` varchar(50) NOT NULL, `impressionObjectId2` varchar(50) default NULL, `impressionStampDate` datetime NOT NULL, PRIMARY KEY (`impressionId`), KEY `IX_object` (`impressionObjectId1`,`impressionObjectId2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC COMMENT='InnoDB free: 191488 kB'; Any advice would be greatly appreciated. Thanks EDIT: When adding an EXPLAIN, this is the output: 1, 'SIMPLE', 'impression', 'ref', 'IX_object', 'IX_object', '105', 'const,const', 304499, 'Using where; Using index'

    Read the article

  • Copying just the data from one Database to another

    - by monksy
    I'm not sure if this is the site for this question or not [if so put in the comment or vote to move it] How can I copy only the data from one database to another within the same server on SQL Server 2005? The two databases have the same schema but not the same data. I'm trying to get the data from one database to another. I am not able to restore from a snapshot [that screws over the security settings on the database]. I'm not able to use the import data wizard, because that is trying to copy over schema data as well.

    Read the article

  • Missing the Rails gem. Please `gem install -v=2.3.4 rails`

    - by Brian Roisentul
    I was trying to fix this error and I ended up with a new one. I have installed ruby 1.8.6, but using Built-in JRuby 1.4.0 for my app. Everything was working fine until I updated every gem(as specified by the answer I got from that link) and everything crashed: ever since I tried to start the app I received the following error message: 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. Then, I tried to uninstall the updates(to v2.3.8, most of them), so the last version is 2.3.4. In my config/environment.rb file I have this: RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION so I guess everything is as I left it before the update. The question is....why do I keep getting the error and I can't start the app?

    Read the article

  • New line before header()

    - by MetalAdam
    I'm working with a custom made Joomla script that generates an image from a blob in a database. However, when we moved it from an Apache server to an IIS server, the script is breaking. Upon investigation, it seems that now, there is a line break that is getting appended before the header function is being run (when I comment out the image portion, and do an echo "test";, test gets printed on line 2 of the source code. I've gone through the script over and over again, and through the many files in the component, and can't seem to find out where this new line is coming from. At all. I've tried using ob_start() and many similar functions, but nothing seems to work. I'm completely out of ideas, and don't know where to turn. Is there a way to trace what files are being called in the page, perhaps? Any thoughts on further steps?

    Read the article

  • weird index behavior

    - by TasostheGreat
    I have set up my table with an index only on done_status(done_status =INT), when I use EXPLAIN SELECT * FROM reminder WHERE done_status=2 i get this back id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE reminder ALL done_status NULL NULL NULL 5 Using where but when I give this command EXPLAIN SELECT * FROM reminder WHERE done_status=1 that's what I get back: id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE reminder ref done_status done_status 4 const 2 first time it shows me it uses 5 rows second time 2 rows I don't think the index works, if I understood it right first time it should give me 3 rows. What do I do wrong? SHOW INDEX FROM reminder: Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment reminder 1 done_status 1 done_status A 5 NULL NULL BTREE

    Read the article

  • A way to use Python which I don't know

    - by Konie
    In this quicksort function: def qsort2(list): if list == []: return [] else: pivot = list[0] # can't understand the following line lesser, equal, greater = partition(list[1:], [], [pivot], []) return qsort2(lesser) + equal + qsort2(greater) def partition(list, l, e, g): if list == []: return (l, e, g) else: head = list[0] if head < e[0]: return partition(list[1:], l + [head], e, g) elif head > e[0]: return partition(list[1:], l, e, g + [head]) else: return partition(list[1:], l, e + [head], g) I don't understand the sentence below the comment. Can someone tell me what is the meaning of this sentence here?

    Read the article

  • iPhone Application

    - by user553627
    Hello, Im working on an iPhone project using xcode and i actually have not programmed using objective-c before. So, my problem mainly is that my app crashes whenever i hit the button that it suppose to show a view of the world map. I think the problem is within the last 2 lines of the code but still i cant figure out why ?!! because whenever i comment out the line "[self presemtM.....]" the program doesn't crash. Would appreciate your help! -(IBAction) pushedGo:(id)sender { CLLocationCoordinate2D coord = {37.331689, -122.030731}; MapViewController *mapView = [[MapViewController alloc] initWithCoordinates:coord andTitle:@"Apple" andSubTitle:@"111"]; [self presentModalViewController:mapView animated:YES] [mapView release]; }

    Read the article

  • correct mysql syntax error

    - by user2981651
    please could someone tell me the problem with this syntax because mysql 5.5.32 keeps tell me about an error CREATE TABLE `clients` ( `ID` tinyint(11) NOT NULL auto_increment, `title` varchar(10) NOT NULL default '', `firstName` varchar(30) NOT NULL default '', `lastName` varchar(30) NOT NULL default '', `address1` varchar(100) NOT NULL default '', `address2` varchar(100) NOT NULL default '', `town` varchar(100) NOT NULL default '', `province` varchar(100) NOT NULL default '', `country` varchar(40) NOT NULL default '', `postCode` varchar(20) NOT NULL default '', `telephone` varchar(20) NOT NULL default '', `email` varchar(100) NOT NULL default '', `cardNo` varchar(16) NOT NULL default '0000-00-00', `expiryDate` date NOT NULL default '0000-00-00', PRIMARY KEY (`ID`) ) TYPE=MyISAM COMMENT='customer table' AUTO_INCREMENT=1 ;

    Read the article

  • Silverlight for Everyone!!

    - by subodhnpushpak
    Someone asked me to compare Silverlight / HTML development. I realized that the question can be answered in many ways: Below is the high level comparison between a HTML /JavaScript client and Silverlight client and why silverlight was chosen over HTML / JavaScript client (based on type of users and major functionalities provided): 1. For end users Browser compatibility Silverlight is a plug-in and requires installation first. However, it does provides consistent look and feel across all browsers. For HTML / DHTML, there is a need to tweak JavaScript for each of the browser supported. In fact, tags like <span> and <div> works differently on different browser / version. So, HTML works on most of the systems but also requires lot of efforts coding-wise to adhere to all standards/ browsers / versions. Out of browser support No support in HTML. Third party tools like  Google gears offers some functionalities but there are lots of issues around platform and accessibility. Out of box support for out-of-browser support. provides features like drag and drop onto application surface. Cut and copy paste in HTML HTML is displayed in browser; which, in turn provides facilities for cut copy and paste. Silverlight (specially 4) provides rich features for cut-copy-paste along with full control over what can be cut copy pasted by end users and .advanced features like visual tree printing. Rich user experience HTML can provide some rich experience by use of some JavaScript libraries like JQuery. However, extensive use of JavaScript combined with various versions of browsers and the supported JavaScript makes the solution cumbersome. Silverlight is meant for RIA experience. User data storage on client end In HTML only small amount of data can be stored that too in cookies. In Silverlight large data may be stored, that too in secure way. This increases the response time. Post back In HTML / JavaScript the post back can be stopped by use of AJAX. Extensive use of AJAX can be a bottleneck as browser stack is used for the calls. Both look and feel and data travel over network.                           In Silverlight everything run the client side. Calls are made to server ONLY for data; which also reduces network traffic in long run. 2. For Developers Coding effort HTML / JavaScript can take considerable amount to code if features (requirements) are rich. For AJAX like interfaces; knowledge of third party kits like DOJO / Yahoo UI / JQuery is required which has steep learning curve. ASP .Net coding world revolves mostly along <table> tags for alignments whereas most popular tools provide <div> tags; which requires lots of tweaking. AJAX calls can be a bottlenecks for performance, if the calls are many. In Silverlight; coding is in C#, which is managed code. XAML is also very intuitive and Blend can be used to provide look and feel. Event handling is much clean than in JavaScript. Provides for many clean patterns like MVVM and composable application. Each call to server is asynchronous in silverlight. AJAX is in built into silverlight. Threading can be done at the client side itself to provide for better responsiveness; etc. Debugging Debugging in HTML / JavaScript is difficult. As JavaScript is interpreted; there is NO compile time error handling. Debugging in Silverlight is very helpful. As it is compiled; it provides rich features for both compile time and run time error handling. Multi -targeting browsers HTML / JavaScript have different rendering behaviours in different browsers / and their versions. JavaScript have to be written to sublime the differences in browser behaviours. Silverlight works exactly the same in all browsers and works on almost all popular browser. Multi-targeting desktop No support in HTML / JavaScript Silverlight is very close to WPF. Bot the platform may be easily targeted while maintaining the same source code. Rich toolkit HTML /JavaScript have limited toolkit as controls Silverlight provides a rich set of controls including graphs, audio, video, layout, etc. 3. For Architects Design Patterns Silverlight provides for patterns like MVVM (MVC) and rich (fat)  client architecture. This segregates the "separation of concern" very clearly. Client (silverlight) does what it is expected to do and server does what it is expected of. In HTML / JavaScript world most of the processing is done on the server side. Extensibility Silverlight provides great deal of extensibility as custom controls may be made. Extensibility is NOT restricted by browser but by the plug-in silverlight runs in. HTML / JavaScript works in a certain way and extensibility is generally done on the server side rather than client end. Client side is restricted by the limitations of the browser. Performance Silverlight provides localized storage which may be used for cached data storage. this reduces the response time. As processing can be done on client side itself; there is no need for server round trips. this decreases the round about time. Look and feel of the application is downloaded ONLY initially, afterwards ONLY data is fetched form the server. Security Silverlight is compiled code downloaded as .XAP; As compared to HTML / JavaScript, it provides more secure sandboxed approach. Cross - scripting is inherently prohibited in silverlight by default. If proper guidelines are followed silverlight provides much robust security mechanism as against HTML / JavaScript world. For example; knowing server Address in obfuscated JavaScript is easier than a compressed compiled obfuscated silverlight .XAP file. Some of these like (offline and Canvas support) will be available in HTML5. However, the timelines are not encouraging at all. According to Ian Hickson, editor of the HTML5 specification, the specification to reach the W3C Candidate Recommendation stage during 2012, and W3C Recommendation in the year 2022 or later. see http://en.wikipedia.org/wiki/HTML5 for details. The above is MY opinion. I will love to hear yours; do let me know via comments. Technorati Tags: Silverlight

    Read the article

  • SQL SERVER – Fix : Error 3623 – An invalid floating point operation occurred

    - by pinaldave
    Going back in time, I always had a problem with mathematics. It was a great subject and I loved it a lot but I only mastered it after practices a lot. I learned that mathematics problems should be addressed systematically and being verbose is not a trick, I learned to solve any problem. Recently one of reader sent me an email with the title “Mathematics problem – please help!” and I was a bit scared. I was good at mathematics but not the best. When I opened the email I was relieved as it was Mathematics problem with SQL Server. My friend received following error while working with SQL Server. Msg 3623, Level 16, State 1, Line 1 An invalid floating point operation occurred. The reasons for the error is simply that invalid usage of the mathematical function is attempted. Let me give you a few examples of the same. SELECT SQRT(-5); SELECT ACOS(-3); SELECT LOG(-9); If you run any of the above functions they will give you an error related to invalid floating point. Honestly there is no workaround except passing the function appropriate values. SQRT of a negative number will give you result in real numbers which is not supported at this point of time as well LOG of a negative number is not possible (because logarithm is the inverse function of an exponential function and the exponential function is NEVER negative). When I send above reply to my friend he did understand that he was passing incorrect value to the function. As mentioned earlier the only way to fix this issue is finding incorrect value and avoid passing it to the function. Every mathematics function is different and there is not a single solution to identify erroneous value passed. If you are facing this error and not able to figure out the solution. Post a comment and I will do my best to figure out the solution. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Error Messages, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • SQL SERVER – World Shapefile Download and Upload to Database – Spatial Database

    - by pinaldave
    During my recent, training I was asked by a student if I know a place where he can download spatial files for all the countries around the world, as well as if there is a way to upload shape files to a database. Here is a quick tutorial for it. VDS Technologies has all the spatial files for every location for free. You can download the spatial file from here. If you cannot find the spatial file you are looking for, please leave a comment here, and I will send you the necessary details. Unzip the file to a folder and it will have the following content. Then, download Shape2SQL tool from SharpGIS. This is one of the best tools available to convert shapefiles to SQL tables. Afterwards, run the .exe file. When the file is run for the first time, it will ask for the database properties. Provide your database details. Select the appropriate shape files and the tool will fill up the essential details automatically. If you do not want to create the index on the column, uncheck the box beside it. The screenshot below is simply explains the procedure. You also have to be careful regarding your data, whether that is GEOMETRY or GEOGRAPHY. In this example,  it is GEOMETRY data. Click “Upload to Database”. It will show you the uploading process. Once the shape file is uploaded, close the application and open SQL Server Management Studio (SSMS). Run the following code in SSMS Query Editor. USE Spatial GO SELECT * FROM dbo.world GO This will show the complete map of world after you click on Spatial Results in Spatial Tab. In Spatial Results Set, the Zoom feature is available. From the Select label column, choose the country name in order to show the country name overlaying the country borders. Let me know if this tutorial is helpful enough. I am planning to write a few more posts about this later. Note: Please note that the images displayed here do not reflect the original political boundaries. These data are pretty old and can probably draw incorrect maps as well. I have personally spotted several parts of the map where some countries are located a little bit inaccurately. Reference : Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, SQL, SQL Add-On, SQL Authority, SQL Query, SQL Scripts, SQL Server, SQL Spatial, SQL Tips and Tricks, SQL Utility, T SQL, Technology

    Read the article

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