Daily Archives

Articles indexed Sunday April 18 2010

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

  • Why doesn't interface inheritance work when writing shell extensions in c#?

    - by Factor Mystic
    According to this article about writing shell extensions in .Net, inheriting the shell interfaces as you might naturally do when writing code doesn't work. I've observed this in my own code as well. Doesn't work: public interface IPersist { // stuff specific only to IPersist } public interface IPersistFolder : IPersist { // stuff specific only to IPersistFolder } Does work: public interface IPersistFolder { // stuff specific to IPersist only // stuff specific to IPersistFolder only } The article notes this fact: Lo and behold, it worked! Notice that I've abandoned any idea that IPersistFolder is inherited from anything at all and just included the stubs from IPersist right in its definition. In all candor, I can't tell you why this is but it definitely works just fine and shouldn't give you any problems. So my I'll ask the question this guy didn't know; why didn't the original code work?

    Read the article

  • Embedding swank-clojure in java program

    - by user237417
    Based on the Embedding section of http://github.com/technomancy/swank-clojure, I'm using the following to test it out. Is there a better way to do this that doesn't use Compiler? Is there a way to programmatically stop swank? It seems start-repl takes control of the thread. What would be a good way to spawn off another thread for it and be able to kill that thread programatically. import clojure.lang.Compiler; import java.io.StringReader; public class Embed { public static void main(String[] args) throws Exception { final String startSwankScript = "(ns my-app\n" + " (:use [swank.swank :as swank]))\n" + "(swank/start-repl) "; Compiler.load(new StringReader(startSwankScript)); } } Any help much appreciated, hhh

    Read the article

  • how to 'scale' these three tables?

    - by iddqd
    I have the following Tables: Players id playerName Weapons id type otherData Weapons2Player id playersID_reference weaponsID_reference That was nice and simple. Now I need to SELECT items from the Weapons table, according to some of their characteristics that i previously just packed into the otherData column (since it was only needed on the client side). The problem is, that the types have varying characteristics - but also a lot of similar data. So I'm trying to decide on the following possibilities, all of which have their pros and cons. Solution A Kill the Weapons table, and create a new table for each Weapon-Type: Weapons_Swords id bladeType damage otherData Weapons_Guns id accuracy damage ammoType otherData But how will i Link these to the Players ? create Weapons_Swords2Players, Weapons_Guns2Players for each weapon-type? (Will result in a lot more JOINS when loading the player with all his weapons...and it's also more complicated to insert a new player) or add another column to Weapons2Players called WeaponsTypeTable, then do sub-selects to the correct Weapons sub-table (seems easier, but not really right, slightly easier insert i guess) Solution B Keep the Weapons table, and add all the fields i need to it. The Problem is that then there will be NULL fields, since not all Weapon-Types use all fields (can't be right) Weapons id type accuracy damage ammoType bladeType otherData This seems to be pretty basic stuff, but i just can't decide what's best. Or is there a correct Solution C? many thanks.

    Read the article

  • Any way to get read timeouts with Java NIO/selectors?

    - by mmebane
    I'm converting a Java server application which used blocking IO and thread-per-client to NIO and a single IO thread (probably a thread pool after I get the basic implementation done). The one thing I am having an issue with is disconnecting clients after they have been idle for a period. I had previously been using SO_TIMEOUT and blocking reads. However, with selector-based IO, reads don't block... I was hoping that I'd be able to set a timeout and be able to select on read timeout, with something like SelectionKey.isReadTimeout(), but nothing like that seems to exist. The current best solution I have come up with is to have a Timer with a TimerTask which keeps track of the keys which are waiting on read, and then canceling them and re-scheduling them on each read. Is there a better solution?

    Read the article

  • MKV to M2TS muxer for Snow Leopard

    - by Creepy Gnome
    I currently use the tsMuxeR for Windows within a VM on my Mac to mux MKV to M2TS to play on my PS3. tsMuxeR currently doesn't have a version that works with Snow Leopard, and I have not had any luck finding a native Mac application that will run on Snow Leopard that can do what tsMuxeR can. Does anyone know of a Snow Leopard compatible application that can mux MKV to M2TS?

    Read the article

  • Is it reasonable to use my Time Machine backup to migrate to a new primary hard drive?

    - by Michael Haren
    I'm planning to upgrade my MacBook's harddrive. I already use Time Machine to back up the system to an external drive. Is it reasonable to use Time Machine to restore my system to the new laptop drive, once I install it? I mean, a restore like this really ought to be fine, right? That's the point of it, after all! I know imaging the drive would be more appropriate but this plan seems a whole lot easier (albeit probably slower), with practically no risk since my original drive won't be involved. A second question would then be, are there any considerations to be made when doing a Time Machine restore?

    Read the article

  • Jquery datepicker localization

    - by Shipow
    I need a french calendar and I can't understand the problem. I guess i'm not using the regional options like it should be. But... Here is my code : $(function() { $('#Date').datepicker({ showMonthAfterYear: false, showOn: 'both', buttonImage: 'media/img/calendar.png', buttonImageOnly: true, dateFormat:'d MM, y' }, $.datepicker.regional['fr'] ); });

    Read the article

  • Isn't an Iterator in c++ a kind of a pointer?

    - by Bilthon
    Ok this time I decided to make a list using the STL. I need to create a dedicated TCP socket for each client. So everytime I've got a connection, I instantiate a socket and add a pointer to it on a list. list<MyTcp*> SocketList; //This is the list of pointers to sockets list<MyTcp*>::iterator it; //An iterator to the list of pointers to TCP sockets. Putting a new pointer to a socket was easy, but now every time the connection ends I should disconnect the socket and delete the pointer so I don't get a huge memory leak, right? well.. I thought I was doing ok by setting this: it=SocketList.begin(); while( it != SocketList.end() ){ if((*it)->getClientId() == id){ pSocket = it; // <-------------- compiler complains at this line SocketList.remove(pSocket); pSocket->Disconnect(); delete pSocket; break; } } But the compiler is saying this: error: invalid cast from type ‘std::_List_iterator<MyTcp*>’ to type ‘MyTcp*’ Can someone help me here? i thought I was doing things right, isn't an iterator at any given time just pointing to one of the elements of the set? how can I fix it?

    Read the article

  • Free Testing / Code Coverage systems for C++

    - by Billy ONeal
    I'd like to start using a Test Driven Development system for a private project since I saw my employer using it and realized it was very useful. My employer's project was in C# but mines are in C and C++. I looked around and saw that several packages exist for both Java and .NET (for example: NCover, NUnit, ...). Unfortunately I found it difficult to find good C++ testing frameworks. Do you know of any unit testing frameworks that satisfy the following requirements? IMPORTANT: Must provide code coverage statistics, as I'd like to have some idea of how well my tests cover my code-base. Must be free Usable with C++ projects EDIT: To be clear, I know of many existing unit test frameworks. The code coverage piece is what's most important.

    Read the article

  • Loop through all cells in Xceed DataGrid for WPF?

    - by ewall
    I am changing the background color of the cells when the user has made an edit. I would like to return all cells to normal colors when the changes are saved (or reverted). It's easy enough to set the cell's original background color (as stored in the parent row). But I can't figure out how to loop through all the cells in the table to reset them. I found an article in the Xceed Knowledge Base called "How to iterate through the grid's rows"... which you would think would be perfect, right? Wrong; the properties (or methods) like .DataRows, .FixedHeaderRows, etc. mentioned in the article are from an older/defunct Xceed product. This forum thread recommends using the DataGrid's .Items property, which in my case returns a collection of System.Data.DataRowViews... but I can't find any way to cast that (or any of its related elements) up to the Xceed.Wpf.DataGrid.DataCells I need to change the background color. In short, how do I loop through the rows and cells so I can reset the background property?

    Read the article

  • send xmpp <message> to component on other domain

    - by cometta
    step 1:on the same domain(.myserver.kicks-ass.net), i able to send to the mycomponent,succesfully. step 2:when i login to other domain ,example gmail.com and try send to another user on [email protected], success as well. step 3:just like step2, but i send the to mycomponent.myserver.kicks-ass.net , i get below error <message xmlns='jabber:client' to='mycomponent.myserver.kicks-ass.net' from='[email protected]/123' type='chat'> <body> just t4st </body> <x xmlns='jabber:x:event'> <offline/> <composing/> </x> </message> <message xmlns='jabber:client' to='[email protected]/123' from='mycomponent.myserver.kicks-ass.net' type='error'> <body> just t4st </body> <x xmlns='jabber:x:event'> <offline/> <composing/> </x> <error code='404' type='cancel'> <remote-server-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> </error> </message>

    Read the article

  • Creating an Underwater Scene in Blender- Part 3

    <b>Packt:</b> "From the point we started our scene, we haven't tried any test renders yet to see how our underwater environment looks and I know you're all so eager to try and press that RENDER button (so am I), but let's make sure that we don't waste a second of our time by rendering something that's not worth the button press at all."

    Read the article

  • Game Guide to Purchasing Items in Fish Isle

    There are many things you can purchase in Fish Isle like decorations, buildings, trees, and animals. This Fish Isle guide will show you how to purchase items, but it will also show you how to do thin... [Author: Jake Clark - Computers and Internet - April 17, 2010]

    Read the article

  • android: how to specify multipe listivews

    - by Yang
    It seems that android has enforced that a listview must have the name android:id="@android:id/list", is there anyway to create multiple listview then? I have two activities which are both listview but have to control different format of Lists, one with image+text the other is just text.

    Read the article

  • How to parse bbcodes safely?

    - by Emily
    I'm trying to parse BBcodes in php but i don't think my code is safe at all. $Text = preg_replace("(\[color=(.+?)\](.+?)\[\/color\])is","<span style=\"color: $1\">$2</span>",$Text); I think you can pass an injection like this and it will work: [color=<script>alert('gotcha');</script>] How to improve my regex to only capture the two standar color formats: [color=red] OR [color=#FF0000] Thanks

    Read the article

  • How to read values from Gridview columns controls in WPF

    - by Sarat
    hi frnds, I am using a WPF application, in which i placed a listview control which has 3 gridview columns. First Gridview column has a label Control and the remaining 2 gridview columns has textbox control. Now my problem is if the user enters a value in the first Gridview textbox column, the second gridview textbox column should be updated with some value. Is there any way to do that. I am filling the list view with a datatable from code behind file. And also is there any way to get the value of the label control in the 1st gridview column. Thanks in advance urs Frnd :)

    Read the article

  • Error launching external scanner info generator (sh -c 'g++ -E -P -v -dD )

    - by kranthikumar
    Error launching external scanner info generator (sh -c 'g++ -E -P -v -dD ) (Cannot run program "make": Launching failed) More precisely, the error messages are: Error Launching external scanner info generator - gcc link problem on MingGW Error launching external scanner info generator (sh -c 'g++ -E -P -v -dD C:/Documents and Settings/user1/workspace123/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp ') Error launching external scanner info generator (sh -c 'gcc -E -P -v -dD C:/Documents and Settings/user1/workspace123/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c ') This problem is occurring in eclipse-SDK-3.2.2-win32 with CDT. Can anyone solve this problem? Did anyone have any solution to this problem? Please help to me to solve this problem . Yours faithfully. Anilkumar.k

    Read the article

  • How to Not Submit a Form Using AJAXToolkit AutoComplete Extender?

    - by deepss
    Hi I have used AJAXToolkit AutoComplete extender in my project.It works fines.But the issue is with the form of the page. when i type in the AutoComplete, i get list of suggestions.When i click on the page other than the Autocomplete, the form gets submitted. any suggestions how to stop submission of entire form whenever i click on the page?I use .net 2.0

    Read the article

  • numeric cycles in shell

    - by oraz
    hello, what is the name and sintacsys of construcion ((..)) in example below? for ((i=1;i<10;i++)) do echo $i; done it has strange variable i where are other constructons for numeric cycling in shell?

    Read the article

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