Search Results

Search found 1287 results on 52 pages for 'eric davidson'.

Page 5/52 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Sanitizing input for display in view when using simple_format

    - by Eric
    Hi, I'm trying to figure out the right way to display comments such that newlines and links are displayed. I know that usually, you should display user-inputs only when escaping html with h(). That of course won't display newlines or links, so I found the simple_format and auto_link methods. What I am now doing is: simple_format(santize(auto_link(comment.text))) Is this the right way to do this, and is it still safe from XSS attacks? Thanks! Eric

    Read the article

  • jQueryUI Sortable won't accept connected Draggable on a nested UL

    - by Eric
    I've posted an example here: http://jsfiddle.net/ericclemmons/LEHLX/2/ Really, what it comes down to is the classic "assigning users to groups" issue. I have a list of users and a list of groups, but I'd like to be able to have nesting of the groups: user "Eric" would be in "Users", "Web", and "Administrators". The problem is that I cannot drag a user to an empty <ul> in the list.

    Read the article

  • Visual Studio Add in.

    - by Eric Brown - Cal
    I was looking to write/get a visual studio add in. I want to be able to write descriptive log calls at the top and bottom of a function. like this log.debug("TheClass.TheMethod(string TheStringParam ="+TheStringParam+") - in"); log.debug("TheClass.TheMethod(string TheStringParam ="+TheStringParam+") - out"); Is there an adin that does this? Is there source anywhere for an add in like Ghost Doc that does reflection(or whatever) to parse the parameters and such? Thanks, Eric-

    Read the article

  • How do I change an existing XCode target from dynamic to static?

    - by Eric
    I'm working with an existing project that produces a dynamic library (Cocoa API). I'd rather generate a static library, but if I change the [Linking|Mach-O Type] field from "Dynamic Library" to "Static Library", both the Clean Project and Build Project complain that the target has an invalid MACH_O_TYPE value of 'staticlib'. Is there a straightforward way to get the build to produce a static .a file? Thanks, Eric

    Read the article

  • What is the correct response for web service?

    - by Eric
    One of my web services returns the list of ids of the the projects a person is owner of. That is, when I GET http://example.com/wsListProjects?user=eric I get back xml with the list of projects. However, when I specify user=xxx, who doesn't exist, I currently return a 404 response? Is this the correct response to return? Thanks.

    Read the article

  • How to create constant NSString by concatenating strings in Obj-C ?

    - by eric-morand
    Hi guys, I'm trying to instanciate a constant NSString by concatanating other NSString instances. Here is what I'm doing in my implementation file : static NSString *const MY_CONST = @"TEST"; static NSString *const MY_CONCATENATE_CONST = [NSString stringWithFormat:@"STRING %@", MY_CONST]; It leads to the following compilation error : Initializer element is not constant I suppose this is because stringWithFormat doesn't return a constant NSString, but since there is no other way to concatenate strings in Obj-C, what am I supposed to do ? Thanks for your help, Eric.

    Read the article

  • Python: Converting legacy string dates to dates

    - by Eric
    We have some legacy string dates that I need to convert to actual dates that can be used to perform some date logic. Converting to a date object isn't a problem if I knew what the format were! That is, some people wrote 'dd month yy', othes 'mon d, yyyy', etc. So, I was wondering if anybody knew of a py module that attempts to guess date formats and rewrites them in a uniform way? Any other suggestions? Thanks! :) Eric

    Read the article

  • How to deprecate a macro in GCC?

    - by Eric
    Hi, i Know how to use attribute deprecated to deprcate a function like this: int old_fn () __attribute__ ((deprecated)); But how to deprecate a Macro like this: #define OLD_MACRO 1 Thank you in advance. Eric

    Read the article

  • I want to display the missing (non-matching) records

    - by Eric
    Is there a way to program the following SQL query SELECT dbo.Assets_Master.Serial_Number, dbo.Assets_Master.Account_Ident, dbo.Assets_Master.Disposition_Ident FROM dbo.Assets_Master LEFT OUTER JOIN dbo.Assets ON dbo.Assets_Master.Serial_Number = dbo.Assets.Serial_Number WHERE (dbo.Assets.Serial_Number IS NULL) in c# .net code using dataviews or data relation or something else? I have a spreadsheet of about 4k rows and a data table that should have the same records but if not I want to display the missing (non-matching) records from the table. Thanks, Eric

    Read the article

  • Qt - drag and drop with graphics view framework

    - by David Davidson
    I'm trying to make a simple draggable item using the graphics framework. Here's the code for what I did so far: Widget class: class Widget : public QWidget { Q_OBJECT public: Widget(QWidget *parent = 0); ~Widget(); }; Widget::Widget(QWidget *parent) : QWidget(parent) { DragScene *scene = new DragScene(); DragView *view = new DragView(); QHBoxLayout *layout = new QHBoxLayout(); DragItem *item = new DragItem(); view->setAcceptDrops(true); scene->addItem(item); view->setScene(scene); layout->addWidget(view); this->setLayout(layout); } Widget::~Widget() { } DragView class: class DragView : public QGraphicsView { public: DragView(QWidget *parent = 0); }; DragView::DragView(QWidget *parent) : QGraphicsView(parent) { setRenderHints(QPainter::Antialiasing); } DragScene class: class DragScene : public QGraphicsScene { public: DragScene(QObject* parent = 0); protected: void dragEnterEvent(QGraphicsSceneDragDropEvent *event); void dragMoveEvent(QGraphicsSceneDragDropEvent *event); void dragLeaveEvent(QGraphicsSceneDragDropEvent *event); void dropEvent(QGraphicsSceneDragDropEvent *event); }; DragScene::DragScene(QObject* parent) : QGraphicsScene(parent) { } void DragScene::dragEnterEvent(QGraphicsSceneDragDropEvent *event){ } void DragScene::dragMoveEvent(QGraphicsSceneDragDropEvent *event){ } void DragScene::dragLeaveEvent(QGraphicsSceneDragDropEvent *event){ } void DragScene::dropEvent(QGraphicsSceneDragDropEvent *event){ qDebug() << event->pos(); event->acceptProposedAction(); DragItem *item = new DragItem(); this->addItem(item); item->setPos(event->pos()); } DragItem class: class DragItem : public QGraphicsItem { public: DragItem(QGraphicsItem *parent = 0); QRectF boundingRect() const; void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); protected: void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event); void mouseMoveEvent(QGraphicsSceneMouseEvent *event); void mousePressEvent(QGraphicsSceneMouseEvent *event); void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); }; DragItem::DragItem(QGraphicsItem *parent) : QGraphicsItem(parent) { setFlag(QGraphicsItem::ItemIsMovable); } QRectF DragItem::boundingRect() const{ const QPointF *p0 = new QPointF(-10,-10); const QPointF *p1 = new QPointF(10,10); return QRectF(*p0,*p1); } void DragItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget){ if(painter == 0) painter = new QPainter(); painter->drawEllipse(QPoint(0,0),10,10); } void DragItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event){ } void DragItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event){ } void DragItem::mousePressEvent(QGraphicsSceneMouseEvent *event){ QMimeData* mime = new QMimeData(); QDrag* drag = new QDrag(event->widget()); drag->setMimeData(mime); drag->exec(); } void DragItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event){ } main.cpp instantiates a Widget and shows it. When I try to drag the circle, the app just creates another circle over the original one, regardless of where I release the drag. qDebug() in DragScene's dropEvent() shows QPointF(0,0) everytime the drag ends. I'm having a hard time trying to understand exactly what I have to do, which classes I should subclass, which methods needs to be overriden, to make this work. The documentation on this isn't very detailed. I'd like to know how to make this work, and if there's some other, more comprehensive resource to learn about the graphics view framework, besides the official documentation (which is excellent btw, but it would be great if there was a more detailed treatise on the subject). EDIT: Following badgerr's advice, I replaced item-pos() in DragScene::dropEvent() with item-scenePos(), now the drop event creates a new circle in the drop site, which is more or less what I wanted. But the original circle is still in place, and while the drag is in progress, the item doesn't follow the mouse cursor. The QGraphicsSceneDragDropEvent documentation says that pos() should return the cursor position in relation to the view that sent the event, which, unless I got it wrong, shouldn't be (0,0) all the time. Weird. I've read in a forum post that you can use QDrag::setPixMap() to show something during the drag, and in examples I've seen pictures being set as pixmaps, but how do I make the pixmap just like the graphics item I'm supposed to be dragging?

    Read the article

  • Qt - invalid conversion to child class

    - by David Davidson
    I'm drawing polygons using the Graphics View framework. I added a polygon to the scene with this: QGraphicsPolygonItem *poly = scene->addPolygon(QPolygonF(vector_of_QPointF)); poly->setPos(some_point); But I need to implement some custom behaviour like selection, mouse over indicator, and other similar stuff on the graphics item. So I declared a class that inherits QGraphicsPolygonItem: #include <QGraphicsPolygonItem> class GridHex : public QGraphicsPolygonItem { public: GridHex(QGraphicsItem* parent = 0); }; GridHex::GridHex(QGraphicsItem* parent) : QGraphicsPolygonItem(parent) { } Not doing much with that class so far, as you can see. But shouldn't replacing QGraphicsPolygonItem with my GridHex class? This is throwing a " invalid conversion from 'QGraphicsPolygonItem*' to 'GridHex*' " error: GridHex* poly = scene->addPolygon(QPolygonF(vector_of_QPointF)); What am I doing wrong?

    Read the article

  • Loading default value in a dropdown and calling onchange event

    - by J. Davidson
    Hi i have following dropdown <div class="fcolumn"> <label class="text" for="o_Id">Months:</label> <select class="textMonths" id="o_Id" name="periodName" > <option value="000">Select Period--</option> </select> </div> In the following jquery, first it loads fnLoadP() in a drop down list. Than as a default I am loading one of the values in drop down which is '10'. It loads too as default value. But it should be executing $("#o_Id").change.. which it doesn't. $(document).ready(function () { var sProfileUserId = null; $("#o_Id").change(function () { //---- }); fnLoadP(); $("select[name='pName']").val('10'); }); }); Basically my goal is. After dropdown values are loaded, to load '10' as default value and call onchange event in the dom. Please let me know how to fix it.

    Read the article

  • Display contents of file as binary.

    - by Eric Davidson
    Is there a good way to display the contents of a file as binary? I am creating a program that needs to save and load a 2D arrays from a files. When loading a saved file the result appears different. I need to be able to view the contents of the saved file in plain binary to tell if my problem in in my save or load function. Is there a program like octal dump but is binary dump? Thanks.

    Read the article

  • how to format a date with code igniter

    - by Jeff Davidson
    I'm trying to figure out what I'm doing wrong here. I'm wanting to format the date_published field in my query and I'm getting an t_string syntax error in my IDE. $this->db->select('site_news_articles.article_title, site_news_articles.is_sticky,' date_format('site_news_articles.date_published, 'f jS, Y')'); UPDATE: function getNewsTitles($category_id) { $this->db->select('site_news_articles.article_title, site_news_articles.is_sticky'); $this->db->select("DATE_FORMAT(site_news_articles.date_published, '%M %e, %Y') as formatted_date", TRUE); $this->db->from('site_news_articles'); $this->db->where('site_news_articles.news_category_id', $category_id); $this->db->where('site_news_articles.is_approved', 'Yes'); $this->db->where('site_news_articles.status_id', 1); $this->db->order_by('site_news_articles.date_published', 'desc'); $this->db->limit(10); $query = $this->db->get(); return $query->result_array(); } Error Number: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM (site_news_articles) WHERE site_news_articles.news_category_id = 2 A' at line 2 SELECT site_news_articles.article_title, site_news_articles.is_sticky, DATE_FORMAT(site_news_articles.date_published, '%M %e, %Y') as formatted_date FROM (site_news_articles) WHERE site_news_articles.news_category_id = 2 AND site_news_articles.is_approved = 'Yes' AND site_news_articles.status_id = 1 ORDER BY site_news_articles.date_published desc LIMIT 10 Filename: /home/xtremer/public_html/models/sitemodel.php Line Number: 140

    Read the article

  • Angularjs showin time portion from date time

    - by J. Davidson
    Hi I have following input which displays datetime <div ng-repeat="item in items"> <input type="text" ng-model="item.name" /> <input ng-model="item.time" /> </div> The issue i have is that time is in following format. "2002-11-28T14:00:00Z" I want to just display the time portion. For which I would have to apply filter date: 'hh:mm a' I tried ng-model="labor.start_time | date: 'hh:mm a'" Please let me know how i can show only time portion in input box showin time only. I cant use span tag as the time a user can change so have to show in input tag. Thanks

    Read the article

  • How can I get an AdWords ad to show up for a specific term ASAP?

    - by Eric
    I have a very specific situation... I have a client who has a site, backed by a celebrity, selling a comment product.... so imagine my site is all about "Martha Stewart used cars" (that's not it-- but you get the idea). My client wants to see their site show up ASAP in Google search results. While I'm waiting for organic search to kick in and recognize my site, index it properly, etc, I want to buy some adwords for keywords like "Martha Stewart used cars" and "Martha Stewart used car" and so forth and have the ads show up on the 1st page of search results. I've done this. The problem is that many, many other advertisers have set up ads on the keyword "used cars" so my Martha-specific ads never are shown. Even when I bid specifically on the keyword phrase "Martha Stewart used cars" and I enter that directly into Google, it doesn't show my ad. SO MY QUESTION.... how/what can I do to get my ads to show... or really, can I do anything else to get my client's site to show on the result page? (I'm not interested in anything black-hat or illegal; I'm just trying to throw some resources at this situation so when those folks looking SPECIFICALLY for "Martha Stewart used cars" will get to the site quickly.) thanks-- Eric

    Read the article

  • configure a Macbook Pro to use external monitor at boot (Debian Linux)

    - by Eric
    In the spirit of reuse, I've installed Debian (version 6.0.5 "squeeze") on my wife’s old Macbook Pro (circa 2009 or so), to repurpose it for various tasks. The catch is the display is flaky. It will last a random amount of time, between 2 minutes and 2 hours, before freezing and graying out. This is a known issue with that generation of MBP. Fortunately it’s no problem for me, as I plan to use it with an external monitor anyway. Which brings us to the problem: How do I configure this thing to output to the external display by default, and hopefully disable the built-in LCD? The ideal solution would be to modify a setting in the EFI (BIOS), but I’m not holding out much hope for that. Next best thing would be a kernel option I can pass to the NVIDIA driver. What won’t work is a solution that doesn’t give me a display until X starts. I need to have console access, especially given that the built-in LCD is dying, and any day now might give out completely. So far I haven’t been able to find anything online. lspci says I’ve got an NVIDIA GeForce 9400M Help is much appreciated! Eric PS if this question is better suited to the Unix & Linux area, pls advise and I will move it.

    Read the article

  • Google Developer Day 2010 in Sao Paulo - Keynote (pt-BR & en)

    Google Developer Day 2010 in Sao Paulo - Keynote (pt-BR & en) Video footage from keynote presentation at Google Developer Day 2010 in Sao Paulo, Brazil. Mario Queiroz, VP Product Management, Google (pt-BR) Eric Bidelman, Developer Advocate, Google (en) Eric Tholomé, Product Management Director, Google (en) Marcelo Marzola, CEO, Predicta/BTBuckets (pt-BR) Marcelo Quintella, Product Manager, Google (pt-BR) For more information on Google Developer Day in Sao Paulo, see www.google.com Follow us on the Code blog and on Twitter: googlecode.blogspot.com http twitter.com (in pt-BR) Hashtag #gddbr From: GoogleDevelopers Views: 612 10 ratings Time: 01:11:59 More in Science & Technology

    Read the article

  • DotNetNuke Boston User Group

    - by Rob Chartier
    Eric, over at the Boston DNN User Group has graciously invited me to give a presentation to his User Group on May 17th.  Come join me for an open discussion on “DotNetNuke – A look inside”.  I will cover topics like how we are adopting the Agile methodologies at a corporate level, how we are best utilizing Scrum, a sneak peek at the roadmap for 2010, and how YOU can participate with the future direction of the product. If you are currently a partner or a customer of DotNetNuke please feel free to attend and reach out, I’m sure Eric would love the extra attendance!  I would love to start putting faces to the names of so many of you.

    Read the article

  • Version Control & Build Systems free Headspring on 5/18

    Headspring is putting on another free workshop at the Austin Microsoft office.  This one will be led by Senior Consultant, Eric Anderson.  Here are the details: Headspring Presents: Version Control and Build Systems for Growing Teams a workshop by Eric Anderson on: Does your team run into frequent conflicts with source control? Has your build system become a broken window with little hope of repair? Do you struggle to deploy minor changes and bug fixes while keeping the system stable?...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >