I want a login page in which if any user types invalid password and username after clicking submit button, then the user will be displayed an error message on the same page.
What should I have to make this requirement enable? Is this possible with ajax or javascript?
heyy there
i want to parse a text,let's name it 'post', and 'urlize' some strings if they contain a particular character, in a particular position.
my 'pseudocode' trial would look like that:
def urlize(post)
for string in post
if string icontains ('#')
url=(r'^searchn/$',
searchn,
name='news_searchn'),
then apply url to the string
return urlize(post)
i want the function to return to me the post with the urlized strings, where necessary (just like twitter does).
i don't understand: how can i parse a text, and search for certain strings?
is there ok to make a function especially for 'urlizing' some strings? The function should return the entire post, no matter if it has such kind of strings.
is there another way Django offers?
Thank you
I'd like to have an input box in the middle of a paragraph, with the label in smaller text underneath it. Kind of like:
Hello [________________], This is to inform you
(Customer Name)
that the [____________] you ordered is no longer
(Item Name)
available.
I thought it would be pretty easy to do, but my brain doesn't appear to be working today. Is it possible to do this with just CSS, and in a simple enough manner that it can be adapted to different forms easily?
Good morning everyone,
Actually I'm having a small issue in image processing and I'm in need of some help. First of all, let me explain what i want to do, i have an image that was split into 4 other small images. I currently have like 6 small images that i need to figure out which ones are part of the real image. Second, what i currently know is that that i should compare these images edges or last column with the first column of the other image.
I'm not sure yet what exactly should be done, anyone is able to put me on the same tracks, with some detailed hints and how to compare the edges of 2 images.
Some links and example codes will be help full.
One more thing, how am i able to read .Raw images using java, c# or python ?
I'm looking for suggestions on the easiest way to create chars/reports and have them printed out as PDFs. This has to be done in Java.
I was looking at something like: http://jcckit.sourceforge.net/index.html
But I don't see how to turn those charts into PDFs.
Any ideas?
What is the practice to pass arguments from HTML to jQuery events function.
For example getting id of row from db:
<tr class="jq_killMe" id="thisItemId-id">
...
</tr>
and jQuery:
$(".jq_killMe").click(function () {
var tmp = $(this).attr('id).split("-");
var id = tmp[0]
// ...
}
What's the best practise, if I want to pass more than one argument?
Is it better not to use jQuery? For example:
<tr onclick="killMe('id')">
...
</tr>
I didn't find the answer on my question, I will be glad even for links.
Thanks.
I love microsoft development products!
I hate microsoft browsers...
I have made the decision to cut ties with internet explorer until they add support for some common W3 approved items. Namely 'multiple' in forms as well as about 5 other things...
and as such I would like to urge my visitors to use a better browser.
is there a way to setup an http handler or perhaps something in the asax file to route all ie users to a custom page?
Thanks for the help!
p.s. microsoft why must you make me love you and hate you.
I'm building a test web application ASP.NET VB from a tutorial see it at http://www.latinosnetwork.net/aspnetsystem/Login.aspx after successful log-in using user name jose and password abad the formsauthentication.redirectfromloginpage method redirect the application to a default.aspx at the root directory where it do not exist also the application is not at the root directory.
Any help on that.
I'm creating a datagridview transparent
//I got the parent background image
Bitmap parentBackGround = new Bitmap(this.Parent.BackgroundImage);
//Set the area i want to create equal to the size of my grid
Rectangle rect = new Rectangle(this.Location.X, this.Location.Y, this.Width, this.Height);
//And draw in the entire grid the area of the background image that is cover with my grid, making a "transparent" effect.
graphics.DrawImage(parentBackGround.Clone(rect, PixelFormat.Format32bppRgb), gridBounds);
When the backgroundimage of the grid's parent is show in an normal layout all work ok, but if the layout is stretch, center or any other, the transparency effent gone, have you any idea to fix it?
I am using textarea to capture book description but textarea doesn't have attribute "value", How to pass the value to bean.
But the following mechanism to capture value doesn't seem to work
<textarea cols="80" rows="3" spellcheck="false">#{_book.description}</textarea>
hello
Iam making an application in which I want to show moving character like any cartoon say donald duck. which can guide user and provide help .
how can i do .Is it possible in vb.
thanks in advance.
Here's my code:
Public Class Form1
End Class
Public Class Form1Handler
Inherits Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox("I")
End Sub
End Class
I'm trying to get Form1Handler to process Form1's events automatically. How can I do this? Should I use a module instead? I'm doing this in VB 2010.
I don't want to have to make an event handler in Form1 and then pipe it to the other class / module, is there some way to automatically "pipe" the events from form1 to form1handler?
say ive got a matrix that looks like:
[[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]
how can i make it on seperate lines:
[[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0]]
and then remove commas etc:
0 0 0 0 0
And also to make it blank instead of 0's, so that numbers can be put in later, so in the end it will be like:
_ 1 2 _ 1 _ 1
(spaces not underscores)
thanks
I am using an image instead of a submit button for search option and use onclick events to load the results using ajax in php.Now I need to load results by hit enter also.Is their any ways to update my application without changing the image.
Thanks
my purpose is user enter only email or mobile number.i have the partial success in that.code notify user in OR logic but....IF user entered the incorrect mobile & email @same time then user must be notified for dat.
var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
var emailaddressVal = $("#UserEmail").val();
////email & mobile input cheak
if(emailaddressVal == '' && $("#mobile").val() == '') {
$("#UserEmail").after('<p><span class="error">Please enter your email address.</span></p>')
$("#mobile").after('<p><span class="error">Please enter your Mobile number.</span></p>')
hasError = true;
}
//////validating currect email
else if(!emailReg.test(emailaddressVal)) {
$("#UserEmail").after('<p><span class="error">Enter a valid email address.</span></p>')
hasError = true;
}
//////Mobile number
else if( $("#mobile").val()) {
$("#mobile").after('<p><span class="error">Enter currect Mobile number.</span></p>')
hasError = true;
}
I end up doing a lot of this to draw forms in boxes. This does an address block:
position: absolute;top: .2em; left: .2em; width: 2.4em;height: 1.2em;
position: absolute;top: .2em; left: 3em; width: 12.4em; height: 1.2em;
position: absolute;top: 1.7em; left: 3em; width: 12.4em;height: 1.2em;
position: absolute;top: 3.2em; left: 3em; width: 12.4em;height: 1.2em;
position: absolute;top: 4.7em; left: 3em; width: 12.4em;height: 1.2em;
position: absolute;top: 6.2em; left: 3em; width: 7.6em; height: 1.2em;
position: absolute;top: 6.2em; left: 10.9em; width: 1.6em; height: 1.2em;
position: absolute;top: 6.2em; left: 12.8em; width: 2.5em; height: 1.2em;
position: absolute;top: 7.7em; left: 3em; width: 7.6em;height: 1.2em;
position: absolute;top: 9.2em; left: 3em; width: 7.6em;height: 1.2em;
position: absolute;top: 10.7em; left: 3em; width: 1.2em;height: 1.2em;
position: absolute;top: 10.7em; left: 4.5em; width: 10.9em; height: 1.2em;
but what I really need is some Javascript that allows me to draw my forms on screen, then generate the CSS for my real ASP.NET MVC 2 partial views, allowing nudge and cell resizing with keystrokes. Anyone have any suggestions for something like this?
I have a file of names and addresses as follows (example line)
OSCAR ,CANNONS ,8 ,STIEGLITZ CIRCUIT
And I want to read it into a dictionary of name and value. Here self.field_list is a list of the name, length and start point of the fixed fields in the file. What ways are there to speed up this method? (python 2.6)
def line_to_dictionary(self, file_line,rec_num):
file_line = file_line.lower() # Make it all lowercase
return_rec = {} # Return record as a dictionary
for (field_start, field_length, field_name) in self.field_list:
field_data = file_line[field_start:field_start+field_length]
if (self.strip_fields == True): # Strip off white spaces first
field_data = field_data.strip()
if (field_data != ''): # Only add non-empty fields to dictionary
return_rec[field_name] = field_data
# Set hidden fields
#
return_rec['_rec_num_'] = rec_num
return_rec['_dataset_name_'] = self.name
return return_rec
I'm writing an application in WPF using the MVVM pattern. In my application I've got an IPopupWindowService which I use to create a popup dialog window.
So to show a ViewModel in a popup window you'd do something like this:
var container = ServiceLocator.Current.GetInstance<IUnityContainer>();
var popupService = container.Resolve<IPopupWindowService>();
var myViewModel = container.Resolve<IMyViewModel>();
popupService.Show((ViewModelBase)myViewModel);
This is all well and good. What I want to do is be able to set the MinHeight and MinWidth on the View bound to myViewModel and have the popup window use those settings so that a user cannot make the window smaller than its contents will allow. At the moment when the user shrinks the window the contents stops resizing but the window doesn't.
EDIT:
I map my Views to my ViewModels in ResourceDictionarys like so:
<DataTemplate DataType="{x:Type ViewModels:MyViewModel}">
<Views:MyView />
</DataTemplate>
And my popup view looks like this:
<Window x:Class="TheCompany.Cubit.Shell.Views.PopupWindowView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner">
<DockPanel x:Name="panelContent">
<StackPanel HorizontalAlignment="Right" DockPanel.Dock="Bottom" Orientation="Horizontal" Visibility="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=ButtonPanelVisibility}">
<Button Width="75" IsDefault="True" x:Uid="ViewDialog_AcceptButton" Click="OnAcceptButtonClick" Margin="4">OK</Button>
<Button Width="75" IsCancel="True" x:Uid="ViewDialog_CancelButton" Click="OnCancelButtonClick" Margin="0,4,4,4">Cancel</Button>
</StackPanel>
<ContentPresenter Content="{Binding}" />
</DockPanel>
Hi. I aw working on cross site authentication (some domains have got common authentication). So I want to send authentication data (login, password) to main domain from others.
How should I use protect_from_forgery and how can I check if data received from valid domain?
What I am thinking now is to turn off protect_from_forgery for session controller and check domain name of received data.
But maybe I can configure CSRF protection for not only one domain?
and i really need a code to remove the ending slash when a user put their link.
for example i need them to put their url to grab their avatar, but in some cases they put their url ending with a slash (.com/) how can i remove that slash automatically? because when they put their url like that the avatar doesn't show i need them to end like this (.com) in order to show their avatar.
I was looking for a remove trailing slash php code, but any solution will be appreciated.
i tried to use this code but didn't work
$string = rtrim($string, '/');
I have a large webform, and would like to prompt the user to login if their session expires, or have them login when they submit the form. It seems that having them login when they submit the form creates alot of challenges because they get redirected to the login page and then the postback data for the original form submission is lost.
So I'm thinking about how to prompt them to login asynchrounsly when the session expires. So that they stay on the original form page, have a panel appear telling them the session has expired and they need to login, it submits the login asynchronously, the login panel disapears, and the user is still on the original partially filled form and can submit it. Is this easily doable using the existing ASP.NET Membership controls? When they submit the form will I need to worry about the session key? I mean, I am wondering if the session key the form submits will be the original one from before the session expired which won't match the new one generated after logging in again asynchrounously(I still do not understand the details of how ASP.NET tracks authentication/session IDs).
Edit: Yes I am actually concerned about authentication expiration. The user must be authenticated for the submitted data to be considered valid.
I'm building a survey w/ Codeigniter, and it's getting cumbersomely long...so I want to split it up into sections (about 5).
If I want each section to validate, and submit to db after the user clicks "next", what is the best way to do this? I've never made a multi-step process before.
Any advice for a noob? :)
How does one draw text (with onClick event) in a caption bar on vista with aero Like Windows 7 ?
The example at delphi.about.com doesn't work on Vista with aero. Do you have any ideas?
Thanks to all.
Sorry for my bad english.