Search Results

Search found 296 results on 12 pages for 'ricardo costa'.

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

  • Various asp controls in a ASP.NET page

    - by Filipe Costa
    Hello. I am creating a products page, where the user selects an option in a radiobuttonlist for example, and then a control with the various options of that product appears in a placeholder or in a div when on of the radiobuttons is selected. At the moment this is the code: aspx: <form runat="server"> <asp:CheckBoxList ID="Lentes" runat="server" OnClick="EscolheLentes"> <asp:ListItem Value="LU"> Lentes Unifocais </asp:ListItem> <asp:ListItem Value="LP"> Lentes Progressivas </asp:ListItem> </asp:CheckBoxList> <asp:PlaceHolder runat="server" ID="PHLentes"></asp:PlaceHolder> </form> aspx.vb: Protected Sub EscolheLentes() Dim ControlLente As Control If (Me.Lentes.Items.FindByValue("LU").Selected) Then ControlLente = LoadControl("LentesUnifocais.ascx") ElseIf (Me.Lentes.Items.FindByValue("LP").Selected) Then ControlLente = LoadControl("LentesProgressivas.ascx") End If Me.PHLentes.Controls.Add(ControlLente) End Sub Need to use some ajax to load the control right? Am i going in the right direction? Thanks.

    Read the article

  • MS Office & WebDAV Server Engine for .NET

    - by costa
    On this website,http://www.webdavsystem.com/server/documentation/ms_office_read_only, it states that in order to open a writable version of a MS Office doc this condition has to be met: Your WebDAV server must be configured on site root. Is this still true? Because I tried the SqlStorage sample and it works fine. I deployed the application on IIS 7, under <server>/TestWebDav and MS Office 2010 opened the documents in the sample just fine. Thanks

    Read the article

  • Hashtable is that fast

    - by Costa
    Hi s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]. Is the hash function of the java string, I assume the rest of languages is similar or close to this implementation. If we have hash-Table and a list of 50 elements. each element is 7 chars ABCDEF1, ABCDEF2, ABCDEF3..... ABCDEFn If each bucket of hashtable contains 5 strings (I think this function will make it one string per bucket, but let us assume it is 5). If we call col.Contains("ABCDEFn"); // will do 6 comparisons and discover the difference on the 7th. The hash-table will take around 70 operations (multiplication and additions) to get the hashcode and to compare with 5 strings in bucket. and BANG it found. For list it will take around 300 comparisons to find it. for the case that there is only 10 elements, the list will take around 70 operations but the Hashtable will take around 50 operations. and note that hashtable operations are more time consuming (it is multiplications). I conclude that HybirdDictionary in .Net probably is the best choice for that most cases that require Hashtable with unknown size, because it will let me use a list till the list becomes more than 10 elements. still need something like HashSet rather than a Dictionary of keys and values, I wonder why there is no HybirdSet!! So what do u think? Thanks

    Read the article

  • How to convert Castle Windsor fluent config to xml

    - by Jonathas Costa
    I would like to convert this fluent approach to xml: container.Register( AllTypes.FromAssemblyNamed("Company.DataAccess") .BasedOn(typeof(IReadDao<>)).WithService.FromInterface(), AllTypes.FromAssemblyNamed("Framework.DataAccess.NHibernateProvider") .BasedOn(typeof(IReadDao<>)).WithService.Base()); Is there any way of doing this, maintaining the simplicity?

    Read the article

  • Forces to prompt download box IE

    - by Bruno Costa
    Hello, I'm having a problem with some reports in the application I'm doing manutention I've a button that does a postback to the server and do some information and then get back to the cliente and open a popup to download the report. private void grid_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) { ... ClientScript.RegisterClientScriptBlock(this.GetType(), "xxx", "<script>javascript:window.location('xx.aspx?m=x','xxx','width=750,height=350,directories=no,location=no,menubar=no,scrollbars,status=no,toolbar=no,resizable=yes,left=50,top=50');</script>"); } Then in xxx.aspx I've the code: Response.ClearContent(); Response.ClearHeaders(); Response.TransmitFile(tempFileName); Response.Flush(); Response.Close(); File.Delete(tempFileName); Response.End(); This works fine if IE option Automatic prompting for file downloads is enabled. But by default this is disabled and I need to force the download box to be prompting. Can I do anything without change a lot of code? Thanks.

    Read the article

  • Increasing the JVM maximum heap size for memory intensive applications

    - by Alceu Costa
    I need to run a Java memory intensive application that uses more than 2GB, but I am having problems to increase the heap maximum size. So far, I have tried the following approaches: Setting the -Xmx parameter, e.g. -Xmx3000m. This approaches fails at the creation of the JVM. From what I've googled, it looks like that -Xmx must be less than 2GB. Using the -XX:+AggressiveHeap option. When I try this approach I get an 'Not enough memory' error that tells that the heap size is 1273.4 MB, even though my computer has 8GB of memory. Is there another approach that I can try to increase the maximum heap size of the JVM? Here's a summary of the computer specs: OS: Windows 7 (64 bit) Processor: Intel Core i7 (2.66 GHz) Memory: 8 GB

    Read the article

  • Google Visualization API Geomap: How to handle marker click events?

    - by Carlos da Costa
    Hello. I initially have the Google Visualization API Geomap on a world view (options['dataMode'] = 'regions') and I capture the 'regionClick' event when a country is clicked like so: google.visualization.events.addListener( geomap, 'regionClick', function (e) { var rowindex = data.getFilteredRows([{column: 0, value: e['region']}]); var location = data.getValue(rowindex[0], 3); location.href = "?ISO=" + e['region'] + "&Location=" + location; }); I then draw the map zoomed into the country in markers mode (options['dataMode'] = 'markers'). However, I can't seem to capture any events when the markers themselves are clicked. The documentation ( http://code.google.com/apis/visualization/documentation/gallery/geomap.html#Events ) only refers to 'select' and 'regionClick' events neither of which are fired in this case. (Tested using Chrome 9, and IE 8.) Has anybody had any success in doing this? Many thanks.

    Read the article

  • Export with VB to Excel and update file

    - by Filipe Costa
    Hello. This is the code that i have to export data to Excel. Dim oExcel As Object Dim oBook As Object Dim oSheet As Object oExcel = CreateObject("Excel.Application") oBook = oExcel.Workbooks.Add oSheet = oBook.Worksheets(1) oSheet.Range("A1").Value = "ID" oSheet.Range("B1").Value = " Nome" oSheet.Range("A1:B1").Font.Bold = True oSheet.Range("A2").Value = CStr(Request("ID")) oSheet.Range("B2").Value = "John" oBook.SaveAs("C:\Book1.xlsx") oExcel.Quit() I can create and save the excel file, but i can't update the contents. How can i do it? Thanks.

    Read the article

  • output Caching and postback

    - by Costa
    Hi If you have a button and a text box in a page, and the page is cached on the server. Put a breakpoint at page_load and run If you click the button, the Page_load breakpoint is visited only for first click. I am trying to get some explanation rather than "Wellll....ahhh mmmm it is a postback!!" I am expecting that the breakpoint will not be visited at all, it is a cached page. thanks

    Read the article

  • Committing Transaction

    - by Costa
    Hi http://msdn.microsoft.com/en-us/library/ms189797.aspx In this link they are committing a transaction within catch clause IF (XACT_STATE()) = 1, I don't get it, if there is an error why they are committing it? even if the problem in select statement and there is no big deal committing it, why don't just roll it back. Thanks

    Read the article

  • How to mock a String using mockito?

    - by Alceu Costa
    I need to simulate a test scenario in which I call the getBytes() method of a String object and I get an UnsupportedEncodingException. I have tried to achieve that using the following code: String nonEncodedString = mock(String.class); when(nonEncodedString.getBytes(anyString())).thenThrow(new UnsupportedEncodingException("Parsing error.")); The problem is that when I run my test case I get a MockitoException that says that I can't mock a java.lang.String class. Is there a way to mock a String object using mockito or, alternatively, a way to make my String object throw an UnsupportedEncodingException when I call the getBytes method? Here are more details to illustrate the problem: This is the class that I want to test: public final class A{ public static String f(String str){ try{ return new String(str.getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { // This is the catch block that I want to exercise. ... } } } This is my testing class (I'm using JUnit 4 and mockito): public class TestA { @Test(expected=UnsupportedEncodingException.class) public void test(){ String aString = mock(String.class); when(nonEncodedString.getBytes(anyString())).thenThrow(new UnsupportedEncodingException("Parsing error.")); A.f(aString); } }

    Read the article

  • Enable submit button javascript ( asp page )

    - by Filipe Costa
    Good morning. By default, and i don't know why, when the page ends the rendering, i get the submit button disabled. <input type="submit" class="buttonColor" disabled="disabled" id="MyMatrix_ctl10_Form_btnSubmit" value="Enviar" name="MyMatrix$ctl10$Form$btnSubmit"> I need some way to enable it, or else i can't submit the form. How can i do it? Thanks.

    Read the article

  • Enterprise library not responding.

    - by Costa
    Hi I spent a day trying to make Ent Lib Logging work and log anything into database or event log, I have a web application and console application withe the same Ent Lib config, only the console is capable to log into the Event Log, I tried everything with permissions, but I don't know what exactly I am doing, which services should have what, It does not work!! HELP This is the config file which is automatically generated from Ent Lib utility and it works only on App.config, not on web.config <loggingConfiguration name="Logging Application Block" tracingEnabled="true" defaultCategory="General" logWarningsWhenNoCategoriesMatch="true" revertImpersonation="false"> <listeners> <add source="Logger" formatter="Text Formatter" log="Application" machineName="" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="Formatted EventLog TraceListener" /> </listeners> <formatters> <add template="Timestamp: {timestamp}&#xD;&#xA;Message: {message}&#xD;&#xA;Category: {category}&#xD;&#xA;Priority: {priority}&#xD;&#xA;EventId: {eventid}&#xD;&#xA;Severity: {severity}&#xD;&#xA;Title:{title}&#xD;&#xA;Machine: {machine}&#xD;&#xA;Application Domain: {appDomain}&#xD;&#xA;Process Id: {processId}&#xD;&#xA;Process Name: {processName}&#xD;&#xA;Win32 Thread Id: {win32ThreadId}&#xD;&#xA;Thread Name: {threadName}&#xD;&#xA;Extended Properties: {dictionary({key} - {value}&#xD;&#xA;)}" type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="Text Formatter" /> </formatters> <categorySources> <add switchValue="All" name="General"> <listeners> <add name="Formatted EventLog TraceListener" /> </listeners> </add> </categorySources> <specialSources> <allEvents switchValue="All" name="All Events" /> <notProcessed switchValue="All" name="Unprocessed Category" /> <errors switchValue="All" name="Logging Errors &amp; Warnings"> <listeners> <add name="Formatted EventLog TraceListener" /> </listeners> </errors> </specialSources> </loggingConfiguration> thanks

    Read the article

  • Cookiless Session Is it a security risk?

    - by Costa
    Hi http://msdn.microsoft.com/en-us/library/aa479314.aspx You have a user who successfully log in from a machine in Cybercafe, Hacker H able to sniff the network and get the sessionID of the user, Can H use the sessionId and act as the user from another machine? Can H enter http://folder/(session id)/CreditCardInformation.aspx to know the credit card number of the user?

    Read the article

  • Reload table view in real time

    - by Lucas Vallim da Costa
    The app receives a UILocalNotification, but if the user is at the UITableViewController at the fire time, the table view (containing the scheduled notifications) does not reload. The user has to get out of that view and load the view again so that the cells are loaded and, as the notification was already fired, it will not be displayed on any cell of that table view. Problem is: If the user touches the specific tableView cell that contained the notification that just fired, the app crashes, cause the notification is not there anymore. I've implemented the - (void)reloadData in every place possible, and it still doesn't load in real time. What would be a better solution for this? Other detail, how can I push a specific view after the notification is displayed (when the user slides the app icon when the phone is locked)? Any help will be truly appreciated, since theres are the last details remaining to publish my first App.

    Read the article

  • Sesion timout vs Form Authentication timeout

    - by Costa
    Hi What is the difference between a abandon Session and a cookie timeout, what if the session is abandon and the cookie is still alive, is that can lead to a problem? <sessionState timeout="1" /> <authentication mode="Forms"> <forms loginUrl="login.aspx" timeout="1" /> </authentication> Thanks

    Read the article

  • Isolated storage

    - by Costa
    Hi I am not sure that I understand Isolated storage. I read the article http://msdn.microsoft.com/en-us/library/3ak841sy%28VS.80%29.aspx 1) Why I don't just use App data folder? 2) In the link above : "With isolated storage, data is always isolated by user and by assembly. Credentials such as the origin or the strong name of the assembly determine assembly identity. Data can also be isolated by application domain, using similar credentials." I can't think about a scenario that makes this future important. In general I don't understand the philosophy and the need of "isolated storage" which inspire MS to create such a thing. Thanks

    Read the article

  • where is POST params for WCF REST

    - by Costa
    Hi Can u put some code sample to get Post parameters sent by client to WCF REST webservice. The request is though a HttpWebRequest. The client will not serialize anything if I will request a certain XML format from PHP programmer, how to make WCF convert this XML to one parameter. currently I am trying to send the request like this and I am stuck HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("http://100.100.1.4000:2805/Something.svc/Bomba/Data.php"); request.ContentType = "text/xml"; request.Method = "POST"; StreamWriter stream = new StreamWriter(request.GetRequestStream()); { stream.Write("FirstName=0&LastName=2"); } request.GetResponse(); stream.Close(); Thanks

    Read the article

  • static wsdl for a certain end point

    - by Costa
    Hi A certain EndPoint in a web service is not likely to change a lot, also it had a problem which we worked around by putting a static wsdl to the whole web service like this <serviceMetadata httpGetEnabled="true" httpGetUrl="" externalMetadataLocation="http://IP:8250/wsdl.xml"/> Now I want the rest of end points to have a wsdl dynamically created, and one end point which require a static WSDL. I think this is impossible because there is one WSDL per WCF service.

    Read the article

  • How can I compute the average cost for this solution of the element uniqueness problem?

    - by Alceu Costa
    In the book Introduction to the Design & Analysis of Algorithms, the following solution is proposed to the element uniqueness problem: ALGORITHM UniqueElements(A[0 .. n-1]) // Determines whether all the elements in a given array are distinct // Input: An array A[0 .. n-1] // Output: Returns "true" if all the elements in A are distinct // and false otherwise. for i := 0 to n - 2 do for j := i + 1 to n - 1 do if A[i] = A[j] return false return true How can I compute the average cost (i.e. number of comparisons for a given n) for this algorithm? What is a reasonable assumption about the input?

    Read the article

  • How to force Maven to download maven-metadata.xml from the central repository?

    - by Alceu Costa
    What I want to do is to force Maven to download the 'maven-metadata.xml' for each artifact that I have in my local repository. The default Maven behaviour is to download only metadata from remote repositories (see this question). Why I want to do that: Currently I have a remote repository running in a build machine. By remote repository I mean a directory located in the build machine that contains all dependencies that I need to build my Maven projects. Note that I'm not using a repository manager like Nexus, the repository is just a copy of a local repository that I have uploaded to my build machine. However, since my local repository did not contain the 'maven-metadata.xml' files, these metadata files are also missing in the build machine repository. If I could retrieve the metadata files from the central repository, then it would be possible to upload a working remote repository to my build machine.

    Read the article

  • !gcroot output leads nowhere

    - by Jeff Costa
    I am troubleshooting memory fragmentation in an app pool, as evidenced by a small number of Free objects consuming the most space on the heap: 0x000007ff00256728 6,543 3,890,208 System.Collections.Hashtable+bucket[] 0x000007ff002649a8 7,297 22,979,560 System.Byte[] 0x000007ff001e0d90 251,347 30,374,304 System.String 0x0000000001d0c830 373 48,036,816 Free Running the !dumpgen 3 command reveals the fragmentation; There is a repeating pattern of Free and System.Object objects of the same size: 000000017feb7350 24 **** FREE **** 000000017feb7368 8192 System.Object[] 000000017feb9368 24 **** FREE **** 000000017feb9380 8192 System.Object[] 000000017febb380 24 **** FREE **** 000000017febb398 8192 System.Object[] 000000017febd398 24 **** FREE **** 000000017febd3b0 8192 System.Object[] 000000017febf3b0 24 **** FREE **** 000000017febf3c8 8192 System.Object[] 000000017fec13c8 24 **** FREE **** 000000017fec13e0 8192 System.Object[] 000000017fec33e0 24 **** FREE **** 000000017fec33f8 8192 System.Object[] 000000017fec53f8 24 **** FREE **** 000000017fec5410 14024 System.Object[] 000000017fec8ad8 24 **** FREE **** 000000017fec8af0 8192 System.Object[] 000000017fecaaf0 24 **** FREE **** 000000017fecab08 8192 System.Object[] 000000017feccb08 24 **** FREE **** 000000017feccb20 8192 System.Object[] 000000017feceb20 24 **** FREE **** 000000017feceb38 8192 System.Object[] 000000017fed0b38 24 **** FREE **** 000000017fed0b50 8192 System.Object[] 000000017fed2b50 24 **** FREE **** 000000017fed2b68 8192 System.Object[] When I try to obtain the root of one of the System.Objects with !gcroot, I get a pinned handle, but no additional stack data: Scan Thread 41 OSThread 1044 DOMAIN(0000000001D51330):HANDLE(Pinned):15217e8:Root: 000000017fe60fe8(System.Object[]) As you can see, there is no additional data to go on. Running a !handle command also yields nothing: 0:041> !handle 000000017fe7a068 ff Handle 000000017fe7a068 Type <Error retrieving type> unable to query object information unable to query object information No object specific information available How can I trace out this memory leak when I cannot find what is rooting System.Object?

    Read the article

  • SQL database self interaction entity

    - by Ricardo Costa
    I've been working on a database, wich is referent to an Aeroport management. I'm having a problem that it's freaking me out.. What i'm trying to do is, assuming that a client wants to know the distance between 2 locations, in miles or kms. As an example, if the user wants to know the distance between London and Amsterdam, should that distance be calculated by a formule or should it be already stored on the database? (1,N) ____________ ____________|__ | | | | | City/Airport |<---------| |______________| How can i show to user the distance between his 2 choices? RicardoCosta

    Read the article

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