Hello,
I was looking for a python code that would be able to log in from "Google App Engine" to some of my accounts on some websites (like yahoo or eBay) and was given this code:
import urllib, urllib2, cookielib
url = "https://login.yahoo.com/config/login?"
form_data = {'login' : 'my-login-here', 'passwd' : 'my-password-here'}
jar = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(jar))
form_data = urllib.urlencode(form_data)
# data returned from this pages contains redirection
resp = opener.open(url, form_data)
# yahoo redirects to http://my.yahoo.com, so lets go there instead
resp = opener.open('http://mail.yahoo.com')
print resp.read()
Unfortunately, this code didn't work, so I asked another question here and one supporter among other things said this:
"You send MD5 hash and not plain
password. Also you'd have to play
along with all kinds of CSRF
protections etc. that they're
implementing. Look:
<input type="hidden" name=".tries" value="1">
<input type="hidden" name=".src" value="ym">
<input type="hidden" name=".md5" value="">
<input type="hidden" name=".hash" value="">
<input type="hidden" name=".js" value="">
<input type="hidden" name=".last" value="">
<input type="hidden" name="promo" value="">
<input type="hidden" name=".intl" value="us">
<input type="hidden" name=".bypass" value="">
<input type="hidden" name=".partner" value="">
<input type="hidden" name=".u" value="bd5tdpd5rf2pg">
<input type="hidden" name=".v" value="0">
<input type="hidden" name=".challenge" value="5qUiIPGVFzRZ2BHhvtdGXoehfiOj">
<input type="hidden" name=".yplus" value="">
<input type="hidden" name=".emailCode" value="">
<input type="hidden" name="pkg" value="">
<input type="hidden" name="stepid" value="">
<input type="hidden" name=".ev" value="">
<input type="hidden" name="hasMsgr" value="0">
<input type="hidden" name=".chkP" value="Y">
<input type="hidden" name=".done" value="http://mail.yahoo.com">
<input type="hidden" name=".pd" value="ym_ver=0&c=&ivt=&sg=">
I am not quite sure where he got all these lines from and where in my code I am supposed to add them. Do You have any idea?
I know I was supposed to ask him this question first, and I did, but he never returned, so I decided to ask a separate question here.
SO Question: jQuery Validate - require at least one field in a group to be filled
I uses the sample rule from the above link and it works, but the problem was it overrides the fields that going to be validated it jumps directly to the group validation, when validates a form the messages in my error container only contains error for the group fields.
I am using the Jquery Validation plug-in, however i need to add a "custom rule", i have 2 date fields and i need to ensure that the end date is not less than the start date. My problem is how to pass the two fields in as elements.
As i understand u set up a custom function something like this :
function customValidationMethod(value, element, params){ }
But can't see how i could use it with two fields, if anyone has any ideas it would be greatly appreciated.
If it doesn't, what's the half-life of it?
It it does, where can find that information?
On my server I found a few logs for each of my releases. But they only date back a few days.
Specifically, I am looking for emails that were sent while my mail server was down two weeks ago.
Hi,
My question is about defining an XML schema that will validate the following XML:
<rules>
<other>...</other>
<bool>...</bool>
<other>...</other>
<string>...</string>
<other>...</other>
</rules>
The order of the child nodes does not matter. The cardinality of the child nodes is 0..unbounded.
All the child elements of the rules node have a common base type, rule, like so:
<xs:complexType name="booleanRule">
<xs:complexContent>
<xs:extension base="rule">
...
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="stringFilterRule">
<xs:complexContent>
<xs:extension base="filterRule">
...
</xs:extension>
</xs:complexContent>
</xs:complexType>
My current (feeble) attempt at defining the schema for the rules node is below. However,
Can I nest xs:choice within xs:sequence? If, where do I specify the maxOccurs="unbounded" attribute?
Is there a better way to do this, such as an xs:sequence which specifies only the base type of its child elements?
<xs:element name="rules">
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:element name="bool" type="booleanRule" />
<xs:element name="string" type="stringRule" />
<xs:element name="other" type="someOtherRule" />
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
I run my development environment in a VM and need to test the delivery and appearance of emails from my applications. The problem is when my SMTP server starts delivering a lot of mail to my corporate email account, the server is soon rejected as a source of spam. Of course, the major Internet email providers will also never accept email from such a server.
I've delivered to a specified pickup directory and open in outlook express, but the problem is images always display as broken images.
I have about had it with this tool, I check the save password box at the login dialogue but it just doesn't work. Sometimes it will for a few days, and then the password will just be gone. Nearly every time I load this thing up I have to track down the password again and type it in. Is there some password rule in the database that would be causing this? This is driving me absolutely crazy.
In the example for Zend_Mail on http://framework.zend.com/manual/en/zend.mail.attachments.html they use ENCODING_8BIT but searching for what that might be sends me to http://msdn.microsoft.com/en-us/library/ms526992%28EXCHG.10%29.aspx were (and this sounds logical to me) it is explained that 8bit encoding does not make sense for emails.
Hello!
I have this rule written in my .htaccess
RewriteRule ^blog/([0-9]+)/? /obdelaj.php?ime=$1
which works but it redirects me to example.com/obdelaj.php?ime=# and i want the user to stay on example.com/blog/#
I have a hostgator account and i dont have access to the httpd file , and i presume that a some configuration in httpd file is causing this, because on my localhost machine this work just fine.
So what would i have to add to the .htaccess to overwrite this automatic redirection?
Thank you
Hi,
I am sending a string as the message through SMTP.
But the final mail does not consider the tabs and newlines.
What might be the problem
Thanks in advance
I believe I read that if you wanted to use Google's App Engine, your application needed to be open source. With the recent announcement of App Engine for Business, does the same rule apply? I would like to host an application on this particular platform but have no interest in releasing the code initially (down the road, potentially).
I want to send an email if the build fails to the developers, with the fail details. I'm also wants to send a success email to the project admins, etc with the address to the new test application.
What is the proper tool to send the actual mail, TeamCity or NAnt?
For expressions like 3+4 I would like to use the value 7 in an intermediate representation tree.
I cannot work out how to get the returns value into a rewrite rule.
expression returns [int v]:
etc.
How do I get expression.v into WR? At the moment I get (+ 3 4), I want (7)
|^( WRITE c=expression) - ^(WRINT ^(INTC ^($c))
the next step is to emit 7 in an assembler.
I need a nginx rewrite rule to rewrite from:
http://some-keyword.example.com to www. example.com/keyword.php?keyword=$some-keyword
while domain without www in front still rewrites to www.example.com and 'www' isn't taken as a keyword.
Please could you help me to solve this problem, how to write these two rules?
if i send email from my smtp server, For Example in code if i set From to [email protected] and sent to an email address, than the recipient think that mail comes from anydomain. so how to confirm email source?
Run time exception is: The transport failed to connect to the server.
Please give me any of your suggestions.
As i am working on my own pc so i do not have any mail server so i put the name of my internet broadband provider (SmtpMail.SmtpServer = "smtp.virginmedia.com";) Is it the right way
I always thought a method needs to be packed with the data. When would you want a method that is extrinsic to the object? What rule of thumb do you follow to have a visitor? This is supposing that you have full control of the object graph?
I am trying to rewrite from
mysite.com/pokerbono/xyz
to
mysite.com/pokerbono.php?id=XYZ
Here is the code I added in the .htaccess:
#### Affiliate Links
RewriteRule ^pokerbono/([a-zA-Z0-9_-]+)$ pokerbono.php?id=$1 [L]
What is wrong with this rule? I tried like 100 variations and always receive a 404.
Hi all,
I'm using MFMailComposeViewController class, and the MFMailComposeViewControllerDelegate protocol to send emails. When I run the application, I'm getting the message that the message is sent but the e-mail is not appearing in the to- address I mention. I tried doing it without cc- bcc-, is it happening because of that?
Thanks in advance.
Does anyone know of papers/books/etc. that document patterns for databases? For example, one common rule of thumb is that every table should have a primary key and that the key should be devoid of information content. So I was wondering if anyone had written a book or published papers regarding design patterns for designing relational databases?
I'm creating a share page for my website. I want the user to be able to send a message along with the formatted html.
so I have.
$message = $_REQUEST['message'];
$page = 'some html code';
mail($TO,$subject,$page, $headers);
I want the $message and $page to be added together.
I want to have a test that testing the inexistent of this http headers, using NAnt and NUnit:
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Edit: I'm asking hot to actually test this rule: "don't have asp headers". so, I can have this test in each new website that I'm doing, so it make it easier no to forget this simple step.
Hello all,
Once again I find myself failing at some really simple task in C++. Sometimes I wish I could de-learn all I know from OO in java, since my problems usually start by thinking like Java.
Anyways, I have a std::list<BaseObject*> that I want to sort. Let's say that BaseObject is:
class BaseObject {
protected:
int id;
public:
BaseObject(int i) : id(i) {};
virtual ~BaseObject() {};
};
I can sort the list of pointer to BaseObject with a comparator struct:
struct Comparator {
bool operator()(const BaseObject* o1, const BaseObject* o2) const {
return o1->id < o2->id;
}
};
And it would look like this:
std::list<BaseObject*> mylist;
mylist.push_back(new BaseObject(1));
mylist.push_back(new BaseObject(2));
// ...
mylist.sort(Comparator());
// intentionally omitted deletes and exception handling
Until here, everything is a-ok. However, I introduced some derived classes:
class Child : public BaseObject {
protected:
int var;
public:
Child(int id1, int n) : BaseObject(id1), var(n) {};
virtual ~Child() {};
};
class GrandChild : public Child {
public:
GrandChild(int id1, int n) : Child(id1,n) {};
virtual ~GrandChild() {};
};
So now I would like to sort following the following rules:
For any Child object c and BaseObject b, b<c
To compare BaseObject objects, use its ids, as before.
To compare Child objects, compare its vars. If they are equal, fallback to rule 2.
GrandChild objects should fallback to the Child behavior (rule 3).
I initially thought that I could probably do some casts in Comparator. However, this casts away constness. Then I thought that probably I could compare typeids, but then everything looked messy and it is not even correct.
How could I implement this sort, still using list<BaseObject*>::sort ?
Thank you