I need to include an image within the <a> tag of an ActionLink. What is the best way to do this?
The final rendered link should look like this,
<a href="/Home/Test"><img src="test.jpg" />Test</a>
Theres a problem. I can't set value of BorderBrush fros C#-code (not in XAML):
((Border)((Image)sender).Parent).BorderBrush = "#FFBCC7D8";
How to solve this problem?
HI All.
how can i get the frames of any video that i am fetching from the photo directory iphone .I checked out various links but they only provide any thumbnails or any particular TIME's frame image but i need the frames of full length video .And the respective audio too then is that possible that from the freames i got and the audio file i can create another video but will change the sequence of the frames only the audio file will be the same in the video.Is that feasible .?
Sample code or link will be more helpful !!!
Thanks,
Balraj,
I have asked a question before where i found my mistake. However now i am facing with another problem. I have checked all the similar errors asked on StackOverflow but without success.Any help is appriciated.
The idea here is that i am getting image names from DB so depending on those names images from Drawable folder will be shown in a listView together with a description but im getting an error of NullPointException at setViewValue.
Here is the code snippet:
private void populateListView() {
ListView customListView = (ListView)findViewById(R.id.lvCustom);
Cursor cursor = DBhelper.getAllimages();
startManagingCursor(cursor);
String[] from = { DBhelper.COLUMN_PIC_URL, DBhelper.COLUMN_PIC_DESC};
int[] to = {R.id.ivImg, R.id.tvTitle};
SimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(this, R.layout.custom_listview_row, cursor, from, to, 0);
cursorAdapter.setViewBinder(new ViewBinder() {
@Override
public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
ImageView imageImageView = (ImageView)findViewById(R.id.ivImg);
String[] imgNames = new String[cursor.getCount()];
int[] imgResourceIds = new int[cursor.getCount()];
for(int i=0; i<cursor.getCount(); i++){
imgNames[i] = cursor.getString(cursor.getColumnIndex(DBhelper.COLUMN_PIC_URL));
imgResourceIds[i] = getResources().getIdentifier(imgNames[i], "drawable", getPackageName());
imageImageView.setImageResource(imgResourceIds[i]);
cursor.moveToNext();
}
return true;
}
});
customListView.setAdapter(cursorAdapter);
}
Here is the Error from LogCat:
I have tried to log the output of imgNames[i] where it returns the url pic from the DB correctly and imgResourceIds[i] where it return the image resource id correctly also(it does not return NULL but something like: 295731). But it stops at imageImageView.setImageResource(imgResourceIds[i]);
To see from where that NullPointerException is coming, i commented out imageImageView.setImageResource(imgResourceIds[i]);. This time imageNames(those with a TAG) and imgResourceIds(those system printed out) came correctly but doubled, when i removed cursor.MoveToNext() last row were doubled. Here is the screen shot of that:
I have tried all the suggestions on stack about gettin a NullException but without success. Any idea where i am doing mistake?
I want something like this: http://img257.imageshack.us/img257/5906/globalcolleage.png
I know how to create CSS-image-based bullets, but for quotations I can't figure out.
Hi I was just wondering if its possible to do an ajax post a file in asp.net mvc,
basically i have a form with two buttons, one of the buttons extracts images for the selected document and displays them for the user to choose thumbnails for the document he is about to upload. The usee then fills out the rest of the form and then saves the document.
With the image extraction, I was owndering if it was possible to do that as an ajax post. The other submit button can work as a normal http post
Thanks
I have a button defined inside of a DataTemplate for my list box.
<phone:PhoneApplicationPage.Resources>
<DataTemplate x:Key="ListTemplate">
<Grid Margin="12,12,24,12">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Name="EnableDisableButton"
Click="EnableDisableButton_Click"
BorderBrush="Transparent">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image Grid.Row="0" Source="\Images\img.dark.png" Width="48" Height="48" Visibility="{StaticResource PhoneDarkThemeVisibility}" />
<Image Grid.Row="0" Source="\Images\img.light.png" Width="48" Height="48" Visibility="{StaticResource PhoneLightThemeVisibility}" />
<Rectangle Grid.Row="1" Width="48" Height="8" Fill="{Binding CurrentColor}" RadiusX="4" RadiusY="4" />
</Grid>
</Button>
<Grid Grid.Column="1">
<... more stuff here ...>
</Grid>
</Grid>
</DataTemplate>
</phone:PhoneApplicationPage.Resources>
What I'm seeing is that the first time I press the button, the Click event fires. The second time I press it, it does not fire. Third press, fires. Fourth press, does not fire. Etc. Originally I had it bound to a command but that was behaving the same way. (I put a Debug.WriteLine() in the event handler so I know when it fires.)
Any ideas? It's really odd that the click event only fires every other time.
I am making websites I refer to from my site load up in a frame (similar to google images). But I also want to give users the ability to break out of that frame. Like with google image's "Remove Frame" link at the bottom right corner of their frame. How can I do this possiblyusing Javascript?
$(document).ready(function(){
$('#content1').hide();
$('a#open').click(function(){
$('#content1').show('slow');
});
$('a#close').click(function(){
$('#content1').hide('slow');
})
});
in this code of toogle open and close button is different
<a> and <a id="close">
I want to make same button <a> for open and close and want to give different background image for open and close position
So I've found similar questions but none that answer all the questions I have and I know there must be a simple jQuery answer to this. I've got multiple images that are being dynamically placed in their own containing div that have overflow:hidden, they need to fill their containing divs and be centered(horizontally and vertically) also. The containing divs will be different sizes as well.
So in short:
multiple different sized images fill and center in containing div.
containing divs will be different sizes.
will be used multiple times on a page.
Hopefully this image helps explain what I'm after.
Click here to view the image.
HTML I'm using but can be changed
<div class="imageHolder">
<div class="first SlideImage">
<img src="..." alt="..."/>
</div>
<div class="second SlideImage">
<img src="..." alt="..."/>
</div>
<div class="third SlideImage">
<img src="..." alt="..."/>
</div>
</div>
And the CSS
.imageHandler{
float:left;
width:764px;
height:70px;
margin:1px 0px 0px;
}
.imageHolder .SlideImage{
float:left;
position:relative;
overflow:hidden;
}
.imageHolder .SlideImage img{
position:absolute;
}
.imageHolder .first.SlideImage{
width:381px;
height:339px;
margin-right:1px;
}
.imageHolder .second.SlideImage{margin-bottom:1px;}
.imageHolder .second.SlideImage, .imageHolder .third.SlideImage {
width: 382px;
height: 169px;
}
Ask me anything if this doesn't make sense,
thanks in advance
I have a tableview that my app shows when it loads, I would like to somehow put a banner at the bottom that if connceted to the internet will check my server for any new image files and if there are it will replace the current one and if not it will just leave it. That way I can constantly display messages to my users - sort of like in Doodle Jump.
How could I achieve this?
Thanks
Hi,
I am creating this content slider, you can view/edit here:
http://jsbin.com/esame4
I have put in place setInterval so that animation runs automatically, however, when it is run for the first time, google image is shown but not afterwords. Should be simple but i am unable to figure out the problem.
I know this exists out there, somewhere but I haven't found it in a few hours of searching. I simply have to load a clients external page into an IFRAME, but I want to use jquery ui to present the loading image while it's grabbing the external data.
Simple yes, but I've seen pieces of this not the whole thing.
I am looking for a script that will block or remove an order button to prevent customers from double or triple ordering but clicking the button more then once. I don't know what something like this would be called. But the site was developed in Classic .asp. However I'm going to guess and say this would be javascript or jquery on an image button? Any suggestion or points for this would be a big help!!!!
Thanks,
I have a form in which few details like three text fields and an image is to be uploaded, now as i submit or save the page it should be redirected to the same form storing the previous values in some variables array, I need this array so that according to the count of this array i can display the grid(listing of data) below the form on every submit..
I'm trying to install Image Magick on MAMP. And I'm seriously out of my depth.
I've installed MacPorts, and opened the terminal. I've typed in sudo port -v selfupdate per the instructions on http://www.macports.org/install.php#pkg
But the response I get from the Terminal is Unrecognized action "sudo"
I've googled and googled, but can't find anything that makes a slab of sense.
Any clever people feeling generous?
Hi,
I want to add a print option to the mozswing so I can print the page from it.
I've used the MozillaAutomation.renderToImage() to get the image and then print it but it does not give me what I'm looking for.
Can anyone please tell me how to do it.
Thanks,
uhs
I am using Oracle 11g and when I query data from database manually, it looks ok. But when I view it using Notepad++, there is a special character that gets inserted anywhere in the xml produced. Please see image below:
I tried everything and deleted some parts of the xml, updated the db and query again but the invalid character just differ in location. Any idea is much appreciated, thanks!
Best regards,
Racs
I want to insert into multiple tables in same query by using BEGIN and COMMIT.
It seems the error occur at begin.
here is my SQL command
BEGIN
INSERT INTO Product (pName, pBrand, pCategory, pSize, pQuantity, pPrice, pDetail)
VALUES('$name', '$brand', '$category', '$size', '$quantity', '$price', '$detail')
INSERT INTO Image (iName, iExt, iSize, pID)
VALUES('$img_name', '$img_ext', '$img_size', LAST_INSERT_ID());
COMMIT;
I have 3 tables in a database:
image of the database
I have been looking online for a long time trying to find out how in linq and vb.net how i can do a query that has access to both the event and individual table for example showing all the events individual 1 is taking part in ect. i was wondering if anyone could point me in the right direction or know of any good tutorial sites with good examples of things similar.
Thanks in advance :)
Luke.
I have a string in my database that represents an image. It looks like this:
0x89504E470D0A1A0A0000000D49484452000000F00000014008020000000D8A66040....
<truncated for brevity>
When I load it in from the database it comes in as a byte[]. How can I convert the string value to a byte array myself. (I am trying to remove the db for some testing code.)
I need to know what exactly this code does.. or how this can be used..Actually I used this to repeat the image as a background for the menu .. Need explanation for this..
url("images/home_bg.jpg") repeat-x scroll 0 0 transparent
Hi,
What's the best way to implement showing a number in a small circle on a UITableView row, much like is seen on the 'Inbox' row in the image below?
Thanks,