Using ASP.NET 3.5 with VB codebehind.
I don't want to use a webservice to populate an autocomplete extender on a textbox. In this case, it's where the user is entering email addresses and I don't want to make a trip to the database every single time. I'd much rather keep a collection in session state and 'bind' the autocomplete to that.
Is it possible to set ServicePath and/or ServiceMethod to something in the codebehind as opposed to a webservice?
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?
From MBUnit I am trying to check if the values of two objects are the same using
Assert.AreSame(RawDataRow, result);
However I am getting the following fail:
======================
Expected Value & Actual Value : {RawDataRow: CentreID = "CentreID1", CentreLearnerRef = "CentreLearnerRef1", ContactID = 1, DOB = 2010-05-05T00:00:00.0000000, Email = "Email1", ErrorCodes = "ErrorCodes1", ErrorDescription = "ErrorDescription1", FirstName = "FirstName1"}
Remark : Both values look the same when formatted but they are distinct instances.
======================
I don't want to have to go through each property, can I do this from MbUnit
[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);
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'
}
}
});
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?
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!
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.
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" />
mplayer (from mplayerhq.hu) on windows repeats the last few audio frames upon exit.
When the video ends, before you can see
Exiting... (End of file)
in the command prompt, you will hear the last 1/2 second or so of the audio track again.
This behavior is the same for multiple containers/codecs/soundcards Vista or Windows 7.
Is there a workaround for this?
My playback specs:
MPlayer Sherpya-MT-SVN-r31027-4.2.5 (C) 2000-2010 MPlayer Team
150 audio & 343 video codecs
Playing splash_final.wmv.
ASF file format detected.
[asfheader] Audio stream found, -aid 1
[asfheader] Video stream found, -vid 2
VIDEO: [WMV3] 1280x720 24bpp 1000.000 fps 6291.5 kbps (768.0 kbyte/s)
==========================================================================
Opening video decoder: [dmo] DMO video codecs
DMO dll supports VO Optimizations 0 1
DMO dll might use previous sample when requested
Decoder supports the following formats: YV12 YUY2 UYVY YVYU RGB8 [..]
Decoder is capable of YUV output (flags 0x1b)
Movie-Aspect is undefined - no prescaling applied.
VO: [directx] 1280x720 = 1280x720 Planar YV12
Selected video codec: [wmv9dmo] vfm: dmo (Windows Media Video 9 DMO)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 329.8 kbit/23.37% (ratio: 41221-176400)
Selected audio codec: [ffwmav2] afm: ffmpeg (DivX audio v2 (FFmpeg))
==========================================================================
AO: [dsound] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
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?
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?
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,
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'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!
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!
Hi Everyone,
I need to be able to call data from a different model - not just one field, but any of them.
At the moment I have the following models:
kase
person
company
party
I can call information from the company to the kase and from the person to the kase using this:
<li>Client Company Address: <span class="address"><%=h @kase.company.companyaddress %></span></li>
<li>Case Handler: <span><%=h @kase.person.personname %></span></li>
Those two work, however if I add the following:
<li>Client Company Fax: <span><%=h @kase.company.companyfax %></span></li>
<li>Case Handler Tel: <span><%=h @kase.person.personmobile %></span></li>
<li>Case Handler Email: <span><%=h @kase.person.personemail %></span></li>
Any idea whats wrong?
Thanks,
Danny
EDIT: I get the following error message:
NoMethodError in Kases#show
Showing app/views/kases/show.html.erb where line #37 raised:
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.personname
The lines that are noted are as follows:
34: <div id="clientinfo_showhide" style="display:none">
35: <li>Client Company Address: <span class="address"><%=h @kase.company.companyaddress %></span></li>
36: <li>Client Company Fax: <span><%=h @kase.company.companyfax %></span></li>
37: <li>Case Handler: <span><%=h @kase.person.personname %></span></li>
38: <li>Case Handler Tel: <span><%=h @kase.person.personmobile %></span></li>
39: <li>Case Handler Email: <span><%=h @kase.person.personemail %></span></li>
40: </div>
The model for the kase is as follows:
class Kase
belongs_to :company # foreign key: company_id
belongs_to :person # foreign key in join table
The model for the person is as follows:
class Person
has_many :kases # foreign key in join table
belongs_to :company
The model for the company is as follows:
class Company
has_many :kases
has_many :people
def to_s; companyname; end
Hope this helps!
I am having problems playing video in Winamp (the movie I am trying to play is an AVI - not sure if other formats work). I have installed the K-Lite Codec Pack, and the video does work in Winamp Classic. I can also play the video in Winamp on another machine (although I can't remember the exact configuration details of that machine - and I don't think they're relevant).
There are a few symptoms:
The content of the Video view is either empty, transparent, or displays rendering from other programs.
Opening the Visualization view shows the following error:
MILKDROP ERROR
DirectX initialization failed (GetDeviceCaps). This means that no valid 3D-accelerated display adapter could be found on your computer. If you know this is not the case, it is possible that your graphics subsystem is unstable; please try rebooting your computer and then try to run the plugin again. Otherwise, please install a 3D-accelerated display adapter.
Trying to open streams via the SHOUTCast TV plugin shows Error opening video output, and the video does not open.
Opening the file with WMC causes the following error (although the movie still plays):
Error creating DX9 allocation presenter
CreateDevice failed
D3DERR_NOTAVAILABLE
There are no warnings displayed in Device Manager, although the display adapter is the standard Windows one.
Running DxDiag shows no problems (codec for Video listed as XviD 1.1.2 Final).
GSpot reports that codecs are installed.
System specs:
- Windows Server 2008 r2 Standard 64-bit, with latest updates;
- .NET 3.5.1 installed;
- Winamp v5.6.01 (latest version);
- DirectX 11 (Latest version);
- K-Lite Codec Pack 7.0.0 (Full);
- Machine is HP DC7600 - full specs here.
Please comment if there is any more information which will help to diagnose the problem.
Hello, I am just getting started with Pylons and am confused as to how to account for exceptions. What is the proper way to error check user input (ensure a correct email address, check that it doesn't yet exist in the database, etc ...)? Should these checks go inside the model classes or somewhere else? Sample code would be great.
(there may be a more suited SE site for this question so feel free to shift)
I have some data I'd like to make open to the public - It's synatesis of some related data retrived from freedom of infomation requests over the last year.
The data itself is at http://www.cs.rhul.ac.uk/home/joseph/domesday/Domesday-Scotland.csv or for fans of Excel, at http://www.cs.rhul.ac.uk/home/joseph/domesday/Domesday-Scotland.xlsx . It's no more than a table with about five columns.
I'd like to make this properly open data, so I was looking at the 5 star deployment scheme for Open Data. Much of which is fine but I'm confused towards the end and I could do with an explenation from people who know the answers.
So to get achieve the star levels I need:
"make your stuff available on the Web (whatever format) under an open license" trival - all I have to do is put the notes up on the page that will give the provance of the data.
"make it available as structured data (e.g., Excel instead of image scan of a table)"… done…
"use non-proprietary formats (e.g., CSV instead of Excel)" - done…
"use URIs to identify things, so that people can point at your stuff" - this is where I start to get a bit hazy - does this mean there should be an URI for every line in the table?
"link your data to other data to provide context" - this isn't massively clear to me - does this mean to give the provence of the data? One column of the data I've put out is a link to where the data came from - is that the sort of thing we're looking at?
Any and all information and answers welcome…
EDIT - or if anyone wants to recommend a place SE or other place to ask the question - that would be cool...
I want to create a makefile variable that is a multi-line string (e.g. the body of an email release announcement). something like
ANNOUNCE_BODY="
Version $(VERSION) of $(PACKAGE_NAME) has been released
It can be downloaded from $(DOWNLOAD_URL)
etc, etc"
But I can't seem to find a way to do this. Is it possible?
I want to get a list of all InventoryItems
According to this document:
https://system.netsuite.com/help/helpcenter/en_US/Output/Help/SuiteCloudCustomizationScriptingWebServices/SuiteTalkWebServices/getAll.html
I'm forming the following request:
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:platformMsgs="urn:platform_2013_1.webservices.netsuite.com" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<passport>
<email>******</email>
<password>******</password>
<account>******</account>
</passport>
</env:Header>
<env:Body>
<platformMsgs:getAll>
<recordType>InventoryItem</recordType>
</platformMsgs:getAll>
</env:Body>
</env:Envelope>
But receiving response with the error:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2013_1.platform.webservices.netsuite.com">
<platformMsgs:nsId>WEBSERVICES_969904_100920131651936419141601801_cbf1690968b43</platformMsgs:nsId>
</platformMsgs:documentInfo>
</soapenv:Header>
<soapenv:Body>
<getAllResponse xmlns="urn:platform_2013_1.webservices.netsuite.com">
<platformCore:getAllResult xmlns:platformCore="urn:core_2013_1.platform.webservices.netsuite.com">
<platformCore:status isSuccess="false">
<platformCore:statusDetail type="ERROR">
<platformCore:code>GETALL_RCRD_TYPE_REQD</platformCore:code>
<platformCore:message>The getAll record type is required.</platformCore:message>
</platformCore:statusDetail>
</platformCore:status>
</platformCore:getAllResult>
</getAllResponse>
</soapenv:Body>
</soapenv:Envelope>
I've tried to request currencies, states - the response always the same
I've tried following variants:
<GetAllRecordType>inventoryItem</GetAllRecordType>
and
<recordType>inventoryItem</recordType>
and
<GetAllRecordType>currency</GetAllRecordType>
and
<recordType>currency</recordType>
with the same response:
<platformCore:message>The getAll record type is required.</platformCore:message>
According to https://webservices.netsuite.com/xsd/platform/v2013_2_0/coreTypes.xsd - I've specified correctly recordType (btw I've also tried without any success)
I'm using ruby and there is no complete library for ruby. The one that is exists doesn't contain almost all things I'm going to use.
Can someone help me what I'm doing wrong or may be someone have working example