Daily Archives

Articles indexed Tuesday March 16 2010

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

  • jQuery UI sortable issue with helper Y offset value being same as scroll offset on FireFox only

    - by James
    I have a problem with a jQuery UI 1.7.2 sortable list in Firefox, IE7-8 work fine. When I'm scrolled down a bit, the helper element seems to have an offset of the same height that I'm scrolled down from the mouse pointer which makes it impossible to see which item you originally started dragging. How do I fix this or work around the issue? If there is no fix what is a really good alternative drag-able plugin? Here are my initialization parameters for the sortable. $("#sortable").sortable( {placeholder: 'ui-state-highlight' } ); $("#sortable").disableSelection();

    Read the article

  • Enter ID instead of name on submit (form)

    - by Derek
    In my activities table, I have a user ID and a project ID. When a user (of admin level) creates an activity they select from a drop down menu a project. Here is the select query to draw up appropriate values: $sql = "SELECT usersprojects_tb.projectid, projects.projectname FROM projects INNER JOIN usersprojects on projects.projectid = usersprojects.projectid WHERE usersprojects.userid = '".$_SESSION['SESS_USERID']."'"; And for the tag with the dropdown menu, I have this: <?php echo $row['projectname']?> I have tried submitting the form with 'projectid' here instead and the project ID is stored successfully in my activies table. However, the user needs to see the project names (IDs arent exactly user-friendly!) And with 'projectname' as displayed, they can select the names of the available projects (to associate an activity with) but the project ID is not stored, how I link this up, so that when the project name is sent, the ID for this project is stored properly in my activities table. I'm also having the exact same problem with the users drop down. As the admin user selects a user from the drop down to assign the task to. I exactly what I want, but I think I may be using the wrong syntax! Any help is much appreciated. Thanks.

    Read the article

  • Fireside chats at Google I/O

    At Google I/O (just 2 months away!), we're excited to bring back a series of sessions called fireside chats. Fireside chats are smaller, intimate sessions where Google teams...

    Read the article

  • IIS reveals internal IP address in content-location field

    - by saille
    Referring: http://support.microsoft.com/kb/q218180/, there is a known issue in IIS4/5/6 whereby it will reveal the internal IP of a web server in the content-location field of the HTTP header. We have IIS 6. I have tried the fix suggested, but it has not worked. The website is configured to send all requests to ASP.NET, and I am wondering if this is why the fix, which addresses IIS configuration, has not worked for us. If this is the case, how would we fix this in ASP.NET? We need to fix this issue in order to pass a security audit.

    Read the article

  • force laptop mode on

    - by Vi
    root@vi-notebook:/home/vi# laptop_mode start force Laptop mode enabled, not active How to start laptop mode? It starts successfully when AC adapter is removed, but not by explicit command. The system is GNU/Linux Debian i386 squeeze (not up to date), 2.6.30-zen2-31270-gc7099db-dirty, Acer Extensa 5220.

    Read the article

  • Android App Build system differences between Eclipse and Ant?

    - by Amy Winarske
    The Eclipse build for my 1.6 application project is succeeding and the Ant build is failing. I'm looking for help on why they aren't behaving the same way. We are developing on Mac OSX 10.5.8 with Eclipse 3.5 against SDK 1.6 + Google APIs. There are no setting changes in Eclipse, either at workspace or project level. Similarly, our ant is also a vanilla- flavored unmodified installation of 1.7.1. JDK is 1.5.0_22. The CLASSPATH environment variable is not set. JAVA_HOME is /Library/Java/ Home The application was initially created by a team member using the Eclipse plugins. The application references two jar files, one of which has a dependency on javax.xml.bind.annotation.XmlSeeAlso, which is not defined anywhere in our code or in android.jar. The other jar file has an explicit dependency on android.jar. I generated the Ant build file using android update. The Eclipse project builds an apk and runs the application in the emulator. I think this is incorrect behavior. The Android ant project fails to build. I think this is correct behavior. MyClass.java:98: cannot access javax.xml.bind.annotation.XmlSeeAlso [javac] file javax/xml/bind/annotation/XmlSeeAlso.class not found Any ideas as to why the two build methods are behaving differently? I would expect them both to fail. Thanks! -Amy

    Read the article

  • SQL - Select all when filter value is empty

    - by iansinke
    I have a SQL query in my ASP.net web app that looks like this: SELECT * FROM [Records] WHERE ([title] LIKE '%' + @title + '%') @title, of course, is the value of a text box on the page. My question is, why, when the text box is empty, does this return nothing? And how can I make it return everything, like logic tells me it ought to?

    Read the article

  • Big O complexity of simple for not always linear?

    - by i30817
    I'm sure most of you know that a nested loop has O(n^2) complexity if the function input size is n for(int i = 0; i < n; i++){ for(int j = 0; j < n; j++){ ... } } I think that this is similar, by a analogous argument, but i'm not sure can anyone confirm? for(int i = 0, max = n*n; i < max; i++{ ... } If so i guess that there is some kinds of code whose big O mapping is not immediately obvious besides recursion and subroutines.

    Read the article

  • Looping through python-dictionary-turned-into-json in javascript.

    - by Phil
    In writing a django app, I am returning the following json on a jQuery ajax call: { "is_owner": "T", "author": "me", "overall": "the surfing lifestyle", "score": "1", "meanings": { "0": "something", "1": "something else", "3": "yet something else", "23": "something random" }, "user vote": "1" } In the javascript/jQuery callback function, I can access the is_owner, author, etc. easily enough. is_owner = json.is_owner; author = json.author; But for meanings, the numbers are different depending on what it pulls from the server. On the server side for the meanings part, right now what I'm doing is constructing a dictionary like so: meanings_dict = {} meanings = requested_tayke.meanings.all() for meaning in meanings: meanings_dict[meaning.location] = meaning.text and then returning a json I create like this: test_json = simplejson.dumps({'is_owner':is_owner, 'overall':overall, 'score':str(score),'user vote':str(user_vote), 'author': author, 'meanings' : meanings_dict }) print test_json return HttpResponse(test_json) My question is this: how do I access the 'meanings' data from my json in javascript? I need to loop through all of it. Maybe I need to be loading it into json differently. I have full control so of both the server and client side so I'm willing to change either to make it work. Also worth noting: I'm not using Django's serialize functionality. I couldn't make it work with my situation.

    Read the article

  • how to dynamically add button to SilverLight datagrid

    - by Grayson Mitchell
    I have a datagrid that I want to add a button/s to at runtime. I have managed to do this with the below code: DataGridTemplateColumn templateCol = new DataGridTemplateColumn(); templateCol.CellTemplate = (System.Windows.DataTemplate)XamlReader.Load( @"<DataTemplate xmlns='http://schemas.microsoft.com/client/2007' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'> <Button Content='" + item.Value.Label + @"'/> </DataTemplate>"); _dataGrid.Columns.Add(templateCol); The problem is that I can't work out how to add a click event. I want to add a click event with a parameter corresponding to the row id...

    Read the article

  • JQuery overriding the themeroller style

    - by Paul Connolly
    Hi, In my accordian control I want to override the header style to show a red background instead of the default theme colour if ever the user control (e.g user's name and address input) in that particular pane returns a validation boolean of false. I'm ok with how to use .Toggle to change the class but can't figure out how to grab the themeroller class in the first place. How would I do this? Thanks Paul

    Read the article

  • Jetty 7 + MySQL Config [java.lang.ClassNotFoundException: org.mortbay.jetty.webapp.WebAppContext]

    - by Scott Chang
    I've been trying to get a c3p0 db connection pool configured for Jetty, but I keep getting a ClassNotFoundException: 2010-03-14 19:32:12.028:WARN::Failed startup of context WebAppContext@fccada@fccada/phpMyAdmin,file:/usr/local/jetty/webapps/phpMyAdmin/,file:/usr/local/jetty/webapps/phpMyAdmin/ java.lang.ClassNotFoundException: org.mortbay.jetty.webapp.WebAppContext at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:313) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:266) at org.eclipse.jetty.util.Loader.loadClass(Loader.java:90) at org.eclipse.jetty.xml.XmlConfiguration.nodeClass(XmlConfiguration.java:224) at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:187) at org.eclipse.jetty.webapp.JettyWebXmlConfiguration.configure(JettyWebXmlConfiguration.java:77) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:975) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:586) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:349) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55) at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:165) at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:162) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55) at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:165) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:92) at org.eclipse.jetty.server.Server.doStart(Server.java:228) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55) at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:990) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:955) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.jetty.start.Main.invokeMain(Main.java:394) at org.eclipse.jetty.start.Main.start(Main.java:546) at org.eclipse.jetty.start.Main.parseCommandLine(Main.java:208) at org.eclipse.jetty.start.Main.main(Main.java:75) I'm new to Jetty and I want to ultimately get phpMyAdmin and WordPress to run on it through Quercus and a JDBC connection. Here are my web.xml and jetty-web.xml files in my WEB-INF directory. jetty-web.xml: <?xml version="1.0"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> <Configure class="org.mortbay.jetty.webapp.WebAppContext"> <New id="mysql" class="org.mortbay.jetty.plus.naming.Resource"> <Arg>jdbc/mysql</Arg> <Arg> <New class="com.mchange.v2.c3p0.ComboPooledDataSource"> <Set name="Url">jdbc:mysql://localhost:3306/mysql</Set> <Set name="User">user</Set> <Set name="Password">pw</Set> </New> </Arg> </New> </Configure> web.xml: <?xml version="1.0"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> <web-app> <description>Caucho Technology's PHP Implementation</description> <resource-ref> <description>My DataSource Reference</description> <res-ref-name>jdbc/mysql</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> <servlet> <servlet-name>Quercus Servlet</servlet-name> <servlet-class>com.caucho.quercus.servlet.QuercusServlet</servlet-class> <!-- Specifies the encoding Quercus should use to read in PHP scripts. --> <init-param> <param-name>script-encoding</param-name> <param-value>UTF-8</param-value> </init-param> <!-- Tells Quercus to use the following JDBC database and to ignore the arguments of mysql_connect(). --> <init-param> <param-name>database</param-name> <param-value>jdbc/mysql</param-value> </init-param> <init-param> <param-name>ini-file</param-name> <param-value>WEB-INF/php.ini</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>Quercus Servlet</servlet-name> <url-pattern>*.php</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.php</welcome-file> </welcome-file-list> </web-app> I'm guessing that I'm missing a few jars or something. Currently I have placed the following jars in my WEB-INF/lib directory: c3p0-0.9.1.2.jar commons-dbcp-1.4.jar commons-pool-1.5.4.jar mysql-connector-java-5.1.12-bin.jar I have also tried to put these jars in JETTY-HOME/lib/ext, but to no avail... Someone please tell me what is wrong with my configuration. I'm sick of digging through Jetty's crappy documentation.

    Read the article

  • How to set focus to a brand new TextBox which was created as a result of a databinding in WPF?

    - by Mike
    Hi everyone, I have a WPF ItemsControl that is bound to an ObservableCollection. The XAML: <ItemsControl Name="mItemsControl"> <ItemsControl.ItemTemplate> <DataTemplate> <TextBox Text="{Binding Mode=OneWay}"></TextBox> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> The codebehind: private ObservableCollection<string> mCollection = new ObservableCollection<string>(); public MainWindow() { InitializeComponent(); this.mCollection.Add("Test1"); this.mCollection.Add("Test2"); this.mItemsControl.ItemsSource = this.mCollection; } private void Button_Click(object sender, RoutedEventArgs e) { this.mCollection.Add("new item!"); } When I click a button, it adds a new string to the databound ObservableCollection which triggers a new TextBox to appear. I want to give this new textbox focus. I've tried this technique from a related StackOverflow question but it always sets focus to the textbox before the newly created one. private void Button_Click(object sender, RoutedEventArgs e) { this.mCollection.Add("new item!"); // MoveFocus takes a TraversalRequest as its argument. TraversalRequest request = new TraversalRequest(FocusNavigationDirection.Previous); // Gets the element with keyboard focus. UIElement elementWithFocus = Keyboard.FocusedElement as UIElement; // Change keyboard focus. if (elementWithFocus != null) { elementWithFocus.MoveFocus(request); } } My need seems simple enough, but it's almost like the new textbox doesn't really exist until a slight delay after something is added to the ObservableCollection. Any ideas of what would work? Thanks! -Mike

    Read the article

  • ASP.NET MVC 2.0 RTM cannot work with VWD 2008 Express on a new Windows 7 Pro

    - by silent
    The MVC 2.0 RTM works great on my old Vista computer with VWD 2008 Express, but I just bought a new computer with Windows 7 Pro, I installed VWD 2008 Express SP1 and MVC 2.0 RTM by using Web PI 2.0. but after installation, I found the VWD doesn't have any MVC options, that means I can't either create new MVC projects or compile existing MVC projects. Why? What other steps I need to do to make it work? I'm sure the MVC has been installed properly since my MVC site on the new computer works well (so the IIS side has no problem), just the VWD can't 'realize' that the MVC framework is already installed... (tried to uninstall and install many times, and I also tried to install MVC separately without Web PI, but it just won't work)

    Read the article

  • Will_paginate stuck on page 2

    - by Sleepycat
    For some reason my will_paginate collection is stuck on page 2. I have the usual links the view helper provides except every page after page one links to http://localhost:3000/ceo/gr_messages?page=2 I have tried to add the :order option with no luck. I have also ensured that the request is a get as mentioned on this page: http://wiki.github.com/mislav/will_paginate/simple-search Any other thoughts or suggestions would be appreciated.

    Read the article

  • Expression.Call() to String.Equals() throws error

    - by Sam
    The following code: var constant = Expression.Constant("find me", typeof(string)); // memberExpression evaluates to a string var predicate = Expression.Call(memberExpression, "Equals", null, constant); is throwing the error More than one method 'Equals' on type 'System.String' is compatible with the supplied arguments. I'm guessing that's because there's Equals(Object) and Equals(String) - is there any way for me to specify which method I mean to use via the overload of Expression.Call() that takes an instance method name as a string? Or do I have to make a special case for calls to Equals() to take a MethodInfo instead?

    Read the article

  • Recommendations on laptops - long battery life, slim, Windows 7

    - by molecule
    Hi, I have been looking at a couple of laptops... The most important requirement is long battery life, slim & light, and runs Windows 7. One that seems to fit the bill is the Sony Vaio Z series laptops. They claim to have long battery life, have some really impressive specs (on paper) and a very nice design. They are not on sale where I am yet but has seen/used them? Second would be the Lenovo Thinkpad IBM x301 For business users, Thinkpad seems to be the way to go. I have also considered Dell Alienware M11x but may not be completely appropriate for business use? What would you recommend with a budget of USD1500-2000?

    Read the article

  • MySQL: Which is faster — INSTR or LIKE?

    - by Grekker
    If your goal is to test if a string exists in a MySQL column (of type 'varchar', 'text', 'blob', etc) which of the following is faster / more efficient / better to use, and why? Or, is there some other method that tops either of these? INSTR( columnname, 'mystring' ) > 0 vs columnname LIKE '%mystring%'

    Read the article

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