Search Results

Search found 2008 results on 81 pages for 'greg smith'.

Page 53/81 | < Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >

  • What's a good jQuery ligthbox plugin that cycles through images? (like a carousel)

    - by Greg
    I'm looking for a jQuery lightbox plugin that has the ability to, with it's next and previous buttons, cycle through images repeatedly. Like a carousel effect. I've been using jQuery Lightbox Plugin (balupton edition) but that doesn't have the option to continue cycling through images. It reaches the last image in the array and then disables the 'next' button. So to save me some time coding, what are some plugins you can recommend?

    Read the article

  • Rails: Different prices for different branches, association depending on two other models combined

    - by Greg Lemond
    I have three models: Service has_many :prices has_many :groups, through: prices Price belongs_to :service belongs_to :group Group has_many :prices I want to have an input field (Simple_Form) for every price. In views/services/_form.html.haml I do: simple_form_for @service do |f| simple_fields_for :groups do |g| simple_fields_for :prices do |p| p.input :price With this setup I only get input fields for already saved prices. How I can get a price field for every group? I tried to do it manually, but it got really nasty and didn't work either. Thanks for any ideas!

    Read the article

  • Performance hit from C++ style casts?

    - by Trevor Boyd Smith
    I am new to C++ style casts and I am worried that using C++ style casts will ruin the performance of my application because I have a real-time-critical deadline in my interrupt-service-routine. I heard that some casts will even throw exceptions! I would like to use the C++ style casts because it would make my code more "robust". However, if there is any performance hit then I will probably not use C++ style casts and will instead spend more time testing the code that uses C-style casts. Has anyone done any rigorous testing/profiling to compare the performance of C++ style casts to C style casts? What were your results? What conclusions did you draw?

    Read the article

  • QuickGraph - is there algorithm for find all parents (up to root vertex's) of a set of vertex's

    - by Greg
    Hi, In QuickGraph - is there algorithm for find all parents (up to root vertex's) of a set of vertex's. In other words all vertex's which have somewhere under them (on the way to the leaf nodes) one or more of the vertexs input. So if the vertexs were Nodes, and the edges were a depends on relationship, find all nodes that would be impacted by a given set of nodes. If not how hard is it to write one's own algorithms?

    Read the article

  • Java copyOf method problem with an Array of Objects

    - by Greg
    elementData = Arrays.copyOf(elementData, newCapacity); Gives error: "The method copyOf(Object[], int) is undefined for the type Arrays" This was not a problem on my home computer, but at my school's it gives the error above. I'm guessing it's running an older JRE version - any workaround? Thanks

    Read the article

  • IIS hosting vs Built In Web server that ships with VS 2010

    - by mark smith
    Hi there, I am looking to host a wcf service while i am developing. Is this best with IIS or can i just use the default BUILT IN web server that ships with Visual Studio? I can change the Assign automatic port to specific port so in my client i always ahave a fixed address. I was hoping somebody could advise the best way to go?

    Read the article

  • How to exclude rows where matching join is in an SQL tree

    - by Greg K
    Sorry for the poor title, I couldn't think how to concisely describe this problem. I have a set of items that should have a 1-to-1 relationship with an attribute. I have a query to return those rows where the data is wrong and this relationship has been broken (1-to-many). I'm gathering these rows to fix them and restore this 1-to-1 relationship. This is a theoretical simplification of my actual problem but I'll post example table schema here as it was requested. item table: +------------+------------+-----------+ | item_id | name | attr_id | +------------+------------+-----------+ | 1 | BMW 320d | 20 | | 1 | BMW 320d | 21 | | 2 | BMW 335i | 23 | | 2 | BMW 335i | 34 | +------------+------------+-----------+ attribute table: +---------+-----------------+------------+ | attr_id | value | parent_id | +---------+-----------------+------------+ | 20 | SE | 21 | | 21 | M Sport | 0 | | 23 | AC | 24 | | 24 | Climate control | 0 | .... | 34 | Leather seats | 0 | +---------+-----------------+------------+ A simple query to return items with more than one attribute. SELECT item_id, COUNT(DISTINCT(attr_id)) AS attributes FROM item GROUP BY item_id HAVING attributes > 1 This gets me a result set like so: +-----------+------------+ | item_id | attributes | +-----------+------------+ | 1 | 2 | | 2 | 2 | | 3 | 2 | -- etc. -- However, there's an exception. The attribute table can hold a tree structure, via parent links in the table. For certain rows, parent_id can hold the ID of another attribute. There's only one level to this tree. Example: +---------+-----------------+------------+ | attr_id | value | parent_id | +---------+-----------------+------------+ | 20 | SE | 21 | | 21 | M Sport | 0 | .... I do not want to retrieve items in my original query where, for a pair of associated attributes, they related like attributes 20 & 21. I do want to retrieve items where: the attributes have no parent for two or more attributes they are not related (e.g. attributes 23 & 34) Example result desired, just the item ID: +------------+ | item_id | +------------+ | 2 | +------------+ How can I join against attributes from items and exclude these rows? Do I use a temporary table or can I achieve this from a single query? Thanks.

    Read the article

  • Facebook Like button - comment box with breif description and image

    - by Dave Smith
    On my website when the user selects the facebook like button they have the option to enter comments. This popup window to enter comments only contains the users avatar and place to enter comments. How can i include my pic and a brief description of the site directly below the comment??? At first I thought it was from the HTML title attribute or meta property="og:title" ... but populating these have no affect I have another site that contains both pic and a desc below the comment but the pic seems to be grabed at random -but always the same- from the site and the short desc I thought from the -title- attribute but its not - I changed the -title- and it still shows the same desc, its like its cached??? Any ideas how to control or populate a brief description and image within the comment section of a like button???

    Read the article

  • How to build a SQL statement when any combination of user input to the table is possible?

    - by Greg McNulty
    Example: the user fills in everything but the product name. I need to search on what is supplied, so in this case everything but productName= This example could be for any combination of input. Is there a way to do this? Thanks. $name = $_POST['n']; $cat = $_POST['c']; $price = $_POST['p']; if( !($name) ) { $name = some character to select all? } $sql = "SELECT * FROM products WHERE productCategory='$cat' and productName='$name' and productPrice='$price' "; EDIT Solution does not have to protect from attacks. Specifically looking at the dynamic part of it.

    Read the article

  • How do you programmatically set a Style on a View?

    - by Greg
    I would like to do something like this: <Button android:id="@+id/button" android:layout_width="wrap_content" android:layout_height="wrap_cotent" style="@style/SubmitButtonType" /> But in code The xml approach works fine provided that SubmitButtonType is defined. Now what I assume happens is that the appt parser runs through this xml, generates an AttributeSet. That AttributeSet when passed to context/theme#obtainStyledAttributes() will have the style ref mask anything that is not written inline in this tag. Great that's fine! Now how do we do this programmatically. Button, as well as other View types, has a constructor that has the form: <Widget>(Context context, AttributeSet set, int defStyle). So I thought this would work. Button button = new Button(context, null, R.style.SubmitButtonType); However, I am finding that defStyle is badly documented as it really should be written to be a resourceId to an attribute (from R.attrs) that will be passed to obtainStyledAttributes() as the attribute resource, and not the style resource. After looking at the code, all the view implementations seem to pass 0 as the styleRef. I don't see the harm in having it passed as both the attr and the style resource (more flexible and negligible overhead) However I might be approaching this all wrong. How do you do this in code then other than by setting each individual element of the style to the specific widget you want to style (only possible by looking a the code to see what param maps to which method or set of methods). The only way I have found to do this is: <declare-styleable> <attr name="totallyAdhoc_attribute_just_for_this_case" format="reference"> </declare-styleable> <style name="MyAlreadyExistantTheme" > ... ... <item name="totallyAdhoc_attribute_just_for_this_case">@style/SubmitButtonType</item> </style> And instead of passing R.style.SubmitButtonType as defStyle, I pass the new R.attr.totallyAdhoc_attribute_just_for_this_case. Button button = new Button(context, null, R.attr.totallyAdhoc_attribute_just_for_this_case); This works but sounds way too complicated.

    Read the article

  • C to Assembly code - what does it mean

    - by Smith
    I'm trying to figure out exactly what is going on with the following assembly code. Can someone go down line by line and explain what is happening? I input what I think is happening (see comments) but need clarification. .file "testcalc.c" .section .rodata.str1.1,"aMS",@progbits,1 .LC0: .string "x=%d, y=%d, z=%d, result=%d\n" .text .globl main .type main, @function main: leal 4(%esp), %ecx // establish stack frame andl $-16, %esp // decrement %esp by 16, align stack pushl -4(%ecx) // push original stack pointer pushl %ebp // save base pointer movl %esp, %ebp // establish stack frame pushl %ecx // save to ecx subl $36, %esp // alloc 36 bytes for local vars movl $11, 8(%esp) // store 11 in z movl $6, 4(%esp) // store 6 in y movl $2, (%esp) // store 2 in x call calc // function call to calc movl %eax, 20(%esp) // %esp + 20 into %eax movl $11, 16(%esp) // WHAT movl $6, 12(%esp) // WHAT movl $2, 8(%esp) // WHAT movl $.LC0, 4(%esp) // WHAT?!?! movl $1, (%esp) // move result into address of %esp call __printf_chk // call printf function addl $36, %esp // WHAT? popl %ecx popl %ebp leal -4(%ecx), %esp ret .size main, .-main .ident "GCC: (Ubuntu 4.3.3-5ubuntu4) 4.3.3" .section .note.GNU-stack,"",@progbits Original code: #include <stdio.h> int calc(int x, int y, int z); int main() { int x = 2; int y = 6; int z = 11; int result; result = calc(x,y,z); printf("x=%d, y=%d, z=%d, result=%d\n",x,y,z,result); }

    Read the article

  • Structs inside #define in C++

    - by Adam Smith
    Being pretty new to C++, I don't quite understand some instructions I encounter such as: #ifndef BOT_H_ #define BOT_H_ #include "State.h" /* This struct represents your bot in the game of Ants */ struct Bot { State state; Bot(); void playGame(); //plays a single game of Ants void makeMoves(); //makes moves for a single turn void endTurn(); //indicates to the engine that it has made its moves }; #endif //BOT_H_ What I don't understand is the "#ifndef BOT_H_" and the "#define -- #endif" From what I gather, it defines a constant BOT_H_ if it's not already defined when the precompiler looks at it. I don't actually get how the struct inside it is a constant and how it is going to let me access the functions inside it. I also don't see why we're doing it this way? I used C++ a while back and I wasn't using .h files, so it might be something easy I'm missing.

    Read the article

  • Planning a requirements gathering session using Agile

    - by Dave Smith
    We are planning on introducing Agile into our development process (a shift from the waterfall we've been using so far). We are leaning towards a hybrid model in whcih the requirements gathering session is comprised of a business analyst, subject matter experts, technical person and a user interface person. The plan is to create user stories that the development team can use in their agile process with 1 month sprints. Has anyone had experience with a hybrid model? How has it worked for you so far?

    Read the article

  • Giving proper credit to a projects contributors

    - by Greg B
    I've recently been working with an opensource library for a commercial product. The opensource code is distributed from the website of the company who sells the proprietary product as a zip file. The library is a (direct) port to C# of the original library which is in Java. As such, it uses methods instead of getter/setter properties. The code contains copyright notices to the supplier of the product. The C# port was originally provided to the company by a 3rd party individual. I have modified the source to be more C# like and added a couple of small features. I want to put my version of the code out there (Google code or where ever) so that C# users of the software can benefit from a more native feeling library. How can I and/or how should I amend the copyright notice to give proper credit to The comercial owner of the original source The guy who provided the original C# port Myself and anyone else who contributes to the project in the future The source is provided under the LGPL V2.1,

    Read the article

  • Creating "GDP in 1960" variable from GDP variables for different years

    - by Tom Smith
    Hi all, I'm pretty new to stata... I have a set of observations of the form "Country GDP Year". I want to create a new variable GDP1960, which gives the GDP in 1960 of each country for each year: USA $100m 1960 USA $100m 1960 $100m USA $200m 1965 --> USA $200m 1965 $100m Canada $60m 1960 Canada $60m 1960 $60m What's the right syntax to make this happen? (I assume egen is involved in some mysterious way)

    Read the article

  • Passing arguments to scope_procedure in searchlogic

    - by Greg
    I'd like to use searchlogic's scope_procedure feature like so class MyModelObject < ActiveRecord::Base scope_procedure :my_scope_proc, lambda { |p1, p2| { :conditions => "p1 >= #{p1} AND p2 < #{p2}" }} end Then, I am doing the search: scope = MyModelObject.search(:my_scope_proc => true) scope.all The above code obviously doesn't work because I didn't pass p1 and p2 parameters to my named scope. I can't figure out how to pass parameters to the named scope.

    Read the article

  • Build Path issue with Java Android project when starting Eclipse

    - by Matt Smith
    I booted up eclipse to start on a project, and without typing in a word I already have several errors. package department.namespace; import android.app.Activity; import android.os.Bundle; public class DepartmentActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } At package department.namespace, it says: multiple marks at this line and the type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files The import android.os cannot be resolved. Override cannot be resolved as a type The method OnCreate(Bundle) is undefined for the type Activity R. cannot be resolved as a variable. Since this JUST came up when I started Eclipse, how do I fix this?

    Read the article

  • Another Nim's Game Variant

    - by Terry Smith
    Given N binary sequence Example : given one sequence 101001 means player 0 can only choose a position with 0 element and cut the sequence from that position {1,101,1010} player 1 can only choose a position with 1 element ans cut the sequence from that position {null,10,101000} now player 0 and player 1 take turn cutting the sequence, on each turn they can cut any one non-null sequence, if a player k can't make a move because there's no more k element on any sequence, he lose. Assume both player play optimally, who will win ? I tried to solve this problem with grundy but i'm unable to reduce the sequence to a grundy number because it both player don't have the same option to move. Can anyone give me a hint to solve this problem ?

    Read the article

  • MySQL: How to pull information from multiple tables based on information in other tables?

    - by Greg
    Ok, I have 5 tables which I need to pull information from based on one variable. gameinfo id | name | platforminfoid gamerinfo id | name | contact | tag platforminfo id | name | abbreviation rosterinfo id | name | gameinfoid rosters id | gamerinfoid | rosterinfoid The 1 variable would be gamerinfo.id, which would then pull all relevant data from gamerinfo, which would pull all relevant data from rosters, which would pull all relevant data from rosterinfo, which would pull all relevant data from gameinfo, which would then pull all relevant data from platforminfo. Basically it breaks down like this: gamerinfo contains the gamers basic information. rosterinfo contains basic information about the rosters (ie name and the game the roster is aimed towards) rosters contains the actual link from the gamer to the different rosters (gamers can be on multiple rosters) gameinfo contains basic information about the games (ie name and platform) platform info contains information about the different platforms the games are played on (it is possible for a game to be played on multiple platforms) I am pretty new to SQL queries involving JOINs and UNIONs and such, usually I would just break it up into multiple queries but I thought there has to be a better way, so after looking around the net, I couldn't find (or maybe I just couldn't understand what I was looking at) what I was looking for. If anyone can point me in the right direction I would be most grateful.

    Read the article

  • access EF classes from a Class Library - exactly how do configure/test the connection string in the

    - by Greg
    Hi, I'm getting very confused about how to call my EF classes in a Class Library from the Client Project I have? Things worked fine when they were in the same project. Now I'm getting errors such as "Unable to load the specified metadata resource ". I've see various ideas / suggestions re how to fix the connection string (e.g. create an App.config in your client project & copy the connection string config from your class library, something about change the connection settings to copy to output, etc) QUESTION - Can someone provide a solid way on how to get EF class access from a separate project working? (i.e. how to get the correct connection information to the client somehow) thanks

    Read the article

< Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >