Search Results

Search found 305 results on 13 pages for 'marcus morris'.

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

  • SQL - Count grouped entries and then get the max values grouped by date

    - by Marcus
    hello, I am out of any logic how to write the right sql statment. I've got a sqlite table holding every played track in a row with played date/time Now I will count the plays of all artists, grouped by day and then find the artist with the max playcount per day. I used this Query SELECT COUNT(ARTISTID) AS artistcount, ARTIST AS artistname,strftime('%Y-%m-%d', playtime) AS day_played FROM playcount GROUP BY artistname to get this result "93"|"The Skygreen Leopards"|"2010-06-16" "2" |"Arcade Fire" |"2010-06-15" "2" |"Dead Kennedys" |"2010-06-15" "2" |"Wolf People" |"2010-06-15" "3" |"16 Horsepower" |"2010-06-15" "3" |"Alela Diane" |"2010-06-15" "46"|"Motorama" |"2010-06-15" "1" |"Ariel Pink's Haunted" |"2010-06-14" I tried then to query this virtual table but I always get false results in artistname. SELECT MAX(artistcount), artistname , day_played FROM ( SELECT COUNT(ARTISTID) AS artistcount, ARTIST AS artistname,strftime('%Y-%m-%d', playtime) AS day_played FROM playcount GROUP BY artistname ) GROUP BY strftime('%Y-%m-%d',day_played) result in this "93"|"lilium" |"2010-06-16" "46"|"Wolf People"|"2010-06-15" "30"|"of Montreal"|"2010-06-14" but the artist name is false. I think through the grouping by day, it just use the last artist, or so. I tested stuff like INNER JOIN or GROUP BY ... HAVING in trial and error, I read examples of similar issues but always get lost in columnnames and stuff (I am a bit burned out) I hope someone can give me a hint. thanks m

    Read the article

  • ASP.NET Ajax - Asynch request has separate session???

    - by Marcus King
    We are writing a search application that saves the search criteria to session state and executes the search inside of an asp.net updatepanel. Sometimes when we execute multiple searches successively the 2nd or 3rd search will sometimes return results from the first set of search criteria. Example: our first search we do a look up on "John Smith" - John Smith results are displayed. The second search we do a look up on "Bob Jones" - John Smith results are displayed. We save all of the search criteria in session state as I said, and read it from session state inside of the ajax request to format the DB query. When we put break points in VS everything behaves as normal, but without them we get the original search criteria and results. My guess is because they are saved in session, that the ajax request somehow gets its own session and saves the criteria to that, and then retrieves the criteria from that session every time, but the non-async stuff is able to see when the criteria is modified and saves the changes to state accordingly, but because they are from two different sessions there is a disparity in what is saved and read. EDIT::: To elaborate more, there was a suggestion of appending the search criteria to the query string which normally is good practice and I agree thats how it should be but following our requirements I don't see it as being viable. They want it so the user fills out the input controls hits search and there is no page reload, the only thing they see is a progress indicator on the page, and they still have the ability to navigate and use other features on the current page. If I were to add criteria to the query string I would have to do another request causing the whole page to load, which depending on the search criteria can take a really long time. This is why we are using an ajax call to perform the search and why we aren't causing another full page request..... I hope this clarifies the situation.

    Read the article

  • Java type for date/time when using Oracle Date with Hibernate

    - by Marcus
    We have a Oracle Date column. At first in our Java/Hibernate class we were using java.sql.Date. This worked but it didn't seem to store any time information in the database when we save so I changed the Java data type to Timestamp. Now we get this error: springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.an notation.PersistenceExceptionTranslationPostProcessor#0' defined in class path resource [margin-service-domain -config.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreatio nException: Error creating bean with name 'sessionFactory' defined in class path resource [m-service-doma in-config.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Wrong column type: CREATE_TS, expected: timestamp Any ideas on how to map an Oracle Date while retaining the time portion? Update: I can get it to work if I use the Oracle Timestamp data type but I don't want that level of precision ideally. Just want the basic Oracle Date.

    Read the article

  • How to Select Items in Dropdown in Selenium

    - by Marcus Gladir
    Firstly, I have been trying to get the dropdown from this web page: http://solutions.3m.com/wps/portal/3M/en_US/Interconnect/Home/Products/ProductCatalog/Catalog/?PC_Z7_RJH9U5230O73D0ISNF9B3C3SI1000000_nid=RFCNF5FK7WitWK7G49LP38glNZJXPCDXLDbl This is the code I have: import urllib2 from bs4 import BeautifulSoup import re from pprint import pprint import sys from selenium import common from selenium import webdriver import selenium.webdriver.support.ui as ui from boto.s3.key import Key import requests url = 'http://solutions.3m.com/wps/portal/3M/en_US/Interconnect/Home/Products/ProductCatalog/Catalog/?PC_Z7_RJH9U5230O73D0ISNF9B3C3SI1000000_nid=RFCNF5FK7WitWK7G49LP38glNZJXPCDXLDbl' element_xpath = '//*[@id="Component1"]' driver = webdriver.PhantomJS() driver.get(url) element = driver.find_element_by_xpath(element_xpath) element_xpath = '/option[@value="02"]' all_options = element.find_elements_by_tag_name("option") for option in all_options: print("Value is: %s" % option.get_attribute("value")) option.click() source = driver.page_source.encode('utf-8', 'ignore') driver.quit() source = str(source) soup = BeautifulSoup(source, 'html.parser') print soup What prints out is this: Traceback (most recent call last): File "../../../../test.py", line 58, in <module> Value is: XX main() File "../../../../test.py", line 46, in main option.click() File "/home/eric/dev/octocrawler-env/local/lib/python2.7/site-packages/selenium-2.33.0-py2.7.egg/selenium/webdriver/remote/webelement.py", line 54, in click self._execute(Command.CLICK_ELEMENT) File "/home/eric/dev/octocrawler-env/local/lib/python2.7/site-packages/selenium-2.33.0-py2.7.egg/selenium/webdriver/remote/webelement.py", line 228, in _execute return self._parent.execute(command, params) File "/home/eric/dev/octocrawler-env/local/lib/python2.7/site-packages/selenium-2.33.0-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 165, in execute self.error_handler.check_response(response) File "/home/eric/dev/octocrawler-env/local/lib/python2.7/site-packages/selenium-2.33.0-py2.7.egg/selenium/webdriver/remote/errorhandler.py", line 158, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementNotVisibleException: Message: u'{"errorMessage":"Element is not currently visible and may not be manipulated","request":{"headers":{"Accept":"application/json","Accept-Encoding":"identity","Connection":"close","Content-Length":"81","Content-Type":"application/json;charset=UTF-8","Host":"127.0.0.1:51413","User-Agent":"Python-urllib/2.7"},"httpVersion":"1.1","method":"POST","post":"{\\"sessionId\\": \\"30e4fd50-f0e4-11e3-8685-6983e831d856\\", \\"id\\": \\":wdc:1402434863875\\"}","url":"/click","urlParsed":{"anchor":"","query":"","file":"click","directory":"/","path":"/click","relative":"/click","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/click","queryKey":{},"chunks":["click"]},"urlOriginal":"/session/30e4fd50-f0e4-11e3-8685-6983e831d856/element/%3Awdc%3A1402434863875/click"}}' ; Screenshot: available via screen And the weirdest most infuriating bit of it all is that sometimes it actually all works out. I have no clue what's going on here.

    Read the article

  • Working with expression AST:s

    - by Marcus
    Hi, Is there any best practice when working with AST:s? I have a parsed expression AST. ConstantExpression, BinaryExpression etc. I want to populate a GUI-dialog with information from the AST, and it's here where I get kinda confused because my code gets pretty messy. Example: expression = "Var1 > 10 AND Var2 < 20" I want to populate two textboxes with value 10 resp. 20 from the AST. What I'm doing now is a recursive method that checks for correct child expression-types (with .Net Is-operator) and acts accordingly and the code is really "smelly" :) Is there any design pattern, like Visitor or such, that makes this somewhat easier/more readable/maintainable ?

    Read the article

  • TreeView in Winforms and focus problem

    - by Marcus
    Hi, Can anyone please explain to my why the form in the code below gets out of focus when selecting a treenode in the tree? What should happen is that the form/button should get the focus when the tree disappears like the listview example but it doesn't. Code example: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace FocusTest { public partial class Form1 : Form { #region Generated /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("Item1"); System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("Item2"); System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem("Item3"); System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("Node0"); System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("Node1"); System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("Node2"); this.button1 = new System.Windows.Forms.Button(); this.listView1 = new System.Windows.Forms.ListView(); this.button2 = new System.Windows.Forms.Button(); this.treeView1 = new System.Windows.Forms.TreeView(); this.SuspendLayout(); // // button1 // this.button1.Location = new System.Drawing.Point(12, 12); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 23); this.button1.TabIndex = 0; this.button1.Text = "button1"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // // listView1 // this.listView1.Items.AddRange(new System.Windows.Forms.ListViewItem[] { listViewItem1, listViewItem2, listViewItem3 }); this.listView1.Location = new System.Drawing.Point(12, 41); this.listView1.Name = "listView1"; this.listView1.Size = new System.Drawing.Size(121, 97); this.listView1.TabIndex = 1; this.listView1.UseCompatibleStateImageBehavior = false; this.listView1.Visible = false; this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged); this.listView1.View = View.List; // // button2 // this.button2.Location = new System.Drawing.Point(310, 11); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(75, 23); this.button2.TabIndex = 2; this.button2.Text = "button2"; this.button2.UseVisualStyleBackColor = true; this.button2.Click += new System.EventHandler(this.button2_Click); // // treeView1 // this.treeView1.Location = new System.Drawing.Point(310, 41); this.treeView1.Name = "treeView1"; treeNode1.Name = "Node0"; treeNode1.Text = "Node0"; treeNode2.Name = "Node1"; treeNode2.Text = "Node1"; treeNode3.Name = "Node2"; treeNode3.Text = "Node2"; this.treeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { treeNode1, treeNode2, treeNode3}); this.treeView1.Size = new System.Drawing.Size(121, 97); this.treeView1.TabIndex = 3; this.treeView1.Visible = false; this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect); // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(760, 409); this.Controls.Add(this.treeView1); this.Controls.Add(this.button2); this.Controls.Add(this.listView1); this.Controls.Add(this.button1); this.Name = "Form1"; this.Text = "Form1"; this.ResumeLayout(false); } #endregion private System.Windows.Forms.Button button1; private System.Windows.Forms.ListView listView1; private System.Windows.Forms.Button button2; private System.Windows.Forms.TreeView treeView1; #endregion public Form1() { InitializeComponent(); } #region TreeView private void button2_Click(object sender, EventArgs e) { ToggleTreeView(); } private void ToggleTreeView() { if (treeView1.Visible) { Controls.Remove(treeView1); treeView1.Visible = false; } else { Controls.Add(treeView1); treeView1.Size = new Size(300, 400); treeView1.Location = PointToClient(PointToScreen(new System.Drawing.Point(button2.Location.X, button2.Location.Y + button2.Height))); this.treeView1.BringToFront(); treeView1.Visible = true; treeView1.Select(); } } private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { ToggleTreeView(); } #endregion #region ListView private void button1_Click(object sender, EventArgs e) { ToggleListView(); } private void ToggleListView() { if (listView1.Visible) { Controls.Remove(listView1); listView1.Visible = false; } else { Controls.Add(listView1); listView1.Size = new Size(300, 400); listView1.Location = PointToClient(PointToScreen(new System.Drawing.Point(button1.Location.X, button1.Location.Y + button1.Height))); this.listView1.BringToFront(); listView1.Visible = true; listView1.Select(); } } private void listView1_SelectedIndexChanged(object sender, EventArgs e) { if (listView1.Visible) ToggleListView(); } #endregion } }

    Read the article

  • asp.net client/browser url

    - by Marcus King
    I'm wondering how I can get the url from the browser in asp.net. I have a page that I use globalization/localization for and I am redirecting (via server not code) from www.spanishversion.com to www.englishversion.com but the url is masked to still say www.spanishversion.com. I want to get what the browser's url is but when I try things like Request.Url.ToString() Request.Url.OriginalUrl Request.Path Request.RawUrl Request.ServerVariables["SERVER_NAME"] it always comes back as www.englishversion.com. Is there a way that I can explicitly read the url from the browser? Thanks.

    Read the article

  • How to convert hexadecimal representation of data to binary data in PHP?

    - by Marcus Adams
    I'm familiar with php's function bin2hex() for converting binary data to its hexadecimal representation. However, what is the complement function to convert the hexadecimal representation of the data back to binary data? For example: $foo = "hello"; $foo = bin2hex($foo); echo $foo; // Displays 68656c6c6f How do I turn it back to hello? $foo = "68656c6c6f"; // Now what? There is no hex2bin() function.

    Read the article

  • How to display a subview loaded from a separate NIB file

    - by Marcus Netter
    I'm developing a Cocoa desktop application that uses a source list in the style of iTunes: different elements in the source list cause the main content area to display different views. The content area is entirely filled with a (vertical) NSSplitView; on the left is an NSOutlineView source list. When the user selects an item on the left, the relevant view appears on the right side of the splitter. I can make it work well enough by putting everything in one NIB file and putting a borderless NSTabView to the right of the splitter; to switch views, I just have to change the selected tab. But putting all the views in one NIB is bad practice, so I'm trying to move each of the subviews into their own NIB files. I have a pretty good idea of most of this process — I've created an NSViewController subclass for each of these views (EntityDetailViewController, GroupDetailViewController, and so on), set the File's Owner of each new NIB to the relevant controller class, set the view connection in each NIB, and reworked the bindings. What I don't know is how to actually change which subview is being shown on screen. I've tried using the default generic NSView on the right side and sending it addSubview: messages; I've tried connecting to it as the first subview and calling NSView *newSubview = /* get subview from the new subview controller */ [[subview superview] replaceSubview:subview with:newSubview]; [self setSubview:newSubview]; But everything just leaves the space blank. How do I display a subview loaded from a separate NIB?

    Read the article

  • Flex3 Linechart points are too close to the edge

    - by Marcus Blankenship
    I have a Flex3 LineChart component using an CircleItemRenderer and the datapoints are being cut off because they are too close to the edge. Here's what it looks like: http://img29.imageshack.us/img29/3850/chartx.png As you can see, the circles on the left and right sides are being cut off. How can I make the LineSeries area, plus the horizontal labels, narrower so it fits in the chart area? Thanks!

    Read the article

  • JBoss JDBC warning - "Unable to fill pool"

    - by Marcus
    We're getting this random warning from JBoss.. any idea why? It happens at random times when there are no active threads. Everything works when any processing resumes. 13:49:31,764 WARN [JBossManagedConnectionPool] [ ] Unable to fill pool org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Listener ref used the connection with the following error: ORA-12516, TNS:listener could not find available handler with matching protocol stack The Connection descriptor used by the client was: //localhost:1521/orcl

    Read the article

  • How do you convert a hexadecimal representation of data to binary data in PHP?

    - by Marcus Adams
    I'm familiar with php's function bin2hex() for converting binary data to its hexadecimal representation. However, what is the complement function to convert the hexadecimal representation of the data back to binary data? For example: $foo = "hello"; $foo = bin2hex($foo); echo $foo; // Displays 68656c6c6f How do I turn it back to hello? $foo = "68656c6c6f"; // Now what? There is no hex2bin() function.

    Read the article

  • Explanation of JAXB error: Invalid byte 1 of 1-byte UTF-8 sequence

    - by Marcus
    We're parsing an XML document using JAXB and get this error: [org.xml.sax.SAXParseException: Invalid byte 1 of 1-byte UTF-8 sequence.] at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:315) What exactly does this mean and how can we resolve this?? We are executing the code as: jaxbContext = JAXBContext.newInstance(Results.class); Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); unmarshaller.setSchema(getSchema()); results = (Results) unmarshaller.unmarshal(new FileInputStream(inputFile)); Update Issue appears to be due to this "funny" character in the XML file: ¿ Why would this cause such a problem??

    Read the article

  • jQuery problem with change event and IE8

    - by Marcus
    There is a bug in jQuery 1.4.2 that makes change event on select-element getting fired twice when using both DOM-event and a jQuery event, and this only on IE7/8. Here is the test code: <html> <head> <script src="http://code.jquery.com/jquery-1.4.2.js" type="text/javascript"></script> <script type="text/javascript"> jQuery(document).ready(function() { jQuery(".myDropDown").change(function() { }); }); </script> </head> <body> <select class="myDropDown" onchange="alert('hello');"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select> </body> </html> Ticket to actual bug: http://dev.jquery.com/ticket/6593 This causes alot of trouble for us in our application cause we use both ASP.NET-events mixed with jQuery and once you hook up a change event on any element every select (dropdown) gets this double firing problem. Is there anyone who knows a way around this in the meantime until this issue is fixed?

    Read the article

  • What's the proper response to WM_ENDSESSION with ENDSESSION_CLOSEAPP and wParam == FALSE?

    - by Marcus Lindblom
    According to the WM_ENDESSION docs, when lParam is ENDSESSION_CLOSEAPP and wParam is FALSE, "the application should not shut down". So, should I just ignore that and use the default response? What is it's purpose? (I'm listening to Windows events/messages in Qt (C++) to shutdown some launched processes, but that's just the context and shouldn't have any bearing here...)

    Read the article

  • JAXB - representing element as boolean?

    - by Marcus
    We have this XML: <Summary> <ValueA>xxx</ValueA> <ValueB/> </Summary> <ValueB/> will never have any attributes or inner elements. It's a boolean type element - it exists (true) or it doesn't (false). JAXB generated a Summary class with a String valueA member, which is good. But for ValueB, JAXB generated a ValueB inner class and a corresponding member: @XmlElement(name = "ValueB") protected Summary.ValueB valueB; But what I'd like is a boolean member and no inner class: @XmlElement(name = "ValueB") protected boolean valueB; How can you do this? I'm not looking to regenerate the classes, I'd like to just make the code change manually.

    Read the article

  • Subsonic SQLite Multiple Files

    - by Marcus Vinicius de LIma
    Hi, I have an application that must be accessed for many users. To optimize the performance I intend to store each user profile information at a independant database file. I need everytime a user login the application, to setup a new provider linked with his own database. All databases have the same structure. So while querying user the commom generated DAL classes must switch for the database file relative the the user. Is there a way for configure SubSonic for doing that switch at runtime? Thanks.

    Read the article

  • hg command to see the changeset prior to an hg fetch

    - by Marcus
    What mercurial command can you use to see the changeset prior to changeset xyz? If you do hg log -r :xyz you see all the changesets prior to (and including) xyz - listed in ascending order. But I'd like to easily see just the prior changeset. Update: Really what I'm after is: If I do an hg fetch, what command can I use to see the changeset PRIOR to the the changesets that were pulled in by the fetch? hg log -r :xyz where xyz is the first changeset pulled in by the fetch works but it returns the entire list of prior changesets where I just want the most recent.

    Read the article

  • Bloomberg APIv3 returning Slow Consumer Warnings!

    - by Marcus
    I made a program in c# based on the example "SubscriptionWithEventHandlerExample" of API 3.2.9.0. After subscribing to about 500 securities for realtime data, I receive some ADMIN event warnings claiming SlowConsumerWarning and SlowConsumerWarningCleared. I read somewhere that it introduces some delay, until I process all events. The problem is that in my code I only receive callbacks from bloomberg. The event queue isn´t even in my program! Some things that I tried: 1) raise the queue limit, setting MaxEventQueueSize in the session options (seems to have no effect) 2) see if I get any timeout event (no, I don't get any) 3) create multiple sessions and subscribing 50 securities in each (now I get multiple warnings, one for each thread) Is there something that I can do or this behavior is out of my scope?

    Read the article

  • Autowiring collections with IoC

    - by Marcus
    Hi, Anyone know if there exists any IoC container that can handle this: Given: ISomeInterfce<T> where T : Entity Impl1 : ISomeInterfce<Entity1> Impl2 : ISomeInterfce<Entity1> Impl3 : ISomeInterfce<Entity2> Impl4 : ISomeInterfce<Entity2> I want to be able to auto wire my system and be able to resolve like this IoC.ResolveAll(typeof(ISomeInterfce<Entity1>)) and get a collection back of all implementations of ISomeInterfce<Entity1>

    Read the article

  • Hackers as CS Majors - Easy?

    - by Marcus Pink
    Just curious. For those of you who had extensive experience programming before school (or who got really, really good at programming during school) did you're CS classes became very easy? Almost like trivial side work?

    Read the article

  • Screenshot of the Nexus One from adb?

    - by Marcus
    My goal is to be able to type a one word command and get a screenshot from a rooted Nexus One attached by USB. So far, I can get the framebuffer which I believe is a 32bit xRGB888 raw image by pulling it like this: adb pull /dev/graphics/fb0 fb0 From there though, I'm having a hard time getting it converted to a png. I'm trying with ffmpeg like this: ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgb8888 -s 480x800 -i fb0 -f image2 -vcodec png image.png That creates a lovely purple image that has parts that vaguely resemble the screen, but it's by no means a clean screenshot.

    Read the article

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