Posts

Showing posts from May, 2011

c - OS X: Generate core dump without bringing down the process? -

I know how a core dump is generated on OS X when a process crashes, but I Actually what a process to do, produces a core dump, then start the process again (without killing it). A long time ago (maybe a year and a half years ago) I had a code that would have to do this ... it is used to connect OS X kernel libraries to a process, its All thread reads states and memory, and writes in a MchOo file on disk. It did great work (and what I actually see), but now I can not get that code for my life. I remember that this code was somewhat related to the OS X System Internal Book, but it Just remember a vague one. Does anyone know the code about which I am talking about and can talk to me on that? If someone does not know any good way to do this with some example code? EDIT: Here is the answer. Information: Program that I believe That you are looking for : Specifically: / P> / * Unix third edition, beginning in approximately 1973 / / * Ken / Sig. C / core () {int s, *...

How is MSBuild Incremental Building Different from Copy with SkipUnchangedFiles=true? -

If I have an MSBILD target that just copies the files, then the incremental building using the copy function and the setting Why would it be better SkipUnchangedFiles = true? Who said this? The only reason you can think is that if you later increase your goal to accomplish other tasks, just copy it.

C++ standard/de facto STL algorithm wrappers -

Is there a standard / real standard wrapper around a standard algorithm that explains the beginning and end of containers Let me show you what I mean with the code: // instead of specifying std :: copy (vector.begin (), vector.end (), output) Instead of specifying; Write as xxx: copy (vector, output); I know that it can be easily written, but I am particularly looking for something ubiquitous. Thank you. It has an extension of the Boost Range Library named RangeEX, which includes range rappers for all stell algorithms, It has recently been accepted in Boost and hence it is not yet in the "official" release (1.41). Unless this change can happen, you can do it with boost vault. I do not know that this will ever be a part of the C ++ standard, but the fact that Boost is in it means that this de real standard

.net - How to make sgen.exe keep the version of the assembly? -

I want to create a serialization assembly for my assembly sgen this is ok, but I Can not understand how to specify the same version as the serialization assembly in the form of a source assembly. Any thoughts? sgen by default, take source assembly version, it is quite reasonable . Here's how I'm running, nothing special: "... pathToSDK ... \ Microsoft Visual Studio SDK \ sgen.exe" / force / Assembly: "$ (target)" / compiler: "\" / keyfile: $ (projectdair) .. \ key.snk "\" / compiler: / deliensen - / force- Existing serializer assemblies to overwrite / assembly - For path assembly, I run it in post-build event in VS project settings, so I have the $ (TargetPath) variable I use

java - Lazy loading in Hibernate -

My Java Web application uses Hibernate to ORM In some of my objects, I use lazy loading until then To get it until I need it. The problem is that I load the initial object in a session, and after that the session is destroyed when I try to resolve the lazy-loaded collection in my object later, then the following error Receives: org.hibernate.LazyInitializationException: Failed to start a collection of role: common. Model.impl .User.groups, no session or session closed I tried to add a new session with the archive and then tried to solve it, but it was a Only gives results. Does anyone know how to solve lazy collection after the original session is over? Thank you ... - Steve three Option: call Hibernate.in initialize (..) whenever your archive will be disconnected from the current session Announce as the collection FetchType.EAGER . merge (..) your user object back in new session

java - Regex to split nested coordinate strings -

I have a string of format "[(1, 2), (2, 3), (3 , 4)] " , with an arbitrary number of elements, I'm trying to divide it by commas that separate the coordinates, i.e., (1, 2) , (2, 3) , and to get (3, 4) . Can I do this in Java Reggae? I'm totally communicating but it is quite powerful to hope for Java reggae. If it is not, can you give an alternative suggestion? You can use it for string string = " [(1, 2), (2, 3), (3, 4)]; String = string.substring (1, string.length () - 1); // Get rid of strings string [] parts = string. Split ("(? & Lt; = \\)) (, \\ s *) (? = \\ ()"); For (string part: parts) {part = part.substring (1, part.length () - 1); // Get rid of brackets string [] coords = part.split (", \\ s *"); Int x = integer.center (quotes [0]); Int y = integer.centre (coars [1]); System.out.printf ("x =% d, y =% d \ n", x, y); } (? & Lt; = \\)) means it should be before ) . (? = \\ () means that it sho...

In C++, are static initializations of primitive types to constant values thread-safe? -

That is, will any of the expected environment be expected to be executed properly? int dostaf (zero) {static int somevalue = 12345; Return some value; } Is it possible to call many threads, and to return whatever was wasted on and somevalue before the execution begins To call? from C ++ standard, volume 6.7: A local object of type POD ( 3. 9) With static blocking period, starting with the initial stability, before the block is first entered. This means that the function-level static object has entered the function for the first time, not necessarily when the process is fully initiated. At this point, many threads can run well.

c# - lambda expressions on populated lists -

There are some posts on the site about how to use lambda expressions, but I do not seem to be doing my work can. Am I trying to reorder a list of already populated ones, am I wrong in thinking that I can rearrange the sequence of this list using lengthy expressions? QuarterMileTimes.OrderByDescending (c => c.PquartermileTime); I was wondering if this is the string below the pixel matter? I also tried the date of this expression Quarter Mile Times. Order (C => c.RaceDay); There is still no luck where I am going When you call, the method is a new IEnumerable & Lt; T & gt; - This does not rearrange the collection in place. Try to: Quarter meters = Quarter-mile time. Order Buysenending (C => C. PactarmMilitime). Ollist (); (This is when your collection is a list ...)

iphone - Grid View as demoed in iPad -

I'm trying to develop a grid-like application for the iPad. Has anyone seen a control that Displays information in the grid? In the demo, they use a grid-like layout in both the iBooks Store and the application of photos. Especially in the pictures, they are displaying a dynamic list of data in a grid. I can work around it, of course, but if someone is present then I will use a control thank you! People who know 3.2+ what controls are in iPhone Dev Tool or not Apple NDA We can not tell you Steve is always watching If you have signed the NDA then you should go to the Apple boards and ask. You can, however, display standard with UITableview very easily. I was taken about an hour to reproduce the photo picker display using that method that displays just one tableviewcell subclass

c++ - Standard Keyboard Driver Source Code - Where can I find this? -

I'm looking for standard source code for one keyboard. Is there any where I can download this source code so that I can modify it for my use? Thanks in advance! There is no such thing as "standard source code" for a keyboard. Here is a page of the Linux Keyboard Driver:

PHP Zend Framework - How to Get Request URI Fragment from Request Object? -

For example, say I have a URI http://127.0.0.1/somecontroller/someaction#12345 which takes me to some controller controller in some action () action. From there, I request $ this-> getRequest () from the object. is able to retrieve the requested object; I am also able to get various information about the URI from the requested object. But, how can I retrieve the piece (for example, in the later part of "# 12345")? Class = "post-text" itemprop = "text"> The fragment part of the URL is never sent to the server via GET requests (or that Any type of HTTP request for the matter), the only way you can get it is if you write a JavaScript snippet that parses the URL and for example Ajax sends this piece back to the server. This can not be done with PHP only.

html - jquery .each function -

If I have 5 input boxes. Inputbox My Junkie function adds these tags 5 times after each. Input box line. Why is it like this? I just want to say that each of these tags is inserted after each one. input box. How does anyone have to do this? After function ("& lt; img src = \" images / thumbns_p_48.png \ "class = \" thumbV \ "(" .input box ") ($ (". Input Box ") ($ ('. Input Box') Id $ \ '(Input Box) Id = \" up \ "/>"); $ (' Input Box '). ("& Lt; img src = \" Picture / thumbs_down_48.png \ "class = \" thumbV \ "id = \" down \ "/ & gt;);});} html & lt; label = "FirstName" & gt; first name & lt; / label & gt; & lt; input type = "text" class = "input box" name = "first name" title = "first name Use "id =" first name "/> here : After $ (this). ("& ...

c - How to implement a leveled debug system? -

In the environment, I am working now, I can not use the debugger to detect the bug, so much More always when I need to debug a functionality, I have to output some information. I did the following to do this: #ifdef DEBUG #define printd (X) printf x #else #define printd (x) #endif So when I need to print some debug info, then I printd () instead of printf () . The problem I got is that I need a leveling system, there are messages that can be important in the fixed debug level, but irrelevant code when debugging other parts. So my question is, how do I implement an equivalent debug system? I value the simplicity, I mean, I prefer my actual system much more than the need for a lot of code or confuse me using code. Something like printd (level, format, ...) would be great. Of course, there are more aromatic methods to do this, but it works just fine #ifdef DEBUG extern int g_debuglevel; #define printd (level, x) (level> lp = g_debuglevel)? 0: printf x #else...

.net - Is there an API call to start a scan for hardware devices -

, but ... Is it possible to trigger a new hardware device through the API? I have a serial port Bluetooth device which I am automatically pairing through an API call, which works quite well. When I can query serial services in the scanning of the device, the COM ports do not appear in the COM ports tab of the Bluetooth device dialog. related to My answer from there: Checkout for scanning for hardware changes "Sampling" shows how to emphasize the whole tree again to enumrate.

jquery - Should a 500 item lookup list be data cached on server? -

I have 500 names Why both measure the methods and then decide on the basis of actual data rather than projections?

How to include external contentProvider(any api) package into android.jar in android -

I want to include contentprovider (Ask for some apps) package in android.jar. I was able to include it in SDK, well I did Android Could not join. This would be helpful for me if I had Android. I can include those APIs for more development in the eclipse. Please take the external API to Android. Or, take steps to include in any document. Thanks in advance. I include contentprovider (Ask for some application) package in android.jar Want to do android.jar is just a stub library used to compile your Java code with javac , this Despite the fact that most APIs are actually embedded in the device if you work for a device manufacturer and if you are the third-party developers Want to make an extended API available, the official way to do this is to use the SDK add-on as a Google Maps add-on Creating. It is not included in modifying android.jar AFAIK, but uses a different process with a separate jar for more information about this process [android-porting] Google ...

How to access @public instance variable from another class in Objective-C? -

I know that it is possible to define a public public word @with the public keyword, however, Objective-C syntax Does not allow access to other class' variables. @What facilities do I want from public Ivar? Or how can I use other class Ivars? Objective-C, definitely public from outside the implementation of class as a superset of C Allows to use the frequency variable. Now, the reason for this is that you have heard that is not allowed this is very disappointing. In most cases, if you want to access any frequency variable outside the context of an implementation, then you should use the accessories and the mute (properties). An object-class is actually a plain-old C string with a ii field (that is, it creates an object), where public areas are accessible since we Working with examples of classrooms, we are working as an indicator for an object (special structure). In this way, we have the - & gt; You can use public areas by using . Here is an example: @inter...

unicode - Batch script is not executed if chcp was called -

I am trying to delete some files with batch scripts with Unicode characters (this is a requirement). So I run and execute CMD: & gt; ChcP 65001 Setting codepatting in UTF-8 effectively and works: D: \ Temp 1 1 gt; There is no label in the Drive D in the dial, the volume serial number 8C 33-61 of the BF directory is: \ temp \ 1 02.02.2010 09:31 & lt; DIR & gt; . 02.02.2010 09:31 & lt; DIR & gt; .. 02.02.2010 09:32 508 1.txt 02.02.2010 09:28 Remove 12.bat 02.02.2010 09:20 95 delete cmd 02.02.2010 09:13 & lt; DIR & gt; Run 02.02.2010 09:13 & lt; DIR & gt; Гуцул Каліпсо 3 files 615 bytes 4 Dir (s) 11 576 438 784 bytes free D: \ Temp 1 1> RMDIR RUN D: \ HEAP 1 1> Drive D does not have a label of dial volume Volume serial number 8C33-61 BF directory belongs to: \ temp \ 1 02.02.2010 09:56 & lt; DIR & gt; . 02.02.2010 09:56 & lt; DIR & gt; .. 02.02.2010 09:32 508 1.txt 02.02.2010 09:28 Remove 12.bat 02.02.2010 09:20 95 del...

objective c - How to Show a GPL licence in iphone application bundle -

I'm making an app for the iPhone and I also am using some free libraries. My problem is that I can be open to show them my full license of approximately 4-5 pages in my application bundle so that setting a user iPhone and see the Licensing page at a time, but I am unable to do so . I have read these specifiers to create an application bundle. Psgrupspesifiar Pstitlevluspesifiar Pasteshtfieldspesifiar Pssleedrspesifiar Pstoggleswitcspesifiar Pasmultivluspesifiar PSChildPaneSpecifier but I want to show the full text of a page I like to Settings> General> about-> Leagl such as the iPhone through PSChildPaneSpecifier. Please do me how to do this ??? ??? Thank you You create an effect similar to the one used by iWorks apps Apple Settings> License> Section Troller without using any custom preference selection. Note that this works for iOS 5 on the iPad, I have not tried to do it somewhere else. Use a PSChildPaneSpecifier for initial control in th...

version control - How to change from https:// to svn:// protocol in subversion server -

Update: svn and http protocols are in benchmarking. How long has it started checking a project's trunk (in minutes and seconds) .. svn protocol: 5:32 http: protocol: 5:33 svn protocol (with avg folder exception): 2:22 http protocol (with AVG folder exception): 2:23 Speed ​​results: Nothing in it! Average result: However, AVG has doubled since the time I checked the duplicate folders of my work! Basic Question: I currently use VisualSVN Server which I think !? Supports HTTP protocol only? (Can anyone confirm?) .. I know and the SVN: // protocol is fast enough with small files very fast. The most painless way to migrate to any Svn: // protocol to use a Subversion server (even if that sub-server server's different tastes Using it). The machine that runs the VisualSVN server is a Microsoft Windows Server 2003 box. Thank you in advance, - li P> svn: // Protocol Recommend the most pain-free way of migrating to using a Subversion se...

data structures - If statement in c++ -

Oh dear! I know that if the statement is a costly time in C ++, I remember that once my teacher said that if the statement is an expensive time in computer time then If we can do everything using the statement in cement, then it is very powerful statement in the perspective of programming, but it is expensive in computer time perspective. I am making a beginning and I am studying the Data Structure course after the introduction of the C ++ course. My question is for you If the detail of the statement is very high, then do I have to do better for it? I'm not sure how normal you can be if the statement is expensive. If you have > if (true) {...} then if Most will be optimized by your compiler. If, on the other hand, you have .. if (veryConvolutedMethodTogGetAnswer ()) {.} more method A lot of convoluted method is called gesture () a lot of work, you can argue that this is an expensive if statement, but not because of the reason you are in the proc...

Executing a stored procedure to insert records into a table - SQL Server 2000 -

I am working in SQL Server 2000. The following question is not working declare @TempAccountKey table (AccKey integer, SitName varchar (1000), SitKey integer) putting @TempAccountKey (AccKey, AccName) Executive [usp_Get_AccountForUser] @ username Throw this error Any ideas? # 1 > linked server set properly made Has been up. So I do the following query executed Executive [ABC Skyuel- PROD.DBabc.dbo.usp_Get_ABCForUser] This is an error that can not be found "any Even thoughts? Anelvi Instead of using a temporary table table #TempSiteKey (AccKey integer, SitName varchar (1000), SitKey integer) #TempSiteKey (AccKey, AccName) insert exec [usp_Get_AccountForUser] @Username Drop Table #TempSiteKey And because you have misplaced it Executive [ABC SQL-PROD.DBabc Due to the reason you can not call the process .dbo.usp_Get_ABCForUser] Actually the process' ABC SQ L- PROD.DBabc.dbo.usp_Get_ABCForUser is meant to execute ' What do you...

asp.net mvc - Dynamically Generated Ajax.BeginForm -

I have a problem with ASP.NET MVC Ajax forms. I generate many Ajax form in a table such as: & Lt; Input type = "submit" name = "activity" value = "add activity" / & gt; & Lt;%}% & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt;%}% & gt; So far so good. When I post one of those forms, it gives a partial view in a div, and in this new partial view a new Ajax Beginnform (which is not in Genesis form) This second Ajax Beginnorf is exactly like the ones I got on the table, but when I post it, I do not get the "Ajax Post", but a normal post that sends me to a new page, I do not know whether the two Ajax forms What is the reason for the difference between, why is it the "dynamically generated" Ajax form behaves like a normal HTML form? By the way, I know that I can do it in different ways using javascript, but I would like to understand whether it can only be done using MVC helplars and Ajax lib...

java - Criteria API returns a too small resultset -

How is this possible, I have to follow the criteria criteria = getSession () .createCriteria (c); Criteria.setResultTransformer (Criteria.DISTINCT_ROOT_ENTITY); Criteria.add (restrictions.eq ("active", true)); List list = criteria List (); Now the size of the list is 20. If I add the maximum results to the criteria, Criterion Criteria = GetSession (). CreateCriteria (c); Criteria.setResultTransformer (Criteria.DISTINCT_ROOT_ENTITY); Criterion. Setmax result (90); Criteria. Add (restriction.ec ("active", true)); List list = criteria List (); .. Now the size of the list is 18! I do not understand how much the smallest result may be after defining the size of the results, because the amount of rows defined is smaller than the maximum. It definitely looks like a bug, or again some strange aspects are brought to hibernation that I do not know? If you are looking for an answer to this question, make sure that the acceptable answer and its comments. ...

How do I insert a row in to a Google spreadsheet using c# -

I have seen; and Still I'm having trouble entering a new line in an existing Google spread sheet. Do I have a canned example that A list & lt; String & gt; For example, a spreadsheet inserted into a new line in the workbook. Many thanks, Use GDataDB > Public Zero AddToGoogle () {var Client = New Database client (settings. Default.gmailaccount, settings. Default.gmail password); String dbn name = settings.default. Workbook; Var db = client.getdatabase (dbName) ?? Client.CreateDatabase (DBNAME); String table name = settings. Default. Worksheet; Var t = db.GetTable & lt; Activity log & gt; (table name) ???? Db.CreateTable & LT; ActivityLog & gt; (TableName); Var all = t.FindAll (); T.Add (this); }

Is it possible to call a C function, given its name as a string? -

I have seen this question in one of C's puzzles !! Is this possible at all? How can I call a function, its name is given as string? Is it possible to use string, read with scanf, is used directly to call the function? I already thought that (strcmp (str, "string") calls the function. But what is any other approach? Since there is no function, nor its parameters, I would imagine it something like this: / P> typedef zero (* foo) (); Struct puzzleFoo {char * function_name; Foo * fn; }; Create a lookup table based on the structure, using the string parameter struct puzzleFoo * lookup (const char * function_name); Then repeat through an array / list in search of function_nam e for puzzleFoo and the function pointer to fn .

c# - creating XSD schema files for GAC dll -

I use XSD.exe to create an XML schema for Microsoft.AnalysisServices.Database How can i Object? You can still use a gacced dll via the cmdline ( % windir % Assembly \ GAC_MSIL ): C: \ WINNT \ assembly \ GAC_MSIL> drive c in dir volume Omni3 volume serial number 5CDE-38BA C directory: \ wint \ assembly \ GAC_MSIL 29 / 01/2010 15:20 29/01/2010 15:20 .. 07/08/2009 15:54 Accessibility 07/08/2009 15:54 ASPNATMMCCECT 07/08/2009 08:39 CPC Dodd Provider 08/08/2009 08 : 45 CRVs Package Lab 07/08/2009 08:45 CrystalDecisions.CrystalReports.Design etc ...

java - Eclipse RCP with project dependency -

I have not developed a RCP plug-in (standalone), and a Java project with a plug-in with a library code Need to call I have configured the Java project in the same workspace. The plug-in has a project dependency on the Java project. Compile the code (plug-in does some stuff with Java project / library code). When I run plug-in, I get a ClassNotFound exception: java.lang.ClassNotFoundException: com.mycode.ArgSet at org.eclipse.osgi.internal .loader.BundleLoader.findClassInternal (Bundle Loader. Java: 494) Anyone know how to properly configure the plug-in? Convert your library project to the plug-in project (right-click -> Configure -> Convert to Plug-In Project ) and add it to its dependencies Your Plug-in Project (Manifest Editor, Dependency tab).

Changing display font of WebBrowser control in c#? -

I'm trying to change the display font of the WebBrowser control. I tried doc.execCommand ("font name", wrong, "aerial"); But it seems that it works for selected text. I want the exact effect of setting the font within IE -> Internet Options -> General -> Appearance -> Fonts. Thanks in advance. Like Michelle, Biongogo -------- Update ------------- XBB is working in C #, it's like to do the same. Net targets In addition to this, the changing registry is a bit more work for this and if there is a simple solution may be required. Otherwise, I will not say just for this FR. Well, it seems to you that using the execWB command as outlined in this. Update But with another look at the document, I'm not seeing execWB or ExecCommand method that you currently have in the .NET Browser Control Are using as options. Therefore, you may have futz with the actual IE settings, which are more likely in the registry.

sql - What is the best way to tie 1 table to many tables -

I have a table, call it table A This table will be linked to several tables, and ideally In database connection relations (many -1) (table-table-b) (many -1) (table-table-c) will be implemented ... etc. I have the solution table in the "B "All foreign keys of type are placed in the table with a" Type "field (which contains a word version whose relationship is applied). Although I think there should be a better way. What would you do? I appreciate any further advice in this. This is a completely acceptable approach - foreign key is actually modeling multiple-to-one relationships The right way is. Generally, you can not say that you want to make a solution "better"; Rather, you should have a specific goal in mind. Better, lesser implementation, less memory, whatever is better than this is that you have a special use case for which you want to adapt. Edit : Your question is now more clear that you edited it. If I understand correctly, then y...

java - Adding Help Contents, Search Help using Command Framework -

My colleagues and I am building a new RCP application and am trying to find our notch in RCP. My colleague managed to work the Eclipse help frame very quickly - but he used the old style action and action-packed adware make-up () to do this. I have read all the RCP menu creation tutorials (which were written after eclipse 3.3) to advise advocates of disgusting actions and switching completely to commands. That's why I am trying to do this. However, I can not get help to order the work - without using help tasks Specifically, I am trying to explain how to add the default eclipse help menu command org.eclipse.ui.help .helpContents and org.eclipse.ui.help.help help me Search in the menu I made menu contributions, and added commands, but they are greyed out I have not found any mention of anything else so that my coworkers hook them up to the help framework to work before proceeding. done. If I add action for them and register them in action, then they still work but I am trying ...

php - CakePHP displayField usage -

Can you please tell me how to use the KHHP's Displayfield Directive? Therefore, in a model file, I have the code: ;' ',' fields' => "',' order '= & gt;" ... ... projectName in the Select how can I use it? Then, you have the Tasks included project (FK: Prose T_ID). You want to create a project selection box in Tasks / Addition and Task / Editable views. The problem is that the project table 'If a name or then the selection box is empty. If there was a name or a title field, right? OK, Here's the solution, add it to the project model: var $ displayField = 'projectName'; In the right direction Were just model had a little glitch. I hope you understand it now;]

internet explorer - jQuery Image/Hover Preview Causing Choppy Behavior in IE7 -

I have some problems using jQuery to make simple zoom in IE. All is well in Firefox, but most users are being told to be tired of IE. I disabled the code in IE (using jQuery.browser.msie), but if possible it would love someone's help. / P> My jquery source code is below (ignore the upport function). this.imagePreview = function () {/ * CONFIG * / xOffset = 10; Y offset = 20; // These 2 variables set the distance of the popup from the cursor / you may want to adjust to get the correct result / * END CONFIG * / $ ("a.preview"). Hover (function (e) {this.t = this .title; this.title = ""; this.inside = $ (this) .attr ('inside') this .outside = $ (this) .attr ('outside ') Var c = (this.t! = "(" & Lt; p id =' preview '& gt; & lt; img width =' 260 'src =' '"+ this.inside +"' / / gt ; "+ c +" & lt; / p & gt; "); $ (" # preview "). Css (" top ...

c# - Why use try {} finally {} with an empty try block? -

मैंने System.Threading.TimerBase.Dipose () में देखा है विधि में कोशिश {} अंत में {} ब्लॉक लेकिन कोशिश {} खाली है। क्या {} का उपयोग करने में कोई मान है {} अंत {} खाली प्रयास के साथ? [विश्वसनीयता संपर्क (Consistency.WillNotCorruptState, Cer.MayFail)] आंतरिक बूल डिस्पोज़ करें (WaitHandle NotifyObject) {bool status = false; बूल बीएलॉकटैंक = झूठी; RuntimeHelpers.PrepareConstrainedRegions (); कोशिश {} अंततः {do {अगर (Interlocked.CompareExchange (ref m_lock, 1, 0) == 0) {bLockTaken = true; कोशिश {status = DeleteTimerNative (notifyObject.SafeWaitHandle); } अंत में {m_lock = 0; }} थ्रेड। स्पीनवाइट (1); // प्रोसेसर के लिए उपज} जबकि (! BLockTaken); GC.SuppressFinalize (this); } वापसी स्थिति; } से: इस पद्धति गार्ड के खिलाफ थ्रेड। पोर्ट कॉल प्रसंस्करण में दखल। थ्रेड के एमएसडीएन पृष्ठ। एबर्ट का कहना है कि "अप्रत्याशित रूप से धागे समाप्त होने से पहले निष्कासित किए गए ब्लॉक को मार डाला जाता है"। तो यह सुनिश्चित करने के लिए कि आपका प्रसंस्करण खत्म हो गया है, भले ही...

c# - Zip Mime Type appears unrecognised -

I am trying to return a zip file, as a stream on a browser. It works fine with other types of files (like Excel files), but when I start working with zip files, I do not have to recognize my browser as it's a zip. Both Firefox and IE are running on my test, with the machine prompt, opening the file to the program to be asked. The Explorer Zip file is set as the default for the union. IE does not report much back, Firefox still tells me what file type is application / zip where As far as I can tell, the correct mime type for the zip file. The only thing I have not set up is that extension, so the file is called 'test' instead of 'test.zip', but as far as I knew that everyone should understand the mime way. Anyone can be wrong but have any thoughts? Includes ensuring you file, file extension: Content-Properties : Attachment; File name = test.zip as the header. in C #: response. Contact type = "app / zip"; Response.AddHeader (...

Why doesn't Erlang come with a decent package management system like gem? -

Well, it looks a bit like a lion, but I was wondering if there is a technical reason that the array By default there is a proper package management system. No major technical reason is actually in the form of a classic method of installing and installing Yerling software There are different requirements though the applications are there. And some release release added in that. Often you can see the altoglot software completely self-reliant. This is that all the libraries and virtual machines have been put together in the package and there is no need for external dependencies. You can also see it in the development versions of the package. For example, the source of the database is a dependent library of all sources in the tree. It is coming from Ruby (like mine), as many people think that this is not a bad idea. In this way, each application is self dependent since one of Erlang's main goals is the most reliable thing, it understands every sense in the world that each ...

java - Data does not persist using HIbernate with Spring's @Transactional Annotation -

I have an application that I am currently writing that will use spring and hibernate in the level of my services For a grin that has done a very basic CRUD-ing operation, I have commented as follows: @ Transactional (read only = false, Propagation = Proposition.quares_nu) universal Nick zero to some work (dao dao, entity e) {/ Search Daokpersist (e); Dao.findAll (Entity.clz); } Dao then looks like this: public zero existence (unit E) {session.saveOrUpdate (e); // it has already been created using a SessionFactory}. Search all methods look like this Public Zero Search All (class clause) {session.createCriteria (CLZ) .list (); } Now, everything starts running, okay after inserting my object, I have all the methods to find it (the new primary key ID, which was assigned by the data store) However, if the "doSomeWork" method is complete, my data does not actually exist in the built-in datastore (Oracle 10G) If, I remove the @transactional annotation And sub...

ASP.NET MVC - Captcha as stand-alone assembly -

I have implemented the captcha for the form submission page in my app asp.NET MVC framework book There is a tip in it that says "If you want to convert it to a reusable, distributed captcha component ... you only have to put CaptchaHailer and Captcha image controller class in a single Assembly. " What does this mean? I was thinking that I will just create a new MVC project, in this it is just a compiler in the controller folder, and the Assistant File Helper Folder compile it just fine. Then I include that project in my solution and have added the references to this project in both of my sub-projects (one for business layer, one for the UI). But when I try to submit the page, the view can not render the captcha image (BTW, it worked fine before breaking it into a separate project.) View page is unable to find captcha controller. I think I need help creating a stand-alone controller ... thanks, Scott has an error: Castle.MicroKernel.ComponentNotFound...

ruby on rails - When to use association extensions vs named scopes? -

With a cursory glance, they see only two different perspectives in the same set of problems, except that the designated Scope is series, while there are no extensions extensions. Can anyone explain, or provide an example which would be more suitable for a union expansion than the nominated area? The association is very useful for creating custom methods for creating, updating etc. (not necessarily Search). Because you have a good hook in Proxy_owner, proxy_reflection, proxy_target, your relationship. Look at the Association Extensions section of Rail Documents:

visual c++ - How do I use a COM DLL with LoadLibrary in C++ -

First of all, COM is like black magic for me, but I have to use Com DLL in a project which I I am doing Therefore, I have a DLL that I am developing and I need some functionalities that are available in a separate COM DLL. When I look at the COM DLL with Depends.exe, I see DllGetClassObject () and other functions, but I do not see any difference. I have a COM DLL source code, but this is a mess and I want to use the COM DLL in the binaries such as a big black box that does not know what's going on inside. . So, how can I call the COM DLL function from my code using LoadLibrary? Is this possible? If, yes, can you give me an example of how this can be done? I am using Visual Studio 6 for this project. Thanks a lot! Typically you use CoCreateInstance () to instantiate objects from a COM DLL will use. When you do this, there is no need to first load the DLL and obtain the proc address as you would have to do with a normal DLL. The reason for this is that Windows ...

regex - UTF-8 characters in preg_match_all (PHP) -

मेरे पास preg_match_all ('/ [aäeioöééíoú] / u', $ IN, $ out, PREG_OFFSET_CAPTURE); यदि $ in = 'hëllo' $ out है: सरणी (1) { [0] = & gt; सरणी (2) {[0] = & gt; सरणी (2) {[0] = & gt; स्ट्रिंग (2) "ë" [1] = & gt; Int (1)} [1] = & gt; सरणी (2) {[0] = & gt; स्ट्रिंग (1) "ओ" [1] = & gt; Int (5)}}} o की स्थिति होनी चाहिए। मैंने इस समस्या के बारे में ऑनलाइन पढ़ा है ( ë 2 के रूप में गिना जाता है) क्या इसका कोई समाधान है? मैंने mb_substr और इसी तरह देखा है, लेकिन preg_match_all के लिए ऐसा कुछ है? संबंधित की तरह: क्या उनका के बराबर है पायथन में preg_match_all (स्ट्रिंग में उनकी स्थिति के साथ मैचों की सरणी लौटाना) पीएचपी यूनिकोड का बहुत अच्छा समर्थन नहीं करता है , इसलिए बहुत सारे स्ट्रिंग फ़ंक्शंस, जिसमें preg_ * शामिल है, फिर भी वर्णों के बजाय बाइट्स को गिना जाता है। मैंने एन्कोडिंग और डीकोडिंग स्ट्रिंग्स द्वारा एक समाधान खोजने की कोशिश की, लेकिन अंततः यह सभी preg_match_all फ़ंक्शन पर आया। अजगर ची...

math - Calculate second point knowing the starting point and distance -

Using the latitude and longitude value (point A) I'm trying to calculate another point B, X Display distances from 0 radians point A to point B latitude and longitude values. Example (pseudo-code): PointA_Lat = x.xxxx; PointA_Lng = x.xxxx; Distance = 3; // meter bearing = 0; // radian new_PointB = point-gap; I was able to calculate the distance between the two points, but what I have to find is the second point to know the distance and effect. Preferably in PHP or Javascript. It seems that you are going to measure the distance (r) in meters (m), you dx = r * cos (direct); Due to theta, the tail was measured counter-clockwise by the former DI = R * sin (theta); Factors such as DX, D. R. If theta is measured clockwise from the north (for example, compass bearings), the calculation for DX and D is slightly different: dx = r * sin (theta); Theta was measured by clockwise clockwise DI = R * cos (theta); In either case, the degree changes in latitude and latitude: ...

Hibernate Search with index in a different database -

I have a database that is read only (I have only access to view), but for this I find this database Need to be indexed. In this table, the DAO layer is now using normal DAO approach with Hibernate + JPA. Is it possible to add hibernate search to this view and store the index in a different database? I know that I can lose the ability of post-indexing. But that's fine, I'll do the whole indexing manually. Configuration: Spring 2.5 + Hibernate 3 (Or should I use Comps or Licens directly?) Please advise Roy Hibernate uses Lucene under both cover and compass cover, and Lucene can store it in various forms Data, in which memory, on disk, or in the database, if you choose to store it in a database, no reason At the same time that you need the same database, as you do indexing. However, if there is no solid requirement for indexing in a database, then local disk-based storage will be easy, and probably will be faster.

python - How can I detect and track people using OpenCV? -

I have a camera that will be stationary, indicating that inside the home area people will run within the last 5 meters of the camera. Using the OpenCV , I want to find people walking in the past - the array of people finding my ideal return, along with the rectangles. I have many built-in samples: Any Python samples are not actually implemented C The C sample also looks promising, it calculates a silhouette with subsequent video frames, possibly I find that strongly connected components and individual blobs and their I can use it to remove the box - but I am still trying to find a way to identify the blobes found in the later frames as a similar blob. Is anyone capable of providing guidance or samples to do this - primarily Python ? OpenCV's latest SVN version includes (compulsory) implementation of a HOG-based pedestrian identity. It comes with a pre-trained detector and python cover. The original usage is as follows: to cv import * storage = Create...

python - Stock Icons not shown on buttons -

self.button = gtk.button (स्टॉक = gtk.STOCK_DELETE) केवल दिखाता है: हटाएं जीटीके में यह हाल ही में एक बदलाव है - डेवलपर्स को आइकनों को प्रकट न करने वाले चाहते थे बटन पर लिनक्स पर, यह जीन कुंजी को संपादित करके बदला जा सकता है / डेस्कटॉप / gnome / interface / buttons_have_icons खिड़कियों पर, मुझे लगता है (मैं हेवन ' टी वास्तव में यह कोशिश की है) है कि आप अपने gtkrc फ़ाइल में मूल्य निर्धारित करने की आवश्यकता है (मेरे लिए यह C: \ Program Files \ Gtk + \ etc \ gtkrc में है) और एक थीम का उपयोग करता है जो माउस का समर्थन करता है (मुझे लगता है आपकी टिप्पणी के जवाब में संपादित करें : बस इस उत्तर की तरह, लेकिन पायथन में: अजगर के लिए, यह बस है image = gtk.Image () # (http://www.pygtk.org/docs/pygtk/gtk-stock-items.html) से चित्र .set_from_stock (gtk.STOCK _ **) बटन = gtk.Button () बटन .set_image (छवि) बटन .set_label ("")

java - How to deploy an application with firewall permissions on Mac? -

I've bundled a jar file as a Mac application using Jar Bundler. I am now trying to make an installer for this app so that: 1) the application will be placed in the Applications folder 2) The app has been added to the list of acceptable apps in the Mac application level firewall Alas, I have many example files that I would like to include with this app - what is the best way to make this user available. Somebody has suggested that I have an MPKG file that launches DMG file in which these files are, but it is cyclical. Thank you The apple, which contains the encoded files with your application Can install; But this is usually done for files that require a full path. Alternatively, simply distribute the app bundle and the example files in a .dmg , and allow the user to allow or block connections in the system preferences . As a convenience, you can include a nickname in the / application folder

google app engine - I need help parsing this statement from the GAE/Java documentation on data classes -

This section is killing me, I appreciate if someone can help me understand it. If the area is not a faucet worth the value type, then without exception, it throws an exception by loading an entity. This will not happen if this unit was created from the same JDO class. , Which was used to reuse this example, but if the JDO class may change, then What is a worthless value type? How can you load an entity without this property? What does this mean: "This will not happen if this unit was created from the same JDO class, for example?" When you say "but JDO class changes So maybe ", how can a JDO class change? An object type is taped primitives (such as Intel or Boolean) blank Can not be An older version of the class could not be an asset and therefore, data will not have the property in the datastore, and when you try to match it with the new category, then it will have to clear the property. Because (2) can only happen when class has changed. ...

javascript - How to get file name when user select a file via <input type="file" />? -

I have seen similar questions before, which is not solved for security reasons. But today when I open a ticket and attach a file to my backend, then Hostnoster has successfully implemented it. It works with both Firefox and IE (version 8 is accurate). I have verified it exactly the client side scripting, no request has been sent (with firebug). Now, can we reconsider this question? You can get the filename , but you can get the full client file- System path can not be found. Try accessing the value attribute on input on change events. Most browsers will give you only filename , but there are exceptions like IE8 which will give you the duplicate path: "C: \" Fakepath \ myfile.ext " and the older version ( IE = 6 ) that actually wil I give you the full client file-system path (due to lack of security). document.getElementById ('fileInput'). Onchange = function () {Warning ('Selected File:' + This.value); };

How can I disable ReSharper in Visual Studio and enable it again? -

I have installed, and it works in Visual Studio, but how can I disable it? Whenever I search in the ReSharper menu I can not find a passive option. You can disable the reciprocal 5 and the newer version suspended Tools -> Options -> ReSharper by using the button.

Adding integer values as contents of an array,iphone -

I need to store some integer values ​​as the contents of an array. But when I try to do this So, it throws a warning, passes argument 1 of 'ad object', creates an indicator with an integer without an artist. And obviously the value is not stored in the array. Here's the code. NSUIENTER i; (I = 0; i NSArray -s non- id can not store items, you must box it in NSNumber : NSUInteger i; For (i = 0; i or use CFArray with custom callback (but you abandon readability for performance) or std :: vector & lt ; NSUInteger & gt; (But you need to use Objective-C ++).

iis 7 - Having jpg and gif handled by IsapiModule in IIS7 -

I am struggling to process requests for JPG and JFs to my HTTP handler. I went to the handler mappings of the website and added the following line: path: * .jpg, *. Gif state: enabled path type: unspecified (I have also tried to set this file) Handler: IsapiModule Entry Type: Local Running through Visual Studio works So, I know that this is not my code, it works on IIS 6. I have tried to set the app in both classic and unified mode. The web here. The appropriate handler mapping specified in the config: I fixed it by clearing the handlers with web.config, then adding it manually. Using IIS: [Handler Mapping] -> [Add Managed Handler] I'm not sure what the difference is, because the web Config looks much like I did before, but it works now.

java - What is the difference between GraphDatabaseService or NeoService in neo4j -

I'm learning to use, but I'm a little confused about its usage. When I am adding nodes and relationships, I can do it like this: GraphDatabaseService graphDb = New Embedded Graph Database ("C: / temporary / graphfib"); Transaction tx = graphDb.beginTx (); Try {Org.neo4j.graphdb.NodeNode = graphDb.createNode (); ... I can also do this: NeoService service neoService = new embedded neo ("C: / temporary / graphfib"); Transaction tx = neoService.beginTx (); Try {org.neo4j.api.core.Node node = neoService.createNode (); ... What is the difference? Which one should I use? Why are they two different mechanisms? Is this just API development? :) I want to use Metamodal API and it needs a Neoze Service, so I think the option is clear. Sorry, you must first use one because the namespace was transferred to the latest 1.0-RC1 I went. This is just naming, semantics are similar. The second example is old and should be removed as an official document. Ch...

c++ - An interview question -

T Looking at the link list size, first 2n nodes Select and delete the n nodes before them; Then do it for the next 2 n nodes and similarly ... For example, we consider the 7 link list of sizes: `1- & gt; 2- & gt; 3-> 4-> 5-> 6> 7` If n = 2 , the desired output is: `1-> 2-> 5-> 6> 7` I did not understand whether this problem is actually indicating. Can anyone help me understand this problem? Edit: Add the C and C ++ tags so that it can reach more eye balls, and of course, only two languages ​​are allowed in their interview. It actually looks like it should say: T Looking at a link list of sizes, first select the 2n node and delete the last n nodes of them; Then do this for the next 2n nodes and similarly ... or: Given a link list of T, the first 2n Select the node and keep the first nodes from it; Then do it for the next 2n nodes and on this ... This means that select 1,2,3,4 then remove 3,4 (or keep it ...

php - Is it good idea to use Zend Framework in medium scale enterprise website? -

Although it is recommended to use it, I have some concerns: I used Zend Framework 1.6 Like 8 months ago. Now they have issued 1.10. So they are releasing the new version every 2 months. There are several things that have been changed extensively (such as the bootstrap class in the main applications folder, it was not before. This was just a php file, a fair). Several functions have been changed in Zend_DB (and possibly with other modules) and it is recommended not to use old works Integration is far from complete. As they mentioned, the new namespace (php 5.3 namespace) has been started, and so on ... So, I have a question .. Is it worth the use of the Zend Framework and can update the code every 2 months? Or should you wait until a more stable, less changed version is available? Edit If anyone like me is already using it, what would be the best way to update the Zend Framework? Please see my accepted response to this related question Keep in mind that ...

binary - How to make SVN ADD ignore binaries -

There is no extension of binary (under Linux) so I can not exclude them using patterns like this when I If I use the SVN add to add a directory, I get something recursion_vector / a recursion_vector a recursion_vector / rec_vec.cxx one recursion_vector / rec_vec HK (bin) recursion_vector / rec_vec Here rec_vec is executable I would like to exclude. SVN clearly considers it a binary Can I now ask Subversion to ignore all binary files? This is a little verbose because it uses search: Find [TARGET-DIRECTORY] \ (-executable-type f \) -prune -o-print | Executing executable files ( \ (-executable -type F \) -prune ) by passing the target directory to Xargs svn add -depth blank . The directory will also be deducted without -type f search, as they are generally set bits or "search bit" set. On - Depth blank option add , svn asks itself to absorb the file object, since finding is handling recurrence. If you like the result, you can put it in a shell fu...

javascript - GET in a For Loop does just one execution -

Trying to get a request from JavaScript with a function called geturl so if I prepare my query and Adds to an array and throws it thrown away which executes only one request, how can it be done without any loop? Maybe do something with the array? for (var i = 0; i & lt; urls.length; i ++) {url [i] = URL [i] .value; } Asural (URL); If you are using the JavaScript framework, then with some lines of Some can: var collection; GetURL (archive);

php - Creating 2D-array from array with foreach-loops -

Sorry for the unreadable title. What do I want to do to put data into 2D-array (?), Where the value of the first field is the name of a subscription and the rest is data related to that subscription. & lt; Td> & Lt; A href = "/ subname / index.jsp" & gt; Surname & lt; / A & gt; & Lt; / Td> & Lt ;! - This is the name of the membership - & gt; & Lt; Td> Comment about membership & lt; / Td> & Lt ;! - Comment -> & Lt; Td> & Lt; Strong & gt; 0, - & lt; / Strong> & Lt; / Td> & Lt ;! - Monthly Charges - & gt; & Lt; Td> 0,49 & lt; / Td> & Lt ;! - Cost per minute - & gt; & Lt; Td> 0,49 & lt; / Td> & Lt ;! - Cost per SMS - & gt; & Lt; Td> 1,99 & lt; / Td> & Lt ;! - Cost Per MMS - & gt; That is still working fine, but it puts all the values ​​in a regular array. I have tried to read on the arrays and are trying differ...

sql server 2005 - Configure database mail settings -

How do I configure the database mail settings and can match the database in Sharepoint as the default database instance Because I do not know how to configure database mail settings from the login sa user after management. How do you just configure the database mail from the management studio? If so, you should give step-by-step instructions on configuring the server.

webos background image updating problem -

There is a priority screen in my application that has a feature to change the background color or theme, I am using PNG images as well. When I go to the main screen, I am using some other image based on the selected image in the preferences. To do this, I am changing the background image with the CSS in the inactive () method of the priority screen, in the emulator, it works fine. When I install the app on the device and check the same case, it shows the blank, then it changed the main screen image. How can I avoid the moment of the empty background in the transition from the main location on the screen? It seems that the second is going to load the image. You can sprat images together so that they are always stored in memory, or you can create a new image in JS and run visual transitions when the image is loaded. var img = new Image (); Img.onload = function () {/ * Run the visual transition} Img.src = "path / in / by / background";

java - AspectJ vs. Spring AOP vs. JBoss AOP for exception handling -

I'm writing a webservice in an external system. Many of my service wrapper class can throw an exception call to those methods which call all soap interfaces of the webservice, which again trigger yourself to connect to the webservice. To handle that scenario, I would like to use AOP as if all the methods that call the SOAP interface are "wrapped", an attempt / hold block is reconnected in the catch block. I am not using spring at this time, so I am thinking of introducing the JBoss AOP. I would like some advice if the Aspen or Spring AOP is a better option. Thank you. Your requirements are very basic, so either Espex, Zebaus AOP or Spring AOP will work for you. . It suggests that going with the simplest option will be the best thing to do. I believe that using AspectJ byte-code manipulation, either compile-time or load-time, (depending on your setup) is either simple or nightmare It's very flexible what you can do, but be a little scary. Spring ...

wpf - Window.Location? -

क्या मैन्युअल रूप से WPF विंडो का स्थान तय करने का एक तरीका है? और गुण।

java - Does the StringBuffer equals method compare content? -

संभव डुप्लिकेट: स्ट्रिंगबफ़र s1 = नया स्ट्रिंगबफर ("टेस्ट"); स्ट्रिंगबफ़र s2 = नया स्ट्रिंगबफर ("टेस्ट"); यदि (s1.equals (s2)) {System.out.println ("True"); } Else {System.out.println ("गलत"); } क्यों वह कोड "गलत" प्रिंट करता है? विधि को ओवरराइड नहीं करता है, इसलिए यह स्ट्रिंग तुलना नहीं कर रहा है इसके बजाय यह प्रत्यक्ष वस्तु की तुलना कर रहा है। आपकी सशर्त भी हो सकती है यदि (एस 1 == एस 2)। यदि आप स्ट्रिंग्स की तुलना करना चाहते हैं तो आपको पहले बफ़र्स को स्ट्रिंग में बदलने की आवश्यकता होगी। देखें संपादित करें: मैं मान रहा हूं कि हम एक जावा दुनिया में हैं। पीएस यदि आप एक एकल-थ्रेडेड वातावरण में हैं, या आपके बफ़र्स एक धागे के लिए पृथक हैं, तो आप वास्तव में किसी के बजाय एक का उपयोग करना चाहिए।

inversion of control - Is It Possible To Spring Autowire the same Instance of a protoype scoped class in two places -

** has changed the illustration to better state the situation I am using and following is the status @Component @Scope ("prototype") class Foo {} class A {@Autowired Foo fooA; } Class B {@Autowired Foo fooB; } Class C {@Autowired Foo fooC; } I am trying to understand that if there is any way to use @ etord and FOO on I understand that if there is a scope of FOO and fooB a different example P> Also please explain this is the correct use of the autowiring concept? I'm trying to abuse the Spring Framework purpose Since neither singleton and prototype scopes start to fit you (you do not want an object, but you do not want a new installation every time), you need another chance. In a web-tool reference is a prepared solution - use the request field - in this way you will only be an example of your bean in every request / reaction cycle, no matter how many And how often you inject it. In a non-web application context, ...

c++ - How to convert concatenated strings to wide-char with the C preprocessor? -

I am working on a project where I have several fixed strings, which are created by the insertion (number, etc.) Have been. For example, I have a LOCATION macro in the formatting __ file __ and __ line __ in a string Which I can use to know where I am the code, when message or error printing: #define _STR (x) # x #define STR (x) _STR (x) ), It will format a place like "file.cpp (42)" #define LOCATION __FILE__ "(" STR (__ LINE__) ")" The problem occurs when I try to convert the result to a wide-string: #define _WIDEN (x) L ##x #define WIDEN (x) _WIDEN (x) # Define WLOCATION WIDEN (LOCATION) This works fine with GCC, and the results "L" file.cpp (42) "is being inserted into my code." However, when MSWC + + (Using Visual C ++ 2008 Express), I get an error: Error: narrow "file.cpp" (" I understand that L subsystem I only tried to add the first word in my expression. I also tried: #define _WID...

Convert from Oracle VARCHAR2 to MySQL TEXT -

How to correctly correct MySQL text types of data from Oracle VARCHAR2? I want to include it in the MySQL table in the field with the TEXT type via DSPL. Something could work like I was not sure how you are going, but Oracle Package DBMS_blob will replace varchar2 in various blog, lob, clob formats. You may have to use a temporary table to drag the source data to target the target if there are problems with the database link. Insert into database.target_table@DBLINK (text1, text2) dbms_lob.substr (s.text1, 4000, 1), dbms_lob.substr (s .text2, 4000, 1) From Source_table;

c++ - Does the STL contain a hashtable? -

संभावित डुप्लिकेट: क्या एसटीएल में हैशटेबल का एक कार्यान्वयन है? यदि हां, तो इसका इस्तेमाल कैसे करें इसका एक संक्षिप्त उदाहरण क्या है? अधिकांश आधुनिक कंपलर्स में TR1 का कार्यान्वयन है, यदि वह विफल रहता है, तो आप हमेशा इसका उपयोग कर सकते हैं। कार्यान्वयन। सर्विस पैक 1 के माध्यम से एमएसवीसी वीएस 2008 के लिए है जीसीसी ने इसे 4.x के साथ भेज दिया है, लेकिन आप इसे 3.4.x के साथ भी काम कर सकते हैं AFAIR उपयोग लगभग एक std :: नक्शा के समान है।