Search Results

Search found 2580 results on 104 pages for 'mike mcmaster'.

Page 85/104 | < Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >

  • Problem monitoring directory for file activity in VB.net 2010...

    - by Mike Cialowicz
    I'm trying to write a simple program to monitor a folder for new files in VB.NET 2010, and am having some trouble. Here's a simplified version of what my program looks like: Imports System.IO Public Class Main Public fileWatcher As FileSystemWatcher Sub btnGo_Click(sender As System.Object, e As System.EventArgs) Handles btnGo.Click '//# initialize my FileSystemWatcher to monitor a particular directory for new files fileWatcher = New FileSystemWatcher() fileWatcher.Path = thisIsAValidPath.ToString() fileWatcher.NotifyFilter = NotifyFilters.FileName AddHandler fileWatcher.Created, AddressOf fileCreated fileWatcher.EnableRaisingEvents = True End Sub Private Sub fileCreated(sender As Object, e As FileSystemEventArgs) '//# program does not exit when I comment the line below out txtLatestAddedFilePath.Text = e.FullPath '//# e.FullPath is valid when I set a breakpoint here, but when I step into the next line, the program abruptly halts with no error code that I can see End Sub End Class As you can see, I have a button which will initialize a FileSystemWatcher when clicked. The initialization works, and when I place a new file in the monitored directory, the program reaches the fileCreated sub. I can even see that e.FullPath is set correctly. However, it exits abruptly right after that with no error code (none that I can see, anyways). If I comment everything in the fileCreated sub out, the program continues running as expected. Any ideas as to why it's dying on me? Any help would be greatly appreciated. I'm fairly new to VS/VB.NET, so maybe I'm just making a silly mistake. Thanks!

    Read the article

  • Basic CSS question regarding background images for divs

    - by Mike
    I'm a programmer trying to learn some css and I've already run into a stumbling block. I have the following HTML: <div class="container"> <div class="span-24 last"> Header </div> <div class="span-4"> Left sidebar </div> <div class="span-16"> <div class="span-8"> Box1 </div> <div class="span-4"> Box2 </div> <div class="span-4 last"> Box3 </div> <div class="span-16 last"> Main content </div> </div> <div class="span-4 last"> Right sidebar </div> <div class="span-24 last"> Footer </div> </div> In my css I have the following: body { background-color:#FFFFFF; } div.container { background:url(/images/bck.jpg); } I just want to display an image for the background area for the container div but nothing shows up. If I remove the background section from the css and add background-color:#000000; then I see a black background for the container div. What am I overlooking?

    Read the article

  • strstr and occurrences to match

    - by Mike
    I have several possible occurrences to test with strstr. if ((a = strstr(string, "FOO")) != NULL || (a = strstr(string, "BAR")) != NULL || (a = strstr(string, "FOO2")) != NULL ||(a = strstr(string, "BAR2")) != NULL || (a = strstr(string, "FOO3")) != NULL ||(a = strstr(string, "BAR3")) != NULL) // do something and then based on the occurrence found I need to do var = strlen("THE_ONE_MATCHED_ABOVE"); What would be a good way to do this without using lots of if statements?

    Read the article

  • Adding object to child collection causes entire collection to load in Fluent NHibernate.

    - by Mike C.
    Hello, I have my Parent object, which contains an ICollection of Children objects. The Children are lazy loaded and I do not need them in the context of my scenario. However, when I try to add a new child object to my Children collection, it kicks off the lazy load and loads all 7000 child records. I assume I am making a newbie mistake. Anybody out there know how I can fix this? Thanks!

    Read the article

  • WPF Application with Database.

    - by mike
    Hi, i would like to or need to use a database for my wpf project. It has to store "person" "team" "goals" and maybe 2 more things, nothing very big. Ive already used (worked) with databases in java / php (postgresql), but is there maybe an "easier" way to store the things.. i mean if the db is going to be big than i could use (postgre or mysql), but this one would be small.

    Read the article

  • memcached: which is faster, doing an add (and checking result), or doing a get (and set when returni

    - by Mike Sherov
    The title of this question isn't so clear, but the code and question is straightforward. Let's say I want to show my users an ad once per day. To accomplish this, every time they visit a page on my site, I check to see if a certain memcache key has any data stored on it. If so, don't show an ad. If not, store the value '1' in that key with an expiration of 86400. I can do this 2 ways: //version a $key='OPD_'.date('Ymd').'_'.$type.'_'.$user; if($memcache->get($key)===false){ $memcache->set($key,'1',false,$expire); //show ad } //version b $key='OPD_'.date('Ymd').'_'.$type.'_'.$user; if($memcache->add($key,'1',false,$expire)){ //show ad } Now, it might seem obvious that b is better, it always makes 1 memcache call. However, what is the overhead of "add" vs. "get"? These aren't the real comparisons... and I just made up these numbers, but let's say 1 add ~= 1 set ~= 5 get in terms of effort, and the average user views 5 pages a day: a: (5 get * 1 effort) + (1 set * 5 effort) = 10 units of effort b: (5 add * 5 effort) = 25 units of effort Would it make sense to always do the add call? Is this an unnecessary micro-optimization?

    Read the article

  • GWT Editor: How to set last modified time on the entity when saved?

    - by Mike
    Suppose at client side i have an Entity proxy to edit by the UI and when i click save button, the last modified time is save in the entity as a field. //start MyEntityProxy proxy = getProxy();//fetched from server Request<Void> saveRequest = requestFact.myEntityProxyRequest().save(proxy); editorDriver.edit(proxy, saveRequest.getRequestContext()); editorDriver.flush(); //user modifies UI .... //save editorDriver.flush(); saveRequest.fire(); The problem is, where to insert the proxy.setLastModifiedTime(data) call? I always got java.lang.IllegalStateException: The AutoBean has been frozen. Thanks.

    Read the article

  • C# Int and math not returning full value.

    - by Mike
    Int64 c1 = Convert.ToInt64(csvdeep[1]); Int64 division = 1024; string results = Math.Abs(c1 / division / division / division).ToString(); My c1 is 10201841664 and results is "9". I'd perfer to get the 2nd two decimal places so my real result would be 9.50. Any tips on how I could get the 2 decimal places?

    Read the article

  • Pass off execution to different/specific thread in Java

    - by Mike
    I have about 4 threads. One thread keeps checking some data that the other thread is updating. The others are doing some processing in the background. All have been started at this point. My question is when the checking thread sees that the data has not been updated yet I currently sleep for a little bit but is there any way for me to tell the system to back to executing the thread that does the updating? That or is there any way I can put something like a listener on the data(a String) and once its updated an event will fire that will do what it needs to do? I tried using yield() and it seemed to just keep returning to the thread I called yield() from. Thanks

    Read the article

  • break up recursive function in php

    - by Mike
    What is the best way to break up a recursive function that is using a ton of resources For example: function do_a_lot(){ //a lot of code and processing is done here //it takes a lot of execution time if($true){ //if true we have to do all of that processing again do_a_lot(); } } Is there anyway to make the server only have to take the brunt of the first execution and then break up the recursion into separate processes? Or am I dreaming?

    Read the article

  • Fickle IE Issues with Height:100%'

    - by Mike R
    I am trying to set the height to 100% in the viewport for Internet Explorer. As you might imagine, the following code works everywhere else: * { margin: 0; padding: 0; } html, body { height: 100%; } body { font-family: Times New Roman, Times, serif; font-size: 13px; background-color:#E8E8E8; background:url(/images/background.png) repeat-x; } #wrap { margin:0 auto; width: 935px; /* Change to desired width :) */ min-height: 100%; background:url(/images/content.png)repeat-y; } #main { overflow: auto; padding-bottom: 112px; } /* must be same height as the footer */

    Read the article

  • Why are button sizes on Eclipse vs Device not the same.

    - by Mike Droid
    O.k....this is weird. I had my buttons looking fine last week, now something has changed. My buttons on the eclipse emulator are much larger than on my device (Droid 2.1). I checked my skin settings, screen size permissions, density factors....what am I missing? My skin is set to WVGA854, but when the app goes to the phone the buttons are smaller!? Text and pictures are fine...looking the same as the emulator...just the buttons are shrunk! Hmm....I know it has to be something simple...:)

    Read the article

  • VS 2010 SQL Update for SQL Statement

    - by Mike Tucker
    Please bear with me as I'm just beginning to learn this stuff. I have a VS 2010 Web project up and I'm trying to understand how I can make a custom UpdateCommand (Because I chose to write my own SQL statement, I do not have the option for VS 2010 to auto generate an update command for me.) Problem is: I don't know what the UpdateCommand should look like. Here is my Select: SELECT * FROM Dbo.MainAsset, dbo.Model, dbo.Hardware WHERE MainAsset.device = Hardware.DeviceID AND MainAsset.model = Model.DeviceID Which, VS 2010 turns into: SELECT MainAsset.pk, MainAsset.img, MainAsset.device, MainAsset.model, MainAsset.os, MainAsset.asset, MainAsset.serial, MainAsset.inyear, MainAsset.expyear, MainAsset.site, MainAsset.room, MainAsset.teacher, MainAsset.FirstName, MainAsset.LastName, MainAsset.Notes, MainAsset.Dept, MainAsset.AccountingCode, Model.Model AS Hardware, Model.pk AS Model, Model.DeviceID, Hardware.Computer, Hardware.pk AS Expr3, Hardware.DeviceID AS Expr4 FROM MainAsset INNER JOIN Hardware ON MainAsset.device = Hardware.DeviceID INNER JOIN Model ON MainAsset.model = Model.DeviceID How would I approach updating one column, say "MainAsset.site" if that's changed in the Gridview DDL? Any help constructive help would be appreciated. Thank you.

    Read the article

  • AFTER INVOKE_APPLICATION(5) is being skipped in my h:datatable

    - by Mike
    hi! i have this code: <h:form> <rich:dataTable value="#{my.lreqs}" var="req" id="reqs" width="630px" > <rich:column label="Value" styleClass="schColL" width="90px" style="text-align:center"> <f:facet name="header"> <h:outputText value="#{my.colValue}" /> </f:facet> <h:inputText value="#{req.value}" > </h:inputText> </rich:column> </rich:dataTable> <h:commandButton value="Save" action="#{my.saveChanges}" ></h:commandButton> </h:form> and this is my bean: private List<Detail> lreqs; public List<Detail> getLreqs() { return lreqs; } public void setLreqs(List<Detail> lreqs) { this.lreqs = lreqs; } but when i click save - a new value in req.value field is not being saved! i added phaseTracker and realised that my AFTER INVOKE_APPLICATION(5). why is it?

    Read the article

  • How do I create substrings from an array using PHP?

    - by mike
    I have an array of data that looks like this: 2008, Honda, Accord, Used, Car And I'm trying to figure a way to make a number of sub strings from each item in the array. For example, I would like to loop each item and create the following substrings: 2008 2008 Honda 2008 Accord 2008 Used 2008 Car 2008 Honda Accord 2008 Honda Used 2008 Honda Car 2008 Accord Honda 2008 Accord Used 2008 Accord Car 2008 Used Honda 2008 Used Accord 2008 Used Car 2008 Car Honda 2008 Car Accord 2008 Car Used Honda Honda 2008 Honda Accord Honda Used Honda Car Honda 2008 Accord Honda 2008 Used etc ... I need to make sure that there are no duplicates created and I need to prevent it from adding the same word twice (ex: Honda Honda OR 2008 Honda 2008 - i dont want that). Has anyone wrote anything like this or know where I can find a script that works the same way?

    Read the article

  • How to "grep" out specific line ranges of a file

    - by Mike
    There are often times I'll grep -l whatev file to find what I'm looking for. Say the output is 1234: whatev 1 5555: whatev 2 6643: whatev 3 If I want to then just extract the lines between 1234 and 5555, is there a tool to do that? For static files I have a script that does wc -l of the file and then does the math to split it out with tail & head but that doesn't work out so well with log files that are constantly being written to.

    Read the article

  • Returning binomal as a tuple

    - by Mike
    I want to save the results of my function binomal_aux to a tuple but I don't have an idea how to, here is my code I have right now. def binomal (n): i=0 for i in range(n): binomal_aux(n,i) #want this to be in a tuple so, binomal (2) = (1,2,1) return def binomal_aux (n,k): if (k==0): return 1 elif (n==k): return 1 else: return (binomal_aux(n-1,k) + binomal_aux(n-1,k-1))

    Read the article

  • Array/List/Directory of System.Type

    - by Mike
    I have a lot of classes and want to create some kind of 'directory'. So that I can create menus automatically. Clicking a menu-item would then create an instance of the class and shows the window. What I want for this is an array of System.Type where I can stuff in all the classes without instantiating them. Though from my test and (unsuccessful) googling, this doesn't seem possible. Any ideas?

    Read the article

  • Syncing objects between two devices with different system times

    - by Mike Weller
    Hi there. I'm syncing objects between two devices. Objects have a lastModified property. If both devices have modified an object, then during the next sync the version of the object with the most recent lastModified is chosen on both devices. So we don't do fine-grained merging, only 'most recent version' merging. The problem is this. When one device receives a list of changed objects it can't reliably compare the lastModified of received objects to its own because the system times on the two devices may be different. I considered having each device send its current date/time during the sync. Then each calculates the difference between the remote time and the local time to compare the dates properly. But if there is lag between sending a date and the remote device receiving it, this causes incorrect comparisons with objects that were modified at the same time (or very close together in time). i.e. both devices think the remote object is newer and they end up with different objects. I hope I have explained this clearly enough. There must be a common solution to this kind of problem but my brain isn't coming up with anything. Any suggestions? Thanks in advance...

    Read the article

  • Community based translating system

    - by mike
    Since we don't funds to hire translators for getting multiple languages translated we want the community to do the translation for us. Its a social network. I can't find any good open souce framework to auto do this. Thinking something like: User selects a language, system displays random sentences and user will translate it. Then other users can vote on how good it is. If it's 100 votes + with 95% yes then it becomes official. Site is in PHP. Any ideas?

    Read the article

  • Why is Harvest being purchased at all?

    - by Mike Caron
    Does your work environment use Harvest SCM? I've used this now at two different locations and find it appalling. In one situation I wrote a conversion script so I could use CVS locally and then daily import changes to the Harvest system while I was sleeping. The corp was fanatic about using Harvest, despite 80% of the programmers crying for something different. It was needlessly complicated, slow and heavy. It is now a job requirement for me that Harvest is not in use where I work. Has anyone else used Harvest before? What's your experience? As bad as mine? Did you employ other, different workarounds? Why is this product still purchased today?

    Read the article

< Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >