Search Results

Search found 2582 results on 104 pages for 'mike selby'.

Page 60/104 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • JQuery function not working as expected

    - by Mike
    I've written a little function to position a logo midway between the left hand side of the browser window and the (centered) navigation menu. The menu items are populated from a database, with the first item given the id item0. function positionLogo(){ var $menuleft=0; var $element=document.getElementById('item0'); if ($element.offsetParent) { do { $menuleft+=$element.offsetLeft; } while ($element=$element.offsetParent); } var $logoleft=($menuleft/2)-130; // As logo is 260px wide if ($logoleft<0) { $logoleft=0; } $('#logo').css('left',$logoleft); } $(document).ready(function(){ positionLogo(); }); $(window).resize(function(){ positionLogo(); }); This works fine when the window is resized, but when it first runs when the page is loaded, the position it sets is about 20px too far right (ie $logoleft is 20 more than it should be). As soon as the page is resized it jumps into the correct position. Haven't got it live anywhere at the moment but does anyone have any ideas? Thanks!

    Read the article

  • Is there a way to disable a label?

    - by Mike
    I am using an asp radio button group to list out answers in a form. Here is an example of the structure (I know the text doesn't make sense, bare with me). <asp:RadioButtonList id="Q2" runat="server"> <asp:ListItem Text="Go to <a target='_blank' href='http:www.google.com'>Google</a>" Value="a"></asp:ListItem> <asp:ListItem Text="Go to <a target='_blank' href='http:www.yahoo.com'>Yahoo</a>" Value="a"></asp:ListItem> </asp:RadioButtonList> So I want to be able to click on the links and not have the radiobutton associated with it become selected. In IE it works fine but in Firefox the radio button will be selected when i click on the link. I don't really need the label to actually select the proper radio button so is there a way to just disable them either in javascript or somewhere in the asp or C# code?

    Read the article

  • ActionScript: Type coercion problem with BlazeDS/AMF and class interfaces

    - by mike
    Hi, I've got a problem with type coercion in a Java/Hibernate/BlazeDS/Flex-Setup. First of all, my classes look like this: --- JAVA --- Interface I (Abstract) Class A implements I Class B extends A --- ActionScript --- Interface I Class A implements I Class B extends A I got RemoteClass-Meta-Tags in all ActionScript-Classes/Interfaces I, A and B. Package structure and Class/Interface names are exactly the same. Now here's the problem: My Java Service successfully retrieves objects of class B from my database via Hibernate. I got another class C which has a member property of interface type I, so it should be possible to assign an object of type B. But for some reason i get the following error message: TypeError: Error #1034: cannot convert Object@28b44a89 to package.name.I I checked the Java object type in the service and it is of type B and seems to be totally fine. Why can't the object of type B be assigned to a member variable of type I? This is driving me nuts. Thanks in advance.

    Read the article

  • How to generate an ear file from a maven-archetype-webapp artifact?

    - by Mike
    I currently have a project built with maven-archetype-webapp artifact. The default packaging for this project is war. Is it possible for me to insert the maven-ear-plugin in this webapp pom.xml generate an ear file that contains this project war? I tried that, but the war file doesn't get embedded in the generated ear file. It has everything except the war file. I read many Maven related articles, and perhaps I could use maven-archetype-j2ee-simple artifact. However, I'm reluctant to this use for 2 reasons:- This artifact handles ejbs and all the extra features that I don't use. It makes my project looks bloated. Second, it seems like it requires me to install the web module into the repository first before I can create the ear file. Is this the preferred way to create an ear file? How do I create an ear file that contains the war file using maven-ear-plugin from my webapp's pom.xml? If this way is not possible, what's the preferred way? I'm sorry if my questions sound a little novice, I realized I have whole lot more to learn about Maven. Thanks much.

    Read the article

  • Netbeans (PHP) catching syntax error on xml declaration

    - by Mike Valeriano
    Hello. I've just installed and configured Netbeans to work with PHP (including xdebug), and almost everything is working as intended, except that I've been getting "errors" in the IDE after I edited the default webpage template to comply with xhtml 1.1. The template is this: <?xml version="1.0" encoding="${project.encoding}" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=${project.encoding}" /> <title></title> </head> <body> </body> </html> These are the errors I receive (I can't post images yet). Page is created OK, character encoding is inherited from project's settings as expected. It's probably something to do with the xml declaration on top of the document, but I don't really know how to "tune" Netbeans to ignore it and not show the 3 errors on every page I create. The warning is there because NB does not recognize the xhtml 1.1 DTD, so it falls back to html 4.01, which does not support the xmlns attribute in the html tag - and that's the only thing I could find searching around. It will be fixed in the next version, so I'm not worried about it. I know there's nothing wrong with the markup, but there's probably something I'm missing in NB configuration, and I would like to get rid of those messages because they pretty much take all the space I reserve for errors/warnings/tasks. So is there any way I can either make NB recognize this xml declaration or make it ignore these specific "errors"? Thanks.

    Read the article

  • Finding key Solr performance metrics

    - by Mike Malloy
    To improve performance of Solr find your slowest searches, monitor query results, cache hit rate and cache size, document cache and filter cache; find problems with Solr update handlers by tracking index operations and document operations. There is a tool from New Relic which may help. http://www.newrelic.com/solr.html

    Read the article

  • Is there a utility that will let me write to an Excel 2007 .xlsm file with macros enabled?

    - by Mike Webb
    I am writing a program that writes to Excel files. I am restricted to writing to Excel 2007, which is fine, and I'm using EPPlus, which is a great utility. The thing is that I need to have macros and VBA enabled for an update function in the sheet, but EPPlus will only write to .xlsx files, not macro-enabled .xlsm files. If I try to write to .xlsm files it won't open. Is there another code library that lets me accomplish what I need (again that's writing to Excell 2007 Macro-enabled workbooks)?

    Read the article

  • Is it possible to define a generic lambda?

    - by Mike OBrien
    I have some logic in a method that operates on a specified type and I'd like to create a generic lambda that encapsulates the logic. This is the spirit of what I'm trying to do: public void DoSomething() { // ... Func<T> GetTypeName = () => T.GetType().Name; GetTypeName<string>(); GetTypeName<DateTime>(); GetTypeName<int>(); // ... } I know I can pass the type as a parameter or create a generic method but I'm interested if it can just be a generic lambda (So I'm not looking for alternatives). From what I can tell C# 3.0 doesn't support this. TIA, m

    Read the article

  • Select count / duplicates

    - by mike
    Hello! I have a table with all U.S. zip codes. each row contains the city and state name for the zip code. I'm trying to get a list of cities that show up in multiple states. This wouldn't be a problem if there weren't X amount of zip codes in the same city... So basically, I just want to the city in a state to count as 1 instead of it counting the city/state 7 times because there are 2+ zip codes in that city/state... I'm not really sure how to do this. I know I need to use count but how do I tell the mysql to only count a given city/state combo as 1?

    Read the article

  • Python, print delimited list

    - by Mike
    Consider this Python code for printing a list of comma separated values for element in list: print element + ",", What is the preferred method for printing such that a comma does not appear if element is the final element in the list. ex a = [1, 2, 3] for element in a print str(element) +",", output 1,2,3, desired 1,2,3

    Read the article

  • hibernate3-maven-plugin: entiries in different maven projects, hbm2ddl fails

    - by Mike
    I'm trying to put an entity in a different maven project. In the current project I have: @Entity public class User { ... private FacebookUser facebookUser; ... public FacebookUser getFacebookUser() { return facebookUser; } ... public void setFacebookUser(FacebookUser facebookUser) { this.facebookUser = facebookUser; } Then FacebookUser (in a different maven project, that's a dependency of a current project) is defined as: @Entity public class FacebookUser { ... @Id @GeneratedValue(strategy = GenerationType.AUTO) public Long getId() { return id; } Here is my maven hibernate3-maven-plugin configuration: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>hibernate3-maven-plugin</artifactId> <version>2.2</version> <executions> <execution> <phase>process-classes</phase> <goals> <goal>hbm2ddl</goal> </goals> </execution> </executions> <configuration> <components> <component> <name>hbm2ddl</name> <implementation>jpaconfiguration</implementation> </component> </components> <componentProperties> <ejb3>false</ejb3> <persistenceunit>Default</persistenceunit> <outputfilename>schema.ddl</outputfilename> <drop>false</drop> <create>true</create> <export>false</export> <format>true</format> </componentProperties> </configuration> </plugin> Here is the error I'm getting: org.hibernate.MappingException: Could not determine type for: com.xxx.facebook.model.FacebookUser, at table: user, for columns: [org.hibernate.mapping.Column(facebook_user)] I know that FacebookUser is on the classpath because if I make facebook user transient, project compiles fine: @Transient public FacebookUser getFacebookUser() { return facebookUser; }

    Read the article

  • calling calloc - memory leak valgrind

    - by Mike
    The following code is an example from the NCURSES menu library. I'm not sure what could be wrong with the code, but valgrind reports some problems. Any ideas... ==4803== 1,049 (72 direct, 977 indirect) bytes in 1 blocks are definitely lost in loss record 25 of 36 ==4803== at 0x4C24477: calloc (vg_replace_malloc.c:418) ==4803== by 0x400E93: main (in /home/gerardoj/a.out) ==4803== ==4803== LEAK SUMMARY: ==4803== definitely lost: 72 bytes in 1 blocks ==4803== indirectly lost: 977 bytes in 10 blocks ==4803== possibly lost: 0 bytes in 0 blocks ==4803== still reachable: 64,942 bytes in 262 blocks Source code: #include <curses.h> #include <menu.h> #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) #define CTRLD 4 char *choices[] = { "Choice 1", "Choice 2", "Choice 3", "Choice 4", "Choice 5", "Choice 6", "Choice 7", "Exit", } ; int main() { ITEM **my_items; int c; MENU *my_menu; int n_choices, i; ITEM *cur_item; /* Initialize curses */ initscr(); cbreak(); noecho(); keypad(stdscr, TRUE); /* Initialize items */ n_choices = ARRAY_SIZE(choices); my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *)); for (i = 0; i < n_choices; ++i) { my_items[i] = new_item(choices[i], choices[i]); } my_items[n_choices] = (ITEM *)NULL; my_menu = new_menu((ITEM **)my_items); /* Make the menu multi valued */ menu_opts_off(my_menu, O_ONEVALUE); mvprintw(LINES - 3, 0, "Use <SPACE> to select or unselect an item."); mvprintw(LINES - 2, 0, "<ENTER> to see presently selected items(F1 to Exit)"); post_menu(my_menu); refresh(); while ((c = getch()) != KEY_F(1)) { switch (c) { case KEY_DOWN: menu_driver(my_menu, REQ_DOWN_ITEM); break; case KEY_UP: menu_driver(my_menu, REQ_UP_ITEM); break; case ' ': menu_driver(my_menu, REQ_TOGGLE_ITEM); break; case 10: { char temp[200]; ITEM **items; items = menu_items(my_menu); temp[0] = '\0'; for (i = 0; i < item_count(my_menu); ++i) if(item_value(items[i]) == TRUE) { strcat(temp, item_name(items[i])); strcat(temp, " "); } move(20, 0); clrtoeol(); mvprintw(20, 0, temp); refresh(); } break; } } free_item(my_items[0]); free_item(my_items[1]); free_menu(my_menu); endwin(); }

    Read the article

  • Preference values - static without tables using a model with virtual attributes

    - by Mike
    Im trying to eliminate two tables from my database. The tables are message_sort_options and per_page_options. These tables basically just have 5 records which are options a user can set as their preference in a preferences table. The preferences table has columns like sort_preferences and per_page_preference which both point to a record in the other two tables containing the options. How can i set up the models with virtual attributes and fixed values for the options - eliminating table lookups every time the preferences are looked up?

    Read the article

  • T4MVC adding current page controller to action link

    - by Mike Flynn
    I have the following ActionLink that sits in the home page on the register controller (Index.cshtml) @Html.ActionLink("terms of service", Url.Action(MVC.Home.Terms()), null, new { target="_blank" }) Generating the following URL. Why is "register" being added to it? It's as if the link within the Register page which has it's own controller is preappending the register controller to any link in that view? http://localhost/register/terms-of-service routes.MapRoute( "Terms", "terms-of-service", new { controller = "Home", action = "Terms" } ); public partial class HomeController : SiteController { public virtual ActionResult Terms() { return View(new SiteViewModel()); }

    Read the article

  • How to distribute an offline cube for excel

    - by Mike M
    I have the following scenario. A cube created in SSAS 2008. I can connected to this cube via Excel. I can create an offline cube file. I can connect to this offline cube file. Now, say I want to email this excel file along with the cube file so that another user can view it. I run into the problem that the connection path the offline cube is hard coded into the excel file. Its the same problem this person had. http://stackoverflow.com/questions/1253950/opening-offline-cube-from-another-machine Their solution was to just make sure the other user saved the cube in the same directory structure. I don't love that solution. I also came across this idea: http://www.pcreview.co.uk/forums/thread-948974.php I tried that, it errored out, but I am not an Excel VBA programmer and really have no idea if I even put the code in the right place. So anyway, anyone out there have any ideas about who to do this? If the VBA solution is the best, could someone give me some tips on where to actually put that code?

    Read the article

  • realloc - converting int to char

    - by Mike
    I'm converting an array of integers into a char by iterating through the whole array, and then I'm adding the resulting string to ncurses's method new_item. For some reason I'm doing something wrong the way I reallocate memory, thus I get the the first column as: -4 Choice 1 0 Choice 1 4 Choice 2 1 Choice 1 4 Choice 3 - Instead of - 2 Choice 1 4 Choice 4 3 Choice 1 4 Exit 4 Choice 1 - #include <stdio.h> #include <stdlib.h> #include <curses.h> #include <menu.h> #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) #define CTRLD 4 char *choices[] = { "Choice 1", "Choice 2", "Choice 3", "Choice 4", "Exit", }; int table[5]={0,1,2,3,4}; int main() { ITEM **my_items; int c; MENU *my_menu; int n_choices, i; ITEM *cur_item; initscr(); cbreak(); noecho(); keypad(stdscr, TRUE); n_choices = ARRAY_SIZE(choices); my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *)); // right here char *convert = NULL; for(i = 0; i < n_choices; ++i){ convert = (char *) realloc (convert, sizeof(char) * 4); sprintf(convert, "%i", table[i]); my_items[i] = new_item(convert, choices[i]); } my_items[n_choices] = (ITEM *)NULL; my_menu = new_menu((ITEM **)my_items); mvprintw(LINES - 2, 0, "F1 to Exit"); post_menu(my_menu); refresh(); while((c = getch()) != KEY_F(1)) { switch(c) { case KEY_DOWN: menu_driver(my_menu, REQ_DOWN_ITEM); break; case KEY_UP: menu_driver(my_menu, REQ_UP_ITEM); break; } } free(convert); unpost_menu(my_menu); free_item(my_items[0]); free_item(my_items[1]); free_item(my_items[2]); free_item(my_items[3]); free_item(my_items[4]); free_menu(my_menu); endwin(); }

    Read the article

  • Mail merge from Java

    - by Mike Q
    Hi all, Does anyone have any experience with doing mail merge from Java on a word document? I need to support both doc and docx formats. I have heard of Apache POI and docx4j. However, from reading around I'm sure how good the word support is in POI. docx4j only supports docx format as far as I can see. Can any suggest either one of the above (and correct my knowledge on support) or another appropriate library. If necessary I would be willing to use one lib for doc and another for docx. Thanks.

    Read the article

  • Javascript top banner control [closed]

    - by Mike Pateras
    Possible Duplicates: How to show popup message like in stackoverflow Header message just like at Stack Overflow How to display a message on screen without refreshing like SO does? I'm looking for something like StackOverflow's banner that pops up (or rather drops down) from the top of the screen when you have a new alert. Preferably some javascript widget, though I'd be open to anything that will work with an ASP.Net MVC2 web page. All I'm looking for is a simple top-banner alert/message that looks good, preferably with a cancel button. Is there something like that, freely available?

    Read the article

  • MySQL database - backup problem

    - by Mike
    Hi I need to backup MySQL database and then deploy it on another MySQL server. The problem is, I need it backup without data , just script which creates database, tables, procedures, users, resets autoincrements etc. ... I tried MySQL administrator tool (Windows) and UNchecked "complete inserts check box", but it still created it ... Thanks in advance

    Read the article

  • HttpServletResponse XML to Java

    - by Mike
    I am maintaining this servlet that has a HttpServletResponse response that replies back to the client an XML message. I want to take the XML message and convert it to JSON, then send the JSON back. I want to avoid writing my own JSON converter if possible. Does anyone have a good method of doing this? I googled for this: http://pvoss.wordpress.com/2009/02/26/servlet-filter-to-convert-xml-to-json/ , which is exactly what I want but they are using a hacked dom4j jar which doesn't help me.

    Read the article

  • Access to selection in gmail message body with Google Apps Script

    - by Mike Ellis
    Can app scripts access the current selection in a gmail message? I frequently compose messages that include engineering calculations and make use of the Google Calc feature do the calculation or convert to the desired units, e.g. 4000 Btu/hr * 8 hrs in kWh It would be really convenient to be able to select the above, hit a mapped key (e.g. Ctrl-K) and have the inserted after the expression 4000 Btu/hr * 8 hrs in kWh = 0.9378 kWh instead of having to paste the expression into a search box and then copy and paste the answer. I could certainly write a solution using a keymapper and a small python script to grab the current selection, send it to the gcalc api, etc ..., but my real motivation is to get familiar with Apps Scripts's capabilities and limitations. I suppose the uber-question here is "what kinds of user actions and state information can App Script access in Gmail messages (and/or Google docs) that are being edited?"

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >