Search Results

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

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

  • sql select with php variable

    - by user1572526
    I'm trying to print out a html-table from db-table 'dimensions'. I only want dimensions from the selected pipetype which I get from a dropdownbox. For now I just put in "Steel" manually. Steel has pipe_id = 2 in db-table 'pipes'. I've run the first query in my db-tool and it returns 2 so there's nothing wrong there. The second query returns nothing. But when I manually set $wq = 2 (which I comment out below) it prints out the html-table perfectly. What am I doing wrong here? $wq="SELECT pipe_id FROM pipes WHERE title_en = 'Steel'"; //$wq = '2'; $sql="SELECT * FROM dimensions WHERE pipe_id = '".$wq."'";

    Read the article

  • How do I send the ckeditor config using jQuery service?

    - by syn4k
    My service is built and it is sending the config variable to my js file: [['SpellChecker','-','Undo','Redo','-','Bold','Italic','Underline','NumberedList','BulletedList']] The above is assigned to my javascript like so: var config = "<?= stripslashes($_REQUEST['config']) ?>"; I can alert out the config just fine: console.log(config) does send back the correct data... However, I get an error thrown in my console!: v is undefined [Break On This Error] var u=n.toolbox.toolbars,v=n.config.to...aximize','ShowBlocks','-','About']]; If I comment out the config: //CKEDITOR.config.toolbar = config; everything works fine but the configuration doesn't exist, of course...

    Read the article

  • matrix = *((fxMatrix*)&d3dMatrix); //Evil?

    - by Xilliah
    I've been using matrix = *((fxMatrix*)&d3dMatrix); for quite a while. It worked fine until my screen turned black and received a bucket of frustration on my desk. fxMatrix contains 4 fxVectors. fxVector used to be 16 bytes, but now it was suddenly 20. This was because it inherited fxStreamable, which added the vTable. So one solution is of course just to not inherit fxStreamable, and leave a comment saying that it must always be 16 bytes and never more. Another solution would be to make conversion functions, and copy the matrix completely. This makes it more secure, but has an impact on the performance. I suppose this is the best idea. Another solution is to not convert at all, and stick to D3DXMATRIX, but this makes the engine inconsistent and I personally really dislike this idea. What is your opinion?

    Read the article

  • How to send exceptions to exceptionController?

    - by ivar
    <bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver"> <property name="mappedHandlers"> <set> <ref bean="exceptionController" /> </set> </property> <property name="defaultErrorView" value="tiles/content/error" /> </bean> I'm trying to send exceptions to a controller so I can create a redirect. If I comment out the mappedHandlers part then the error tile is displayed but it is only a tile. The rest of the tiles load normally. I need to make a redirect in the controller so I can show an error page not just an error tile. I can't find enough information or an example how the exception invokes some method in exceptionController.

    Read the article

  • addslashes and addcslahes

    - by theband
    I was seeing today the addslashes and addcslashes in php.net, but did not get the point on what is the difference between them and what are the characters escaped in these two. <?php $originaltext = 'This text does NOT contain \\n a new-line!'; $encoded = addcslashes($originaltext, '\\'); $decoded = stripcslashes($encoded); //$decoded now contains a copy of $originaltext with perfect integrity echo $decoded; //Display the sentence with it's literal \n intact ?> If i comment the $decoded variable and echo $encoded, i get the same value which is in the original string. Can anyone clearly explain me the difference and use of these two.

    Read the article

  • Javascript working in Firefox but not in IE -

    - by Summer
    I have this authnav='<li class="last"><a href="auth/login">login</a></li>'+ '<li><a href="auth/create_account">create account</a></li>'; It works fine in Firefox, but Internet Explorer gives me an "Error: Object doesn't support this property or method" I'm mystified - what could be going on here? There's a comment line above the offending line, could that possibly be making a difference? //authnav='<li class="last"><a href="auth/login">login</a></li>'; Check out the page yourself at http://www.imagineelection.com. I want two little links, "login" and "create account", to appear on the top right of the page. Thanks!

    Read the article

  • Is it legal for a C++ reference to be NULL?

    - by BCS
    A while back I ran into a bug the looked something like this: void fn(int &i) { printf(&i == NULL ? "NULL\n" : "!NULL\n"); } int main() { int i; int *ip = NULL; fn(i); // prints !NULL fn(*ip); // prints NULL return 0; } More recently, I ran into this comment about C++ references: [References arguments make] it clear, unlike with pointers, that NULL is not a possible value. But, as show above, NULL is a possible value. So where is the error? In the language spec? (Unlikely.) Is the compiler in error for allowing that? Is that coding guide in error (or a little ambiguous)? Or am I just wandering into the minefield known as undefined behavior?

    Read the article

  • How do I post a link to the feed of a page via the Graph API *as* the page?

    - by jsdalton
    I'm working on a plugin for a Wordpress blog that posts a link to every article published to a Facebook Page associated with the blog. I'm using the Graph API and I have authenticated myself, for the time being, via OAuth. I can successfully post a message to the page using curl via a POST request to https://graph.facebook.com/{mypageid}/feed` with e.g. message = "This is a test" and it published the message. The problem is that the message is "from" my user account. I'm an admin on this test page, and when I go to Facebook and post an update from the web, the link comes "from" my page. Is there a way to authenticate myself as a page? Or is there an alternate way to POST to a page feed that doesn't end up being interpreted as a comment from a user? Thanks for any thoughts or suggestions.

    Read the article

  • Objective C: App freezes when using a timer

    - by Chris
    It took me hours to figure out how to implement a timer into my program, but when it runs, the app doesn't load completely as it did before the timer. In my main.m: int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; OutLauncher *theLauncher = [[OutLauncher alloc] init]; NSTimer *theTimer = [theLauncher getTimer]; [theTimer retain]; [[NSRunLoop currentRunLoop] addTimer: theTimer forMode: NSDefaultRunLoopMode]; [[NSRunLoop currentRunLoop] run]; [pool release]; return 0; } The file OutLauncher is being imported into that, which looks like this: - (void)doStuff { NSLog( @"Doing Stuff"); } - (NSTimer *)getTimer{ NSTimer *theTimer; theTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector: @selector(doStuff) userInfo:nil repeats:YES]; return [theTimer autorelease]; } The timer works, the console updates every second with the phrase "doing stuff" but the rest of the program just won't load. It will if I comment out the code I added to int main though

    Read the article

  • jquery specific show buttons on hover

    - by bob
    I have an application creating a bunch of divs through a loop. Each div has the class "product" so it looks like <div class="product"> !.....stuff here ....! <div class="show_on_hover">...buttons here... </div> </div> so there are about 12 of these same divs per page. I would like to hover over a specific one and show the specific "show_on_hover" div which is initially set to display:none. $('.product').hover(function() { $(.show_on_hover).show(); }, function () { $(.show_on_hover).hide(); } ); That is what I have so far but it will show ALL of the .show_on_hovers on the page so I am wondering how to get only the specific one you have moused over to show. This effect is seen on youtube when you mouseover any of the comments, and some comment tools pop up. Thanks!

    Read the article

  • Generically creating objects in C#

    - by DrLazer
    What I am trying to do is load in objects from an XML save file. The problem is those objects are configurable by the user at runtime, meaning i had to use reflection to get the names and attributes of those objects stored in an XML file. I am in the middle of a recursive loop through the XML and up to the part where I need to create an object then thought ..... ah - no idea how to do that :( I have an array stuffed with empty objects (m_MenuDataTypes), one of each possible type. My recursive loading function looks like this private void LoadMenuData(XmlNode menuDataNode) { foreach (object menuDataObject in m_MenuDataTypes) { Type menuDataObjectType = menuDataObject.GetType(); if (menuDataObjectType.Name == menuDataNode.Name) { //create object } } } I need to put some code where my comment is but I can't have a big switch statement or anything. The objects in my array can change depending on how the user has configured the app.

    Read the article

  • How can I implement drag-out-to-delete in Flex?

    - by Chris R
    I have a List component from which I'd like to be able to remove items using drag & drop, but without having a specific target. If you use the mac, the behaviour I'm looking for is something like what the Dock uses; when you drag something out of the bounds of the control it should get an icon that indicates that it'll be deleted (OSX uses a cloud or something?) and then if you release it it will be removed from the list. How can I do this? (If I need to provide a more clear description, please comment; I'll fill in what I can)

    Read the article

  • Visual Studio 2010 Compiling C code

    - by Corsen2000
    I have the following code snippet. This is a c file in visual studio 2010. If i try to compile this with the line: int hello = 10; commented out it will compile just fine. If I comment that line in it will not compile. Am I missing something or should I not be using Visual Studio 2010 to compile C code. If this is a Visual Studio problem can anyone recommend a easy to use IDE / Compiler that I can for C. Thank You int* x = (int*) calloc(1, sizeof(int)); *x = 5; //int hello = 10; printf("Hello World! %i", *x); getchar();

    Read the article

  • Determining if an offset is in between line numbers?

    - by Sophomore
    hi I need to determine if a given selection is in between a start line and an end line. I have an ILineRange and a given offset within the viewport of eclipse. (I need to know, if the selection (from a remote party) was made within the current viewport of the local user. Unfortunately, I cannot get an LineRange from the selection. I must rely on getOffset() and getLength()... Anyone has an idea? I think there is not a clean solution for this, as the offset (or the characters per line vary (new line lines or a big block of comment).

    Read the article

  • response.sendRedirect not working

    - by Amar
    response.sendRedirect method is not working in my program. String id="java"; try { query = "select Id from Users where Id= ?"; ps =Database.getConnection().prepareStatement(query); ps.setString(1, id); rs = ps.executeQuery(); if(rs.next()){ out.println(rs.getString(1)); }else { //out.println("wrong user"); response.sendRedirect("www.google.com"); } rs.close(); }catch(Exception e){ //e.printStackTrace(); System.out.print(e); } form the above i commented "out.println("wrong user");". when i remove this comment it works. but no redirect to the google page. Any answers?

    Read the article

  • Hibernate - Persisting polymorphic joins

    - by Marty Pitt
    Hi I'm trying to understand how to best implement a polymorphic one-to-many in hibernate. Eg: @MappedSuperclass public class BaseEntity { Integer id; // etc... } @Entity public class Author extends BaseEntity {} @Entity public class Post extends BaseEntity {} @Entity public class Comment extends BaseEntity {} And now, I'd like to also persist audit information, with the following class: @Entity public class AuditEvent { @ManyToOne // ? BaseEntity entity; } What is the appropriate mapping for auditEvent.entity? Also, how will Hibernate actually persist this? Would a series of join tables be generated (AuditEvent_Author , AuditEvent_Post, AuditEvent_Comment), or is there a better way? Note, I'd rather not have my other entity classes expose the other side of the join (eg., List<AuditEvent> events on BaseEntity) - but if that's the cleanest way to implement, then it will suffice.

    Read the article

  • Deploy tracking with Ruby on Rails and Capistrano

    - by TK
    Like every commit has a reason and purpose, I think each deploy has a purpose and reason. Source code commits have a comment. But deploying doesn't have any. How do I record a reason and purpose for each deploy automatically? I need to keep a record of: Who deployed to where and what time. Why deployed? Bug fixes? Feature update? Emergency fix not on iteration plan? Which git or svn ref was used? Have anybody felt the need for this kind of system? How do you feel about my approach? How can I achieve my goal? I'm currently using Capistrano for deployment.

    Read the article

  • How do I determine darker or lighter color variant of a given color?

    - by Nidonocu
    Given a source color of any hue by the system or user, I'd like a simple algorithm I can use to work out a lighter or darker variants of the selected color. Similar to effects used on Windows Live Messenger for styling the user interface. Language is C# with .net 3.5. Responding to comment: Color format is (Alpha)RGB. With values as bytes or floats. Marking answer: For the context of my use (a few simple UI effects), the answer I'm marking as accepted is actually the most simple for this context. However, I've given up votes to the more complex and accurate answers too. Anyone doing more advanced color operations and finding this thread in future should definitely check those out. Thanks SO. :)

    Read the article

  • Update int array based on parent

    - by Pickels
    I have the following int[] in my database: '{0}' '{0,0}' '{0,0,0}' '{0,0,0,0}' This column is used to sort my tree data. Now when a parent updates it's order the children should also update. For example if the second record updates it's order to 1 it should result in the following. '{0}' '{0,1}' '{0,1,0}' '{0,1,0,0}' So I was wondering what the query would be to update record 3 and 4. In case it's not clear what I am asking leave a comment I can add additional information. Screenshot of my actual data:

    Read the article

  • How to trigger Mouse-Over on iPhone?

    - by Andrew
    This might seem like a really dumb question, but I am writing an application and I have come across where my mouse-over, mouse-click and mouse-hover need different events bound to them. Now on Internet Explorer, Firefox, and Safari. It all works as expected. However, on my iPhone the actions will not trigger. Now my question is are their any specific ways I can have the Mouse-Over essentially be fired when I hold my finger down and trigger an event? An example where this doesn't work is right on this website when you hover over a comment it is supposed to display the +1 or flag icon. I am using jquery.

    Read the article

  • Is it possible to run node script from a web page as differnt user?

    - by Blame
    I'am searching for days now but could not get an answer. I would like to do the following: User connects to editor.html (Apache2 with basic http auth) User want to open a file on the server with his user/pass (same as in passwd) Node.js Script gets startet with user rights from above and user can edit file The Node Script will handly the connection via websockets and read/writes files. I think the biggest problem is that its not possible to run a node script on the server from a web page... and I don´t want to involve any php/cgi scripts... only Apache and Node.js / JS. Please also comment or answer if you know that it is really not possible... Thanks! Kodak

    Read the article

  • Java static source analysis/parsing (possibly with antlr), what is a good tool to do this?

    - by Berlin Brown
    I need to perform static source analysis on Java code. Ideally, I want the system to work out of the box without much modification from me. For example, I have used Antlr in the past, but I spent a lot of time building grammar files and still didn't get what I wanted. I want to be able to parse a java file and have return the character position of say: Character position start and end of a Java block comment Character position start and end of a Java class file Character position start and end of a Java method declaration, signature, and implementation. It looks like Antlr will do that, but I have yet to finish a grammar that actually gives me the positions of the code I need. Does anyone have that complete Antlr grammar and Java code to give the character positions of the parts in the Java source.

    Read the article

  • 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

  • including library and dll into c++ project

    - by user1612986
    i have a third party library (say tp.lib) and the third party dll (say tp.dll) which i need to use in my C++ project (my project is a dll project, lets call it my.dll). i have include the library with the #pragma comment(lib, "libraryname") in the header file and also included the path of the library file in the configurationproperties-linker-additional library directories in my c++ visual studio project. the code compiles okay. but fails to execute. when i use depends to check if i am missing someting i observe that the tp.dll is missing from my.dll. the tp.dll resides in the same library folder where the tp.lib resides. my quesiton is what should i do so that tp.dll get included to my.dll thanks in advance

    Read the article

  • FETCH INTO doesn't raise an exception if the set is empty, does it?

    - by Cade Roux
    Here is some actual code I'm trying to debug: BEGIN OPEN bservice (coservice.prod_id); FETCH bservice INTO v_billing_alias_id, v_billing_service_uom_id, v_summary_remarks; CLOSE bservice; v_service_found := 1; -- An empty fetch is expected for some services. EXCEPTION WHEN OTHERS THEN v_service_found := 0; END; When the parametrized cursor bservice(prod_id) is empty, it fetches NULL into the three variables and does not throw an exception. So whoever wrote this code expecting it to throw an exception was wrong, right? The comment seems to imply that and empty fetch is expected and then it sets a flag for later handling, but I think this code cannot possibly have been tested with empty sets either. Obviously, it should use bservice%NOTFOUND or bservice%FOUND or similar.

    Read the article

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