Hi in my table , there is columns called time ,
Field type varchar , value like HH:MM , 02-25 ,21-42,07-15
Can u tell me , how to do the order by desc ,
Regards
Bharanikumar
i am trying to persist two entities(with one to many relationship) using jpa but on persit it throws an exception
java.lang.IllegalArgumentException: out of field index :2
i'm struck.
I'm currently a senior in high school, about to matriculate and pursue a major in Computer Science (possibly dual-major with electrical engineering. Comments?). I already program regularly as a hobby, but I would like to get a jump start this summer by perhaps attending a seminar, helping out on an open source project...you know, something legitimate that will bolster my knowledge of the computer science field.
Any ideas?
I need to ensure that a given field does not have more than one space (not concerned about all white space, just space) between characters.
So
'single spaces only'
Needs to turn into
'single spaces only'
The below will not work
select replace('single spaces only',' ',' ')
as it would result in
'single spaces only'
I would really prefer to stick with native TSQL rather than a CLR based solution.
Thoughts?
I have this model:
class Journals(models.Model):
jid = models.AutoField(primary_key=True)
code = models.CharField("Code", max_length=50)
name = models.CharField("Name", max_length=2000)
publisher = models.CharField("Publisher", max_length=2000)
price_euro = models.CharField("Euro", max_length=2000)
price_dollars = models.CharField("Dollars", max_length=2000)
Is there a way to let people fill out either price_euro or price_dollars?
I do know that the best way to solve the problem is to have only one field and another table that specify the currency, but I have constraints and I cannot modify the DB.
Thanks!
I have two customized cells in an iphone UITableViewController and would like to capture the data in one cell into another.....
I am currently unable to post images and pls assume the following points.
There are two custom UITableViewcells
1) Notes Textfield in one customcell
2) Submit button in another text field.
Now i want to pass data typed in the notes textfield to be available when I click the Submit button.... Is this possible? Please help....:(
I have a table in my model named Customers with a field IsActive. Whenever I run a query on Customers, only the active customers should be retrieved. I can include the filter in every query, but that doesn't look very. I would like to be able to override the Customers property at the Object Context lever, but I am not sure if this is possible. Any help would be very appreciated! Thanks
Today's browsers (or HTML < 5) only support HTTP GET and POST, but to communicate RESTful one need PUT and DELETE too. If the workaround should not be to use Ajax, something like a hidden form field is required to overwrite the actual HTTP method.
Rails uses the following trick:
<input name="_method" type="hidden" value="put" />
Is there a possibility to do something similar with JAX-RS?
I'm retrieving an array of objects from a hidden html input field. The string I'm getting is:
"{"id":"1234","name":"john smith","email":"[email protected]"},{"id":"4431","name":"marry doe","email":"[email protected]"}"
Now I need to pass this as an array of objects again. How do I convert this string into array of objects?
Like asked here I got the problem, that I cannot read the value of an input type="text" field after writing something into it.
The event is fired correctly, and with other inputs outside the fancybox it works great.
Hello @,
I am nt able to edit the details in gridview.
When i click on Edit link(Command Field), row editing event is fired but when i click on update link , row editing event is fired again and update event is not getting fired at all.
Any suggestions ??
i want to show multiple pins on my MapView all with Animation of Dropping pin so how it is possible if any body have sample code then please send send link.i am new in this field.Thanks in Advance.
I've got an IDictionary field that I would like to expose via a property of type IDictionary<string, dynamic> the conversion is surprisingly difficult since I have no idea what I can .Cast<>() the IDictionary to.
Best I've got:
IDictionary properties;
protected virtual IDictionary<string, dynamic> Properties {
get {
return _properties.Keys.Cast<string>()
.ToDictionary(name=>name, name=> _properties[name] as dynamic);
}
}
I have a large brown field webforms app that uses ObjectDatasource controls all over the place, which makes refactoring more difficult than it should be.
Is there a way to get a comile-time failures if an object or method is renamed which would cause the ObjectDataSource no longer work? In MVC there is the notion of compiling views, is there a parallel to this for webforms?
Hello,
In some applications like Mail, when you have a UITextField, there is a little + button to the right. When you tap it, a modal view controller comes up which you can select a phone number, address, etc from, and it will appear in the text field. I was wondering how to implement this in my own app. Thanks,
Isaac
Can I use the MVC 2 DataAnnotations to specify a minimum length for a string field?
Has anyone done this or have they created custom attributes and if so do you mind sharing the source?
Hi There
I have a script:
<script type="text/javascript">
$(document).ready(function(){
$("#PrincipleMember_IdNumber").autocomplete({
close: function(event, ui) {
var member = {};
member.IDNumber = $("#PrincipleMember_IdNumber").val();
$.getJSON("<%= Url.Action("MemberLookup","Member") %>", member, function(data) {
$("#PrincipleMember_Firstname").val(data.FirstName);
});
}
});
});
A form:
<fieldset class="fieldsetSection">
<legend>Principle Member</legend>
<table>
<tr>
<td width="150px" class="editor-label"><%=Html.LabelFor(l=>l.PrincipleMember.IdNumber)%></td>
<td class="editor-field"><%= Html.AutoCompleteTextBoxFor(i => i.PrincipleMember.IdNumber, "IdNumber", "AutoComplete")%></td>
<td><%=Html.ValidationMessageFor(v => v.PrincipleMember.IdNumber)%></td>
</tr>
<tr>
<td width="150px" class="editor-label"><%=Html.LabelFor(l=>l.PrincipleMember.Firstname)%></td>
<td class="editor-field"><%=Html.TextBoxFor(t => t.PrincipleMember.Firstname)%></td>
<td><%=Html.ValidationMessageFor(v => v.PrincipleMember.Firstname)%></td>
</tr>
</table>
and finally a json result action:
public JsonResult MemberLookup(Member member)
{
member = _memberRepository.GetMember(member.IDNumber);
return this.Json(member);
}
my json result is executed perfectly and i get a result, but for some reason this section of the script is not executing: $("#PrincipleMember_Firstname").val(data.FirstName);
i've tried replacing it with an alert();, but that too is not executing.
Can anyone see what i am doing wrong here?
When user start typing in their username in textBox field, a dropdown list shows old data. How can I clear this?. It's a class room and many students logs in from the same pc everyday, I don't want the student to see his mates usernames.
I have an Excel VBA add-in with a public method in a bas file. This method currently creates a VB6 COM object, which exists in a running VB6 exe/vbp. The VB6 app loads in data and then the Excel add-in method can call methods on the VB6 COM object to load the data into an existing Excel xls. This is all currently working.
We have since converted our VB6 app to C#.
My question is: What is the best/easiest way to mimic this behavior with the C#/.NET app?
I'm thinking I may not be able to pull the data from the .NET app into Excel from the add-in method since the .Net app needs to be running with data loaded (so no using a stand-alone C# class library). Maybe we can, instead, push the data from .NET to Excel by accessing the VBA add-in method from the C# code?
The following is the existing VBA method accessing the VB6 app:
Public Sub UpdateInDataFromApp()
Dim wkbInData As Workbook
Dim oFPW As Object
Dim nMaxCols As Integer
Dim nMaxRows As Integer
Dim j As Integer
Dim sName As String
Dim nCol As Integer
Dim nRow As Integer
Dim sheetCnt As Integer
Dim nDepth As Integer
Dim sPath As String
Dim vData As Variant
Dim SheetRange As Range
Set wkbInData = wkbOpen("InData.xls")
sPath = g_sPathXLSfiles & "\"
'Note: the following will bring up fpw app if not already running
Set oFPW = CreateObject("FPW.CProfilesData")
If oFPW Is Nothing Then
MsgBox "Unable to reference " & sApp
Else
.
.
.
sheetCnt = wkbInData.Sheets.Count 'get number of sheets in indata workbook
For j = 2 To sheetCnt 'set counter to loop over all sheets except the first one which is not input data fields
With wkbInData.Worksheets(j)
Set SheetRange = .UsedRange
End With
With SheetRange
nMaxRows = .Rows.Count 'get range of sheet(j)
nMaxCols = .Columns.Count 'get range of sheet(j)
Range(.Cells(2, 2), .Cells(nMaxRows, nMaxCols)).ClearContents 'Clears data from data range (51 Columns)
Range(.Cells(2, 2), .Cells(nMaxRows, nMaxCols)).ClearComments
End With
With oFPW 'vb6 object
For nRow = 2 To nMaxRows ' loop through rows
sName = SheetRange.Cells(nRow, 1) 'Field name
vData = .vntGetSymbol(sName, 0) 'Check if vb6 app identifies the name
nDepth = .GetInputTableDepth(sName) 'Get number of data items for this field name from vb6 app
nMaxCols = nDepth + 2 'nDepth=0, is single data item
For nCol = 2 To nMaxCols 'loop over deep screen fields
nDepth = nCol - 2 'current depth
vData = .vntGetSymbol(sName, nDepth) 'Get Data from vb6 app
If LenB(vData) > 0 And IsNumeric(vData) Then 'Check if data returned
SheetRange.Cells(nRow, nCol) = vData 'Poke the data in
Else
SheetRange.Cells(nRow, nCol) = vData 'Poke a zero in
End If
Next 'nCol
Next 'nRow
End With
Set SheetRange = Nothing
Next 'j
End If
Set wkbInData = Nothing
Set oFPW = Nothing
Exit Sub
.
.
.
End Sub
Any help would be appreciated.
Hi,
I have a few classes:
Article
-------
Content
ID
Magazine
--------
Name
Code
And 3 tables in database:
Articles
Magazines
ArticlesInMagazines (two fields: IDArticle and CodeMagazine)
In my app, I've got a module to manage Articles, and a datagridview to relate their associated magazines
DataGridView has twofields:
MagazineCode
IsPublished (indicates articles which have been published in this magazine).
The same article can be in many magazines (1:n)
How would you implement on model ?
Article have to has a field : List ??
I am concerned because Magazine associates Articles
Hi all, another question about jqgrid.
I have a jqgrid table and i have a button in each row. When user clicks on that button, i need to call an action in my mvc controller and i need to change value of my object's field from true to false or opposite and then reload grid.
What is the best way to implement this?
Thanks.
In my MySQL database, I have the following column type.
Field | Type | Null |
----------------------------------
Column_priv | set('Select','Insert','Update','References') | No |
And I cannot figure out what to map this to.
Can anyone tell me how I can map this to something?
On a form I'm working on, Chrome is auto-filling the email and password fields. This is fine, however, Chrome changes the background colour to a pale yellow colour.
The design I'm working on is using light text on a dark background, so this really messes up the look of the form - I have stark yellow boxes and near-invisible white text. Once the field is focused, the fields return to normal.
Is it possible to stop Chrome changing the colour of these fields?