Hi,
I am developing an application in Netbeans, and it is using JavaDB. I can connect to it and execute queries without issues, but for some reason, the "Output - JavaDB Database Process" pane within Netbeans keeps displaying
Security manager installed using the Basic server security policy.
Could not listen on port 1527 on host localhost:
java.net.BindException: Address already in use
How do I find out what process is already using, or bound to that port?
On Ubuntu Karmic, Netbeans 6.7.1
Is there a way to know if all the properties in an object are empty. My object represents fields from database and I want to know if a particular record is present or not. NULL doesnt seem to work.
I need help converting this SQL statement, into EF4:
Select Posts.PostID, Post, Comment
from Posts left join
Comments on posts.PostID = Comments.PostID
Where CommentID not in
(
Select PostID
from Votes
where VoteTypeID = 4 --4 = flagged comment type
)
In my database, the Votes table stores either the PostID of reported posts, or CommentID of reported comments in the column Votes.PostID
Thanks in advance!
Hello, I have a listview with a custom BaseAdapter. Each row of the listview has a TextView and a CheckBox.
The problem is when I click (or touch) any row, the textview foreground becomes gray, instead of the default behavior (background - green, textview foreground - white).
Here is the code:
row.xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/layout">
<TextView android:id="@+id/main_lv_item_textView"
style="@style/textViewBig"
android:layout_alignParentLeft="true"/>
<CheckBox android:id="@+id/main_lv_item_checkBox"
style="@style/checkBox"
android:layout_width="wrap_content"
android:layout_alignParentRight="true"/>
</RelativeLayout>
Custom Adapter:
public class CustomAdapter extends BaseAdapter {
private List<Profile> profiles;
private LayoutInflater inflater;
private TextView tvName;
private CheckBox cbEnabled;
public CustomAdapter(List<Profile> profiles) {
this.profiles = profiles;
inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
public int getCount() {
return profiles.size();
}
public Object getItem(int position) {
return profiles.get(position);
}
public long getItemId(int position) {
return position;
}
public View getView(final int position, View convertView, ViewGroup parent) {
View row = inflater.inflate(R.layout.main_lv_item, null);
final Profile profile = profiles.get(position);
tvName = (TextView) row.findViewById(R.id.main_lv_item_textView);
registerForContextMenu(tvName);
cbEnabled = (CheckBox) row.findViewById(R.id.main_lv_item_checkBox);
tvName.setText(profile.getName());
if (profile.isEnabled()) {
cbEnabled.setChecked(true);
}
tvName.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Bundle bundle = new Bundle();
bundle.putString(PROFILE_NAME_KEY, profile.getName());
Intent intent = new Intent(context, GuiProfile.class);
intent.putExtras(bundle);
startActivity(intent);
}
});
tvName.setOnLongClickListener(new OnLongClickListener() {
public boolean onLongClick(View v) {
selectedProfileName = ((TextView) v).getText().toString();
return false;
}
});
cbEnabled.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (!profile.isEnabled()) {
for (Profile profile : profiles) {
if (profile.isEnabled()) {
profile.setEnabled(false);
Database.getInstance().storeProfile(profile);
}
}
}
profile.setEnabled(isChecked);
Database.getInstance().storeProfile(profile);
updateListView();
}
});
return row;
}
}
Any help would be appreciated.
is it possible for me to intercept the text messages that get sent to my cellphone if i connect to my cellphone via bluetooth or USB or some other connection to my computer?
i want to create a database with all of my received text messages and be able to control my cell phone through my computer by using it to send text messages
i have a regular motorola flip phone
Hello,
I'm trying to perform database migration from the command line using
"php doctrine generate-migrations-diff", it just gives me the error:
"Could not generate migration classes from difference"
Is there anyone having the same issue?
I'm using Zend Framework + Doctrine 1.2.2
Thanks.
I'm working with an existing database where all dates are stored as integers in the following format: yyyy[3 digit day of year].
For example:
2010-01-01 == 2010001
2010-12-31 == 2010356
I'm using the following SQL to convert to a datetime:
DATEADD(d,
CAST(SUBSTRING(
CAST(NEW_BIZ_OBS_DATE AS VARCHAR), 5, LEN(NEW_BIZ_OBS_DATE) - 4
) AS INT) - 1,
CAST('1/1/' + SUBSTRING(CAST(NEW_BIZ_OBS_DATE AS VARCHAR),1,4) AS DATETIME))
Does anyone have a more concise way to do this?
Hi guys,
I am running a .net 4.0 app, Access Database on a Win 7 x64 bit OS + Office 2010(64 bit compatible provider Microsoft.ACE.OLEDB.12.0 )
Platform target x86:
Provider problem:
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine
Platform target x64 or Any CPU:
Dll problem:
System.BadImageFormatException: Could not load file or assembly 'Interop.SHDocVw, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
I'm trying to open names.nsf in code. The piece of code has been working for a while but suddenly, I'm getting null. Any idea why? I don't seem to be getting any errors and I don't know how to work out what's wrong.
I can open the database from the Notes client on the same machine.
Hi
I'm across winforms currently but want to write an app that users will have a LAN/WAN between them and database.
So assuming I need to use WCF if I stick with winforms as the UI, or go ASP.net and go web, THEN which of these two approaches would be the easier rampup
approach for me?
Note wanted to use Entity Framework.
I have a single MYSQL Question and need help ASAP.
Database:
Email | Name | Tag
[email protected] |Test Person | TagOne
[email protected] |Test Person | Tag Two
Need an SQL query that will return
Email | Name | Tag
[email protected] |Test Person | TagOne, Tag Two
Any help?
I am searching for an Tool to test an Grails Wep Application on a Tomcat Server.
I need some Data about the Performance when 30 Users work with my app.(Creating/Editing/Deleting Entries on my Database (Firebird).
Is it possible to create Selenium tests using the Firefox plugin that use randomly generated values to help do regression tests?
The full story:
I would like to help my clients do acceptance testing by providing them with a suite of tests that use some smarts to create random (or at least pseudo-random) values for the database. One of the issues with my Selenium IDE tests at the moment is that they have predefined values - which makes some types of testing problematic.
I've got a piece of tracking code which is capturing REMOTE_HOST, SERVER, REQUEST_METHOD, SCRIPT_NAME and QUERY_STRING. It grabs these from ServerVariables and sticks them in a database by user and IP.
What is the best way to pick up the exact contents of what was posted back to a URL in ASP.NET? Is there an HTTP_POST? I'd rather not grab something and then have to parse it.
I have a system that uses an mdb database with an xsd descriptor written in c#. Now I want to use one or more xml files with the same data instead. I have generated a couple of adapters for the mdb, but now I don't know what is needed for using xml instead. Anyone have some tips? I have managed to save the mdb as a few xml files.
What is the standard format for datetime with timezone in a C# ASP.NET application?
Updated to clarify: In ASP.NET I need to check a datetime from a Domino database against a .NET DateTime. The client is asking what would be the best format in which he should provide the datetime with the timezone. Meaning which format is most easily readable by .NET?
Hey guys, there is a form where the user select some of his friends and I'm curious on how I can implement a list that searches simultaneously while the user is typing a friend's name and when he selects the name the name is written in the text box(jQuery). And if the user wants to select more than one friend, when I'm inserting the names in the database, how can I separate the names that are written in one input field?
Assume that the following MySQL files have been restored from a backup tape:
tablename.frm
tablename.ibd
Furthermore, assume that the MySQL installation was running with innodb_file_per_table and that the database was cleanly shutdown with mysqladmin shutdown.
Given a fresh install of the same MySQL version that the restored MySQL files were taken from, how do I import the data from tablename.ibd/tablename.frm into this new install?
I am planning on storing scans from a mass spectrometer in a MySQL database and
would like to know whether storing and analyzing this amount of data is remotely
feasible. I know performance varies wildly depending on the environment, but I'm
looking for the rough order of magnitude: will queries take 5 days or 5
milliseconds?
Input format
Each input file contains a single run of the spectrometer; each run is comprised
of a set of scans, and each scan has an ordered array of datapoints. There is a
bit of metadata, but the majority of the file is comprised of arrays 32- or
64-bit ints or floats.
Host system
|----------------+-------------------------------|
| OS | Windows 2008 64-bit |
| MySQL version | 5.5.24 (x86_64) |
| CPU | 2x Xeon E5420 (8 cores total) |
| RAM | 8GB |
| SSD filesystem | 500 GiB |
| HDD RAID | 12 TiB |
|----------------+-------------------------------|
There are some other services running on the server using negligible processor
time.
File statistics
|------------------+--------------|
| number of files | ~16,000 |
| total size | 1.3 TiB |
| min size | 0 bytes |
| max size | 12 GiB |
| mean | 800 MiB |
| median | 500 MiB |
| total datapoints | ~200 billion |
|------------------+--------------|
The total number of datapoints is a very rough estimate.
Proposed schema
I'm planning on doing things "right" (i.e. normalizing the data like crazy) and
so would have a runs table, a spectra table with a foreign key to runs,
and a datapoints table with a foreign key to spectra.
The 200 Billion datapoint question
I am going to be analyzing across multiple spectra and possibly even multiple
runs, resulting in queries which could touch millions of rows. Assuming I index
everything properly (which is a topic for another question) and am not trying to
shuffle hundreds of MiB across the network, is it remotely plausible for MySQL
to handle this?
UPDATE: additional info
The scan data will be coming from files in the XML-based
mzML format. The meat of this format is in the
<binaryDataArrayList> elements where the data is stored. Each scan produces =
2 <binaryDataArray> elements which, taken together, form a 2-dimensional (or
more) array of the form [[123.456, 234.567, ...], ...].
These data are write-once, so update performance and transaction safety are not
concerns.
My naïve plan for a database schema is:
runs table
| column name | type |
|-------------+-------------|
| id | PRIMARY KEY |
| start_time | TIMESTAMP |
| name | VARCHAR |
|-------------+-------------|
spectra table
| column name | type |
|----------------+-------------|
| id | PRIMARY KEY |
| name | VARCHAR |
| index | INT |
| spectrum_type | INT |
| representation | INT |
| run_id | FOREIGN KEY |
|----------------+-------------|
datapoints table
| column name | type |
|-------------+-------------|
| id | PRIMARY KEY |
| spectrum_id | FOREIGN KEY |
| mz | DOUBLE |
| num_counts | DOUBLE |
| index | INT |
|-------------+-------------|
Is this reasonable?
I have a string like this, stored in the database:
< %@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %
< %= Html.Encode("< strong hello< /strong ") %
How can I render this to the page?
this is my function for plotting a graph in vb.net how I'm going to replace the ("Jon", 10),("Jordan", 30) with a value that i search from database ?
Private Sub chart_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chart_btn.Click
Chart1.Series("Student").Points.AddXY("Jon", 10)
Chart1.Series("Student").Points.AddXY("Jon", 10)
Chart1.Series("Student").ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Bar
End Sub
I am pulling a long timestamp from a database, but want to present it as a Date using Tags only, no embedded java in the JSP. I've created my own tag to do this because I was unable to get the parseDate and formatDate tags to work, but that's not to say they don't work.
Any advice?
Thanks.