Search Results

Search found 1077 results on 44 pages for 'bill osuch'.

Page 18/44 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • What's a good Java API for creating Word documents?

    - by Bill James
    I have a new app I'll be working on where I have to generate a Word document that contains tables, graphs, a table of contents and text. What's a good API to use for this? How sure are you that it supports graphs, ToCs, and tables? What are some hidden gotcha's in using them? Some clarifications: I can't output a PDF, they want a Word doc. They're using MS Word 2003 (or 2007), not OpenOffice Application is running on *nix app-server It'd be nice if I could start with a template doc and just fill in some spaces with tables, graphs, etc. Thanks for the help. Edit: Several good answers below, each with their own faults as far as my current situation. Hard to pick a "final answer" from them. Think I'll leave it open, and hope for better solutions to be created. Edit: The OpenOffice UNO project does seem to be closest to what I asked for. While POI is certainly more mainstream, it's too immature for what I want.

    Read the article

  • JQuery iterating through textboxes and changing its color

    - by bill-nielsen
    I'm trying to iterate through all the empty textboxes in a table and change its background colour. I'm using the following JQuery code: $("#btn2").click(function() { var emptyTextBoxes = $('input:text').filter(function() { return this.value == ""; }); emptyTextBoxes.each(function() { this.css('background-color', '#ffff00'); // $('#Col3Txtbx').css('background-color', '#ffff00'); }); }); This does not seem to refer to the textbox which seems strange to me. When I uncomment out the particular textbox, it does reset the background colour. Can someone explain to me what 'This' is referring to?

    Read the article

  • How do laziness and I/O work together in Haskell?

    - by Bill
    I'm trying to get a deeper understanding of laziness in Haskell. I was imagining the following snippet today: data Image = Image { name :: String, pixels :: String } image :: String -> IO Image image path = Image path <$> readFile path The appeal here is that I could simply create an Image instance and pass it around; if I need the image data it would be read lazily - if not, the time and memory cost of reading the file would be avoided: main = do image <- image "file" putStrLn $ length $ pixels image But is that how it actually works? How is laziness compatible with IO? Will readFile be called regardless of whether I access pixels image or will the runtime leave that thunk unevaluated if I never refer to it? If the image is indeed read lazily, then isn't it possible I/O actions could occur out of order? For example, what if immediately after calling image I delete the file? Now the putStrLn call will find nothing when it tries to read.

    Read the article

  • Help with Role Based Security.

    - by Bill K
    Hello, I'm trying to understand role based security and I have the following method: [PrincipalPermission(SecurityAction.Demand, Role = "Administrators")] static void Test() { //administratos only can call this code } What I wanna do is that only users that are members of the Windows Administrators group can call this code, however, if I do the following, it works: GenericIdentity genericIdentity = new GenericIdentity("test", "test"); GenericPrincipal genericPrincipal = new GenericPrincipal(genericIdentity, new string[] { "Administrators" }); AppDomain.CurrentDomain.SetThreadPrincipal(genericPrincipal); Test(); So, how can I make it work only if the user is in the Administrators windows group? thanks!

    Read the article

  • Processing RSS/RDF via xml.dom.minidom

    - by Bill
    I'm trying to process a delicious rss feed via python. Here's a sample: ... <item rdf:about="http://weblist.me/"> <title>WebList - The Place To Find The Best List On The Web</title> <dc:date>2009-12-24T17:46:14Z</dc:date> <link>http://weblist.me/</link> ... </item> <item rdf:about="http://thumboo.com/"> <title>Thumboo! Free Website Thumbnails and PHP Script to Generate Web Screenshots</title> <dc:date>2006-10-24T18:11:32Z</dc:date> <link>http://thumboo.com/</link> ... The relevant code is: def getText(nodelist): rc = "" for node in nodelist: if node.nodeType == node.TEXT_NODE: rc = rc + node.data return rc dom = xml.dom.minidom.parse(file) items = dom.getElementsByTagName("item") for i in items: title = i.getElementsByTagName("title") print getText(title) I would think this would print out each title, but instead I get basically get blank output. I'm sure I'm doing something stupid wrong, but no idea what?

    Read the article

  • Monads and custom traversal functions in Haskell

    - by Bill
    Given the following simple BST definition: data Tree x = Empty | Leaf x | Node x (Tree x) (Tree x) deriving (Show, Eq) inOrder :: Tree x -> [x] inOrder Empty = [] inOrder (Leaf x) = [x] inOrder (Node root left right) = inOrder left ++ [root] ++ inOrder right I'd like to write an in-order function that can have side effects. I achieved that with: inOrderM :: (Show x, Monad m) => (x -> m a) -> Tree x -> m () inOrderM f (Empty) = return () inOrderM f (Leaf y) = f y >> return () inOrderM f (Node root left right) = inOrderM f left >> f root >> inOrderM f right -- print tree in order to stdout inOrderM print tree This works fine, but it seems repetitive - the same logic is already present in inOrder and my experience with Haskell leads me to believe that I'm probably doing something wrong if I'm writing a similar thing twice. Is there any way that I can write a single function inOrder that can take either pure or monadic functions?

    Read the article

  • Very long strings as primary keys in a database for caching

    - by Bill Zimmerman
    Hi, I am working on a web app that allows users to create dynamic PDF files based on what they enter into a form (it is not very structured data). The idea is that User 1 enters several words (arbitrary # of words, practically capped of course), for example: A B C D E There is no such string in the database, so I was thinking: Store this string as a primary key in a MySQL database (it could be maybe around 50-100k of text, but usually probably less than 200 words) Generate the PDF file, and create a link to it in the database When the next user requests A B C D E, then I can just serve the file instead of recreating it each time. (simple cache) The PDF is cpu intensive to generate, so I am trying to cache as much as I can... My questions are: Does anyone have any alternative ideas to my approach What will the database performance be like? Is there a better way to design the schema than using the input string as the primary key?

    Read the article

  • Debugging runtime error "Terminating app due to uncaught exception 'NSInternalInconsistencyException

    - by Bill
    I'm going through the Beginning iPhone Development book & stuck in chapter 9. I've spent a few hours trying to debug this error w/o avail: 2010-05-01 19:27:51.361 Nav2[4113:20b] *** Assertion failure in -[UITableView _createPreparedCellForGlobalRow:withIndexPath:], /SourceCache/UIKit/UIKit-984.38/UITableView.m:4709 2010-05-01 19:27:51.362 Nav2[4113:20b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:' 2010-05-01 19:27:51.364 Nav2[4113:20b] Stack: ( ... ) I'm not looking for help w/ the book, but tips for how to debug this error? Can I pin down which of my cellForRowAtIndexPath methods is the problem? And how to inspect the type? Or other things should I look at?

    Read the article

  • In SQL, what's the difference between count(column) and count(*)?

    - by Bill the Lizard
    I have the following query: select column_name, count(column_name) from table group by column_name having count(column_name) > 1; What would be the difference if I replaced all calls to count(column_name) to count(*)? This question was inspired by a previous one. Edit: To clarify the accepted answer (and maybe my question), using count(*) in this case returns an extra row in the result that contains a null and the count of null values in the column.

    Read the article

  • jQuery UI datepicker will not display - full code included

    - by Bill Brasky
    I am having trouble displaying the jQuery datepicker as shown here: http://jqueryui.com/demos/datepicker/ I believe I downloaded all of the proper files, but to be certain, I started from scratch and ripped the demo site. Not all of it, but what I believed to be the important parts. The result is no datepicker to be shown and no javascript errors. Here is my full code sample: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" href="http://static.jquery.com/ui/css/base2.css" type="text/css" media="all" /> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/base/jquery-ui.css" type="text/css" media="all" /> <link rel="stylesheet" href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css" type="text/css" media="all" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> <script type="text/javascript" charset="utf-8" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script> <script type="text/javascript" charset="utf-8"> jQuery(function(){ jQuery("#datepicker").datepicker(); }); </script> </head> <body> <input type="text" id="datepicker" class="hasDatepicker" /> </body> </html> Any help would be very much appreciated. Thanks!

    Read the article

  • What needs checking in for a Grails app?

    - by Bill James
    What parts of a Grails application need to be stored in source-control? Some obvious parts that are needed: grails-app directory test directory web-app directory Now we reach questions like: If we use a Grails plug-in (like gldapo), do we need to check in that plugin? Do Grails plugins install in the Grails directory, or your project? I'm not looking to start a religious war about .project, so please ignore that, but are there any "hidden" project files I need to worry about, along with the plugin issues? Converted to a community wiki, as new versions of Grails have changed some of these solutions, especially as regards plugins.

    Read the article

  • Git fatal: remote end hung up

    - by Bill
    So I thought I had finally got everything setup on Windows ... then ran into this issue. Current setup URL: ssh://user@host:port/myapp.git Already run Putty - and can connect using valid .ppk keys through the ~/.ssh/authorized_keys direct. In Git and TortoiseGIT - I set both to use "plink.exe". Putty works fine - no issues - but when I run that URL into bash I get for a git clone (url) fatal: the remote end hung up expectedly In a cygwin bash terminal - running "ssh user@host" - works no probs at all. Anyone suggest anything?

    Read the article

  • How do I write a constant-space length function in Haskell?

    - by Bill
    The canonical implementation of length :: [a] -> Int is: length [] = 0 length (x:xs) = 1 + length xs which is very beautiful but suffers from stack overflow as it uses linear space. The tail-recursive version: length xs = length' xs 0 where length' [] n = n length' (x:xs) n = length xs (n + 1) doesn't suffer from this problem, but I don't understand how this can run in constant space in a lazy language. Isn't the runtime accumulating numerous (n + 1) thunks as it moves through the list? Shouldn't this function Haskell to consume O(n) space and lead to stack overflow? (if it matters, I'm using GHC)

    Read the article

  • How to reference a sql server with a slash (\) in its name?

    - by Bill Paetzke
    Givens: One SQL Server is named: DevServerA Another is named: DevServerB\2K5 Problem: From DevServerA, how can I write a query that references DevServerB\2K5? I tried a sample, dummy query (running it from DevServerA): SELECT TOP 1 * FROM DevServerB\2K5.master.sys.tables And I get the error: Msg 102, Level 15, State 1, Line 2 Incorrect syntax near '\.'. However, I know my syntax is almost correct, since the other way around works (running this query from DevServerB\2K5): SELECT TOP 1 * FROM DevServerA.master.sys.tables Please help me figure out how to reference DevServerB\2K5 from DevServerA. Thanks.

    Read the article

  • How much is the database being read from vs written to?

    - by Bill Paetzke
    I'd like to determine if my web app is read-heavy, write-heavy, or somewhere in between. I could take a guess, but I want proof. Is there a query I could run in Sql Server 2005 that would tell me the overall read/write ratio? Are there any caveats I should be aware of? Perhaps it can be found in a DMV query, or the Performance Dashboard, or examining a Sql Profiler trace. I'm not sure exactly how.

    Read the article

  • How do access a secure website within a sharepoint webpart?

    - by Bill
    How do access a secure website within a sharepoint webpart? The following code works fine as a console application but if you run it in a webpart, you will get a access violation WebRequest request = WebRequest.Create("https://somesecuresite.com"); WebResponse firstResponse = null; try { firstResponse = request.GetResponse(); } catch (WebException ex) { writer.WriteLine("Error: " + ex.ToString()); return; } if you access a non secure site, it also works. Any ideas? Error: System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. --- System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at System.Net.UnsafeNclNativeMethods.NativePKI.CertVerifyCertificateChainPolicy(IntPtr policy, SafeFreeCertChain chainContext, ChainPolicyParameter& cpp, ChainPolicyStatus& ps) at System.Net.PolicyWrapper.VerifyChainPolicy(SafeFreeCertChain chainContext, ChainPolicyParameter& cpp) at System.Net.Security.SecureChannel.VerifyRemoteCertificate(RemoteCertValidationCallback remoteCertValidationCallback) at System.Net.Security.SslState.CompleteHandshake() at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) at System.Net.TlsStream.CallProcessAuthentication(Object state) at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size) at System.Net.ConnectStream.WriteHeaders(Boolean async) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.GetResponse()

    Read the article

  • How do you pass SOME_LIB="-lmylib -lmylib2" in a BUILD_COMMAND for ExternalProject_Add()?

    - by Bill Katz
    I'm trying to pass a quoted string through BUILD_COMMAND in ExternalProject_Add() and every way I try it's getting mangled. The code is this: set (mylibs "-lmylib -lmylib2") ExternalProject_Add(Foo URL http://foo BUILD_COMMAND make SOME_LIB=${mylibs} BUILD_IN_SOURCE 1 ...) I've tried using backslash quotes, double quotes, inlining the whole thing, but every time, either the whole SOME_LIB=... part gets quoted or my injected quotes get escaped. Is it not possible to get quotes through to the command line?

    Read the article

  • Complete Haskore example

    - by Bill
    Does anyone know of a complete Haskore example that will take a small example and output a MIDI file? I'm looking for a starting point to start using Haskore and Google isn't turning up much. Thanks!

    Read the article

  • JTextField only shows as a slit Using GridBagLayout, need help

    - by Bill Caffery
    Hi thank you in advance for any help, I'm trying to build a simple program to learn GUI's but when I run the code below my JTextFields all show as a slit thats not large enough for even one character. cant post an image but it would look similar to: Label [| where [| is what the text field actually looks like import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.*; public class lab6start implements ActionListener { JTextField custNameTxt; JTextField acctNumTxt; JTextField dateCreatedTxt; JButton checkingBtn; JButton savingsBtn; JTextField witAmountTxt; JButton withDrawBtn; JTextField depAmountTxt; JButton depositBtn; lab6start() { JFrame bankTeller = new JFrame("Welcome to Suchnsuch Bank"); bankTeller.setSize(500, 280); bankTeller.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); bankTeller.setResizable(false); bankTeller.setLayout(new GridBagLayout()); bankTeller.setBackground(Color.gray); //bankTeller.getContentPane().add(everything, BorderLayout.CENTER); GridBagConstraints c = new GridBagConstraints(); JPanel acctInfo = new JPanel(new GridBagLayout()); c.gridx = 0; c.gridy = 0; c.gridwidth = 2; c.gridheight = 1; c.insets = new Insets(5,5,5,5); bankTeller.add(acctInfo, c); c.gridwidth = 1; //labels //name acct# balance interestRate dateCreated JLabel custNameLbl = new JLabel("Name"); c.gridx = 0; c.gridy = 0; c.insets = new Insets(0,0,0,0); acctInfo.add(custNameLbl, c); custNameTxt = new JTextField("customer name",50); c.gridx = 1; c.gridy = 0; c.insets = new Insets(5,5,5,5); acctInfo.add(custNameTxt,c); custNameTxt.requestFocusInWindow(); JLabel acctNumLbl = new JLabel("Account Number"); c.gridx = 0; c.gridy = 1; c.insets = new Insets(5,5,5,5); acctInfo.add(acctNumLbl,c); acctNumTxt = new JTextField("account number"); c.gridx = 1; c.gridy = 1; c.insets = new Insets(5,5,5,5); acctInfo.add(acctNumTxt,c); JLabel dateCreatedLbl = new JLabel("Date Created"); c.gridx = 0; c.gridy = 2; c.insets = new Insets(5,5,5,5); acctInfo.add(dateCreatedLbl,c); dateCreatedTxt = new JTextField("date created"); c.gridx = 1; c.gridy = 2; c.insets = new Insets(5,5,5,5); acctInfo.add(dateCreatedTxt,c); //buttons checkingBtn = new JButton("Checking"); c.gridx = 0; c.gridy = 3; c.insets = new Insets(5,5,5,5); acctInfo.add(checkingBtn,c); savingsBtn = new JButton("Savings"); c.gridx = 1; c.gridy = 3; c.insets = new Insets(5,5,5,5); acctInfo.add(savingsBtn,c); //end of info panel JPanel withDraw = new JPanel(new GridBagLayout()); c.gridx = 0; c.gridy = 1; c.insets = new Insets(5,5,5,5); bankTeller.add(withDraw, c); witAmountTxt = new JTextField("Amount to Withdraw:"); c.gridx = 0; c.gridy = 0; c.insets = new Insets(5,5,5,5); withDraw.add(witAmountTxt,c); withDrawBtn = new JButton("Withdraw"); c.gridx = 1; c.gridy = 0; c.insets = new Insets(5,5,5,5); withDraw.add(withDrawBtn,c); //add check balance //end of withdraw panel JPanel deposit = new JPanel(new GridBagLayout()); c.gridx = 1; c.gridy = 1; c.insets = new Insets(5,5,5,5); bankTeller.add(deposit, c); depAmountTxt = new JTextField("Amount to Deposit"); c.gridx = 0; c.gridy = 0; c.insets = new Insets(5,5,5,5); deposit.add(depAmountTxt,c); depositBtn = new JButton("Deposit"); c.gridx = 1; c.gridy = 0; c.insets = new Insets(5,5,5,5); deposit.add(depositBtn,c); bankTeller.setVisible(true); // action/event checkingBtn.addActionListener(this); savingsBtn.addActionListener(this); withDrawBtn.addActionListener(this); depositBtn.addActionListener(this); } public void actionPerformed(ActionEvent e) { if (e.getSource()== checkingBtn) { witAmountTxt.requestFocusInWindow(); //checking newcheck = new checking(); } } } /* String accountType = null; accountType = JOptionPane.showInputDialog(null, "Checking or Savings?"); if (accountType.equalsIgnoreCase("checking")) { checking c_Account = new checking(); } else if (accountType.equalsIgnoreCase("savings")) { // savings s_Account = new savings(); } else { JOptionPane.showMessageDialog(null, "Invalid Selection"); } */

    Read the article

  • max count with joins

    - by trixet
    I have 3 tables: users: Id Login 1 John 2 Bill 3 Jim computers: Id Name 1 Computer1 2 Computer2 3 Computer3 4 Computer4 5 Computer5 sessions: UserId ComputerId Minutes 1 2 47 2 1 32 1 4 15 2 5 5 1 2 7 1 1 40 2 5 31 I would like to display this resulting table: Login Total_sess Total_min Most_freq_computer Sess_on_most_freq Min_on_most_freq John 4 109 Computer2 2 54 Bill 3 68 Computer5 2 36 Jim - - - - - Myself I can only cover first 3 columns with: SELECT Login, COUNT(sessions.UserId), SUM(Minutes) FROM users LEFT JOIN sessions ON users.Id = sessions.UserId GROUP BY users.Id And some kind of other columns with: SELECT main.* FROM (SELECT UserId, ComputerId, COUNT(*) AS cnt ,SUM(Minutes) FROM sessions GROUP BY UserId, ComputerId) AS main INNER JOIN ( SELECT ComputerId, MAX(cnt) AS maxCnt FROM ( SELECT ComputerId, UserId, COUNT(*) AS cnt FROM sessions GROUP BY ComputerId, UserId ) AS Counts GROUP BY ComputerId) AS maxes ON main.ComputerId = maxes.ComputerId AND main.cnt = maxes.maxCnt But I need to get whole resulting table in one query. I feel I'm doing something completely wrong. Need help.

    Read the article

  • How to figure the read/write ratio in Sql Server?

    - by Bill Paetzke
    How can I query the read/write ratio in Sql Server 2005? Are there any caveats I should be aware of? Perhaps it can be found in a DMV query, a standard report, a custom report (i.e the Performance Dashboard), or examining a Sql Profiler trace. I'm not sure exactly. Why do I care? I'm taking time to improve the performance of my web app's data layer. It deals with millions of records and thousands of users. One of the points I'm examining is database concurrency. Sql Server uses pessimistic concurrency by default--good for a write-heavy app. If my app is read-heavy, I might switch it to optimistic concurrency (isolation level: read uncommitted snapshot) like Jeff Atwood did with StackOverflow.

    Read the article

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