What will be the best approach if I have search fields for 20 or more and any combination should be valid. Is there any special way to do it in openJPA or native SQL is better. Any idea would be helpful.Thanks.
I just started on the .net compact framework. I want to draw a Sudoku field on the screen. So I put down a PictureBox and defined a method for the Paint event:
private void pictureBoxPlayfield_Paint(object sender, PaintEventArgs e)
{
// use e.Graphics to draw the grid, numbers and cursor
}
This works, but you can see as the grid is drawn. So my question is, what is the right/better way to create such a custom control? Is there maybe a way to enable double buffering?
Say I have created a GUI (Qt) that operates with some data(text+image). How I can export that data in one of listed formates in title.
I guess it is better to export info .rtf as it is free cross-platform formt(??), isn't it?
i want to rename the keys of a dictionary are which are ints, and i need them to be ints with leading zeros's so that they sort correctly.
for example my keys are like:
'1','101','11'
and i need them to be:
'001','101','011'
this is what im doing now, but i know there is a better way
tmpDict = {}
for oldKey in aDict:
tmpDict['%04d'%int(oldKey)] = aDict[oldKey]
newDict = tmpDict
Which approach is better to use:
BoundField.NullDisplayText isn't set. NULL-case is foreseen in SQL query, i.e. SELECT ISNULL(amount, 0) FROM table
or
BoundField.NullDisplayText is set, e.g. "0.00 %". NULL-case isn't foreseen in SQL query, i.e. SELECT amount FROM table
What do you think?
When naming a boolean, or a function returning a boolean it's usual to prefix with 'is' e.g.
isPointerNull
isShapeSquare
What about when refering to multiple items, should it be:
arePointersNull or isPointersNull
areShapesNull or isShapesNull
I can see arguments for both; is offers consistency and perhaps slightly better readability, are makes the code read in a more natural way.
Any opinions?
What are the most reliable encodings for sending email? I had some problems recently with .NET's System.Net.Mail default of quoted-printable ('=0D=0A' scattered throughout the message).
So I changed to iso-8859-1 for the body (set via alternative views), and 7bit for transfer (and base64 for embedded resources).
Are there the better choices?
Suppose I have a system where I have metadata such as:
table:
======
key
name
address
...
Then suppose I have a user-defined type described as so:
datasource
datasource-key
A) are there systems where it's possible to have keys based on user-defined types?
B) if so, how do you decompose the keys into a form suitable for querying?
C) is this a case where I'm just better off with a composite primary key?
Guys,
I am searching an open source RSS component to use in my project (.Net 3.5, C#). I have found ASP.Net RSS toolkit: http://aspnetrsstoolkit.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=3674. Do you know about advantages and disadvantages of the component? Could you suggest a better open source RSS component, if yes, what are pros and cons of the suggested component?
Thanks a lot.
What do people think is the best JSF framework or library for a saving state longer than request scope (but w/o using session scope) that is backbutton/new window safe -- i.e. you have a "wizard"/multi-page form.
For example, MyFaces has the 'SaveState' tag (http://bit.ly/8QHmX5) that allows you to maintain state across pages by saving state in the view's component tree. Any comments on SaveState (pros/cons) or suggestions for any better framework or library for this capability?
I'd like to add a begin...rescue block to one of my controllers create method, in order to log better info and construct the correct error message to return to the client. Does the rescue in any way 'interrupt' the rollback process?
I'm assuming rails automatically does a rollback. When does it happen? Has it already happened by the time I get in the rescue clause?
I'm using mySQL on Dreamhost and I think they use innoDB.
I am looking for a well-tested, publicly available C/C++ implementation of a lock free queue.
I need at least multiple-producers/single-consumer functionality. Multiple-consumers is even better, if exists.
I'm targetting VC's _Interlocked... intrinsics, though anything which is straight forward to port would be fine.
Could anyone give any pointers?
Is it possible to do this:
myfile.js:
function foo() {
alert(<my-function-name>);
// pops-up "foo"
// or even better: "myfile.js : foo"
}
I've got the dojo and jquery frameworks in my stack, so if either of those make it easier, they're available.
I'm recently working in a company where we use PowerBuilder extensively. The only documentation or ressources we have access to is some basic course saying things like "Do A, then B and you'll get C". I was wondering if there is some better crash courses or tutorials for this language on the net or somewhere else which actually explain something instead of simply taking me by the hand.
Experience says that using WSDL-SOAP based webservice for internal consumption is an overkill. There are too many service-based POJO classes that when let into the system complicates it way too much. One option would be use adapter pattern, map the request/response objects to internal domain classes and . But is it even required? Is there a better approach? What are your suggestions?
Since content of web applications is dynamically generated it would appear that AdSense is not going to produce relevant ads.
Is there a way to increase relevancy of the AdSense ads for the web application?
Is it possible to achieve Gmail-like ad functionality at all for third-party applications?
Is there a better ad provider for web apps than Google?
I'm looking for some good tools that help to share tips, best practices, company standards, etc. amongs developers in my company. Two tools I'm currently considering are a wiki (screwturn wiki) or Sharepoint 2010. I'm wondering if there is something better suited to the task, or any input anyone has on this subject. I'd prefer something that's windows based (i.e. runs on IIS, can authenticate users against Active Directory etc) but I am open to anything.
I'm searching for the best way to show a "loading..." window maybe with a progress bar on the top of my application main dialog. It quite better if it become transparent, so user can see the application dialog at back.
What do you think is the best way to do that?
I'm using the standard gcc compiler in math software development with C-language. I don't know that much about compilers or compiler options, and I was just wondering, is it possible to make faster executables using another compiler or choosing better options? The default Makefile sets options -ffast-math and -O3 and I think both of them have some impact in the overall calculation time. My software is using memory quite extensively, so I imagine some options related to memory management might do the trick?
Any ideas?
Modeling tool or just a visual tool for drawing.
In fact I only need to draw and later I'll transform the picture into sql by hand
to better control the process.
I have two applications, and one is keeping sending live images to the other and it need to be long-running.
Is WCF suitable for this scenario? or if there is any better alternative for this communication?
When validating an email address with the regex validation component, an additional RequiredFieldValidator must be added to ensure there is a value present.
I've mostly taken care of this with a CustomFieldValidator, and taking care of this with Javascript.
Is there a better way of doing this?
I would like to debug some templated code to understand it better.
Unfortunately I'm new to template metaprogramming and it IS hard for me to get in.
When I try to output the preprocessed source files I get 125 000 lines of code :/
So is there a way I can see the generated Code? (The library I'm using is SeqAn)
Is it possible to record a user's input into an HTML textfield, and playback at a later date in realtime? One way I can think of would be to capture each keyDown event and the time delta (accurate to a few hundred ms), and store the pairs together.
Can you think of a better/more efficient way?