Search Results

Search found 1875 results on 75 pages for 'tom irons'.

Page 60/75 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • Calling Windows commands (e.g. del) from a GNU makefile

    - by Tom
    It does not appear to be possible to call Windows system commands (e.g. del, move, etc) using GNU Make. When the following rule is run, an error is reported del: command not found: clean: del *.o This is presumably because there is no such execuatable as "del". I've also tried running it as an option to cmd but with this only seems to open a new prompt: clean: cmd /C del *.o I'm using GNU Make 3.79.1 that is bundled as part of MSys.

    Read the article

  • IBM Toolkit for MPEG-4 terms of use, am I understanding right?

    - by Tom Brito
    The IBM Toolkit for MPEG-4 comes with the following paragraph in its licence: Rights In Data You assign to IBM all right, title, and interest (including ownership of copyright) in any data, suggestions, and written materials that 1) is related to Your use of the Program and 2) You provide to IBM. If IBM requires it, You will sign an appropriate document to assign such rights. Neither party will charge the other for rights in data or any work performed as a result of this Agreement. Correct me if I am wrong, but I'm understanding that I cannot use their toolkit without give them rights on my software?

    Read the article

  • Java xml binding with wrong xmlns attribute name

    - by Tom Brito
    When I use the annotation: @XmlRootElement(name="RootElement", namespace="namespace") class RootElement { to create xml file from java, it creates the root element as: <ns2:RootElement xmlns:ns2="namespace"> but I wanted to create without the "ns2", like: <RootElement xmlns="namespace"> Any idea how to fix it? Reletad link (example I used to create the xml): http://www.java2s.com/Code/JavaAPI/javax.xml.bind.annotation/XmlRootElementname.htm

    Read the article

  • Unit Tests Architecture Question

    - by Tom Tresansky
    So I've started to layout unit tests for the following bit of code: public interface MyInterface { void MyInterfaceMethod1(); void MyInterfaceMethod2(); } public class MyImplementation1 implements MyInterface { void MyInterfaceMethod1() { // do something } void MyInterfaceMethod2() { // do something else } void SubRoutineP() { // other functionality specific to this implementation } } public class MyImplementation2 implements MyInterface { void MyInterfaceMethod1() { // do a 3rd thing } void MyInterfaceMethod2() { // do something completely different } void SubRoutineQ() { // other functionality specific to this implementation } } with several implementations and the expectation of more to come. My initial thought was to save myself time re-writing unit tests with something like this: public abstract class MyInterfaceTester { protected MyInterface m_object; @Setup public void setUp() { m_object = getTestedImplementation(); } public abstract MyInterface getTestedImplementation(); @Test public void testMyInterfaceMethod1() { // use m_object to run tests } @Test public void testMyInterfaceMethod2() { // use m_object to run tests } } which I could then subclass easily to test the implementation specific additional methods like so: public class MyImplementation1Tester extends MyInterfaceTester { public MyInterface getTestedImplementation() { return new MyImplementation1(); } @Test public void testSubRoutineP() { // use m_object to run tests } } and likewise for implmentation 2 onwards. So my question really is: is there any reason not to do this? JUnit seems to like it just fine, and it serves my needs, but I haven't really seen anything like it in any of the unit testing books and examples I've been reading. Is there some best practice I'm unwittingly violating? Am I setting myself up for heartache down the road? Is there simply a much better way out there I haven't considered? Thanks for any help.

    Read the article

  • Is it more secure to run a desktop app in a applet?

    - by Tom Brito
    Fist of all, when I say "run a desktop app in a applet" I mean do a Applet application that runs off-line, instead of a Desktop application that runs inside a JFrame. The little I know about applets (and maybe something I say is wrong, please correct me) is that applets have all permitions not granted by default. Also, the applets run inside a Sandbox, that does not allow information in or out without explicity permition. So, if I am focused on security in my application, its best to run it inside an applet (off-line, for a desktop application) then inside a JFrame. Is it right?

    Read the article

  • Querying results on timestamp in mysql

    - by Tom
    Hi, I have series of records in a table called 'hits' and each record has the current_timestamp (ie. 2010-04-30 10:11:30) in a column called 'current_time'. What I would like to do is query these records and return only the records from the current month. I cannot seem to get this to work. I have tried a range of queries that don't work such as - Select * FROM hits WHERE MONTH(FROM_UNIXTIME(current_time)) = 4 I don't know if I am even on the right lines! Can anyone point me in the right direction? Cheers.

    Read the article

  • Returning a lua table on SWIG call

    - by Tom J Nowell
    I have a class with a methodcalled GetEnemiesLua. I have bound this class to lua using SWIG, and I can call this method using my lua code. I am trying to get the method to return a lua table of objects. Here is my current code: void CSpringGame::GetEnemiesLua(){ std::vector<springai::Unit*> enemies = callback->GetEnemyUnits(); if( enemies.empty()){ lua_pushnil(ai->L); return; } else{ lua_newtable(ai->L); int top = lua_gettop(ai->L); int index = 1; for (std::vector<springai::Unit*>::iterator it = enemies.begin(); it != enemies.end(); ++it) { //key lua_pushinteger(ai->L,index);//lua_pushstring(L, key); //value CSpringUnit* unit = new CSpringUnit(callback,*it,this); ai->PushIUnit(unit); lua_settable(ai->L, -3); ++index; } ::lua_pushvalue(ai->L,-1); } } PushIUnit is as follows: void CTestAI::PushIUnit(IUnit* unit){ SWIG_NewPointerObj(L,unit,SWIGTYPE_p_IUnit,1); } To test this I have the following code: t = game:GetEnemiesLua() if t == nil then game:SendToConsole("t is nil! ") end The result is always 't is nil', despite this being incorrect. I have put breakpoints in the code and it is indeed going over the loop, rather than doing lua_pushnil. So how do I make my method return a table when called via lua?

    Read the article

  • Filter a CSV list in XSLT

    - by Tom W
    Hello SO; I'm trying to convert xml elements whose content is a csv list of identifiers, the exact form doesn't matter. I want to exclude every item that contains the character "/". The best I've come up with is translate(./someElement, ",*/*", "") but this has at least two problems; I'm pretty sure that xsl doesn't accept wildcards, and "," is an illegal character in xpaths. Is there a straightforward way to do this sort of thing?

    Read the article

  • Click() works in IE but not Firefox

    - by Tom Andrews
    I have code which is trivial but only works in IE not Firefox. $(document).ready(function(){ $('li#first').click(); }); I have also tried: document.getElementById('first').click(); But that doesn't work either. Is this an IE bug/feature or is click() not supported in the other browsers? Thanks in advance.

    Read the article

  • Why Is Java Missing Access Specifiers?

    - by Tom Tresansky
    Does anyone understand why Java is missing: An access specifier which allows access by the class and all subclasses, but NOT by other classes in the same package? (Protected-minus) An access specifier which allows access by the class, all classes in the same package, AND all classes in any sub-package? (Default-plus) An access specifier which adds classes in sub-packages to the entities currently allowed access by protected? (Protected-plus) I wish I had more choices than protected and default. In particular, I'm interested in the Protected-plus option. Say I want to use a Builder/Factory patterned class to produce an object with many links to other objects. The constructors on the objects are all default, because I want to force you to use the factory class to produce instances, in order to make sure the linking is done correctly. I want to group the factories in a sub-package to keep them all together and distinct from the objects they are instantiating---this just seems like a cleaner package structure to me. No can do, currently. I have to put the builders in the same package as the objects they are constructing, in order to gain the access to defaults. But separating project.area.objects from project.area.objects.builders would be so nice. So why is Java lacking these options? And, is there anyway to fake it?

    Read the article

  • The largest prime factor with php

    - by Tom
    So, I wrote php program to find the largest prime factor with php and I think it is quite optimal, because it loads quite fast. But there is a problem, it doesn't count very big numbers's prime factors. Here is a program: function is_even($s) { $sk_sum = 0; for($i = 1; $i <= $s; $i++) { if($s % $i == 0) { $sk_sum++; } } if($sk_sum == 2) { return true; } } $x = 600851475143; $i = 2; //x is number while($i <= $x) { if($x % $i == 0) { if(is_even($i)) { $sk = $i; $x = $x / $i; } } $i++; } echo $sk;

    Read the article

  • Adding button click event when Fancybox popup opened

    - by Tom Bell
    I'm trying to add a button onclick event to a button tag when I load my Fancybox popup using the following code: var processOrder = function(id) { $('#processPopupLink').fancybox({ 'hideOnContentClick': false, 'frameWidth': 850, 'frameHeight': 695 }).click(); $('#processComplete').click(function() { alert('debug'); }); } However, it's not showing the message box when I click the button, I have no idea why it is not working, any help would be appreciated.

    Read the article

  • Call a non member funcion on an instance before is constructed.

    - by Tom
    Hi everyone. I'm writing a class, and this doubt came up. Is this undef. behaviour? On the other hand, I'm not sure its recommended, or if its a good practice. Is it one if I ensure no exceptions to be thrown in the init function? //c.h class C{ float vx,vy; friend void init(C& c); public: C(); ~C(); }; //c.cpp C::C() { init(*this); } void init(C& c) //throws() to ensure no exceptions ? { c.vx = 0; c.vy = 0; } Thanks in advance

    Read the article

  • Call a non member function on an instance before is constructed.

    - by Tom
    Hi everyone. I'm writing a class, and this doubt came up. Is this undef. behaviour? On the other hand, I'm not sure its recommended, or if its a good practice. Is it one if I ensure no exceptions to be thrown in the init function? //c.h class C{ float vx,vy; friend void init(C& c); public: C(); }; //c.cpp C::C() { init(*this); } void init(C& c) //throws() to ensure no exceptions ? { c.vx = 0; c.vy = 0; } Thanks in advance

    Read the article

  • C# How to output to GUI when data is coming via an interface via MarshalByRefObject?

    - by Tom
    Hey, can someone please show me how i can write the output of OnCreateFile to a GUI? I thought the GUI would have to be declared at the bottom in the main function, so how do i then refer to it within OnCreateFile? using System; using System.Collections.Generic; using System.Runtime.Remoting; using System.Text; using System.Diagnostics; using System.IO; using EasyHook; using System.Drawing; using System.Windows.Forms; namespace FileMon { public class FileMonInterface : MarshalByRefObject { public void IsInstalled(Int32 InClientPID) { //Console.WriteLine("FileMon has been installed in target {0}.\r\n", InClientPID); } public void OnCreateFile(Int32 InClientPID, String[] InFileNames) { for (int i = 0; i < InFileNames.Length; i++) { String[] s = InFileNames[i].ToString().Split('\t'); if (s[0].ToString().Contains("ROpen")) { //Console.WriteLine(DateTime.Now.Hour+":"+DateTime.Now.Minute+":"+DateTime.Now.Second+"."+DateTime.Now.Millisecond + "\t" + s[0] + "\t" + getProcessName(int.Parse(s[1])) + "\t" + getRootHive(s[2])); Program.ff.enterText(DateTime.Now.Hour + ":" + DateTime.Now.Minute + ":" + DateTime.Now.Second + "." + DateTime.Now.Millisecond + "\t" + s[0] + "\t" + getProcessName(int.Parse(s[1])) + "\t" + getRootHive(s[2])); } else if (s[0].ToString().Contains("RQuery")) { Console.WriteLine(DateTime.Now.Hour + ":" + DateTime.Now.Minute + ":" + DateTime.Now.Second + "." + DateTime.Now.Millisecond + "\t" + s[0] + "\t" + getProcessName(int.Parse(s[1])) + "\t" + getRootHive(s[2])); } else if (s[0].ToString().Contains("RDelete")) { Console.WriteLine(DateTime.Now.Hour + ":" + DateTime.Now.Minute + ":" + DateTime.Now.Second + "." + DateTime.Now.Millisecond + "\t" + s[0] + "\t" + getProcessName(int.Parse(s[0])) + "\t" + getRootHive(s[1])); } else if (s[0].ToString().Contains("FCreate")) { //Console.WriteLine(DateTime.Now.Hour+":"+DateTime.Now.Minute+":"+DateTime.Now.Second+"."+DateTime.Now.Millisecond + "\t" + s[0] + "\t" + getProcessName(int.Parse(s[1])) + "\t" + s[2]); } } } public void ReportException(Exception InInfo) { Console.WriteLine("The target process has reported an error:\r\n" + InInfo.ToString()); } public void Ping() { } public String getProcessName(int ID) { String name = ""; Process[] process = Process.GetProcesses(); for (int i = 0; i < process.Length; i++) { if (process[i].Id == ID) { name = process[i].ProcessName; } } return name; } public String getRootHive(String hKey) { int r = hKey.CompareTo("2147483648"); int r1 = hKey.CompareTo("2147483649"); int r2 = hKey.CompareTo("2147483650"); int r3 = hKey.CompareTo("2147483651"); int r4 = hKey.CompareTo("2147483653"); if (r == 0) { return "HKEY_CLASSES_ROOT"; } else if (r1 == 0) { return "HKEY_CURRENT_USER"; } else if (r2 == 0) { return "HKEY_LOCAL_MACHINE"; } else if (r3 == 0) { return "HKEY_USERS"; } else if (r4 == 0) { return "HKEY_CURRENT_CONFIG"; } else return hKey.ToString(); } } class Program : System.Windows.Forms.Form { static String ChannelName = null; public static Form1 ff; Program() // ADD THIS CONSTRUCTOR { InitializeComponent(); } static void Main() { try { Config.Register("A FileMon like demo application.", "FileMon.exe", "FileMonInject.dll"); RemoteHooking.IpcCreateServer<FileMonInterface>(ref ChannelName, WellKnownObjectMode.SingleCall); Process[] p = Process.GetProcesses(); for (int i = 0; i < p.Length; i++) { try { RemoteHooking.Inject(p[i].Id, "FileMonInject.dll", "FileMonInject.dll", ChannelName); } catch (Exception e) { } } } catch (Exception ExtInfo) { Console.WriteLine("There was an error while connecting to target:\r\n{0}", ExtInfo.ToString()); } } } }

    Read the article

  • What exactly is SEO friendly site?

    - by Tom
    Hey, So, I've seen web developers writing in their CV that they create "SEO friendly sites. ". Also I heard that Wordpress is SEO friendly site and other CMSs. So, what does SEO friendly site mean? I understand, that titles and URLs are probably the most important things for making good positions in google, but is there any other things which I should know? Thanks

    Read the article

  • click handler after using Ajax

    - by Tom
    I have a site that plays a stream. I perform an AJAX call to the server once a person presses a button. <input type="submit" class="play" data-type="<?php echo $result_cameras[$i]["camera_type"]; ?>" data-hash="<?php echo $result_cameras[$i]["camera_hash"]; ?>" value="<?php echo $result_cameras[$i]["camera_name"]; ?>"> This prints out a bunch of buttons that the user can select. This is processed by the following code: <script> $(document).ready(function(){ $(".play").click(function(){ var camerahash = $(this).data('hash'); var cameratype = $(this).data('type'); function doAjax(){ $.ajax({ url: 'index.php?option=streaming&task=playstream&id_hash=<?php echo $id_hash; ?>&camera_hash='+camerahash+'&format=raw', success: function(data) { if (data == 'Initializing...please wait') { $('#quote p').html(data); setTimeout(doAjax, 2000); } else { if (cameratype == "WEBCAM" && data == 'Stream is ready...') { $('#quote p').html(data); window.location = 'rtsp://<?php echo DEVSTREAMWEB; ?>/<?php echo $session_id;?>/'+camerahash; } else if (cameratype == "AXIS" && data == 'Stream is ready...') { $('#quote p').html(data); window.location = 'rtsp://<?php echo DEVSTREAMIP; ?>/<?php echo $session_id;?>/'+camerahash; } else { $('#quote p').html(data); } } } }); } doAjax(); }); }); </script> The server returns the messages such as Stream is ready.... My problem is that everything is working great except on additional button clicks. Specifically when they get success (video plays) and they exit back out, they don't get any other messages if they click another button. It is as if the click event is not triggered. Do I need to be doing something to the click handler to respond?

    Read the article

  • Cutting down repeating code in c# Class

    - by Tom Gullen
    This is a wrapper for an API I'm working on, am I doing it sort of right? I'm not particularly fond of all the repeating code in the constructor, if someone can show me if I can reduce that it would be very helpful! public class WebWizForumVersion { // Properties of returned data public string Software { get; private set; } public string Version { get; private set; } public string APIVersion { get; private set; } public string Copyright { get; private set; } public string BoardName { get; private set; } public string URL { get; private set; } public string Email { get; private set; } public string Database { get; private set; } public string InstallationID { get; private set; } public bool NewsPad { get; private set; } public string NewsPadURL { get; private set; } public WebWizForumVersion(XmlReader Data) { try { Data.ReadToFollowing("Software"); this.Software = Data.ReadElementContentAsString(); Data.ReadToFollowing("Version"); this.Version = Data.ReadElementContentAsString(); Data.ReadToFollowing("ApiVersion"); this.APIVersion = Data.ReadElementContentAsString(); Data.ReadToFollowing("Copyright"); this.Copyright = Data.ReadElementContentAsString(); Data.ReadToFollowing("BoardName"); this.BoardName = Data.ReadElementContentAsString(); Data.ReadToFollowing("URL"); this.URL = Data.ReadElementContentAsString(); Data.ReadToFollowing("Email"); this.Email = Data.ReadElementContentAsString(); Data.ReadToFollowing("Database"); this.Database = Data.ReadElementContentAsString(); Data.ReadToFollowing("InstallID"); this.InstallationID = Data.ReadElementContentAsString(); Data.ReadToFollowing("NewsPad"); this.NewsPad = bool.Parse(Data.ReadElementContentAsString()); Data.ReadToFollowing("NewsPadURL"); this.NewsPadURL = Data.ReadElementContentAsString(); } catch (Exception e) { } } }

    Read the article

  • Map a property in the entity framework to a different type

    - by Tom
    I have a SQL Server 2008 database. I have a bunch of fields in TableA that are just strings that corresponds to booleans. So every value is either true or false. The edmx I generated using Entity Framework 4.0 has them as strings. This is technically correct but I would like to have them mapped as Booleans instead. Is this possible? If so how can I accomplish this? Thanks much!

    Read the article

  • When is it good to use FTP?

    - by Tom Duckering
    In my experience I see a lot of architecture diagrams which make extensive use of FTP as a medium for linking architectural components. As someone who doesn't make architectural decisions but tends to look at architecture diagrams could anyone explain what the value is of using FTP, where it's appropriate and when transferring data as files is a good idea. I get that there are often legacy systems that just need to work that way - although any historical insight would be interesting too I can see the attraction in transferring files (especially if that's what needs to be transferred) because of the simplicity and familiarity and wonder if the reasoning goes beyond this.

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >