Hi,
i have this page.
login: [email protected]
password: m
As you can see in IE7 the selects for the age, and radio buttons are not well organized. In FF and IE8 no problem.
Any idea?
Regards
Javi
I am a new guy in Android. How to implement the Geo-tag for images? I have tried by myself but not getting expected result.
My code is like:
@Override
protected Dialog onCreateDialog(int id) {
jpgDialog = null;;
switch(id){
case ID_JPGDIALOG:
Context mContext = this;
jpgDialog = new Dialog(mContext);
jpgDialog.setContentView(R.layout.jpgdialog);
exifText = (TextView) jpgDialog.findViewById(R.id.text);
geoText = (TextView)jpgDialog.findViewById(R.id.geotext);
bmImage = (ImageView)jpgDialog.findViewById(R.id.image);
bmOptions = new BitmapFactory.Options();
bmOptions.inSampleSize = 2;
Button okDialogButton = (Button)jpgDialog.findViewById(R.id.okdialogbutton);
okDialogButton.setOnClickListener(okDialogButtonOnClickListener);
mapviewButton = (Button)jpgDialog.findViewById(R.id.mapviewbutton);
mapviewButton.setOnClickListener(mapviewButtonOnClickListener);
break;
default:
break;
}
return jpgDialog;
}
Please help me how to proceed?
Background: I am customizing an existing ASP .NET / C# application. It has it's own little "framework" and conventions for developers to follow when extending/customizing its functionality. I am currently extending some of it's administrative functionality, to which the framework provides a contract to enforce implementation of the GetAdministrationInterface() method, which returns System.Web.UI.Control. This method is called during the Page_Load() method of the page hosting the GUI interface.
Problem: I have three buttons in my GUI, each of which have been assigned an Event Handler. My administration GUI loads up perfectly fine, but clicking any of the buttons doesn't do what I expect them to do. However, when I click them a second time, the buttons work.
I placed breakpoints at the the beginning of each event handler method and stepped through my code. On the first click, none of the event handlers are triggered. On the second click, they are triggered.
Any ideas?
Example of Button Definition
Button btn = new Button();
btn.Text = "Click Me Locked Screen";
bth.Click += new EventHandler(Btn_Click);
Example of Event Handler Method Definition
void Btn_Click(object sender, EventArgs e)
{
// Do Something
}
A very peculiar bug in a simple html form. After changing an option, button has to be clicked twice to submit the form. Button is focused after clicking once, but form is not submitted. It's only this way in IE8 and works fine in Chrome and FF.
PAY ATTENTION TO 'g^' right before <select>. It has to be a letter or number followed by a symbol to generate this bug. For example, 'a#','f$','3(' all create the same bug. Otherwise it works fine. BTW, if you don't change option and click button right away,there won't be any bug.
Very strange, huh?
<form method="post" action="match.php">
g^
<select>
<option>Select</option>
<option>English</option>
<option>French</option>
</select>
<input type="submit" value="Go" />
</form>
Hi,
I am trying to transform my Outlook2003 into the closest thing to gmail.
I started to use categories, which are pretty similar to labels in gmail. I can assign categories automatically with rules, and I can add categories manually.
I have also created "search folders", that show all mails with a given category, if they are not in the Deleted Items or Sent Items folders. This part is almost like the Label views in gmail.
Two things are missing basically, which should be done with macros (VBA to be precise) which I'm totally inexperienced with. So hence my questions:
-Can someone show me a macro to remove the category "Inbox"?
That would act exactly like the Archive button in gmail. In fact I want to assign this macro to a toolbar button and call it Archive.
I have a rule that adds the Inbox category to all incoming mail. As I said, I have a search folder displaying all mails categorized as Inbox, and I also have an All Mail search folder, that displays all messages regardless whether they have the Inbox category. Exactly like gmail, just the easy archiving is missing.
-Can someone show me a macro that would delete the selected mail/mails and also would remove the Inbox category before deletion? I would replace the default delete button with this macro. (Somewhat less important, as in my search folders I can filter messages that are physically placed in the Deleted Items folder, but it would be more elegant not to have mails categorized as Inbox in the trash.
Many thanks in advance,
szekelya
<?php $name=$_POST['name']; ?>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="text" name="name">
<input type="submit" value="GO" name="submit">
</form>
<?php
include ('db.php');
if(isset($_POST['submit']))
{
mysql_query ("INSERT INTO example (name) VALUES('$name')") or die(mysql_error());
}
if (!isset($_GET['startrow']) or !is_numeric($_GET['startrow'])) {
$startrow = 0;
}
else {
$startrow = (int)$_GET['startrow'];
}
$query = "SELECT * FROM example ORDER BY id DESC LIMIT $startrow, 20";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)){
echo "<li>";
echo $row['name'] ." "." <a href= 'like.php?quote=" . urlencode( $row['name'] ) . "'>Click Here</a>";
echo "</li>";
}
echo '<a href="'.$_SERVER['PHP_SELF'].'?startrow='.($startrow+10).'">Next</a>';
?>
I want to make my page links hidden , how can i make then hidden so that a user cant edit it.
2nd question,
currently i am showing total 10 records on each page and then a next page button , but the next button is keep showing even when there is no more records...! how to remove a next page button when records ended. ??
line number 28 is the link to pages which can be easyily editable by any user, i wnat to make them secure (using ID)
and line 35 is n'next' page link , this link should not be appear when number of records ended
I am trying to learn backbone.js through the following example.
Then I got stuck at the point
ItemView = Backbone.View.extend
why you can use this.model.get?
I thought this is referring to the instance of ItemView that would be created. Then why would ItemView has a model property at all?!!
(function($){
var Item = Backbone.Model.extend({
defaults: {
part1: 'hello',
part2: 'world'
}
});
var List = Backbone.Collection.extend({
model: Item
});
var ItemView = Backbone.View.extend({
tagName: 'li',
initialize: function(){
_.bindAll(this, 'render');
},
render: function(){
$(this.el).html('<span>'+this.model.get('part1')+' '+this.model.get('part2')+'</span>');
return this;
}
});
var ListView = Backbone.View.extend({
el: $('body'),
events: {
'click button#add': 'addItem'
},
initialize: function(){
_.bindAll(this, 'render', 'addItem', 'appendItem');
this.collection = new List();
this.collection.bind('add', this.appendItem);
this.counter = 0;
this.render();
},
render: function(){
$(this.el).append("<button id='add'>Add list item</button>");
$(this.el).append("<ul></ul>");
_(this.collection.models).each(function(item){
appendItem(item);
}, this);
},
addItem: function(){
this.counter++;
var item = new Item();
item.set({
part2: item.get('part2') + this.counter
});
this.collection.add(item);
},
appendItem: function(item){
var itemView = new ItemView({
model: item
});
$('ul', this.el).append(itemView.render().el);
}
});
var listView = new ListView();
})(jQuery);
$(".hidee2").click(function() {
var type = $(".st").val();
}
<form action="" method="POST"><input type="hidden" class="st" value="st"><div class="button">Room Status : Accepting Reservation <br /><span><span><a class="hidee2">Book Now!</a></span></span></div></form>
<form action="" method="POST"><input type="hidden" class="st" value="st2"><div class="button">Room Status : Accepting Reservation <br /><span><span><a class="hidee2">Book Now!</a></span></span></div></form>
<form action="" method="POST"><input type="hidden" class="st" value="st3"><div class="button">Room Status : Accepting Reservation <br /><span><span><a class="hidee2">Book Now!</a></span></span></div></form>
How do i get which book now! link user click? because i need to pass over the st value? is there any way to achieve this using jquery? currently, only st value is passed over
When I set the visible property to false for a child in a container, how can I get the container to resize? In the example bellow, when clicking on "Toggle", "containerB" is hidden, but the main container's scrollable area is not resized. (I do not want to scroll through a lot of empty space.)
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
public function toggle():void {
containerB.visible = !containerB.visible;
}
]]>
</mx:Script>
<mx:VBox height="300" width="200" horizontalAlign="center">
<mx:Button label="Toggle" click="toggle()" width="200"/>
<mx:VBox id="containerA" height="400" width="150" horizontalAlign="center">
<mx:Button label="A" height="400" width="100"/>
</mx:VBox>
<mx:VBox id="containerB" height="400" width="150" horizontalAlign="center">
<mx:Button label="B" height="400" width="100"/>
</mx:VBox>
</mx:VBox>
I'm learning Cocoa, and I've gotten undo to work without much trouble. But the setActionName: method is puzzling me. Here's a simple example: a toy app whose windows contain a single text label and two buttons. Press the On button and the label reads 'On'. Press the Off button and the label changes to read 'Off'. Here are the two relevant methods (the only code I wrote for the app):
-(IBAction) turnOnLabel:(id)sender
{
[[self undoManager] registerUndoWithTarget:self selector:@selector(turnOffLabel:) object:self];
[[self undoManager] setActionName:@"Turn On Label"];
[theLabel setStringValue:@"On"];
}
-(IBAction) turnOffLabel:(id)sender
{
[[self undoManager] registerUndoWithTarget:self selector:@selector(turnOnLabel:) object:self];
[[self undoManager] setActionName:@"Turn Off Label"];
[theLabel setStringValue:@"Off"];
}
Here's what I expect:
I click the On button
The label changes to say 'On'
In the Edit menu is the item 'Undo Turn On Label'
I click that menu item
The label changes to say 'Off'
In the Edit menu is the item 'Redo Turn On Label'
In fact, all these things work as I expect apart from the last one. The item in the Edit menu reads 'Redo Turn Off Label', not 'Redo Turn On Label'. (When I click that menu item, the label does turn to On, as I'd expect, but this makes the menu item's name even more of a mystery.
What am i misunderstanding, and how can I get these menu items to display the way I want them to?
I am working along with Cocoa Programming For Mac OS X (a great book). One of the exercises the book gives is to build a simple to-do program. The UI has a table view, a text field to type in a new item and an "Add" button to add the new item to the table. On the back end I have a controller that is the data source and delegate for my NSTableView. The controller also implements an IBAction method called by the "Add" button. It contains a NSMutableArray to hold the to do list items. When the button is clicked, the action method fires correctly and the new string gets added to the mutable array. However, my data source methods are not being called correctly. Here they be:
- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView {
NSLog(@"Calling numberOfRowsInTableView: %d", [todoList count]);
return [todoList count];
}
- (id)tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn
row:(NSInteger)rowIndex {
NSLog(@"Returning %@ to be displayed", [todoList objectAtIndex:rowIndex]);
return [todoList objectAtIndex:rowIndex];
}
Here is the rub. -numberOfRowsInTableView only gets called when the app first starts, not every time I add something new to the array. -objectValueForTableColumn never gets called at all. I assume this is because Cocoa is smart enough to not call this method when there is nothing to draw. Is there some method I need to call to let the table view know that its data source has changed, and it should redraw itself?
by default, if we have something like this as a Header in jQuery Accordion :
<h3>
<div class="1">TEXT</div>
<div class="2">ICON</div>
<div class="3">BUTTON</div>
</h3>
by clicking anywhere on this , accordion works and toggle the next element and ...
the question is , how can we set an option and select a specific element ( like: 'div' with class '1' ) to click on it to and toggle the accordion.
i mean i don't want the whole Header remain click able. i just want to click on a icon or div o something inside the header and toggle open/close the accordion.
thank you
Update 1 :
HTML :
<div id="testAcc">
<h3>
<div class="one">Text</div>
<div class="two">Icon</div>
<div class="three">Button</div>
</h3>
<div class="accBody">
text text text text text text text text text text
</div>
<h3>
<div class="one">Text</div>
<div class="two">Icon</div>
<div class="three">Button</div>
</h3>
<div class="accBody">
text text text text text text text text text text
</div>
</div>
JS :
$('#testAcc').accordion({
autoHeight: false,
header: 'h3',
collapsible: 'ture',
});
this codes working fine. but i want to use something like ( header: 'h3.one' ) means i want to set a specific class and element inside the header , then if user click ONLY on that element, the accordion will open or close ...
Hi all,
In IB,I have connected some buttons to a IKImageView. Using its received Action
'ZoomIn:', 'ZoomOut:','ZoomImageToActualSize:'
When I build for 10.6 I have no issues these work as expected.
But in 10.5 (ppc), they sometimes work as expected and sometimes do not.
I have even tried it programatically.
But I get the same results.
It is intermittent with each build after I have made some small change in IB that I need.
But not changes that should affect how the view acts.
The only buttons that seem to work through out are 'ZoomImageToFit' and the rotate ones.
When the do not work as expected, I see no change to the current image in the view,
but when my app (/s, I have had this issue before in different apps) changes the image
The view reflects the last request from a button.
So for example when it does not work. An image is displayed, I click the 'ZoomImageToActualSize:' button, nothing happens. I load a new image and it is displayed at
Actual size.
Example when it does work. An image is displayed, I click the 'ZoomImageToActualSize:' button, It is displayed at Actual size.
By the way, I know I can reset the view default , before I load a new image.
Also if I run the 10.5 app in 10.6, it works ok, but as above I get intermittent results with the same build on multible 10.5 machines.
Does anyone know what is going on, is this a known bug?
Thanks for any help.
MH
Let's say I have:
public class Item
{
public string SKU {get; set; }
public string Description {get; set; }
}
....
Is there a built-in method in .NET that will let me get the properties and values for variable i of type Item that might look like this:
{SKU: "123-4556", Description: "Millennial Radio Classic"}
I know that .ToString() can be overloaded to provide this functionaility, but I couldn't remember if this was already provided in .NET.
i am having a grid view with 2 coloums and each item in grid view having one image and 2 textview below the image.
i have added one button over each image and after clicking on button i want that image should scale and move down to bottom tab.
like it should appear image drop down from its position in side one button of tabview.
i am able to add animation on image using this code
AnimationSet set = new AnimationSet(true);
Animation trAnimation = new TranslateAnimation(0, 160,0, 100);
trAnimation.setDuration(500);
set.addAnimation(trAnimation);
Animation scaleAnimation = AnimationUtils.loadAnimation(this, R.anim.anim_scale);
set.addAnimation(scaleAnimation);
set.setFillEnabled(true) ;
set.setFillAfter(true);
view.setAlpha(100) ;
view.startAnimation(set);
but problem is that image is not coming to bottom of screen it is going inside of grid item where it is placed . anybody knows how to move this image to bottom.
I have a view with a view controller and when I show this view on screen, I want to be able to pass variables to it from the calling class, so that I can set the values of labels etc.
First, I just tried creating a property for one of the labels, and calling that from the calling class. For example:
SetTeamsViewController *vc = [[SetTeamsViewController alloc] init];
vc.myLabel.text = self.teamCount;
[self presentModalViewController:vc animated:YES];
[vc release];
However, this didn't work. So I tried creating a convenience initializer.
SetTeamsViewController *vc = [[SetTeamsViewController alloc] initWithTeamCount:self.teamCount];
And then in the SetTeamsViewController I had
- (id)initWithTeamCount:(int)teamCount {
self = [super initWithNibName:nil bundle:nil];
if (self) {
// Custom initialization
self.teamCountLabel.text = [NSString stringWithFormat:@"%d",teamCount];
}
return self;
}
However, this didn't work either. It's just loading whatever value I've given the label in the nib file. I've littered the code with NSLog()s and it is passing the correct variable values around, it's just not setting the label.
Any help would be greatly appreciated.
EDIT: I've just tried setting an instance variable in my designated initializer, and then setting the label in viewDidLoad and that works! Is this the best way to do this?
Also, when dismissing this modal view controller, I update the text of a button in the view of the calling ViewController too. However, if I press this button again (to show the modal view again) whilst the other view is animating on screen, the button temporarily has it's original value again (from the nib). Does anyone know why this is?
how can i check if an ID of a clicked element is lets say 'target'.
what i am trying to do is actually show and hide comment form on clicking in the text field and hide it when the user clicks out of the form. the problem is that if the user clicks Submit button the form hides and nothing is sent over. so i'll have to check if the submit buttons id matches the clicked element and not hide it in this case.
i am using ruby on rails remote_form_for and onblur and onfocus events now.
this is my bigger form that i am showing.
<div id="bigArea" style="display:none">
<% remote_form_for @horses do |f|%>
<%= f.text_area :description, {:onBlur=>"{$(bigArea').hide();$('smallField').show();}"} %>
<%= f.submit "Submit"%>
<% end %>
</div>
and this is the smaller form field that hides everytime you click in it.
<div id="smallField">
<%= text_field_tag 'sth',"Click to comment, {:onFocus=>"$('bigArea').show();$('smallField').hide();"} %>
</div>
My question is how can i disallow the form to hide when a user clicks submit button? i suppose i should check which element's id has been clicked. and if it's submit button's ID i should not hide the form. Or maybe there is some other way to do all this?
i would greatly appreciate any answers!
I want to conduct a quiz using silverlight. This quiz contains few questions and each question will have multiple choices (Radio Buttons). User should select one answer. After completing the quiz I need to display Result.
Is it better to provide the questions and options in XML Document and then retrieve it into silverlight class? If yes, can anybody tell me the procedure to achieve it.
Hi there,
I have a simple questions that puzzles me. I need a little bit of refreashment with VB as I have been away for a while. I have a form that adds new contacts. New contacts are added by pressing an appropriate button and they appear as an entry in the list on the form. I try now to add an edit button that will edit existing entries. User will select a given entry on the list and press edit button and will be presented with an appropriate form (AddContFrm). Right now it simply adds another entry with the same title. Logic is handled in a class called Contact.vb Here is my code.
Public Class Contact
Public Contact As String
Public Title As String
Public Fname As String
Public Surname As String
Public Address As String
Private myCont As String
Public Property Cont()
Get
Return myCont
End Get
Set(ByVal value)
myCont = Value
End Set
End Property
Public Overrides Function ToString() As String
Return Me.Cont
End Function
Sub NewContact()
FName = frmAddCont.txtFName.ToString
frmStart.lstContact.Items.Add(FName)
frmAddCont.Hide()
End Sub
Public Sub Display()
Dim C As New Contact
'C.Cont = InputBox("Enter a title for this contact.")
C.Cont = frmAddCont.txtTitle.Text
C.Fname = frmAddCont.txtFName.Text
C.Surname = frmAddCont.txtSName.Text
C.Address = frmAddCont.txtAddress.Text
'frmStart.lstContact.Items.Add(C.Cont.ToString)
frmStart.lstContact.Items.Add(C)
End Sub
End Class
AddContFrm
Public Class frmAddCont
Public Class ControlObject
Dim Title As String
Dim FName As String
Dim SName As String
Dim Address As String
Dim TelephoneNumber As Integer
Dim emailAddress As String
Dim Website As String
Dim Photograph As String
End Class
Private Sub btnConfirmAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConfirmAdd.Click
Dim C As New Contact
C.Display()
Me.Hide()
End Sub
Private Sub frmAddCont_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
and frmStart.vb
Public Class frmStart
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
frmAddCont.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDel.Click
Dim DelCont As Contact
DelCont = Me.lstContact.SelectedItem()
lstContact.Items.Remove(DelCont)
End Sub
Private Sub lstContact_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstContact.SelectedIndexChanged
End Sub
Private Sub btnEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEdit.Click
Dim C As Contact
If lstContact.SelectedItem IsNot Nothing Then
C = DirectCast(lstContact.SelectedItem, Contact)
C.Display()
End If
End Sub
End Class
I wrote a simple Cuke feature for a form on a demo site. The feature looks like this.
Given I am on the home page
When I set the "Start Date" to "2010-10-25"
And I set the "End Date" to "2011-1-3"
And I press the "Go" button
Then I should see "Cake Shop"
The idea is that after I press the Go button, a new page will load, showing a list of results, and one of the results should be "Cake Shop."
But I have not managed to get this to work. Is there something that I am missing?
Edit: here is the step definitions.
Given /^I am on the "([^"]*)" page$/ do |page|
visit root_path
end
When /^I set the "([^"]*)" to "([^"]*)"$/ do |field, date|
fill_in field, :with=>date
end
When /^I press the "([^"]*)" button$/ do |arg1|
click_button('Go')
end
The final step is defined in web_steps.rb I believe....and it's always there that it's failing.
Then I should see "Cake Shop" #
features/step_definitions/web_steps.rb:107
expected #has_content?("Cake Shop") to return true,
got false
(RSpec::Expectations::ExpectationNotMetError)
./features/step_definitions/web_steps.rb:110:in
block (2 levels) in <top (required)>'
./features/step_definitions/web_steps.rb:14:in
with_scope'
./features/step_definitions/web_steps.rb:108:in
/^(?:|I )should see "([^"]*)"(?:
within "([^"]*)")?$/'
features/specify_timerange.feature:12:in
Then I should see "Cake Shop"'
This may be kind of a dumb question, but the script for the facebook button on the like button page is different from the script on the javascript sdk page, but similar. Did facebook just forget to update the documentation or do I need both scripts?
The like button page gives:
<div id="fb-root"></div>
<script> (function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
But on the javascript sdk page:
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'YOUR_APP_ID', // App ID
channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
// Additional initialization code here
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
</script>
I am using Silverlight 4 with Blend 4.
I have a (horizontal) stackpanel that includes some TextBoxes and a Button. The stackpanel is set to stretch to the size that the content uses. The TextBoxes are on autosize too.
When I add text to the Textboxes, the textbox size grows and the stackpanel grows too. So far so good.
When I remove text from the textboxes, the textbox size shrinks (as excepted), but the stackpanel size doesn't.
Is there any trick to make the stackpanel change size, when the content (textboxes) getting smaller?
Thanks in advance,
Frank
Here is the XAML for the UserControl:
<Grid x:Name="LayoutRoot">
<StackPanel x:Name="StackPanelBorder" Orientation="Horizontal">
<TextBox x:Name="TextBoxCharacteristicName" TextWrapping="Wrap" Text="Tex">
</TextBox>
<TextBox x:Name="TextBoxSep" TextWrapping="Wrap" Text="=" IsReadOnly="True">
</TextBox>
<Button x:Name="ButtonRemove" Content="-" Click="ButtonAddOrRemove_Click">
</Button>
</StackPanel>
</Grid>
Hi there,
I have a preferences activity where I can change the language and the theme of my application. From there I return to the previous activity via the Back key, and I want to recreate the activity.
I've managed to do that by reinitializing the layout in onResume and also calling onRestoreInstanceState from there. All the views are restored properly, with checkboxes checked if needed, edittexts filled with texts I left there previously.
But I also have a button which is initially disabled, and becomes enabled only when a radiobutton is checked. The problem with it is the following: I check the radiobutton, the button becomes enabled. Then I go to settings, change the theme there, and return to the first activity. When I arrive there, the radiobutton is still checked, but the button is disabled.
So it seems that the enabled/disabled state isn't being saved into the bundle, which seems counterintuitive. And I haven't found any code in the Android source that does this, too. Am I missing something, or do I have to write my own code for that?