Daily Archives

Articles indexed Wednesday June 9 2010

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

  • How to prevent caching from jQuery Ajax?

    - by cynwong
    Hi, Could anyone please help me with this? I have a web page using .manifest for offline storage caching. In that page, I use jQuery ajax call to get the data from the server. If I first load the page, it is OK. I can switch between Online and Offline. But the problem is when I go back online and refresh the page. jQuery ajax cannot be able to talk to server anymore. Is there a way to for ajax to talk to the server or clear offline cache? My ajax call is as such: $.ajax({ type: "GET", url: requestUrl, success: localSuccess, error: error, dataType: "text", cache:false });

    Read the article

  • Setting breakpoint in c# code with ADPlus

    - by Petr Havlicek
    Hello, I am wondering if it is possible to set a breakpoint in C# code using ADPlus. I find several examples of config files but they always works with native code. Like this one: <ADPlus> <Breakpoints> <NewBP> <!-- Set the breakpoint on ExitProcess. --> <Address>kernel32!ExitProcess</Address> <Type>BP</Type> <Actions>FullDump;Stacks;</Actions> <ReturnAction>G</ReturnAction> </NewBP> </Breakpoints> </ADPlus> Something like this would be useful: <Address>MyCSharpClass.SomeMethod</Address>

    Read the article

  • sorting content of a text file in python

    - by rabidmachine9
    I have this small script that sorts the content of a text file # The built-in function `open` opens a file and returns a file object. # Read mode opens a file for reading only. try: f = open("tracks.txt", "r") try: # Read the entire contents of a file at once. # string = f.read() # OR read one line at a time. #line = f.readline() # OR read all the lines into a list. lines = f.readlines() lines.sort() f = open('tracks.txt', 'w') f.writelines(lines) # Write a sequence of strings to a file finally: f.close() except IOError: pass the only problem is that the text is displayed at the bottom of the text file everytime it's sortened... I assume it also sorts the blank lines...anybody knows why? thanks in advance

    Read the article

  • How to combine query strings in PHP

    - by incrediman
    Given a url, and a query string, how can I get the url resulting from the combination of the query string with the url? I'm looking for functionality similar to .htaccess's qsa. I realize this would be fairly trivial to implement completely by hand, however are there built-in functions that deal with query strings which could either simplify or completely solve this? Example input/result sets: Url="http://www.example.com/index.php/page?a=1" QS ="?b=2" Result="http://www.example.com/index.php/page?a=1&b=2" - Url="page.php" QS ="?b=2" Result="page.php?b=2"

    Read the article

  • Calling Python app/script from C#

    - by Maxim Z.
    I'm building an ASP.NET MVC (C#) site where I want to implement STV (Single Transferable Vote) voting. I've used OpenSTV for voting scenarios before, with great success, but I've never used it programmatically. The OpenSTV Google Code project offers a Python script that allows usage of OpenSTV from other applications: import sys sys.path.append("path to openstv package") from openstv.ballots import Ballots from openstv.ReportPlugins.TextReport import TextReport from openstv.plugins import getMethodPlugins (ballotFname, method, reportFname) = sys.argv[1:] methods = getMethodPlugins("byName") f = open(reportFname, "w") try: b = Ballots() b.loadUnknown(ballotFname) except Exception, msg: print >> f, ("Unable to read ballots from %s" % ballotFname) print >> f, msg sys.exit(-1) try: e = methods[method](b) e.runElection() except Exception, msg: print >> f, ("Unable to count votes using %s" % method) print >> f, msg sys.exit(-1) try: r = TextReport(e, outputFile=f) r.generateReport(); except Exception, msg: print >> f, "Unable to write report" print >> f, msg sys.exit(-1) f.close() Is there a way for me to make such a Python call from my C# ASP.NET MVC site? If so, how? Thanks in advance!

    Read the article

  • Zend Framework-does every webpage have it's own controller and indexAction and view?

    - by Joel
    I'm wanting to be sure that I am setting things up correctly. On a typical website with 10 pages, would each page have it's own controller with it's own IndexAction and it's own View folder with it's own index.phtml as a view? Or do you have one controller with multiple Page1Action, Page2Action, etc and have multiple differently named view.phtml pages within view/index folder? I'm leaning toward the former because then I can have a cleaner controller for each page... Is there a standard, or is it subjective?

    Read the article

  • What is a good FAT file system for ARM7-TDMI

    - by Seidleroni
    I'm using the ARM7TDMI-S (NXP processor) and I need a file system capable of reading/writing to an SD card. There are so many available, what have people used and been happy with? One that requires the least amount of setup is best - so the less I have to do to get it started (i.e. write device drivers to NXP's hardware) the better.

    Read the article

  • How to detect interrupt handle routine of a device driver?

    - by sasayins
    Hi, I'm using Linux platform to program in embedded device. Is there any way that a kernel module can detect the interrupt handler routine of an another device driver module? Like for example, I have a kernel module(.ko), then I want this kernel module detect if a particular device driver execute its interrupt handle routine? Is this possible? Many thanks.

    Read the article

  • How do i get access to the <html> element in javascript?

    - by kwyjibo
    IE displays a default scrollbar on the page, which appears even if the content is too short to require a scrollbar. The typical way to remove this scrollbar (if not needed), is to add this to your css: HTML { height: 100%; overflow: auto; } I'm trying to do the same thing in javascript (without requiring that in my CSS), but i can't seem to find a way to get access to the html element. I know i can access the body element with document.body, but that doesn't seem to be sufficient, i need the wrapping html element. Any tips?

    Read the article

  • How do people deal with mental plateaus in programming?

    - by ggfan
    Please excuse if this isn't the right type of question to ask here on SO. For the past few days, I just can't seem to get any quality programming done. I feel in the slumps when doing work and just can't concentrate. I also do happen to be learning a new skill(PHP framework) and I think that is the main reason why I feel I can't do anything. Are there anything you all do to "recharge" the brain and get back on track? Possible activites: 1. get away from the PC for a few days

    Read the article

  • Implementing OFX specification with javascript

    - by John Langston
    Hey all, I am working on a personal project and need to retrieve financial data. After looking around how this is normally done it seems you can pay lots of money and license a service like Yodlee to get this data for you or you can implement a OFX client like wesabe has to communicate with financial institutions. Seeing as I don't have lots of money and wouldn't mind the challenge I decided to try to implement the ofx spec (unless one of you can suggest a cheap/free alternative!). I looked around for some ofx libraries other people have already written for use but didn't find anything that looked too great. I was wondering if anyone knew if it would be a bad idea to attempt this in Javascript (using XMLSocket from actionscript to handle the actual socket communication). If there is some really bad reason why I shouldn't do this please bring it up. If there is I'll just do it in Java but I think it would be neat to have it completely in javascript so it runs client-side. Anyways I was hoping for some helpful input, thanks.

    Read the article

  • how to use is()

    - by Ricky
    Hi guys, How to refactor the follow to put NOT is(":checked") syntax, instead put the codes being executed in the else block? if ($(this).is(":checked")) { // do nothing } else { // To do here } Thanks for all the help.

    Read the article

  • Problem streaming video on iPhone, only audio is playing

    - by Sheehan Alam
    I am trying to stream a video using MPMoviePlayerController but only audio is working. How can I get the video to appear? - (void)loadView { NSString *url = @"http://d1xt8xjto3lfs9.cloudfront.net/060810/afternoonupdate060810.mov"; MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:url]]; [moviePlayer play]; }

    Read the article

  • Alachisofts new version of NCache announced at TechEd !

    Before coming to Microsoft I owned a consulting company that specialized in solving performance and scalability problems in web applications. It always amazed me how many seeming huge problems could be solved with a little strategic caching implementation. Alachisofts NCache is a PREMIER provider of advanced caching technology for ASP.NET. Though ASP.NET has caching functionality built in, NCache can help you take caching in your application to the next level. Here are some of the NEW...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • ADO.net entity framework- Bridge entities

    - by user308806
    Hello, I have used ADO.net entity framwork to build my application. My application's data diagram contains 2 bridge entities. The problem is that I can not see or access these bridge entities in ADO.net framework using domain services. Do you have any idea how to use CRUD operations on them? Regards,

    Read the article

  • Excel pivot refresh, save and close in Access VBA code

    - by schneidm
    I am using the following code to refresh Excel pivot tables from an Access application. What is the best way to save and close the Excel app after the pivots refresh? In my last attempt the code was trying to save and close before the pivots had refreshed. Private Sub Command161_Click() Dim objXL As Object, x On Error Resume Next Set objXL = CreateObject("Excel.Application") With objXL.Application .Visible = True 'Open the Workbook .Workbooks.Open "myfilepath.xls" 'Refresh Pivots x = .ActiveWorkbook.RefreshAll End With Set objXL = Nothing End Sub

    Read the article

  • vb .net login and popup simultaneously

    - by unire
    ok im reposting this question cause i got some off track answers last time. I have 3 aspx pages - page1, login and page3. Now when i goto login page from page1, after i login and goto page3 i should be able to open a popup on that submit and the login should change to page3. but if i goto login page directly, the popup should not open and the login will goto page3 as normal design. how can i achieve this?

    Read the article

  • Id property not populated

    - by fingers
    I have an identity mapping like so: Id(x => x.GuidId).Column("GuidId") .GeneratedBy.GuidComb().UnsavedValue(Guid.Empty); When I retrieve an object from the database, the GuidId property of my object is Guid.Empty, not the actual Guid (the property in the class is of type System.Guid). However, all of the other properties in the object are populated just fine. The database field's data type (SQL Server 2005) is uniqueidentifier, and marked as RowGuid. The application that is connecting to the database is a VB.NET Web Site project (not a "Web Application" or "MVC Web Application" - just a regular "Web Site" project). I open the NHibernate session through a custom HttpModule. Here is the HttpModule: public class NHibernateModule : System.Web.IHttpModule { public static ISessionFactory SessionFactory; public static ISession Session; private static FluentConfiguration Configuration; static NHibernateModule() { if (Configuration == null) { string connectionString = cfg.ConfigurationManager.ConnectionStrings["myDatabase"].ConnectionString; Configuration = Fluently.Configure() .Database(MsSqlConfiguration.MsSql2005.ConnectionString(cs => cs.Is(connectionString))) .ExposeConfiguration(c => c.Properties.Add("current_session_context_class", "web")) .Mappings(x => x.FluentMappings.AddFromAssemblyOf<LeadMap>().ExportTo("C:\\Mappings")); } SessionFactory = Configuration.BuildSessionFactory(); } public void Init(HttpApplication context) { context.BeginRequest += delegate { Session = SessionFactory.OpenSession(); CurrentSessionContext.Bind(Session); }; context.EndRequest += delegate { CurrentSessionContext.Unbind(SessionFactory); }; } public void Dispose() { Session.Dispose(); } } The strangest part of all, is that from my unit test project, the GuidId property is returned as I would expect. I even rigged it to go for the exact row in the exact database as the web site was hitting. The only differences I can think of between the two projects are The unit test project is in C# Something with the way the session is managed between the HttpModule and my unit tests The configuration for the unit tests is as follows: Fluently.Configure() .Database(MsSqlConfiguration.MsSql2005.ConnectionString(cs => cs.Is(connectionString))) .Mappings(x => x.FluentMappings.AddFromAssemblyOf<LeadDetailMap>()); I am fresh out of ideas. Any help would be greatly appreciated. Thanks

    Read the article

  • Adding Rows to Gridview without using databind

    - by powertex
    Hello, I have a gridview inside of a listview predefined in the xaml: .... <ListView x:Name="listPriority" IsSynchronizedWithCurrentItem="True" Margin="0,30,0,4" BorderThickness="0,0,0,0"> <ListView.View> <GridView> <GridViewColumn x:Name="grvPriorityColumn" Width="140" Header="Priority" /> <GridViewColumn x:Name="grvMessage" Width="250" Header="Message" /> </GridView> </ListView.View> .... I have an array containing data that needs to go into the "grvPriorityColumn" and "grvMessage". How do add this data to the gridview without using databinding?

    Read the article

  • function objects versus function pointers

    - by kumar_m_kiran
    Hi All, I have two questions related to function objects and function pointers, Question : 1 When I read the different uses sort algorithm of STL, I see that the third parameter can be a function objects, below is an example class State { public: //... int population() const; float aveTempF() const; //... }; struct PopLess : public std::binary_function<State,State,bool> { bool operator ()( const State &a, const State &b ) const { return popLess( a, b ); } }; sort( union, union+50, PopLess() ); Question : Now, How does the statement, sort(union, union+50,PopLess()) work? PopLess() must be resolved into something like PopLess tempObject.operator() which would be same as executing the operator () function on a temporary object. I see this as, passing the return value of overloaded operation i.e bool (as in my example) to sort algorithm. So then, How does sort function resolve the third parameter in this case? Question : 2 Question Do we derive any particular advantage of using function objects versus function pointer? If we use below function pointer will it derive any disavantage? inline bool popLess( const State &a, const State &b ) { return a.population() < b.population(); } std::sort( union, union+50, popLess ); // sort by population PS : Both the above references(including example) are from book "C++ Common Knowledge: Essential Intermediate Programming" by "Stephen C. Dewhurst". I was unable to decode the topic content, thus have posted for help. Thanks in advance for your help.

    Read the article

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