I am looking at the Developer Express Quantum Grid example 'IssueList' which is a useful bug reporting and tracking application that's almost ready to go out of the box. It uses a TDatabase component with several paradox (.db) tables.
Is it simple to rejig the TDatabase settings to use a database on a shared machine so that several of us can access it together across the network? If so, what would be the steps needed please?
Hi
In an android app I am using a tabview for an app and one of the tabs shows a webview. But the page is blank until the web page loads. how would one show a progress bar until the page loads. It cannot be in the title bar because that is hidden by the tabhost
Hi,
I'm currently working on a project using DSL tools in Visual Studio 2008.
Is there a way to automatically add a resource into the solution explorer of the experimental hive at runtime? I'm creating new diagrams based on what is on screen, and saving them into the directory the project is stored in. I would like to know if there is a way to get them to automatically get added to the solution explorer? (I don't want to have to drag the files in manually each time)
If I have a chunk of css styles that are applied within a certain page element, I would like to group them rather than identify the containing page element for each style. For example, I would like to turn:
#bodywrap #leftcolumn p {...}
#bodywrap #leftcolumn div {...}
#bodywrap #leftcolumn .highlight {...}
into something like:
#bodywrap #leftcolumn [
p {...}
div {...}
.highlight {...}
]
where everything contained in the brackets respects the containing declarations. Is this possible with css, and what would be the syntax?
Hello all
Some time ago I read a posting on a board where the person was talking poorly about people that have HTML embedded/within their PHP. I do quite a bit of PHP development but I still interleave HTML and PHP in the same document. Is there a better way to do this, am I doing it wrong? I know that in JSP/JSF they use an XML document with namespaces to insert their HTML code so I was wondering if there was a similar function that PHP uses that I should be taking advantage of.
Thanks for taking the time to read. :-)
In LaTeX, how can one create a document using the Letter documentclass, but with customized headers and footers?
Typically I would use:
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{\footnotesize \parbox{11cm}{Custom left-head-note} }
\lfoot{\footnotesize \parbox{11cm}{\textit{#2}}}
\rfoot{\footnotesize Page \thepage\ of \pageref{LastPage}}
\renewcommand\headheight{24pt}
\renewcommand\footrulewidth{0.4pt}
However, with \documentclass{letter}, this doesn't work at all. Suggestions are duly appreciated.
EDIT: Here is sample code that doesn't work (for any apparent reason):
\documentclass[12pt]{letter}
\usepackage{fontspec}% font selecting commands
\usepackage{xunicode}% unicode character macros
\usepackage{xltxtra} % some fixes/extras
% page counting, header/footer
\usepackage{fancyhdr}
\usepackage{lastpage}
\pagestyle{fancy}
\lhead{\footnotesize \parbox{11cm}{Draft 1} }
\lfoot{\footnotesize \parbox{11cm}{\textit{2}}}
\cfoot{}
\rhead{\footnotesize 3}
\rfoot{\footnotesize Page \thepage\ of \pageref{LastPage}}
\renewcommand{\headheight}{24pt}
\renewcommand{\footrulewidth}{0.4pt}
\begin{document}
\name{ Joe Laroo }
\signature{ Joe Laroo }
\begin{letter}{ To-Address }
\renewcommand{\today}{ February 16, 2009 }
\opening{ Opening }
Content of the letter.
\closing{ Yours truly, }
\end{letter}
\end{document}
When a user takes a particular action on a page, an AJAX call is made to save their data. Unfortunately, this call is synchronous as they need to wait to see if the data is valid before being allowed to continue. Obviously, this eliminates a lot of the benefit of using Asynchronous Javascript And XML, but that's a subject for another post. That's the design I'm working with.
The request is made using the dojo.xhrPost function, with a 60s timeout parameter, and the error handler redirects to an error page. What I am finding in testing is that in Firefox, if I initiate the ajax request and then press ESC, the page hangs waiting for a response, and then eventually after exactly 90s (not 60s, the function's timeout), the error handler will kick in and redirect to the error page.
I expected this to happen, but either immediately as soon as the request was cancelled, or after 60s due to the timeout value being 60s. What I don't understand is why is it 90s? What is actually happening under the hood when the user cancels their request in Firefox, and how does it differ from IE, where everything works fine exactly the same as if the request had not been cancelled? Is the 90s related to any user-configurable browser settings?
I have tried on two different servers to get beanstalkd up and running and do a couple tests (locally on MacOSX compiled from source, and on a CentOS server installed with yum)
I can get the server running either with
sudo beanstalkd -d -p 11300
or
sudo beanstalkd -p 11300 &
I then tried using the php lib and it just froze. Connecting directly:
telnet localhost 11300
I do the following to mimic the PHP test script:
use foo
USING foo
put 0 0 120 5
hello
INSERTED 1
reserve-with-timeout 0
TIMED_OUT
If I just run
reserve
It's stuck indefinitely. Any ideas?
After reading many posts, I still haven't got a clue how to solve this problem...
The first view of my app is a tableViewController. I override
(BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation
and it always returns YES.
If I hold my iPad upright under landscape orientation, it rotates right after I launch the app. However, if I put my iPad flat on the table, even though my homepage is in landscape orientation, it launches in protrait orientation.
So I guess the problem is, how can I get the orientation of my homepage and launch my app with that orientation?
I have designed the report in A4 size, When I export to PDF, the size fit well. However, when I export the report to Excel 2000/2003, the report cannot fit in a page. Could anyone tell me how to fix it ? Thanks
Disclaimer: I jumped to C# 2008 recently and SubSonic 3 (3.0.0.4) at the same time. I haven't used Linq for much of anything in the past.
Is there an easy way to use the foreign key display value for sorting, rather than the FK Id (which is numeric)?
I've added a new Find method in my ActiveRecord.tt to help with sorting based on a string field name but after doing some testing I realized that even though its working as it should be, I am not handling foreign key fields at all (they are just sorting by their value).
Even if I need to change how I am accessing the data it is early enough in the project to do that. Just looking for suggestions.
Hi guys,
I am not too sure the best way to word this, but what I want to do, is read a pdf file, make various modifications, and save the modified pdf over the original file. As of now, I am able to save the modified pdf to a separate file, but I am looking to replace the original, not create a new file.
Here is my current code:
from pyPdf import PdfFileWriter, PdfFileReader
output = PdfFileWriter()
input = PdfFileReader(file('input.pdf', 'rb'))
blank = PdfFileReader(file('C:\\BLANK.pdf', 'rb'))
# Copy the input pdf to the output.
for page in range(int(input.getNumPages())):
output.addPage(input.getPage(page))
# Add a blank page if needed.
if (input.getNumPages() % 2 != 0):
output.addPage(blank.getPage(0))
# Write the output to pdf.
outputStream = file('input.pdf', 'wb')
output.write(outputStream)
outputStream.close()
If i change the outputStream to a different file name, it works fine, I just cant save over the input file because it is still being used. I have tried to .close() the stream, but it was giving me errors as well.
I have a feeling this has a fairly simple solution, I just haven't had any luck finding it.
Thanks!
I am porting over some Java code into Google's Go language and I converting all code except I am stuck on just one part after an amazingly smooth port. My Go code looks like this and the section I am talking about is commented out:
func main() {
var puzzleHistory * vector.Vector;
puzzleHistory = vector.New(0);
var puzzle PegPuzzle;
puzzle.InitPegPuzzle(3,2);
puzzleHistory.Push(puzzle);
var copyPuzzle PegPuzzle;
var currentPuzzle PegPuzzle;
currentPuzzle = puzzleHistory.At(0).(PegPuzzle);
isDone := false;
for !isDone {
currentPuzzle = puzzleHistory.At(0).(PegPuzzle);
currentPuzzle.findAllValidMoves();
for i := 0; i < currentPuzzle.validMoves.Len(); i++ {
copyPuzzle.NewPegPuzzle(currentPuzzle.holes, currentPuzzle.movesAlreadyDone);
copyPuzzle.doMove(currentPuzzle.validMoves.At(i).(Move));
// There is no function in Go's Vector that will remove an element like Java's Vector
//puzzleHistory.removeElement(currentPuzzle);
copyPuzzle.findAllValidMoves();
if copyPuzzle.validMoves.Len() != 0 {
puzzleHistory.Push(copyPuzzle);
}
if copyPuzzle.isSolutionPuzzle() {
fmt.Printf("Puzzle Solved");
copyPuzzle.show();
isDone = true;
}
}
}
}
If there is no version available, which I believe there isn't ... does anyone know how I would go about implementing such a thing on my own?
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
MessageBox(NULL, _T("This should return 90 no?"), _T("OK"), MB_OK);
return 90;
}
Why does the above program correctly display the message box, but does not set the error level?
I compile this program to the name a.exe. Then from command prompt I type:
c:\> a.exe
(message box is displayed, I press ok)
c:\> echo %ERRORLEVEL%
0
I get the same results if I do exit(90); right before the return. It still says 0.
I also tried to start the program via CreateProcess and obtain the result with GetExitCodeProcess but it also returns 0 to me. I did error checking to ensure it was all started correctly.
I originally seen this problem in a more complex program. But made this simple program to verify the problem. Results are the same, both programs that have WinMain return 0 always.
I tried both x64, x86 and unicode and MBCS compiling options. All give 0 as an error level/status code.
I've had to downgrade from Galileo to Ganymede in order to use the version of the FlexBuilder plugin that we are licensed for. Since the downgrade, I have several times accidentally dragged files or entire folders from one part of my project into another (or even into another project). I blamed this on fatfingers the first couple times, but I just now watched it do it to me on what I definitely know to have been a single left click on the folder that the file ended up moving to.
Does anybody know if this is a known issue with Ganymede?
I am writing an application that needs to be installed on a large number of desktops and also needs to update itself. We are looking at WIX for creating the installation. I have used ClickOnce and it is not a good solution for this install. WIX seems to fit, but there is no good process for auto update that I have found.
I have looked at ClickThrough, but it doesn't seem ready for prime time yet. Does anyone have another good solution to use with WIX (or maybe another install program) to auto update an application install?
I have a Collection<T> property that wraps a array like
T[] array;
public Collection<T> Items
{
get { return new Collection<T>(array); }
}
When I attempt to assign to the collection via:
T variable;
Items[i] = variable;
I get a NotSupportedException because the colleciton's IsReadOnly property is true. Turns out that this is a design choice by Microsoft. Does anyone know a workaround that does NOT involve enumeration? It could be done if the underlying data is not an array but I enjoy the performance gains because the data is fixed length.
We are going to begin implementing a web service that will be hosted on a DMZ server. This web server will post data to a SQL server and we're trying to determine the best methodology to handle this. Things that concern us are web service authentication, SOAP, and whether or not to store the database on the DMZ or the local network. This same scenario will apply to ASP.Net apps.
Trust me, I've already searched the web, but as usual, the online resources I've found either talk about just authentication, or just about SOAP, or etc, but does not show or suggest how the entire system can work together.
Can you give me a list of resources such as links that I've missed, books, classes, or etc that would help?
Thank You.
In (regular) software I have worked at companies where the gcc option -Wall is used to show all warnings. Then they need to be dealt with. With non-trivial FPGA/ASIC design in Verilog or VHDL there are often many many warnings. Should I worry about all of them? Do you have any specific techniques to suggest? My flow is mainly for FPGAs (Altera and Xilinx in particular), but I assume the same rules would apply to ASIC design, possibly more so due to the inability to change the design after it is built.
Hi I want to delete a line using sed if it matches 2 regular expressions in the same line. EG the line starts with /* and end with */ (comment). The following script will do most of that.
sed -e '/^\/*/ d' -e '/*\/$/ d' filename
This script will remove all lines that start with * and end with */. I want it to remove the line only if is meets both criteria not one.
Hi guys,
So I am relatively new to Python and I am having trouble working with 2D Lists.
Here's my code:
data = [[None]*5]*5
data[0][0] = 'Cell A1'
print data
and here is the output (formatted for readability):
[['Cell A1', None, None, None, None],
['Cell A1', None, None, None, None],
['Cell A1', None, None, None, None],
['Cell A1', None, None, None, None],
['Cell A1', None, None, None, None]]
Why does every row get assigned the value?
A lot of people seem to agree, that the Singleton pattern has a number of drawbacks and some even suggest to avoid the pattern all together. There's an excellent discussion here. Please direct any comments about the Singleton pattern to that question.
Are there other design patterns, that should be avoided or used with great care?