Posts

Showing posts from June, 2011

deadlock - Handle NHibernate Transaction Errors -

The use of our application (which NHibernate and ASP.NET MVC), the stress placed NHibernate transaction errors under trials Throws a lot. The main types are: The transaction is not connected or disconnected Route updates or deletions by any other transaction (or unsaved-value mappings) ) The transaction (process ID 177) was locked on lock resources with other resources and was chosen as a deadlock victim. Run the transaction again. Can someone help me identify the cause of exception 1? I know that I have to handle other exceptions in my code. Does anyone point me to resources that can help me handle these errors in a efficient way? Q How do we manage sessions and transactions? A. For each server request we are using Autofack, we create a new request container in which the session is in the container lifetime, we activate the transaction when we activate the session. When the request is complete, we do the transaction. In some cases, the transaction may be huge. To simpli...

if statement - What are good programming questions to exercise the use of "if ... else" in Python? -

What would be a good set of programming practices that will help in knowing the use of dragon newbies "if ..." ? Looking at a date (year, month, day), find the next date. Most listeners did not have much risk of programming before, and I'm eager to use them to think about "if ... otherwise ..." And all else, in due time). It is hard for people who are programming for years to get "to get" Does it seem to start with nothing, I can clear anything with the need for more than 5 link codes. You have to decide on the order in which user input, output, if, for the second, while, file, etc. When they cover, they already know how to get some user input? Print some output? For code loop? Arithmetic on integer? Determine whether a number is divisible by another number or not? The answer to these questions limits your examples for IF. I suggest before making output, Arithmetic, For, Divisibility (Modulus), User input. Then I can print probl...

.net - DataSet and XmlDataDocument -

What is the importance of using XMlDataDocument with a dataset? It is a bit confusing to me whether anyone interpreted the significance of this Can do? Thanks From MSDN: XMLDocumentation is a close relationship with the dataset class, which provides relational views of weighted XML data. Any changes made to the XmlDataDocument are reflected in the dataset and vice versa. Therefore, This does not mean that you need it, or you have to use it. Also note that this class seems to be obsolete in .Net 4.0 . Go here for some

c# - CS0133 "The expression being assigned to 'identifier' must be constant" - what's the reason behind that? -

With many C ++ backgrounds I have been used to write the following: Const int count = ...; // Some non-trivial stuff here (int i = 0; i i ++) {...} and I hope the same works fine in C # Will do However ... byte [] buffer = new byte [4]; Const int count = buffer.Length; produces error CS0133: the expression being assigned to 'count' should be continuous . I do not get this. Why is it invalid? int is a value type, is not it? Why can not I specify a price and can not make variable changes in this way? Because const in C ++ in const is more const ;) indicates continuous expression of compilation-time in C #, const . This will be similar to this C ++ code: enum {count = buffer.Length; } Because buffer. Length is evaluated on runtime, it is not a continuous expression, and therefore it will generate a compilation error. There is a readable keyword in C # which is slightly more like C ++'s const . (It is still very limited, and there ...

java - Spring MVC: Insert values into all my ModelAndView s -

I have a mid-sized spring application and I add key / value pairs to all the models and scenes in cross cutting fashion I want to include (like AOP). Inspiration is to add all the pages (configuration values, build numbers, etc.). What is the easiest way to do this? I prefer without AOP but I am ready to use it if necessary. You have several options here. / Write a custom handler interceptor , and override the posthand () method, supply your data to ModelAndView . If your data is static, you can use it in ViewResolver in attributes to UrlBasedViewResolver . This is useful only for real string-based configs that you can put in your beans file. With a @ModelAttribute a method has been commented in your controller. Any object returned from such annotated methods is automatically added to the model. This will be done only for those requests managed by the @Requestmapping -annotated methods in that controller class.

c++ - Textarea for Cario:OpenGL -

Is the Sher Textarea class closed which uses serio (targeting OpenGL) as a renderer? By Textarea I mean a multilingual text field with word vap and width and height barriers. The code using this class is written in C ++. A solution is to use the binding of Cairo. Using it can be really misleading, so here is an essential requirement. If you want you can create classes around it. #include & lt; Pango / pangocairo.h & gt; // pango context PangoContext * pangoContext = pango_font_map_create_context (pango_cairo_font_map_get_default ()); // Layouts and attributes PangoLayout * pangoLayout = pango_layout_new (pangoContext); Pango_layout_set_wrap (pangoLayout, PANGO_WRAP_WORD_CHAR); Pango_layout_set_width (pangoLayout, maxWidth * PANGO_SCALE); Pango_layout_set_height (PageLout, MaxHit * PANGO_SCALE); // set the font PangoFontDescription * fontDesc = pango_font_description_from_string ("Verdana 10"); Pango_layout_set_font_description (pangoLayout, fontDesc); Pa...

c++ - How to retrieve the HD vendor/serial using Windows API -

I'm talking about the physical disk drive, no volume / segmentation / logical drive . That's because - GetVolumeInformation function is not applicable in my case. To be precise: I am working directly with the disk which has not yet split. I open it a handle via CreateFile function: hDisk = CreateFile (_T ("\\\. \ ... PHYSICALDRIVE0"), GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ I FILE_SHARE_WRITE, NOUL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED | FILE_FLAG_NO_BUFFERING, NULL); I can read / write directly to disk using this handle. There is also the possibility of querying different disk properties using the DeviceIoControl function. Although I can not find a way to query disc vendor / serial properties, which are visible in Device Manager. Take a look at the source code DFP_RECEIVE_DRIVE_DATA to DeviceIoControl . is the idea to use

c# - How to manipulate at runtime the invocation list of a Delegate? -

I want to know how to remove individual representatives from the list of my parents' representatives. pre & lt; DelegateName & gt; .RemoveAll (); Now I can only remove everyone and this will work only to get ideas in motion and see what should work, but then add deleted representatives again on runtime would be required! Like this: ... foreach (in the Delgate D & lt; representative & gt; invest in list) {// Do something with 'D'? ? } Now that I have access to 'D' then I can leave it in one. Remove () but it requires two arguments ??? Can I get some help about this? Finally, once the representative has been removed, what is the best way to add it again? So I'm assuming that reflection can play a part in this, but you can be above people. Update: Originally a global representative in which events living in many different humble classes, which are examples of these, all these events include a handler Which removes the event...

linux - Python Watch Folder - interrogating list for filesize -

