Daily Archives

Articles indexed Thursday April 29 2010

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

  • JEditorPanes, Preferred Size, and printing HTML

    - by Ryan Elkins
    I'm trying to print some HTML directly, without displaying anything to the user. It works currently (somewhat) using a custom JEditorPane that implements Printable. The problem I'm having is that it always wants to use a preferred size of 582px x 560px. If I manually change the size using something like setSize(x,y) it will change the size of the pane, put the content renders at preferred size, not actual size (so it's still 582x560). I can scale it up to fit the page, but it's basically just an enlarged version where the images are all pixelated and the layout is wrong (based on the smaller window size). Inside the print method of my Printable JEditorPane I used this to try and get the size: javax.swing.JWindow wnd = new javax.swing.JWindow(); wnd.setContentPane(this); wnd.setSize(1024,1584); wnd.pack(); Dimension d = wnd.getPreferredSize(); With or without that setSize and/or pack methods on the JWindow the preferred size always comes back as 582x560. I do have control over the html that I'm trying to print but I'd rather not have to rewrite all of that to scale it down so it will print correctly at full size (when scaled up).

    Read the article

  • Mootools in Rails

    - by trobrock
    For my client side development I use MooTools primarily, I have also just recently started learning rails. What is the best method of using Mootools in rails pages? Just adding my code inline like I would any other server side language? Or is there a better and cleaner way to do things? Basically I'm asking the most conventional way of integrating Mootools into my rails application.

    Read the article

  • Using openrowset to read an Excel file into a temp table; how do I reference that table?

    - by mattstuehler
    I'm trying to write a stored procedure that will read an Excel file into a temp table, then massage some of the data in that table, then insert selected rows from that table into a permanent table. So, it starts like this: SET @SQL = "select * into #mytemptable FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database="+@file+";HDR=YES', 'SELECT * FROM [Sheet1$]')" EXEC (@SQL) That much seems to work. However, if I then try something like this: Select * from #mytemptable I get an error: Invalid object name '#mytemptable' Why isn't #mytemptable recognized? Is there a way to have #mytemptable accessible to the rest of the stored procedure? Many thanks in advance!

    Read the article

  • Is it possible to mimic IQueryable with NHibernate?

    - by George
    Is it possible to mimic IQueryable with NHibernate? I was looking at Nhibernate docs and for what i could tell, it always returns a List of objects, that have it's attributes indexed by a integer. Ok, perfect, that works. But is there a way to retrieve objects like LINQ? With something like IQueryable? Thanks

    Read the article

  • Reference platform specific System.Data.SQLite

    - by Dmitriy Nagirnyak
    I am using SQLite for the unit testing and might use it as a database for local development/staging. The System.Data.SQLite has basically 2 versions: x86 and x64. Correct one should be used for the specific platform. I have 64 bit Win7, other guys in the team might use 32-bit OSs. The server's platform is not known at this stage. If I use 32-bit version of the assembly on 64-bit platform I get BadImageFormatException: Could not load file or assembly 'System.Data.SQLite'. I believe similar will happen trying to use 64-bit assembly on 32-bit platform. So my question is what is the best way to reference the SQLite assembly so that it does not depend on the platform and people can just use it? It is ok to use 32-bit version of assembly on a 64-bit platform (Maybe there is a switch for that somewhere?).

    Read the article

  • How to get reference to SqlConnection (or Connection string) in Castle ActiveRecord?

    - by VoimiX
    how can I get reference to current SqlConnection or Sqlconnection in config? I found http://svn.castleproject.org:8080/svn/castle/trunk/ActiveRecord/Castle.ActiveRecord.Tests/DifferentDatabaseScopeTestCase.cs and code private string GetSqlConnection() { IConfigurationSource config = GetConfigSource(); IConfiguration db2 = config.GetConfiguration(typeof(ActiveRecordBase)); string conn = string.Empty; foreach (IConfiguration child in db2.Children) { if (child.Name == "connection.connection_string") { conn = child.Value; } } return conn; } But I cant understand where I can find "GetConfigSource" implementation? Is this standart Castle helper function or not? I use these namespaces using Castle.ActiveRecord; using NHibernate.Criterion; using NHibernate; using Castle.Core.Configuration; using Castle.ActiveRecord.Framework;

    Read the article

  • How create widget with clickable text in QT/PyQt?

    - by serge
    Hi everyone, i'm trying to realize non-editable QTableView with widgets in cells that should contain clickable listed text. With following code i'm setting widget in definite cell: view = QTableView() label = QLabel( <some html text> ) ... view.setIndexWidget(index, label) I used html to make label's text clickable, but links became blue with underline and moreover by clicking on it with right mouse button appears popup menu with "Copy Link Locaion" option, where i wanted to place some hidden information instead of url and of course do not let user see this info. I'm looking for light-weight widget, i thought that insertion of QGraphicsView in each cell will lead to big computer loads, but can't think of any other solution. Can you advice what should i use for this purpose? Thank you in advance Serge

    Read the article

  • Subsonic Simple Repo for high volume site

    - by kjgilla
    Simple Repo has given me a competitive edge in my consulting. I can finish projects much faster than I could in the "cmd.Parameters.Add(param)" days. As things progress on this end im getting into higher volume sites and wondering if Simple Repo is still the way to go. Im wondering what people's experiences have been putting SR into production vs. NHibernate. Any tips or tricks for using SR in production.

    Read the article

  • Scorched 3D is one hot battle game

    <b>Sourceforge:</b> "Scorched 3D is a modernization of the classic DOS game Scorched Earth. It's a simple turn-based artillery game and a real-time strategy game in which players can counter each other's weapons with creative accessories, shields, and tactics."

    Read the article

  • What is new in Fedora 13 ?

    <b>Linux and Microcontroller Tips:</b> "Automatic Print Driver Installation : gutenprint-packages such as cups, hpijs and pbm2l2030 must be installed on demand when the hardware that require drivers are detected."

    Read the article

  • A Digital Forensics Student's Linux Workspace

    <b>Tech Source:</b> "Our next entry for the "The $100.00 (USD) Coolest Linux Workspace Contest" was sent all the way from the Netherlands by a digital forensics student named Huseyin. He is also working as an intern at an IT-audit company and described Linux as the best OS to do research on."

    Read the article

  • Did Ubuntu 10.04 Achieve Its Ten Second Boot Goal?

    <b>Phoronix:</b> "Canonical expressed their plans to achieve a ten-second boot time in June of last year for Ubuntu 10.04 LTS, with their reference system being a Dell Mini 9 netbook. In February, we last checked on Ubuntu's boot performance and found it close, but not quite there yet..."

    Read the article

  • Microsoft's FUD goes mobile

    <b>The Register:</b> "But why does Microsoft make money from Google's software? Android is based on open source software - and Microsoft has long raised fears that aspects of Linux may infringe on its patents."

    Read the article

  • Google: Numbers favor Android over iPhone

    <b>The Open Road:</b> "And according to Google VP Andy Rubin, the more the search giant blankets the industry with competing Android-droid based mobile handsets, the more likely Google is to hit its expected value of market dominance over Apple's iPhone."

    Read the article

  • Would you dump Facebook?

    <b>Dissociated Press:</b> "I love the concept, hate the execution. I've written about that before. Facebook encourages the kind of bad netiquette it's taken years to drum out of people. "Oh, I like this page and look - it has a 'forward to all my friends' button.""

    Read the article

  • Question: Why switch to Linux or a Mac?

    <b>Sure, It's Secure:</b> "I'm no friend to Windows. I know the operating system too well to trust it. But, I did think that even though Windows is defective by design, you could keep it relatively safe by installing patches quickly and using anti-virus software religiously. I was wrong."

    Read the article

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