Search Results

Search found 4250 results on 170 pages for 'mark underwood'.

Page 80/170 | < Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >

  • Stop overlooking minor details

    - by Mark Lubin
    Compared to most people on this site I am admittedly a novice. I wanted to get some advice from the pros on how to avoid making stupid errors in your code. Is there anyone else who had the problem when they were first starting out of missing some detail that causes big problems? Are there any habits or behaviors that helped you over come this.

    Read the article

  • How to generate distinct random numbers per distinct threads in .NET?

    - by mark
    Dear ladies and sirs. I have to generate 19 bit random numbers. However, there is a constraint - two threads may not generate the same random number when running certain code. The simplest solution is lock the entire code. However, I would like to know if there is a non locking solution. I thought, I can incorporate ManagedThreadId within the produced random numbers, but the ManagedThreadId documentation on the Internet mentions that it may span the whole Int32 range. Unmanaged thread id seems to be limited to 11 bits, still this leaves me with just 8 truly random bits. Are there any other ways? Somehow to utilize the Thread Local Storage, may be? Thanks.

    Read the article

  • What is the best way to implement a callback scenario using WCF and ASP.NET MVC?

    - by Mark Struzinski
    I am new to WCF. I just finished reading Learning WCF and I think I've got a pretty good grasp of the fundamentals. I am adding functionality to a line of business app that runs on ASP.NET MVC entirely inside the corporate LAN. I am calling into a service that will also send me events as they occur (and not as responses to service calls). These events can occur at any point during the user's session. I have the service written, and it is able to pick up these events. What would be the best way to deliver these events to the user? My initial thought is to run the WCF service in duplex mode over net TCP and implement the events as callbacks. Using this scenario, the best way I can think up to deliver the events to the user is a dictionary object stored in the session. The dictionary would be populated by the callbacks and polled on a set frequency for delivery via AJAX calls. Has anyone dealt with this scenario? Is there a more efficient way to implement this?

    Read the article

  • Open URL with Safari no matter what system browser is set to

    - by Mark
    In my objective-c program, I need to open a URL in Safari no matter what the system's default browser is. That means that this won't work, because it could launch Firefox or whatever other browser: NSWorkspace * ws = [NSWorkspace sharedWorkspace]; [ws openURL: url]; I think I'm close with this: [ws launchAppWithBundleIdentifier: @"com.apple.Safari" options: NSWorkspaceLaunchWithoutActivation additionalEventParamDescriptor: NULL launchIdentifier: nil]; only need to figure out how to pass in the URL as parameter... Is there an easier way? Thanks!

    Read the article

  • What is wrong with this php loop?

    - by Mark R
    I made a loop but it doesn't work. here's what I did: <?php if(is_tree('4')) { ?> <?php $show_after_p = 2; $content = apply_filters('the_content', $post->post_content); if(substr_count($content, '<p>') > $show_after_p) { $contents = explode("</p>", $content); $p_count = 1; foreach($contents as $content) { echo $content; if($p_count == $show_after_p) { ?> YOUR AD CODE GOES HERE < ? } echo "</p>"; $p_count++; } } ?> <?php else : ?> <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?> <?php endif; } ?> I need to make it work but don't know how. I'm guessing it's a simple syntax error I'm not seeing?

    Read the article

  • Is it possible to easily modify the log4net section in the config file of several running applicatio

    - by mark
    Dear ladies and sirs. Our product consists of client, server and agents. Each deployed on different machines. The QA is having a hard time to manipulate the log4net sections in the respective config files. Right now, they have to have remote desktops to all the relevant machines and open notepad in each of them and then edit the files one at a time switching between different machines as they proceed. A real pain in the ass. Can anyone suggest a better solution to this problem? Thanks.

    Read the article

  • Detect a tag in hook-script SVN

    - by Mark
    Is there a way that I can detect a tag/branch in SVN? Could I find out where the commits destination is? I want to check that all externals are set to a specific version of the folder they are pointing to, I don't want to prevent commits to a tag with this script. I am writing the script with the c-pyhton bindings.

    Read the article

  • Can I change an NSDictionaries key?

    - by Mark Reid
    I have an NSDictionary object that is populated by NSMutableStrings for its keys and objects. I have been able to change the key by changing the original NSMutableString with the setString: method. They key however remains the same regardless of the contents of the string used to set the key initially. My question is, is the key protected from being changed meaning it will always be the same unless I remove it and add another to the dictionary? Thanks.

    Read the article

  • Read data from an Android USB attachment

    - by Mark
    Is there anyway to read data from an attachment through the USB port on an Android device? In particular, an EKG. Most the work can be done by the hardware of the device to simplify the output to a single number, a voltage reading. If its not possible, what about modifying an accessory that can already communicate with an android device? Thinking of devices that attach to android phones, what about sending the data as an audio signal to be read as the microphone from a headset and then analyzing the audio signal to convert it to a number that can be used to display a value. Any ideas on how to make this work?

    Read the article

  • Adding Timestamp to Java's GC messages in Tomcat 6

    - by ripper234
    I turned on Java's GC log options -XX:+PrintGC -XX:+PrintGCTimeStamps -XX:+PrintGCDetails Which print out these messages to standard output (catalina.out): 314.884: [CMS-concurrent-mark-start] 315.014: [CMS-concurrent-mark: 0.129/0.129 secs] [Times: user=0.14 sys=0.00, real=0.13 secs] 315.014: [CMS-concurrent-preclean-start] 315.016: [CMS-concurrent-preclean: 0.003/0.003 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 315.016: [CMS-concurrent-abortable-preclean-start] 332.055: [GC 332.055: [ParNew: 17128K->84K(19136K), 0.0017700 secs] 88000K->70956K(522176K) icms_dc=4 , 0.0018660 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] CMS: abort preclean due to time 352.253: [CMS-concurrent-abortable-preclean: 0.023/37.237 secs] [Times: user=0.78 sys=0.02, real=37.23 secs] How can I make these log lines appear with an actual timestamp (including date) instead of these numbers, which presumably mean "time since JVM started" ?

    Read the article

  • OnClickListener - x,y location of event?

    - by Mark
    Hi, I have a custom view derived from View. I'd like to be notified when the view is clicked, and the x,y location of where the click happened. Same for long-clicks. Looks like to do this, I need to override onTouchEvent(). Is there no way to get the x,y location of the event from an OnClickListener instead though? If not, what's a good way of telling if a motion event is a 'real' click vs a long-click etc? The onTouchEvent generates many events in rapid succession etc. Thanks

    Read the article

  • Oracle: how to UPSERT (update or insert into a table?)

    - by Mark Harrison
    The UPSERT operation either updates or inserts a row in a table, depending if the table already has a row that matches the data: if table t has a row exists that has key X: update t set mystuff... where mykey=X else insert into t mystuff... Since Oracle doesn't have a specific UPSERT statement, what's the best way to do this?

    Read the article

  • I've built a Windows service as "Any CPU". Why does it run in 32-bit mode on my 64 bit machine?

    - by Mark
    I've built a Windows service as "Any CPU". However, when I run it on my 64 bit machine it runs in 32 bit. How can I fix it? I'm using .NET and C#, and my operating system is Windows 2008 R2. If I build it in x64 it correctly loads in 64 bit mode. However, "Any Cpu" -- which is what I want -- loads in 32 bit, even though the machine it's running on perfectly supports 64 bit. Thanks for any help.

    Read the article

  • How to convert from base-256 to base-N, where N is higher than 16?

    - by mark
    Dear ladies and sirs. I need to convert an array of bytes to another base, namely 85. In math terms the question is how to convert from base-256 to base-85 in the most efficient way? This question is inspired by my previous question - http://stackoverflow.com/questions/2827627/what-is-the-most-efficient-way-to-encode-an-arbitrary-guid-into-readable-ascii-3 Thanks.

    Read the article

  • Smallest Java Runtime I can legally distribute?

    - by Mark
    My Java SWT desktop application is distributed with it's own Java runtime and I want to make the download size as small as possible. I'd like to remove all the classes I don't use from rt.jar, but this is forbidden according to JDK runtime licence (see the README.html file in the root JDK folder). Since Java is open source, am I allowed to compile my own 'Java' runtime from source which doesn't have this distribution restriction? If so, has anyone done this already? (Or do you just ignore the JDK licence terms?)

    Read the article

  • Create table class as a singleton

    - by Mark
    I got a class that I use as a table. This class got an array of 16 row classes. These row classes all have 6 double variables. The values of these rows are set once and never change. Would it be a good practice to make this table a singleton? The advantage is that it cost less memory, but the table will be called from multiple threads so I have to synchronize my code which way cause a bit slower application. However lookups in this table are probably a very small portion of the total code that is executed. EDIT: This is my code, are there better ways to do this or is this a good practice? Removed synchronized keyword according to recommendations in this question. final class HalfTimeTable { private HalfTimeRow[] table = new HalfTimeRow[16]; private static final HalfTimeTable instance = new HalfTimeTable(); private HalfTimeTable() { if (instance != null) { throw new IllegalStateException("Already instantiated"); } table[0] = new HalfTimeRow(4.0, 1.2599, 0.5050, 1.5, 1.7435, 0.1911); table[1] = new HalfTimeRow(8.0, 1.0000, 0.6514, 3.0, 1.3838, 0.4295); //etc } @Override @Deprecated public Object clone() throws CloneNotSupportedException { throw new CloneNotSupportedException(); } public static HalfTimeTable getInstance() { return instance; } public HalfTimeRow getRow(int rownumber) { return table[rownumber]; } }

    Read the article

  • How do I call an upside down jQuery.slideDown()?

    - by Mark Rogers
    In the web app I'm working on I want to do a little slide up notification, like on twitter or your desktop. jQuery's .slideDown does exactly what I want, but it's upside down. The .slideUp doesn't execute an upside down version of slideDown. Instead it hides stuff, like after your cleaning up an old message you've displayed with slideDown. So what's the simplest code to do an upside down slideDown() in jQuery?

    Read the article

  • Grid view w/ progress bars?

    - by Mark
    Trying to decide on the best element to use for a grid view, pretty much exactly like the one you'd see in uTorrent or any other upload/download client. Specifically, I want to have a 'progress' column too (with progress bars). Using VS2010/.NET4. What would you recommend?

    Read the article

  • <button type="submit"> compatibility?

    - by Mark
    I'd like to have a submit button that submits a different value than is displayed on the button. With <input type="submit"> you can't seem to do this. With <button type="submit"> however, these can be two different values. The question is, will it work in all browsers? Trying this test code here: <form method="get" action=""> <input type="text" name="txt"/> <button type="submit" name="btn" value="val">text</button> </form> In FF 3.6 it updates my address bar with both values appropriately (and responds to me pressing enter in the text box). In IE 8, it also accepts pressing enter, displays the text value in the address bar, but it show the button's value as a GET param at all... does that mean it's not submitting it?

    Read the article

  • Matlab - building an array while looping

    - by Mark
    Hello, I have a for loop that loops over one array... for i=1:length(myArray) In this loop, I want to do check on the value of myArray and add it to another array myArray2 if it meets certain conditions. I looked through the Matlab docs, but couldn't find anything on creating arrays without declaring all their values on initialization or reading data into them in one shot. Many thanks!

    Read the article

< Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >