Search Results

Search found 449 results on 18 pages for 'samuel walker'.

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

  • File comparison utility

    - by Night Walker
    Hello all I am looking for compare utility similar for "win merge" or "beyond compare" . That in addition for gui comparison will have api that i will be able to run on my files via my code and see if the files are the same or not and also use it in gui mode to show graphically the differences . Any recommendations ? thanks

    Read the article

  • Python 4 steps setup with progressBars

    - by Samuel Taylor
    I'm having a problem with the code below. When I run it the progress bar will pulse for around 10 secs as meant to and then move on to downloading and will show the progress but when finished it will not move on to the next step it just locks up. import sys import time import pygtk import gtk import gobject import threading import urllib import urlparse class WorkerThread(threading.Thread): def __init__ (self, function, parent, arg = None): threading.Thread.__init__(self) self.function = function self.parent = parent self.arg = arg self.parent.still_working = True def run(self): # when does "run" get executed? self.parent.still_working = True if self.arg == None: self.function() else: self.function(self.arg) self.parent.still_working = False def stop(self): self = None class MainWindow: def __init__(self): gtk.gdk.threads_init() self.wTree = gtk.Builder() self.wTree.add_from_file("gui.glade") self.mainWindows() def mainWindows(self): self.mainWindow = self.wTree.get_object("frmMain") dic = { "on_btnNext_clicked" : self.mainWindowNext, } self.wTree.connect_signals(dic) self.mainWindow.show() self.installerStep = 0 # 0 = none, 1 = preinstall, 2 = download, 3 = install info, 4 = install #gtk.main() self.mainWindowNext() def pulse(self): self.wTree.get_object("progress").pulse() if self.still_working == False: self.mainWindowNext() return self.still_working def preinstallStep(self): self.wTree.get_object("progress").set_fraction(0) self.wTree.get_object("btnNext").set_sensitive(0) self.wTree.get_object("notebook1").set_current_page(0) self.installerStep = 1 WT = WorkerThread(self.heavyWork, self) #Would do a heavy function here like setup some thing WT.start() gobject.timeout_add(75, self.pulse) def downloadStep(self): self.wTree.get_object("progress").set_fraction(0) self.wTree.get_object("btnNext").set_sensitive(0) self.wTree.get_object("notebook1").set_current_page(0) self.installerStep = 2 urllib.urlretrieve('http://mozilla.mirrors.evolva.ro//firefox/releases/3.6.3/win32/en-US/Firefox%20Setup%203.6.3.exe', '/tmp/firefox.exe', self.updateHook) self.mainWindowNext() def updateHook(self, blocks, blockSize, totalSize): percentage = float ( blocks * blockSize ) / totalSize if percentage > 1: percentage = 1 self.wTree.get_object("progress").set_fraction(percentage) while gtk.events_pending(): gtk.main_iteration() def installInfoStep(self): self.wTree.get_object("btnNext").set_sensitive(1) self.wTree.get_object("notebook1").set_current_page(1) self.installerStep = 3 def installStep(self): self.wTree.get_object("progress").set_fraction(0) self.wTree.get_object("btnNext").set_sensitive(0) self.wTree.get_object("notebook1").set_current_page(0) self.installerStep = 4 WT = WorkerThread(self.heavyWork, self) #Would do a heavy function here like setup some thing WT.start() gobject.timeout_add(75, self.pulse) def mainWindowNext(self, widget = None): if self.installerStep == 0: self.preinstallStep() elif self.installerStep == 1: self.downloadStep() elif self.installerStep == 2: self.installInfoStep() elif self.installerStep == 3: self.installStep() elif self.installerStep == 4: sys.exit(0) def heavyWork(self): time.sleep(10) if __name__ == '__main__': MainWindow() gtk.main() I have a feeling that its something to do with: while gtk.events_pending(): gtk.main_iteration() Is there a better way of doing this?

    Read the article

  • Address calling class

    - by Samuel
    I have an abstract class Moveable with the method abstract void move() which is extended by the class Bullet and the abstract class Character, and Character is extended by the class Survivor and the class Zombie. In Survivor and Bullet the move() method doesnt require any parameters while in the class Zombie the move() method depends on the actual position of the survivor. The survivor and multiple zombies are created in the class Gui. I wanted to access the survivor in Zombie - what's the best way of doing this? In Gui i wrote a method getSurvivor() but i don't see how to access this method in Zombie? I am aware that as a workaround i could just pass a [Survivor survivor] as parameter in move() and ignore it in Bullet and Survivor, but that feels so ... bad practice.

    Read the article

  • How to disable sql creation for JPA entity classes

    - by Samuel
    We have some JPA entity classes which are currently under development and wouldn't want them as part of the testing cycle. We tried commenting out the relevant entity classes in META-INF\persistence.xml but the hbm2ddl reverse engineering tool still seems to generate SQL for those entities. How do I tell my code to ignore these classes? Are there any annotations for these or should I have to comment out the @Entity annotation along with my changes in persistence.xml file.

    Read the article

  • nUnit error when loading dll what to do ?

    - by Night Walker
    Hello all I am trying to run my first nunit example , but i am getting some error when i am loading the dll file with the tests by nunit . the example taken from here link text --------------------------- Assembly Not Loaded --------------------------- System.ApplicationException : Invalid cache path: C:\Documents and Settings\pauly\Local Settings\Temp;C:\Windows\Microsoft.NET\Framework\V2.0.50727\nunit20\ShadowCopyCache\4344_634116012858505240 ----> System.NotSupportedException : The given path's format is not supported. For further information, use the Exception Details menu item. --------------------------- OK --------------------------- Any idea what is wrong here ? Thanks .

    Read the article

  • Setting background text colour of radio button

    - by Night Walker
    Hello all I want to set up the Background color of the text in my radio button . I have tried Background="Chocolate" , but it sets the color of the circle dot there . Any idea how i do that ? This is my current code <RadioButton Content=" MSSQL" TextBlock.Foreground="Black" HorizontalAlignment="Left" Height="Auto" Padding="0" Margin="15,15,0,0" Name="radioButton_MSSQL" VerticalAlignment="Top" Width="66" GroupName="DataBases" BorderBrush="DarkOrchid" IsChecked="True" />

    Read the article

  • resources at class library project

    - by Night Walker
    Hello I want to add some xml file as resource to my class library project . Any idea how to do so , and call it later? In windows application i would do it like ClassLibrary1.Properties.Resources.file.xml But here it didn't worked any idea how i do it here ?

    Read the article

  • Preventing ActiveRecord save() on an instance

    - by Craig Walker
    I have an ActiveRecord model object Foo; it represents a standard database row. I want to be able to display modified versions of instances of this object. I'd like to reuse the class itself, as it already has all the hooks & aspects I'll need. (For example: I already have a view that displays the appropriate attributes). Basically I want to clone the model instance, modify some of its properties, and feed it back to the caller (view, test, etc). I do not want these attribute modifications getting back into the database. However, I do want to include the id attribute in the cloned version, as it makes dealing with the route-helpers much easier. Thus, I plan on calling ActiveRecord::Base.clone(), manually setting the ID of the cloned instance, and then making the appropriate attribute changes to the new instance. This has me worried though; one save() on the modified instance and my original data will get clobbered. So, I'm looking to lock down the new instance so that it won't hurt anything else. I'm already planning on calling freeze() (on the understanding that this prevents further modification to the object, though the documentation isn't terribly clear). However, I don't see any obvious way to prevent a save(). What would be the best approach to achieving this?

    Read the article

  • Problem with function calls [javascript]

    - by Samuel
    <script language="javascript"> function toggle(id) { alert('call'); if (document.getElementById(id).style.display == "none") { alert('now visible'); document.getElementById(id).style.display = ""; } else { alert('now invisible'); document.getElementById(id).style.display = "none"; } } </script> </head> <body onload="toggle('image1');alert('test_body');toggle('image2')"> <script language="javascript"> alert('test_pre_function'); toggle('image1'); alert('test_after_function'); toggle('image2'); </script> Looks like a lot of code but it's pretty simple so i think most of you won't have troubles with it. toggle() should toggle the display status of divs containing images. When the user enters the site the divs should hide, when everything is loaded the divs should show up. (onload) Strangely enough, the funtion in the body (not in the body tag) only work half, i get and alert 'test_pre_function' and i get an alert 'call' (out of the function), but that's it. The code in the body tag runs just fine. I find this weird because it's supposed to do exactly the same twice and one time it runs, another time not, so i guess i must have made some stupid mistake. Thanks for any help!

    Read the article

  • Setting up httpd.conf / mod_rewrite to auto-load codeigniter?

    - by Walker
    I'm sorry to ask this here, as I'm sure the solution is fairly easy but for the life of my I can't setup httpd.conf on my apache server to automatically load the code_igniter files. Instead I'm having to go into the folder itself localhost/trunk/etc/etc until I get index.php - which messes with some of the relative paths (our backend coder is gone for the week so I can't ask him, but he has already setup the rewrite rules on our development server).

    Read the article

  • Javascript not working in firefox

    - by Samuel Meddows
    Hi guys, I have a PHP form validation function that I developed in chrome and now will not work in firefox or Opera. The function checks to see if a section of the form is blank and shows and error message. If there is no error then then the form submits through document.events.submit(); CODE: function submit_events() { //Check to see if a number is entered if the corosponding textbox is checked if (document.events.dj_card.checked == true && dj_amount.value==""){ //Error Control Method //alert ('You didn\'t enetr an Amount for DJ\'s Card!'); var txt=document.getElementById("error") txt.innerHTML="<p><font color=\"#FF0000\"> You didn\'t enetr an Amount for DJ\'s Card!</font></p>"; window.document.getElementById("dj_card_label").style.color = '#FF0000'; //Reset window.document.getElementById("company_amount_label").style.color = '#000000'; window.document.getElementById("own_amount_label").style.color = '#000000'; }else{ document.events.submit(); } The document.events.submit();does work across all my browsers however the check statements do not. If the box is not ticked the form submits. If the box is ticked it does not matter whether there is data in the dj_amount.value or not. The form will not submit and no error messages are displayed. Thanks guys.

    Read the article

  • CMD Prompt > FTP Size Command

    - by Samuel Baldus
    I'm developing a PHP App on IIS 7.5, which uses PHP FTP commands. These all work, apart from ftp_size(). I've tested: cmd.exe > ftp host > username > password > SIZE filename = Invalid Command However, if I access the FTP site through an Internet Browser, the filesize is displayed. Do I need to install FTP Extensions, and if so, which ones and where do I get them? Here is the PHP Code: <?php // FTP Credentials $ftpServer = "www.domain.com"; $ftpUser = "username"; $ftpPass = "password"; // Unlimited Time set_time_limit(0); // Connect to FTP Server $conn = @ftp_connect($ftpServer) or die("Couldn't connect to FTP server"); // Login to FTP Site $login = @ftp_login($conn, $ftpUser, $ftpPass) or die("Login credentials were rejected"); // Set FTP Passive Mode = True ftp_pasv ($conn, true); // Build the file list $ftp_nlist = ftp_nlist($conn, "."); // Alphabetical sorting sort($ftp_nlist); // Display Output foreach ($ftp_nlist as $raw_file) { // Get the last modified time $mod = ftp_mdtm($conn, $raw_file); // Get the file size $size = ftp_size($conn, $raw_file); // Size is not '-1' => file if (!(ftp_size($conn, $raw_file) == -1)) { //output as file echo "Filename: $raw_file<br />"; echo "FileSize: ".number_format($size, '')."Kb</br>"; echo "Last Modified: ".date("d/m/Y H:i", $mod)."</br>"; } } ?>

    Read the article

  • Which is faster when animating the UI: a Control or a Picture?

    - by Christopher Walker
    /I'm working with and testing on a computer that is built with the following: {1 GB RAM (now 1.5 GB), 1.7 GHz Intel Pentium Processor, ATI Mobility Radeon X600 GFX} I need scale / transform controls and make it flow smoothly. Currently I'm manipulating the size and location of a control every 24-33ms (30fps), ±3px. When I add a 'fade' effect to an image, it fades in and out smoothly, but it is only 25x25 px in size. The control is 450x75 px to 450x250 px in size. In 2D games such as Bejeweled 3, the sprites animate with no choppy animation. So as the title would suggest: which is easier/faster on the processor: animating a bitmap (rendering it to the parent control during animation) or animating the control it's self?

    Read the article

  • resources at class library

    - by Night Walker
    Hello I want to add some xml file as resource to my class library project . Any idea how to do so , and call it later? In windows application i would do it like ClassLibrary1.Properties.Resources.file.xml But here it didn't worked any idea how i do it here ?

    Read the article

  • count down timers in jquery

    - by Samuel
    How do I find out the most commonly or popularly used count down timer in jquery. I have been looking into this (http://plugins.jquery.com/project/countdown2) but not sure if this is well supported. Is there a some kind of a ranking system for the jquery plugins

    Read the article

  • Possible loss of precision / [type] cannot be dereferenced

    - by Samuel
    I have been looking around a lot but i simply can't find a nice solution to this... Point mouse = MouseInfo.getPointerInfo().getLocation(); int dx = (BULLET_SPEED*Math.abs(x - mouse.getX()))/ (Math.abs(y - mouse.getY()) + Math.abs(x - mouse.getX()))* (x - mouse.getX())/Math.abs(x - mouse.getX()); In this constellation i get: Possible loss of precision, when i change e.g (x - mouse.getX()) to (x - mouse.getX()).doubleValue() it says double cannot be dereferenced, when i add intValue() somewhere it says int cannot be dereferenced. What's my mistake? [x, y are integers | BULLET_SPEED is a static final int] Thanks!

    Read the article

  • user interface pattern for associating single or many objects to an entity

    - by Samuel
    Need suggestions on implementing associating single or many objects to an entity. All soccer team players are registered individually (e.g. they are part of 'players' table) A soccer team has many players. The click sequence is like this:- a] Soccer team owner provides a name and brief description of the soccer team. b] Now it wants to add players to this team. c] You have the following button 'Add players to team' which lets you navigate to the 'View Players' page and lets you multi select users from there. Assuming this is a paginated list of players, how do you handle the following:- Do you provide a check box against each player and let the manager do a multi selection. If you need to add more players, it doesn't make sense to show the players who have been already added to the team. Do you mark those entries as not selectable or you would adding showing these entries. If you need to filter, do you provide search filters at the top of this page. Am looking for ideas on how to implement this or sites which have already done something similar.

    Read the article

  • does it make sense to send password information during email communication from websites

    - by Samuel
    Most of the online sites on registration do send a link to activate the site and on any further correspondence with the end user they provide information about the site and also provide the login credentials with password in clear text (as given below) Username - [email protected] Password - mysecretpassword What would you do in such a case? From a usability perspective does it make sense to send the password information in clear text or should you just avoid sending this information. I was under the impression that most of the passwords are MD5 hashed before storing in the database and hence the service provider will not have any access to clear text passwords, is this a security violation?

    Read the article

  • How can I embed a conditional comment for IE with innerHTML?

    - by Samuel Charpentier
    Ok so I want to conditionally add this line of code; <!--[if ! IE]> <embed src="logo.svg" type="image/svg+xml" /> <![endif]--> Using: document.getElementById("logo") .innerHTML='...'; In a if()/else() statement and it don't write it! If i get rid of the selective comment ( <!--[if ! IE]><![endif]-->) and only put the SVG ( <embed src="logo.svg" type="image/svg+xml" /> ) it work! what should I do? I found a way around but i think in the Android browser the thing will pop up twice. here's what I've done ( and its Validated stuff!); <!DOCTYPE html> <html> <head> <META CHARSET="UTF-8"> <title>SVG Test</title> <script type="text/javascript"> //<![CDATA[ onload=function() { var ua = navigator.userAgent.toLowerCase(); var isAndroid = ua.indexOf("android") > -1; //&& ua.indexOf("mobile"); if(isAndroid) { document.getElementById("logo").innerHTML='<img src="fin_palais.png"/>'; } } //]]> </script> </head> <body> <div id="logo"> <!--[if lt IE 9]> <img src="fin_palais.png"/> <![endif]--> <!--[if gte IE 9]><!--> <embed src="fin_palais.svg" type="image/svg+xml" /> <!--<![endif]--> </div> </body>

    Read the article

  • Border of single th spreads to neighboring th when colspan set on td row below

    - by Samuel Hapak
    Having following html code: <table> <tr><th>First</th><th class='second'>Second</th><th class='third'>Third</th><th>Fourth</th></tr> <tr><td>Mike</td><td colspan=2 >John</td><td>Paul</td></tr> </table>? And following css: table { border-collapse: collapse; } td, th { border: 1px black solid; } td { border-top: none; } th { border-bottom: none; } th.second { border-bottom: 3px green solid; } th.third { } ? I would expect as result one table with 3px solid green line below the second th cell. Instead of that in Chrome, I have solid green border below both the second and the third th cell. In the firefox, results are just as expected. Is this browser bug, or my code is illegal? You can see example at http://jsfiddle.net/tt6aP/3/ PS: Try to set th.third { border-bottom: 2px solid red; } And then try to raise it to 3px. This is even more strange. Screenshots Expected: Chrome: Firefox:

    Read the article

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