I want to sell my application, but I wonder is there any cheap/free cms or script to validate the paypal transaction, and then send serial from a db to desired email?
I constantly find myself sending .NET code snippets to other developers using MS outlook email. Is there a code editor plugin I can use that can help in formatting and copy/paste (something like SO editor?
Hi,
I'm writing a c# application that will process some text and provide basic query functions. In order to ensure the best possible support for other languages, I am allowing the users of the application to specify the System.Globalization.CultureInfo (via the "en-GB" style code) and also the full range of collation options using the System.Globalization.CompareOptions flags enum.
For regular string comparison I'm then using a combination of:
a) String.Compare overload that accepts the culture and options
b) For some bulk processes I'm caching the byte data (KeyData) from CompareInfo.GetSortKey (overload that accepts the options) and using a byte-by-byte comparison of the KeyData.
This seemed fine (although please comment if you think these two methods shouldn't be mixed), but then I had reason to use the HashSet< class which only has an overload for IEqualityComparer<.
MS documentation seems to suggest that I should use StringComparer (which implements both IEqualityComparer< and IComparer<), but this only seems to support the "IgnoreCase" option from CompareOptions and not "IgnoreKanaType", "IgnoreSymbols", "IgnoreWidth" etc.
I'm assuming that a StringComparer that ignores these other options could produce different hashcodes for two strings that might be considered the same using my other comparison options. I'd therefore get incorrect results from my application.
Only thought at the moment is to create my own IEqualityComparer< that generates a hashcode from the SortKey.KeyData and compares eqality be using the String.Compare overload.
Any suggestions?
I am designing a (near) real-time Netty server to distribute a large number of very small messages to a large number of clients across the internet. In internal, go as fast as you can testing, I found that I could do 10k clients no sweat, but now that we are trying to go across the internet, where the latency, bandwidth etc varies pretty wildly we are running into the dreaded outOfMemory issues, even with 2 gigs of RAM.
I have tried various workarounds(setting the socket stack sizes smaller, setting high and low water marks, cancelling things that are too old), and they help a little, but they seem to only help a little bit. What would some good ways to optimize Netty for sending large #s of small messages without significant delays? Also, the bulk of the message only consists of one kind of message that I don't particularly care if it doesn't arrive. I would use UDP but because we don't control the client, thats not really a possibility. Is it possible to set a separate timeout solely for this kind of message without affecting the other messages?
Any insight you could offer would be greatly appreciated.
In my mental model of authentication, a user should be distinct from the way they log in. So for example, a User could have an associated EmailLogin (with an email/password), or they could have many (or none). Similarly they could have 0..* associated OpenIDLogin credentials.
Are there any existing authentication libraries for Rails which use this method?
Alternatively, is this a really terrible idea?
Hi,
i am student and cannot afford the premium support, so my question here:
I have quite a simple XML and it gives me the following Error:
http://img33.imageshack.us/i/screenprn.png/
Ext.regModel('User', {
fields: ['id', 'name', 'email']
});
var store = new Ext.data.Store({
model: 'User',
autoLoad:true,
proxy: {
type: 'ajax',
url : 'ajax/user.xml',
reader: {
type : 'xml',
model: 'User',
record: 'user'
}
}
});
[Rails] Where to put this code?
I have a user1 and when another registered user2 sees the profile of user1, has some buttons on it: ['add as friend', 'give me your number', 'give me your email', 'ask her out', 'view photos']. The 1,2,3,4 are POST, with AJAX. Now, i have to make a new controller named 'ProfileActionsController' or i should put this code in the 'UsersController'?
or maybe a another posiibility? thanks ;)
Hi
I am able to authenticate the user using ADFS and succeded in getting the user alias using the below statement. Since some time, i am looking for a way in getting the other claims of the authenticated user, like email, name, roles, username etc.
Any help on this would be appreciated.
string alias = ((MicrosoftAdfsProxyRP.MicrosoftPrincipal)HttpContext.Current.User).Alias;
Response.Write (alias);
I setup the demo with a modified login I found called open-id selector. the login works fine and the identity url comes back, but the SREG data I ask for is never populated, required or optional. I am logging into my page with a gmail account. Here is the code from my try_auth.php that I edited
$sreg_request = Auth_OpenID_SRegRequest::build(
// Required
array('email'),
// Optional
array('fullname', 'gender', 'timezone', 'dob', 'country'));
what gives?
How do I configure Ruby on Rails to output standard HTML code instead of XHTML when using helpers (form, javascript, css, etc.)?
I don't want to have the slash at the end:
<input name="email" type="text" />
I have the following code to get the repeaters' data in my usercontrol (content.ascx.vb):
If did = 0 Then
s = "select etc (statement works on server)"
x = New SqlCommand(s, c)
x.Parameters.Add("@contentid", Data.SqlDbType.Int)
x.Parameters("@contentid").Value = contentid
c.Open()
r = x.ExecuteReader
If r.HasRows Then
Contactinforepeater.DataSource = r
End If
c.Close()
r.Close()
Else
s = "select etc (statement works on server)"
x = New SqlCommand(s, c)
x.Parameters.Add("@contentid", SqlDbType.Int)
x.Parameters("@contentid").Value = contentid
x.Parameters.Add("@did", SqlDbType.Int)
x.Parameters("@did").Value = did
c.Open()
r = x.ExecuteReader
If r.HasRows Then
Contactinforepeater.DataSource = r
c.Close()
r.Close()
End If
End If
Then I have the following repeater control markup in my usercontrol (content.ascx):
<asp:Repeater ID="Contactinforepeater" runat="server">
<HeaderTemplate>
<h1>Contact Information</h1>
</HeaderTemplate>
<ItemTemplate>
<table width="50%">
<tr>
<td colspan="2"><%#Container.DataItem("position")%></td>
</tr>
<tr>
<td>Name:</td>
<td><%#Container.DataItem("surname")%></td>
</tr>
<tr>
<td>Telephone:</td>
<td><%#Container.DataItem("telephone")%></td>
</tr>
<tr>
<td>Fax:</td>
<td><%#Container.DataItem("fax")%></td>
</tr>
<tr>
<td>Email:</td>
<td><%#Container.DataItem("email")%></td>
</tr>
</table>
</ItemTemplate>
<SeparatorTemplate><br /><hr /><br /></SeparatorTemplate>
</asp:Repeater>
When I insert this usercontrol into default.aspx with this code:
<%@ Register src="Modules/Content.ascx" tagname="Content" tagprefix="uc1" %>
and
<form id="form1" runat="server">
<div>
<uc1:Content ID="Content" runat="server" />
</div>
</form>
I do not get any error messages but the expected content from the database is not displayed. Can someone please show me the syntax to get this working or point out where I am going wrong?
Thanks in advance!
I have several web projects built with Symfony v1.0, but I am excited by the new features in Symfony version 1.4 (Improved security, native email support and improved performance).
How can I continue to develop my 1.0 projects but also create a testing environment for version 1.4?
I have generated many pdf files in memory and I want to compress them into one zip file before sending it as a email attachment. I have looked at Rubyzip and it does not allows me to create a zip file without saving it to disk (maybe I am wrong).
Is there any way I can compress those file without creating a temp file ?
I have been experimenting with various uses of hierarchies like this and the differences between absolute and relative imports, and can't figure out how to do routine things with the package, subpackages, and modules without simply putting everything on sys.path. I have a two-level package hierarchy:
MyApp
__init__.py
Application
__init__.py
Module1
Module2
...
Domain
__init__.py
Module1
Module2
...
UI
__init__.py
Module1
Module2
...
I want to be able to do the following:
Run test code in a Module's "if main" when the module imports from other modules in the same directory.
Have one or more test code modules in each subpackage that runs unit tests on the modules in the subpackage.
Have a set of unit tests that reside in someplace reasonable, but outside the subpackages, either in a sibling package, at the top-level package, or outside the top-level package (though all these might end up doing is running the tests in each subpackage)
"Enter" the structure from any of the three subpackage levels, e.g. run code that just uses Domain modules, run code that just uses Application modules, but Application uses code from both Application and Domain modules, and run code from GUI uses code from both GUI and Application; for instance, Application test code would import Application modules but not Domain modules.
After developing the bulk of the code without subpackages, continue developing and testing after organizing the modules into this hierarchy.
I know how to use relative imports so that external code that puts MyApp on its sys.path can import MyApp, import any subpackages it wants, and import things from their modules, while the modules in each subpackage can import other modules from the same subpackage or from sibling packages. However, the development needs listed above seem incompatible with subpackage structuring -- in other words, I can't have it both ways: a well-structured multi-level package hierarchy used from the outside and also used from within, in particular for testing but also because modules from one design level (in particular the UI) should not import modules from a design level below the next one down.
Sorry for the long essay, but I think it fairly represents the struggles a lot of people have been having adopting to the new relative import mechanisms.
Hi
I am trying to create Yahoo messenger client in Android, and i got Openymsg api to implement that.This is small snippet of my code
Session session=new Session();
session.login("Email Id", "password");
But this code is throwing UnknownHost Exception in "scs.msg.yahoo.com".I dont know how to fix this.If any body knows it please help me.
Hi
i am a junior dev in trading app... we have a order refresh verification unit. It has to verify order confirmation from exchange. We send a bunch of different request in bulk ( NEW, MODIFY, CANCEL ) to exchange... Verification has to happen for max N times with each T intervals for all orders. if verification successful for all the order before N retry then fine.. otherwise we need to indicate as verification unsuccessfull. i hv done a basic coding done in very urgent like below
for( N times )
{
for_each ( sent_request_order ) // SENT
{
1) get all the refreshed order from DB or shared mem i.e REFRESHED
2) find current sent order in REFRESHED
if( not_found )
not refreshed from exchange, continue to next order
if( found )
case NEW : //check for new status, mark verification done
case MODIFY : //check for modified status..
//if not mark pending, go to next order,
//revisit the same after T time
case CANCEL : //check for cancelled status..
//if not mark pending, go to next order,
//revisit the same after T time
}
if( all_verified )
exit from verification.
wait ( T sec )
}
order_verification_pending, order_verification_done, order_visited, order_not_visited, all_verified, all_not_verified ... lot of boolean flags used for indication..
is there any better approach for doing this.... splitting responsibilities across the classes......????
i know this is not a general question.... but still flags are making me tidious to handle...
Folks, I have a HTML file which contains a button called "Email this content to me". Upon pressing this button, I want the complete HTML content of the file to be emailed to me.
Can someone tell me if there is a javascript function to do that. A short example would go a long way :)
Thanks in advance
Case One
Say you have a little class:
class Point3D
{
private:
float x,y,z;
public:
operator+=()
...etc
};
Point3D &Point3D::operator+=(Point3D &other)
{
this->x += other.x;
this->y += other.y;
this->z += other.z;
}
A naive use of SSE would simply replace these function bodies with using a few intrinsics. But would we expect this to make much difference? MMX used to involve costly state cahnges IIRC, does SSE or are they just like other instructions? And even if there's no direct "use SSE" overhead, would moving the values into SSE registers and back out again really make it any faster?
Case Two
Instead, you're working with a less OO-based code base. Rather than an array/vector of Point3D objects, you simply have a big array of floats:
float coordinateData[NUM_POINTS*3];
void add(int i,int j) //yes it's unsafe, no overlap check... example only
{
for (int x=0;x<3;++x)
{
coordinateData[i*3+x] += coordinateData[j*3+x];
}
}
What about use of SSE here? Any better?
In conclusion
Is trying to optimise single vector operations using SSE actually worthwhile, or is it really only valuable when doing bulk operations?
If I run a command like this, using ruby's pty class, how do I kill it if I find a certain input string?
cmd = "appcfg.py update cdn"
PTY.spawn("#{cmd} 2>&1") do | input, output, pid |
begin
input.expect("Email:") do
output.write("#{credentials[:username]}\n")
end
input.expect("Password:") do
output.write("#{credentials[:password]}\n")
end
if input.gets == "SOMETHING"
EXIT!
end
rescue Exception => e
puts "GAE Error..."
end
end
What is the right way to do that?
Hi,
I want to send the following JSON text {"Email":"[email protected]","Password":"123456"} to a web service and read the response. I know to how to read JSON. The problem is that the above jason object must be sent in a variable name jason. How can i do this from android? Like creating a request object setting content headers etc.
I'm trying to send an email using classic asp and cdonts on a Windows Server 2003 machine.
But I'm guessing the SMTP service needs to be running. Unfortunately it's asking for teh SP1 disk...which apparently has gone missing. I'm guessing not but is there any other way of doing this?
Thanks,
The authlogic rails gem is doing a LOWER in the sql query.
SELECT * FROM `users` WHERE (LOWER(`users`.email) = '[email protected]') LIMIT 1
I want to get rid of the LOWER part since it seems to be slowing down the query by quite a bit.
I'd prefer to just lower the case in the code since this query seems to be expensive.
I'm not sure where to change this behavior in authlogic.
Thanks!
I've created a form that posts to a cfm file. When running a script onLoad that fills in the form values and tries to submit...The site takes me back to the login screen.
function f()
{
document.getElementById("email").value = "[email protected]";
document.getElementById("password").value = "asdf";
document.getElementById("form1").submit();
}
Please help!