Daily Archives

Articles indexed Thursday March 18 2010

Page 1/133 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • authlogic email as username

    - by ADAM
    How do i override/set authlogic to use the email field instead of the username field for both signup and authentication, having a username + an email is occasionally too intense for some some registration scenarios

    Read the article

  • Session lost and application end, after file download

    - by Amr ElGarhy
    I have this code in the end of link button click: Response.ContentType = "application/zip"; Response.AppendHeader("content-disposition", "attachment; filename=download.zip"); Response.TransmitFile(Server.MapPath("download.zip")); Response.End(); to download a zip file from an aspx page. In the previous page i set a session variable, after going to this download page and download the file, then press back i find the session=null "this happen after downloading more than 1 time", and the application_end in global.ascx called. Do you know why this may happen??

    Read the article

  • Proper Way to Create Standards-Compliant Webpage Structure

    - by Sakamoto Kazuma
    I have been working through projects involving packages that do all the web design stuff for me for the past few years. I will admit that I have not been able to focus any on actual web design. I was wondering what the standard is these days for website layouts. Are layout-tables looked down upon now? Or are all layouts done with div tags and controlled through CSS? Are frames even used anymore? Note I am not talking about chart-table tables when I say layout tables.

    Read the article

  • mysql match against hebrew

    - by Devenv
    Hey, Trying to solve this for a very long time now... SELECT MATCH(name) AGAINST('??????') (hebrew) doesn't work, but SELECT MATCH(name) AGAINST('abraxas') SELECT MATCH(name) AGAINST('????????') (english, russian) work perfectly. I know it's something with character-set, but I tried all kind of settings and it didn't work. For now it's latin-1. LIKE works I'm pretty much sure that any weird language like arabic etc won't work...

    Read the article

  • DataContractSerializer and deserializing web service response types

    - by matra
    Hi, I am using calling web services and using WCF generated service-reference on the client. I have saved XML responses that are received from test service to disk (without SOAP envelope and body tags) I would like to load them from disk and create objects from them. Lets' take the following method from my web service: SomeMethodResponse SomeMethod(SomeMethodRequest req) I manually (through SOAP UI) save the response to disk to file, Sample response: < SomeMethodResponse xmlns="http://myNamespace"> <SomeMember1>value</SomeMember1> </SomeMethodResponse xmlns="http://myNamespace"> Then I try to deserialize the object from file using: DataContractSerializer dcs = new DataContractSerializer(typeof(SomeMethodResponse)) This fails – the serializer complains with the error, that it is expecting element in namespace 'http://schemas.datacontract.org/2004/07', but found element in 'http://myNamespace'. Question: Why does the DataContractSerializer not use the namespace, that is declared on SomeMethodResponseType with XmlTypeAttribute(Namespace="http://myNamespace")? I can work around this by explicitly providing the namespace and the root element to DataContractSerializer constructor. But then it fails with message similar to: Error in line X position Y (last line of the XMLdocument). 'EndElement' 'SomeMethodResponse from namespace 'httpmyNapespace’ is not expected. Expecting element 'someNameField'. SomeName is an element in the XSD that web service is using. It is also a property on the SomeMethodResponse type, backed by the private field called someNameField. It looks like DataContractSerializer is trying to deserialize the fields in addition to properties. How can I deserailize XML that I have saved from disk and get back the object of same type that SomeMethod is returning? Thanks, Matra

    Read the article

  • XML Reading org.xml.sax.SAXParseException: Expecting end of file.

    - by vivekbirdi
    Hi, I am getting problem while parsing XML File using JDE 4.6. FileConnection fconn = (FileConnection)Connector.open ("file:///SDCard/Dictionary.xml",Connector.READ_WRITE); InputStream din= fconn.openInputStream(); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.parse(din); here I am getting Exception at Document document = builder.parse(din); org.xml.sax.SAXParseException: Expecting end of file. please give me some solution. Thanks

    Read the article

  • Adding a modal view controller when I press a info button inside a tableviewCell

    - by gvalero87
    Hi, Here is a complex question, maybe it's not hard but there are many doubts i have. First let me give you what i have. This is the only place where i've gotten good answers. I have a table view controller with custom cells. In those cells i added a button (info dark one from IB) for each one of the cells. What i would like it's that when I press that button it displays a new view with more information about that cell, different of the view that i get from didSelectRowAtIndexPath. I've read a little bit about Modal View Controller and I think this is a case where I should use it. So here are my questions: How do i make a view controller a modal view controller?. I read that i have to have a delegate. Is there an example of how to create a normal modal view controller. I haven't been able to do so. How can this button know which cell is it from?. What i have right is a subclass tableviewcell with an IBOUTLET to this info button. This is not an important question because i guess i just could add a NSIndexPath attribute. I added an action in my tableviewsubclass that is triggered when the touchDown Event is called. I did this connection through IB. How can I call the modal view controller through here?, and is it even the right place to do this? Thanks

    Read the article

  • XAML itemscontrol visibility

    - by Sam
    Hello, I have a ItemsControl in my XAML code. When some trigger occur i want to collapse the full itemsControl, so all the elements. <ItemsControl Name="VideoViewControl" ItemsSource="{Binding Videos}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapPanel ItemHeight="120" ItemWidth="160" Name="wrapPanel1"/> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <views:VideoInMenuView /> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> The trigger: <DataTrigger Value="videos" Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}, AncestorLevel=1}, Path=DataContext.VideosEnable}"> <Setter Property="ScrollViewer.Visibility" Value="Visible" TargetName="test1" /> <Setter Property="ScrollViewer.Visibility" Value="Collapsed" TargetName="test2" /> <Setter Property="WrapPanel.Visibility" Value="Collapsed" TargetName="wrapPanel1" /> </DataTrigger> When I add the last setter the program crashes. Without this last setter it works fine but no visibility change.... What is wrong with this code? What is the write method to collapse all the elements of a ItemsControl with a trigger?

    Read the article

  • Triggering FancyBox from a DIV onclick();

    - by Tim
    Hello, This question seems to be asked a lot, but I haven't seen an answer that works. So I have a div that works like this: <div onclick="location.href='http://www.abc123.com';" class="menuitem"> </div> Now I need the link (specified in location.href) to open up in a fancybox iframe. I would love to use an A element but this div holds other items so I don't think I can. I am open to all suggestions... even using elements other than divs, or using a different jquery iframe lightbox. Thanks Tim Mohr

    Read the article

  • Using Lite Version of Entity in nHibernate Relations?

    - by Amitabh
    Is it a good idea to create a lighter version of an Entity in some cases just for performance reason pointing to same table but with fewer columns mapped. E.g If I have a Contact Table which has 50 Columns and in few of the related entities I might be interested in FirstName and LastName property is it a good idea to create a lightweight version of Contact table. E.g. public class ContactLite { public int Id {get; set;} public string FirstName {get; set;} public string LastName {get; set;} } Also is it possible to map multiple classes to same table?

    Read the article

  • Slow query with unexpected index scan

    - by zerkms
    Hello I have this query: SELECT * FROM sample INNER JOIN test ON sample.sample_number = test.sample_number INNER JOIN result ON test.test_number = result.test_number WHERE sampled_date BETWEEN '2010-03-17 09:00' AND '2010-03-17 12:00' the biggest table here is RESULT, contains 11.1M records. The left 2 tables about 1M. this query works slowly (more than 10 minutes) and returns about 800 records. executing plan shows clustered index scan (over it's PRIMARY KEY (result.result_number, which actually doesn't take part in query)) over all 11M records. RESULT.TEST_NUMBER is a clustered primary key. if I change 2010-03-17 09:00 to 2010-03-17 10:00 - i get about 40 records. it executes for 300ms. and plan shows index seek (over result.test_number index) if i replace * in SELECT clause to result.test_number (covered with index) - then all become fast in first case too. this points to hdd IO issues, but doesn't clarifies changing plan. so, any ideas? UPDATE: sampled_date is in table sample and covered by index. other fields from this query: test.sample_number is covered by index and result.test_number too. UPDATE 2: obviously than sql server in any reasons don't want to use index. i did a small experiment: i remove INNER JOIN with result, select all test.test_number and after that do SELECT * FROM RESULT WHERE TEST_NUMBER IN (...) this, of course, works fast. but i cannot get what is the difference and why query optimizer choose such inappropriate way to select data in 1st case.

    Read the article

  • .htaccess rewrite outputs undesired content. I think??

    - by Mark
    I am trying to rewrite a URL using .htaccess. I am running on Apache version 2.2.15. Contents of .htaccess: RewriteEngine on RewriteRule cars/(.*) cars/member_page.php?user=$1 RewriteRule cars/(.*)/ cars/member_page.php?user=$1 Contents of member_page.php: <?php echo $_GET[user]; ?> URL entered into browser: http://www.mydomain.com/cars/user1 The browser outputs the string "member_page.php" instead of "user1" How do I make it output the contents of (.*) from the original URL.

    Read the article

  • c# WinForms ReportViewer Performance issue using RefreshReport() and ServerReport.SetParameters()

    - by mdk
    Hi All, Currently I am writing a c# client application that uses the WinForms ReportViewer Control to display reports from a remote server. I am having performance troubles with the ReportViewer Control, to be specific with the 2 methods reportViewer.ServerReport.SetParameters() and reportViewer.RefreshReport() – they both take a really long time to complete and not just on the very first call, but on each subsequent call as well. SetParameters() takes 20 to 40 seconds (they vary greatly in time, some execute event okay fast) and RefreshReport() is a bit faster but still takes ages. I don’t think the server is the culprit, as the same report viewed using the browser renders pretty fast, about a second tops. The report in question doesn't matter as well. When I break into the process and take a look at the call stack, I see a call to Socket.DoConnect. So I thought that’s a good reason to start using fiddler and I installed it, disabled caching and fired up the app again to see which call takes that long to connect, but the performance issue was gone. By using a proxy I am having the same performance as the webbrowser. FYI: I am using NTLM authentication in the following way: reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = new NetworkCredentials() { Username = ... } I don’t have a strong webbackground, so I guess my question is: What should this tell me / What should I be looking into? (Btw: Adding fiddler to my installation package is not the solution I am looking for :)) I am grateful for any pointers. Take care, -Martin

    Read the article

  • Ninject.Web, OnePerRequestModule, and IIS7 Integrated Pipeline

    - by Ted
    Using Ninject.Web with ASP.NET WebForms project. Works without issues using classic pipeline, but when it's under integrated pipeline, a null reference exception occurs on every request (which I've narrowed down to the use of the OnePerRequestModule): [NullReferenceException: Object reference not set to an instance of an object.] System.Web.PipelineStepManager.ResumeSteps(Exception error) +1216 System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) +113 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +616 The above always occurs unless I remove the OnePerRequestModule initializization. occurs consistently on a very basic test app I put together. On a standard app where I actually want to implement it, I can solve the issue by initializing the OnePerRequestModule like so: protected override IKernel CreateKernel() { // This will always blow up. //var module = new OnePerRequestModule(); //module.Init(this); IKernel kernel = new StandardKernel(new MyModule()); // This works on larger app, but on basic app, it makes no difference under integrated pipeline as the above exception is always thrown. var module = new OnePerRequestModule(); module.Init(this); return kernel; } Before I start spelunking further, is anybody out there using Ninject.Web extension successfully under the integrated pipeline in IIS7 AND using the OnePerRequestModule? There are certain restrictions for modules under the integrated pipeline that weren't there in previous IIS versions/classic pipeline. Quickly thrown together sample project at http://www.filedropper.com/test_59 And in case it's not obvious with Ninject.Web: it's an ASP.NET WebForms project.

    Read the article

  • Mouse wheel in VirtualPC (mostly) does not work on 64-bit Windows 7 RC

    - by JonStonecash
    I have recently upgraded my laptop from WinXP Pro (32-bit) to Windows 7 RC (64-bit). I have a number of VirtualPC 2007 images that I use for testing on various platforms and looking at beta software. I have installed the 64-bit version of VirtualPC. The images all work with the exception of the mouse wheel within the virtual machine. I have tried this out with WinXP Pro, Windows 7 RC, and Windows Server 2008 images. All are 32-bit and all exhibit the same behavior: a gentle rotation of the wheel does nothing; a quick rotation of the wheel sometimes gets a scroll and sometimes not. I regard this behavior as unusable as I tend to use the mouse wheel a lot. All of this worked just fine on WinXP. I have re-installed the Virtual machine additions on all of the machines. The Windows 7 RC virtual image was created after the upgrade to Windows 7 and the 64-bit version of VirtualPC (just to isolate the possibility that I had corrupted the images during the transition). I have googled, binged, and yahoo-ed. There are scattered mentions of this problem (dating back to VPC 2004) but no solutions. I am aware that I could start up one of these images and then use remote desktop connections to get access to that image. I, in fact, do just that for some development that I am doing; the mouse works just fine. This is acceptable in this case because I spend hours at a time in the development VM. These test environments are different in that I will bring up an image for just a short time: minutes rather than hours. Adding the rdc step is much more significant in these cases. Does anyone have any idea of what to do next?

    Read the article

  • Running nph-script.cgi keeps outputting Server details at the end

    - by wgewweg
    I am running a nph-script.cgi on my server. The server keeps adding HTTP/1.1 200 OK Date: Thu, 05 Nov 2009 02:28:53 GMT Server: Apache/2.2.8 (Ubuntu) PHP/5.2.8-1hardy~ppa1 with Suhosin-Patch mod_perl/2.0.3 Perl/v5.8.8 Content-Length: 0 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/plain X-Pad: avoid browser bug At the bottom of each page loaded via the .cgi script. why is this the case? How do I remove this annoying message that is appended to all pages ?

    Read the article

  • Can't Run .exe files from my DVD-R/W Rom win XP Pro

    - by Sohail
    Hi everybody In my windows XP Pro I can't run any .exe file from my DVD Rom, but I can run them on my hard drive, Even I can't copy anything from a DVD to my hard drive. and when I run .exe file there is some prompt message like "setup.exe is not a valid win32 application" or something like that. I would really appreciate if anyone can help

    Read the article

  • how to access dynamically created list in jquery?

    - by Ohana
    hi, i have a unordered list of links, which are dynamically created by Ajax, and for each link i want to add click function to it, but it won't work, please help! here is my code: html: list //to create links var str = ''; $.each(json.opts, function(i, opt) { var id = opt + '-list'; str += '' + opt + ''; //link } $("#list").html(str); ... //to add click function to each links, this won't work $("#list li").each(function (i) { alert(i + " : " + $(this).text()); });

    Read the article

  • java.lang.UnsupportedClassVersionError: Bad version number in .class file?

    - by grmn.bob
    I am getting this error when I include an opensource library that I had to compile from source. Now, all the suggestions on the web indicate that the code was compiled in one version and executed in another version (new on old). However, I only have one version of JRE on my system. If I run the commands: $ javac -version javac 1.5.0_18 $ java -version java version "1.5.0_18" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_18-b02) Java HotSpot(TM) Server VM (build 1.5.0_18-b02, mixed mode) and check in Eclipse for the properties of the java library, I get 1.5.0_18 Therefore, I have to conclude something else, internal to a class itself, is throwing the exception?? Is that even possible?

    Read the article

  • SQL Server Express 2005 Merge Replication using RMO causes Null Reference exception

    - by Craig Shearer
    I'm trying to use RMO to programmatically perform merge synchronization. I've basically copied the SQL Server example code, as follows: // Create a connection to the Subscriber. ServerConnection conn = new ServerConnection(subscriberName); MergePullSubscription subscription; try { // Connect to the Subscriber. conn.Connect(); // Define the pull subscription. subscription = new MergePullSubscription(subscriptionDbName, publisherName, publicationDbName, publicationName, conn, false); // If the pull subscription exists, then start the synchronization. if (subscription.LoadProperties()) { // Check that we have enough metadata to start the agent. if (subscription.PublisherSecurity != null || subscription.DistributorSecurity != null) { subscription.SynchronizationAgent.Synchronize(); } else { throw new ApplicationException("There is insufficent metadata to " + "synchronize the subscription. Recreate the subscription with " + "the agent job or supply the required agent properties at run time."); } } else { // Do something here if the pull subscription does not exist. throw new ApplicationException(String.Format( "A subscription to '{0}' does not exist on {1}", publicationName, subscriberName)); } } catch (Exception ex) { // Implement appropriate error handling here. throw new ApplicationException("The subscription could not be " + "synchronized. Verify that the subscription has " + "been defined correctly.", ex); } finally { conn.Disconnect(); } I've got the server merge publication defined correctly, but when I run the above code, I get a null reference exception on the call to: subscription.SynchronizationAgent.Synchronize(); The stack trace is as follows: at Microsoft.SqlServer.Replication.MergeSynchronizationAgent.StatusEventSinkMethod(String message, Int32 percent, Int32* returnValue) at Test.ConsoleTest.Program.SynchronizePullSubscription() in F:\Visual Studio Projects\Test\source\Test.ConsoleTest\Program.cs:line 124 It seems, from the stack trace, like something to do with the Status event, but I don't have a handler defined, and defining one makes no difference.

    Read the article

  • Can't make wmode: 'transparent' work on sIFR 3

    - by Synue
    I've been trying to use sIFR to change some text in my webpage. It works fine until I try to get it to use a transparent canvas. The code I'm using is as follow. I have no idea to fix it. I've seen a lot of people make this questions about wmode: 'transparent' and it all seems to work but mine. Can someone give me a hand??? Without the wmode: 'transparent' property it works fine. When I include the property it doesn't activate sIFR and we get the page as the normal HTML. sIFR.replace(myriadPro, { selector: '#title1,#title3,#title5,#title7,#title9,#title11,#title13,#title15,#title17,#title19', css: [ '.sIFR-root {background-color:none;font-size:45px;visibility:visible;text-decoration:none;color:#4C4843;cursor:pointer;}' ], wmode: 'transparent' });

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >