Search Results

Search found 941 results on 38 pages for 'marcus west'.

Page 16/38 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • Hibernate advanced select

    - by Marcus
    We want to get a row from a table using Hibernate a la: select max(id) from mytable where date = <date> Then select * from mytable where id = <max_id> We are currently using Hibernate to map mytable to Java domain objects. I know how to load the domain object based on an id. So I could just do #1 using JDBC and then load the domain object using Hibernate the "normal" way. But.. is there a way to do this with one single Hibernate logical query?

    Read the article

  • Java Unicode encoding

    - by Marcus
    A Java char is 2 bytes (max size of 65,536) but there are 95,221 Unicode characters. Does this mean that you can't handle certain Unicode characters in a Java application? Does this boil down to what character encoding you are using?

    Read the article

  • Sync Services With AddressBook

    - by Marcus
    Hi, I've developed an application to sync the Mac address book with another application. I was using an NSNotification (kABDatabaseChangedExternallyNotification) which are sent every time the address book is edited to do the syncing. However I found that if I 'overloaded' the address book (by adding 20 records really quickly or something) I didn't get all of the notifications. I have since found the Sync Services framework which seems to be aimed at my kind of application and it seems to work fine. The problem is that the changes are not 'pushed' to me in the same was as an NSNotification - I have to sync every 5 minutes or so. And, from what I can understand, I shouldn't use the AddressBook API directly but push changes back through sync services. This means that changes are not instant but lagged by how often address book/my app syncs. Is there any way to make it instant? or to use the NSNotifications reliably? Thanks for your time, Marc

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >