The rich text editor must be implemented in Java, provide Swing support, and preferably be open source.
I'm looking to integrate it into an existing Java/Swing application.
Thanks.
A List does not work in the way that I want. The way that I want is that WeakReferences are automatically removed from the list when the object they weakly reference is garbage collected.
ConditionalWeakTable does not do what I want either, because although its keys and values are weakly referenced and collectable, you cannot enumerate them at all.
Hi there,
can anyone tell me if there is a tool for creating the strongly typed classes (available via the schema) - i suppose similar to Paste as XML type ..
But i was hoping for a tool that i could run to automatically update the classes automatically when there are changes
Does anyone know if something like this exists?
I know this is probably is a question of personal opinion, but I want to know what's standard practice and what would be frowned upon.
One of my profs in university always seems to make his variable and method names as short as possible (getAmt() instead of getAmount) for instance.
I have no objection to this, but personally, I prefer to have mine a little longer if it adds descriptiveness so the person reading it won't have to check or refer to documentation.
For instance, we made a method that given a list of players, returns the player who scored the most goals. I made the method getPlayerWithMostGoals(), is this wrong? I toiled over choosing a way to make it shorter for awhile, but then I thought "why?". It gets the point across clearly and Eclipse makes it easy to autocomplete it when I type.
I'm just wondering if the short variable names are a piece of the past due to needing everything to be as small as possible to be efficient. Is this still a requirement?
Hi,
I'm trying to draw an image in a view but having problems trying to maintain the scale of the original image. Basically, I have a small view and I would like to show part of the image in the view. The intention then is to perform a translation on the image so that a different part appears in the view.
No matter what I try, either the image is down-scaled automatically to fit the view or the whole image is viewable. I've tried playing about with the settings on BitmapDrawable, ImageView and Layout to no avail.
Anyone know a good way to achieve this?
Hi, I have a requirement to create a simple windows forms application that allows an admin user to manage the Services on remote servers. We don't want to give the admins the usernames and passwords to the servers so these will be encrypted and stored in a database.
My question is whether or not it is possible to spawn a Services.msc window when impersonating one of the users stored within the database?
I have looked at the ProcessStartInfo class but because Services.msc is not an executable it does not seem to like executing this. Any ideas on a simple way of doing the actual impersonation and loading of Services.msc - say off a button click?
Thanks
I an trying to put a method in a separate thread in the background. It nearly works except that occasionally I get a lot of error messages with the message
METHODCLOSURE: OH NO SEPERATE THREAD
with the bad spelling and all.
Does anyone know what this means?
If I have a C++ set, declaration
set personList;
with iterator,
set::const_iterator location;
how can I print out the contents of the set? They are all person objects, and I have overridden the operator<< for Person.
The line that errors is:
cout << location
and it's in a basic for loop.
Netbeans gives the following error:
proj.cpp:78: error: no match for ‘operator<<’ in ‘std::cout << location’
so it looks like it wants an override for the iterator's <<.
Basically, I am taking objects that used to be stored in an array format, but are now in a set. What is the equivalent to cout << array[i] for sets?
In my code, java treeset iteration is the dominant time factor. In looking at the system I believe that it is n*log(n) complexity. Can anyone verify this? I am thinking that by providing links backward from child node to parent node I could improve the performance.
I Have two classes, Survey and Poll classes. Also I have Question and Question Choice classes. How do I map these so I come out with particular table formats. here is the classes involved.
public class Survey
{
public IList<Question> Questions { get; private set; }
}
public class Poll
{
public Question Question { get; set; }
}
public class Question
{
public string Text { get; set; }
public IList<QuestionChocie> Choices { get; private set; }
}
public class QuestionChoice
{
public string Text { get; set; }
}
The resulting tables that I'm shooting for include the following
Surveys- a table of survey information.
Polls - a table of polls information.
SurveyQuestions -a table of survey questions.
PollQuestions - a table of poll questions.
SurveyChoices - a table of the question choices for the surveys.
PollChoices - a table of the question choices for the survey.
preferably i really want to know for fluent nhibernate, or just mapping xml is fine too.
I have linked a library with my program. It works fine. The only problem is that there visibility errors/warnings (thousands of them).
They are all of the form:
newlib::method() has different visibility (default) in newlib.a and (hidden) in AppDelegate.o
It is always with AppDelegate.o. I have tried to set the visibility for both the library and the main app in several ways: the visibility checkmark in XCode, and -fvisibility. Non seem to have worked. Is there somethin special about AppDelegate.mm?
How would one go about converting a SVG file to a PDF programatically? (I need to alter the SVG in certain respects before generating the PDF so simply pre-converting it using a tool won't be sufficient.)
Ideally using Java but Perl or PHP would be fine too.
Obviously I am basically considering Apache FOP and Batik with Java. However no matter how long I search I cannot find a simple introduction on how to do it. Things like SVGConverter have descriptions like "Defines the interface for classes that are able to convert part or all of a GraphicContext", but I don't really know what that means.
I have this feeling there must be an API to do this quite simply, provided by FOP or Batik, but I'm just not able to find it at the moment (or perhaps it really doesn't exist.)
In terms of the supported SVG features I need, the file has some paths which are filled with some linear gradients.
Ideally if I could pass the SVG in as a DOM Document that would be ideal; then I would load my template SVG file, change it as specified by the user, and then generate the PDF.
Hello, I have a problem with conversion java code to action script 3. Anyone can help with code translation? Thanks.
public static short[] decmail_str_to_binary_data(String s)
{
short[] data = new short[s.length()/2];
for (int i = 0; i < s.length(); i += 2)
{
char c1 = s.charAt(i);
char c2 = s.charAt(i + 1);
int comb = Character.digit(c1, 16) & 0xff;
comb <<= 4;
comb += Character.digit(c2, 16) & 0xff;
data[i/2] = (short)comb;
}
return data;
}
I have to see which of the following from a vector is a square number then make another vector with only the square numbers
For example: (4,15,6,25,7,81) the second will be (4,25,81)
4,25,81 because 2x2=4 5x5=25 and 9x9=81
I started like this:
{
int A[100],n,r,i;
cout<<"Number of elements=";
cin>>n;
for(i=1;i<=n;i++)
{
cout<<"A["<<i<<"]=";
cin>>A[i];
}
for(i=1;i<=n;i++)
{
r=sqrt(A[i]);
if(r*r==A[i])
}
return 0;
}
but I am not really sure how to continue
Hello everyone,
What I'm looking to do is to sorta a Java List or Map in the order the items are in a XML File.
For Example
I have a list of function names as so:
functionOne
functionThree
functionTwo
The XML File looks like this:
<xml>
<function>functionOne</function>
<function>functionTwo</function>
<function>functionThree</function>
</xml>
So I would like to sort the list so the function names are as so:
functionOne
functionTwo
functionThree
Now Im trying to do this for Variables as well, so there are around 500+ unique 'items'.
Does anyone have any idea how I can go about doing this? Now for the file that determines that sort order doesn't have to be XML it just what I use the most, it can be anything that can get the job done.
Thanks in advance for your time.
I'm trying to use Emacs as a python editor and it works fine when I evaluate(C-c C-c) only single files but when I evaluate a file that imports another file in the same directory, I get an error saying that the file could not be imported.
Does anyone know of a workaround?
Thanks in advance
In my specific case, I need the value in propertyPriceTextBox to be numeric only, and a whole number. A value also has to be entered, and I can just Messagebox.Show() a warning and that's all I'd need to do.
This is what I have so far.
private void computeButton_Click(object sender, EventArgs e)
{
decimal propertyPrice;
if ((decimal.TryParse(propertyPriceTextBox.Text, out propertyPrice)))
decimal.Parse(propertyPriceTextBox.Text);
{
if (residentialRadioButton.Checked == true)
commisionLabel.Text = (residentialCom * propertyPrice).ToString("c");
if (commercialRadioButton.Checked == true)
commisionLabel.Text = (commercialCom * propertyPrice).ToString("c");
if (hillsRadioButton.Checked == true)
countySalesTaxTextBox.Text = ( hilssTax * propertyPrice).ToString("c");
if (pascoRadioButton.Checked == true)
countySalesTaxTextBox.Text = (pascoTax * propertyPrice).ToString("c");
if (polkRadioButton.Checked == true)
countySalesTaxTextBox.Text = (polkTax * propertyPrice).ToString("c");
decimal result;
result = (countySalesTaxTextBox.Text + stateSalesTaxTextBox.Text + propertyPriceTextBox.Text + comissionTextBox.Text).ToString("c");
}
else (.)
MessageBox.Show("Property Price must be a whole number.");
}
I was wondering if there is a library out there such that it could give me the ability to fill in word templates with custom values.
For example: Following could be the content of the Word Document
{Address}
{PhoneNumber}
Hello {Name}, How are you doing?
In C# I would like to do something like this to replace all the placeholders in the Word document:
using(WordDocument doc = WordDocument.Load("Mail.docx")){
var person = new {Name = "John Smith", Address="42 Wallaby Way, Sydney", PhoneNumber="555-555-5555"};
doc.Template(person);
doc.Print();
}
The resulting document would look like this:
42 Wallaby Way, Sydney
555-555-5555
Hello John Smith, How are you doing?
Any libraries out there (preferably free) that let's me do this?
Edit: I am not asking you to find anything that let's me do this. If that was the case, I would do a Google search by myself. Honestly, all I am asking is "has anybody used a library in the past to do this exact thing."
Using Phonegap you can set a function to be called back if the whole database transaction or the individual SQL statement errors. I'd like to know how to get more information about the error.
I have one generic error-handling function, and lots of different SELECTs or INSERTs that may trigger it. How can I tell which one was at fault? It is not always obvious from the error message.
My code so far is...
function get_rows(tx) {
tx.executeSql("SELECT * FROM Blah", [], lovely_success, statement_error);
}
function add_row(tx) {
tx.executeSql("INSERT INTO Blah (1, 2, 3)", [], carry_on, statement_error);
}
function statement_error(tx, error) {
alert(error.code + ' / ' + error.message);
}
From various examples I see the error callback will be passed a transaction object and an error object. I read that .code can have the following values:
UNKNOWN_ERR = 0
DATABASE_ERR = 1
VERSION_ERR = 2
TOO_LARGE_ERR = 3
QUOTA_ERR = 4
SYNTAX_ERR = 5
CONSTRAINT_ERR = 6
TIMEOUT_ERR = 7
Are there any other properties/methods of the error object?
What are the properties/methods of the transaction object at this point?
I can't seem to find a good online reference for this. Certainly not on the Phonegap website!
i want to develop a property listing website just like https://www.websites4yourlistings.com/
Do you guys know of any free open source script i can use for the following tasks
Gallarey script that has title and description, that can be uploaded by clients of deleted
Pls suggest a method to create different template from the same layout by using different colours, css, back ground image
Do you know any script that i can use to create a subdomain from my script?
thanks for helping
The documentation for SQL Server Float says
Approximate-number data types for use
with floating point numeric data.
Floating point data is approximate;
therefore, not all values in the data
type range can be represented exactly.
Which is what I expected it to say. If that is the case though why does the following return 'Yes' in SQL Server
DECLARE @D float
DECLARE @E float
set @D = 0.1
set @E = 0.5
IF ((@D + @D + @D + @D +@D) = @E)
BEGIN
PRINT 'YES'
END
ELSE
BEGIN
PRINT 'NO'
END
but the equivalent C++ program returns "No"?
#include <iostream>
using namespace std;
int main()
{
float d = 0.1F;
float e = 0.5F;
if((d+d+d+d+d) == e)
{
cout << "Yes";
}
else
{
cout << "No";
}
}
I am thinking of how I can implement std::vector from the ground up.
How does it resize the vector?
realloc only seems to work for plain old stucts, or am I wrong?