Daily Archives

Articles indexed Monday April 5 2010

Page 15/106 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • If terminating a hung thread is a good idea, how do I do it safely?

    - by Steve
    My Delphi program relies heavily on Outlook automation. Outlook versions prior to 2007-SP2 tend to get stuck in memory due to badly written addins and badly written Outlook code. If Outlook is stuck, calling CreateOleObject('Outlook.Application') or GetActiveObject ... doesn't return and keeps my application hanging till Outlook.exe is closed in the task manager. I've thought of a solution, but I'm unsure whether it's good practice or not. I'd start Outlook with CreateOleObject in a separate thread, wait 10 seconds in my main thread and if Outlook hangs (CreateOleObject doesn't return), offer the user to kill the Outlook.exe process from my program. But since I don't want to force the user to kill the Outlook.exe process, as an alternative I also need a way to kill the new thread in my program which keeps hanging now. Is this good practice? How can I terminate a hanging thread in Delphi without leaking memory?

    Read the article

  • ActionScript black color value is NaN

    - by TheDarkIn1978
    i'm trying to determine if a color has been supplied as an optional argument to a function. in order to determine this, i'm simply writing if(color){...} and supplying NaN if i don't want there to be a color. however, it seems that the color black (0x000000) also equates to NaN. how can i determine if a supplied color number argument is present and black if 0x000000 is passed as the argument?

    Read the article

  • 32-bit oracle 10g client to 64-bit oracle 10g server

    - by Dakshin
    Due to a 3rd party application's requirement, I may be forced to use 32-bit client of Oracle 10gR2 on the application server to connect to a 64-bit DB server oracle 10gR2 (10.2.0.4.0 - 64bit;another box). The OS is SUSE Linux ver 10. Platform is x86. There are no problems connecting to 64-bit DB server via 32-bit client. I have tested this. Does this result in performance degradation? Does Oracle or anyone else has any recommendations about this kind of scenario? Searched the net without much gain. Please help. Thanks.

    Read the article

  • Mystery undeletable file

    - by Hugh Allen
    I can't delete C:\Config.Msi\75ce84f.rbf. it's not readonly, system or hidden it's not in use by another process (according to Process Explorer) the NT security permissions aren't the problem either - I am the owner and have Full Control ; as a double-check, the Effective Permissions tab shows that I have permission to delete. Yet trying to delete the file gives "Access is Denied" from both Explorer and cmd. I can however rename it or move it to another folder on the same drive. I can also read it and Virustotal says it's clean which is what I would expect (it's just a Windows Installer temp file - a copy of some DLL I think). The relevant line from Process Monitor is: 6:52:14.3726983 PM 112 Explorer.EXE SetDispositionInformationFile C:\Config.Msi\75ce84f.rbf CANNOT DELETE Delete: True Write 1232 Background: I'm using XP SP2. I recently repaired my Adobe Reader installation to make it the default browser plugin again instead of Foxit. (there seems to be no UI to do it otherwise?) So the installer did its thing and then asked to reboot. As is my habit when rebooting is inconvenient I declined the offer and ran pendmoves to find out what files the installer had scheduled to move / delete. It wanted to delete two files with .rbf extension (rollback files) located in C:\Config.msi\. (this applies to both even though I've been speaking about one). So I tried to delete them manually and couldn't. Does anyone have any ideas what could be preventing deletion? (and I don't think it's malware even though I'm not running AV at the moment)

    Read the article

  • How to tilt a rigid LCD Wall Mount?

    - by benoror
    I recently bought a Wall Mount for my 24" LCD TV, it is just a few feet above my workspace desktop, but I need it to be a little bit tilted because I'm quite near the screen. I can't afford another wall-mount device, any ideas ? Description of the mount: http://bit.ly/cfyrEG

    Read the article

  • how to get textfield data in win32-gui perl

    - by amit
    hi i want to store textfield data in a variable but my code is not working here is my code use Win32::GUI(); my $W1 = Win32::GUI::Window-new( -name = "W1", -title = "First Window", -pos = [ 100, 100 ], -size = [ 300, 200 ], ); $W1-AddButton( -name = "ButtonW1", -text = "Enter Chipname", -pos = [ 87, 100 ], #-ok = 1, ); $W1-AddTextfield( -name = "chipfield", -left = 20, -top = 40, -width = 250, -height = 20, # -prompt = ["Mix ",30], ); $W1-Show(); Win32::GUI::Dialog(); exit(0); sub W1_Terminate { return -1; } sub ButtonW1_Click { $chipname = $W1-chipfield-Text(), print $chipname; #return 0; } please help me where is problem

    Read the article

  • Incorrect component when querying immediately after insert using NHibernate

    - by Am
    I have the following mapping for my table in MySql: <class name="Tag, namespace" table="tags" > <id name="id" type="Int32" unsaved-value="0"> <generator class="native"></generator> </id> <property name="name" type="String" not-null="true"></property> <component name="record_dates" class="DateMetaData, namespace" > <property name="created_at" type="DateTime" not-null="true"></property> <property name="updated_at" type="DateTime" not-null="true"></property> </component> </class> As you see the record_dates property is defined as a component field of type DateMetaDate. Both created_at and updated_at fields in 'tags' table are updated via triggers. Thus I can insert a new record like such: var newTag = new Tag() { name = "some string here" } Int32 id = (Int32)Session.Save(tag); Session.Flush(); ITag t = Session.Get<Tag>(id); ViewData["xxx"] = t.name; // -----> not null ViewData["xxx"] = t.record_dates.created_at; // -----> is null However when querying the same record back immediately after it was inserted the record_dates field ends up null even though in the table those fields have got values. Can any one please point out why the Session.Get ignores getting everything back from the table? is it because it caches the newly created record for which the records_dates is null? If so how can it be told to ignore the cached version?

    Read the article

  • Cocoa multiple threads, locks don't work

    - by Igor
    I have a threadMethod which shows in console robotMotorsStatus every 0.5 sec. But when I try to change robotMotorsStatus in changeRobotStatus method I receive an exception. Where I need to put locks in that program. #import "AppController.h" @implementation AppController extern char *robotMotorsStatus; - (IBAction)runThread:(id)sender { [self performSelectorInBackground:@selector(threadMethod) withObject:nil]; } - (void)threadMethod { char string_to_send[]="QFF001100\r"; //String prepared to the port sending (first inintialization) string_to_send[7] = robotMotorsStatus[0]; string_to_send[8] = robotMotorsStatus[1]; while(1){ [theLock lock]; usleep(500000); NSLog (@"Robot status %s", robotMotorsStatus); [theLock unlock]; } } - (IBAction)changeRobotStatus:(id)sender { robotMotorsStatus[0]='1'; }

    Read the article

  • Spring rejecting bean name, no URL paths specified

    - by richever
    I am trying to register an interceptor using a annotation-driven controller configuration. As far as I can tell, I've done everything correctly but when I try testing the interceptor nothing happens. After looking in the logs I found the following: 2010-04-04 20:06:18,231 DEBUG [main] support.AbstractAutowireCapableBeanFactory (AbstractAutowireCapableBeanFactory.java:452) - Finished creating instance of bean 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0' 2010-04-04 20:06:18,515 DEBUG [main] handler.AbstractDetectingUrlHandlerMapping (AbstractDetectingUrlHandlerMapping.java:86) - Rejected bean name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0': no URL paths identified 2010-04-04 20:06:19,109 DEBUG [main] support.AbstractBeanFactory (AbstractBeanFactory.java:241) - Returning cached instance of singleton bean 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0' Look at the second line of this log snippet. Is Spring rejecting the DefaultAnnotationHandlerMapping bean? And if so could this be the problem with my interceptor not working? Here is my application context: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd" default-autowire="byName"> <!-- Configures the @Controller programming model --> <mvc:annotation-driven /> <!-- Scan for annotations... --> <context:component-scan base-package=" com.splash.web.controller, com.splash.web.service, com.splash.web.authentication"/> <bean id="authorizedUserInterceptor" class="com.splash.web.handler.AuthorizedUserInterceptor"/> <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"> <property name="interceptors"> <list> <ref bean="authorizedUserInterceptor"/> </list> </property> </bean> Here is my interceptor: package com.splash.web.handler; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; public class AuthorizedUserInterceptor extends HandlerInterceptorAdapter { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { log.debug(">>> Operation intercepted..."); return true; } } Does anyone see anything wrong with this? What does the error I mentioned above actually mean and could it have any bearing on the interceptor not being called? Thanks!

    Read the article

  • How to prevent any files from being copied onto the Desktop?

    - by Kaushik Gopal
    Gentlepeeps, Is there any solution to prevent copying of files onto the desktop? My folks and i currently have one super-common-comp in our place. And when all of the laptops are busy, we tend to do some quick surfing on this comp. I prefer to keep things freakishly organized in this comp and one thing i hate is having those off-shoot irritating forwarded downloads on my desktop. Is there some way to restrict files from being copied onto the desktop? I tried making the administrator user's desktop folder as read-only :P . That doesn't solve the problem. Any other ideas/software/solutions? cheers.

    Read the article

  • [Python] - Getting data from external program

    - by Kenny M.
    Hey, I need a method to get the data from an external editor. def _get_content(): from subprocess import call file = open(file, "w").write(some_name) call(editor + " " + file, shell=True) file.close() file = open(file) x = file.readlines() [snip] I personally think this is a very ugly way. You see I need to interact with an external editor and get the data. Do you know any better approaches/have better ideas?

    Read the article

  • Share on Facebook, Retweet, etc, buttons in straight Ruby gem?

    - by Alexandre
    Notice those buttons atop http://techcrunch.com/2010/04/04/he-even-makes-coldplay-sound-fun/ for sharing the url on social networks? I want to do something very very similar for a site I'm building. ShareThis offers a widget that does the same thing but it's branded and external. I'm looking for a pure Ruby solution. A gem containing a module that could be included in a Rails ApplicationHelper class would be perfect. Suggestions appreciated before I go reinventing the wheel!

    Read the article

  • filtering jqgrid based on user input

    - by Rohan
    hi, everything is working fine with my jqgrid except a small issue. i have defined postData below: $(document).ready(function() { $("#ctl00_ContentPlaceHolder2_drpUSite").change(function() { site = ($("#ctl00_ContentPlaceHolder2_drpUSite").val()); loadusergrid(); }); var usrparams = new Object(); var site = ($("#ctl00_ContentPlaceHolder2_drpUSite").val()); //----grid code--------- $("#users").jqGrid({ prmNames: { _search: "isSearch", nd: null, rows: "numRows", page: "page", sort: "sortField", order: "sortOrder" }, // add by default to avoid webmethod parameter conflicts postData: { searchString: '', searchField: '', searchOper: '', sites: site }, datatype: function(postdata) { mtype: "GET", $.ajax({ url: 'Users.aspx/GetUsers', type: "POST", contentType: "application/json; charset=utf-8", data: JSON.stringify(postdata), dataType: "json", success: function(data, st) { if (st == "success") { var grid = $("#users")[0]; var m = JSON.parse(data.d); grid.addJSONData(m); } }, error: function() { alert("Loading Failed!"); } }); }, // this is what jqGrid is looking for in json callback jsonReader: { root: "rows", page: "page", total: "total", records: "records", cell: "cell", id: "login", repeatitems: true }, colNames: ['Login', 'First Name', 'Last Name', 'Email', 'Site', 'Role', 'Room', 'UnitID', 'Supervisor', 'Super'], colModel: [ { name: 'login', index: 'login', width: 20 }, { name: 'fname', index: 'fname', width: 20, hidden: true }, { name: 'lname', index: 'lname', width: 60, align: "center", sortable: true, searchoptions: { sopt: ['eq', 'ne']} }, { name: 'email', index: 'email', width: 20, align: "center", sortable: false }, { name: 'site', index: 'site', width: 50, align: "center", sortable: true, searchoptions: { sopt: ['eq', 'ne']} }, { name: 'role', index: 'role', width: 15, align: "center", sortable: true, searchoptions: { sopt: ['eq', 'ne']} }, { name: 'room', index: 'room', width: 30, align: "center", sortable: true }, { name: 'unitid', index: 'unitid', width: 10, align: "center", sortable: false }, { name: 'super', index: 'super', width: 20 }, { name: 'supername', index: 'supername', width: 10, align: "center", sortable: false }, ], pager: "#pageusers", viewrecords: true, caption: "Registered Users", imgpath: 'themes/steel/images', rowNum: 20, rowList: [10, 20, 30, 40, 50], sortname: "pname", sortorder: "desc", showpage: true, gridModel: true, gridToolbar: true, onSelectRow: function(id) { var ret = jQuery("#users").getRowData(id); accpara.id = ret.id; accpara.pname = ret.pname; accpara.pid = ret.pid; accpara.bld = ret.bld; accpara.cname = ret.cname; accpara.amt = ret.amt; accpara.status = ret.status; accpara.notes = ret.notes; accpara.lname = ret.lname; } }); jQuery("#users").navGrid('#pageusers', { view: false, del: false, add: false, edit: false }, {}, // default settings for edit {}, // default settings for add {}, // delete {closeOnEscape: true, multipleSearch: true, closeAfterSearch: true }, // search options {} ); $("#users").setGridWidth(1300, true); $("#users").setGridHeight(500, true); jQuery("#users").jqGrid('filterToolbar'); //----grid code ends here function loadusergrid() { $("#users").setGridParam({ page: 1 }, { pgbuttons: true }, { pginput: true }, { postData: { "site": site} }).trigger("reloadGrid"); } }); when page loads for the 1st time, this works.. now i have 4 drop-downs which filter users. i have written a function which reloads the grid when the dropdown is changed, but it isnt working.. what am i doing wrong here?? when i enable postback for the dropdowns, i get the filtered result. i want to avoid postbacks on my page :). right now i have added just the site dropdown as the filter. once this starts working ill add the remaining 3. firebug shows the ajax call is fired successfully but with an empty sitename. please note that the site dropdown cntains an empty value when page is loaded for the 1st time. thanks in advance

    Read the article

  • iphone how to remove modal uiviewcontroller from memory

    - by Scott Pendleton
    I have a root UIViewController which has a property called webView. WebView is a UIViewController with a XIB that contains a UIWebView. From my root view I modally (is there any other way?) load the webView ViewController and set its URL, always to the same page. I discovered that if, after loading the webView, I used its default Web page to navigate to another Web page, and then closed the webView and returned to the root controller -- AND THEN reopened the webView, that the webView was not showing the default page but rather the page I navigated to, which means the webView ViewController never got destroyed and removed from memory. This strikes me as very bad. So in the root ViewController, I added this code under viewWillAppear:animated -- if (self.webView != nil) { self.webView = nil) } Is that sufficient? Is there a better way?

    Read the article

  • BuddyPress: Stop overriding default parameters passed to the template loop?

    - by 55skidoo
    How do I stop BP from overriding default parameters passed to the template loop? For example, on the Activity page, let's say you want BP to "forget" the user's last viewed parameter (like "My Forums" or "@user Mentions") and go right back to All Members or My Friends every time you reload the page. I tried deleting the contents of ajax.php and global.js, and the overriding behavior still happens. Where do I look next?

    Read the article

  • Asp.Net how to integrate Video Chat

    - by Milan
    Hi, I am developing a video chat website application for a social networking website, like if i am broadcasting video, the video will be viewed by n number of users. I have searched the web for the same but, could not find anything good. Suggestions any one. Thank You.

    Read the article

  • Tomcat: recommandations for logging

    - by WizardOfOdds
    I've read several questions here concerning Tomcat and logging but I still really don't understand the "bigger picture", hence my question: How and where are my Webapps supposed to do their logging? By default on my setup Tomcat 6.0.20 logs go in the following file/appender: ./apache-tomcat-6.0.20/logs/catalina.out Am I suppose to have my webapps also log to this file/appender? Let say my case is trivially simple and I've got just one servlet: import ... // What do I import here in order to be able to log? public class SOServlet extends HttpServlet { public void doGet( final HttpServletRequest request, final HttpServletResponse response ) throws IOException, ServletException { ... // I want to log here, what do I write? What are the gotchas knowing that there are more than one webapp running on the same Tomcat? (apparently from reading the various questions there are many gotchas). What about the .war, do I need to put log4j/sl4f/commons-logging/whatever in my .war?

    Read the article

  • limit concurrent user logins in Plone/Zope

    - by Peter
    Hi, I want to limit the number of active sessions a user can have in Plone/Zope. We are selling access to digital content and ideally want to limit how many concurrent logins can use one set of credentials. What would be the best way to achieve this? Thanks, Peter

    Read the article

  • How does changing armv6/armv7 architecture to armv6 affect my iPad app? Will there be performance/st

    - by Flocked
    Hello, I need to change the the architectures of "Any iPhone OS Device" from "Optimized (armv6 armv7)" to "Standard (armv6)" for a library. I'm not exactly sure what effect will this have on the performance and stability of my iPad app. If I understand it right, the iPad has the armv7 architecture. I'm not so familiar with architectures, so I don't know what it means.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >