Posts

Showing posts from September, 2013

java - How to create a temporary jms queue with jboss? -

I need to make a temporary queue while flying, how is it possible? See the object object from your JM queue / subject: You need to keep the session open for floating queue life cycle. Typical usage opens a session for the client and puts a message on a shared processing queue using the temporary queue in the reply Example: (pseudo-code) for the area of ​​the message < Pre> line queue = session Create Good ("Share"); Q Response Qi = session. Secure Timeline (); Message message = session.Created message (); Message.setJMSReplyTo (responseQueue); ... session.commit (); ... Message Consumer Response Consumer = Session. Secure Consumers (Response Quinn); Message response = response skills. ... session.close (); MDB (or listener who reads the shared process queue) will return the response back to the feedback line. If the client is dead for any reason, then his session has closed and the queue is not present.

c - Problem with converting compressed swf with cws2fws -

I am trying to convert encoded swf files to uncompressed swf files using the cws2fws utility written by Alex Berregazzy I am using a FFMPEG set of conversion routine which is part of it and I am using compressed files that are valid files because they can be opened and played by Firefox and other programs, but when I send them through cws2fws If I run the error in the program (-5) shows that the file is corrupted I have downloaded the source for the program and compiled it using Visual Studio when I run my file through the new compiled program, The program downloaded from has the same results. While debugging the program, I noticed that two of the four bytes used to determine the uncompressed file size of SVF are negative (see line 64 below). 00056 if (buf_in [0]! = 'C' || bug_in [1]! = 'W' || buff_in [2]! = 'S') 00057 {00058 printf ( "Not a compressed flash file \ n"); 00059 exit (1); 00060} 00061 00062 fstat (fd_in, and statbuf); 00063 comp_le

windows - Manipulating time in a batch file -

I was surprised 'if someone can help in this latch batch file. Here's the code I'm trying to when I was last successful Windows Update. @ECHO OFF SETLOCAL SET RegKey = HKLM \ SOFTWARE \ Microsoft \ Windows CurrentVersion SET RegKey =% RegKey% \ WindowsUpdate \ Auto Update \ results for install / F "Leave = 1 Token = 2 *" %% A IN ('REG Query'% RegKey% / v 'LastSuccessTime') DO SET LastWUpd = %% If the " % ~ 1 "==" "ECHO Last Successful Windows Update:% Last WUpd% PAUSE Endoulic & amp; SET LastWUpd =% LastWUpd% IF "% ~ 1" == "" GOTO: EOF And this is the output I received: last successful Windows Update: 2009-10-14 09:02:52 I was amazing 'if there was any way to reduce the gap in time now? So that the line can be changed to read: Last successful Windows update x years x month x day x hours x minutes ago if possible it would be great. Thank you in advance, Mathematical I assis