I am trying to get the following code to see a folder for the change and the file name (primarily A complete path) Returning as a string Once it was checked that the filesystem has not been recently increased, to prevent the rest of my script to inspect the incomplete files, I need to set my filesystem timer function name Send in Inai'm getting because I collect the search went files as a List I if I'm barking up the wrong tree, I do not hesitate to tell you, and thanks for any help! Stewart import os, time def watch (path_to_watch): first for Oslistdir (path_to_watch)] for f = dict (f ([(f, none) ) Whereas clock_activ == 1: time.sleep (10) = after dict ([(F, none) f (path_to_watch) in oslistdir]] = added [f after f for f if not f =] If not added to f after f for f] if added: filesizechecker (added) back if removed: print "deleted:", "after def filesizechecker (filepath) =" before "(extracted). Checks files and # returns 1 when file 3 seconds I...

iphone - HTML pagination -

Is there an open source project for HTML paging? I'm developing an app for the iPhone. I want to display an HTML file on UIWebView and I do not want to scroll down the user to see the remaining content displayed on the screen. I want to display the remaining content on the second UIWebView. Any suggestions? You can see it available jQuery Plugin: Here is a demo: and you use it: Edit: OK, Before I posted it, the question was specifically about iPhones and UIWebViews ... please do not vote for me :)

unit testing - Is this design for dependency injection easy to understand? -

I am working on a project with a large current codebase and I have been entrusted with the task of doing some reconsideration. A small part of it does not have too many unit tests in the existing codebase, but at least I like the part that has a complete suite of unit tests with good code coverage. Because designing in mind with existing codebase unit testing, I have to make some structural changes to support the separation of dependency. I am trying to keep an impact on the existing code as possible, but I have a small discount to make changes in other modules. I have a reaction that I should understand the changes made or if I have made the following changes to the best way to deal with the problem: I have all those non-trivial The interface for the classes is drawn on which my 'coordinator' class depends on. I have modified the coordinator class to reference only the interface for my operation. I could not use the D framework, but I had to inject a large nu...

sql server 2005 - How to add a identity column that is unique per grouping -

कहो मेरे पास 2 कॉलम हैं उत्पाद Product_Cat ------- - --------- बिल्ली 0 कुत्ते 0 आलू 2 गाजर 2 लाँड्री 1 बर्ड 0 मैं एक तीसरी पहचान कॉलम पर जोड़ना चाहता हूं, लेकिन मैं चाहता हूं कि संख्या को प्रति अद्वितीय होना चाहिए Product_Cat तो आउटपुट दिखेंगे उत्पाद Product_Cat Cat_Ident ------- ----------- --------- बिल्ली 0 1 2 कुत्ता 0 2 आलू 1 गाजर 2 2 कपड़े धोने का 1 1 बर्ड 0 3 यदि आप ऐसा करते हैं कैसे? निश्चित रूप से यह नहीं है मेरा असली डेटा लेकिन मैं क्या करना चाहता हूँ की एक सरलीकरण। मेरे लाइव सिस्टम में मैं "Product_Cat" के 4585 विभिन्न मूल्यों है और वे 1 से 2408 "उत्पाद" श्रेणी में करने के लिए सीमा होती है। इस प्रकार आप उपयोग करने की आवश्यकता: टेबल #Products (आईडी int पहचान (1,1), उत्पाद nvarchar (8), Product_Cat पूर्णांक) बनाने GO # में डालने उत्पाद (उत्पाद, Product_Cat) मूल्यों ( 'बिल्ली', 0), ( 'कुत्ता', 0), ( 'आलू', 2), ( 'गाजर', 2), ( 'धुलाई', 1), ( 'बर्ड ', 0) GO ALTER तालिका #Products #Prod...

java - RCP app & change background color and putting image in center of application -

I would like to set the background color of my RCP application to white and show a center image. This is because because of the fact that no ideas or editors have been shown first and the user should choose the perspective that will be open. This is important because I have defined a background view that will be shown first, but it prevents me from showing the introduction / welcome page in full mode (this is shown only in standby mode). I fiddled with ApplicationWorkbenchWindowAdvisor and created a method called WindowContent, but the only thing I had to do was to set the image and color of the shell background. This has a white border of the page (logically because the shell behind the page). All attempts to insert pages failed. Can you help here? Is there a way to change the composite of the page? Thanks It should be ViewSashContainer on class Based on my experience, I put the code inside a method postWindowOpen () . Below is my code: Arrives list = (Arrielist) ...

openstreetmap - OpenLayers API Documentation -

I am doing a project using OpenStreetMap. This is a work code snippet that I have found that I am using to add markers: ... stylemap: new open layer Style map (Graphic U offset: -25, // Picture Graphics: 28 pixels label: "$ {Name}", // Set external graphic and background graphic images External Graphic: "$ {icon}", Background Graphic: "../images/marker-shadow.png", ... I have found 2 API docs for the Stylemap class: and . . Although I have two sources, they both have documents about the property Are not (like graphic u offset). Any code I was able to, so that the full API document should be present. Where can I get these full API documents? Regarding the StyleMap properties: itemprop = Text "> And it may help to get started:

webserver - Upload large files using Ruby -

I am thinking that what is the best way to allow large files to be uploaded to the server using Ruby . I have found but it does not give any concrete solution. I do not want to use rail because I am working on a simple upload server that will run in standalone mode, I'm guessing that Sinatra can be key but I do not know that without the timeout Which web server should I use to run this? I also need this web server to upload together. Update: With "big files" I mean between 200MB and 5GB UPDATE2: Videos due to those files (my case), I can deal with a maximum size of 2 GB like YouTube. OK I'm taking a bit of a stratch here: if you're the target of your upload If you use any couch, you will get rid of the timeout problem. In this example, see couchdb as some "temporary" memory so if a download is finished you can take the file from Cochab and do whatever you want with it. I have been able to upload files as large as 9 GB in the DCL li...

arrays - undefined method `push' for nil:NilClass (NoMethodError) Ruby -

I am trying to add an object using push, and I have a program where you register guests When I select the checkin option from my menu, Im is unable to add a new guest to the guest's history. Do not do this: def puts self.check_in "Welcome to checkin" puts "Please specify your first name:" firstName = gets.chomp "Please state your last name:" last name = puts gets.chomp "Enter your address:" address = gets.chomp puts "and your phone number:" phone = gets.chomp puts "Finally, your date of arrival! "Arrived = get.chomp newplot = $ camping.generateParkingLot Guest = Guest New (first name, last name, address, phone, arrived) $ camping.current_guests [newPLot-1] = Guests say "Registration was successful !! You've got conspiracy" + newPLot.to_s + "." @All_guests Push (Guest) connects guest to end of history Here I get a check_in ': Undefined method push for zero: NilClass (NoMethodError )...

html - IE not centering these images, is there a fix? -

Image
My problem with this page is that "high school", "middle school" And "elementary school" images are fully focused in all browsers except IE 6, 7 and 8. Relevant parts of the page: ( edit for clarity ) CSS: #block {clear: both ; Width: 682px; } .education_level_wrapper {float: left; Width: 100%; } .education_level {margin-down: 3px; Margin-left: auto; Margin-right: auto; Display area; } HTML: & lt; Div id = "block" & gt; & Lt; Div class = "education_level_wrapper" & gt; & Lt; Img src = "[sniped] /Title_HS.png" class = "education_level" /> & Lt; / Div & gt; & Lt; / Div & gt; IE: Chrome: What am I doing wrong here? Edit: See fixed version here:. The above link was a snapshot to remain consistent for archival purposes. Change your page to & lt ;! DOCTYPE HTML & gt; Browse from Try to comply with CSS Tactics. Right no...

osx - How to run java application with built-in command line arguments? -

I am creating a Java application that is stored in a .jar file and can be launched by opening the jar file By clicking on the command line or icon For the Mac version of the app, I would like to show the menu bar at the top of the screen in Mac style instead of the window (Windows Style). I know that it can be done with the command line: java -jar app.jar -Dcom.apple.macos.useScreenMenuBar = true But this will not work if the user does not know how to do this command line argument is created in jar file? You can do this by setting system properties in your code in the main method or in some other method, Which is called at the beginning of the application: System.setProperty ("com.apple.macos. UseScreenMenuBar", "true")

Saving SQL in Visual Studio 2010 -

Is there any way of Visual Studio 2010 to develop SQL in existing studios? / P> If you create a query through "Server Explorer", you will not be able to save it. Copy the SQL to a file and save it. You can add a SQL file to any project - though for them the box is not out of the template, then either create a template, or simply add a text file and change the extension to SECL - you Syntax highlighting, but you do not get a 'visual' designer, you have to paste your code into an explorer, new query: - ( I am using DB and Visual Studio 2010 It went with trying to do in this regard are quite a few problems. The database is a way to the top of SQL work.

sorting - need help with sort function in python -

मेरे शब्दकोश की सामग्री इतनी है: - & gt; & gt; & gt; मैं इस प्रकार का उपयोग करने की कोशिश की थी कुंजियों पर फ़ंक्शन मैंने देखा कि सॉर्ट फ़ंक्शन कुंजी के लिए काम नहीं करता - 15752. कृपया नीचे ढूंढें: - & gt; & gt; & gt; क्या कोई मेरे लिए एक रास्ता बता सकता है? ['15752', '475', '5231', '6279'] मेरा अनुमानित आउटपुट है: - ['475', '5231', '6279 ',' 15752 '] आह, आप संख्यात्मक मूल्य से सॉर्ट नहीं करना चाहते हैं स्ट्रिंग, ताकि आपको स्ट्रिंग को संख्याओं में कनवर्ट करना int (s) से पहले कुछ बिंदु पर या बस का उपयोग करें सॉर्ट किया गया (dict.keys (), key = int)

c# - Learn more about how .NET works -

Image
I had a quick phone interview, the interviewer asked me some questions: How to # Works? What is CLR and what does it do? What can be translated into C # code? Apart from the CLR question (for which I gave a very vague answer), I did not know the answer. I miss something, but I did not even know the answers of those people. I believe my knowledge is a very high level, but I think how. Net is a basic understanding of the works. Either way, I got a second interview, but he said that "I need to brush on how" .NET works "before the next interview. So ... I'm pretty sure Is not that how to do this ... any advice? I think I should also mention that I have been out of college for 2 years, and since then I have been working professionally Since then, the ASP.NET Web applications have been created Before that, I had no net experience. This article on Wikipedia gives you a good idea These 3 questions can be given:

SQL Server 2005 XML to table -

I am using classic ASP and I have a Proc in a varchar (ado data type) in an XML data column. The XML looks like this: & lt; Document Controls & gt; & Lt; Document documentGUID = "{B49654E7- 9AAF2-4B89-AF8F-5146F7CD4911}" Grader FYC = "5907" & gt; & Lt; Criterion cnumber = "1" rank = "3" /> & Lt; Criterion cnumber = "3" rank = "3" /> & Lt; / Documents & gt; & Lt; / DocumentCriteria & gt; ' I have a table that looks like this: DocumentGUID | GraderFYC | Cnumber | Rank {guid} | 5907 | 1 | 3 {guide} | 5907 | 3 | 3 How can I do this in a process? Is the Adverption Type OK in the ADO Connection? So do you have a stored procedure that takes a VARCHAR? Ok, something like this will work: Start the optional process as dbo.YourProcedure (@ data VARCHAR (2000)) @ XmlContent XML SET @XmlContent = CAST (@data as XML) INSERT Dbo.YourTable (DocumentGUID, GraderFYC, Cn...

database design - How strict should I be with creating a separate association table? -

Say I have a table with a report_type column and I only have 2 reports Is it worth it to create a report_types table for them, and then it refers to this table with a foreign key? Or is it acceptable to store report type as a string in that column? Things to consider: / P> Can the type add? Do you have the possibility of other tables which refer to report types (such as for collecting statistics or auditing)? Are you likely to use these values ​​in other contexts (like GUI drop-down widgets)? Do you need to associate the additional data (such as the long description) with the report type? I know that it takes a little bit like overwork to create a table, just to hold two rows and very clearly the gods will support you if you have a column And decide to stay with the check barrier. But if you already have a bunch of code lookup tables to implement restricted sets of values, then there is also a value in stability, well.

Is it bad or totally wrong to get a horizontally centered page by tuning CSS properties of html tag? -

Is it bad or completely wrong to get a horizontally focused page by tuning the CSS properties of the html tag? CSS code snippet: & lt; Style type = "text / css" & gt; Html {width: 1200px; Margin: 0 px auto; Background color: gray; Body [background color: red; } & Lt; / Style & gt; html code snippet: & lt; Body & gt; Anything goes here ... & lt; / Body & gt; html is the father of each element page If it gets centered, then we say that you want to make some space at the top left / right of your entire page. Now it will be relative to the centered html element, most likely ... and it will be a pain to offset that effect, that is why I do not recommend doing this. That is why at least the body or div wrapper is better at the center. Edit : It seems that the APD element will be relative to the whole viewport in my actual exam (in Fx 3), but even this is an incompatible cross browser. And is inconsistent with IE. Y...

What is wrong with this HQL query in version 2.1.2.4 of NHibernate? -

After then throwing an Antlr.Runtime.NoViableAltException below the HQL query. I was able to determine that this issue is with the member. If the member is removed then the name by order from the query. Will be executed. This HQL has worked fine in an earlier version of NHibernate, but it broke with the upgradation of 2.1 2.1.4.4 NHibernate. How can I be a member without throwing an exception? Any help is greatly appreciated. Thanks! ChartAssignmentLogRecord chartAssignmentLogRecord from the inclusion Indicator joining the inner measure.ProviderLocation of the chartAssignmentLogRecord selection chartAssignmentLogRecord.Measure joining the provider as the provider ProviderLocation.Provider provider ProvidersLocation.Address As a member joining the measure.Member joining the address of the address where the chartAssignmentLogRecord.AssignedDate & gt; =: STARTDATE and chartAssignmentLogRecord.ChartModifiedStatus =: modifiedStatus and chartAssignmentLogRecord.AssignedDate = (sel...

iphone - Help Fixing UIViewController with a UIToolbar -

I have an app with a navigation bar at the top of the UITableView subclass on which I see the UITableView Add a UIToolbar below: UIToolbar * toolbar = [[Uitoolbar alloc] init]; [Toolbar size tofitt]; // Set the toolbar to fit in the width of the CGFloat toolbar, right = [toolbar frame]. Shape. height; // Calculate the height of the toolbar; CGRK RootVibonds = self.parentViewController.view.bounds; CGFloat RootviewHit = CGRTGhatHit (Rootviewback); CGFloat RootViewview = CGRect GateWidth (Rootviewback); CGRect rectArea = CGRectMake (0, toolheart, rootview, toolbar); [Toolbar setframe: rikita area]; [Self.navigationController.view addSubview: toolbar]; The problem is that the toolbar is the "top" of UITableView and the mask at the top of the content of the first line in the UITableView. I really want "starting" for table view below UIToolbar How can I do this properly? Gracias, José I agree with the non-opponent, but if you According to the descripti...

jQuery-ui autocomplete IE6 z-index problem -

I am implementing the jQuery-UI auto completion function in my website. In IE6, the autocomplete box is selected under the other HTML elements, the input etc. is selected. These elements overlap on the autocomplete suggestions box. In IE7, 8, it works fine. I tried changing the z-index of parent division. I have changed the Z-index of the parent division of the input on which I have added the autocomplete to 99. Then I have set the style to 0 for the parent div of the other elements. But it does not work. Is anyone else having the same problem? Thank you This addresses this specific problem.

facebook - How to get a list of users who allowed my application? -

I want to get the users who allowed my application to receive my Facebook information. Example: I have Can anyone help me? Thanks Installing your application even after saving the User ID in a database There is no call to receive the list of users who do it.

python - Django installation problem on Windows -

Image
I am trying to install Django on Windows XP P> C: \ Python 27 (1) P> (3 ) After unzipping the file, I have placed the Django folder in the Python site packages folder: C: \ Python 27 \ LibSite-package \ Django-1.2.1 (4) Now when I try to run "setup.py" in the Django folder, I get the following error: traceback (from all Bengal's call last): File "C: \ Python27 \ Lib \ site- package \ Django-1.2.1 \ setup.py", line 48, & lt; Module & gt; Error named: Root_dir = os.path.dirname (__ file__): The name '__file__' is not defined The screenshot can be seen below: What am I doing? Thanks alternative method installed easy_install : Add C: \ Python27 \ Scripts in your system path Open a command line and type Enter easy_install django . This will pull the latest version of Django easy_install Definitely install Python module My favorite way to do

uinavigationcontroller - Problem in using tab bar controller with navigation controller -

I am working on a navigation based application. I am using the Navigation Controller for this purpose, I want to use the tab bar on one screen and I can not find any way to do this. As far as I've read, it is not possible to add a tab bar controller when you are using the Navigation Controller. Is it true? One solution was to manually add a tab bar on the screen and write its representative class, but in this solution, I would lose the "more" button functionality because it is handled by the tab bar controller, is anyone solving my problem ? Please help!!! You can add UINavigationController to each UITabBarController There are no other methods on the view of the tab. According to Apple's documentation, you can not press UITavBarController on the top of the UINavigationController . I'm not sure whether this is a technical limit or if you submit, they will reject your application. Either way you should not try to do this.

apache2 - Apache Virtual Host URL -

I have created an Apache virtual host for a web application that works fine, but I have a problem with url. I want my application to be used only in the same way with URL :, but now applications can also be accessed. My virtual host looks like this: NameVirtualHost 192.168.5.235:80 & lt; VirtualHost 192.168.5.235:80> Server name 192.168.5.235 alias / ksw "/ home / ksw / site" document root "/ home / ksw / site /" error log / home / ksw / log / error_log custom log / home / ksw / log / access_log combined & lt; / VirtualHost & gt; Is there a way to configure my application to be used only? Thank you. Home / Home / KSW / Site Files are: drwxrwxr-x 18 apache apache 4096 August 4 17:41. Drwxr-xr-x 4 Root Route 4096 August 3 20:17 .. -RY-RW-R-1 Apache Apache 825 August 3 20:18 Admin Settings. Sample - RY-RW-R-1 Apache Apache 2179 August 3 20:18 APiPHP-RY-RW-R-1Apache Apache 28 Aug 3 20:18 APIPPP 5 DWXWWXR-X2 Apache's Apache 4096 August...

http - Is it preferable to preserve web application state with JSON in URL? -

You can preserve the web application status with the JSON in the URL like this: http: // host /? State = [{id: 1, selected = true}, {id: 2, selected = false}] Is this better? There is an inspiration to do something like this if the user has the Web application status to be brought back to the user next time on the web application status. P> It is possible, but I think this is a bad practice: You are exposing a lot of technical details about your web app to end users Are you sure you are using secure JSON parsing? You are forced to stop url character encoding sooner or later Your URL is not very descriptive (see) My Advice: Create an ID for the state which is for the JSON stored in your database (Your URL's http: // host /? State = 123 with 123 pointing to any kind of database record (this makes URL very accessible, but I still have to So that it is better because the other points) is.

java - Change project type -

I have a large Java project, I want to convert my application into a plug-in project from the Java application. Is this possible? if so, how? Thanks! Nature will need to change the project file. You can find the ".project" file in the root directory of the project. Change: & lt; Natures & gt; & Lt; Nature & gt; Org.eclipse.jdt.core.javanature & lt; / Nature & gt; & Lt; / Nature & gt; to: & lt; Natures & gt; & Lt; Nature & gt; Org.eclipse.pde.PluginNature & lt; / Nature & gt; & Lt; Nature & gt; Org.eclipse.jdt.core.javanature & lt; / Nature & gt; & Lt; / Nature & gt;

configuration - Configuring Grails to use own DataSource implementation or to proxy the standard DataSource -

एक आवेदन में मैं अपने javax.sql.DataSource के अपने खुद के कार्यान्वयन का उपयोग करना चाहता हूं Grails एप्लिकेशन द्वारा उपयोग किए जाने वाले मानक org.apache.commons.dbcp.BasicDataSource और Grails एप्लिकेशन पर वर्तमान में लॉग इन उपयोगकर्ता के आधार पर क्लाइंट आइडेंटिफायर सेट करने के लिए कार्यक्षमता जोड़ता है। क्या है इस समय मैं दो संभावनाएं देखता हूं: Grails प्रॉक्सी द्वारा प्रयोग किया जाता है जो डेटा स्रोत के कार्यान्वयन को बदलने Grails द्वारा उपयोग किया जाता है और एओपी के साथ कार्यक्षमता को जोड़ने कैसे से निपटने के लिए पर कोई संकेत इस आवश्यकता है? ये मेरी resources.groovy आयात करें org.codehaus.groovy.grails.commons.ConfigurationHolder सीएच // अपने स्प्रिंग डीएसएल कोड को यहां रखें Ans = {/ ** * c3P0 डेटा स्रोत है जो कुछ आयु के डीबी कनेक्शन के नवीकरण को बाध्य करता है * बाड़ी / बंद डीबी कनेक्शन को रोकने के लिए और अतिरिक्त निष्क्रिय कनेक्शनों को बेदखल करता है * अभी भी डेटाएसओएसओआरओसीई कॉन्फिगरेशन सेटिंग्स का उपयोग करते हुए * सेटअप उपलब्ध है / / डेटा स्रोत (com...

jquery 3d carousel -

I've been learning jquery for a few days .. Can anyone tell me why this Works fine on Firefox and Chrome, but not IE? Yes, Message: Invalid log line: 142 four: 6 code: 0 URI: Message: Invalid logic line: 142 four: 6 code: 0 URI: Try using new junkies?

embedded - What is difference between MSP430 and MSP430X? -

कोई तुलना तालिका उपलब्ध है? 430X आर्किटेक्चर के लिए बुनियादी परिवर्तन मूल 430 उपकरणों पर उपलब्ध 64K के बाहर पते की अनुमति देने के लिए एक 20 बिट पता श्रेणी पेश करना था। पुराने नियम 16 ​​बिट निर्देशों के साथ समानांतर में 20 बिट पते पर काम करने वाले निर्देशों का एक नया सेट है जैसे कॉल करें; एक 16 बिट पता कैला लेता है; एक 20 बिट पते पुश लेता है; पुसा के ढेर पर एक रजिस्टर के नीचे 16 बिट्स को पुश करें; पूर्ण 20 बिट रजिस्टर पुश करें एक 430 आधारित प्रोसेसर के लिए संकलित मौजूदा कोड 430 एक्स प्रोसेसर के नीचे 64K पता स्थान के भीतर चलेंगे। विकास उपकरण (आईएआर और संभवतः राउली) में आप एक मेमोरी मॉडल निर्दिष्ट कर सकते हैं जिससे कि लंबे समय से फ़ंक्शन कॉल्स और अन्य 430X विशिष्ट निर्देश जनरेट नहीं किए जाते हैं यदि आप यह सुनिश्चित करते हैं कि आपका कोड 64K सीमा पार नहीं करता है।

linux - prepend date to a filename in a shell script -

I have the following shell script and want to rename the file db_backup.sql so that the change The current date is prepared for it, eg yyyy-mm-dd-db_backup.sql #! / Bin / sh mysqldump ... / _sql / db_backup.sql gzip -f_sql / db_backup.sql Simple question, hopefully quick and simple answer! You can use the date command to do what you want Can: #! / Bin / sh fspec = / _ sql / $ (date +% y-% m-% D) -db_backup.sql mysqldump ... $ {fspec} gzip -f $ {FSPC} If you are using a shell that does not support $ () , instead you may need to use backcatics: fspec = / _ sql / `date +% y-% m-% d`-db_backup.sql

javascript - Facebook Applications & Animated Loading Gif -

After I am developing a Facebook application and am working in running a little snag. When I call Ajax I want to know the user is loading the app. My confusion is that others say that the Facebook app does not allow animated GIF, although the above application has animated GIF, I scanned no benefit through my source code how animated gif Any ideas on how to get a Facebook application to play will be great . & Lt; Script type = "text / javascript" & gt; Function search_azax () {document.getElementById ('Loading'). SetStyle ('display', 'block'); Var Ajax = new Ajax (); Ajax.responseType = Ajax FBML; Ajax.ondone = function (data) {document.getElementById ('search_results') setInnerFBML (data). Document.getElementById ('Load'). SetStyle ('Display', 'None'); } QueryParams = {"VSearchMake" on:} document.getElementById ('VSearchMake') getValue (), "VSearchModel": .. Dokyumentkgeteleme...

c# - Regular expression identifier and separator using ':' symbol -

I want to separate my string between two ':' characters. "mypage-google-wax: press: -happy" , then I have to exclude "press" . It can be assumed that there is no numerical character in the input. There is a reason to use regular expressions at all, instead: String [] bits = text. Sample (':'); Thinking that I understand your question correctly ... which I do not know at all. Anyway, depending on what you really want to do, it may be useful for you ...

iphone - How do you perform OpenGL ES 2.0 shader matrix multiplication? -

I am trying to change the corner with a shader program, but I can not understand the results. I have prepared a projection, a scene (trans), and model (trans) matrix: First of all, I have done a top manners: View Prose * Position Objective-I have a translation in the program and The launch begins with identification with the matrix and then to look uniformed. I can see the geometry in response to a global translation in perspective. I would like to separate from the same matrix and work in all the shaders. I try in a project, visual (trans), model (trans) uniform, and shader: Proz view model position. But do not translate well (representation outside?) So I try to simulate just my first transformation, I look at a similar projection, and footage, shader (see proj) to do the same operation Status, but not in the view Project done in C. I am using the matrix described in column 0-4 as the first column and defined in the structure Now I do not know what I'm missing, ...

sql - stored procedure return .00 decimal -

इस संग्रहीत कार्यविधि में दशमलव प्रारूप के साथ वेतन नहीं लौटाता है 00.00 वैकल्पिक प्रक्रिया taxable_varsalary @emp_code Bigint, @co_id bigint के रूप में घोषित @t_varsalary दशमलव (8,2) सेट @t_varsalary = (emp_ded_ben_trans से sum (tran_value) का चयन करें जहां emp_code = @ emp_code और co_id = @ co_id और period_flg = 2 और tax_flg = 0) वापस @t_varsalary वैकल्पिक प्रक्रिया taxable_varsalary @emp_code bigint, @co_id bigint, @t_varsalary दशमलव ( 8,2) के रूप में आउटपुट emp_ded_ben_trans से @t_varsalary = sum (tran_value) का चयन करें जहां emp_code = @ emp_code और co_id = @ co_id और period_flg = 2 और tax_flg = 0 एक के लिए वापसी मूल्य संग्रहीत कार्यविधि एक int होना चाहिए। इसके बजाय एक आउटपुट पैरामीटर का उपयोग करें या select यह करें

c# - jquery with update panel -

I have a problem when using the jquery context menu and the update panel I use HTMLTextWriter to render custom textbox control references in the context I'm writing JavaScript to the menu. Everything works fine, I can right click on every text box and the menu is visible. But when I trigger a partial postback using an asp.net updatepanel, the menu will not be displayed. It seems that the bond between jquery and html is lost when the partial post is back. Is there a better way to put dynamic javascript code apart from RenderBeginTag? How can I solve this issue? If you are right, the update panel will remove your javascript binding. In a postback in your update panel, re-register JavaScript in question. Something like this: ClientScriptManager cs = Page.ClientScript; Cs.RegisterStartupScript (typef (page), "Replication javascript", "script = type = text / javascript & gt; your javascript initthum (); ", false); If it does not work you may ...

c++ - how to compile text-to-speech festival voice free library on win32 with VC -

I need to embed text-to-speech with human zero in my application. The only problem after reading the I docs It can be fine - is it not certain whether it is working on its windows or not? Manages to compile Libre on windows without any signin Use flite Compile on Win32 or IOS is easy.

iphone - ADBannerView in UITableViewCell -

What is the best practice for placing ads in your table visual cells? . Here is my code, which works until the banner transitionToNextBanner event, which then receives my application crash UITableViewCell * cell = [tableVw dequeueReusableCellWithIdentifier: @ "BannerAdCellIdentifier"]; If (cell == zero) {cell = [[[UITableViewCell alloc] initWithStyle: UITableViewCellStyleDefault reuseIdentifier: @ "BannerAdCellIdentifier"] autorelease]; } [[Cell Vitudeg: 99 99] Removed Frossoversive]; ADBannerView * adview = [[ADBannerView alloc] initWithFrame: CGRectMake (0, 0, 320, 50)]; AdView.tag = 9999; AdView.requiredContentSizeIdentifiers = [NSSet setWithObject: ADBannerContentSizeIdentifier320x50]; AdView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50; [Cell ad sbueview: adview]; [Ad release release]; Return cell; I thought that since I am not setting up an advertising representative that it will be protected from any related issues related to m...

windows installer - How do I (un)install an application remotely using PowerShell 2.0? -

How do I use PowerShell to install / uninstall locally, but how can I run it on another server I network and same OS version? $ product = go-WMIObject -Class Win32_Product -Filter "name = 'MyMSI'" $ product.Uninstall () or $ product = go-WMIObject-list | ? {$ _. Name - AQ "Win32_Product"} $ product.Install ("C: \\ MyMSI.msi") You can still use those lines - to install and install a computer - by using a computer username and specifying the name of the computer. To install you need to copy the software to the local file system and specify that in the command

firewall - FreeBSD bandwidth distribution -

We have a FreeBSD server primary IP 11.11.11.11 In addition to this, two additional IPs are 22.22.22.22 and 33.33.33.33 . The firewall should be set up to do the following tasks on this server: If the user downloads 11.11.11.11, give him a guaranteed bandwidth of 5 Mbts. If the user downloads the IP from the bandwidth to the range of 22.22.22.22 up to 320Kbit, then if there is an IP10 connection / threads, the bandwidth will be 32 KB. If the user is not limited to download bandwidth from 33.33.33.33. Apart from this, if all 95 MBTs are used, users who download it from 22.22.22.22 should take bandwidth. Is part of. Please consider these examples: / usr / share / examples / pf / and good documentation from the Open BSD website: In the example configuration you might find similar to yours.

javascript - Windows media player control embedded into HTML - change of control's size after starting playback -

I use the following HTML to display the media player on the web-page given in IE 8: & lt; Object Type = "Application / X-MS-Wim" Class = "CLSID: 6 BF 52A 52-394A-11D3-B153-00C4F962AA66" width = "200" height = " 200 "& gt; The control size remains the same after starting playback. However, when I dynamically create control in JavaScript, the control increases after the video is started. The size of the video here is the code: player = Document.edElement ('object'); Player Set Attribute ("Classic", "CLSID: 6 BF 52 A 52-394A-11D3-B153-00C4F942AA 66"); Player.setAttribute ("Type", "Application / X-MS-Wipe"); Player.setAttribute ("width", "200"); Player.setAttribute ("height", "200"); Is this a bug or am I forgetting something? How can I keep the same size of video as the original size of control? Thank you. P. s. BTW, if I set the pro...

system.reactive - using IObservable with unity -

I want to use Iobservable patterns to highlight the stream of events The problem is that I have both supervisor and event generator I am using unity to make I will not only raise these two for starting on the application, so I can start listening for the events. Does anyone have any suggestions about this? After reading the reply of my comment (sorry about the delay, see my comment) I can think of two ways to solve it. First of all, a customer comes to a customer with a IObservable (which subscribes so far) -b- Created IObservable source . In this way, customers can subscribe immediately, but the source will not be available until the source is created. The second option is to create a IObservable tasting version with ships with EventAggregator (2.2, I have not checked 4). EventAggregator acts as a broadcast event system, so any code can ask for a event which can be either subscribed or published in your case In, this event will apply to ISubject (i.e., both ...

entity framework - Linq join where? -

इकाई 1 - आईडी, स्वामी कोड इकाई 2 - स्वामी कोड, विभागकोड इकाई 1 ई 1 से एंटिटी 2 ई 2 पर ई 1। ओइन्करोड = ई 2। ओपरकोड और ई 2। डिपार्टमेंट कोड = 7 लिंक के माध्यम से मैंने लिखा: var q = e1 से entityes1 ई 2 में E1 में E2 में शामिल हों। ओपरकोड बराबर e2.OwnerCode ... लेकिन कैसे मैं कैसे नहीं समझ सकता है विभाग कोड 7 =। तालिकाओं में शामिल होने के लिए वास्तव में एक कारक नहीं है, रिकॉर्ड का चयन करने में यह एक कारक है, इसलिए इसे वास्तव में होना चाहिए जहां एक खंड: var q = e1 से entity1 1 ई 2 में इकाई 2 में ई 1 पर जुड़ें। ओपरकोड ई 2 के बराबर है। ओपरकोड जहां e2.DepartmentCode == 7 e1.ID चुनें; Var id = q.Single ();

iteration - iterating through a list of records in a second (html) page, where the first page orders the results -

I am creating this site using jsp / servlets on the backend. The first page (or "search" page) allows anyone to find records from a table, and also allows the user to sort the records. The sorting mechanism is quite complex, and is not a case of enclosing "order" in a single SQL query. The first page then fills in the results after the user hits "Search". Actually, this is just a list of items in the "miniature" format, where each item can display items in the second page. Includes a link for The sorting system is run in the first page, while the list is being prepared. The mechanism does not use Java code to sort, not SQL (for reasons I will not go in, but definitely necessary). When the second page (or "description" page) is loaded, it displays the record ID from the URL, followed by the details of that record. The problem is that now we want to keep recurring features of the "back" / "next" type in the...

javascript - jquery select element -

There are some problems with jQuery selectors. My HTML is similar: & lt; Form method = "" action = "" & gt; & Lt; P id = "question_1" & gt; & Lt; H1 id = "question" & gt; 1 question & lt; / H1> & Lt; Div id = "options" & gt; & Lt; P id = "option1" & gt; Input A & lt; / P & gt; & Lt; P id = "option2" & gt; Input type = "radio" id = "option" name = "q_2" value = "2" /> gt; B & lt; / P & gt; & Lt; P id = "option3" & gt; Input type = "radio" id = "option" name = "q_3" value = "3" /> c & lt; / P & gt; & Lt; / Div & gt; & Lt; / P & gt; . . . & Lt; / Form & gt; There are such questions there. I & lt; P & gt; Examples include 3 radio buttons for each question, for example, p # question_1 & gt...

php - How to check if $_GET is empty? -

कैसे जांच करें कि $ _ GET खाली है? आपने स्वयं कहा था, जांचें कि यह है: यदि (खाली ($ _ GET)) {// no डेटा प्राप्त हो चुका है} देखें, PHP बहुत सीधा है आप बस लिख सकते हैं, आपको क्या लगता है;) यह विधि काफी सुरक्षित है यदि $ _ GET अनसेट नहीं किया गया था (संभावित नहीं, लेकिन संभव है) ! $ _ GET आपको एक अपरिभाषित चर E_NOTICE दे सकता है।

pdf generation - How do I convert Word files to PDF using Word 2007 programmatically? -

I used to convert the word document to PDF through word automation: Tell the commandbars until someone with "PDMmaker" Not found, control and execute its calculations. With Word 2007 it does not work anymore - although PDF Macer Com Edin can be installed and accessed through Acrobat menus. PDFmaker is essential for quality reasons, so I can not use Microsoft "save as PDF" edit; Therefore the SaveAs method described in any other post is not applicable here. Any thoughts? A common way to get the PDF out of Word is to print a virtual PDF printer. I could bet you have established one. You may find suitable quality. The code will be: application.ActivePrinter = "This PDF printer has got you" This document. Print Out OutputFileName: = "c: \ Whatever.pdf", printtofile: = true

multithreading - Python threading.Event() - Ensuring all waiting threads wake up on event.set() -

I have lots of threads waiting on an event, do some action, then wait for the event again . Another thread will trigger the event, when it is appropriate. I can not understand a way to ensure that every wait thread triggers once upon event once set. I have established the trigger thread at the moment, go to sleep for a while, then clear it. Unfortunately, this often leads to the thread waiting for catching the set object, or not at all. I can not just generate the response threads to run the trigger thread once because they are the answers to the requests made from the other place. In short: In the Python, how does a thread set an event to me and ensures that every wait thread works fine once before correcting the event? Update: I've tried setting it up using lock and queue, but it does not work what I have : #GLOBALS - Threads are being used to wait OnEvent = Q. QEI MainEvent = ThreadingEvent () MainEvent.clear () # Sure it is necessary, but I thought I'd be...

How to detect an android device whether it supports google maps API -

I'm currently developing an Android application using the Google Map API. I support all the Android devices map API, because this API is an optical API and it is an add-on on the platform. I'm worried that my application will not be able to run on that device. I should know that the Device Support Map API is programmatically detected, and by catching the exception and doing something else. Because, the use of map capability is just one of the features of my application, I can not download the maps APIs to those devices and still download other features of my app Run your application effectively with running. Any comment or suggestion is welcome I use the following solutions Have described Use-Library Android: name = "com.google.android.maps" Android: Required = "Wrong" /> In the second reply: click the public Zero map (see see) {try / check if Google Maps is supported on a given device. ForName ("com.google.android.maps.MapA...

c# - I'm attempting to force gzip compression on a page using GZipStream but the browser says I'm using unsupported compression -

I transit to discuss Steve Soders about forcing gzip compression I got a module that is running it: void Sndrbpratisndehen headers (object sender, Iventargs e) from as {var app = Actiteepiaplikeshn; Var request = app.Request; Var response = app. response; If (compressionUtils.GzipSupported (request) || compressionwall.zipnotecontact field (request)) {return; } If (compressionUtils.GzipSupportedExplicitly (request)) {response.Filter = new GZipStream (response.Filter, CompressionMode.Compress); reaction. Adheeder (html printers container encoding, "jizip"); Return; } Rispanskwrite ( "& lt; iframe style = \" display: none; \ "src = \" / Kmpressedpagekaspsh \ "& gt; & lt; / iframe & gt;);} CompressionUtils.GzipSupported only accepts the 'encoding' tentative title, while CompressionUtils.GzipSupportedExplicitly and CompressionUtils.GzipNotSupportedExplicitly cookies whether the browser can actually read gizs But ...

Django admin: deletion of linked elements -

On the Django Admin site, when you decide to press the object, all the linked elements (i.e.: a foreign key Element indicated by)) is also removed. How can you dodge it, leaving the raw questions in the shell? Is it possible for the administrator to tune the election? Thanks You can hack around it, but there is no proper way to do this. Take a look at these links for potential solutions:

how to abort wget? -

For some time when I use wget to continuously download a website, I made a mistake and wanted to abort. Was there. I have wget "post-text" itemprop = "text"> What shell are you running code? In many shells, CTRL + C will cancel the currently running process if you are running Linux, then pkill-9 wget is running in the background, be able to force it needed.

java - JPA @Transient fields being cleared before @PreUpdate method is called -

I have a user unit class for which I am trying to do the hashing password. I thought that the easiest way to do this would be to create an annotated password field with @transent and a hashead password field, which is made with the object @ predicist and @ annotated method with prior update. So I have something like this: @ Transaction Private string password; Private string hashed password; @Prepresist @ Undo Private ZeroHashword () (if (password! = Null) {hashedPassword = PasswordHasher.hashPassword (password);}} This works perfectly fine when someone The unit remains the password field is still set by the hash password, and a value for the hashed password is calculated and stored. However, this is not correct for an update - Even if a new value for the password was set before the unit was visited Or, at that time, the field is called zero hash password, why is it? Should not the prices of the temporary areas remain at least until the unit persists? (I have Eclipse li...

javascript - Tracking clicks on videos in Google Analytics -

There is a client site where video content is populated by a video CDN by ADX. Each link is created like this: & lt; Class = "thumb-link" href = "/? Video = '. $ Video- & gt; Id.' 'Onclick = "show_video' $ Video- & gt; Id.', ''. $ Section '\'); Return back; "& Gt; & lt; img src =" '. $ Thumb. ' 'Width = "100" height = "65" alt = "" align = "left" /> gt; & Lt; / A & gt; But they report that analytics does not monitor ARP, since onclick to load content through javascript rather than go to a flash player and load the video Is saying. What can I do to track this click (without going to the physical page) like they click on a page? Can I add onclick and do something like this: Add to anchor: onclick = "trackVideo ();" Then, with javascript: function trackVideo () {path = $ (this) .attr ("href"); Var ...

Validate arguments in Ruby? -

I wonder if anyone should validate that the argument passed to a method is of a certain class. For example, "first logic needs to be a hash", unless "hash.clash == hash" does not require second argument, then DF type (hash = { }, Valid = []) # Validate to be an array "until the array.class == array # real code expiration Whether it is smart to do or passes in debates Is it just time and time to validate all of them? Is there any such situation when you have this extra Safety and circumstances when you will not bother Share your experiences! I do not recommend this specific approach, because you fail to adjust those sections that provide hash or array semantics but are not those classes. If you need such recognition, you Are Better Using the response_to? with method method? To implement the word: [], it is worth it. OpenStruct hash economics and attribute-accessory method words, but condition hash.class == hash . It will act like a hash in...

javascript - how to hidden the "MapTypeControlStyle" control on google-maps v3 -

यह मेरा चित्र है: यह मेरा कोड है: var myOptions = {ज़ूम: 13, केंद्र: latlng, mapTypeControlOptions: {शैली: google.maps.MapTypeControlStyle.DROPDOWN_MENU, स्थिति: google.maps.ControlPosition.TOP_LEFT}, नक्शा टाइप करें: google.maps MapTypeId.ROADMAP}; Var नक्शा = नया google.maps.Map (document.getElementById ("map_canvas"), myOptions); मैं डॉक्टर को देखता हूं, लेकिन मुझे 'छुपा' संपत्ति नहीं मिली तो मैं क्या कर सकता हूं? धन्यवाद जोड़ें disableDefaultUI: true अपने नक्शे में विकल्प।

tokenize - Using multiple tokenizers in Solr -

What I want to be able to execute a query and gets results that are not sensitive and partial words Matches the index I have recently installed a solar schema which has been modified so that I can return queries and results, whatever the case may be, what they can do. Therefore, if I search for iPOd, see Ivill that the iPod will return to the code to do this: & Lt; Ignore filter class = "solr.StopFilterFactory" = "true" word = "stopwords.txt" enabledPosignIncreates = "true" /> & Lt; Filter class = "solr.WordDelimiterFilterFactory" generWordParts = "1" generatedNumberparks = "1" catenateWords = "1" catenateNumbers = "1" catenateAll = "0" partition onces change = "1" /> & Lt; Filter class = "solr.LowerCaseFilterFactory" /> & Lt; Filter class = "solr.SnowballPorterFilterFactory" language = "English" protected = ...

xmlhttprequest - Coldfusion GetHttpRequestData()? -

Does anyone have an example of how GatehatPrequent data () of ColdFusion works? I'm looking to use this func to save data from AJAX upload scripts: The script works in Firefox but not Safari, Chrome, etc. ... thoughts? What error do you get? Perhaps these links will help:

Can more than 1 websites be installed using Joomla? -

संभव डुप्लिकेट: मैंने जूमला की एकल स्थापना का उपयोग करके एक वेबसाइट बनाई है I मैं एक और वेबसाइट बनाना चाहता हूं क्या 1 से अधिक वेबसाइट बनाना संभव है? यदि ऐसा है तो यह कैसे संभव है? वहाँ कुछ घटक हैं जो मल्टीसमैन सहायता प्रदान करेंगे जैसे कि

c# - "Gracefully" killing a process -

I am currently using the process to kill a process. Although there is a way, instead of just hitting it instantly, I might like to send a message to the process so that it can instruct me to close it, so that it can be cleaned properly and shut down. Actually, I'm just looking for a composite to click on the red X in the upper right hand corner, which I believe is sending a message to apply for shut down. If there is a Windows interface in this process (as you refer to the red "X") , Then you try If this fails, you can process. Kell () .

hashmap - Help on __gnu_cxx::hash_map -

Is there a document about "__gnu_cxx :: hash_map"? I want to know how to use it. Srinivas Implementation of GNU hash_map is basically the same as described in the same.

ruby on rails - If I have a function that I use both in the controller and in the views, where should I put it? -

I try to be very good about keeping my visual code and my controller code apart, but sometimes I go into situations where I need to use the same function in the controller and ideas where should I put this function so that I can get it from both controller and view? You can put it in the controller and make it available as a helper. If you need to be available among the controllers and their controllers or other controllers placed in heritage: helper_method: shared_function

asp.net mvc - replacement for try catch(MyEx ex) in each action -

I want something that works like this: Public ActionRisalt AC ( ) {Try {// stuff ...} Catch (pre-expiration) {// handle}} but do not try to catch in every action method You want to annotate your classes with HandleErrorAttribute - If the functionality built into the above handler is not sufficient, then you can define your class which implements IExceptionFilter - the result of the on-premises method and an exception concert object with the HttpContext properties, Which you can use to control the result: Public class MyHandleErrorAttribute: FilterAttribute, IExceptionFilter {public zero on option (exception comment box filter context) {A Debate e = filterContext.Exception; // Some logging etc come here (! FilterContext.ExceptionHandled & amp; amp; amp; amp; amp; ContactContacts.httpContext.IsCustomErrorEnabled) {ViewResult lResult = ... filterContext.Result = lResult; FilterContext.ExceptionHandled = True; FilterContext.HttpContext.Response.Clear (); FilterConte...

python - Printing the values of a tuple -

reaching Tupal values ​​ How to reach the values ​​of A and B. in the & gt; & Gt; T = []> & Gt; T. Append (("A", 1)) & gt; & Gt; T. Append (("B", 2)) gt; & Gt; Print t [0] [0] One & gt; & Gt; Print te [1] [0] b how to print the values ​​of A and B Just do print t [0] [1] print tee [1] [1] but of course If you really want to look for someone or B, then this is not the best creation, then you need a word: t = {} t ["a"] = 1 t ["b"] = 2 print t ["a"] print t ["b"]

iphone - Frequency of iAds showing? -

I have yet released my first application with iAds enabled. It has been accepted by Apple and I have already earned some minor $ 0.28. Now I mean the ads are being shown on some of my consumer devices. I knew that my device would be, so I downloaded the application on the friends' phone and tried it on. On this device, advertising never shows why I was just thinking, ads show only at some time? After a set time? Or have I set it wrong? I would not think Apple would have accepted my binary if it was setup incorrectly, but I think it's a possibility. I was posting a link to see if anyone can test it for me, but not to make sure that the SEO will be happy with that or not. iAds will show test ads until the application is approved. Once the application is approved, iAds will be closed to live. You have not mentioned your location, or the location of your friends. As far as I know, iAds are still showing for users who live in the United States. However, the fill rat...

Why do CouchDB view rows use "key": key, "value":value & not simply key:value -

क्यों करता है curl http: // localhost: 5984 / blog / _design / comments / _view / total_num? Group = सच है वापसी {"पंक्तियाँ": [{"कुंजी": "sum", "value": 23},]} और नहीं {"पंक्तियाँ": [{"sum": 23},]}

Forms not getting submitted with MECHANIZE in PYTHON! -

आयात से आयात करें * आयात करें cookielib से खूबसूरत सूप आयात BeautifulSoup br = ब्राउज़र () br.open ('http: / /casesearch.courts.state.md.us/inquiry/inquiry-index.jsp ') br.select_form (name = "main") br.find_control (name = "अस्वीकरण")। Selected = true reponse = br.submit ( ) प्रिंट reponse.read () ऊपर मेरा कोड है I अब मुझे उम्मीद है कि यह इस का एचटीएमएल दिखाए, लेकिन ऐसा नहीं कर रहा है बल्कि एक ही पृष्ठ के एचटीएमएल लौटने के बजाय। मुझे क्यों नहीं मिलता? जोड़ें .इटम [0] : br.find_control (name = "disclaimer")। आइटम [0]। चयनित एक फुलर कोड स्निपेट इस तरह दिखता है: आयात मेकेनाइजेट br = मैकेनाइज्ड। ब्रॉसर () br.open ('http://casesearch.courts.state.md.us/inquiry/inquiry-index.jsp') br.select_form (name = "main ") Br.find_control (name =" disclaimer ")। आइटम [0]। चयनित = सच reponse = br.Submit () प्रिंट reponse.read ()

What are all the documents i need to read to become a iPhone developer? -

I knew C, CPP, Java, Servicelets, JSP and Objective C. Now, I want to apply some web application related to i-phone. I have Mac System, XCode, and all besides I am registered at developer.apple.com. My problem is, can I start learning about development? There are so many documents available in the site of the apple, but in each document, they gave a lot of links to other documents and said "before reading it," I hate it. So please tell me a clear way to learn about iPhone development. Thank you to all ... Apple documentation is amazing Start with it and then take a look.