how can i control the number of retries of the "opener.open"?
for example, in the following code, it will send about 6 "GET" HTTP requests (i saw it in the Wireshark sniffer) before it goes to the " except urllib.error.URLError" success/no-success lines.
password_mgr = urllib.request.HTTPPasswordMgrWithDefaultRealm()
password_mgr.add_password(None,url, username, password)
handler = urllib.request.HTTPBasicAuthHandler(password_mgr)
opener = urllib.request.build_opener(handler)
try:
resp = opener.open(url,None,1)
except urllib.error.URLError as e:
print ("no success")
else:
print ("success!")
I want to know if there is a built-in BASH command that prints some text on stderr, just like the echo command that prints text on stdout. I don't want to use temporary io-redirection. I use a built-in command to generate an error on stderr such as ls --asdf (ls: unrecognized option '--asdf') but I want something neater,
Many IDEs supports to import maven projects directly, but maven has a maven-eclipse-plugin, when you run :
mvn eclipse:eclipse
It will generate eclipse project settings ,then you can import as generic eclipse project.
Which one is better?
I prefer the first one, as my IDE is eclipse 3.5 shiped with WTP 3.1 and m2eclipse, I don't know if maven-eclipse-plugin support WTP 3.1 project settings ? If I don't import correct project settings,
I don't think eclipse will recognize my project,when I deploy a web application, it ususally can't find webroot folder.
I have global static variables in a C library, which generate exceptions in a multithread run. I need to make them safe in some way (i.e. - each thread should relate to a different instance of these variables). Any recommended methods?
10x
I'm planning some kind of APNS service which sends a password data.
But I don't want to make user's device alert any message when the app is not running.
Is this possible? And how to do this?
Is there a possiblity to get or generate a version ID on every GWT compile is performed, from ant Build File or using 'Compile' button Google Eclipse Plugin?
Hi.
I have a process where one of the things to do is to capture the output from a print into a file for further processing. For this I have configured a "FILE:" printer port which works very nicely but asks everytime for the file name to use.
Unfortunately "FILE" is not a very descriptive word when trying to use a search engine :(
Is there a small driver somewhere which does exactly the same as the FILE: driver, but can automatically generate a filename (perhaps based on a pattern) and just print to that?
Hello everyone,
I am using Windows Server 2008 R2 with Windows Media Service. At the client side, I want to use Silverlight to play the media file. I am using VSTS 2008 + Silverlight 3 + ASP.Net + .Net 3.5. I want to know how to implement a custom authentication protocol (I have a custom user database, which contains user name and password. I want to enable logged-in user to be able to play through Silverlight)?
thanks in advance,
George
I'm learning how to use the ASP.net membership, when a user registers they just create a username and password, however i want to create a page on my website called "profile" where they can fill in extra details such as firstname, lastname, date of birth ect. However i don't see where i can place this in the asp.net membership database. Theres an asp.net_profile table however i'm not sure how this works.
Could someone please explain how i can do this?
I have seven columns in my table:
hours, weight, status, total_hours, total_weight and percentage
total_weight = weight where status = 'X'
total_hours = hours where status = 'X'
percentage = total_hours/sum(weight)
sum(weight) is an aggregate function
I would like to specify formula to generate the three computed columns.
What do i do?
Hello,
how can I generate a xsd schema for a c# type (in code). There must be certainly a way, because xsd schema is generated for datacontracts in wcf.
Lets say I have a function where the parameter is passed by value instead of const-reference. Further, lets assume that only the value is used inside the function i.e. the function doesn't try to modify it. In that case will the compiler will be able to figure out that it can pass the value by const-reference (for performance reasons) and generate the code accordingly? Is there any compiler which does that?
Hi,
how can i convert an index to an string ?
For example i would like to get the 'signin' index here:
array(1) {
["signin"]=>
array(2) {
["email_address"]=>
string(0) ""
["password"]=>
string(0) ""
}
}
Javi
Hi
I am trying to generate a CSV file from DB Query as source one of my column is having datatype nvarchar(50) with values as "01050007029604301001"
After the export when the csv file is viewed using Excel the value appears as
"1.0500E18" .
How can i stop this .
Please suggest
I have a domain class that when persisted to Oracle must update a column to sysdate. NHibernate must only generate 1 SQL. e.g.
update person set age = 12, stamp = sysdate where id = 1;
Can this be done?
My WebApp needs to authenticate user before allowing any sort of access. The scenario I'm trying to implement is a login page with username and password fields. Once user hits "send" button, a sign like "Verifing..." should be shown up while an RPC call verifies credentials. In case of success, load the main app screen.
What is the best way to implement that?
Hi everyone, I'm reading O'reilly's Learning iPhone Programming and on page 79 it says I have to create a new file (UIViewController subclass) and thick the checkbox to ask Xcode to generate an associated NIB file. The problem is: I do not have this option in my XCode 3.1 (this options is from XCode 3.2). So, I have to do it manually, and I don't know how. Could someone please help me? Thanks in advance!
Hi,
I have this page.
login: [email protected]
password: m
As you can see in IE7 there isn't any border below 'Alcorcon', 'Madrid', etc. In FF yes.
Why?
Regards
Javi
I'm trying to generate top-level abstract class with JCodeModel library, but I can't find any way to change class modifiers.
It's possible for nested classes (JDefinedClass API provides methods that get modifiers as parameters). But for creation of top level classes I found only JCodeModel API methods that get fully qualified name with or without ClassType (class/interface/annotation/enum) as parameters.
Does anybody can suggest me how to change modifiers of JDefinedClass to make it abstract?
I only got the account username (DOMAIN\USER).
The check also has to take into account the user's groups.
I'd like to use this sample, but I can't figure out how to get a WindowsIdentity only from a username without his password.
I am new to photo apps, recently I am interested in making a sticker app like those can be seen in the appstore, I know I would need to use uiimagepickercontroller, uiscrollview and uigesturerecognizer.
However I wonder which code method should I use for the app to load multiple stickers? Should it be called programmatically? Is that I would need to use the if-statement, say if one sticker is loaded, the app will auto generate a new sticker on top of it?
I am trying to connect to my yahoo account . So i entered the my username password , but the connection never seems to happen . Its the same error for pigdin while connecting to yahoo . It works perfectly fine for gtalk but not for yahoo ..Any way to get around this ?
I need to generate a composite page made up of other pages in our system.
Is it possible for me to dynamically add iFrames to a page, each with its own src pointing to different URLs which are determined on the fly? If so, is there a preferred method to this?
Otherwise I need to refactor the other pages into user controls so I can add them as needed.
The docs are very clear on how to authenticate against open LDAP with ZF. But, I failed to find the docs on how to register new users, delete users and update users (change password) using ZF on Open LDAP.
Any good docs out there?