Search Results

Search found 1059 results on 43 pages for 'thomas buckley'.

Page 23/43 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Maven copy project output into other project resources

    - by Thomas
    There are two projects: 1) applet project that outputs jar file 2) web app project that should host the jar file. After (1) finished building, the applet jar file should be copied into the webapp folder of (2). The purpose is that (2) will host the applet (1) on the Internet. A lot of examples explain how to use another project as a library dependency. Other examples, show how to use ant plugin to copy files. I am unsure on how to properly set this up, so that 'mvn install' on the parent project will do the copying at the right time.

    Read the article

  • Wordpress display featured posts outside of loop

    - by Thomas
    Im new to WP and Im not real sure how to work with the loop. I am trying to display featured posts in the sidebar with this code: <?php query_posts('cat=5'); $url = get_permalink(); while(have_posts()){ the_post(); $image_tag = wp_get_post_image('return_html=true'); $resized_img = getphpthumburl($image_tag,'h=168&w=168&zc=1'); $title = $post->post_title; echo "<ul class='left_featured'>"; echo "<li><a href='"; echo $url; echo "'><img src='$resized_img' width='168' height='168' "; echo "'/></a></li>"; echo "<li><a href='"; echo $url; echo "'/>"; echo $title; echo "</a></li></ul>"; echo ""; }; ?> This gives me all sorts of crazy outputs, text from random posts, images, etc...Its supposed to output a list of images and titles for all of the posts in a certain category. Any help would be really appreciated. Oh yeah, I am using a plugin that resizes images on the fly, thats what the the wp_get_post_image/getphpthumburl business is.

    Read the article

  • Saving data so it can be loaded locally

    - by Thomas Joos
    hi guys, i'm working on iphone application which needs to run offline at an exhibition. It should present data, stored local because there is no internet at the booth. Still, to easily have content updates it should be able to update it's content once connected to internet. It's quite some data ( around 300 full lines of text ) and I want it to be loaded, stored and visualized as optimized as possible. What's the best way to load in content once connected and how should I store it on the device?

    Read the article

  • Is there a way to disable calls to Runtime.checkRestricted on the GAE Java development server under Eclipse?

    - by Thomas Becker
    I'm one of those guys who step through their code a lot during development. Beginning with version 1.6.4 of the GAE Java development server, the server has been instrumented with calls to a function named Runtime.checkRestricted. This causes two inconveniences when I step through my code: 1) Whenever I step into a function, the debugger goes into the function Runtime.checkRestricted (for which there is no source code) at least once, often multiple times. 2) Whenever I step over a function call which has a large call tree underneath it, then it takes a very long time for the debugger to come back. (That's always a problem in the Eclipse Java debugger, but now it's really bad.) For me, all this causes a serious drain on productivity. Is there any way to disable this instrumentation, or to prevent the debugger from stepping into it? I am using Eclipse with the GAE plugin.

    Read the article

  • Is there a way to find how how "deep" a PHP array is?

    - by Thomas Owens
    A PHP array can have arrays for its elements. And those arrays can have arrays and so on and so forth. Is there a way to find out the maximum nesting that exists in a PHP array? An example would be a function that returns 1 if the initial array does not have arrays as elements, 2 if at least one element is an array, and so on.

    Read the article

  • How to find the mime type of a file in python?

    - by Daren Thomas
    Let's say you want to save a bunch of files somewhere, for instance in BLOBs. Let's say you want to dish these files out via a web page and have the client automatically open the correct application/viewer. Assumption: The browser figures out which application/viewer to use by the mime-type (content-type?) header in the HTTP response. Based on that assumption, in addition to the bytes of the file, you also want to save the MIME type. How would you find the MIME type of a file? I'm currently on a Mac, but this should also work on Windows. Does the browser add this information when posting the file to the web page? Is there a neat python library for finding this information? A WebService or (even better) a downloadable database? Edit: Thank you, Dave Webb.

    Read the article

  • Calculating bounding box a certain distance away from a lat/long coordinate in Java

    - by Bryce Thomas
    Given a coordinate (lat, long), I am trying to calculate a square bounding box that is a given distance (e.g. 50km) away from the coordinate. So as input I have lat, long and distance and as output I would like two coordinates; one being the south-west (bottom-left) corner and one being the north-east (top-right) corner. I have seen a couple of answers on here that try to address this question in Python, but I am looking for a Java implementation in particular. Just to be clear, I intend on using the algorithm on Earth only and so I don't need to accommodate a variable radius. It doesn't have to be hugely accurate (+/-20% is fine) and it'll only be used to calculate bounding boxes over small distances (no more than 150km). So I'm happy to sacrifice some accuracy for an efficient algorithm. Any help is much appreciated. Edit: I should have been clearer, I really am after a square, not a circle. I understand that the distance between the center of a square and various points along the square's perimeter is not a constant value like it is with a circle. I guess what I mean is a square where if you draw a line from the center to any one of the four points on the perimeter that results in a line perpendicular to a side of the perimeter, then those 4 lines have the same length.

    Read the article

  • CSS Padding Issue w/ submit button

    - by Thomas
    This is a dumb problem but I can't seem to set the padding on a submit button properly. No matter what I input for padding, the width and height of the button never changes. Here is the css: .green_submit { color: #fff; background-color: #94c909; border-right: 1px solid #6d9307; border-bottom: 1px solid #6d9307; border-left: none; border-top: none; padding: 25px; } And the HTML: <input type="submit" class='green_submit' value="Validate" /> Any obvious problems here? How can I manipulate the padding on a submit button?

    Read the article

  • ModalPopupExtender OnShow Event

    - by Thomas
    When clicking a button, I have a ModalPopupExtender (Panel) that gets displayed. I can't seem to trigger any event during that process. Adding an event to the button that opens the ModalPopupExtender doesnt work, as it never triggers. Adding the button as a trigger in my UpdatePanel also doesnt work. Scenario: I have a gridview with a button outside of the gridview. Clicking the button opens up a ModalPopupExtender which needs to display the checkboxes clicked on the gridview. I have the code to get the checkboxes clicked on the Gridview, however I cant seem to use an event during the process of opening the ModalPopupExtender.

    Read the article

  • [wxWidgets] How to store wxImage into database, using C++?

    - by Thomas Matthews
    I have some wxImages and I would like to store them into a BLOB (Binary Large OBject) field in a MySQL database. There are no methods in wxImage nor wxBitmap for obtaining the binary data as an array of unsigned char so I can load into the database. My current workaround is to write the image to a temporary file, then load the BLOB field directly from the file. Is there a more efficient method to load and store a wxImage object into a MySQL BLOB field? I am using MySql C++ connector 1.05, MS Visual Studio 2008, wxWidgets and C++.

    Read the article

  • How to use Fluent style syntactic sugar with c# property declaration

    - by Thomas
    i never use fluent style code before. so first time i tried to develop Fluent style with c# property declaration but getting error. can any one help me. public class MailTemplate { string _MailBody = ""; public MailTemplate MailBody { get { return _MailBody; } set { _MailBody = value ; } } string _Subject = ""; public MailTemplate Subject { get { return _Subject; } set { _Subject = value; } } string _MailFrom = ""; public MailTemplate MailFrom { get { return _MailFrom; } set { _MailFrom = value; } } } please help me how could assign or initialize mail body and later also can read with same property name. i think proeprty can not be use in case of fluent style development. need some light here. thanks

    Read the article

  • Qt drag & drop button; drop not detecting

    - by Thomas Verbeke
    I'm creating a 2D game in QT and i'm trying to implement a drag & drop into my program. For some reason the drop is not registered: qDebug should print a message on dropping but this doesn't happen. #include "dialog.h" #include "ui_dialog.h" #include "world.h" #include <vector> Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog) { ui->setupUi(this); scene = new QGraphicsScene(this); ui->graphicsView->setScene(scene); MySquare *item; QGraphicsRectItem *enemyItem; World *myWorld = new World(); std::vector<Tile*> tiles = myWorld->createWorld(":/texture.jpg"); int count = 0; foreach (Tile *tile, tiles){ count++; item = new MySquare(tile->getXPos()*4,tile->getYPos()*4,4,4); item->setBrush(QColor(tile->getValue()*255,tile->getValue()*255,tile->getValue()*255)); item->setAcceptDrops(true); scene->addItem(item); } player = new MySquare(10,20,10,10); player->setAcceptDrops(true); scene->addItem(player); //drag & drop part QPushButton *pushButton = new QPushButton("Click Me",this); connect(pushButton,SIGNAL(pressed()),this,SLOT(makeDrag())); setAcceptDrops(true); } void Dialog::makeDrag() { QDrag *dr = new QDrag(this); // The data to be transferred by the drag and drop operation is contained in a QMimeData object QMimeData *data = new QMimeData; data->setText("This is a test"); // Assign ownership of the QMimeData object to the QDrag object. dr->setMimeData(data); // Start the drag and drop operation dr->start(); } mysquare.cpp #include "mysquare.h" MySquare::MySquare(int _x,int _y, int _w, int _h) { isPlayer=false; Pressed=false; setFlag(ItemIsMovable); setFlag(ItemIsFocusable); setAcceptDrops(true); color=Qt::red; color_pressed = Qt::green; x = _x; y = _y; w = _w; h = _h; } QRectF MySquare::boundingRect() const { return QRectF(x,y,w,h); } void MySquare::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { QRectF rec = boundingRect(); QBrush brush(color); if (Pressed){ brush.setColor(color); } else { brush.setColor(color_pressed); } painter->fillRect(rec,brush); painter->drawRect(rec); } void MySquare::mousePressEvent(QGraphicsSceneMouseEvent *event) { Pressed=true; update(); QGraphicsItem::mousePressEvent(event); qDebug() << "mouse Pressed"; } void MySquare::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { Pressed=false; update(); QGraphicsItem::mousePressEvent(event); qDebug() << "mouse Released"; } void MySquare::keyPressEvent(QKeyEvent *event){ int x = pos().x(); int y = pos().y(); //key handling QGraphicsItem::keyPressEvent(event); } void MySquare::dropEvent(QDropEvent *event) { qDebug("dropEvent - square"); // Unpack dropped data and handle it the way you want qDebug("Contents: %s", event->mimeData()->text().toLatin1().data()); } void MySquare::dragMoveEvent(QDragMoveEvent *event){ qDebug("dragMoveEvent - square "); event->accept(); } void MySquare::dragEnterEvent(QDragEnterEvent *event){ event->setAccepted(true); qDebug("dragEnterEvent - square"); event->acceptProposedAction(); } void MySquare::setBrush(QColor _color){ color = _color; color_pressed = _color; update(); //repaint } edit; there is no problem with qDebug() i'm just using it to test them i'm inside the drag events..which i'm not

    Read the article

  • Using Linq2Sql to insert data into multiple tables using an auto incremented primary key

    - by Thomas
    I have a Customer table with a Primary key (int auto increment) and an Address table with a foreign key to the Customer table. I am trying to insert both rows into the database in one nice transaction. using (DatabaseDataContext db = new DatabaseDataContext()) { Customer newCustomer = new Customer() { Email = customer.Email }; Address b = new Address() { CustomerID = newCustomer.CustomerID, Address1 = billingAddress.Address1 }; db.Customers.InsertOnSubmit(newCustomer); db.Addresses.InsertOnSubmit(b); db.SubmitChanges(); } When I run this I was hoping that the Customer and Address table automatically had the correct keys in the database since the context knows this is an auto incremented key and will do two inserts with the right key in both tables. The only way I can get this to work would be to do SubmitChanges() on the Customer object first then create the address and do SubmitChanges() on that as well. This would create two roundtrips to the database and I would like to see if I can do this in one transaction. Is it possible? Thanks

    Read the article

  • number of days in a period that fall within another period

    - by thomas
    I have 2 independent but contiguous date ranges. The first range is the start and end date for a project. Lets say start = 3/21/10 and end = 5/16/10. The second range is a month boundary (say 3/1/10 to 3/31/10, 4/1/10 to 4/30/10, etc.) I need to figure out how many days in each month fall into the first range. The answer to my example above is March = 10, April = 30, May = 16. I am trying to figure out an excel formula or VBA function that will give me this value. Any thoughts on an algorithm for this? I feel it should be rather easy but I can't seem to figure it out. I have a formula which will return TRUE/FALSE if ANY part of the month range is within the project start/end but not the number of days. That function is below. return month_start <= project_end And month_end >= project_start

    Read the article

  • Want to show file association icon and skype like progress bar c#

    - by Thomas
    whenever user drag any file onto skype chat textbox then skype show right icon for that file and one custom progress bar rounded corner. i have 4 questions 1) i am working with win application not WPF. i like to know how to develop skype like corner progressbar. i search lot google to find out skype like progressbar. so if anyone knows how to develop that kind of progress bar then please share that knowledge or give me any url from where i can download similar look progressbar. 2) when i drag any file onto my richtextbox then how could i show right icon for that file on my richtextbox. anyone can give me idea. 3) what kind of richtextbox skype use? is there any advance richtextbox library which i can use for showing picture or button etc. 4) skype shows button on chat textbox called Cancel......is it button or any image. when user click on that button then button respond accordingly. so just tell me how could place any button on my rich textbox and when i will click on that button then a event should fire at my end. any idea. here i attach a picture from where you can see the image of progressbar that i am looking for. how i want to show the progress button and file associated icon on richtextbox. the object behind attaching the image is other person can understand what is my requirement and what i want to know. please anyone give me the idea for my above 4 points. thanks

    Read the article

  • Animating multiple UIViews at once using CoreAnimation

    - by Thomas
    Hi, I'm using a UIImageView as a background-image and placed multiple UIButtons on it. Now I want to move the UIImageView (with all the buttons on it) out of sight with a smooth animation. I couldn't find a container or grouping element in IB, so is there a way to move all the Views at once? Thank you in advance and sorry for my english!

    Read the article

  • Initialization of std::vector<unsigned int> with a list of consecutive unsigned integers

    - by Thomas
    I want to use a special method to initialize a std::vector<unsigned int> which is described in a C++ book I use as a reference (the German book 'Der C++ Programmer' by Ulrich Breymann, in case that matters). In that book is a section on sequence types of the STL, referring in particular to list, vector and deque. In this section he writes that there are two special constructors of such sequence types, namely, if Xrefers to such a type, X(n, t) // creates a sequence with n copies of t X(i, j) // creates a sequence from the elements of the interval [i, j) I want to use the second one for an interval of unsigned int, that is std::vector<unsigned int> l(1U, 10U); to get a list initialized with {1,2,...,9}. What I get, however, is a vector with one unsigned int with value 10 :-| Does the second variant exist, and if yes, how do I force that it is called?

    Read the article

  • Django sessions don't work with Apache installed on Ubuntu

    - by Thomas
    In production server I can't login to my website. I know that it is some bug of Django with MD5 crypt or something like that, but unfortunately I don't remember what I should do. I am searching the answer since half day, but I can't find this website where was explained this problem. DO you know how I can do sessions working.

    Read the article

  • How do i compare 2 strings in shell?

    - by Thomas
    I want the user to input something at the command line either -l or -e. so e.g. $./report.sh -e I want an if statement to split up whatever decision they make so i have tried... if [$1=="-e"]; echo "-e"; else; echo "-l"; fi obviously doesn't work though Thanks

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >