Search Results

Search found 850 results on 34 pages for 'jim bonner'.

Page 22/34 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • xerces serialization in Java 6

    - by Jim Garrison
    In Java 6, the entire xerces XML parser/serializer implementation is now in the Java runtime (rt.jar). The packages have been moved under the com.sun.* namespace, which places them off-limits for explicit reference within client code. This is not a problem when using the parser, which is instantiated via javax API-defined factories. However, our code also uses xerces serialization (org.apache.xml.serialize.* ). AFAICT, there are no javax.xml API-defined factories for creating instances of Serializer and OutputFormat. This seems to imply that the only way to get one is to explicitly call the com.sun.org.apache.xml.serialize.* APIs. I've found the serialization classes in javax.xml.stream, but they don't seem to provide any output-formatting control like the xerces OutputFormat class. Question: Is there a way to access the xerces serialization functionality (which is in rt.jar) via a javax standard API, without including xerces.jar and also without explicitly instantiating com.sun.* classes? If not, is there an javax API-compliant way to achieve the same effect?

    Read the article

  • MX Records - go to two servers?

    - by Jim Beam
    Right now I have a single mail server for IMAP. Let's say I want to introduce Exchange but not all users will be on it. Some users will be on my "legacy" IMAP, others on the "new" Exchange. Is it possible to "split up" your users (from the same e-mail domain) on two services like this? What would the MX records look like? My guess is that this isn't possible, but thought I'd ask. By the way, I realize that Exchange can offer IMAP and all that, but my question is more about splitting users across services and the MX records. The actual protocols above are only examples.

    Read the article

  • inline divs with hidden overflow

    - by Jim
    I want to create 3 divs side by side when only one of them is visible. -------------- -------------- -------------- | visible | | invisible | | invisible | | | | | | | -------------- -------------- -------------- In order to do this I have tried to create a wrapping div with a 100px width, and hidden overflow. What am I doing wrong? <div style="width:50px;height:349px; overflow:hidden"> <div style="display: inline;">first div</div> <div style="display: inline;">second div</div> <div style="display: inline;">third div</div> </div>

    Read the article

  • Ninject problem binding to constant value in MVC3 with a RavenDB session

    - by Jim
    I've seen a lot of different ways of configuring Ninject with ASP.NET MVC, but the implementation seems to change slightly with each release of the MVC framework. I'm trying to inject a RavenDB session into my repository. Here is what I have that's almost working. public class MvcApplication : NinjectHttpApplication { ... protected override void OnApplicationStarted() { base.OnApplicationStarted(); AreaRegistration.RegisterAllAreas(); RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes); } protected override IKernel CreateKernel() { return new StandardKernel(new MyNinjectModule()); } public static IDocumentSession CurrentSession { get { return (IDocumentSession)HttpContext.Current.Items[RavenSessionKey]; } } ... } public class MyNinjectModule : NinjectModule { public override void Load() { Bind<IUserRepository>().To<UserRepository>(); Bind<IDocumentSession>().ToConstant(MvcApplication.CurrentSession); } } When it tries to resolve IDocumentSession, I get the following error. Error activating IDocumentSession using binding from IDocumentSession to constant value Provider returned null. Activation path: 3) Injection of dependency IDocumentSession into parameter documentSession of constructor of type UserRepository Any ideas on how to make the IDocumentSession resolve?

    Read the article

  • How do I unit test controllers for an asp.net mvc site that uses StructureMap and NHibernate?

    - by Jim Geurts
    I have an asp.net mvc2 application that is using StructureMap 2.6 and NHibernate 3.x. I would like to add unit tests to the application but am sort of at a loss for how to accomplish it. Say I have a basic controller called Posts that has an action called Index. The controller looks something like: public class PostsController : Controller { private readonly IPostService _postService; public PostsController(IPostService postService) { _postService = postService; } public ActionResult Index() { return View(_postService.QueryOver<Post>().Future()); } } If I wanted to create an nunit test that would verify that the index action is returning all of the posts, how do I go about that? If mocking is recommended, do you just assume that interaction with the database will work? Sorry for asking such a broad question, but my web searches haven't turned up anything decent for how to unit test asp.net mvc actions that use StructureMap (or any other IOC) and NHibernate. btw, if you don't like that I return a QueryOver object from my post service, pretend it is an IQueryable object. I'm using it essentially in the same way.

    Read the article

  • Is it Possible to show a previously hidden JFrame using a keylistener

    - by JIM
    here is my code, i basically just did a tester for the most common listeners, which i might later use in future projects, the main problem is in the keylistener at the bottom, i am trying to re-show the frame but i think it just cant be done that way, please help ps: no idea why the imports dont show up right. package newpackage; import java.awt.Color; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JTextField; import javax.swing.JSeparator; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import javax.swing.JTextArea; import javax.swing.SwingUtilities; import javax.swing.UIManager; public class NewClass1 extends JFrame { private JLabel item1,infomouse,infoclicks,infoKeys,writehere; private JButton button1,button2,button3; private JTextArea text1,status,KeyStatus; private JTextField text2,text3,mouse,clicks,test; private JSeparator sep1; private int clicknumber; public NewClass1() { super("Listener Tests"); setLayout(null); sep1 = new JSeparator(); button1 = new JButton("Button1"); button2 = new JButton("Button2"); button3 = new JButton("Button3"); item1 = new JLabel("Button Status :"); infomouse = new JLabel("Mouse Status :"); infoclicks = new JLabel("Nº of clicks :"); infoKeys = new JLabel("Keyboard status:"); writehere = new JLabel("Write here: "); text1 = new JTextArea(); text2 = new JTextField(20); text3 = new JTextField(20); status = new JTextArea(); mouse = new JTextField(20); clicks = new JTextField(4); KeyStatus = new JTextArea(); test = new JTextField(3); clicks.setText(String.valueOf(clicknumber)); text1.setEditable(true); text2.setEditable(false); text3.setEditable(false); status.setEditable(false); mouse.setEditable(false); clicks.setEditable(false); KeyStatus.setEditable(false); text1.setBounds(135, 310, 150, 20); text2.setBounds(135, 330, 150, 20); text3.setBounds(135, 350, 150, 20); status.setBounds(15, 20, 240, 20); infomouse.setBounds(5,45,120,20); infoKeys.setBounds(5,90,120,20); KeyStatus.setBounds(15,115,240,85); test.setBounds(15,225,240,20); mouse.setBounds(15,70,100,20); infoclicks.setBounds(195, 45, 140, 20); clicks.setBounds(195, 70, 60, 20); item1.setBounds(5, 0, 120, 20); button1.setBounds(10, 310, 115, 20); button2.setBounds(10, 330, 115, 20); button3.setBounds(10, 350, 115, 20); sep1.setBounds(5, 305, 285, 10); sep1.setBackground(Color.BLACK); status.setBackground(Color.LIGHT_GRAY); button1.addActionListener(new button1list()); button2.addActionListener(new button1list()); button3.addActionListener(new button1list()); button1.addMouseListener(new MouseList()); button2.addMouseListener(new MouseList()); button3.addMouseListener(new MouseList()); getContentPane().addMouseListener(new MouseList()); test.addKeyListener(new KeyList()); this.addKeyListener(new KeyList()); test.requestFocus(); add(item1); add(button1); add(button2); add(button3); add(text1); add(text2); add(text3); add(status); add(infomouse); add(mouse); add(infoclicks); add(clicks); add(infoKeys); add(KeyStatus); add(test); add(sep1); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); try{ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); }catch (Exception e){System.out.println("Error");} SwingUtilities.updateComponentTreeUI(this); setSize(300, 400); setResizable(false); setVisible(true); test.setFocusable(true); test.setFocusTraversalKeysEnabled(false); setLocationRelativeTo(null); } public class button1list implements ActionListener { public void actionPerformed(ActionEvent e) { String buttonpressed = e.getActionCommand(); if (buttonpressed.equals("Button1")) { text1.setText("just"); } else if (buttonpressed.equals("Button2")) { text2.setText(text2.getText()+"testing "); } else if (buttonpressed.equals("Button3")) { text3.setText("this"); } } } public class MouseList implements MouseListener{ public void mouseEntered(MouseEvent e){ if(e.getSource()==button1){ status.setText("button 1 hovered"); } else if(e.getSource()==button2){ status.setText("button 2 hovered"); } else if(e.getSource()==button3){ status.setText("button 3 hovered"); } } public void mouseExited(MouseEvent e){ status.setText(""); } public void mouseReleased(MouseEvent e){ if(!status.getText().equals("")){ status.replaceRange("", 0, 22); } } public void mousePressed(MouseEvent e){ if(e.getSource()==button1){ status.setText("button 1 being pressed"); } else if(e.getSource()==button2){ status.setText("button 2 being pressed"); } else if(e.getSource()==button3){ status.setText("button 3 being pressed"); } } public void mouseClicked(MouseEvent e){ clicknumber++; mouse.setText("mouse working"); clicks.setText(String.valueOf(clicknumber)); } } public class KeyList implements KeyListener{ public void keyReleased(KeyEvent e){} public void keyPressed(KeyEvent e){ KeyStatus.setText(""); test.setText(""); String full = e.paramString(); String [] temp = null; temp = full.split(","); for(int i=0; i<7 ;i++){ KeyStatus.append(temp[i] + "\n"); } if(e.getKeyChar()=='h'){setVisible(false); test.requestFocus(); } if(e.getKeyChar()=='s'){setVisible(true);} } public void keyTyped(KeyEvent e){} } }

    Read the article

  • Excel document incorrect format

    - by Jim
    I have a macro enabled work book and i change the name of the .xlsm file to [FileName].xlsm.zip and then i unzip i get some folders I then put these extracted folders in to another folder and zip it back and rechange the extension to the previous xlsm format i now try and open but i get an unreadable error. I am not changing any content here just extracting and zip it back. What could be the problem?

    Read the article

  • Error: The Side-by-Side configuration information in "BLAH.EXE" contains errors.

    - by Jim Buck
    This is the error Dependency Walker gives me on an executable that I am building with VC++ 2005 Express Edition. When trying to run the .exe, I get: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (I am new to the manifest/SxS/etc. way of doing things post VC++ 2003.) EDIT: I am running on the same machine I am building the .exe with. In Event Viewer, I have the unhelpful: Faulting application blah.exe, version 0.0.0.0, faulting module blah.exe, version 0.0.0.0, fault address 0x004239b0.

    Read the article

  • Python os.path.join

    - by Jim
    Hello, I am trying to learn python and am making a program that will output a script. I want to use os.path.join but am pretty confused (I know I am very bad at scripting/programming) See, according to the docs ( http://docs.python.org/library/os.path.html ) if I say os.path.join('c:', 'sourcedir') I get C:sourcedir as it's output. According to the docs, this is normal (right?) But when I use the copytree command, Python will output it the desired way, for example import shutil src = os.path.join('c:', 'src') dst = os.path.join('c':', 'dst') shutil.copytree(src, dst) Here is the error code I get WindowsError: [Error 3] The system cannot find the path specified: 'C:src/.' If I wrap the os.path.join with os.path.normpath I get the same error If this os.path.join can't be used this way, then I am confused as to its purpose According to the pages suggested by Stack Overflow, slashes should not be used in join--that is correct I assume? Thanks guys(girls) for your help

    Read the article

  • C# Application Becomes Slow and Unresponsive as String in Multiline Textbox Grows

    - by Jim Fell
    Hello. I have a C# application in which a LOT of information is being added to a Textbox for display to the user. Upon processing of the data, almost immediately, the application becomes very slow and unresponsive. This is how I am currently attempting to handle this: var saLines = textBox1.Lines; var saNewLines = saLines.Skip(50); textBox1.Lines = saNewLines.ToArray(); This code is run from a timer every 100mS. Is there a better way to handle this? I am using Microsoft Visual C# 2008 Express Edition. Thanks.

    Read the article

  • fileinfo and mime types I've never heard of

    - by Jim
    I'm not a stranger to mime types but this is strange. Normally, a text file would have been considered to be of text/plain mime but now, after implementing fileinfo, this type of file is now considered to be "text/x-pascal". I'm a little concerned because I need to be sure that I get the correct mime types set before allowing users to upload with it. Is there a cheat sheet that will give me all of the "common" mimes as they are interpreted by fileinfo? Sinan provided a link that lists all of the more common mimes. If you look at this list, you will see that a .txt file is of text/plain mime but in my case, a plain-jane text file is interpreted as text/pascal.

    Read the article

  • Auto-Complete Suggestions in Source Code Editor

    - by Jim
    Hello, Most IDEs (Eclipse, Netbeans, Intelij) provide contextually smart suggestions about the current statement you're writing. We would like to do the same thing (In Java for Java). We considered tokenizing the input and building our own abstract syntax trees, but quickly realized that could be a month long project in and of its self. We also started digging through the source code for the above mentioned IDEs, but it appears (correct me if I'm wrong) that the auto-complete code is pretty tightly woven with the rest of the IDE. We're wondering if anyone knows of a relatively isolated package that we could pull into our project to provide this auto-complete functionality. Thanks!

    Read the article

  • How to think in data stores instead of databases?

    - by Jim
    As an example, Google App Engine uses data stores, not a database, to store data. Does anybody have any tips for using data stores instead of databases? It seems I've trained my mind to think 100% in object relationships that map directly to table structures, and now it's hard to see anything differently. I can understand some of the benefits of data stores (e.g. performance and the ability to distribute data), but some good database functionality is sacrificed (e.g. joins). Does anybody who has worked with data stores like BigTable have any good advice to working with them?

    Read the article

  • C# and com for vb6

    - by Jim
    Hi all I have an issue with C# and COM. :( [Guid("f7d936ba-d816-48d2-9bfc-c18be6873b4d")] [ComVisible(true)] [ClassInterface(ClassInterfaceType.None)] public class Process : IProcess { public Process() { } public int UpdateBalance(string accountNumber, string adminEventDescription, decimal curAmount) { return 10; } } [ComVisible(true)] [Guid("5c640a0f-0dce-47d4-87df-07cee3b9a1f9")] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IProcess { int UpdateBalance(string accountNumber, string adminEventDescription, decimal curAmount); } And the VB code Private Sub Command1_Click() Dim test As Object Set test = New Forwardslash_PlayerTrackingSystem_Api.Process End Sub I get the following ActiveX component can't create object?

    Read the article

  • SVN Path Based Authorization: Granting listing access but not read access

    - by Jim
    Hello, We're using path-based-authorization module for Apache SVN. It all works fine, except that when users try to check out code they have access to, their SVN clients get confused if they don't have at least read access to the parent directories - all the way up to root. It works, but some clients just get confused sometimes. Because SVN path-based-authorization is recursively applied, we don't want to give all users read access to root, because that would give them access to all source code in the repository. It would, however, be acceptable if users could get directory listings (just not actual lines of code) for the entire repository. This would prevent the svn clients from getting confused. Does any one know how to grant permissions to get directory listings without granting permissions to the actual contents of the files? Thanks!

    Read the article

  • Creating BlackBerry method stubs using wscompile on WSDL from ColdFusion

    - by Jim B
    I have been working on a BlackBerry application that consumes web services from ColdFusion 7. The Java ME SDK and the Java Wireless Toolkit both require that the generated WSDL be of the document/literal type. Fortunately, I have input on the web service development so I tried setting 'style="document"' in the cfcomponent tag. This generated a document/literal style WSDL but now wscompile generates the following errors in several places: Found unknown simple type: javax.xml.soap.SOAPElement Found unknown simple type: java.util.Calendar Any ideas why this is happening? The WSDL does get parsed correctly by the JWSDP tool but the stubs use namespaces that are not available in the J2ME platform. I would have thought ColdFusion WSDL would work more easily with other products in the Java family.

    Read the article

  • Stacking two pictures with captions side by side and centered in Wordpress

    - by Jim
    Hi all - this is driving me absolutely nuts. I'm not the most experienced with CSS, so I'm hoping it is something simple. I'm running Wordpress 2.9.2 with "The Morning After" theme. I am trying to write a post where I want to display two small pictures, with captions, side-by-side and centered in the middle of the page. Here is the HTML code I am using to display the images: [caption align="alignnone" width="150" caption="Protein rest"] <a href="http://www.mysite.com/wp-content/uploads/2008/06/protein-rest.jpg"> <img title="Mash during protein rest" src="http://www.mysite.com/wp-content/uploads/2008/06/protein-rest-150x144.jpg" alt="Mash during protein rest" width="150" height="144" /> </a>[/caption] [caption align="alignnone" width="143" caption="Saccharification rest" captionalign="center"] <a href="http://www.mysite.com/wp-content/uploads/2008/06/saccharification-rest.jpg"> <img title="Mash during saccharification rest" src="http://www.mysite.com/wp-content/uploads/2008/06/saccharification-rest-143x150.jpg" alt="Mash during saccharification rest" width="143" height="150" /> </a>[/caption] I tried using "aligncenter" and "alignleft" for the caption align - if I use "alignleft" the pictures are lined up perfectly, but all the way to the left of the page. If I use "aligncenter" the pics are in the center, but stacked one on top of the other. My first thought was to wrap the images in a div using: <div style="text-align:center;">image code</div> but that doesn't work. Now, if I wrap in a centered div like that and omit the [caption] tags, it works, but I need the captions. Those caption tags are translated by Wordpress into it's own div of class wp-caption. I've also tried wrapping each separate image in its own div within a parent centered div wrapper. Here is the pertinent parts of the style.css - please let me know if you need any other info, and if you can help me, I will postpone jumping off the nearest bridge! Thanks!! Style.css: .aligncenter, div.aligncenter { display: block; margin: 14px auto; } .alignleft { float: left; margin: 0 14px 10px 0; } .alignright { float: right; margin: 0 0 10px 14px; } .wp-caption { border: 1px solid #ddd; text-align: center; background-color: #f3f3f3; padding-top: 4px; /* optional rounded corners for browsers that support it */ -moz-border-radius: 3px; -khtml-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } .wp-caption img { margin: 0; padding: 0; border: 0 none; } .wp-caption p.wp-caption-text { font-size: 11px; line-height: 14px; padding: 5px 4px 5px 5px; margin: 0; } PS - I am aware of the Gallery feature available in Wordpress, but would like to avoid it and would love to understand why wrapping in a div doesn't move the whole kit to the center. Finally, just for the sake of completeness, here is the source of the page when loaded using the div wrapper and image code as above (so you can see how Wordpress translates the caption tags): <div style="text-align:center;"> <div class="wp-caption alignnone" style="width: 160px"> <a href="http://www.mysite.com/wp-content/uploads/2008/06/protein-rest.jpg"> <img title="Mash during protein rest" src="http://www.mysite.com/wp-content/uploads/2008/06/protein-rest-150x144.jpg" alt="Mash during protein rest" width="150" height="144" /> </a> <p class="wp-caption-text" style="text-align:center">Protein rest</p> </div> <div class="wp-caption alignnone" style="width: 153px"> <a href="http://www.mysite.com/wp-content/uploads/2008/06/saccharification-rest.jpg"> <img title="Mash during saccharification rest" src="http://www.mysite.com/wp-content/uploads/2008/06/saccharification-rest-143x150.jpg" alt="Mash during saccharification rest" width="143" height="150" /> </a> <p class="wp-caption-text" style="text-align:center">Saccharification rest</p> </div> </div>

    Read the article

  • Grouping php array items based on user and created time

    - by Jim
    This is an array of objects showing a user uploading photos: Array ( [12] => stdClass Object ( [type] => photo [created] => 2010-05-14 23:36:41 [user] => stdClass Object ( [id] => 760 [username] => mrsmith ) [photo] => stdClass Object ( [id] => 4181 ) ) [44] => stdClass Object ( [type] => photo [created] => 2010-05-14 23:37:15 [user] => stdClass Object ( [id] => 760 [username] => mrsmith ) [photo] => stdClass Object ( [id] => 4180 ) ) ) However instead of showing: mr smith uploaded one photo mr smith uploaded one photo I'd like to display: mr smith uploaded two photos by grouping similar items, grouping by user ID and them having added them within, let's say 15 minutes of each other. So I'd like to get the array in this sort of shape: Array ( [12] => stdClass Object ( [type] => photo [created] => 2010-05-14 23:36:41 [user] => stdClass Object ( [id] => 760 [username] => mrsmith ) [photos] => Array ( [0] => stdClass Object ( [id] => 4181 ) [1] => stdClass Object ( [id] => 4180 ) ) ) ) preserving the first item of the group and it's created time, and supplementing it with any other groupable photos and then unsetting any items that were grouped (so the final array doesn't have key 44 anymore as it was grouped in with 12). The array contains other actions than just photos, hence the original keys of 12 and 44. I just can't figure out a way to do this efficiently. I used to use MySQL and PHP to do this but am trying to just use pure PHP for caching reasons. Can anyone shed any insights? I thought about going through each item and seeing if I can group it with the previous one in the array but the previous one might not necessarily be relevant or even a photo. I've got total brain freeze :(

    Read the article

  • Can't run rails server as daemon

    - by Jim
    I'm using rails 2.3.2 and when I run script/server -d, the only output I get is = Booting Mongrel = Rails 2.3.2 application starting on http://0.0.0.0:3000 which is fine. But when I check for anything running on port 3000, i get nothing. Any ideas?

    Read the article

  • ClassLoader exceptions being memoized

    - by Jim
    Hello, I am writing a classloader for a long-running server instance. If a user has not yet uploaded a class definition, I through a ClassNotFoundException; seems reasonable. The problem is this: There are three classes (C1, C2, and C3). C1 depends on C2, C2 depends on C3. C1 and C2 are resolvable, C3 isn't (yet). C1 is loaded. C1 subsequently performs an action that requires C2, so C2 is loaded. C2 subsequently performs an action that requires C3, so the classloader attempts to load C3, but can't resolve it, and an exception is thrown. Now C3 is added to the classpath, and the process is restarted (starting from the originally-loaded C1). The issue is, C2 seems to remember that C3 couldn't be loaded, and doesn't bother asking the classloader to find the class... it just re-throws the memoized exception. Clearly I can't reload C1 or C2 because other classes may have linked to them (as C1 has already linked to C2). I tried throwing different types of errors, hoping the class might not memoize them. Unfortunately, no such luck. Is there a way to prevent the loaded class from binding to the exception? That is, I want the classloader to be allowed to keep trying if it didn't succeed the first time. Thanks!

    Read the article

  • Calculating ComboBox DropDownWidth in C#

    - by Jim Fell
    In my application a ComboBox gets resized, so that it is smaller. How do I re-calculate the DropDownWidth property? I know how to set it, but I'd prefer to calculate the proper width because its contents changes. Preferabley, I was thinking of something along these lines: int iMaxLen = 0; foreach item in comboBoxList { iMaxLen = (item.Length > iMaxLen) ? item.Length : iMaxLen; } comboBoxList.DropDownWidth = iMaxLen; Thanks.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >