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.
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;
}
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?
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
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'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
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?
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?
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 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
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?
i need to bold some text as i add them to the richtextbox control, currently here is my code
With txtDetails
If Not IsNullOrEmpty(title) Then
.SelStart = Len(.Text)
.Text = .Text & title
.SelLength = Len(title)
.SelBold = True
.SelLength = 0
.Text = .Text & vbNewLine
End If
If Not IsNullOrEmpty(value) Then
.Text = .Text & value & vbNewLine
End If
.Text = .Text & vbNewLine
End With
can anyone help me with the fix
i want to insert an array into a mysql table. The array is produced by script scanning all the links, converting into absolute links and then displaying them in an array. i decided to mysql_query the array into the table but now i am stuck. it only posts 'Array', instead of every row from the array into a different row. Any ideas??!
<?php
require_once('simplehtmldom_1_5/simple_html_dom.php');
require_once('url_to_absolute/url_to_absolute.php');
$connect = mysql_connect("xxxx", "xxxx", "xxx") or die('Couldn\'t connect to MySQL Server: ' . mysql_error());
mysql_select_db("xxxx", $connect ) or die('Couldn\'t Select the database: ' . mysql_error( $connect ));
$links = Array();
$URL = 'http://www.theqlick.com'; // change it for urls to grab
// grabs the urls from URL
$file = file_get_html($URL);
foreach ($file->find('a') as $theelement) {
$links[] = url_to_absolute($URL, $theelement->href);
}
print_r($links);
mysql_query("INSERT INTO pages (url) VALUES ('$links[]')");
mysql_close($connect);
I did not forget to add name attributes as is a common problem and yet my serialized form is returning an empty string. What am I doing wrong?
HTML/javascript:
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script>
$( document ).ready( function() {
$('#word_form').submit(function(e) {
e.preventDefault();
console.log($(this).serialize()); //returns an empty string
});
});
</script>
</head>
<body>
<div id="wrapper">
<form name="word_form" id="word_form" method="POST">
<input type="image" name="thumbsUp" id="thumb1" value="1" src="http://upload.wikimedia.org/wikipedia/commons/8/87/Symbol_thumbs_up.svg" style="width:50px;height:50px;">
<input type="image" name="thumbsDown" id="thumb2" value="2" src="http://upload.wikimedia.org/wikipedia/commons/8/84/Symbol_thumbs_down.svg" style="width:50px;height:50px;">
</form>
</div>
</body>
Thanks!
Am developing a firewall application that is suppose to restrict website/protocols/webs directories system wide that i choose
for example
restrict login.domain.com, but not domain.com
restrict domain.com/passport not domain.com
restrict .tld types e.g .org
pls give me some ideas?
[edit]
Am developing on the windows plat form , from win 2000 to win7, using any vb language vb6 upwards also i want to be able to block any protocol http ftp etc.
I am working in Eclipse 3.7.2 on Ubuntu 12.04 with C++. I have read about a few instances where libraries were not being recognized and the majority said to update the Paths and Symbols but that hasn't fixed my issue.
I have 2 projects open in my workspace, one of which is already a completed project that has implemented functions and libraries with no errors from Eclipse. However, when I try to implement some of the same functions or include the same libraries in the 2nd project Eclipse can't resolve them.
For example,
#include <string>
#include <stdio.h>
strstr(p, "<Project>");
The include statement will be accepted and stdio.h will be found but the strstr function is not resolved even though it works fine in the other project.
Any ideas as to why this might be happening? Thanks.
I get this warning when I start debugging. Does anyone know why it's looking in /dev/null for my history.
I know it's some path which was mis-set somewhere but I do not know which?
Any help
Basically, I have an application that uses a flip-book style animation technique. I am simply cycling through around 1000 320x480 pngs at 12fps, and everything works really well. Except for the fact that 1000 images takes up a ton of disk space. Ideally I'd like to be able to compress these images as a movie file and pull out each frame as I need them, or simply play back a movie with frame by frame precision.
Ideas?
I have a logo link that's using a background-image (css sprite). All works fine, but when I try to add a 20px padding to the top of the link (to give it more space for user to click the link), the background image is not moving down. Here is my css:
a {
background-image:url("sprite.png");
background-repeat:no-repeat;
display:block;
height:70px;
width:70px;
padding-top:20px; /* give top of the link more click space */
}
And my html:
<a href="#" style="background-position:0 0;"></a>
What am I doing wrong?
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?
I'm working on a simple JOIN of two tables (urls and companies). I am using this query call:
print $this->_db->select()->from(array('u' => 'urls'),
array('id', 'url', 'company_id'))
->join(array('c' => 'companies'),
'u.company_id = c.id');
which is out putting this query:
SELECT `u`.`id`, `u`.`url`, `u`.`company_id`, `c`.* FROM `urls` AS `u` INNER JOIN `companies` AS `c` ON u.company_id = c.id
Now, I'd prefer the c.* to not actually appear, but either way it doesn't matter. ZF dies with this error:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1"
but I can run that query perfectly fine in my MySQL CLI. Any ideas how to fix up this query?
I want to do the following:
$a = array();
$a[] = array(1,2);
$a[] = array(2,5);
$a[] = array(3,4);
var_dump (in_array(array(2,5), $a));
this returns OK, as it expected, but if the source array is not fully matched:
$a = array();
$a[] = array(1,2, 'f' => array());
$a[] = array(2,5, 'f' => array());
$a[] = array(3,4, 'f' => array());
var_dump (in_array(array(2,5), $a));
it returns false. Is there a way to do it with the built-in way, or I have to code it?