Search Results

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

Page 130/206 | < Previous Page | 126 127 128 129 130 131 132 133 134 135 136 137  | Next Page >

  • How to call a php controller method using jquery?

    - by chandru_cp
    I am developing a web application and i am integrating jquery in it... Now looking for ajax calls with jquery to my controller function.... jquery.ajax() would be useful i think so... But how to call my controller method.... $.ajax({ type: "POST", url: "", data: "", contentType: "application/json; charset=utf-8", async: false, dataType: "json", success: function(jsonObj) { function loadbookdetails() { //Paging $college=$_SESSION['college']; $this->load->library('pagination'); $data['bookdetails'] = $this->librarymodel->selectbook($college); //$data['rackOptionData'] = $this->librarymodel->selectrack(); if(empty($data['bookdetails'])) { $data['comment'] = 'no record found!'; } $this->load->view('bookdetials',$data); } I am fetching this records here how to use it with jquery.ajax() function and how to convert $data to json and use it with jquery and iterate with a table...

    Read the article

  • How can I create a custom cleanup mode for git?

    - by Danny
    Git's default cleanup of strip removes all lines starting with a # character. Unfortunately, the Trac engine's wiki formatter uses hashes in the beginning of a code block to denote the syntax type. Additionally any code added verbatim might include hashes as they are a common comment prefix; Perl comes to mind. In the following example the comments all get destroyed by git's cleanup mode. Example: {{{ #!/usr/bin/perl use strict; # say hi to the user. print "hello world\n"; }}} I'd like to use a custom filter that removes all lines beginning with a hash from the bottom of the file upwards. Leaving those lines that being with a hash that are embedded in the commit message I wrote alone. Where or how can I specify this in git? Note, creating a sed or perl script to perform the operation is not a problem, just knowing where to hook it into git is the question.

    Read the article

  • Deactivate any calls to Log before publishing: are there tools to do this?

    - by Nicolas Raoul
    According to Google, I must "Deactivate any calls to Log methods in the source code" before publishing my Android app (section 4 of the publication checklist). My open-source project is large and it is a pain to do it manually every time I release. Additionally, removing a Log line is potentially tricky, for instance: if(condition) Log.d(LOG_TAG, "Something"); data.load(); data.show(); If I comment the Log line, then the condition applies to the next line, and chances are load() is not called. Are such situations rare enough that I can decide it should exist? This is on the official checklist, so I guess many people do this on a regular basis. So, is there a tool that removes all Log lines? Preferably one that is not tricked by code like the above.

    Read the article

  • In C#: How to declare a generic Dictionary with a type as key and an enumeration of that type as val

    - by Marcel
    Hi all, I want to declare a dictionary that stores typed IEnumerable's of a specific type, with that exact type as key, like so: (Edited to follow johny g's comment) private IDictionary<Type, IEnumerable<T>> _dataOfType where T: BaseClass; //does not compile! The concrete classes I want to store, all derive from BaseClass, therefore the idea to use it as constraint. The compiler complains that it expects a semicolon after the member name. If it would work, I would expect this would make the later retrieval from the dictionary simple like: IEnumerable<ConcreteData> concreteData; _sitesOfType.TryGetValue(typeof(ConcreteType), out concreteData); How to define such a dictionary?

    Read the article

  • Is this Javascript object literal key restriction strictly due to parsing?

    - by George Jempty
    Please refer to the code below, when I "comment in" either of the commented out lines, it causes the error (in IE) of "':' expected". So then is my conclusion correct, that this inability to provide a reference to an object value, as an object key in a string literal; is this strictly an interpreter/parsing issue? Is this a candidate for an awful (or at least "bad") "part" of Javascript, in contrast to Crockford's "good parts"? <script> var keys = {'ONE': 'one'}; //causes error: //var obj1 = {keys.ONE: 'value1'}; //var obj1 = {keys['ONE']: 'value1'}; //works var obj1 = {}; obj1[keys.ONE] = 'value1'; //also works var key_one = keys.ONE; var obj2 = {key_one: 'value1'}; </script>

    Read the article

  • Boost::asio bug in MSVC10 - Failing BOOST_WORKAROUND in ~buffer_debug_check() in buffer.hpp

    - by shaz
    A straight compilation of example http://www.boost.org/doc/libs/1_43_0/doc/html/boost_asio/tutorial/tutdaytime3/src.html results in a runtime null pointer exception. Stack trace points to the buffer_debug_check destructor which contains this comment: // MSVC's string iterator checking may crash in a std::string::iterator // object's destructor when the iterator points to an already-destroyed // std::string object, unless the iterator is cleared first. The test #if BOOST_WORKAROUND(BOOST_MSVC, = 1400) succeeds in MSVC10 and (but) results in a null pointer exception in c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility line 123 _Iterator_base12& operator=(const _Iterator_base12& _Right) { // assign an iterator if (_Myproxy != _Right._Myproxy) _Adopt(_Right._Myproxy->_Mycont); return (*this); } _Right._Myproxy is NULL

    Read the article

  • Changing printer preferences in Windows programmatically

    - by Andrew Alexander
    I've written a script that installs several printers for a new user. I want to change the settings on some of these so that they can print on both sides of the page. I BELIEVE this involves modifying an attribute with printui, however it might need VB script or possibly another .NET language (I'd either use VB, C# or IronPython). I can add a comment to a given printer, but how do I select preferences and modify them? Pseudocode would look like this: printui.exe /n printername /??? [how to change quality desired] OR calls to the relevant Windows API.

    Read the article

  • Django ORM dealing with MySQL BIT(1) field

    - by Carles Barrobés
    In a Django application, I'm trying to access an existing MySQL database created with Hibernate (a Java ORM). I reverse engineered the model using: $ manage.py inspectdb > models.py This created a nice models file from the Database and many things were quite fine. But I can't find how to properly access boolean fields, which were mapped by Hibernate as columns of type BIT(1). The inspectdb script by default creates these fields in the model as TextField and adds a comment saying that it couldn't reliably obtain the field type. I changed these to BooleanField but it doesn't work (the model objects always fetch a value of true for these fields). Using IntegerField won't work as well (e.g. in the admin these fields show strange non-ascii characters). Any hints of doing this without changing the database? (I need the existing Hibernate mappings and Java application to still work with the database).

    Read the article

  • Backdoor Strategy- opinion needed.

    - by the Hampster
    I'm creating an application to track publications and grants for a university. Professors will need to put they CV into the system when it is up and running. Yeah, right. The person in charge is planning on hiring someone to input all of the information, but my questions is how? The strategy I'm thinking of is to install a backdoor. The lucky undergrad can log in as any professor using the backdoor. Once all the data is removed, the backdoor can be removed. Doing so would probably be as simple as editing out a comment in the config file. The IT guys would still have access, but since they control the machines, they would have access anyway. Are there any flaws to this strategy?

    Read the article

  • Algorithm Question.. Linked List..

    - by AGeek
    Hi, Scenario is as follows:- I want to reverse the direction of the singly linked list, In other words, after the reversal all pointers should now point backwards.. Well the algorithm should take linear time. The solution that i have thought of using another datastructure A Stack.. With the help of which the singly linked list would be easily reversed, with all pointers pointing backwards.. But i am in doubt, that whether the following implementation yeild linear time complexity.. Please comment on this.. And if any other efficient algorithm is in place, then please discuss.. Thanks.

    Read the article

  • Django: where do I call settings.configure?

    - by RexE
    The Django docs say that I can call settings.configure instead of having a DJANGO_SETTINGS_MODULE. I would like my website's project to do this. In what file should I put the call to settings.configure so that my settings will get configured at the right time? Edit in response to Daniel Roseman's comment: The reason I want to do this is that settings.configure lets you pass in the settings variables as a kwargs dict, e.g. {'INSTALLED_APPS': ..., 'TEMPLATE_DIRS': ..., ...}. This would allow my app's users to specify their settings in a dict, then pass that dict to a function in my app that augments it with certain settings necessary to make my app work, e.g. adding entries to INSTALLED_APPS. What I envision looks like this. Let's call my app "rexe_app". In wsgi.py, my app's users would do: import rexe_app my_settings = {'INSTALLED_APPS': ('a','b'), ...} updated_settings = rexe_app.augment_settings(my_settings) # now updated_settings is {'INSTALLED_APPS': ('a','b','c'), 'SESSION_SAVE_EVERY_REQUEST': True, ...} settings.configure(**updated_settings)

    Read the article

  • How can I (from a script) add something to the zsh command history?

    - by Brandon
    I'd like to be able to look through my command history and know the context from which I issued various commands--in other words, "what directory was I in?" There are various ways I could achieve this, but all of them (that I can think of) would require manipulating the zsh history to add (for instance) a commented line with the result of $(pwd). (I could create functions named cd & pushd & popd etc, or I could use zsh's preexec() function and maybe its periodic() function to add the comment line at most every X seconds, just before I issue a command, or perhaps there's some other way.) The problem is, I don't want to directly manipulate the history file and bypass the shell's history mechanism, but I can't figure out a way (with the fc command, for instance) to add something to the history without actually typing it on the command line. How could I do this?

    Read the article

  • UITableView with contact image problems.

    - by prathumca
    As par my app requirement, I'm showing the contact images in a UITableView as shown below. ABRecordRef contact = [self getContact]; if(contact && ABPersonHasImageData(contact)) { UIImage *contactImage = [UIImage imageWithData:(NSData*)ABPersonCopyImageData(contact)]; callImage.image = contactImage; } I've two problems if I use the above code segment. Table Scrolling is too slow. If comment the above code, then UITable responds very fast. Memory Management. My app started using 25 - 30 MB of RAM. Is there any better way to avoid the above two problems?

    Read the article

  • Eclipse Subversive revision numbers on multiple project commit

    - by CannyDuck
    If I have 2 projects in Eclipse that refers to the same repository location. repository location: svn://server project-module1 - svn://server/trunk/project-module1 project-module2 - svn://server/trunk/project-module2 So if I sync the project change with Subversive and have a change in module1 and module2 that refers to the same context I select all files and perform one commit, but if I look into my project revisions after that I see that 2 revisions were created. One for module1 and one for module2 with the same comment. How can I change the behave that only one revision number is created?

    Read the article

  • Check if a type is an instantiation of a template

    - by Pedro Lacerda
    I have structs like struct RGBA (T) {/* ... */} struct BMPFile (DataT) if (is(DataT == RGBA)) {/* ... */} But is(DataT == RGBA) cannot work because DataT is a type and RGBA is a template. Instead I need check if a type is an instantiation of a template in order to declare file like BMPFile!(RGBA!ushort) file; In a comment @FeepingCreature showed struct RGBA(T) { alias void isRGBAStruct; } struct BMPFile (DataT) if (is(DataT.isRGBAStruct)) {} Although to be working I have no tips on alias void isRGBAStruct.

    Read the article

  • The emulator isn't showing the XML contents

    - by Roni Copul
    I have been reading Google's android tutorial (link added in the first comment) and I got a problem... In the tutorial they explain the XML elements (EditText and Button) and in the end they say how to tun the program to see the button + the text field. The problem is, that the emulator doesn't show them.. just a black screen. I even tried adding this line to the onCreate function - System.out.println("Hello World!"); but still the emulator is showing only black screen.. Here's the .java main file - http://pastebin.com/G5J9YjNe And the XML files (I mentioned what code is what file) - http://pastebin.com/VnRwAfMW What should I do? Thanks a lot for everyone who will help!

    Read the article

  • Some issue with bufferedReader

    - by thetna
    I have a java function as follows: public HashMap<String, ArrayList<Double>> embedWords(BufferedReader buffR1 { ArrayList<String > arrayList = new ArrayList<String>(); arrayList = getWords(buffR1); System.out.println("Word size:"+ arrayList.size()); ArrayList<ArrayList<Double>> arrList = getWordFeature(buffR1); System.out.println("Size of arrList:embedWords:"+arrList.size()); } Here , the problem is , the both of the function getWords and getWordFeatures can't give the size value. When i comment function getWords the function getWordFeature returns non-zero value .But when uncommented , the output is as follows: Word size:15055 Size of arrList:embedWords: 0

    Read the article

  • iphone getting hours/min/seconds app crashes.

    - by coure06
    i have this code in my overridden drawRect method NSDate *date = [NSDate date]; NSCalendar *calendar = [NSCalendar currentCalendar]; unsigned int unitFlags = NSHourCalendarUnit|NSMinuteCalendarUnit|NSSecondCalendarUnit; NSDateComponents *comp = [calendar components:unitFlags fromDate:date]; NSInteger h = [comp hour]; NSInteger m = [comp minute]; NSInteger s = [comp second]; NSLog(@"%i,%i,%i", h,m,s); NSLog(@"test"); [date release]; [calendar release]; [comp release]; I am calling drawRect using setNeedsDisplay from my custom method (timer based after each 1 secon). It runs only once and then app exit automatically. If i comment out all the code and just write NSLog(@"test"); then application works ok, it logs "test" after each 1 sec.

    Read the article

  • sharepoint spweb and spsite disposal

    - by user327045
    I've been using the following code in a .NET 1.1 SharePoint 2003 environment and it works great: try { site = SPControl.GetContextSite(Context); web = site.OpenWeb(); ... } catch (Exception export) { output.Write("Caught Exception: <br/><br/>"); output.Write(export.Message + "<br><br>"); output.Write(export.StackTrace); } finally { if (web != null) web.Dispose(); if (site != null) site.Dispose(); } However, I'm currently porting the code to a .NET 2.0 SharePoint 2007 environment and I get the following error message: "Trying to use an SPWeb object that has been closed or disposed and is no longer valid." If I comment out the Dispose() code, it works fine. But won't this cause memory leaks? What's the best way to fix the problem?

    Read the article

  • ExtJS Output JSON

    - by venkatesh a
    This is my Json structure. Got load into the form perfectly. Once i alter this form and click submit button. Output have to save with same structure like existing. Can anyone please help me to solve this ASAP?? { "comment": null, "clientinfo": { "clientName": "Timex", "clientCode": "143", "startDate": "04-Oct-2012", "clientType": "CR", "clientID": "TimexGroup", "hasGAMLeft": null, "gamLocation": "GB", "clientName": "xxx", "groupSegment": "FI", "groupSubSegment": "SUB-FI-SUB", "groupDomicileCounrty": "IN", "groupIsicCode": "2403-Copper & zinc" }, "CompanyClients": [ { "CName": "Timex", "ID": "1424317", "cType": "CR", "gType": "SD" }, { "CName": "Casio", "ID": "1416529", "cType": "AR", "gType": "RD" } ], "Country": [ { "CountryID": "Singapore", "CountryText": "SG" }, { "CountryID": "India", "CountryText": "IN" } ] } I used below code to POST. saves fine as its handcoded. i need to save this dynamically.

    Read the article

  • Unexpected htaccess behaviour (mod_rewrite and apache)

    - by avastreg
    Yeah, mod_rewrite is driving me crazy. Here is the problem: my htaccess RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [L,QSA] when i try to access the page advantix (so address was www.mywebsite.com/advantix), i'm being redirected to advantix/?url=advantix Looking at the access log, i have a suspicious 301 in the middle "GET /advantix HTTP/1.1" 301 335 "-" "Mozilla/5.0" "GET /advantix/?url=advantix HTTP/1.1" 200 186 "-" "Mozilla/5.0" There is one important detail: advantix is a directory. So, if i comment that rule, advantix goes to the folder and list the files. Why it applies automatically the / if there's a folder matching? I don't want to reach the folder, i want to reach index.php?url=advantix with a call to advantix. I have the rewriteLogs too, but they didn't help more. My vhost conf has Directory tag with Options All, if helps, i don't know much about that.

    Read the article

  • What was the most productive improvement suggestion you ever made for your team

    - by questzen
    I suggested the testing and functional teams to use Freemind map for jotting the functional flows and test steps. There was some paranoia but our module took it up and the QA teams were surprised to see near zero review comments. There was misconception among the team that there are doing more work. I assured them that by the time others would complete their work along with comment fixes, we would be going out for team lunchs and we did. The real returns came when the developers started refering to the created document in their discussions. So share your contribution(s).

    Read the article

  • How can I program ksh93 to use bash autocompletion?

    - by Norman Ramsey
    In a comment in response to a shell question, user tinkertim said that it was easy to hack ksh to use the bash autocompletion library. I would like nothing better than to use bash autocompletion with AT&T ksh93. How can this be done? ksh93 has a new release several times a year, so I am looking for a solution that does not involve modifying the source code. ksh93 can link new C modules dynamically and also is highly programmable (I run a ksh function at every keystroke), so modifying the source should not really be necessary. Note: I am not talking about filename autocompletion, which is easy to do in ksh. I'm talking about all the other yummy autocompletion stuff that bash does, like autocompletion options for nmh commands or autocompleting Mercurial commmands. Stuff like that.

    Read the article

  • C programing some errors :(

    - by Pedro
    Hi...this is a little code that i'm doing, but i have some errors...:S Hi have a txt file and i want to "convert to xml", but the program must know what is comments, and must organize... txt file: /* Licenciaturas na ESTG-IPVC 2009 – v1.1*/ - Info, <N Alunos> <hr>--------------------------------------------------- 3 <hr>--------------------------------------------------- - data, <course><Number>;<name>;<email> - disciplinas, <n disciplines>;<note>;[<note>;] </hr>--------------------------------------------------- LEI;7671;Name name name;[email protected]; 9;8;12;9;12;11;6;15;7;11; LTCGM;6567;nam1 nam2 nam3;[email protected]; 6;13;14;12;11;16;14; LEI;7701;xxxxx xxxx xxxx;[email protected]; 8;13;11;7;14;12;11;16;14; My code: int main(int argc, char *argv[]) { char first[60];//array char comment[60];//array char nome_int[60];//array char total[60];//array char course[60];//array int i; char notas[60]; char *number, *name, *mail, *total_disci; int total_cad; char disciplines[60]; printf("Int. the name of the file to convert\n"); scanf("%s",&nome_int); FILE *fp = fopen(nome_int, "r"); //open file FILE *conver = fopen("conver.xml","w");// opne output FILE *coment = fopen("coment.txt","w"); if (fp == NULL) { printf("File not found\n"); exit(1); } else { fgets(first, 60,fp); fputs(first,coment); while (!(feof(fp))){ fgets(first, 60, fp); if (first[0] == '-'){ fputs(first,coment); } for(i=1;fscanf(fp,"%s",total)!=-5;i++){ if(i==2){ printf("Total %s",total);//here the program stops } } fgets(course,60,fp); if(course[0]=='L'){ number = strchr(course, ';');//here course is an array but must be an appointer, what can i do? *number = '\0'; number++; name = strchr(number, ';'); *name = '\0'; name++; mail= strchr(name, ';'); *mail = '\0'; mail++; char *curso1; total_cad=atoi(total_disci); printf("Course: %s\n",course); printf("Number: %s\n",number); printf("Name: %s\n",name); printf("e-mail: %s\n",mail); } fgets(disciplines,60,fp);//here crash total_disci= strchr(mail, ';'); *total_disci = '\n'; total_disci++; printf("Total disciplines: %d\n",total_cad); } } fclose(fp); fclose(coment); fclose(conver); system("PAUSE"); return 0; } the convert file must be like this: <xml> <list_courses> <course> <sigla>LEI</sigla> <NAlunos>2</NAlunos> <list_students> <students> <number>7671</number> <name>name name name</name> <email>[email protected]</email> <stat>disaproved</stat> <media_notes>10</media_notes> <biggest_note>15</biggest_note> <small_nota>6</small_nota> </students> </list_students> </course> </list_courses> </xml> _______________________________________- now separated by only comment on what is what and converted to xml. also had to do was impressed that the program could name, email address, number, etc. .. here the main errors do not want to do for me, just want to see the errors, I spent the whole day right back from them and nothing ... someone who can help, please do it :)

    Read the article

  • What Programming Book would you NOT recommend to Developers?

    - by Ender
    Like a lot of people on Stack Overflow I love to read books about programming, almost as much as I love to read the lists that people add onto their websites, Blog's and this very website. However, for every gem there are a thousand turds, and to one developer a gem could just be a shiny turd to another. Whilst there are hundreds of book questions on this website asking users to recommend books that they have loved I have decided (after looking for a similar question and not finding it) to create a list of books that users have detested. After all, if we're going to fork out money for these books it'd be a good idea to get both positive and negative aspects out there. Please refer to a specific book, and with it add an image of either the latest version or the version you have read. Also, if you have the time please comment on the answers to provide your experiences with the books.

    Read the article

< Previous Page | 126 127 128 129 130 131 132 133 134 135 136 137  | Next Page >