We are having a table of elements in SysListView32. Actually they are a table arranged under 5 columns. How to access 3rd column in the table in SysListView32?
I'm trying to sort a column of data in a GTK tree view non-alphabetically. I can't seem to find a function in the GTK+ libraries that cant do such a thing.
Does anyone here know of a way to do this?
I am currently html encoding all user entered text before inserting/updating a db table record. The problem is that on any subsequent updates, the previously encoded string is reencoded. This endless loop is starting to eat up alot of column space in my tables. I am using parameterized queries for all sql statements but am wondering would it be safe to just let the .NET Framework handle this part without the HTML Encoding?
there are code snippets that strip the invalid characters inside a string before we save it as an XML ... but I have one more problem: Let's say my user wants to have a column name like "[MyColumnOne] ...so now I do not want to strip these "[","] well because these are the ones that user has defined and wants to see them so if I use some codes that are stripping the invalid characters they are also removing "[" and "[" but in this case I still need them to be saved... what can I do?
Hi,
I have the fallowing stored procedure:
CREATE PROCEDURE `get`(IN tb VARCHAR(50), IN id INTEGER)
BEGIN
SELECT * FROM tb WHERE Indx = id;
END//
When I call get(user,1) I get the following:
ERROR 1054 (42S22): Unknown column 'user' in 'field list'
I have been able to read an excel cell value with xlrd using column and row numbers as inputs. Now I need to access the same cell values in some spreadsheets that were saved in .ods format.
So for example, how would I read the value stored in cell E10 from a .ods file from python?
I have a table t with a column c, which is an int and has a btree index on it.
Why does the following query not utilize this index?
explain select c from t group by c;
The result I get is:
HashAggregate (cost=1005817.55..1005817.71 rows=16 width=4)
-> Seq Scan on t (cost=0.00..946059.84 rows=23903084 width=4)
My understanding of indexes is limited, but I thought such queries were the purpose of indexes.
I have the following columns in TableA
TableA
Column1 varchar
Column2 int
Column3 bit
I am using this statement
IF Column3 = 0
SELECT Column1, Column2 FROM
TableA WHERE
Column2 > 200
ELSE
SELECT Column1, Column2 FROM
TableA WHERE
Column2 < 200
But the statment does not compile. It says Invalid Column Name 'Column3'
In Alex the generated boilerplate code includes
data AlexPosn = AlexPn !Int -- absolute character offset
!Int -- line number
!Int -- column number
What does the ! in front of the Int indicate?
Is it a good practice to initialize columns that we can know their values in database, for example identity columns of type unique identifier can have a default value (NEWID()), or columns that shows the record create date can have a default value (GETDATE()).
Should I go through all my tables and do this whereever I am sure that I won't need to assign the value manually and the Auto-generated value is correct.
I am also thinking about using linq-to-sql classes and setting the "Auto Generated Value" property of these columns to true.
Maybe this is what everybody already knows or maybe I am asking a question about a fundamental issue, if so please tell me.
In SQL Server, is there any way to check whether the changes in the schema will impact Stored Procedures (and/or Views)?
For example a change of the column name in one table, may break some Stored Procedures; how to check the impacted stored procs?
Hello,
i need to realize an app for Android using this background image:
Over every cell i have to draw a TextView, but i don't know how to do it with the different screens; i have the background image with 3 resolutions (240x320, 320x480, 480x800) but i don't know what kind of layout to use; i would use GridView but i don't know if i can work with different column size.
Can anyone help me?
Thanks in advance
Is it possible to create a table which has a check constraint on one of the column whose value lies within the result set given by another sql query
eg.
create table tablename
(
name varchar(10),
rollno int
)check rollno in (select rollno from anotherDatabase.TableName,candidateRoll)
or any thing like that.
I dont have to use it anywhere but still want to know.
Say I have a file of this format
12:04:21 .3
12:10:21 1.3
12:13:21 1.4
12:14:21 1.3
..and so on
I want to find repeated numbers in the second column for, say, 10 consequent timestamps, thereby finding staleness.
and I want to output the beginning and and end of the stale timestamp range
Can someone help me come up with it?
You can use awk, bash
Thanks
How can I plot (a 3D plot) a matrix in Gnuplot having such data structure. I cannot find a way to use the first row and column as a x and y ticks (or to ignore them)
,5,6,7,8
1,-6.20,-6.35,-6.59,-6.02
2,-6.39,-6.52,-6.31,-6.00
3,-6.36,-6.48,-6.15,-5.90
4,-5.79,-5.91,-5.87,-5.46
Is the splot 'data.csv' matrix the correct parameter to use ?
I am using a list view inside that in item template i am using a label and a checkbox.
I want that whenever user clicks on the check box the value should be updated in a table.i am using a datakeys in listview.on the basis of datakey value should be updated in the table
query is
string updateQuery = "UPDATE [TABLE] SET [COLUMN] = " +
Convert.ToInt32(chk.Checked) + " WHERE PK_ID =" + dataKey + " ";
also i want some help in displaying the result as it is inside the table.means if the value for column in table for a particular pkid is 1 then the checkbox shoul be checked.
here is the code snippet
<asp:ListView ID="lvFocusArea" runat="server"
DataKeyNames="PK_ID" onitemdatabound="lvFocusArea_ItemDataBound" >
<LayoutTemplate>
<table border="0" cellpadding="1" width="400px">
<tr style="background-color: #E5E5FE">
<th align="left">
Focus Area
</th>
<th>
Is Current Focused
</th>
</tr>
<tr id="itemPlaceholder" runat="server">
</tr>
</table>
</LayoutTemplate>
<ItemTemplate>
<tr>
<td width="80%">
<asp:Label ID="lblFocusArea" runat="server" Text=""><%#Eval("FOCUS_AREA_NAME") %></asp:Label>
</td>
<td align="center" width="20%">
<asp:CheckBox ID="chkFocusArea" runat="server" OnCheckedChanged="chkFocusArea_CheckedChanged"
AutoPostBack="true"/>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr style="background-color: #EFEFEF">
<td>
<asp:Label ID="lblFocusArea" runat="server" Text=""><%#Eval("FOCUS_AREA_NAME") %></asp:Label>
</td>
<td align="center">
<asp:CheckBox ID="chkFocusArea" runat="server" oncheckedchanged="chkFocusArea_CheckedChanged" AutoPostBack="true" />
</td>
</tr>
</AlternatingItemTemplate>
<SelectedItemTemplate>
<td> item selected</td>
</SelectedItemTemplate>
</asp:ListView>
help me.
Need some help on understanding how to do this; I'm going to be running recursive 'find' on a file system and I want to keep the information in a single DB table - with a self-referencing hierarchial structure:
This is my DB Table structure I want to populate.
DirObject Table:
id int NOT NULL,
name varchar(255) NOT NULL,
parentid int NOT NULL);
Here is the proposed Java Class I want to map (Fields only shown):
public DirObject {
int id;
String name;
DirObject parent;
...
For the 'root' directory was going to use parentid=0; real ids will start at 1, and ideally I want hibernate to autogenerate the ids.
Can somebody provide a suggested mapping file for this please; as a secondary question I thought about doing the Java Class like this instead:
public DirObject {
int id;
String name;
List<DirObject> subdirs;
Could I use the same data model for either of these two methods ? (With a different mapping file of course).
--- UPDATE: so I tried the mapping file suggested below (thanks!), repeated here for reference:
<hibernate-mapping>
<class name="my.proj.DirObject" table="category">
...
<set name="subDirs" lazy="true" inverse="true">
<key column="parentId"/>
<one-to-many class="my.proj.DirObject"/>
</set>
<many-to-one name="parent"
class="my.proj.DirObject"
column="parentId" cascade="all" />
</class>
...and altered my Java class to have BOTH 'parentid' and 'getSubDirs' [returning a 'HashSet'].
This appears to work - thanks, but this is the test code I used to drive this - I think I'm not doing something right here, because I thought Hibernate would take care of saving the subordinate objects in the Set without me having to do this explicitly ?
DirObject dirobject=new DirObject();
dirobject.setName("/files");
dirobject.setParent(dirobject);
DirObject d1, d2;
d1=new DirObject(); d1.setName("subdir1"); d1.setParent(dirobject);
d2=new DirObject(); d2.setName("subdir2"); d2.setParent(dirobject);
HashSet<DirObject> subdirs=new HashSet<DirObject>();
subdirs.add(d1);
subdirs.add(d2);
dirobject.setSubdirs(subdirs);
session.save(dirobject);
session.save(d1);
session.save(d2);
Hi,
In my table I have a date column which the date is displayed in the format "2009-11-18 10:55:28.370"
How can just get the date value of this field in a select statement. e.g.
select id from risks, where creation_date = getdate()
Hi,
I was wondering if this is possible.
The serialize-string will be inserted in a mySQL-database, so it would be fine if all checkboxes would be inserted and not only the ones that is ticked(on).
it's possible to make on column in the database for each of the checkboxes, and use this if/else-statement:
if(isset($_GET['checkbox'])) {
// It's checked!
}
else {
// not checked!
}
but its a bit unappropriate...
I have two tables (tbl and tbl_new) that both use the same sequence (tbl_id_seq). I'd like to drop one of those tables. On tbl, I've removed the modifier "not null default nextval('tbl_id_seq'::regclass)" but that modifier remains on tbl_new. I'm getting the following error:
ERROR: cannot drop table tbl because other objects depend on it
DETAIL: default for table tbl_new column id depends on sequence tbl_id_seq
After reviewing http://www.postgresql.org/docs/9.1/static/sql-droptable.html
It looks like there is only CASCADE and RESTRICT as options.
I have a field URL countryURL; in a Country class. I want to store its data into a COUNTRY table in a database through Hibernate.
Which Hibernate type I should use in the hibernate mapping file
<property column="COUNTRY_URL" name="countryURL" type="..."/>
It is not excepting string and text type.
I got the following error mesage :
java.lang.UnsupportedOperationException
org.datanucleus.store.appengine.EntityUtils.getPropertyName(EntityUtils.java:62)
org.datanucleus.store.appengine.DatastoreFieldManager.storeObjectField(DatastoreFieldManager.java:839)
org.datanucleus.state.AbstractStateManager.providedObjectField(AbstractStateManager.java:1037)
PayPal_Monitor.Contact_Info_Entry.jdoProvideField(Contact_Info_Entry.java)
PayPal_Monitor.Contact_Info_Entry.jdoProvideFields(Contact_Info_Entry.java)
org.datanucleus.state.JDOStateManagerImpl.provideFields(JDOStateManagerImpl.java:2715)
Could it be caused by my Contact_Info_Entry.java ?
It looks like this :
@PersistenceCapable(identityType=IdentityType.APPLICATION)
public class Contact_Info_Entry implements Serializable
{
@PrimaryKey
@Persistent(valueStrategy=IdGeneratorStrategy.IDENTITY)
Long Id;
public static final long serialVersionUID=26362862L;
@Persistent
String Contact_Id="";
...
}
Basically I'm a tad confused. You'll see at http://furnace.howcode.com , in the second column, the bottom scrollbar button is extended slightly beyond the end of the viewport. I'm pretty confused as I've been examining the CSS and can't find anything that's causing this.
Can you have a look? It's probably something simple that I've just missed! :)
Screenshot:
we have several pages as tabs where datatable is used in most of the pages.when we sort on a particular coulmn and exit the page and re enter this page the arrow appears(up /down based on how we left) Although the data is not sorted in the direction the arrow shows.i have set preserveSort and preserveDataMode to false. The arrow is set to true in the column's t:commandSortHeader tag in all the pages. is this a bug or am i missing any setting?I have tried to set forceId to false in t:commandSortHeader but of now use.