Daily Archives

Articles indexed Saturday May 29 2010

Page 21/76 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • multiple FileSystemWatchers to monitor files on local system?

    - by Jason Crowes
    We're writing a text editor like tool for our internal accounting package system that has actions that can be done by our own Xml language specs. These macro commands are specified in Xml files and we need the ability to monitor if files openned have bean modified externally. The only problem is that there maybe 20-30 files with different paths openned at any one time. Would it be good to use multiple FileSystemWatchers for this scenario? Or would it be better to monitor the root drive and catch specific events that match an open file in the editor (though lots of events could be raised). Some are local drives (C,D,E) others are their network drives (U,X,G,H). Files are quite chunky too about 300-400Kb.

    Read the article

  • Retrieve remote XML data with PHP

    - by rrrfusco
    I'm currently reading a regularly updated XML file with PHP (simpleXML). I'd like to reduce calls to the remote server by reading a cache file on my web server, then after some time, retrieving a new copy of the remote file. Is this an accepted practice for reading remote XML files, then parsing? Can anyone offer some suggestions on how to go about this in PHP, or perhaps there are some PEAR classes that deal with this?

    Read the article

  • Saving integers as Strings in MIPS

    - by Krewie
    Hello , i was just wondering, is there any way in MIPS to store a summation of numbers as a string and later read them byte by byte, for example: the sum 657 - sw into a .ascii directive - later lb on the first index to get 6 (in ascii code) same with 5 and so on Is this possible ? //Thx in advance

    Read the article

  • Get a list of documents from Mongo DB

    - by Andrei Neagu
    Hello, I want to do something like this: List<int> fff = new List<int>(); fff.Add(1); fff.Add(2); fff.Add(5); Mongo m = new Mongo(); m.Connect(); var dataBase = m.GetDatabase("database"); var collection = dataBase.GetCollection("coll"); IMongoQuery queryable = collection.AsQueryable(); MongoQueryProvider prov = new MongoQueryProvider(collection); var query = new MongoQuery(prov); var ffppp = from p221 in query where fff.Contains((int)p221["oid"]) select p221; This throws this error : The method 'Contains' could not be converted into a constant. I saw that mongo has an operator $in. Does any one know how can I use it from c#? (http://www.mongodb.org/display/DOCS/Advanced+Queries) Thanks

    Read the article

  • Debugging Connection Issues Between Two Linux Servers

    - by clickfault
    I have two CentOS 5 servers running iptables and apf. I am having issues connecting with ssh from server 1 to server 2. I can connect from server 1 to a third server and from that third server to both 1 and 2. In all cases I am using the IP address and not a host name. I have stopped iptables and apf on all servers and it doesn't seem to change anything. What is the best way to debug this process?

    Read the article

  • How do CSS sprites work?

    - by Rachel
    I have 3 different images and want to create a sprite using CSS. I understand that will reduce HTTP requests. However, I am totally new to this concept and have no idea as to how to approach this. What would be best bet for me? Also I have seen there are some CSS sprite generators where you submit a .zip of images and it combines them. I tried doing that, but did not understood what was happening. Any guidance regarding creating and using CSS sprites would be highly appreciated. Update: I have gone through the A List Part article but it was not very clear to me. Can someone provide an example of using a CSS sprite? [A short, self-contained example in an answer is preferable for SO than just a link to an example elsewhere. –ed.]

    Read the article

  • using a batch file, how can i delete all files not in the windows dir?

    - by simondo
    i have a litle project for which i would like to remove all files outside of and not needed by the c:\windows operating system. therefore i need to create a list of what i want to keep i.e. boot.ini c:\windows etc and then delete everything else. i have seen examples using forFile, but i can be sure that extension will be on the machine. does anyone have any ideas how i can create the exclude list and then do the delete?

    Read the article

  • How to replace values in multi-valued ESE column?

    - by Soonts
    I have a multi-valued short ASCII text column in one of the tables in my ESE database, that holds the person's phone numbers. I have the new set of values, and I'd like to wipe the old values completely, and only use the new values. The JET_bitSetRevertToDefaultValue bit doesn't seem to work. While the MSDN documentation says "It causes the column to return the default column value on subsequent retrieve column operations. All existing column values are removed.", I found that it does nothing (no return value is returned). Or, is there an easy way to find out how many values does the column contain (this could be zero, e.g. when I'm doing an insertion, not update)? If it was, I could just run a loop from 'nValues' to 1, erasing the value by setting it to the null while providing the itagSequence value, to achieve what I want. I'm programming C#, and using the latest version of ManagedEsent library. Thanks in advance!

    Read the article

  • Customers and suppliers database design issue

    - by hectorsq
    I am developing a web application in which I will have customers and suppliers. Initially I thought on using a Customers table and a Suppliers table. Then when I was thinking on bank transactions, I noticed that each transaction needs to refer to a customer or a supplier, so I thought on using a single table named Business in which I will save both customers and suppliers. If I use Customers and Suppliers tables when I want to list the bank transactions I will have to search in both tables to get the company name. If I use a Businesses table I will have to use a business type column, and have the union of possible fields for all businesses types. Any suggestions on the design?

    Read the article

  • ActionScript Tween Yoyo Stops!

    - by TheDarkIn1978
    i want my tween to yoyo until the program is closed, but for some reason my tween is only "yoyoed" about 10 times before it just stops. is this normal? var myTween:Tween = new Tween(boxSprite, "alpha", Regular.easeInOut, 1, 0.25, 1, true); myTween.addEventListener(TweenEvent.MOTION_FINISH, yoyo, false, 0, true); function yoyo(evt:TweenEvent):void { evt.target.yoyo(); }

    Read the article

  • Android: Using MediaRecorder to crop an existing audio file?

    - by user141146
    Hi, I'd like to take an existing mp3 file located on an SD card and arbitrarily crop it (e.g. crop from 0:12 to 1:14 in a 3 minute song). The only class that I've seen that seems remotely relevant to do this is the MediaRecorder class. My 'hope' would be to "record" an existing file like this: MediaRecorder recorder = new MediaRecorder(); recorder.setAudioSource(###some magical way of specifying an existing file??###); But this obviously doesn't work (setAudioSource() takes an int and seems to default to the phone's microphone). Is there a class or an approach that can be used to crop audio on the phone itself? TKS!!

    Read the article

  • iphone getting hours/min/seconds app crashes.

    - by coure06
    i have this code in my overridden drawRect method NSDate *date = [NSDate date]; NSCalendar *calendar = [NSCalendar currentCalendar]; unsigned int unitFlags = NSHourCalendarUnit|NSMinuteCalendarUnit|NSSecondCalendarUnit; NSDateComponents *comp = [calendar components:unitFlags fromDate:date]; NSInteger h = [comp hour]; NSInteger m = [comp minute]; NSInteger s = [comp second]; NSLog(@"%i,%i,%i", h,m,s); NSLog(@"test"); [date release]; [calendar release]; [comp release]; I am calling drawRect using setNeedsDisplay from my custom method (timer based after each 1 secon). It runs only once and then app exit automatically. If i comment out all the code and just write NSLog(@"test"); then application works ok, it logs "test" after each 1 sec.

    Read the article

  • Will IntelliTrace(tm) (historical debugging) be available for unmanaged c++ in future versions of Vi

    - by Tim
    I love the idea of historical debugging in VS 2010. However, I am really disappointed that unmanaged C++ is left out. IntelliTrace supports debugging Visual Basic and C# applications that use .NET version 2.0, 3.0, 3.5, or 4. You can debug most applications, including applications that were created by using ASP.NET, Windows Forms, WPF, Windows Workflow, and WCF. IntelliTrace does not support debugging C++, script, or other languages. Debugging of F# applications is supported on an experimental basis. (editorial) [This is really poor support in my opinion. .NET is less in need of this assistance than unmanaged c++. I an getting a little tired of the status of plain old C++ and its second-class status in the MS tools world. Yes, I realize it is probably WAAY easier to implement this with .NET and MS are pushing .NET as the future, and yes, I know that C++ is an "old" language, but that does not diminish the fact that there are lots of C++ apps out there and there will continue to be more apps built with C++. I sincerely hope MS has not dropped C++ as a supported developer tool/language- that would be a shame.] Does anyone know if there are plans for it to support C++?

    Read the article

  • How have your coding values changed since graduating?

    - by Matt
    We all walked out of school with the stars in our eyes and little experience in "real-world" programming. How have your opinions on programming as a craft changed since you've gained more experience away from academia? I've become more and more about design a la McConnell : wide use of encapsulation, quality code that gives you warm fuzzy feelings when you read it, maintainability over execution performance, etc..., whereas many of my co-workers have followed a different path of fewer middlemen layers getting in the way, code that is right out in the open and easier to locate, even if harder to read, and performance-centric designs. What have you learned about the craft of software design which has changed the way you approach coding since leaving the academic world?

    Read the article

  • How can I make named_scope in Rails return one value instead of an array?

    - by sameera207
    I want to write a [named scope] to get a record from its id. For example, I have a model called Event, and I want to simulate Event.find(id) with use of named_scope for future flexibility. I used this code in my model: named_scope :from_id, lambda { |id| {:conditions => ['id= ?', id] } } and I call it from my controller like Event.from_id(id). But my problem is that it returns an array of Event objects instead of just one object. Thus if I want to get event name, I have to write event = Event.from_id(id) event[0].name while what I want is event = Event.from_id(id) event.name Am I doing something wrong here?

    Read the article

  • How to retain focus on an editable html after deleting an element.

    - by Lukasz
    Hello, I have a website with design mode on (aka. content editable = true) with some basic text on it. To that site I hooked up a shortcut so that at any point in the text I can insert an input box that serves me as an autocomplete. For that input however I want it to disappear right after I hit ENTER so that I can continue typing. It is an easy task to just make the input box disappear but I always loose focus from my document. I would greatly appreciate any suggestions on how to make this work?

    Read the article

  • making links with out anchor tag using dojo

    - by vetri
    I have a image with link <div id="img"><a href="src/blah.html"><img src="/src/img.png"/></a></div> but i don't wanna use tag for linking.the page has multiple entries like this in a page as it is being populated for a search result.Some 10 or more entries will be there in a page.its all inside a <div id="result"></div> have an idea for doing it dojo.help me finish that function(){ dojo.query('.Result').forEach(function(item){ try{ var href = dojo.query('.img',item)[0] //do things dojo.connect(Node,'onclick',dojo.hitch(this,function(){ window.location = location; }));

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >