Search Results

Search found 1872 results on 75 pages for 'tom genoni'.

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

  • Any php code to make embed code of video ?

    - by Tom
    Hi, I Want a php code to turn a youtube/dailymotion/vimeo/metacafe... URL into an EMBEDABLE code so i can show it using echo , it is really hard to read the API of every website, so i'm wondering if there is a class or code to do this. Note: if there isn't anyone, then maybe a jQuery facebox alternative who supports more than youtube. Thanks

    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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • Symfony: Web debug toolbar icons disappeared

    - by Tom
    Hi, Just moved a symfony project from local (win) to server (linux), and the icons in the web debug toolbar have disappeared. Only the image alts remain so I guess it's a path issue with the images. Basically, I see "Time 300ms" instead of "[icon] 300ms" for each of the items. I'm a little worried that some other paths aren't broken as well that are going to be a pain to find. Has anyone had/resolved this issue? Thank you.

    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

  • 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

  • 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

  • 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

  • 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

  • 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

  • Setup a git external for remote repo

    - by Tom
    I'd create a repo which pulls in a remote repo, let's say I'd like to setup jQuery as a submodule for example git://github.com/jquery/jquery.git What would be the process of creating a repo with jQuery as a submodule and adding my own external as a remote repo. Also once this is setup, if I push / pull to my own remote, will the external remain intact?

    Read the article

  • Is PKCS#1 V2.0 implemented for Java?

    - by Tom Brito
    I need encrypt data using exactly the PKCS#1 V2.0 encryption method (defined in item 7.2.1 of the PKCS#1V2 specification). Is it already implemented for Java? I'm thinking in something like just pass a parameter to javax.crypto.Cipher specifying "PKCS#1V2", I wonder if there is something like this?

    Read the article

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