Search Results

Search found 2068 results on 83 pages for 'thomas stock'.

Page 36/83 | < Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >

  • displaying values from join query array

    - by THOmas
    I have used a join query for retrieving value from two tables one is blogquestion and userdetails I wrote this query $this->questions = Doctrine_Query::create() ->select('b.question_id,b.user_id,b.question_title,b.question_tags,b.created_at,u.id,u.name') ->from('BlogQuestion b') ->leftJoin('b.UserDetails u') ->execute(); In the template iam displaying the result using a foreach <?php foreach($questions as $quest):?> echo $quest->getQuestionTitle() echo $quest->getQuestionTags() echo $quest->getName() <?php endforeach?> title is getting from the blogquestion table and name is in usredetails table iam getting the eerror Unknown record property / related component "name" on "BlogQuestion"

    Read the article

  • Change storyboard UIImageView to own class with backgroundcolor

    - by Thomas
    I want to draw the background image on my own, so I decided to implement a UIImageView class and connect it in the Storyboard. As first task I just want to set the backgroundcolor of the image on my own, but it's never shown. Image just stays blank. That's the class: class FirstBackgroundImage : UIImageView { required init(coder aDecoder: NSCoder) { super.init(coder: aDecoder) self.backgroundColor = UIColor.redColor() } override init() { super.init() self.backgroundColor = UIColor.redColor() } override required init(image: UIImage!) { super.init(image: image) self.backgroundColor = UIColor.redColor() } } That's how i connected it:

    Read the article

  • JS Display Content based on Dropdown User input

    - by Thomas
    I am working on a search box that displays different options based on a users selection via dropdown box. Basically I need a really clean, light-weight method for switching out different divs without reloading the page. Im new to JS, but I know enough that there should be some really simple way of setting the display property using JS - Im just not totally sure how to go about it. Any help would be really appreciated, thanks.

    Read the article

  • Container div ignores height of floated elements

    - by Thomas
    Ok, so this seems like a really silly problem but I can't get my container div to inherit the height of the floated elements inside of it. Since I need to center the container div, I can't use float to fix this problem. Here is my css: #container { margin: 0 auto; width: 1000px; border-left: 1px solid #f1f1f1; border-right: 1px solid #f1f1f1; border-bottom: 1px solid #f1f1f1; } #focus { padding-left: 23px; width: 977px; padding-top: 20px; padding-bottom: 23px; border-bottom: 1px solid #f1f1f1; float: left; } .rslider { float: left; width: 600px; margin-left: 15px; } .welcome { float: left; width: 300px; } Html: <div id="container"> <div id="logo_block"> <a href="#"><img src="img/logo.jpg" alt="" /></a> </div> <div id="focus"> <div class="welcome"> <h1>All About This Page</h1> <p>Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, liquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium.</p> </div> <div class="rslider"> <img src="img/slider_image.jpg"> </div> </div> </div> Any ideas?

    Read the article

  • How to display configurable product in each color in Magento product listing?

    - by Thomas
    I have a configurable product which is available in many different colors and sizes. I want the configurable product to appear once for every color. My idea is to assign one simple product of the configurable product in every color to the category of the configurable product. Then I want to change the listing, so that the (colored) simple product links to it's master product (the configurable one). The other way would be, to just assign the configurable product to a category and then list it multiple times with different colors. But I think this would be to complicated.

    Read the article

  • Passing values from action class to model class in symfony

    - by THOmas
    I have a action class for saving some data to a database.In action class iam getting a id through url.I have to save the id in table. I am getting the id by $request-getParameter('id') I used this code for saving $this-form-bind($request-getParameter('question_answers')); if ($this-form-isValid()) { $this-form-save(); $this-redirect('@homepage'); } in model class i used a override save method to save extra field public function save(Doctrine_Connection $conn = null) { if ($this-isNew()) { $now=date('Y-m-d H:i:s', time()); $this->setPostedAt($now); } return parent::save($conn); so i want to get the id value here . So how can i pass id value from action class to model class is any-other way to save the id in action class itself Thanks in advance

    Read the article

  • Tkinter Gui to read in csv file and generate buttons based on the entries in the first row

    - by Thomas Jensen
    I need to write a gui in Tkinter that can choose a csv file, read it in and generate a sequence of buttons based on the names in the first row of the csv file (later the data in the csv file should be used to run a number of simulations). So far I have managed to write a Tkinter gui that will read the csv file, but I am stomped as to how I should proceed: from Tkinter import * import tkFileDialog import csv class Application(Frame): def __init__(self, master = None): Frame.__init__(self,master) self.grid() self.createWidgets() def createWidgets(self): top = self.winfo_toplevel() self.menuBar = Menu(top) top["menu"] = self.menuBar self.subMenu = Menu(self.menuBar) self.menuBar.add_cascade(label = "File", menu = self.subMenu) self.subMenu.add_command( label = "Read Data",command = self.readCSV) def readCSV(self): self.filename = tkFileDialog.askopenfilename() f = open(self.filename,"rb") read = csv.reader(f, delimiter = ",") app = Application() app.master.title("test") app.mainloop() Any help is greatly appreciated!

    Read the article

  • Maven POM: how to insist property is not overridden

    - by Joe Thomas
    I have a parent POM that uses a gmaven script to do some stuff: <plugin> <groupId>org.codehaus.gmaven</groupId> <artifactId>gmaven-plugin</artifactId> <version>1.4</version> <configuration combine.children="override"> <providerSelection>2.0</providerSelection> <scriptPath>${basedir}/build/groovy</scriptPath> </configuration> <executions> <execution> <id>groovy-properties-script</id> <phase>validate</phase> <goals> <goal>execute</goal> </goals> <configuration> <source>computeProperties.groovy</source> </configuration> </execution> <!-- ... --> All of the children are supposed to run this script as well, but they try to resolve the scriptpath based on their OWN basedir. Usually this is exactly what you want with properties, but here it doesn't work, and I can't figure out any way around it.

    Read the article

  • Cannot set focus on input field in infoWindow

    - by thomas
    Hi Why is focus not set to noteTitle? I am using google maps API V3. The getNoteForm() returns a input field "noteTitle". The $("#noteTitle").focus() works fine when executed in firebug. I call this function when clicking on the map: function setNewNoteInfowindow(latlng) { if (geocoder) { geocoder.geocode({'latLng': latlng}, function(results, status) { var address = ""; if (status == google.maps.GeocoderStatus.OK) { if (results[1]) { address = results[1].formatted_address; } } newNoteInfowindow = new google.maps.InfoWindow({ content: getNoteForm(latlng, address), size: new google.maps.Size(40,50) }); newNoteInfowindow.open(map, newNoteMarker); google.maps.event.addListener(newNoteInfowindow, 'domready', function() { $("#noteTitle").focus(); }); google.maps.event.addListener(newNoteInfowindow, 'closeclick', function() { newNoteMarker.setVisible(false); }); }); } }

    Read the article

  • Convert VB6 Randomize to C#

    - by Thomas G. Mayfield
    I'm writing a C# frontend to a legacy database that uses VB6 Rnd() and Randomize() methods for user password encryption. The encryption function is very simplistic and really not all that secure, but it's what all current passwords are stored with. What I'd like to be able to do is authenticate legacy users from a C# application. I can write new encryption (or preferably hashing) code for VB6 so that all future users have a more secure password, and that can be duplicated in C#. But I don't want to require current users to have had their password reset before they can use the new frontend. Is there any way I can reimplement that algorithm in C# so that it produces identical results to the legacy VB6 code?

    Read the article

  • Setting the content-type of a response in Struts2

    - by Thomas
    So, I'm using freemarker templates with Struts2 to formulate my responses. However, since I'm trying to use taconite as well, I need the response to be sent with the content type of "text/xml". I can't seem to find a way to use freemarker directives to set the content type, and I am not well versed enough in struts to know if there is a way to do it through that. So, how should I go about this?

    Read the article

  • RAII: Initializing data member in const method

    - by Thomas Matthews
    In RAII, resources are not initialized until they are accessed. However, many access methods are declared constant. I need to call a mutable (non-const) function to initialize a data member. Example: Loading from a data base struct MyClass { int get_value(void) const; private: void load_from_database(void); // Loads the data member from database. int m_value; }; int MyClass :: get_value(void) const { static bool value_initialized(false); if (!value_initialized) { // The compiler complains about this call because // the method is non-const and called from a const // method. load_from_database(); } return m_value; } My primitive solution is to declare the data member as mutable. I would rather not do this, because it suggests that other methods can change the member. How would I cast the load_from_database() statement to get rid of the compiler errors?

    Read the article

  • Is Microsoft's Ribbon UI really that great, from a usability perspective?

    - by Thomas Owens
    The first time I ever used it was at my current job. Among my coworkers, the feelings toward it for usability are mixed. The other developer doesn't really care one way or the other, as long as Office does everything he needs it to do when writing reports. The top manager likes it because it feels natural, and I feel the same way. But another coworker finds in klunky and hard to use (although she admits that she only uses it at home as her machine hasn't been upgraded yet, and that might change if she uses it more often at work). So - is the Ribbon UI really that innovative? What qualities about it make it a good or bad user interface mechanism? Possibly related: Adoption of the Ribbon UI

    Read the article

  • Macro and array crossing

    - by Thomas
    I am having a problem with a lisp macro. I would like to create a macro which generate a switch case according to an array. Here is the code to generate the switch-case: (defun split-elem(val) `(,(car val) ',(cdr val))) (defmacro generate-switch-case (var opts) `(case ,var ,(mapcar #'split-elem opts))) I can use it with a code like this: (generate-switch-case onevar ((a . A) (b . B))) But when I try to do something like this: (defparameter *operators* '((+ . OPERATOR-PLUS) (- . OPERATOR-MINUS) (/ . OPERATOR-DIVIDE) (= . OPERATOR-EQUAL) (* . OPERATOR-MULT))) (defmacro tokenize (data ops) (let ((sym (string->list data))) (mapcan (lambda (x) (generate-switch-case x ops)) sym))) (tokenize data *operators*) I got this error: *** - MAPCAR: A proper list must not end with OPS. But I don't understand why. When I print the type of ops I get SYMBOL I was expecting CONS, is it related? Also, for my function tokenize how many times the lambda is evaluated (or the macro expanded)?

    Read the article

  • Subclassing ViewPager Breaks Animation

    - by Ryan Thomas
    In my Android application I have an activity which uses a view pager to display 4+ pages (Fragments). I implemented buttons on each screen that move between pages by calling: pager.setCurrentItem(position, true); The view pager and fragments are all working as I desired. I then began looking for a solution to disable user swiping between pages so that the transition between pages in handled by the buttons only. The solution I found was mentioned in a few stackoverflow articles as well as This Blog that suggest subclassing the view pager to intercept touch events to disable swiping. I followed those examples by subclassing the view pager class as follows: public class ViewPager extends android.support.v4.view.ViewPager { private boolean enabled; public ViewPager(Context context, AttributeSet attrs) { super(context, attrs); this.enabled = true; } @Override public boolean onTouchEvent(MotionEvent event) { if (this.enabled) { return super.onTouchEvent(event); } return false; } @Override public boolean onInterceptTouchEvent(MotionEvent event) { if (this.enabled) { return super.onInterceptTouchEvent(event); } return false; } public void setSwipingEnabled(boolean enabled) { this.enabled = enabled; } } Using the subclassed view pager and calling setSwipingEnabled(false) works as was desired. The user can no longer move between pages with swipe gestures and I can still move between pages via button clicks by calling setCurrentItem(int position, boolean smoothScroll). However using the subclass breaks the animation between pages. When I call setCurrentItem(position, true) with android.support.v4.view.ViewPager I get very clean scrolling animations between pages. When I make the same call using the subclass the screen has a very brief 'flash' and then automatically draws the new page. I would like to know how to fix the animation while retaining the ability to disable user swiping between pages. I greatly appreciate any help with this. Let me know if you need any additional information. So far I have tested using a Samsung device running 2.3.5 and an AVD emulator targeting Android 2.3.3.

    Read the article

  • ASP Force Download

    - by Thomas Clayson
    In PHP I can do: header("Content-type: application/octet-stream") and then anything that I output is downloaded instead of showing in the browser. Is there a similar way to do this in ASP? I have seen about all the file streaming and such using ADODB.Stream, but that doesn't seem to work for me and always requires another file to load the content from. Bit of an ASP noob, so go easy on me. :p All I want to do is have a script that outputs a CSV and that will force download instead of showing in the browser. Thanks EDIT here is my script currently: reportingForce.aspx.vb Public Class reportingForce Inherits System.Web.UI.Page Dim FStream Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Response.Buffer = True Response.ContentType = "application/octet-stream" Response.AddHeader("Content-disposition", "attachment; filename=" & Chr(34) & "my output file.csv" & Chr(34)) Response.Write("1,2,3,4,5" & vbCrLf) Response.Write("5,6,7,8,9" & vbCrLf) End Sub End Class reportingForce.aspx Hello,World

    Read the article

  • How do I programmatically set property of control in aspx file ?

    - by Thomas Wanner
    This may be a very dumb question but I can't seem to get it working. I use at many places the following syntax for dynamically binding a property of a control in aspx file to the resource entry, e.g. <SomeFunnyControl Text="<%$ Resources : ResClass, ResEntry %>" /> I want to do a similar thing with a class containing some constants, something like <SomeFunnyControl Text="<%= MyConstantsClass.MyStringConstant %>" /> But this doesn't seem to work, it simply sets the text to the exact expression without evaluating it. I am using ASP.NET 3.5 btw. I have tried the databinding approach but I get an HttpParseException saying Databinding expressions are only supported on objects that have a DataBinding event.

    Read the article

< Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >