I need to add Plugin support to a Java Swing App (like in Eclipse).
The Plugin should have the ability to add new Menu items and tab components to the swing app.
I am looking for frameworks or libraries which support it. So far I have found Java Plugin Framework http://jpf.sourceforge.net/ and planning to use it.
Are there any other better alternatives to it?
I have a simple query over a table, which returns results like the following:
id id_type id_ref
2702 5 31
2702 16 14
2702 17 3
2702 40 1
2702 26 4
And I would like to merge the results into a single row, for instance:
id concatenation
2702 5,16,17,40,26:31,14,3,1,4
Is there any way to do this within a trigger?
NB: I know I can use a cursor, but I would really prefer not to unless there is no better way.
Please give me some titles, preferably not free books.
I don't need it to be free; it would be better if published by McGraw Hill, Prentice-Hall, Springer, or any other good publisher.
Note that I'm interested here in programming with C++ only.
I would like to string together database values into a string. Something like $a "text" $b.
And then use the entire string as a variable, let's say $c.
Is it better to do this at the database level? Will php use lots of resources to do this?
I use bash on mac and one of the aliases is like this
alias gitlog='git --no-pager log -n 20 --pretty=format:%h%x09%an%x09%ad%x09%s --date=short --no-merges'
However when I do
:! gitlog
I get
/bin/bash: gitlog: command not found
I know I can add aliases like this in my .gitconfig
[alias]
co = checkout
st = status
ci = commit
br = branch
df = diff
However I don't want to add all my bash aliases to .gitconfig. That is not DRY.
Is there a better solution?
Hello, i want to check if an e-mail address is valid and exist.
I mean not using regex. I need a valitadion by using mx.
for example how to check blablabla[at]gmail.com exists on gmail.com
it would be better using CMD (win)
The post office actually publishes a list of commonly used street suffixes in addresses:
http://www.usps.com/ncsc/lookups/abbr_suffix.txt
I want to take this list and make a ruby function that takes a string, takes the last word ("183 main strt".split[' '].last) and if it matches any of the commonly used street suffixes ("strt"), replace it with the official Postal Service Standard Suffix ("st").
Is there a better way to approach this than a massive str.sub.sub.sub.sub.sub?
If I have something like:
typedef int MyType;
is it good practice to cast the operands of an operation if I do something like this:
int x = 5;
int y = 6;
MyType a = (MyType)(x + y);
I know that I don't need to do that but wondering if it's better for intent/documentation/readability concerns.
Hello,
I've used an array of strings to populate a DataGridView.
How do I go about finding the most frequently occurring number?
Or, even better, order them by most frequently occuring?
Thank You.
Where I work, we use Bugzilla extensively for bug and feature tracking. We take advantage of the built in milestones to help us manage our timelines better, but sometimes priorities shift and milestones need to be rearranged. During this time we use the "change several bugs at once" feature to move them around, but the result is a ton of bugspam for everyone involved (except the person actually doing the changing, of course).
Is there any way to easily turn off emails if many bugs are being changed at once?
Which approach is better to use if I need a member (sp or func) returning 2 parameters:
CREATE PROCEDURE Test
@in INT,
@outID INT OUT,
@amount DECIMAL OUT
AS
BEGIN
...
END
or
CREATE FUNCTION Test
(
@in INT
)
RETURNS @ret TABLE (outID INT, amount DECIMAL)
AS
BEGIN
...
END
What are pros and cons of each approach considering that the result will passed to another stored procedure:
EXEC Foobar @outID, @outAmount
Hi I found this function in a utilities code file:
Version 1:
public static bool IsValidLong(string strLong)
{
bool result = true;
try
{
long tmp = long.Parse(strLong);
}
catch (Exception ex)
{
result = false;
}
return result;
}
I want to replace this (and validators for other types) with following:
Version 2:
public static bool IsValidLong(string strLong)
{
long l;
return long.TryParse(strLong, out l);
}
which version is better and why?
I'm looking for a C or C++ API that will give me real-time spectrum analysis of a waveform on Windows.
I'm not entirely sure how large a sample window it should need to determine frequency content, but the smaller the better. For example, if it can work with a 0.5 second long sample and determine frequency content to the Hz, that would be wicked-awesome.
I occasionally hear things about how SQL sucks and it's not a good language, but I never really hear much about alternatives to it. So, are other good languages that serve the same purpose (database access) and what makes them better than SQL? Are there any good databases that use this alternative language?
I need to change some characters that are not ASCII to '_'.
For example,
Tannh‰user - Tann_huser
If I use regular expression with Python, how can I do this?
Is there better way to do this not using RE?
We develop web application and we are going to deploy it on JBoss.
Now we use JSF, Facelets, Webflow, JMX, Spring.
We are going to use JMS(ActiveMQ).
Maybe in the future we will use EJB3. But for near future we will not use it.
What configuration of JBoss would be better to use - web, standard, default?
And why?
Hi
I need to be able to take EPS and PDF's and convert them to JPEG/PNG on the fly to display on a website - using .net code.
I used ADC PDF from WebSupergoo for this like 3 years ago, and it worked fine - but some other and better options could easily have surfaced since then.
I was reading through my daily doze of RSS when I noticed a link to the python compiler documentation where class names like assList, assName and assTuple exist. While starting names with 'ass' is perfectly acceptable to me, it just sparked this idea that there probably exist much better examples of this.
Have you personally used or otherwise encountered any inappropriate function or variable names?
Personally I have used 'crap' and 'moo' for temporary purposes, forgot them and at a later point they came too integrated for me to bother with fixing them.
in my config.php where i have all constants i set the PATH to a absolute path.
but this means that when i move my application folder i have to change this path.
i wondered if its better to set a relative path, in that way whenever i move my application between production and development folder, i dont have to change it.
how do you guys do when you move between folders?
I am relatively new to website design and specifically working in ASP.NET, i am using CSS to style my site, but when i use ASP.NET Controls like GridView, Navigation controls, etc ...
they are messed up by the style sheets, and you can't see that until you run the website, because the controls are translated to HTML and so affected by CSS in a way that you can't predict, how to solve this, and is there a better way to layout and desgin sites in ASP.NET.
Shark shows me that this method takes a HUGE performance hit. Like 80% in my table view. All I do is draw two labels per cell (about 8 in total per page). During scrolling. I drawInRect: with that.
Are there some better methods? Like drawing directly to some layer?
Guys is there any better way to list all the months other than this
select to_char(add_months(to_date('01/01/1000', 'DD/MM/RRRR'), ind.l-1),
'MONTH') as
month_descr
, ind.l as month_ind
from dual descr
, (
select l
from (select level l from dual connect by level <=
12)
) ind
order by 2;
ANSWER :
SELECT to_char(add_months(SYSDATE, (LEVEL-1 )),'MONTH') as months FROM dual CONNECT BY LEVEL <= 12
Is it good to add line-height in body{line-height:1.5} or it would be better if i add separately for tag by tag like p{ line height:1em} etc.
Edit:
body {line-height:in em} create problem with if we put image with float inside
Edit: 24 April 2010:
If i have to add different line heights to elements
like
p { 1.4}
h1 {1.6}
h2 { 1.2}
ul li { 1.1}
then shouldn't i use line height in body { 1.4}
if body { 1.4} and h1 {1.6} then what would be line height for h1?