Daily Archives

Articles indexed Saturday April 3 2010

Page 1/78 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Troubleshooting a COM+ application deadlock

    - by Chris Karcher
    I'm trying to troubleshoot a COM+ application that deadlocks intermittently. The last time it locked up, I was able to take a usermode dump of the dllhost process and analyze it using WinDbg. After inspecting all the threads and locks, it all boils down to a critical section owned by this thread: ChildEBP RetAddr Args to Child 0deefd00 7c822114 77e6bb08 000004d4 00000000 ntdll!KiFastSystemCallRet 0deefd04 77e6bb08 000004d4 00000000 0deefd48 ntdll!ZwWaitForSingleObject+0xc 0deefd74 77e6ba72 000004d4 00002710 00000000 kernel32!WaitForSingleObjectEx+0xac 0deefd88 75bb22b9 000004d4 00002710 00000000 kernel32!WaitForSingleObject+0x12 0deeffb8 77e660b9 000a5cc0 00000000 00000000 comsvcs!PingThread+0xf6 0deeffec 00000000 75bb21f1 000a5cc0 00000000 kernel32!BaseThreadStart+0x34 The object it's waiting on is an event: 0:016> !handle 4d4 f Handle 000004d4 Type Event Attributes 0 GrantedAccess 0x1f0003: Delete,ReadControl,WriteDac,WriteOwner,Synch QueryState,ModifyState HandleCount 2 PointerCount 4 Name <none> No object specific information available As far as I can tell, the event never gets signaled, causing the thread to hang and hold up several other threads in the process. Does anyone have any suggestions for next steps in figuring out what's going on? Now, seeing as the method is called PingThread, is it possible that it's trying to ping another thread in the process that's already deadlocked? UPDATE This actually turned out to be a bug in the Oracle 10.2.0.1 client. Although, I'm still interested in ideas on how I could have figured this out without finding the bug in Oracle's bug database.

    Read the article

  • How do I turn off accelerometer input for my flipside view

    - by user308050
    I have an iPhone 3.1.3 app which has only 2 methods of input in its main view. It has an info button to switch to a flipside view, and the only other input it takes in the main view is accelerometer movement. I want to switch off the accelerometer input when in the flipside view but haven't been able to find out how. I have the main view controller set as an accelerometer delegate, but did not do the same for the flipside view controller, though I suspect that it inherited it from the main view controller. I am really new to xcode and objective c, I have been reading these forums and a couple of developer books, but if anyone has any tips on other good places to look, please let me know.

    Read the article

  • Why aren't we programming on the GPU???

    - by Chris
    So I finally took the time to learn CUDA and get it installed and configured on my computer and I have to say, I'm quite impressed! Here's how it does rendering the Mandelbrot set at 1280 x 678 pixels on my home PC with a Q6600 and a GeForce 8800GTS (max of 1000 iterations): Maxing out all 4 CPU cores with OpenMP: 2.23 fps Running the same algorithm on my GPU: 104.7 fps And here's how fast I got it to render the whole set at 8192 x 8192 with a max of 1000 iterations: Serial implemetation on my home PC: 81.2 seconds All 4 CPU cores on my home PC (OpenMP): 24.5 seconds 32 processors on my school's super computer (MPI with master-worker): 1.92 seconds My home GPU (CUDA): 0.310 seconds 4 GPUs on my school's super computer (CUDA with static domain decomposition): 0.0547 seconds So here's my question - if we can get such huge speedups by programming the GPU instead of the CPU, why is nobody doing it??? I can think of so many things we could speed up like this, and yet I don't know of many commercial apps that are actually doing it. Also, what kinds of other speedups have you seen by offloading your computations to the GPU?

    Read the article

  • Quartz Composer in iPhone UIView

    - by Peter Hajas
    Hi everyone, I am trying to embed a Quartz Composer document in an iPhone app. I know Quartz Composer support was added in iPhone OS 3.1 (at least, that's what Wikipedia says) but I can't find any good resources on how to do this. Do I use CGContext? Or are there more friendly ways to add a Quartz Composer composition? Thanks!

    Read the article

  • Trying to configure domain-based access via htaccess file.

    - by kenja
    I've created an account with no-ip.com that registers my ip with a subdomain of their service. When I do an nslookup, I see that the service is working and that my domain is being shown. Now I want to provide access to that subdomain on the admin site of our server which is protected by htaccess IP restrictions. When I try to add the new domain to my script it does not work. Am I doing something wrong? I'm basically trying to make my laptop so it can log in from no matter when I'm at while still preventing all other IPs from accessing the site. ## password begin ## AuthName "Restricted Access" AuthUserFile /usr/www/users/site/.passwd AuthType Basic Require valid-user Order deny,allow Deny from all Allow from 69.1.122.161 mysubdomain.no-ip.org Satisfy All

    Read the article

  • 2-column; multi-accordion pane

    - by Josh
    Alright, I'm having some issues and I believe it's a CSS one. Here is what I'm working on currently: http://www.notedls.com/demo/ Focusing on the News accordion menu. The idea here is to have a small image (50x50 with padding) and then a huge headline next to it. When the user clicks the headline, it expands to the article. If the user wants to read comments or make a comment themselves they can then click the View Comments to expand it even further. The issue I'm having (if it isn't clear) is the spacing with the image and the text. I could simply just increase the height of the ui.accordion-acc or -left to make everything fit, but that doesn't solve the issue. If you notice when you click on the first expansion of Headline 1, it will wrap View Comments underneath the image. This is something I don't want, I've tried separating these elements into additional divs and even floating, but its just not working. Essentially, I want blank space infinitely underneath the image for however long the article+comments may take the field.

    Read the article

  • Anyone had any experience with *.pcap manipulation libs?

    - by zxcvbnm
    I'm using the SharpPcap + PacketDotNet libraries to process some .pcap files and came across a bug in the way the timestamps are calculated. Take this Timeval property, which is something along these lines: PosixTimeval Timeval { DateTime Date; ulong Seconds; ulong MicroSeconds; } The problem is as follows: Suppose you have a trace open in Wireshark with one of the packets with a timestamp of "0.002". Once you open it within one of your programs, it retrieves the packet and its Timeval is setup such that Seconds = 0 and MicroSeconds = 002 = 2. This is done under the hood, so there is no way to avoid it as far as I can tell. My question is if that problem is common to other libraries (and maybe all of them?) who manipulate the pcap file format, which I think are built around the same collection of c/c++ functions, or if this is a problem only with the ones I'm using.

    Read the article

  • What are the reasons to use dos batch programs in Windows?

    - by DVK
    Question What would be a good (ideally, technical) reason to ever program some non-trivial task in dos batch language on a modern Windows system as opposed to downloading either PowerShell, or ActiveState Perl? To be more specific, I make the following two assumptions for the duration of this question: anyone technical enough to be able to write a medium-complexity batch script is technical enough to install either of the scripting interpreters. Neither of those two present enough of a learning curve for basic batch replacement tasks that said curve would outweigh the pain of doing any remotely-non-trivial task in batch. Notes "You need a batch program for autoexec.bat" is not a valid reason. Your autoexec.bat may consist of simply calling non-batch script. If you disagree with either of my 2 assumptions above, that's fine, and I may be wrong. But my question is specifically "assuming those 2 assumptions are correct, what would be the reason to still stick with batch?" If it makes it easier to suspend disbelief (in case you disagree with me), add in a 3rd assumption that the question is limited to people who already posess at least some modicum of PowerShell or Perl experience. To re-iterate - this is not meant to be a subjective question about how easy it is to learn PSh or ASPerl compared to doing advanced batch coding. That is a separate question that is too subjective to be bothered with in this post. Background: I used to do some fairly complicated batch programming back in the elder days, and remember batch as one of the worst possble programming languages I had encountered. The idea for this question came after seeing a bunch of batch questions on SO, and trying to grok the answer of one of them out of sheer curiosity and giving up in pain after a minute, exclaiming mentally "why would anyone go through this pain instead of doing that in 1 line of Perl?" :) My own plausible answer I assume there may be an an likely DOS-compatible system, which has DOS interpreter but has no compatible PowerShell or Perl... I'm not aware of one but not completely impossible.

    Read the article

  • Ruby JSON.pretty_generate ... is pretty unpretty

    - by Amy
    I can't seem to get JSON.pretty_generate() to actually generate pretty output in Rails. I'm using Rails 2.3.5 and it seems to automatically load the JSON gem. Awesome. While using script/console this does indeed produce JSON: some_data = {'foo' => 1, 'bar' => 20, 'cow' => [1, 2, 3, 4], 'moo' => {'dog' => 'woof', 'cat' => 'meow'}} some_data.to_json => "{\"cow\":[1,2,3,4],\"moo\":{\"cat\":\"meow\",\"dog\":\"woof\"},\"foo\":1,\"bar\":20}" But this doesn't produce pretty output: JSON.pretty_generate(some_data) => "{\"cow\":[1,2,3,4],\"moo\":{\"cat\":\"meow\",\"dog\":\"woof\"},\"foo\":1,\"bar\":20}" The only way I've found to generate it is to use irb and to load the Pure version: require 'rubygems' require 'json/pure' some_data = {'foo' => 1, 'bar' => 20, 'cow' => [1, 2, 3, 4], 'moo' => {'dog' => 'woof', 'cat' => 'meow'}} JSON.pretty_generate(some_data) => "{\n \"cow\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"moo\": {\n \"cat\": \"meow\",\n \"dog\": \"woof\"\n },\n \"foo\": 1,\n \"bar\": 20\n}" BUT, what I really want is Rails to produce this. Does anyone have any tips why I can't get the generator in Rails to work correctly? Thanks! Updated 5:20 PM PST: Corrected the output.

    Read the article

  • C++ Exceptions and Inheritance from std::exception

    - by fbrereto
    Given this sample code: #include <iostream> #include <stdexcept> class my_exception_t : std::exception { public: explicit my_exception_t() { } virtual const char* what() const throw() { return "Hello, world!"; } }; int main() { try { throw my_exception_t(); } catch (const std::exception& error) { std::cerr << "Exception: " << error.what() << std::endl; } catch (...) { std::cerr << "Exception: unknown" << std::endl; } return 0; } I get the following output: Exception: unknown Yet simply making the inheritance of my_exception_t from std::exception public, I get the following output: Exception: Hello, world! Could someone please explain to me why the type of inheritance matters in this case? Bonus points for a reference in the standard.

    Read the article

  • Load external image inside flash movie clip

    - by PepeSanchez
    I have a flash movie clip and need to load an external image inside the clip that reference to an external URL.. like www.myimage.com/image.jpg i did something with XML but the image persist on every clip because it loads from actionscript using the x and y cords. Help needed! Thanks!

    Read the article

  • Using widthratio tag properly

    - by owca
    Hi. In my application I need to show in template stocks for my products. So from product view I'm returning variable {{stock}} which is my amount and then I'm trying to use it in template : <div class="bar_in" width="{% widthratio {{stock}} 10 100 %}px" style="background:black;"></div> But it constantly give me "Could not parse the remainder: '{{stock}}' from '{{stock}}' " error. I've tried casting it as int but still the same problem. How to make it work properly ?

    Read the article

  • Flex 4 - What makes a GC root?

    - by Michael Brewer-Davis
    What are the rules for something to be a GC root in Flash? I'm using the Flash Builder 4 profiler, and I'm finding odd things are labeled as GC roots in the object reference details (e.g., an Image control that is no longer in the display list, nor static).

    Read the article

  • Access variables between nested JSP tags

    - by user308053
    I would like to exchange information between two nested JSP tagx artifacts. To give an example: list.jspx <myNs:table data="${myTableData}"> <myNs:column property="firstName" label="First Name"/> <myNs:column property="lastName" label="Last Name"/> </myNs:table> Now, the table.tagx is supposed to display the data columns as defined in the nested column tags. The question is how do I get access to the values of the property and label attributes of the nested column tags from the table tag. I tried jsp:directive.variable but that seems only to work to exchange information between a jsp and a tag, but not between nested tags. Note, I would like to avoid using java backing objects for both the table and the column tags at all. I would also like to know how I can access an attribute defined by a parent tag (in this example I would like to access the contents of the data attribute in table.tagx from column.tagx). So it boils down to how can I access variables between nested JSP tags which are purely implemented through the tag definitions themselves (no Java TagHandler implementation desired)?

    Read the article

  • Get most left|right|top|bottom point contained in box

    - by skyman
    I'm storing Points Of Interest (POI) in PostgreSQL database, and retrieve them via PHP script to Android application. To reduce internet usage I want my mobile app to know if there are any points in the neighborhood of currently displayed area. My idea is to store bounds of the rectangle containing all points already retrieved (in other words: nearest point on the left (West) of most west already retrieved, nearest point above (North) of most north already retrieved etc.) and I will make next query when any edge of screen goes outside of this bounds. Currently I can retrieve points which are in "single screen" (in the area covered by currently displayed map) using: SELECT * FROM ch WHERE loc <@ (box '((".-$latSpan.", ".$lonSpan."),(".$latSpan.", ".-$lonSpan."))' + point '".$loc."') Now I need to know four most remote points in each direction, than I will be able to retrieve next four "more remote" points. Is there any possibility to get those points (or box) directly from PostgreSQL (maybe using some "aggregate points to box" function)?

    Read the article

  • ODBC Connection String Problem

    - by Brett
    Hi there, I am having major trouble connecting to my database via ODBC. The db is local (but I have a mirror on a virtual machine), so I am trying to use the connectionstring: Dsn=MonetDB;host=TARBELL where TARBELL is the name of my computer. However, it doesn't connect. BUT, this string does: Dsn=MonetDB;host=localhost as does Dsn=MonetDB Can anyone explain this? I am at a complete loss. I have taken down my firewalls (at least until I get this figured out), so that can't be the problem. I eventually want to change the TARBELL to the mirrored virtual machine running another instance of the database. Many thanks, Brett

    Read the article

  • overloaded stream insertion operator with a vector

    - by Julz
    hi, i'm trying to write an overloaded stream insertion operator for a class who's only member is a vector. i dont really know what i'm doing. (lets make that clear) it's a vector of "Points" which is a struct containing two doubles. i figure what i want is to insert user input (a bunch of doubles) into a stream that i then send to a modifier method? i keep working off other stream insertion examples such as... std::ostream& operator<< (std::ostream& o, Fred const& fred) { return o << fred.i_; } but when i try a similar..... istream & operator >> (istream &inStream, Polygon &vertStr) { inStream >> ws; inStream >> vertStr.vertices; return inStream; } i get an error "no match for operator etc etc. if i leave off the .vertices it compiles but i figure it's not right? (vertices is the name of my vector ) and even if it is right, i dont actually know what syntax to use in my driver to use it? also not %100 on what my modifier method needs to look like. here's my Polygon class //header #ifndef POLYGON_H #define POLYGON_H #include "Segment.h" #include <vector> class Polygon { friend std::istream & operator >> (std::istream &inStream, Polygon &vertStr); public: //Constructor Polygon(const Point &theVerts); //Default Constructor Polygon(); //Copy Constructor Polygon(const Polygon &polyCopy); //Accessor/Modifier methods inline std::vector<Point> getVector() const {return vertices;} //Return number of Vector elements inline int sizeOfVect() const {return (int) vertices.capacity();} //add Point elements to vector inline void setVertices(const Point &theVerts){vertices.push_back (theVerts);} private: std::vector<Point> vertices; }; #endif //Body using namespace std; #include "Polygon.h" // Constructor Polygon::Polygon(const Point &theVerts) { vertices.push_back (theVerts); } //Copy Constructor Polygon::Polygon(const Polygon &polyCopy) { vertices = polyCopy.vertices; } //Default Constructor Polygon::Polygon(){} istream & operator >> (istream &inStream, Polygon &vertStr) { inStream >> ws; inStream >> vertStr; return inStream; } any help greatly appreciated, sorry to be so vague, a lecturer has just kind of given us a brief example of stream insertion then left us on our own thanks. oh i realise there are probably many other problems that need fixing

    Read the article

  • Best copy and paste software for windows?

    - by jasondavis
    Sorry if this question exist already, I did some searches but could not find one myself. I am looking for the best programs to copy and paste stuff in windows more easily. So let's say instead of the default copy/paste one item at a time, I could have 5 different paragraphs that could all be pasted somewhere seperately. Hopefully this is not to confusing. Instead of bveing able to paste 1 item I would like to have a list of items that can be pasted or some similar functionality under windows. Please help make me more productive, I frequently need to copy and paste different sets of data. Here is a good exampl, let's say I need to be able to past my email somewhere but on another program or webpage I need to paste my home address.

    Read the article

  • pros and cons with server management gui tools to manage linux web servers

    - by ajsie
    i have stumbled upon these GUI tools that could help you manage your linux server through a web interface. ebox, webmin, ispconfig, zivios, ispcp, plesk, cpanel etc. i wonder what the pros and cons are with these solutions. a lot of people is saying that they are not as good as using pure command line (ssh) to manage your server. but i think thats yet another "linux are for advanced users" talk. i agree that some things may only be done with the command line by editing directly in the configuration files. but i don't really want to do that every time and for everything. its like not having phpmyadmin for managing mysql. it would be a pain in the ass right? so if one wants to throw up a web server serving a php site oneself developed and wants all the usual stuff up and running (mysql, phpmyadmin, svn, webdav etc) is these tools the right way to go?

    Read the article

  • how do I "ajaxify" my php code?

    - by dot
    I have divs that I want to display at specific times throughout the day. I have it working in PHP, but it requires refreshing the browser manually. I would like my script to automatically load the right div when the time is right. Am I on the right track? Perhaps there is a jquery plugin for this sort of thing that would handle the refreshing? Any help is greatly appreciated... Thanks! <?php $time = date("H\:i"); if (($time > "16:59") && ($time < "18:59")) { echo "<div>1</div>"; } elseif (($time > "18:59") && ($time < "20:59")) { echo "<div>2</div>"; } elseif (($time > "20:59") && ($time < "22:59")) { echo "<div>3</div>"; } else { echo "<div id='out'><p>Outside the specified point in time.</p></div>"; } ?>

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >