Daily Archives

Articles indexed Monday March 29 2010

Page 13/123 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • How to create project specific respository post-commit actions

    - by Pacifika
    Presently, we've got several main projects each in their own repository. We will have to version-control up to a dozen additional projects. VisualSVN recommends to create 1 respository for our company and then vc all projects inside that. It's a good practice to create one repository for the entire company or department and store all your projects in this repository. Creating separate repository for each project is not a good idea because in that case you will not be able to perform Subversion operations like copy, diff and merge cross-project. VisualSvn.com Currently we're using post-commit hooks to update the testing server with the latest commit and do other project specific actions (such as emailing certain people for one project but not for others) depending on which project has been committed. As post-commit runs for the whole repository, is this still possible in such a situation? How would I go about decerning which project has changes? filter folder structure?

    Read the article

  • Microsoft JScript runtime error: 'ShowDatePicker' is undefined

    - by dbobrow
    Working around an issue where my jquery datepicker does not display after postback within an update panel. The textbox (trigger) for the calendar is contained within a control, which is contained within an update panel. I found an article assisting with this issue, and it informed me to do the following Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim tScript As String = "$(function(){ Sys.WebForms.PageRequestManager.getInstance().add_endRequest(ShowDatePicker); });" Page.ClientScript.RegisterStartupScript(Me.GetType(), "async_" & Me.txtAquisition.ClientID, tScript, True) Then on the ascx I have <script type="text/javascript"> function showDatePicker(sender, args) { var control = document.getElementById("<%=txtAquisition.ClientID %>") alert(control); $(control).each(function() { $(this).datepicker({ showOn: 'focus' }); }); } </script> but am getting an undefined error. Am I approaching this in the correct manner? Any other suggestions to ensure my datepicker remains usable within the update panel? Thinking this may be due to the fact that I have the controls nested within an update panel... several of them in fact. Any help on this is greatly appreciated.

    Read the article

  • How to get record value from LinqDataSource via Code Behind

    - by rockinthesixstring
    I've got a LinqDataSource that retrieves a single record. Protected Sub LinqDataSource1_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.LinqDataSourceSelectEventArgs) Handles LinqDataSource1.Selecting Dim BizForSaleDC As New DAL.BizForSaleDataContext e.Result = BizForSaleDC.bt_BizForSale_GetByID(e.WhereParameters("ID")).FirstOrDefault End Sub I'd like to be able to retrieve the values of said DataSource using the Page_Load function. Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load 'Get the right usercontrol' Dim ctrl As UserControl Select Case DataBinder.Eval(LINQDATASOURCE_SOMETHING.DataItem, "AdType") Case 1 : ctrl = DirectCast(Me.FindControl("Default1"), UserControl) Case 2 : ctrl = DirectCast(Me.FindControl("Default1"), UserControl) Case 3 : ctrl = DirectCast(Me.FindControl("ValuPro1"), UserControl) Case 4 : ctrl = DirectCast(Me.FindControl("ValuPro1"), UserControl) Case Else : ctrl = Nothing End Select 'set the control to visible' ctrl.Visible = True End Sub But obviously the code above doesn't work... I'm just wondering if there's a way to make it work. Here is the full markup <body> <form id="form1" runat="server"> <asp:LinqDataSource ID="LinqDataSource1" runat="server"> <WhereParameters> <asp:QueryStringParameter ConvertEmptyStringToNull="true" Name="ID" QueryStringField="ID" Type="Int32" /> </WhereParameters> </asp:LinqDataSource> <uc:Default ID="Default1" runat="server" Visible="false" /> <uc:ValuPro ID="ValuPro1" runat="server" Visible="false" /> </form> </body> </html> Basically what happens is the appropriate usercontrol is enabled and that usercontrol inherits the LinqDataSource and displays the appropriate information. EDIT: It's working now with the code below, however, since I'm really not into hitting the database multiple times for the same info, I'd prefer to get the value from the DataSource. 'Query the database' Dim _ID As Integer = Convert.ToInt32(Request.QueryString("ID")) Dim BizForSaleDC As New BizForSaleDataContext Dim results = BizForSaleDC.bt_BizForSale_GetByID(_ID).FirstOrDefault 'Get the right usercontrol' Dim ctrl As UserControl Select Case results.AdType Case 1 : ctrl = DirectCast(Me.FindControl("Default1"), UserControl) Case 2 : ctrl = DirectCast(Me.FindControl("Default1"), UserControl) Case 3 : ctrl = DirectCast(Me.FindControl("ValuPro1"), UserControl) Case 4 : ctrl = DirectCast(Me.FindControl("ValuPro1"), UserControl) Case Else : ctrl = Nothing End Select

    Read the article

  • IE 8 Compatibility Mode Causes Form Submit Button to Wrap

    - by Robert
    The below code does what I want in browsers I check with except IE when using compatibility mode. In compatibility mode the submit (Remove) button wraps to the next line. Can anyone help? It should look like it does in Firefox or IE when not using compatibility mode. Can't use float:left/right because I cannot specify length beforehand. Thanks for any help. Name: Test Name That is Longer Than The Other Qty: 1 Name: Short Test Name Qty: 1

    Read the article

  • Recommendations on Triming Large Amounts of Text from a DOM Object

    - by aronchick
    I'm doing some in browser editing, and I have some content that's on the order of around 20k characters long in a <pre>. So it looks something like: <pre> Text 1 Text 2 Text 3 Text 4 [...] Text 20,000 </pre> I'd like to use jquery to trim it down when someone hits a button to chop, but I'm having trouble doing it without overloading the browser. Assume I know that the character numbers are at 16,510 - 17,888, and what I'd like to do is trim it. I was using: jQuery('#textsection').html(jQuery('textarea').html().substr(range.start)); But browsers seem to enjoy crashing when I do this. Alternatives?

    Read the article

  • A strange problem using jquery in IE6.

    - by Tony
    I am using jquery load method to update divs , it works great until I test my code under IE6. The problem is : under IE6 , when I click a button to trigger a load method , the page is remaining unchanged until I move my cursor, that means if I click my mouse and keep my hand away from the mouse , the page is unchanged , if I move the mouse , the page is updated. This problem is only occurred under IE6 . IE7 , IE8, Firefox all have no problem. Have you guys ever encountered this kind of problem ?

    Read the article

  • How to use Java on Google App Engine without exceeding minute quotas?

    - by Geo
    A very simple java code inside a doGet() servlet is getting more than a second of cpu time on GAE. I have read some quota related documentation and apparently I am not doing anything wrong. //Request the user Agent info String userAgent = req.getHeader("User-Agent"); I wanted to know what was using the CPU the most, I use a google help recommendation. //The two lines below will get the CPU before requesting User-Agent Information QuotaService qs = QuotaServiceFactory.getQuotaService(); long start = qs.getCpuTimeInMegaCycles(); //Request the user Agent info String userAgent = req.getHeader("User-Agent"); //The three lines below will get the CPU after requesting User-Agent Information // and informed it to the application log. long end = qs.getCpuTimeInMegaCycles(); double cpuSeconds = qs.convertMegacyclesToCpuSeconds(end - start); log.warning("CPU Seconds on geting User Agent: " + cpuSeconds); The only thing that the code above tells me is that inspecting the header will use more than a second (1000ms) of cpu time, which for Google is a warning on the log panel. That seems to be a very simple request and still is using more than a second of cpu. What I am missing?

    Read the article

  • Creating a protected link

    - by user303907
    Is there a way to create a protected download link which is random, expiry, requires a password and pointing to a specific file in C# that is associated with IIS 7.0? Several random links can link to the same file. Built-in codes or perhaps 3rd party libraries? For example, http://www.example.com/<some random gibberish>/<md5 of file>/file.jpg

    Read the article

  • Restricting Edit and Delete in Ruby on Rails

    - by phleet
    I want to be able to edit and delete resources myself, but not allow users of the application to do so. Is there an easy way of doing this in Rails? An incomplete solution would be just to remove the "delete" and "edit" buttons from the index view, but that doesn't disable their ability to do so via direct HTTP requests. Running Rails 2.2.2 and ruby 1.8.7

    Read the article

  • How to use an out-of-process COM server without its tlb file

    - by Dbger
    It is about Window COM component. Server.exe: an 32bit out-of-process COM server CLSID_Application: The GUID of a COM object in Server.exe Client.exe: a 64bit client application which use Server.exe in a registry-free way. As we know, an exe can't be used as a registry-free COM component, to mimic such behavior, I start the Server.exe process myself by providing the exact path: CreateProcess("Server.exe") IClassFactory* pFactory = CoGetClassObject(CLSID_Application) pFactory-CreateInstance(ppAppObject); It works if I have the Server.tlb registred, but after unregister Server.tlb, it just failed to create the ppAppObject, even though I embed manifest into both Server.exe and Client.exe: <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <file name="Server.tlb"> <typelib tlbid="{DAC4A4C9-F84C-4F05-A7DC-E152869499F5}" version="1.0" helpdir=""></typelib> </file> <comInterfaceExternalProxyStub name="IApplication" iid="{D74208EA-71C2-471D-8681-9760B8ECE599}" tlbid="{DAC4A4C9-F84C-4F05-A7DC-E152869499F5}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub> </assembly> Do you have any idea on this? Edit: It turns out that it really works if I specify tlbid for interfaces, and embed the manifest to both exe

    Read the article

  • Do GLSL geometry shaders work on the GMA X3100 under OSX

    - by GameFreak
    I am trying to use a trivial geometry shader but when run in Shader Builder on a laptop with a GMA X3100 it falls back and uses the software render. According this document the GMA X3100 does support EXT_geometry_shader4. The input is POINTS and the output is LINE_STRIP. What would be required to get it to run on the GPU (if possible) uniform vec2 offset; void main() { gl_Position = gl_PositionIn[0]; EmitVertex(); gl_Position = gl_PositionIn[0] + vec4(offset.x,offset.y,0,0); EmitVertex(); EndPrimitive(); }

    Read the article

  • How to use Object.GetHashCode() on a type that overrides GetHashCode()

    - by Jimmy
    Hi, I have a class A that implements IEquatable<, using its fields (say, A.b and A.c) for implementing/overriding Equals() and overriding GetHashCode(), and everything works fine, 99% of the time. Class A is part of a hierarchy (class B, C) that all inherit from interface D; they can all be stored together in a dictionary Dictionary, thus it's convenient when they all carry their own default Equals()/GetHashCode(). However, while constructing A I sometime need to do some work to get the values for A.b and A.c; while that's happening, I want to store a reference to the instance that's being built. In that case, I don't want to use the default Equals()/GetHashCode() overrides provided by A. Thus, I was thinking of implementing a ReferenceEqualityComparer, that's meant to force the use of Object's Equals()/GetHashCode(): private class ReferenceEqualityComparer<T> : IEqualityComparer<T> { #region IEqualityComparer<T> Members public bool Equals(T x, T y) { return System.Object.ReferenceEquals(x, y); } public int GetHashCode(T obj) { // what goes here? I want to do something like System.Object.GetHashCode(obj); } #endregion } The question is, since A overrides Object.GetHashCode(), how can I (outside of A) call Object.GetHashCode() for an instance of A? One way of course would be for A to not implement IEquatable< and always supply an IEqualityComparer< to any dictionary that I create, but I'm hoping for a different answer. Thanks

    Read the article

  • Fade with caption message problem IE8 jquery

    - by ron
    Hi everyone I have a problem with my fade with caption in jquery.. my problem is the following The rolling messages on the header run down into the body of the page on IE8. Please i left here the url. http://www.aerocom.net.au/index.php?id=contact-us Thanks in advance

    Read the article

  • Generate documents thumbnails (PDF, Word, Spreadsheets, etc.) from within PHP

    - by titel
    Hello guys, I was wondering if there is there is a way to create thumbnails for different types of documents, for instance PDF documents, Word Documents, Spreadsheets, etc, not only for the images, from within PHP? If this would be to hard to accomplish, I would also be interested in a way to achieve something similar only for PDF documents instead. Thank you in advance, Constantin TOVISI

    Read the article

  • ASP.NET MVC 2 JQuery POST not displaying the model state errors

    - by Oshan
    Hello, I have been using asp.net mvc for a bit (but I'm still a beginer). I want to have the ability to update two views as a result of a jquery postback. Basically I have a list and a details view. The details view is presented using a jquery popup (using jquery-UI popup). I only want to update the list if the details save is successful (i.e. there are no validation errors on the details view). However, if there are any validation errros in the details view, I want to update the details view so that the user sees the validation errors. so I thought in my controller, I return a JsonResult instead of a View. [HttpPost] public ActionResult SavePersonInfo(Person p) { if(ModelState.Valid) { return View("PersonList"); } return Json({Error = true, View = PartialView("PersonDetails", p)}); } As you can see if there are no errors I return the person list view, but if there are any validation errors, I have return the details view. The reason that I'm returning a JsonResult is I need to tell my view there is an error so that the view (jquery) knows which section to update (as in whether to update the person list 'div' or the popup dialog 'div'). So, in my view, the jquery is as follows (please assume that there is a form for entering in the person details and "SubmitPersonForm();" function is called upon clicking on the "Save" button): <script type="text/javascript> $('#btnSave').click(function (event) { onBegin(); $.ajax( { type: "POST", url: "/Person/Save", data: $('form').serialize(), success: function (result) { if(result.Error) { $('#dvDetails').html($(result).View)); } else { $('#dvPersonList').html($result); } } }); }); </script> So the problem that I have now, is that when there is a validation error, I do see the correct, 'div' being updated, but I lose the asp.net mvc validation messages. I do not see any validation errors in red, as if ASP.NET MVC is completely ignored them. However, my ModelState does have those errros, just not displayed in the details view. I do have valication summary and Html.ValidationFor(m = ...) statements put in my details view. Could someone tell me why I'm not seeing the validation errors? although I'm using a JSonResult, I do use the right property which is a valid view when I render the 'dvDetails'. Am I doing something that I'm not suppose to in asp.net mvc? Btw I'm using asp.net mvc2 RC with Visual Studio 2010 RC. Thank you.

    Read the article

  • Bazaar (bzr) predefined locations

    - by mkotechno
    Bazaar has a Launchpad pseudo-protocol (lp:) that able the user to operate in remote branchs without write full Launchpad location, I'm searching a way to create my own pseudo-protocols in a way like this (similar to GIT): bzr remote my sftp://[email protected]/home/myuser/myrepo/ bzr push my:mybranch bzr push my:otherbranch bzr push my:anotherbranch ...instead of... bzr push sftp://[email protected]/home/myuser/myrepo/mybranch bzr push sftp://[email protected]/home/myuser/myrepo/otherbranch bzr push sftp://[email protected]/home/myuser/myrepo/anotherbranch ...that is a pain in the ass. I readed about bazaar.conf but it seems only able you to set a globals push locations for each branch/repo. Another way I saw is to use alias, but has the same problem, is very ugly when is needed to create new branches. Is posible to do this without modify the BZR code? This should be obvious...

    Read the article

  • Does negate twice (!!) make any sense?

    - by Dbger
    I noticed following usage of negate (!) in our code base, like: int GetIntFromRegistry(); bool bok = !!GetIntFromRegistry(); I am really curious about the usage of !!, it you want to cast the type from int to bool, why not just cast it explicitly use (bool), or static_cast. Is there anything I am missing?

    Read the article

  • Can't get SWT Display on Mac OS X.

    - by Mattias Holmqvist
    I'm running Mac OS X Snow Leopard and wan't to access the Display from the activator in an OSGi bundle. Below is the start method for my activator: @Override public void start(BundleContext context) throws Exception { ExecutorService service = Executors.newSingleThreadExecutor(); service.execute(new Runnable() { @Override public void run() { Display display = Display.getDefault(); Shell shell = new Shell(display); Text helloText = new Text(shell, SWT.CENTER); helloText.setText("Hello SWT!"); helloText.pack(); shell.pack(); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }); } Calling this code in a Windows environment works fine, but deploying on Mac OS X I get the following output: 2009-10-14 17:17:54.050 java[2010:10003] *** __NSAutoreleaseNoPool(): Object 0x101620d20 of class NSCFString autoreleased with no pool in place - just leaking 2009-10-14 17:17:54.081 java[2010:10003] *** __NSAutoreleaseNoPool(): Object 0x100119240 of class NSCFNumber autoreleased with no pool in place - just leaking 2009-10-14 17:17:54.084 java[2010:10003] *** __NSAutoreleaseNoPool(): Object 0x1001024b0 of class NSCFString autoreleased with no pool in place - just leaking 2009-10-14 17:17:54.086 java[2010:10003] *** __NSAutoreleaseNoPool(): Object 0x7fff701d7f70 of class NSCFString autoreleased with no pool in place - just leaking 2009-10-14 17:17:54.087 java[2010:10003] *** __NSAutoreleaseNoPool(): Object 0x100113330 of class NSCFString autoreleased with no pool in place - just leaking 2009-10-14 17:17:54.092 java[2010:10003] *** __NSAutoreleaseNoPool(): Object 0x101624540 of class NSCFData autoreleased with no pool in place - just leaking . . . I've used the -XstartOnFirstThread VM argument without any luck. I'm on 64-bit Cocoa but I've also tried 32-bit Cocoa. When trying on Carbon I get the following error: Invalid memory access of location 00000020 eip=9012337c When debugging into the Display class I can see that the Displays[] array only contains null references.

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >