row

Complicated select query for a simple in/out record

£可爱£侵袭症+ 提交于 2020-01-05 08:43:15
问题 I am making a simple time in and time out system. I have 3 pairs of in/out. emp_id td_id status timestamp remarks 35 1 in 2013-12-19 10:15:09 late 35 2 out 2013-12-19 12:00:23 example 35 3 in 2013-12-19 13:00:23 35 4 out 2013-12-19 16:01:47 35 5 in 2013-12-19 18:01:17 35 6 out 2013-12-19 22:01:07 35 7 in 2013-12-20 10:00:12 Here's my query: SELECT a1.emp_id, a1.status, a1.timestamp, a2.status, a2.timestamp, a3.status, a3.timestamp, a4.status, a4.timestamp, a5.status, a5.timestamp, a6.status,

How to get row number via LINQ using Entity framework?

不打扰是莪最后的温柔 提交于 2020-01-04 17:49:29
问题 Hope someone can help me out here as I'm a little stuck. I'm building a service in front of a hiscore database for a game. The database have the following two tables: CREATE TABLE [dbo].[PB_HiscoreEntry] ( [Id] UNIQUEIDENTIFIER NOT NULL, [PlayerId] UNIQUEIDENTIFIER NOT NULL, [Score] INT NOT NULL, [DateCreated] DATETIME NOT NULL ); CREATE TABLE [dbo].[PB_Player] ( [Id] UNIQUEIDENTIFIER NOT NULL, [UniquePlayerId] NCHAR (32) NOT NULL, [Name] NVARCHAR (50) NOT NULL, [DateCreated] DATETIME NOT

DELETE FROM … reporting syntax error at or near “.”

自古美人都是妖i 提交于 2020-01-04 14:17:08
问题 I'm trying to delete just one data from my DB, but, when I write the command I keep getting that there's some syntax error, could you tell me where is the error? This are the commands I've tried: DELETE FROM database_userprofile WHERE user.username = 'some'; ERROR: syntax error at or near "." LINE 1: DELETE FROM database_userprofile WHERE user.username = 'some'... DELETE FROM database_userprofile USING database_user WHERE user.username="some"; ERROR: syntax error at or near "." LINE 1: ...

How to conditionally render or style a row of primefaces dataTable?

好久不见. 提交于 2020-01-04 05:30:10
问题 Inside my p:dataTable , I am trying to render only the rows I need. Code: <h:form id="f"> <p:dataTable var="order" value="#{mbOrderController.ordersList}"> <f:facet name="header">#{msg.orders}</f:facet> <p:column sortBy="#{order.orderNr}" headerText="#{msg.order_number}"> <p:outputLabel value="#{order.orderNr}" rendered="#{order.type.label == 'Shoes'}" /> </p:column> <p:column sortBy="#{order.date}" headerText="#{msg.date}"> <p:outputLabel value="#{order.date}"> <f:convertDateTime pattern="dd

MatLab - Applying a function to each row in a matrix

北慕城南 提交于 2020-01-04 04:46:27
问题 I have a matrix with rows of 4 integers, with an unspecified number of columns (depends on the text file). I'm wanting to apply a function to each row of the matrix, independently. The function has 4 inputs, and 2 outputs. I'm trying to use the arrayfun function to do this, but whenever I call the function, I get an error saying: "Not enough input arguments." Here is the function call: [gain,phase]=arrayfun(@(x) GainPhaseComp(B(x,1:4)), 1:size(B)); where b is an n by 4 matrix. Here is the

Drop row based on time

大兔子大兔子 提交于 2020-01-04 04:32:08
问题 I want to know how to drop row based on time column. My dataframe: df ID Time ID1 9:00:00 ID2 10:00:00 ID3 11:00:00 ID4 12:00:00 ID5 13:00:00 ID6 14:00:00 ID7 15:00:00 ID8 16:00:00 ID9 17:00:00 I want to eliminate row below than 11:00:00 and above 15:00:00, so expected a result: Result ID Time ID3 11:00:00 ID4 12:00:00 ID5 13:00:00 ID6 14:00:00 ID7 15:00:00 I use this code but nothing happens. df = pd.read_csv('data.csv') index_list= df.Time[(df.Time < "09:00:00") & (df.Time > "17:00:00")]

Copying rows into one cell VBA [duplicate]

耗尽温柔 提交于 2020-01-03 05:32:27
问题 This question already has answers here : How to merge rows in a column into one cell in excel? (9 answers) Closed 3 years ago . I've a worksheet with various values in only one column like: A B C D E F ... And I need a write a simple code that will put this all together in one cell (for example D2) and that cell I want to have a value: A;B;C;D;E;F;... I think it's quite easy, but I'm too ill to think about it, would you help? :( 回答1: In a simple form, the following VBA macro can do the job

Cannot initialize Row Reordering plugin - rowReordering is not a function

自作多情 提交于 2020-01-03 02:29:51
问题 I'm using jQuery DataTables with Row Reordering add-on and for some reason I receive the following error message: Uncaught TypeError: $(...).DataTable(...).rowReordering is not a function when doing this: $(document).ready(function() { $('#demo').html('<table cellpadding="0" cellspacing="0" border="0" class="display cell-border" id="example" ></table>'); t = $('#example').DataTable({ "columns": [ {width: "10%", "className": "ageClass", "title": "Priority", "data": "priority" }, {"className":

How to calculate the similarity for all the rows in a table in R?

删除回忆录丶 提交于 2020-01-03 02:22:14
问题 I would like to calculate the similarity (Numerical measure of how alike 2 data objects are - in this case, how alike 2 rows are) of each row in a table, and the table will be like: vhigh,vhigh,2,2,small,low,unacc vhigh,vhigh,2,2,small,med,unacc vhigh,vhigh,2,2,small,high,unacc vhigh,vhigh,2,2,med,low,unacc vhigh,vhigh,2,2,med,med,unacc vhigh,vhigh,2,2,med,high,unacc vhigh,vhigh,2,2,big,low,unacc vhigh,vhigh,2,2,big,med,unacc vhigh,vhigh,2,2,big,high,unacc I tried many different ways on the

how to next detailView like in Mail-App

空扰寡人 提交于 2020-01-02 23:01:28
问题 i want to jump in my detailview through the rows of my tableview. passing the data from the tableview to detailview works fine. passing the indexpath.row working fine, too. in the detailview i can change the indexpath of the row and by returning to the tableview the changed row is selected right. And my problem is that i cant view the data of new selected row in the detailview. i hope you understand what i am trying to do :) for example like in the mail app: i want to push the "next" button