Grails, finding available views (.gsp's) at runtime -

An easy way for a grails app to find available list of ideas available (* .gsp) at run-time is. Ideally, a solution will work for both ARP servers that open the war and do not unpack the war. Thanks Unfortunately this god is different for the environment and when in war Deployed: import org.codehaus.groovy.grails Web.context.ServletContextHolder as SCH def gsps = [] if (grailsApplication.isWarDeployed ()) {findWarGsps' / WEB {File (file in new file) for {0} - {0} (if) - {if (File.path.endsWith ('gsp')) {GSPS & lt; & Lt; File.path - 'grails-app / views /'} Other {findDevGsps file.path, gsps}}} Private Zero Search Virus (Current, GPS) {def servletContext = for SCH.servletContext (servletContext.getResourcePaths (current) Path) {If (path.endsWith ('.gsp')) {GSPS & lt; & Lt; Path - '/ web-INF / gyle-app / visual /'} other {search, gps, gps}}}

How to get a enum value from string in C#? -

मेरे पास एक enum है: सार्वजनिक enum baseKey: uint {HKEY_CLASSES_ROOT = 0x80000000, HKEY_CURRENT_USER = 0x80000001, HKEY_LOCAL_MACHINE = 0x80000002, HKEY_USERS = 0x80000003, HKEY_CURRENT_CONFIG = 0x80000005} मैं स्ट्रिंग HKEY_LOCAL_MACHINE को कैसे दे सकता हूं, मान 0x80000002 < / कोड> इनम पर आधारित? आधार की पसंद; अगर (Enum.TryParse ("HKEY_LOCAL_MACHINE", बाहर विकल्प)) {uint मूल्य = (uint) विकल्प; // `value` वह है जिसे आप ढूंढ रहे हैं} और {/ * त्रुटि: स्ट्रिंग एंनाम सदस्य * /} .NET 4.5 से पहले नहीं था, आपको निम्नलिखित, जो अधिक त्रुटि प्रवण है और एक अपवाद डालता है जब एक अमान्य स्ट्रिंग पारित हो जाती है: (uint) Enum.Parse (typeof (baseKey), "HKEY_LOCAL_MACHINE") < / प्री>

c++ - How can I include a subset of a .cpp file in a Doxygen comment? -

I am trying to write some Doxygen comment blocks, and I would like to include example snippets of code. Of course, I really want to compile the examples so that they are not stale. My example is cpp (which is included in i.e.). Looks like this: #include "stdafx.h" #include "../types_lib/Time_Limiter.h" #Include & lt; Vector & gt; Zero tl_demo () {// There must be a gate to control some rare resources that should not be more than 10 times the second time_limit rare (10); // Here is a bunch of requests std :: vector & lt; Int & gt; Rake (500); For (size_t i = 0; i and my header file (which I'm running Doxygen) looks like this: < / Code> / ** * \ ingroup types_lib * * \ class Time_Limiter * * Brief Thread Safe Gate is used to control a resource (like an Internet quote service), on how often you can call it * * \ DontInclude Time_Limiter_example.cpp * \ skipline zero * \ until the endcode * ** / and I just start with "zer

c# - Prompting the user for permission - facebook developer toolkit -

I am creating a small Facebook application in C #. I want to prompt the user for permission to post a short story feed on his profile. When I try to use the Facebook Developer Toolkit with the following command (to see if the permission already exists): API.permissions.checkAvailableApiAccess (API.ApplicationKey) I get an error 100 (not written in Facebook's wiki) How can any of you decide on this, and exactly how the user with Appropriate Premier request How do you indicate? Thank you! Attempt to see if you need to authenticate your app and user on Facebook using OAuth You can authenticate a user using OAuth and ask permission to work with Facebook API.

Modify Array to Output in JSON using PHP and jQuery -

I am currently working with it. They are the code provided in the display: "peter@pan.de", "Molly" => "molly@yahoo.com",); $ Result = array (); Foreign currency ($ item as $ key) {if (stropo (stroller ($ key), $ q)! == incorrect) {array_push ($ result, array ("name" => gt; $ key)); }} Echo json_encode ($ result); ? & Gt; I would like to know how I can get my code out of my MySQL database. I have tried my revision, but I am not doing it correctly, this is what I am trying to do: $ q = strtolower ( $ _ GET ["q"]); $ Sql ​​= "name select from user_info"; Required ("connection.php"); $ Result = mysql_db_query ($ DBname, $ sql, $ link) or die (mysql_error ()); $ Rows = array (); While ($ r = mysql_fetch_assoc ($ result)) {$ rows [] = $ r; Foreign currency ($ key as $ $) {if (stropo (stroller ($ key), $ q)! == wrong) {array_push ($ result, array ($ key)); }}} Print json_encode ($ rows); And

mysql - I am trying to do an ASP like repeater in PHP -

& lt; php $ dbhost = 'xxxx'; $ Dbuser = 'xxxx'; $ Dbpass = 'xxxx'; $ Dbname = 'xxxx'; $ Conn = mysql_connect ($ dbhost, $ dbuser, $ dbpass) या मर ('mysql से जुड़ने में त्रुटि'); mysql_select_db ($ dbname); $ परिणाम = mysql_query ("चयन करें * FROM mytable"); $ पंक्ति = mysql_fetch_array ($ परिणाम)? & Gt; & Lt;? Php foreach ($ पंक्ति $ पंक्ति के रूप में):? & Gt; & Lt; tr संरेखण = "केंद्र" & gt; & Lt; td & gt; & lt;? Php ईको htmlspecialchars ($ पंक्ति ['Picturedata']); ? & Gt; & lt; / टीडी & gt; & Lt; / टीआर & gt; & Lt;? Php endforeach; ? & Gt; मुझे एक त्रुटि मिलती है: चेतावनी: foreach के लिए अमान्य तर्क दिया गया है () आपको हर पंक्ति को खींचने के लिए थोड़ी देर लूप करने की ज़रूरत है। mysql_fetch_array () एक समय में केवल एक पंक्ति को खींच देगा इस समाधान पर विचार करें: & lt;? Php $ dbhost = 'xxxx'; $ Dbuser = 'xxxx'; $ Dbpas

Open id and facebook implementation in php? -

I am using an open id on my website using the library, but I can see the form of an open ID provider Facebook also supports OpenID ... Can anyone help me with an explanation or link me with a tutorial (staga.net is using it without any faults on its site) ) * If someone can tell me that Instead of using a text box (even uses a text box) to support an open ID, how is the use of the GO button ... Thanks checkout I'm not sure I'm making a mistake, but I'm not sure that Facebook is still an open-end ID provider Instead, consumers can log on to Facebook using your Gmail account, but you can log on to Facebook You can not log in to Stakeoverflow using the Facebook account. The last time I checked, I got an opportunity to sign an openID sign to Facebook so that it could be remembered. To log on to the service using OpenID, go to Account Settings> linked accounts, choose an OpenID provider. However, Facebook requires that your provider remembers setting that if you

.net - Recommendations for a WinForm interactive chart control -

I'm looking for a WinForm.Net chart control that has more features on user interactivity. Some specific things that are in my mind: Multiple selection of bars / bubble Drag-drop support for bars / bubbles from chart control Auto highlight on mouse-hover Any suggestions. Thank you ~ Eric You Super 2d / 3d graph library (this is royalty free and it is very cheap). Features: More than 45 different chart styles (2D, 3D, XYZ, COMBO, GEZ, GANT, RADAR, ...) Formula plotting in 3D (scatter, line, triangular-surface, tray-surface) Data gounding and excel support Zoom and panning support Surface chart Support for PDF and SVG formats Support for standard bitmap formats (PNG, TIFF, BMP, GIF and JPG) Build-on-flyer support for high quality animated GIF Very easy for u Only one assembly file (1 DLL) < / Li> Well documented - Online tutorials and 184 page developer references Clear type support and auto antialiasing Additional calculatio

c++ - Operations and functions that increase Virtual Bytes -

In order to keep some memory issues with 32-bit processes in Windows, I use some monitors Process that has started using the Performance Monitor Although it is normal that virtual bytes are more than both private bytes and working sets, I came to know that there was a significant difference in my case, virtual byte very private bytes and working Set is higher than both. Will the virtual bytes increase in specific operations and Win32 / CRT functions (C or C ++), but not private bytes and working sets? I think it will be some kind of shared resource, if I understand the details of different counters in the performance monitor. It seems that there is some (at least) confusion in the naming convention, for different applications in Windows releases similar to the memory counter for different applications. To do this, I put the following together: Information from MSD N According to the 32-bit process, 32-bit Windows user-mode virtual address space The range is usually 2

class - Should I refactor static nested classes in Java into separate classes? -

I have a legacy code that has static nested classes: public square fu. Fu Field and Functions // ... Private Static Class S Group {Private Static Map & lt; Integer, s group & gt; IdMap = new hashmap & lt; Integer, S group & gt; (); Public SGroup (int id, string type) {// ...}}} By reading SO (like) I believe it is equal to two separate classes : public square fu {// fu field and function // ...} and public Class SGUPP {constant map Integer, s group & gt; IdMap = new hashmap & lt; Integer, S group & gt; (); Public SGPUP (Int id, string type) {// code} If it is correct, is there any advantage to maintaining a static nested class structure or should I need a refactor? The statement is correct and usually appears as the following rule of thumb: An exception occurs when you define a nested class to allow easy access to the status of hosted class, in which case you consider < / Div>

iphone - Nsrange problem when it should return 0 -

So, I'm trying to do a nsstring search for a range, but whenever we are in range Does not match that result, I get something on the lines of 0 to 2748601949 as opposed to. For example, I'm trying to "sin (", @ "cos (", and @ "tan (" string + like + 1 + sin (28) ") + Cos (72)" Thank you " / P> This is returning NSNotFound , which is NSObjCRuntime.h is defined in: enum {NSNotFound = NSIntegerMax};

Perl - Ruby mapping? -

I was involved in a new project where Pearl should be one I'm coming from a good Ruby Foundation and Pearl and Ruby Want a quick introduction or mapping between me like I have heard that Pearl and Ruby are very close to the syntax (nothing is known about the FEATURES) Do you have any recommendations for me? Are you booking a great Pearl as an extended reference? The commonly used version is a second time in Nathan's book, although I would also like to mention that Em> Pearl start There are two bonus features (1) It is freely available (and legally) (Note: this site is currently a deadline, and I am unsure whether it is temporary or not) and (2) it Learns Pearl and Intermediate Pearl combined thief is that it is time The primary thing that you might want ( Learning Perl gets faster and feels a bit higher - which can be a good thing.) You can also see: Think in the opposite. In the context of the volumes, 5.10.1 is stable, but you will come across a li

javascript - jQuery Key Events with a Search Box -

I am working on an automatic advice plugin with jQuery, and I would like to add a keypress event so that the user down arrow Able and up In addition, if they enter, it will add value to the input. This looks like my HTML: & Lt; Label = "search" & gt; & Lt; / Labels & gt; & Lt; Div id = "myInputResults" class = "results" style = "display: block;" & Gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A & gt; Div class = "recommended class" & gt; Suggestion # 1 & lt; / Div & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A & gt; Div class = "suggest class" & gt; Suggestion # 2 & lt; / Div & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A & gt; Div class = "suggest class" & gt; Suggestion # 3 & lt; / Div & gt; & Lt; / A & gt; & Lt; / Li &

wpf - Nested grouping in ListView -

Is it possible to define some groups in a list view? I mean group inside the group, it's like a tree if yes - a link to sample, tutorials. You can use it to define a personal item - it is usually in a control Used

c++ - OpenGL with FBO RTT, blending when it shouldn't -

It should be really simple, but it has been consumed multi-hour of my time, and I have a clue That's not what's happening. / P> I'm providing a flat-color full-screen tray for texture, then read the result glGetTexImage. It is related to GPGPU, so I want to behave alpha values ​​as if it is any of the other three, using an NBIDI card on MacBook Pro with a FBO, textual format GL_RGBA32F_ARB , 10.5 I am, if it matters, it matters. If I specify alpha then I only bring the right color back to the one; With any other value it is already in the framebuffer, still I have been explicitly compromised with GL_BLEND has been disabled and I also see the glBlendFunc (GL_ONE, GL_ZERO ) , but the end result is the same I can clear the framebuffer in zero before render, which fixes it, but I have to understand why it is necessary . As a second test, rendering two overlapping quads gives a mixed result, when I just want to return the original 4-channel color, should definitely

javascript - How should i hightlight any link on mouseover in my page? -

I want to highlight all the links in my website when events occur on them on the mouse. I do not want to type the onmouseover attribute in every link and there should be some place where I can declare this highlights effect globally. > How should I do this? Use CSS You should use external files, if you make it the same for the whole site Want to a: hover {background-color: rgb (255, 255, 0); } You can use class or anything else such as JS but I think the above examples would be fine if you want to make it for all links.

c++ - GDI+ Bitmap Save problem -

बिटमैप बीएफएफ (एल "1.jpg"); Bff.Save (एल "2.jpg", और Gdiplus :: ImageFormatJPEG, NULL); यह शून्य-बाइट लंबाई के साथ एक नई फ़ाइल 2.jpg बनाता है। क्या यह एक ऐसी छवि फ़ाइल नहीं लिखना चाहती है जो 1.jpg के समान है? मुझे शून्य-बाइट की लंबाई वाली फाइल क्यों मिली? मैं यह परीक्षण कर रहा हूं क्योंकि अन्य बिटमैप्स को फाइल में लिखना, परिणामस्वरूप एक ही आउटपुट। यहाँ एक है इसे सहेजने का तेज़ तरीका, चूंकि एक कस्टम फ़ंक्शन है: // PNG सीएलएसआईडी pngClsid में सहेजें; CLSIDFromString (एल "{557CF406-1A04-11D3- 9 ए 73-0000F81EF32E}", & amp; pngClsid); बीएमपी। सेव (एल "फाइल पेज", & amp; pngClsid, NULL); और अन्य प्रारूपों के लिए यहां आईडी है: bmp: {557cf400-1a04-11d3-9a73-0000f81ef32e} jpg: {557cf401-1a04-11d3- 9a73-0000f81ef32e} gif: {557cf402-1a04-11d3-9a73-0000f81ef32e} tif: {557cf405-1a04-11d3-9a73-0000f81ef32e} पीएनजी: {557cf406-1a04-11d3-9a73-0000f81ef32e}

php - Help with static class members -

I have always used this in my classes, now I have to use a steady class and I am lost. Can anyone tell me how to use this stable members? I have tried to see some tutorials, but this is not easy to understand. Thank you. class db Private static $ example; Private static $ database_name; Private static $ database_user; Private static $ database_pass; Private static $ database_host; Private static $ database_link; Personal Function DB () {self: $ database_name = "name"; Self: $ database_use = "user"; Self: $ database_pass = "password"; Self: $ database_host = "host"; } Public stable work getInstance () {if (! Self: $ instance) {????? Auto :: $ instance = connect (); Returns self: $ database_link; } Return Self: $ example; } Function dbLink () {self: $ connect (); Returns self: $ database_link; } ... Edit: In addition to this, I am really interested in using the static sections on class members who are really interested in the clas

C# Working with Linq binding -

मैंने निम्नलिखित के रूप में प्रकार डिज़ाइन किए हैं: class cricket {string type; टीम टीएम; सार्वजनिक टीम टीम {वापसी {टीएम; } सेट {tm = value; }} सार्वजनिक स्ट्रिंग प्रकार {get {return type; } सेट {type = value; }}} वर्ग टीम {स्ट्रिंग देश; खिलाड़ियों को पीएलआर; पब्लिक प्लेयर्स प्लेयर {प्राप्त करें {वापसी प्लर; } सेट {plr = value; }} सार्वजनिक स्ट्रिंग देश {वापसी देश; } सेट {country = value; }}} वर्ग के खिलाड़ी {string name; दिनांक समय डब; इंट रन; सार्वजनिक स्ट्रिंग नाम {get {return name; } सेट {name = value; }} सार्वजनिक तिथि टाइम डीओबी {वापस लौटें; } सेट {dob = value; }} सार्वजनिक एट रन {get {return run; } सेट {run = value; }}} मुझे LINQ तकनीकों का उपयोग कर निम्नलिखित को प्राप्त करना है। 1) सभी टीमों के बीच सबसे कम उम्र के खिलाड़ी के सबसे युवा डेटा 2) प्रत्येक टीम का सबसे पुराना खिलाड़ी 3) उच्चतम रन स्कोरर को स्वर्ण पदक प्राप्त होगा, सभी टीम के बाकी खिलाड़ियों को रजत पदक मिलेगा (कृपया GetPlayer को देखें) मैंने मेड मेडल = न्यू स्ट्रिंग [] ("गोल्ड", "रजत&quo

javascript - Jquery help me analyze what happened: mouseover/mouseout ok but not hover/unhover -

I am working on some code where I trigger the code on hover / unhover . Then I decided to trigger the same code on Focus / Blur . Generally with hover / unhuror , I can always type as no commas format. But this time when I was trying to add Focus / Blur then I had to use the bind and with the second part was to use this.bind Such as: $ .fn.gogogo = function (msg) {$ (this) .bind ("focus hover", function () {$ ("# screen") .html (msg) ) .show ();}); $ (This) .bind ("blur unhover", function () {$ ("# screen") .html (""). Hide ();}); } The problem was that whatever I did, I did not take hover / nonover / . I had to return to mouseover / mouseout Code hover / unhover vs mouseover / mouseout $ In addition to Fn.gogogo = function (code), the code is the same {$ (This) .bind ("mouseover focus", function () {$ ("# screen") .html (msg) .show ();}); $ (This) .bind ("mouseout blurred", fu

C# OnPropertyChangedEvents Implementation and Delegate Question -

I have a progress bar on a UI that I want to update when a record is inserted in my database When I did not have any UI tier and no business category, there was no problem. But now I am breaking my code in a UI tier, business tire, and data tier and how can I properly call my on-property change event in my data tier from my business level and update my UI I can get it. I am going to get acquainted with the representatives so that any advice is helpful. Thank you! Typical You do not want to provide any information about the business level of the data level, that is what you want Use dependencies (use abstraction) UI -> BLL -> DAL If you want to get notifications from data level, then when a record is inserted, in the way you enter business level subscription data level On-OneInstate, OnAfter Ins Can be exposed to events such as ert, onburner updates, overheadupdates, etc. Invite this event before and after the DB operation, you can prepare a custom eventArgS class, you

c - How to share register and bit field definitions between a device driver and the FPGA it controls -

Are there any good, existing software tools available, which are the C header files with the proper offset # bit definitions from VHDL? If such a tool exists, then what restriction can they put on VHDL and how should it be exported, which should be named? Li> by PDTi Based on these devices, I am also interested if the appropriate workflow is available VHDL is both to produce C instead of trying to go directly to VHDL (perhaps with extra tags in the comments). I think the last who you wanted to get angry was sending you in the right direction. And I agree with Red Gray that you should consider changing your work in a little bit. Have you thought about having a 'master document' for your control register information and auto-generated everything from yourself - RTL, testbank code, driver software header and documentation? I worked on projects where control information was placed in a master spreadsheet and all the things generated by it were nee

flex3 - flex 3 component using x y as center, not topleft -

How do I extend components such as buttons to use the X and Y values ​​as the center of the component? / P> This is very easy in Flex 4 :). They have a transformroundround method in the UICom ponents, so that you can change the position / scale / rotation of a component around any arbitrary axis. You can do this: Override public function set X (value: number): zero {var smoke: vector 3D = new vector 3D (this. Width / 2, light light / 2, 0); Var Translation: Vector 3D = new vector 3D (value, this, yes, it); Consequently approx (spindle, zero / * scale vector * /, empty / * rotation vector * /, translation); } You can customize / optimize it, but that's it :). If you are using Flex 3, then I see how they did it. It's very hardcore, lots of matrix / matrix 3D accessories.

jQuery plugin that takes user method -

I am working on a jQuery plugin and I want the user to set a flag (in code) to the right . I already have the necessary flag, I need a route to execute the method passed. For example: (function (jQuery) {$ .fn.extend ({pluginName: function (option) {var defaults = {parameter1: 0, method: function () {}} Var (flag) {if option.parameter1 & gt;}} {flag = true;} (flag) {if option} // call user method} jQuery (this) .hide ();}); // end returns} / END counter method}}} // expansion}} // eND function return // jquery object (jquery); Users call it this way: < Pre-> $ ("# divName"). PluginName ({parameter1: 1, method: function () {warning ("test")}}}); Did not test the given code, it If you are trying to do, thank you in advance! There is no difference between the user-supplied method, such as your example and any other method. Therefore, you can call it the same way as you say to any other method. For example: if (flag) opt.method ();

linux - C++ fork() and execv() problems -

I'm a type of novice on C ++, and I'm working on a simple program on Linux, Invite the program to get the output of the program delivered without showing the output of the program applied to the directory and the console. This is the code snippet on which I am working: pid_t pid; Cout & lt; & Lt; "General message:" & lt; Andal & lt; & Lt; Sentence & lt; & Lt; Endl; The court's & lt; & Lt; "===============================" & lt; & Lt; Endl; // int i = system ("./satzoo"); If (pid = fork () & lt; 0) cout & lt; & Lt; "The process could not be created ..." & lt; & Lt; Endl; Else {cout & lt; & Lt; Pid & lt; & Lt; Endl; Execv ("./ Satzoo", zero); } COAT & LT; & Lt; "General Sentence:" & lt; And L & LT; & Lt; Sentence & Lt; & Lt; Andal; The court's & lt; & Lt; "===============================

Python/numpy tricky slicing problem -

I have a problem with some oval stuff. I need an oval array to behave abnormally by returning a piece as a view of a chopped data, if not a copy, then I have an example of what I want to do: We say that there is a simple array like this: a = array ([1, 0, 0, 0]) I With the entry, I would like to update the entries in the array continuously (from left to right), in this way Using the settings: a [1:] = a [0: 3] This will bring the following result: a = array ([1, 1, 1, 1]) or something like this: a [1:] = 2 * A [: 3] # a = [1, 2,4,8] To clarify further, I need the following types of behavior: For Category (lane (a)): if i == 0 or I + 1 == lane (a): a [i + 1] = a [i] Continue, except I want speed of numpy The numpy's default behavior is to take a copy of the piece, so what exactly do I get: a = array ([1, 1, 0, 0 ]) I already have this array as the subclass of ndarray, so if necessary I can make more changes for this, I just need slices on

Escaping with this PHP function is unsafe? -

अगर मैं addcslashes ($ input, chr (0x00)। Chr (0x0d)। Chr (0x0a)। Chr (0x1a)। Chr (0x5c)। Chr (0x27)। Chr (0x22)); क्या SQLi को रोकने के लिए पर्याप्त होगा? मेरे पास सभी आवश्यक अक्षर हैं, इसलिए जब तक यूटीएफ -8 इनपुट है, तब तक इसके साथ कोई समस्या नहीं होनी चाहिए। बेशक विधि का अमान्य उपयोग या कुछ इसी तरह के कारण एसक्यूएलआई हो सकता है मैं इस का उपयोग कर रहा हूं क्योंकि मैं डेटाबेस से कनेक्ट किए बिना भागना चाहता हूं और मुझे पता है कि मेरा इनपुट यूटीएफ -8 है, अगर ऐसा नहीं है, तो मैं इसे परिवर्तित कर रहा हूं। मैं इसका उपयोग कर रहा हूं क्योंकि मैं डेटाबेस से कनेक्ट किए बिना भागना चाहता हूं विशिष्ट मामले के लिए MySQL बस संभव नहीं है। कनेक्शन बनने तक, PHP नहीं जानता कि वर्ण एन्कोडिंग का उपयोग डेटाबेस के साथ संवाद करने के लिए किया जा रहा है, और इसलिए यह नहीं पता है कि आपके स्ट्रिंग में ' बाइट्स ' वर्ण अगर आपका कनेक्शन हमेशा यूटीएफ -8 है, तो आप सुरक्षित होंगे, लेकिन यदि उस कोड को सर्वर पर तैनात किया गया था, तो यह कहता है कि Shift-JIS, आप एक आंशिक-चरित्र ' बाइट स

wpf - Enable Button and DelegateCommand -

How can I disable a button as long as the required data is Textbox ? I'm compelling the public ICommand LoginCommand {if (_loginCommand =) I button to ICommand : = Null) {_loginCommand = New DelegateCommand & lt; String & gt; (This.login, this.iswildid); } Return _ login prompt; }} like this: & gt; Button style = "{StaticResource LoginButton}" content = "login" command = "{binding login command}" commandpalmter = "{binding text, elementname = TSTUSUSERNAME}" /> You need to increase the requery event, it's easy with a delegation command < / P> Public class MyViewModel: Also, if there is no concrete reason to build your property type representative, then you should do this. View Module {Private string _myTextField; Public string MyTextField {get {_myTextField; } Set {_myTextField = value; OnPropertyChanged ("MyTextField"); // Here is the magic log-in command. Ricex Expect switch

Is xmlns="" a valid xml namespace? -

Is "empty" a valid value for XML namespace? If yes, what does this mean? I have the following XML code, but I'm not sure which place's name is related to the location Field1 and Field2 element & lt; Soapenv: envelope xmlns: soap = "http://schemas.xmlsoap.org/soap/envelope/" & gt; & Lt; Soapenv: header / & gt; & Lt; Soaps: Body & gt; & Lt; Root xmlns = "uri" & gt; & Lt; Field 1 xmlns = "" & gt; 147079737 & lt; / Field 1 & gt; & Lt; Field 2xmlns = "" & gt; POL & lt; / Field2 & gt; & Lt; / Root & gt; & Lt; / Soap: body & gt; & Lt; / Soapenv: envelope & gt; Yes, that's valid. Specifically says: The attribute value may be empty in the default namespace declaration. Quoted from the comment: P> It's legal, and it's global There is a way to bring an element in the name space.

c# - Calling WebService using Service Reference and Maintain Session -

I have an asp.net web service that I use from my asp.net website. To get the post / data, I can call it with raw javascript or jQuery. Web service is enabled with a session so that only authorized users can access the data. [WebMethod (EnableSession = true)) Public WS_ServiceResponse SetAccountName (string account, string name) {WS_ServiceResponse osr = new WS_ServiceResponse (); WS_ServiceResponse sessionCheck = test session (session); Check the return session if (sessionCheck.result == WS_ServiceResponseResult.fail); Osr.result = WS_ServiceResponseResult.success; Osr.data = ""; Boole Success = AccountController. SetQquintInfo (account, name); If (success) {osr.result = WS_ResponseResult.fail; } Return OSR; } Now I have to create a desktop client to consume the service. I can add ServiceReference to it, but how will I maintain the session with that service? When I call webservice, the result is failing = Anyone can tell how to manage sessions in the webservice cont

sharing - What methods do programmers prefer to use when learning new subjects or technologies -

When you are learning a new topic or technique, how can you use it to remember your accomplishments? ? In the past, I have used a variety of methods, including some of the following: - Paper-based journal (A4 paper bites in half with a guillotine , And the plastic is bound with the spine.) Keep it in chronological order, and continuously restore the group reconstruction or similar pages together. Email - I often email myself the snippet of code Test Programs - Small self-contained snippets project code. Proto Page - Web-based repository of notes. Memory - often the least reliable method, but sometimes it is better. Finally: - Stack Overflow - I had asked a question here before because I was working on the solution. Then came back to answer my own. Is this acceptable use of stack overflow? Thinking about the questions I think about them, and then for an hour, a few hours, or later when I have worked through it, I am coming back to answer. Maybe I am getting the an

.net - Loading Assemblies -

Many discussions show how to load assemblies from Bin and GAC ... my question is more general And I would like to know how assembly loading work. For example In the BIN folder we can A.dll A.dll. Config A.dll.config file can look like this: & lt ;? Xml version = "1.0"? & Gt; & Lt; Configuration & gt; & Lt; Startup & gt; & Lt; Supported serial version = "v2.0.50727" /> & Lt; / Startup & gt; & Lt; / Configuration & gt; I am helping to set the right assembly reference. I was wondering how can I create an ALL which needs B.dll, but specify no version always. Which will take you to the BIN folder. My question is in relation to the SDK update and all my code still indicates the old SDK version, I want the resource for my assembly, top of all versions of BIN or GAC and Use it ... How can I say that in Visual Studio? I can only add a reference to the physical file (version): - ( If I understand co

java - Is there a helper to know whether a property has been loaded by Hibernate? -

I need an assistant to know how to avoid an asset LazyInitializationException Whether or not it has been loaded in the form. Is it possible? @ Entity Public Classroom Parents {@OneToMany Private Listings & lt; Child & gt; ChildList; } @ Entity Public Class Child {} Select "Peach P. Builder List" to select a different PIN from "Parent P; // Answer goes here // I want to save from LazyInitializationException SomeHelper.isLoaded (p.getChildList ()); There are actually two methods. Whether a lazy property has been started to find out, you can use the method as a parameter for your organization example and property name. To know if the lazy archive (or the organization) has been started (like in your example) you call the parameter (example) as a parameter with the example can do.

vsto - Is there a list of IDs for the Outlook MAPI namespace? -

I am working on an Outlook add-in and I am looking for the complete list which is the MPI properties there There is a lot to use those qualities, but I am not getting anything that tells me what is the property. p> PS I have seen this on this subject, but in reality I would like more information on this subject. Alternatively, if there is information to expand outside the Office Assistant, it will be appreciated. Thank you. In some very rare cases MS documents are present as you have seen. Exchange Server SDK gives you at least some symbolic names, knows something by name, some names are given, float around the net As far as I know, There is no definite complete list. Edit: If you were looking for properties of properties, OOM should, however, take the name of most of the Outlook Spy In. It has a 30-day trial period and quickly becomes invaluable while working with Outlook. And no, I can not find the provision;)

.net - Hosting a long running process in IIS -

I have a design scenario that is giving me some headaches and I am thinking that the best solution is the solution. / P> I have an application like a dashboard that chooses information from a service that requires a Java RMI connection to collect real time data. I want to implement that dashboard component in silver light and provide data using WCF. I have prepared a solution for this with the .NET Remoting and Windows Form in the past. My previous design was a Windows service, but I am thinking that I have a way to host such a service in IIS. Service Required: -> Open RMI Connection (This is done with 'Ikvm) -> Drag data at regular intervals -> New data of updated customers has arrived (supervisor pattern) Can I implement a single instance of my data collection class and register supervisors? Do I host WCF only in a Windows service? Any other ideas? Web architecture is essentially just about responding to requests, with the customer voting again Push ca

Update Drupal views argument via AJAX -

I have a request related to Drupal 6.x, I want to do this behavior: Imagery Do 2 columns, a list of nodes on the left (for example only the title), and one view on the right is showing only one content on the left. I think it has to be achieved with an AJX-fashion: in the list on the left update Click on a link to see the right side of the actual node. What is the best way to handle it? My idea is to use panels, to create 2 column panels with 2 scenes, not filtered on a type (left) content type, there is no logic, and one on the right side of the form of a node ID Takes in the display But how to link 2 ideas with AJAX? Any help or idea is really welcome thanks! Cheers Mauro You can also make a quick hack, which is quite flexible Because it allows you to change your thoughts without changes in the code. I have had a similar job recently and for my work, I will do the following: For your right column, a highlight filter (node ​​ID) Create and hide the full highli

wpf - How to wire up a click event for a custom usercontrol button? Should I use CustomControl? -

I wanted to create a button that contained an image and had a text block in the form of the material so I wanted to find an answer Told and found a post ( ) that asked me to create a user control. I did this and it works great, I can set text through image source and dependency properties. However, I'm stuck because there is no click event for my control. I dig a bit further and concluded that maybe I need a custom button-generated custom control. is this correct? Or would it be better to wire one click event on my usertrinstr? Here's my User Control: & lt; UserControl x: Class = "Client.Usercontrols.MyButton" Xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns: x = "http://schemas.microsoft.com/winfx/ 2006 / xaml "Minhite =" 30 "minwid =" 40 "datacentext =" {binding relative saras = {relative escrows}} "& gt; & Lt; Button width = "auto" horizontal align = "

visual studio 2008 - Is it possible to "go to next highlight in solution"? -

With ReSharper, I can "go to the next error in the solution", but it seems that "go to the next attraction "Is it possible to open the currently open file only, or is it possible to" go to the next hint in the solution "? What about the keyboard shortcut ReSharper.GoToNrxtErrorInSolution (enter the "next error" to find the tool / option / keyboard, then easy)

linq - How to implement a Query with IQueryable in SilverLight -

I have two table customers, pay and apply a gridview to silver light with the result of these two tables. The query is as follows: SELECT Pa.Tipo_Pagare, Pa.Pagare, Pa.Rut, Cli.Nombre FROM Cred_Crexsa.dbo.Pagare AS Pa Inner Cred_Crexsa.dbo.Clientes AS Cli Join ON Pa. Root = Cli.ru where (p. Nalo <> <> and (Pa.Extraviado <> Thanks a lot Leonardo Moreno Flores There is no DB library in Silverlight, you must write a webservice or query your web server by selecting your ORM Rebuild (many of them now prefer you, support the LINQ feature) or you call a stored procedure posted on SQL Land.

sql - How do I list all the available views of a particular table in SQLite? -

I want to use all the special scenes in a particular table in SQLite. I know that I can get a list of all the available tables in the database by using the name WHERE type = 'Table' from sqlite_master sqlite_master; and list all available views select sqlite_master from type WHERE type = 'view'; But I want to find all available views for a specific table. How do I do that? extension-functions c; No need to use; Just use the "Like" operator: Choose from sqlite_master name WHERE type = 'view' and "% _tablename_%" like SQL; If you have the table names in which the other table names are placed as substrings, or the common SQL reserved word (like "here" or "rom"). You can terminate the latter by: Select from sqlite_master name WHERE type = 'view' and SQL "% FROM% tablename% WHERE%"; Providing ideas that you are trying to find in conformity with specific models.

Silverlight Child Windows -

Is there a way to make a hair window non-dragable in Silverlight 3? You can change the code to make your own custom (which is available here), But there is no default setting to change it.

c++ - using namespace issue -

जब मैं निम्नलिखित का उपयोग करता हूँ #include & lt; map & gt; नेमस्पेस एलसीडी कंट्रोलोल का उपयोग करना; एसटीडी नेमस्पेस का कोई भी संदर्भ एलसीडी नियंत्रण नाम स्थान से जुड़ा होता है। उदाहरण के लिए: Generic.h : 24 9: त्रुटि: 'नक्शा' एलसीडीसीटोलोल :: एसटीडी '' का सदस्य नहीं है मैं इसे कैसे प्राप्त करूं? मैंने किसी भी प्रलेख को देखा जो मैंने देखा था। उनमें से ज्यादातर ने उपयोग नहीं करने का निश्चय किया: नाम स्थान का उपयोग करके std;। यहां पंक्ति 24 9: के लिए (std :: map & lt; std :: string, widget * & gt; :: इटरेटर w = विगेट्स_.बीजिन (); ऐसा लगता है कि एक < std नामस्थान को छुपा रहा है, जो एलसीडीसीएन्ट्रोल के भीतर कोड> एसटीडी नामस्थान। :: std :: map के बजाय Std :: map । मैं कहूंगा कि या तो नामस्थान std का उपयोग कर कहीं से LCDControl नाम स्थान में हो सकता है, या संभवतः वहां एक #include एक एसटीएल हेडर के std को LCDControl नाम स्थान में परिभाषित करता है। उदाहरण: < नाम स्थान एलसीडीसीनट्रॉल {#include & l

jquery autocomplete with json response -

Image
im receiving feedback in json, but this does not parse Jason's response. What am i doing wrong I can not find anything at the doctor $ ("# user-permissions"). Autocomplete ("/ people / following .json", {width: 320, // maximum: 4, highlights: false, scroll: true, scrollwhite: 300, formatITIM: function (feedback, eye, max) {console.log ( Response; console.log (feedback ['item']); console.log (response.items); I + "/" + max + "return: \" "+ response.status_code +" \ "[" + response .status_description + "]" // return " $ ("# user-permissions"). Autocomplete (" / People / following .json ", {width: 320, data type: 'jason', highlights: false, scroll: true, scrollwise: 300, pars: function (data) {var array = new array (); for ( Var i = 0; i & lt; data.items.length; i ++) {array [array.length] = {data: data.items [i], value: data. Items [i], results: data. Items

c - Can I and should I use CMake for my setup -

The project I work on is organized in root folders (VOBs): | --BUILD_FOLDER | | - BUILD_SCRIPTS | | - SOME_MORE_CODE | | --COMPONENT_A | --COMPONENT_B There is no high level root folder to place any CMakeLists.txt because they are ClearCase VOBS. This setup does not seem to fit the CMake pattern. Is it a show-stop to use the limit? It seems that the limit requires everything as it descends from a point. . Is Seamkey the right tool for non-windows / Linux targets? Projects use custom C compilers and invite third party tools to create application files in many formats. Your components have the CMakeLists.txt file The directory does not have to be a subdirectory. Place it in the folder with the same rank as the components and just use the related path in your ADD_SUBDIRECTORY command: ADD_SUBDIRECTORY (../class A.) ADD_SUBDIRECTORY (. ./class B) I suggest you arrange your folders | --BUILD_FOLDER & lt; - This directory is created by "make&q

Python: How to check if a nested list is essentially empty? -

What is the most powerful way of check if list (a elements With the lists, the nested list is essentially empty ? What do I mean by the empty space that there can be elements in the list, but these are also empty lists. for example For all the following lists should be positive for the emptiness: [blist = [alist] # [[]] clist = [alist, alist, alist] # [[] , [], []] List = [blist] # [[[]]] < P> If you do not have to iterate through lists, then simple is simple, something like this will work: def empty_put (input_list): "" "values ​​in nested lists Iterated through iterated. "" "" Input_list for item: if not (Item, list) or empty_tag (item): The wrong return refund is true However, it would be best to exclude the recurring frequency that you might most probably know from somewhere else That is, it does not give any element, so if the mechanism of movements changes, then you need to apply the change

visual studio 2008 - Requirements gathering with Team Foundation Server -

Using TFS 2008 / VS 2008 to Build and Work (Top Level) Task Items for Needs possible? At present, our BA uses Visioso and Word to narrow our needs, so there is no formal UML type user story / case based design, although I am trying to implement something like this. Our solution mainly uses the following technology mixtures: VB.Net/C# 3.5 SP1 MetLab 200B SQL Server 2000/2005/2008 Oracle 10G Office 2003 / 2007 (VBA and VSTO) I have previously searched on Google and Microsoft's sites, but it is adaptive third party process templates and interfacing with all other existing BA devices. Bit will power. There should be a best practicing approach that I do not think find it anywhere. Customizing or authoring TFS project templates is very easy, you install TFPT (Team Foundation Power). Tools), and a "Process Editor" menu in which "Studio" will be added to the "Tools" menu, where you can easily apply any customization. So, basically you can work i

Set background image for forms windows mobile -

I'm new to Windows Mobile I need to set the background image for the form, but I set the background color I can only see the option. Apart from this I tried to set the background image to control the tab, even there I did not see any option to set the background image. How do I set a background image? Thank you, On-paid override and draw in your own image Some: protected override zero onpaint (paint event erg e) {base.OnPaint (e); E.Graphics.DrawImage (myBackGroundBitmap, 0, 0); } Of course you have to load that image, and you want to tile it, center or scale it, but this process is really simple.

svn - Are there any public subversion hosts that will let my use my own repository? -

Actually, I have a project that I'm working for a while, and the public has an open source project A type of or some other (to be determined, but out of the scope of this question in any way) The question is, to manage my own code, I am using the subcontractor repository. Is there a host, that I should push my own stock to my server so that all my revision history is lost, when I was public, or did I prevent my first public version from being a host or the other and moving forward? Google Code

html - How to read the encoding header without knowing the encoding? -

If I'm reading an XML of the HTML file, then I do not want to read the tag that tells me the encoding file Able to read? Is not that type of file encoded by the file? I'm curious to know how to read that tag along with knowing encoding. I know that this problem has been solved. I am just curious how it happened. Update 1 I do not get it, each character takes 2 bytes in UTF-16 habit, not one, and isolated from ASCII? For example, in the UTF-16 (U + 0045), the character E. 0xfeff0045 is 0xfeff if 0x0045, but some encodings change its endian. Do you have to understand it with checkin for 0xfeff and realize that ASCII or nothing can be done? What is the W3C to say about it: XML encoding The declaration function denotes an internal label on each unit, before the character encoding is in use before an XML processor can read the internal label, however, it should be clearly known which character encoding is in use - which That internal label is trying to signal. In t

c# - ComboBox with IEnumerable<Brush> as ItemsSource and SelectedItem exception -

मेरे पास कॉम्बोबॉक्स के साथ यह मुद्दा है जो IEnumerable & lt; brush & gt; आइटमों के रूप में; समस्या तब होती है जब मैं (प्रोग्रामेटिक रूप से) SelectedItem को सेट करने का प्रयास करता हूं यहां कोड है जो समस्या का वर्णन करता है: निजी रीडोनली सूची & lt; ब्रश & gt; रंग की_; निजी ब्रश white_; ViewModelConstructor () {colors_ = (brushes_type.GetProperties () में पी में से चुनें (ब्रश) कनवर्टर। कनवर्टफ़ोमस्ट्रिंग (पी। नोम))। ToList (); White_ = colors_.Single (b = & gt; बी.ToString () == "#FFFFFFFF"); } सार्वजनिक IEnumerable & lt; ब्रश & gt; रंग {वापस {return colors_; }} सार्वजनिक ब्रश व्हाइट {get {return white_; } सेट {if (white_! = Value) white_ = value; }} और यहां xaml कोड है: & lt; कॉम्बो बॉक्स आइटमस्सोर्स = "{बाध्यकारी पथ = रंग}" चयनितआईटम = "{बाध्यकारी पथ = व्हाइट } "& gt; & LT; ComboBox.ItemTemplate & gt; & LT; DataTemplate & gt; & Lt; स्टैकपैनेल ओरिएंटेशन = "क्षैतिज" & gt;

python - Adding and subtracting dates without Standard Library -

I am working in a limited environment for developing a dragon script My problem is That I should be able to complete addition and subtraction throughout the day. For example, I get the following string: "09/10 / 20,0 9: 59: 47-16" formatted as year / month / day, hours: minutes: second-ms How do I add 30 seconds to this number in Python? I can not do more than basic addition and subtraction and string parsing functions You are doing math in different bases, you will be able to parse the string and come up with a list of values Need, for example (year, month, day, hour, minute, second), and then add and subtract second-base math. For example, hour base is -24, so you have to use the modulus to calculate. It seems like a homework suspicious, so I will not go into any other detail :)

Char datatype in relationship entity framework problem -

I have a third party database where the primary key is a four datatype. When I run my query, Use one to include. The count is zero though. I look at the SQL Profiler and the results are returned. The only thing I can see is that the solution column is all around, any solution for this? Be careful of four ways "in 1234 & nbsp; & nbsp; & nbsp; & nbsp; & Nbsp; & nbsp; " ! = "1234"! DB can not be taken into account, but EF does.

iphone - Do I have to put my application manually into multithreaded-mode if I want to use threads? -

That is, I am creating a new thread like this: [NSThread detachNewThreadSelector: @ Selector (doSomething) toTarget: Object with self: zero]; Will it automatically make my application multithread or should I have some extra work somewhere? This is automated in the doc of that method: If it If the thread is the first thread in the application, then this method posts NSWillBecomeMultiThreadedNotification with the object zero at the default notification center. The GUI coco app has been built for a long time these days.

asp.net - Integrated Windows Authentication & SSL -

I have an administrative website on our intranet which currently supports integrated Windows authentication via IIS < uses it. We want to take this application to a public website and secure it with SSL, so that our users can access it from anywhere. I was planning to redirect http to https to use the HTTPS module but it does not work with integrated authentication (login popup appears before redirect). Am I stuck at the "Need SSL" checkbox in IIS? What will you do in this situation? This does not appear to be user-friendly because the user gets a good fat error page if they forget to use https URL. > We had similar problems on our intranet site and integrated Windows to request your network username / password directly. Switching from authentication was finished on the site This way we can redirect them to HTTPS or other such things when authentication displays popups. We have such a code (assuming you are using ASP.NET) which authenticates the user

math - When I divide numbers in clojure I get a fraction , how do I get the decimal? -

When I do (/ 411 125) , I do not find it in the context of decimal. How do i do this user & gt; (Float (/ 411 125)) 3.288 users & gt; (Double (/ 411 125) 3.288

objective c - Need help understanding "kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid Region" -

Your application (which makes a good bit of custom drawing) I get this error is running (this is a good bit No, there is a noticeable side effect, but I want to understand what is happening) So I set that breakpoint and this stack get receive. None of the stack frames are my codes, although of course I have underlined the draw of NSVu in some cases. Has anyone seen this before or seen as what is happening? # 0x94bee5f2 in CGErrorBreakpoint () # 1 0x94c831d8 in CGSGlobalErrorv () # 2 0x94a64b61 in CGSUnionRegionWithRect () # 3 0x912a2a70 - [NSRegion addRegion:] () # 4 0x912a28c1 in - [NSWindow _setNeedsDisplayInRegion:] () # 5 0x911f3548 - [NSWindow _absorbDeferredNeedsDisplayRegion] () # 6 0x911f2113 - [NSView _sendViewWillDrawInRect: clipRootView: suppressRecursion:] () # 7 0x91154ee9 in - [NSView displayIfNeeded] () # 8 in 0x9111e292 - [NSWindow displayIfNeeded] () # 9 0x9114f764 _handleWindowNeedsDisplay () # 10 0x9408eb02 __CFRunLoopDoObservers in () # 11 0x9404b65d

Why dont languages allow overloading of methods by return value? -

Ignore the return value in C, Java and many other languages. int i = func () float f = func () int func () {return 5} float func () {return 1.3} above Why is not legal? Does this make it more difficult for the program int i = func (func (func2 (func3 ())) // You do not know what you're getting Is it hard to write a compiler? Is there more language futility? Is there a language that can do the above? What about this matter? Class A tool Fu {/*...*/} Implementation of class B Foo {/*...*/} A Funk () {New A (Return); } B. Funk () {New B (Return); } Fu Wei = Monk (); // Do you call?! When you allow overloading of a function name, there are problems before ambiguity, which argue differently. Along with checking back type, it is very difficult to solve the correct work. I am sure a language can implement it, but it will make things more complicated, and generally the code is difficult to understand.

mod wsgi - Detect prematurely closed connection in web.py -

What is a way for the user to close and identify the connection during the processing process? I tried to set up a flip handler, but in this case it was not found. The request is only done successfully after completion: class handler: def __init __ (self): pass def (self): try: while: (true): except for exception Pass, e: logger .debug (e) def unload (): try logger.debug ('unloaded'): app = web.application (urls, globals ()) app.add_processor (web.unloadhook (unload)) Application = app.wsgifunc () Except the exception, E: Logger. Debug (E) I open the app in a browser and when it starts spinning in the loop, I break the request, but no exception is thrown. Generally there is no reliable way to do this because of the web server and WSGI's own working method. Read for an explanation: