Image url in Css file under stylesheets under public Rails 2.3
I am working with Rails 2.3.5 and I have images in public/images/ which
are added into css file named as custom.css
#cssmenu ul {
background: url(nav-bg.png) repeat-x 0px 4px;
height: 69px;
}
How can i make this read the image which in inside public/images ? I have
tried this but it did not work
#cssmenu ul {
background: url(<%= asset_path '/images/nav-bg.png' %>) repeat-x 0px 4px;
height: 69px;
}
Friday, 23 August 2013
What is the proper way to manually check and uncheck a RadioButton when the AutoCheck property is set to false in C#?
What is the proper way to manually check and uncheck a RadioButton when
the AutoCheck property is set to false in C#?
I have a set of radio buttons, and two of them need to prompt the user
with a confirmation dialog before allowing the value to change. To do
this, I handle the click event and set the AutoCheck property to false on
each of these radio buttons. However, the previously selected RadioButtons
are no longer unchecked when I set the check property to true on the
clicked RadioButton.
Right now I'm just looping through the controls on this panel and making
sure none of the other RadioButtons are checked, but is there a more
efficient way to do this?
the AutoCheck property is set to false in C#?
I have a set of radio buttons, and two of them need to prompt the user
with a confirmation dialog before allowing the value to change. To do
this, I handle the click event and set the AutoCheck property to false on
each of these radio buttons. However, the previously selected RadioButtons
are no longer unchecked when I set the check property to true on the
clicked RadioButton.
Right now I'm just looping through the controls on this panel and making
sure none of the other RadioButtons are checked, but is there a more
efficient way to do this?
Get the value of the Item in the Listview
Get the value of the Item in the Listview
I have an array of Strings i.e. String [] values ={"Adult 1","Adult
2","Child 1","Child 2","Infant 1","Infant 1"};
With this array I am creating a listView . On click on a listview item, I
am opening a custom dialog that have 2 edit text and on TextView.
So click on the item I want to set the value of edit text with the value
of item, if it is not Adult, Child or Infant.
And I also want to check - if the item is not adult, I have to set the
visibility of textview in the custom dialog visible.
How could I do this?
listView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
}
});
I have an array of Strings i.e. String [] values ={"Adult 1","Adult
2","Child 1","Child 2","Infant 1","Infant 1"};
With this array I am creating a listView . On click on a listview item, I
am opening a custom dialog that have 2 edit text and on TextView.
So click on the item I want to set the value of edit text with the value
of item, if it is not Adult, Child or Infant.
And I also want to check - if the item is not adult, I have to set the
visibility of textview in the custom dialog visible.
How could I do this?
listView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
}
});
Unit testing : ViewController has no segue with identifier : "segue id"
Unit testing : ViewController has no segue with identifier : "segue id"
I want to test below method :
- (void)myMethod
{
self.contact = nil;
[self performSegueWithIdentifier:@"segue id" sender:self];
}
This is what I do in test class :
- (void)testMyMethod
{
// Call method to test
[testClass myMethod];
// Tests
GHAssertNil(testClass.contact, @"contact should be nil.");
}
Running the test gives me error :
Reason : Receiver (<RS_MainViewController:0x126b6330>) has no segue with
identifier 'segue id'
Why I get this error and what is the solution?
I want to test below method :
- (void)myMethod
{
self.contact = nil;
[self performSegueWithIdentifier:@"segue id" sender:self];
}
This is what I do in test class :
- (void)testMyMethod
{
// Call method to test
[testClass myMethod];
// Tests
GHAssertNil(testClass.contact, @"contact should be nil.");
}
Running the test gives me error :
Reason : Receiver (<RS_MainViewController:0x126b6330>) has no segue with
identifier 'segue id'
Why I get this error and what is the solution?
Thursday, 22 August 2013
How to find the longest memo field in any table of my database?
How to find the longest memo field in any table of my database?
How to find the longest memo field in any table of my database?
Can I do it with a single SQL query?
How to find the longest memo field in any table of my database?
Can I do it with a single SQL query?
Copy Excel Table Between Two Worksheets
Copy Excel Table Between Two Worksheets
I have tried various expressions to do [what appears to be] the simple
task of copying an excel table between two worksheets. In addition, I need
to enclose the expression inside a loop. Here are four expressions (all
beginning with "Sheets") I have tried. All of them compile, but then crash
upon running:
For i = 1 To NumTables
p = 6
'Read "OP LLs" table into "EIRP budget"
Sheets("EIRP Budget").[B6:L17] = Sheets("OP LLs").Range(Cells(p, 2),
Cells(p + 11, 12))
Sheets("EIRP Budget").[B6:L17] = Sheets("OP LLs").[Cells(p, 2),
Cells(p + 11, 12)]
Sheets("OP LLs").Range(Cells(p, 2), Cells(p + 11, 12)).Copy
Sheets("EIRP Budget").[B6]
Sheets("OP LLs").["B" & p & : & "L" & p + 11].Copy Sheets("EIRP
Budget").[B6:L17]
p = p + 15
Next
Any help would be greatly appreciated.
I have tried various expressions to do [what appears to be] the simple
task of copying an excel table between two worksheets. In addition, I need
to enclose the expression inside a loop. Here are four expressions (all
beginning with "Sheets") I have tried. All of them compile, but then crash
upon running:
For i = 1 To NumTables
p = 6
'Read "OP LLs" table into "EIRP budget"
Sheets("EIRP Budget").[B6:L17] = Sheets("OP LLs").Range(Cells(p, 2),
Cells(p + 11, 12))
Sheets("EIRP Budget").[B6:L17] = Sheets("OP LLs").[Cells(p, 2),
Cells(p + 11, 12)]
Sheets("OP LLs").Range(Cells(p, 2), Cells(p + 11, 12)).Copy
Sheets("EIRP Budget").[B6]
Sheets("OP LLs").["B" & p & : & "L" & p + 11].Copy Sheets("EIRP
Budget").[B6:L17]
p = p + 15
Next
Any help would be greatly appreciated.
Embedded Google Spreadsheet document doesn't render in mobile devices
Embedded Google Spreadsheet document doesn't render in mobile devices
This web page embeds a range of a Google Spreadsheets document. It works
well in a desktop browser and it used to work in iPhone and Adnroid
browsers.
Recently it stopped working on iPhone and Android.
Did Google change something on the way spreadsheets are embedded in a
mobile device?
What can I do to fix it?
This web page embeds a range of a Google Spreadsheets document. It works
well in a desktop browser and it used to work in iPhone and Adnroid
browsers.
Recently it stopped working on iPhone and Android.
Did Google change something on the way spreadsheets are embedded in a
mobile device?
What can I do to fix it?
Subscribe to:
Posts (Atom)