Search Results

Search found 4763 results on 191 pages for 'adams john'.

Page 115/191 | < Previous Page | 111 112 113 114 115 116 117 118 119 120 121 122  | Next Page >

  • GPL and hosted services

    - by John
    As I understand it GPL says you only have to distribute derivative code for works you distribute, i.e. if you develop internal software you can keep your code private. What happens if you develop a server application, say like Facebook or StackOverflow? The server app is not 'distributed' so what's the situation with your code in this case?

    Read the article

  • C++: How would I get unix time?

    - by John D.
    I need a function or way to get the UNIX epoch in seconds, much like how I can in PHP using the time function. I can't find any method except the time() in ctime which seems to only output a formatted date, or the clock() function which has seconds but seems to always be a multiple of 1 million, nothing with any resolution. I wish to measure execution time in a program, I just wanted to calculate the diff between start and end; how would a C++ programmer do this? EDIT: time() and difftime only allow resolution by seconds, not ms or anything too btw.

    Read the article

  • Override Django inlineformset_factory has_changed() to always return True

    - by John
    Hi, I am using the django inlineformset_factory function. a = get_object_or_404(ModelA, pk=id) FormSet = inlineformset_factory(ModelA, ModelB) if request.method == 'POST': metaform = FormSet (instance=a, data=request.POST) if metaform.is_valid(): f = metaform.save(commit=False) for instance in f: instance.updated_by = request.user instance.save() else: metaform = FormSet(instance=a) return render_to_response('nodes/form.html', {'form':metaform}) What is happening is that if I change any of the data then everything works ok and all the data gets updated. However if I don't change any of the data then the data is not updated. i.e. only entries which are changed go through the for loop to be saved. I guess this makes sense as there is no point saving data if it has not changed. However I need to go through and save every object in the form regardless of whether it has any changes on not. So my question is how do I override this so that it goes through and saves every record whether it has any changes or not? Hope this makes sense Thanks

    Read the article

  • MVC binding form data problem.

    - by John
    I am using an object that matches all the fields in my form. I then use the default binding to populate the object in my action, like this; public ActionResult GetDivisionData(DivisionObj FormData) My DivisionObj initializes all it's values to string.empty in the constructor. The problem is that when the binder populates the model from the posted form data, any data that is not posted is set to null in the object, eventhough I initialized the object to contain empty strings. Is there a way to change this so that unposted data will be an empty string.

    Read the article

  • Whats wrong with my script??

    - by John Augst
    Hi guys; Could you tell me whats wrong with this script: I think the error is in IF statment <script> productID=new Array() variaveis=location.search.replace(/\x3F/,"").replace(/\x2B/g," ").split("&") if(variaveis!=""){ for(i=0;iflash1"); } else if (flash = "flash2") { document.write("flash2"); } else { document.write("another"); }

    Read the article

  • Jquery attach show event to select option

    - by John
    Hi, I have a select form element with 5 options. If option 2 is selected I want to display another form input box (this has a style of display:none initially). How can I attach an event to option 2 so that whenever it is selected the input box is shown otherwise it is hidden. I have this currently but this does not handle is option 2 is already selected when the page loads $('#type').change(function(){ var typeSelected = $(this).val(); if (typeSelected == 2) { $('#extraInput').show(); } }); I know I could add another bit of code which checks what is selected on page load but wondered if there was a neater way of doing this. Also something that could handle the hiding of the input box if option 2 is not selected at the start as currently I have just hard-coded style="display:none" onto the input box but I would prefer this to be dynamic. Thanks

    Read the article

  • How to install older Android SDK in Eclipse

    - by John Brunner
    I'm working at the moment at a simple app in eclipse for android. Just receiving and sending data, and using the camera API. I've set the minSDKversion to 8, because I think that has the widest user base. But at the beginning of the project eclipse was asking me which target SDK version I would use, and because I had just one installed (the latest 4.0.3) I've took this. Now I'm asking me if it wouldn't be wiser to install a lower SDK, like Android 2.2, because it would be not that big (compared to the 4.0.3) and my app would not have included all the fancy new features, which are not used in any way?! Or is this complete nonsense I'm talking here, and just should take my 4.0.3 SDK? When not, how can I install a lower version? Help -> SDK Manager is not showing old SDKs...

    Read the article

  • Best way to code a webservice in weblogic?

    - by John
    I am new to Weblogic and J2ee. I need to build a webservice that simply runs a query on the backend database (DB2 zOS) and returns the results. Being new to this I have a few questions. 1) What is the best way to build the webservice? 2) How do I connect to the database with weblogic. 3) Is there a way to cache the data returned so that the next request for the same data is pulled from cache? If googled for this but there seems to be many way to handle this. I am looking for the best way that can handle a high volume of requests. Any links to sample code would be helpful. - Thanks

    Read the article

  • Templates in C#

    - by John Doe
    I know generics are in C# to fulfill a role similar to C++ templates but I really need a way to generate some code at compile time - in this particular situation it would be very easy to solve the problem with C++ templates. Does anyone know of any alternatives? Perhaps a VS plug-in that preprocesses the code or something like that? It doesn't need to be very sophisticated, I just need to generate some methods at compile time.

    Read the article

  • how to preform an activity at the android lock screen?

    - by John
    I would like to perform an activity at the key guard screen, but the only way I can find to do so is to disable the key guard, do my activity, then re enable the key guard. This would be ok if it didn't cause the key guard screen to flash off and on (disable makes it disappear then re enable brings it back). I am wondering how I can perform an activity with it still being displayed? Kinda like how when the alarm goes off it shows a pop-up which is displayed over the key-guard screen?

    Read the article

  • How is location accuracy measured in Android?

    - by John Palmer
    Does anyone know the proper interpretation of the accuracy measurements returned by getAccuracy()? For instance, are they calculated as: Circular Error Probability (meaning, if i understand correctly, radius of a 50% confidence circle)? Radius of 95% confidence circle? something else? Many thanks for any advice you can give me.

    Read the article

  • How to get file path using FileUpload to be read by FileStream?

    - by john ryan
    I have a Method that open excel file and read it through exceldatareaderClass that i have downloaded in codeplex by using filestream. Currently I just declared the exact directory where the filestream open an excel file.And it works fine. Stream stream = new FileStream("C:\\" + FileUpload.PostedFile.FileName, FileMode.Open, FileAccess.Read, FileShare.Read); Now i need to read the excel file wherever location the user place it like on windows forms fileupload.FileStream needs the exact location where the file is located. How to do this.? Example: Sample.xls is located on My Documents the file path should be like : C:\Documents and Settings\user\My Documents\ string openpath ="" ;//filepath Stream stream = new FileStream(openpath+ FileUpload.PostedFile.FileName, FileMode.Open, FileAccess.Read, FileShare.Read); Thanks in Regards

    Read the article

  • Can I use "map" as a substitute for "for each"/"for in"?

    - by John Mee
    For a little while now javascript has the "map" function to loop over arrays. It appears possible to use it as a 'foreach' operator for example: var arr = ['a','b','c'] var doubles = arr.map(function(val){ return val + val }) Is this better or worse than saying for(var i in arr){ ... 50/50: saves having to use the index but adds a callback; it doesn't seem very common so I hesitate to use it but still want to.

    Read the article

  • Building drag and drop interface on iphone

    - by John Stewart
    I am trying to build an app which will have a bunch of cards that the user needs to drag and drop them onto specific drop zones. How would one go about detecting this and if the card is not on the drop zone then it should slide back. Any suggestions on how to structure this app?

    Read the article

  • add element to the DOM with JS

    - by john
    I want add element with JS. I have code: var collection = document.getElementsByTagName('body');<br> var a = document.createElement('div');<br> a.innerHTML = 'some text';<br> collection.item(0).firstChild.appendChild(a);<br> and simple HTML: <html> <head> </head> <body> </body> </html> When is misstake?

    Read the article

  • json jquery post request

    - by John
    <script type="text/javascript"> $(document).ready(function() { $("a").click(function() { var content = $('#content').html(); var data = {"content":content}; $.ajax({ type: "POST", dataType: "json", url: "ajax.php", data: {content:content}, success function (data) { alert('Hello!'); } }); }); }); </script> <div id="content"><?php echo $content; ?></div> ajax.php echo json_encode($_POST['content']); ?> Nothing happens... WhatI really want to achieve is to get that alert box and get the return data, but I am lost since I don't get any errors or nothing.

    Read the article

  • Can an ASP.NET user control determine its context or its parent .aspx file

    - by John Galt
    Is it possible for a user control to determine its "context" or its parent .aspx page in some way? Right now I have a user control that is declared on a typical .aspx page as follows: <%@ Register TagPrefix="uc1" TagName="ManageTitle" Src="../UserControls/ManageTitle.ascx" %> The user control currently emits a textbox as follows: <asp:textbox id="txtTitle" runat="server" MaxLength="60" ToolTip="Describe the item with a short pithy title - most important keywords first"/> The page_load for this .ascx file is currently like this: Me.txtTitle.Text = SetPageTitle() While some places in this web app need this (i.e. a textbox where end-user can type a "title"), I have other places where I want to show the "title" information in a "read-only" way. For example, rather than a textbox, I could use a label control or a textbox with Enabled="false" to prevent data entry. I suppose I could clone this small .ascx file and append a suffix to its name like _RO.ascx or something but I am wondering what the best approach would be. In short, can a user control get some sort of "context" from the page that declares it or is there an altogether better way to accomplish this sort of thing? Thank you.

    Read the article

< Previous Page | 111 112 113 114 115 116 117 118 119 120 121 122  | Next Page >