Search Results

Search found 1043 results on 42 pages for 'thomas tempelmann'.

Page 24/42 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • Is it worth it to learn an esoteric programming language?

    - by Thomas Owens
    Wikipedia: An esoteric programming language (sometimes shortened to esolang) is a programming language designed as a test of the boundaries of computer programming language design, as a proof of concept, or as a joke. There is usually no intention of the language being adopted for real-world programming. Such languages are often popular among hackers and hobbyists. This use of esoteric is meant to distinguish these languages from more popular programming languages. Some more popular languages may appear esoteric (in the usual sense of the word) to some, and though these could arguably be called "esoteric programming languages" too, this is not what is meant. I think it might be worth it, just to learn a new language and go through the process, although only if you don't have anything else to do (like a real project or learning a new real language). But what does the community think? Is there some value in these languages?

    Read the article

  • Bypass django form validation on new form instance

    - by Thomas Schultz
    Hello! I have a situation where we are trying to autofill some form data on the second page of a signup and I was wondering if there's a way to bypass the entire form validation when we pass in only a couple of fields? so we have something like form = NewForm(request.POST) Where request.POST only contains some of the fields in NewForm(). So the page loads and there is feedback about how some fields are not filled in yet. This all happens from the GET request of the second page. Is there a way to do something like... form = NewForm(request.POST, validate=False)

    Read the article

  • How do I search using the Google Maps API?

    - by Thomas
    Hello all, I'm trying to figure out how to search for nearby businesses in an iPhone app using the Google Maps API. I'm completely new to Javascript, and have waded through some of Google's sample code easily enough. I found how to grab the user's current location. Now I want to search for "restaurants" near that location. I'm just building on the sample code from here. I'll post it below with my changes anyway, just in case. <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>Google Maps JavaScript API v3 Example: Map Geolocation</title> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script> <script type="text/javascript" src="http://code.google.com/apis/gears/gears_init.js"></script> <script type="text/javascript"> var currentLocation; var detroit = new google.maps.LatLng(42.328784, -83.040877); var browserSupportFlag = new Boolean(); var map; var infowindow = new google.maps.InfoWindow(); function initialize() { var myOptions = { zoom: 6, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); map.enableGoogleBar(); // Try W3C Geolocation method (Preferred) if(navigator.geolocation) { browserSupportFlag = true; navigator.geolocation.getCurrentPosition(function(position) { // TRP - Save current location in a variable (currentLocation) currentLocation = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); // TRP - Center the map around current location map.setCenter(currentLocation); }, function() { handleNoGeolocation(browserSupportFlag); }); } else { // Browser doesn't support Geolocation browserSupportFlag = false; handleNoGeolocation(browserSupportFlag); } } function handleNoGeolocation(errorFlag) { if (errorFlag == true) { // TRP - Default location is Detroit, MI currentLocation = detroit; contentString = "Error: The Geolocation service failed."; } else { // TRP - This should never run. It's embedded in a UIWebView, running on iPhone contentString = "Error: Your browser doesn't support geolocation."; } // TRP - Set the map to the default location and display the error message map.setCenter(currentLocation); infowindow.setContent(contentString); infowindow.setPosition(currentLocation); infowindow.open(map); } </script> </head> <body style="margin:0px; padding:0px;" onload="initialize()"> <div id="map_canvas" style="width:100%; height:100%"></div> </body> </html>

    Read the article

  • multiline gtk.Label ignores xalign=0.5

    - by thomas
    A gtk.Label can't be aligned in center when line-wrap is turned on. Example code: import pygtk pygtk.require('2.0') import gtk class testwin(gtk.Window): def __init__(self): gtk.Window.__init__(self) width,height = 300,300 self.set_size_request(width,height) self.set_position(gtk.WIN_POS_CENTER) self.set_title("test window") label = gtk.Label("test text") label.set_line_wrap(True) label.set_justify(gtk.JUSTIFY_CENTER) label.set_alignment(0.5,0.5) label.connect("size-allocate",lambda l,s: l.set_size_request(s.width-1, -1)) self.add(label) self.connect("destroy", gtk.main_quit) self.show_all() testwin() gtk.main() It looks like this, that means, it's aligned left: http://m45.img-up.net/?up=pic122x97.png If you comment out line 14 (set_line_wrap) everything is perfectly fine: http://o54.img-up.net/?up=pic2y00p9.png Please note that yalign works fine. So it seems like the first argument in the gtk.Misc.set_alignment-function has no effect when line wrap is turned on. Using Fedora 16, 64bit, gtk 3.2.4, pygtk 2.24.0, python 2.7.2 Question: Is this intended or a bug? How is it supposed to be made or is a workaround available?

    Read the article

  • Does JUnit4 testclasses require a public no arg constructor?

    - by Thomas Baun
    I have a test class, written in JUnit4 syntax, that can be run in eclipse with the "run as junit test" option without failing. When I run the same test via an ant target I get this error: java.lang.Exception: Test class should have public zero-argument constructor at org.junit.internal.runners.MethodValidator.validateNoArgConstructor(MethodValidator.java:54) at org.junit.internal.runners.MethodValidator.validateAllMethods(MethodValidator.java:39) at org.junit.internal.runners.TestClassRunner.validate(TestClassRunner.java:33) at org.junit.internal.runners.TestClassRunner.<init>(TestClassRunner.java:27) at org.junit.internal.runners.TestClassRunner.<init>(TestClassRunner.java:20) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:26) at junit.framework.JUnit4TestAdapter.<init>(JUnit4TestAdapter.java:24) at junit.framework.JUnit4TestAdapter.<init>(JUnit4TestAdapter.java:17) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:386) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768) Caused by: java.lang.NoSuchMethodException: dk.gensam.gaia.business.bonusregulering.TestBonusregulerAftale$Test1Reader.<init>() at java.lang.Class.getConstructor0(Class.java:2706) at java.lang.Class.getConstructor(Class.java:1657) at org.junit.internal.runners.MethodValidator.validateNoArgConstructor(MethodValidator.java:52) I have no public no arg constructor in the class, but is this really necessary? This is my ant target <target name="junit" description="Execute unit tests" depends="compile, jar-test"> <delete dir="tmp/rawtestoutput"/> <delete dir="test-reports"/> <mkdir dir="tmp/rawtestoutput"/> <junit printsummary="true" failureproperty="junit.failure" fork="true"> <classpath refid="class.path.test"/> <classpath refid="class.path.model"/> <classpath refid="class.path.gui"/> <classpath refid="class.path.jfreereport"/> <classpath path="tmp/${test.jar}"></classpath> <batchtest todir="tmp/rawtestoutput"> <fileset dir="${build}/test"> <include name="**/*Test.class" /> <include name="**/Test*.class" /> </fileset> </batchtest> </junit> <junitreport todir="tmp"> <fileset dir="tmp/rawtestoutput"/> <report todir="test-reports"/> </junitreport> <fail if="junit. failure" message="Unit test(s) failed. See reports!"/> </target> The test class have no constructors, but it has an inner class with default modifier. It also have an anonymouse inner class. Both inner classes gives the "Test class should have public zero-argument constructor error". I am using Ant version 1.7.1 and JUnit 4.7

    Read the article

  • Jquery cross-fade rollover problems in IE7

    - by Thomas
    I built some cross fade rollovers in IE7 using this single image technique: http://jqueryfordesigners.com/image-cross-fade-transition/ It works by placing the rollover image in the background and fading the original image state when the user rollovers the image. IE7 hates it. The rollover state shows up directly below the original image. You can check it out here: http://hardtopdepot.com/dev/inner.html It should be pretty obvious in IE7 but the add to cart buttons are suppossed to be Jquery rollovers. I am by no means a JS expert so Im not sure how to go about solving this problem, any suggestions would be very helpful. Thanks-

    Read the article

  • NSThread running a class

    - by Thomas Joulin
    Hi, Every the example I find on the internet (including Apple doc) sets the target to self like this : [NSThread detachNewThreadSelector:@selector(threadedTask) toTarget:self withObject:nil]; Since i would like to do a more complex task in background (involving multiple methods), I thought of creating a class Task called like this : Task *task = [[Task alloc] init]; [NSThread detachNewThreadSelector:@selector(main) toTarget:task withObject:nil]; but I wonder, how will be handled the instance variables of my class Task ? in my method main can I safely call methods of my class Task using [self myMethod] and modifying members variables assuming I'm the only thread accessing it ? This way of handling threads seems weird to me, sorry if my question is stupid ^^ Thanks in advance

    Read the article

  • Recommended NetBeans UML plugins

    - by Thomas Owens
    It appears that the NetBeans UML plugin has been discontinued, as per a discussion on the NetBeans forums. This was a great, free tool with nice model-code and code-model generation. There are a number of other UML NetBeans plugins out there. However, I've never used any of them. Any suggestions?

    Read the article

  • Submit form with JS

    - by Thomas
    Im working with a shopping cart plugin and that uses a basic form on the product page to submit values like price, product name, etc.. The problem is that the plugin uses a standard submit button to send the values and I would like to replace said button with a prettier custom jquery rollover. In order to make this happen I used some JS and tossed a link around my custom submit button: <a href="#" onclick="document.forms[0].submit()" value="Add to Cart" onsubmit="return ReadForm(this, true);"> <img class="fade" src="style/img/add_btn.jpg" style="background: url(style/img/add_ro.png);" alt=""/> </a> The form submits and the user is redirected to the homepage but the data in the form doesn't seem to get submitted and the product never gets added to the 'cart' page. I suspect that the form is getting submitted but I am failing to fire some additional JS function that submits the data. The plugin adds some JS to the top of the page: <!-- // function ReadForm (obj1, tst) { // Read the user form var i,j,pos; val_total="";val_combo=""; for (i=0; i<obj1.length; i++) { // run entire form obj = obj1.elements[i]; // a form element if (obj.type == "select-one") { // just selects if (obj.name == "quantity" || obj.name == "amount") continue; pos = obj.selectedIndex; // which option selected val = obj.options[pos].value; // selected value val_combo = val_combo + "(" + val + ")"; } } // Now summarize everything we have processed above val_total = obj1.product_tmp.value + val_combo; obj1.product.value = val_total; } //--> If you want to check out the the site in question, take a look here and click 'add to cart button': http://hardtopdepot.com/?p=34 You can see the cart at the top: http://hardtopdepot.com/?page_id=50 Any help would be super appreciated- thanks!

    Read the article

  • Platform configuration for projects in VS 2010

    - by Thomas Wanner
    I have a third-party project type in Visual Studio which for some reason only supports the .NET Platform configuration for the build, for all other (standard C#) projects in the solution I only have AnyCPU. Unfortunately, ever since upgrading to VS 2010 it produces following error when built : Error 39 The OutputPath property is not set for project 'ReferencedBusinessProject.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='.NET'. This error may also appear if some other project is trying to follow a project-to-project reference to this project, this project has been unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets 483 10 CustomTypeProject It's pretty much descriptive in what is missing but I haven't found any way to fix it so far. Do you have any idea how this can be resolved or what can be the problem ?

    Read the article

  • Why does jquery leak memory so badly?

    - by Thomas Lane
    This is kind of a follow-up to a question I posted last week: http://stackoverflow.com/questions/2429056/simple-jquery-ajax-call-leaks-memory-in-ie I love the jquery syntax and all of its nice features, but I've been having trouble with a page that automatically updates table cells via ajax calls leaking memory. So I created two simple test pages for experimenting. Both pages do an ajax call every .1 seconds. After each successful ajax call, a counter is incremented and the DOM is updated. The script stops after 1000 cycles. One uses jquery for both the ajax call and to update the DOM. The other uses the Yahoo API for the ajax and does a document.getElementById(...).innerHTML to update the DOM. The jquery version leaks memory badly. Running in drip (on XP Home with IE7), it starts at 9MB and finishes at about 48MB, with memory growing linearly the whole time. If I comment out the line that updates the DOM, it still finishes at 32MB, suggesting that even simple DOM updates leak a significant amount of memory. The non-jquery version starts and finishes at about 9MB, regardless of whether it updates the DOM. Does anyone have a good explanation of what is causing jquery to leak so badly? Am I missing something obvious? Is there a circular reference that I'm not aware of? Or does jquery just have some serious memory issues? Here is the source for the leaky (jquery) version: <html> <head> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load('jquery', '1.4.2'); </script> <script type="text/javascript"> var counter = 0; leakTest(); function leakTest() { $.ajax({ url: '/html/delme.x', type: 'GET', success: incrementCounter }); } function incrementCounter(data) { if (counter<1000) { counter++; $('#counter').text(counter); setTimeout(leakTest,100); } else $('#counter').text('finished.'); } </script> </head> <body> <div>Why is memory usage going up?</div> <div id="counter"></div> </body> </html> And here is the non-leaky version: <html> <head> <script type="text/javascript" src="http://yui.yahooapis.com/2.8.0r4/build/yahoo/yahoo-min.js"></script> <script type="text/javascript" src="http://yui.yahooapis.com/2.8.0r4/build/event/event-min.js"></script> <script type="text/javascript" src="http://yui.yahooapis.com/2.8.0r4/build/connection/connection_core-min.js"></script> <script type="text/javascript"> var counter = 0; leakTest(); function leakTest() { YAHOO.util.Connect.asyncRequest('GET', '/html/delme.x', {success:incrementCounter}); } function incrementCounter(o) { if (counter<1000) { counter++; document.getElementById('counter').innerHTML = counter; setTimeout(leakTest,100); } else document.getElementById('counter').innerHTML = 'finished.' } </script> </head> <body> <div>Memory usage is stable, right?</div> <div id="counter"></div> </body> </html>

    Read the article

  • How to update textbox value

    - by Thomas
    I have a textbox in my View. I input a number into the textbox, and then i want the controller to multiply the number and put the result into the textbox. How can I do that? This is what i have done already. Let's start with the View: <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Index</title> </head> <body> <div> <h2>Please enter a number</h2> <% using (Html.BeginForm()) { %> <%=Html.TextBox("number")%> <input type="submit" value="Index" name ="Index" /> <% } %> </div> </body> </html> As you can see I have a simple textbox and button. This is my controller: using System.Web.Mvc; namespace MvcApplication1.Controllers { public class HomeController : Controller { // // GET: /Home/ public ActionResult Index() { return View(); } [HttpPost] public ActionResult Index(int number) { number = number * 2; ViewData["id"] = number; return View(ViewData); } } } But nothing really happens. Yeah, I see the Post is being done, and the coded steps into public ActionResult Index(int number). I see that the number is taken from the textbox, it's multiplied correctly. I've tried using ViewData as you can see. I've also used TempData. This is another code for the textbox in the View I've tried: <%=Html.TextBox("number", ViewData["number"])%> But it doesn't matter. The textbox doesn't get updated with the new value. How can I do that?

    Read the article

  • How do I step through and debug a Scheme program using Dr. Racket?

    - by Thomas Owens
    I'm using the Dr. Racket development environment and the language definition #lang scheme to do work for a course. However, I'm not sure how to best use this tool for debugging. I would like to be able to execute a function and step through it, observing the values of different functions at various points in execution. Is this possible? If not, what is the typical method of stepping through the execution of a Scheme program and debugging it?

    Read the article

  • How to make a floating (tooltip) control in Windows.Forms?

    - by Daren Thomas
    The Scene: A (smallish) Form hosting a UserControl. The Plot: Whenever UserControl raises a hover event, display some (graphical) information in a tool tip fashion. When the user moves the mouse, fade them away again. Notes: I'd like to display more than one "tooltip", with each tooltip being a UserControl displaying information in a graphical manner. Not just text in a yellow box! Also, I'm using the Windows.Forms library.

    Read the article

  • How to delete a native image ?

    - by Thomas
    Hi all, I am not able to delete a native image : del c:\windows\assembly\native...\mscorlib\xxxx\mscorlib.ni.dll access refused That works on Windows XP, but not in Seven. Does someone know how can I do ? Thanks

    Read the article

  • MSIL code problem

    - by Thomas
    Hi all, I am trying to modiate an assembly (mine) just by ildassembling it and by modifying the MSIL code. I just want to pop a MessageBox. Here is my code : .module extern Fusion.dll .module extern kernel32.dll .module extern advapi32.dll .module extern aspnet_state.exe .module extern webengine.dll .module extern aspnet_wp.exe .module extern mscorwks.dll .module extern ole32.dll .module extern mscoree.dll .module extern Netapi32.dll .assembly extern mscorlib { ... ... IL_0052: ldstr "ahahahahahah" IL_0057: callvirt instance [mscorlib]System.Windows.Forms.MessageBox::Show(string) IL_005c: ldloc.0 IL_005d: ret } // end of method ... I have no error, but the MessageBox does not appear :\ Thanks for helping !

    Read the article

  • Cannot drag window in remote desktop.

    - by Thomas
    When I use remote desktop to access my windows 2008 server from windows vista I cannot re size or drag any windows in the RDP session. I can RDP in and maximize windows and minimize just fine buy I cannot re size or move a window. Any help I cannot find anything on Google.

    Read the article

  • New Application Process from Bash Shell

    - by Thomas Uster
    I'm relearning UNIX commands to use git on windows using MINGW32. When I launch a program, for example "$ notepad hello.txt" I can't use the shell again until I close the notepad file or CTRL-C in the shell. How do I essentially fork a new process so I can use both programs?

    Read the article

  • Power Analysis in [R] for Two-Way Anova

    - by Thomas
    I am trying to calculate the necessary sample size for a 2x2 factorial design. I have two questions. 1) I am using the package pwr and the one way anova function to calculate the necessary sample size using the following code pwr.anova.test(k = , n = , f = , sig.level = , power = ) However, I would like to look at two way anova, since this is more efficient at estimating group means than one way anova. There is no two-way anova function that I could find. Is there a package or routine in [R] to do this? 2) Moreover, am I safe in assuming that since I am using a one-way anova power calculations, that the sample size will be more conservative (i.e. larger)?

    Read the article

  • Android 2.3.3 - Messages: Wrong Status Information in the Conversation Overview

    - by Thomas Hoffmann
    On my HTC Desire Z with Android 2.3.3 I get from time to time the problem, that the status information ist wrong. That means status information says, that there is an unread, unsent or failed SMS, but this SMS is already deleted. Does anybody know, where I can reset this information? It must be stored anywhere in ContentResolver of content://mms-sms/conversations or content://sms/conversations on the thread-level, but I have no idea. Example: After I deleted a number of failed SMS in the non delivered SMS overview, the status of non delivered SMS was not reset in the Messages conversation overview though in each conversation there wasn't any undelivered SMS left.

    Read the article

  • PHP Echo a large block of text

    - by Thomas
    Im new to PHP and I can't figure out what the rules are for using the echo function. For example, if I need to echo a large block of css/js, do I need to add echo to each line of text or is there a way to echo a large block of code with a single echo? When I try to echo a big block of code like this one, I get an error: if (is_single()) { echo '<link type="text/css" rel="stylesheet" href="http://jotform.com/css/styles/form.css"/><style type="text/css"> .form-label{ width:150px !important; } .form-label-left{ width:150px !important; } .form-line{ padding:10px; } .form-label-right{ width:150px !important; } body, html{ margin:0; padding:0; background:false; } .form-all{ margin:0px auto; padding-top:20px; width:650px !important; color:Black; font-family:Verdana; font-size:12px; } </style> <link href="http://jotform.com/css/calendarview.css" rel="stylesheet" type="text/css" /> <script src="http://jotform.com/js/prototype.js" type="text/javascript"></script> <script src="http://jotform.com/js/protoplus.js" type="text/javascript"></script> <script src="http://jotform.com/js/protoplus-ui.js" type="text/javascript"></script> <script src="http://jotform.com/js/jotform.js?v3" type="text/javascript"></script> <script src="http://jotform.com/js/location.js" type="text/javascript"></script> <script src="http://jotform.com/js/calendarview.js" type="text/javascript"></script> <script type="text/javascript"> JotForm.init(function(){ $('input_6').hint('ex: [email protected]'); }); </script>'; }else { } Is there a better way to echo large blocks of code without a lot of work (adding echo to each line for example)?

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >