The x-axis is time broken up into time intervals. There is an interval column in the data frame that specifies the time for each row.
Plotting a histogram or line using geom_histogram and geom_freqpoly works great, but I'd like to use geom_density to get a filled area. Perhaps there is a better way to achieve this.
Right now, if I use geom_density, curves are created for each discrete factor level instead of smoothing over all of them.
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.
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.
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.
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?
When setting ExportFormatType.CharacterSeparatedValues crystal report generates every row of data prefixed with column names (Report Headers). Why it does this? How it could be fixed? Usually it is preferred to have single header. For excel export type - generated report looks ok (only single header for all rows).
I am using crystal reports 11.5.3700.0. Visual studio 2008, .net 3.5 sp1
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()
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?
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 an MySQL table with 25000 rows.
This is an imported CSV file so I want to look at the last ten rows to make sure it imported everything.
However, since there is no ID column, I can't say:
SELECT * FROM big_table ORDER BY id DESC
What SQL statement would show me the last 10 rows of this table?
The structure of the table is simply this:
columns are: A, B, C, D, ..., AA, AB, AC, ... (like Excel)
all fields are of type TEXT
I have a table with a column called time, "HH:MM:SS". How can I do a batch update so that the value increment by 1 hour?
Is it something like:
update <table_name> set <time_column> = <time_column> + 3600 where ...
Oracle 9i has not BOOLEAN data type. CheckBoxes in ASP.NET are BOOLEAN controls are they not?
So using a CHAR(1) column with Y or N values in the Oracle table, how do I bind to a CheckBox or CheckBoxList or RadioButton or RadioButtonList control on an ASP.NET 2.0 web form?
I'm using VB, 'specially since I'm a noobie.
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.
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:
OK, i have been doing some work modding a pre-compiled ASP.NET application (VB codebehind) but i have come across something i have never seen before.
When ever theres an error on the loading of a page, the page outputs nothing (no error message, no error message, nothing at all)
firefox displays this error:
XML Parsing Error: no element found
Location: http://site.local/Checkout.aspx
Line Number 1, Column 1:
Because there is no html output.
Is there some sort of setting that im missing that makes IIS/ASP.NET function like this?
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
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 an Activerecord object called Foo:
Foo.attribute_names.each do |attribute|
puts Foo.find(:all)[0].method(attribute.to_sym).call
end
Here I'm calling all attributes on this model (ie, querying for each column value).
However, sometimes, I'll get an undefined method error.
How can ActiveRecord::Base#attribute_names return an attribute name that when converted into its own method call, raises an undefined method error?
Thank
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?
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 ?
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);
A tough SQL question (I'm using postgres by the way).
I need the first row inserted every day for the past X days. one of my columns is a timestamp, which i hold the time inserted, and another column is the row id.
If it's not possible to get the first row inserted every day, i at least need a unique one; a single row for every day for the past x days.
Any suggestions?
Thanks
okie
im doing some practice sql problems
one of the questions is:
Prepare a shipping statement for
customer 'C001' it should show the
date, the legend 'Delivery' and the
total value of the products shipped on
each day.
'delivery' is not a table nor is it a column in any table.
what does legend mean??