Posts

Showing posts from May, 2012

python - parsing line capture value in the ttoken -

My goal is that ID on side text file to find the line, then the value of the tokens behind the ID in my file this type of 100 lines (5th column is always ID searches I and tokens 6th column that I need to store the catch numbers between the two alphabets /. for example, if I'm ID Q9C0F0, I / store value in 1136 (between 2 Varnmal Received between K and N). Then I want to print on outputfile to use that number. Advances want to thank you COAAD ASXL3 Missense_Mutation KFGM-AA-3672 Q9C0F0 K1136N COAAD ASXL3 Misensmateshn Kefjim-AA -3693 Q9C0F0 A 1544 e Sioaadiasaksel 3 Misensmanteshn Kefjim-AA- A010 Q9C0F0 F 353 S COAAD ASXL3 Missense_Mutation KFGM-AA- A010 Q9C0F0 L157I COAAD ASXL3 Misensmateshn Kefjim AG -3890 Q 9C0F0 L 1324Q Sioaaadiasaksel 3 Misensmateshn Kefjim- G-A 2002 Q 9C 0 F 0 H 552 N COAAD ASXL3 Missense_Mutation KFGM- AG A002 Q9C0F0 K471N COAAD ASXL3 Missense_Mutation TKFGM- AG A002 Q9C0F0 L804M this is a simple way to pronounce it help you how to...

android make a radio button scrollable -

I have a problem with the big radio button text The text for this radio button is dynamically generated Unfortunately, Sometimes the text is allocated and it pushes other objects in my layout. However, if I can scroll the radio button it will remove this issue. What do I mean by scrolling if the length of the text is beyond a certain size, then a scroll bar appears on the side of the radio button, So that the user could scroll through the radio buttons' text without changing the layout of all their XML files. When I mean changing layout, other widgets have moved like a button, this is the XML layout file layout for the radio button ; & Lt; / Scrollview & gt; & Lt; ScrollView Android: id = "@ + id / ScrlView" Android: layout_width = "fill_parent" Android: layout_height = "74dp" & gt; & Lt; RadioButton Android: id = "@ + id / radio2" Android: layout_width = "304dp" Android: layout_height = "75dp" ...

c# - Can I turn ReSharper TODOs into compiler warnings? -

Installed with reorder, such comments // TODO: this obvious error Correct is highlighted and shown in the To-X Explorer window. Is there any way to convert them to compiler warnings? Currently not possible because in the references given by the checkbox for Todo items only Only commenters, strings, and time identifiers for writing). As support for JetBrains Bugtracker - Note that in May 2011, the target setting was pushed from version 5.1 to an uncertain future version.

java home - I am trying to find the JAVA_HOME path -

Image
I went to% echo% JAVA_HOME% to find my path I know this is the wrong path, but I'm sure It is not how to fix it. Any help would be appreciated. C: \ Users \ Syndia;% echo% JAVA_HOME% C: \ Program Files \ Java \ jdk1.6.0_33 \ C: \ Program Files Java \ jdk1 0.60_33 \ C: \ Program Files \ Java \ jdk1.0.60_33 \ JAVA_HOME% \ bin \ bin \ bin C: \ Users \ Cynthia & gt; On the windows, right-click on "My Computer" and select "Properties". Go to: "Advanced System Settings" and then for "Environment Variable": Then go to the variable and set% JAVA_HOME%: like this: here another

c# - Write LINQ to parse aspx page using HtmlAgilityPack -

I have seen the following and similar links on SO and Google to parse the ASPX page using HTML AggregatePack But I do not know how to write the LINQ statement that I can identify buttons and label control names in my aspx page. Here is my aspx page. & lt;% @ Page language = "C #" AutoEventWireUp = "True" CodeBhind = "webform 4.aspx.cs" Inherits = "WebApplication1.WebForm4"%> & Lt ;; DOCTYPE HTML PUBLIC "- // W3C // DTT XHTML 1.0 Transcription // N" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Head runat = "server" & gt; & Lt; Title & gt; & Lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Form id = "form1" runat = "server" & gt; & Lt; Div & gt; & Lt; ASP: Button ID = "Button 1" Run = "Server...

php - Converting Korean characters into entities -

I am trying to convert the Korean characters into Unicode / html entities, but there is no luck. I use this site: but want to do something like this in PHP coding. $ text = '' ???? "????" §§ ?? '; Echo htmlentities ($ text); Example: í ???? In "???? §§ ?? in and # 54620; & # 50696; & # 51652; mb_convert_encoding ($ text, "HTML-ENTITIES", "UTF-8");

Disable Automatic File Header Creation (ReSharper and StyleCop) -

Image
I recently completed R # 6.1 (c # version, with StyleCop 4.7.34.0 (with R # plugin) No) installed. When a new class is added to a project, the file header information is automatically added. How do you disable it? I turned off the checkbox for "Insert text in the documentation and file headers" within the R # Option for StyleCop (Option> gt; Tools> Style Cop & gt; Header section) .... but there is still no luck. I have also closed the StyleCop rule SA1633 to SA1640, which requires header documentation. I have found this suggestion: Reese - & gt; Options - & gt; Tools section - & gt; Code Cleanup - & gt; Choose StyleCop Profile - & gt; Documentation section - & gt; Untick 1600 But I do not have the "code cleanup" node in my device section. Not sure if I'm using the "C #" version of R # To do. The problem is actually due to: Gt; Code Edit & gt; Code Cleanup & gt; StyleCop & gt; 1600 and 16...

ubuntu - What am I doing in this terminal?: C Programming -

यहां प्रोग्राम का स्रोत कोड है। #include & lt; stdio.h & gt ; # शामिल करें & lt; stdlib.h & gt; #include & lt; string.h & gt; इंट चेक-ऑटिफिकेशन (चार * पासवर्ड) {यदि (स्ट्रकम्प (पासवर्ड, "ब्रिलिग") == 0) रिटर्न 1; यदि (strcmp (पासवर्ड, "outgrabe") == 0) 1 वापसी; वापसी 0; } एंट मुख्य (इंट आर्जिक, चार * argv []) {if (argc & lt; 2) {printf ("उपयोग:% s & lt; पासवर्ड & gt; \ n", argv [0]); बाहर निकलने के (0); } यदि (चेक_ऑटेनेटिकेशन (argv [1])) {printf ("\ n - = - = - = - = - = - = - = - = - = - = - = - = - = - = - \ n"); Printf ("पहुंच प्रदान की गई। \ N"); printf ( "- = - = - = - = - = - = - = - = - = - = - = - = - = - \ n"); } अन्य {printf ("\ n पहुँच अस्वीकृत। \ N"); } वापसी 0; } मैं इस छवि में प्रोग्राम के लिए बिल्कुल क्या कर रहा हूं? । जब मैं इस कार्यक्रम को खिड़कियों में चलाने की कोशिश करता / करता हूं तो मैं इसमें कुछ भी इनपुट नहीं कर सकता, लेकिन UBUNTU में मुझे लगता है ...

asp.net mvc 3 - can I turn off Visual Studio's "[the file] is already open. Do you want to close it?" behavior? -

Image
I have installed MVC3 in VS2010 today. Since then, if I double click some items in the Solution Explorer then I get this dialog: This is intermittent but in the form of a hoax hack. This is happening only for some files. I can not imagine a situation where, when a file is double clicked in the solution explorer, then I want to close that file. The files in question are all razor ideas, but this is not happening for all the razor ideas, even if they are in the same directory. They all have the same file extensions. Can I disable this dialog and set it to always open a file that I double click in the solution explorer? Restart the computer and this problem has gone away.

How to grab and hide cursor using gtkmm? -

I'm trying to write an application using gtkmm, and I want to hide it from the mouse cursor when focus So the first step I have taken is to hide the mouse cursor when the cursor is above my window, which is successful. But when the mouse is taken out of my window, to prevent it from showing, then I restrict the mouse movement with the mouse cursor back to the center of my graphing area. To do this I need to know the status of window and the window size, which is easy to use: GDK :: Window :: Match-item and GDK :: window ::. However, if the window is moved, the matching status will not be updated and thus my cursor will fall in the wrong position! So what are the options for the effect that I can get here? simply indicator. // Let windows pass all events separately LEAVE_NOTIFY_MASK MainWindow- & gt; Set_ivents (Gdak_akspozr_mask | GDK_pointr_moshn_mask | GDK_pointr_moshn_hint_mask | GDK_btn_moshn_mask | GDK_buttonl_moshn_mask | GDK_button2_moshn_mask | GDK_butto...

- Where Developers Learn, Share, & Build Careers

This code should select the contents of a Texter, when the text is selected, however, it does not work by itself: $ ("# form"). Focus (function () {$ ("# form"). Select ();}); This only works when I give it a setTimeout of 0 like: $ ("# Form "). Focus (function () {setTimeout (function () {$ ("#Format"). Select ();}, 0);}); Why is that so? It looks like the first code, selecting the snippet, then deselecting the text I suspect that Text selection is being exposed after the event after the focus event is over, and after setTimeout select (when behind Things have already happened).

- Where Developers Learn, Share, & Build Careers

I am using an NSAlert to ask the user to enable the utility for Accessories. Is it possible to have a button that does not turn off NSAlert which I can just use to open UniversalAccess prefpane? If not, then I think I have to make that window myself Thoox Whenever a button is pressed, then it is normally normal. In Mac OS X 10.5 or later you can use setAccessoryView: to insert a custom view in the alert, which may include the button that you want. However, you can not specify where the secondary view goes in. It may have a button in it but the button will appear in the middle of the window instead of below with other buttons (if you have a different button Choose a style, such as a square bevel for your custom button, it may appear less than the place.) To keep a complete control over the layout, you need to create your own alert window.

- Where Developers Learn, Share, & Build Careers

JSON फ़ाइल इस तरह दिखती है: {"string": [{"key_one ":" मूल्य_एक! " }, {"Key_two": "value_two!" },]} सी ++ फ़ाइल इस तरह दिखती है: जेसन :: मान रूट; जेसन :: रीडर रीडर; Bool parsingSuccessful = reader.parse (सामग्री, रूट); Const जेसन :: मान स्ट्रिंग = रूट ["तार"]; std :: वेक्टर & LT; std :: स्ट्रिंग & gt; सूची = स्ट्रिंग्स.गेटमेनबार (); "Strings.getMemberNames ()" के कारण त्रुटि है: प्रविष्टि विफल: (type_ == nullValue || type_ == objectValue), समारोह getMemberNames, file /projects/.../jsoncpp.cpp, स्ट्रिंग एक arrayValue है, मैंने इसे ValueType = 6 प्राप्त करने की पुष्टि की है । जैसा कि आप कहते हैं, तार एक सरणी है, एक वस्तु नहीं आपको या तो कुछ करना चाहिए: (i) अपने तार json को ऑब्जेक्ट में परिवर्तित करना। {"string": {"key_one": "value_one!", "Key_two": "value_two!" }} उस स्थिति में आपका मौजूदा कोड ठीक होगा। यह है कि मैं क्या करूँगा...

- Where Developers Learn, Share, & Build Careers

Question: There is an easy / safe way to run more complex SQL queries in the fat free framework. I have to use the solution PDO, but it is messy and ugly because I can not throw exceptions easily. Background: Axon class provides a database of fat free "secure" manipulation, but I want to do another complex query that can handle the axon. The DB class is revealed, but I will have to resort to "mysql_real_escape_string ()" to create those queries that are not secure guarantees. So the highlighted PDO is being used. The exposed PDO is the default error handling, which is a pain and results in ugly code. $ pdo = F3 :: Received ('db') - & gt; PDO; $ Sql ​​= 'Enter the configuration (config_name, config_value, comments) in the value (: config_name ,: config_value ,: config_comments) on the duplicate key update config_value =: config_value2'; If (! $ Stmt = $ pdo- & gt; Create ($ sql)) {$ errorInfo = $ pdo- & gt; ErrorInfo (); Tri...

- Where Developers Learn, Share, & Build Careers

I have completely connected to different types of input boxes whenever the user types something correctly , Then loads the objects. However, in one of the texterrari , I want to completely disable it by default, and enable the user when typing it in "@". How to do this This will do the trick: $ ('Textarea'). Autocomplete ({source: availableTags}) Autocomplete ('disable') .on ('keypress', function (event) {// Determine whether '@' was closed if (event.shiftKey & amp;; Amp; event.keyCode == = 64) {$ (this). Autocomplete ('Enable'); Return False;}}); Live example -

iphone - Unlock zooming after scrolling in maps -

I have these two methods that I use to lock in the user's location in the map, and it's completely Works from ... However, I think it works very well, whenever I move the map to look elsewhere on map map ... this user Bring back the spot to the present place. So I think my question is, how can I disable lock on user location after the user scrolls in the map. - (zero) viewDidoadload {// here is more code that I did not post [self.mapView.userLocation addObserver: selfPayPath: @ "Location" option: (NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld) Reference : NULL]; } - (Zero) Inspection Valuerge Path: (NSSTING *) The object of the pipe: (ID) Object changes: (NSDragment *) Convert Reference: (Zero *) Reference {if ([Self Map View Shows User Location]) {MK Cordinet area area; Region.center = self.mapView.userLocation.coordinate; MKCoordinateSpan period; Span.latitudeDelta = 1; // Change these values ​​to change the zoom span. Verticality = 1; Regio...

hibernate - SEVERE: Attempt to modify an identity column 'UID' -

I am using hibernate and I want to consistently add a new row to the table in my database. I am using code in my action class: try {session session = HibernateUtil. GetSessionFactory () getCurrentSession (); Session.beginTransaction (); U = new user (); U.setAge (this.getAge ()); U.setCity (this.getCity ()); U.setEmail (this.getEmail ()); U.setName (this.getUsername ()); U.setPassword (this.getPassword ()); U.setSex (this.getSex ()); Try {session.save (u); } Hold (exception e) {this.addActionError ("oh .. an error has arrived ...! Email address is already registered, try with your new email address."); Return error; } Session.getTransaction (). Commit (); Session.close (); } Hold (exception e) {this.addActionError ("oh an error has occurred ...!"); Return error; } The page sometimes shows an error with an external catch and sometimes even internal hold. The glassfish server is logged: Warning: SQL error: -1, SQLState: 42Z23 Critical: Attempt to modify...

python - Replacement value not working? -

So I have a try except for the block set up, which will go through the database dependent on some conditions: : for searchnumber in itertools.count (0): printnumber print c.execute ("search" from the words where onstate = 1 and progid =% d; "" ") % Searchnumber searchterms = (C.fetchall ()) searchterms = [for search in X in searchterms (excluding "x") excluding print searchers: pass For some reason, this project , In fact, even her , The first value is not being specified (0). why will? As far as I know,% d should be replaced by the integer value of searchnumber Due to hiding the code> type error , you are using the % operator or object that is equivalent to c.execute ("string") . Maybe you have caught it, if you have not left all the errors or left it. You note that this is a typical antipaton.

java - Retrieve an Image from a POST request -

After I am trying to send a picture to my Java servlet (hosted on Amazon EC2) later Amazon S3 and How to move on to the surprise How to retrieve the image from a post request Upload Code The request (pic.imageData is an NSData type) has been sent through the iOS RestKit API :. Rackpromes * Parameters = [Rak paramam]; [Parameter set value: pic.dateTaken forParam: @ "dateTak"]; [Parameter set value: uploaded for pic.datePRM: @ "dateduploaded"]; [Parameter setdata: pic.imageData MIMEType: @ "Image / JPG" for: @ "image"]; [RK Client Shared Client] Username = deviceID; [RK Client Shared Client] .password = session; [RK Client Shared Client] Authentication type = RKRext attestation type HTTPBics; UploadPictureRequest = [[RK Client Shared Client] Posted: kUploadPictureServlet params: Parameters Rep: Self]; parsing code stub How can I parse 2 other parameters on the Java servlet: double dateTaken = double. ParseDouble (req.getParameter...

ruby on rails - Ruby_noexec_wraper: no such file or directory -

Today I went into this problem, there is no problem I have a Mac OSX lion with Ruby 1.9 I'm driving I am trying to fix this issue. .3 Thank you. Simply solve your problem I uninstalled the rack and run bundle Compared to installs My problem was fixed.

- Where Developers Learn, Share, & Build Careers

Image
I have created a simple geographic map using Report Builder 3.0. To zoom in to a sub-section of the map, I have published a part of a report from a separate report and have included it on my map like this: However, when the report is run, it transmits the report part outside of such a map Is: print view The one thing shows back as I expected for this map The final goal will be in the form of a SharePoint PerformancePoint Services Report. Does anyone know why I am facing this weird behavior? / P> overlapping report items Overlapping report items are not supported HTML, MHTML, Word, Excel, in the preview or in the report viewer if overlapping items are present, then they are transferred The following rules apply to overlap report items Are: If the vertical overlap of report items is high, then one of the overlapping items is taken to the right. Interpretation is left is the remains most items, where it is located. If the horizontal overlap of report it...

user interface - Android Inter-app relations -

Although I have relevant questions, no one is responding to a large extent of those people I was looking at. First of all, the downloadable Android app may be that "second app runs above", it emulates pre-defined user input and is not a conventional "GUI". For example, (hypothetically) if I have an app that plays the video but every 10 seconds is set to turn off the screen, then I want to stop it to have an on-touch event Want to Nothing complicated, just touches, maybe some swipe, and other events that go with them Secondly, if there is no valid way to prepare an app "There is no interface, only Is there a pre-defined script, is there any other way that I can "inject" touch events on an app, is not an open source? Edit: To be more specific, Is thinking of making "quick" app assistant So, a program that is active, runs a pre-determined group, such an instruction that simulates the user input at a very high speed, so think about an ap...

html - CSS set li indent -

Searching for GoogleGrouping and Stack Overflow will not yield any results that I can recognize, I'm sorry if asked beforehand do it. . I have dropped down the main menu that uses lists as its basis. The problem is, the lists are very detailed, and they do not indent enough when expanded. So, this is my problem! How can I create an indent amount on more lists via CSS? A ul dropdown menu, use / * main level * / ul {margin-left: 10px; } / * Second level * / ul ul {margin-left: 15px; } / * Third level * / ul ul ul {margin-left: 20px; } / * And so on ... * / You can indent li and (if applicable) a Update with the different effects, with margin-left You can use padding-left instead. By default, many browsers use padding-left to set initial indentation. If you want to get rid of it, then padding-left: 0px; Set, however, both margin-left and padding-left settings affect indentation of the list in different ways Specifically: margin-left affec...

jquery - Dynamically adding text boxes in JQueryMobile UI. -

Currently I have a JQueryMobile form that has 2 text boxes but the scenario may be where I want to add more text boxes Must have to add. How to get it? ... For example, the user will click an add button in the screen and it will bring a new text box to the screen. I have tried to attach but it is not working properly. How to find it by adding text boxes in the JQueryMobile form dynamically ?? Thank you for your time in advance. You said on your comment that the argument should be similar to jquery. In Jquery I do this to create some new form elements: // element where you want to add your dynamic form element body body = .getElementsByTagName ('body'); // Create a text box and add it to the body of the document. $ ('& Lt; Input & gt;'). Etter ({'type': 'text', 'placeholder': 'some text'}). Annex (body);

- Where Developers Learn, Share, & Build Careers

संभव डुप्लिकेट: क्या मुझे मूल्य या निरंतर संदर्भ से इसे पारित करना चाहिए? मैंने अंगूठे के कई नियम पढ़ा है कि क्या प्रतिलिपि बनाने योग्य ऑब्जेक्ट को मूल्य या निरंतर संदर्भ से पास करना है। जैसे: निरंतर संदर्भ से ऑब्जेक्ट पास करें और मूल्य के अनुसार प्रकार (फंक्शन ऑब्जेक्ट को छोड़कर) में बनाया जाता है जब तक ऑब्जेक्ट का आकार (डायनामिक मेमरी सहित) वैल्यू पास नहीं होता डबल के 2 * आकार से कम। क्या आप इन नियमों को std :: shared_ptr & lt; संसाधन & gt; पर लागू होते हैं? मैं समझता हूं कि ऑब्जेक्ट शायद बहुत छोटा है, संभवतः एक संकेतक और संदर्भ काउंटर, लेकिन यह अभी भी एक ऑब्जेक्ट है। यहां सबसे अच्छा अभ्यास क्या है? शायद सबसे महत्वपूर्ण चिंता (प्रदर्शन के संबंध में) यह है कि एक std :: shared_ptr & lt; ... & gt; की प्रतिलिपि (जैसे कि जब आप मूल्य से गुजरते हैं) की आवश्यकता होती है तो एक संदर्भ गणना के इंटरलॉक की वृद्धि की आवश्यकता होती है। या हो सकता है कार्यान्वयन के आधार पर एक महत्वपूर्ण खंड की तरह सिंक्रनाइज़ेशन के कुछ अन्य रूप। ऐसी लागत एक बहुस्तरीय कार्...

Javascript event object: Where is the selector -

मेरे बैकबोन व्यू में मेरे पास सेटअप है: var SomeView; SomeView = Backbone.View.extend ({initialize: function () {this.render ();}, रेंडर: फ़ंक्शन () {// रेंडर फॉर्म}, इवेंट: {"keydown form.registration input": "checkInput"} , CheckInput: function (e) {console.log (e); // यह काम नहीं करता है, लेकिन मैं ऐसे फ़ंक्शन var attr = e.getAttributeWhichTriggeredEvent; $ (attr) .val (); // validate के लिए खोज रहा हूँ। ..}}); जैसा कि आप देख रहे हैं, मैं उस घटना के चयनकर्ता को प्राप्त करना चाहूंगा जिसने इस घटना को ट्रिगर किया था, ताकि मैं, उदाहरण के लिए, इनपुट मान का उपयोग कर सकूं। जैसा कि मैंने क्रोमियम में कन्सोल के माध्यम से देखा, मुझे घटना वस्तु में कुछ (वर्तमान) लक्ष्य विशेषताओं को मिला। दुर्भाग्य से वे कुछ भी शामिल नहीं करते जो मैं तत्व को पहचानने के लिए इस्तेमाल कर सकता हूं लेकिन शायद मैं सिर्फ पर्याप्त नहीं दिखता .. तो मैं यह कैसे करूँ? मुझे लगता है कि आप चाहते हैं .. $ (e.target) .val ()

Battery API is not working on chrome pop up window -

Chrome is a way to get battery objects in the pop up window I use this code To create pop ups chrome.windows.create ({'url': 'mypop.html', 'type': 'popup'}, function (window) {}) ; But there is a problem restoring the battery object using this code var battery = navigator.webkitbattery; When I am calling a javascript file on mypop.html page Is this a Chrome security issue that rejects the battery object on the popup page? It seems that it has been removed from Chrome because navigator.webkitbattery Is undefined

- Where Developers Learn, Share, & Build Careers

मैं Google Translate (http://translate.google.com.vn/) का HTML स्रोत देखने के लिए फायरबग का उपयोग करता हूं चाहे सरल (सामग्री में)। लेकिन इसमें एक बहुत ही जटिल लेआउट है (बहुत से लेआउट डिविज़)। मुझे लगता है कि इन पृष्ठों को कई सॉफ़्टवेयर समर्थन के आधार पर लेआउट डिजाइन किया गया है। मुझे फ़ोटोशॉप पता है, लेकिन सामान्य तौर पर, फ़ोटोशॉप में लेआउट बनाने में बहुत मुश्किल है, मुझे एक आसान उपकरण। मुझे लगता है कि आपको Photoshop Sitegrinder 3.5 साइट ग्राइंडर 3.5 किसी भी। Psd फ़ाइल के HTML और CSS को बनाने के लिए एक अच्छा उपकरण है। लेकिन मेरे अवलोकन में यह छोटा और स्थैतिक स्थल के लिए अच्छा है, यह गतिशील साइट के लिए अच्छा नहीं है। इसमें कोई संदेह नहीं है कि यह एक वेब साइट के विकास के लिए उपयोगी है, लेकिन इसमें एक्टिव फोटोशॉप में साइट ग्राइंडर टूल के साथ काम करने वाले कुशल व्यक्ति की आवश्यकता होती है। मेरा मतलब है कि यह डेवलपर के लिए डिजाइनर के लिए उपयोगी नहीं है I साइट ग्राइंडर 3.5 इन सुविधाओं का समर्थन करता है: 1 गोल कोने 2. छाया 3. सीमाएं 4. क्रॉस-पेजिंग 5. मेनू और उप-मेन्यू 6. ...

qt - PySide/PyQt truncate text in QLabel based on minimumSize -

I'm thinking that best minimizing the text in a QLB based on the lowest width / height Incoming Text Anyone It may also be a length, but to keep a clean layout I would like to filter the long wings to fill the maximum amount of space (the maximum width / height of the widget). Example: 'A very long string where there should be only one small one, but I can not control the input of the widget because it is a given value of a user' will be: 'A very long string where only one should be small, but ...' needs the current font based on the required location is. How can I get it? Here is a simple example of what I am, although this word is based on calculation, not available space: PySide.QtCore import * Def truncateText from PySide .qtgui import * import sys (text): maxWords = 10 words = text.split ('') return '' .join (word [: maxwords]) + '...' application = QApplication (sys.argv) MainWindow = QWidget () layout = QHBoxLayou...

javascript - unable to send ajax request on php -

I am using an AJAX request to send to php. In the form method, I am using the following code. rohit1.php & lt; Form action = "index1.php" onsubmit = "callfunc ()" & gt; & Lt; Span id = "raj" & gt; & Lt; / Span & gt; & Lt; Input type = "submit" value = "submit" & gt; & Lt; / Div & gt; & Lt; / Form & gt; In JavaScript, I am using: callfun.js function callfunc () {var http = new XMLHttpRequest (); Var Name = Prompt ('Enter the name of the form'); Var Name = "Rohit"; Var url = "index1.php"; Var s = document.getElementById ('raj'). InnerHTML; Warning (http); Http.open ("POST", "index1.php? Name =" + name, true); Http.onreadystatechange = function {if (http.readyState == 4 & amp; http.status == 200} {}} http.send ();} When I Function, then submitting it is redirecting to index.php? Label = on the name of index.php? Nam...

- Where Developers Learn, Share, & Build Careers

Image
I am developing an iPad application, in which I have to store some data in the database. Therefore, I like to use SQLite, here I have a doubt about the table structure. Let me explain, actually there is a scene in which users can add labor volume, labor type and so on, by default I have shown only one set of fields I have created tables in five areas (labor quantity, labor type ..... ) And it works fine Now I need to setup a new button "Add New" below, I have the following ridge Lusn does apologize for the image I, when the user clicks the button, it will generate a five fields below the last. So how can I get the text field value in the database field, because I've only created for five fields. I tried and thanked any help you could not googled it but found the right way. What you can do in that situation is the following. Put your content in UIScrollView In the UIWebView, click the text box and click on it, create a new installation in it. Enlarging...

Does Spring-Roo provide sort function for finders? -

I'm using Spring-Rupa to build my project, but this is a very great tool I want to sort the institutions on the GUI, then I can not get sort support in Generated Finders. I do not want to modify these auto-generated files, so I ask here that someone knows how to add sort function to searchers or in some other way? Thank you There are a few options for sorting in comments for spring and jira points: Rs. You can find the link

mysql - I have 3 columns x,y and type. I'd like to find out if there's at least 3 connections of the same type on a grid using SQL -

मेरे पास एक खेल सारणी है: बनाओ टेबल खेल_पीस (x पूर्णांक, y पूर्णांक , प्रकार पूर्णांक); प्रत्येक (एक्स, वाई) में केवल 1 टुकड़ा हो सकता है। ग्रिड का प्रतिनिधित्व करना (संख्याएं प्रकार होती हैं): 1235 1134 9678 कनेक्ट होने से मेरा मतलब है कि उन्हें सीधे एक ऊर्ध्वाधर में मूल के बगल में होना चाहिए या क्षैतिज फैशन की तरह: सीसी = जुड़ा हुआ सीओसी हे = मूल सी मैं यह जांचना चाहूंगा कि क्या 3 टुकड़े बिना ग्रिड पर कहीं भी जुड़ा हुआ है डेटाबेस के पूरे ग्रिड को पाने के लिए और अजगर में ऐसा करने पर, अगर सभ्य समाधान हो सुझाव: Xophmeister के उत्तर पर मेरी टिप्पणियों को स्पष्ट करने के लिए, इस तरह: बैल चुनें, ओम से खेल_पॉईस ओ जॉइन गेम_पीस पी ऑन पी। टाइप = ओ.प्रइप और ((बैल = पीएक्स और पीए आईएनएस (ओय -1, ओ.ए.आई. 1)) या (ओआई = पीए और पीएक्स इन ( बैल -1, ओ.एक्स + 1))) ग्रुप बाय बैल, ओय होविंग COUNT (*) & gt; 1 और यहां यह आपके परीक्षण डेटा पर काम कर रहा है: संपादित करें: चूंकि आप केवल जानना चाहते हैं if हालत मौजूद है, यह करने का सबसे अच्छा तरीका है अंत में LIMIT 1 ...

ASP.Net set Membership.Provider programatically -

I want to know whether to set the default subscription provider (subscription provider) through a configuration file via code Impossible . This is not a direct approach to your question. Instead, implement a custom subscription provider, and use the example class to inject the desire class (for example) when running For example, Public override subscription user gateuser (string username, bool user ifline) {var user = IoC.Resolve & lt; IUserService & gt; (). GetUserByU name (user name, userIsOnline); }

java - Embedded Jetty 8.x / Spring MVC / WebApplicationInitializer -

क्या निम्नलिखित में से किसी का काम का नमूना है: एम्बेडेड जेट्टी 8.x ऐप स्प्रिंग एमवीसी का प्रयोग ज़ीरो एक्सएमएल कॉन्फ़िगरेशन (उदाहरण के लिए स्प्रिंग वेबएपप्लिकेशन इन्वाइलाइजर, स्प्रटींग पक्ष पर एनोटेशन / जावा कॉन्फिगरेशन पर सर्लेट साइड पर) मैंने हर संभव संयोजन की कोशिश की है, लेकिन मुझे यह काम करने के लिए नहीं मिल सकता है। सबसे एम्बेडेड जेटी उदाहरण मैंने पाया 7.x पर आधारित है या फिर अभी भी XML कॉन्फ़िगरेशन फ़ाइलों का उपयोग करें। अब मुझे सबसे अच्छा सेटअप मिला है एक WebAppContext बनाने के लिए और एनोमेशन कॉन्फ़िगरेशन के लिए कॉन्फ़िगरेशन सेट करना। यह कंसोल पर दिखाता है कि वास्तव में कुछ हो रहा है, लेकिन यह मेरे WebApplicationInitializer वर्ग को नहीं मिल सकता है, जबकि यह निश्चित रूप से कक्षापथ पर है। यह जेटी 8.1.4 और स्प्रिंग 3.1.2 पर आधारित था। परीक्षण के प्रयोजनों के लिए, WebApplicationInitializer वर्ग बहुत कुछ नहीं करता, यह सिर्फ स्टार्टअप विधि में कुछ प्रिंट करता है ताकि यह जांच सके कि यह लोड हो रहा है या नहीं। धन्यवाद! क्या आपने यह प्रश्न देखा है:? मैं अपना कोड...

php - MySQL Compare Dates -

Can datetime fields compare with mySQL and return time difference with the current date? I really do not know where to start from, if someone has any ideas, then tell me in the right direction. Here's what I've tried before. SELECT * FROM `order` where 'datetime adoid' - now () Basically what I am trying to get is to get the order that is saved in the database for more than 8 hours. Thanks! If you want your query to have an opportunity to use an index in the Timetable column, You should not manipulate the column, but only on the other side: 'order' from 'SELECT' where date was added & lt; Now () - Interval 8 hours;

c# - css builder for mac like VS2010's -

I do not believe I can not find it. At work I use the VS2010's CSS Builder Tool. It's not WYSIWYG, it really helps everyone who remembers an available CSS command, and chooses their potential values, and puts them in a selector. I can not find a tool that does this as a standalone product, I believe that CSS editing did so, but now it is part of $ 80 espresso. I tried the CSS3 Toolkit, which is actually nothing more than a button generator, and my $ 2.99 was a waste. Coda also does this way, but again, I do not think it's $ 80 device. The simple CSS does exactly what I want, and it is free, but use it very IMHO Every time the file has to be exported, no save button before viewing the changes in the browser. Live preview is not required, but it bugs me that there is a broken in simple CSS ... it does not cascade. Any address of a good simple CSS tool for Mac? I inspire only one code, it's a matter of taking all available areas, and all options from W3, putt...

- Where Developers Learn, Share, & Build Careers

We want to erase a model popup until the user submits the form until "Please Wait". Here is part of my _form.php (only one instant for readable resolutions): (array '' validateOnSubmit '' = & gt; True, 'aftervalidate' = & gt; 'js: ($ ("# EntityEvent_active"). (": Has been checked: ($" ("# publishErrors") below (); $ ("# event- Form_es_ ") blank (); i = true;" ($ "(" # Event_name ")) ()" "(" & lt; p & gt; please check: ) { $ ("# Event_name"). AddClass ("Error"); ... ... I acknowledge that I'm losing little on this process and I am not sure Is that it still works However,: I am thinking of keeping it: $ this-> startWidget ('zii.widgets.jui.CJuiDialog', array ( 'Option' = & gt; array ('title' = & gt; 'my title', 'model' =>;)); resonance 'please wait while your f...

Yii CActiveForm - please wait message -

We want to erase a model popup until the user submits the form until "Please Wait". Here is part of my _form.php (only one instant for readable resolutions): (array '' validateOnSubmit '' = & gt; True, 'aftervalidate' = & gt; 'js: ($ ("# EntityEvent_active"). (": Has been checked: ($" ("# publishErrors") below (); $ ("# event- Form_es_ ") blank (); i = true;" ($ "(" # Event_name ")) ()" "(" & lt; p & gt; please check: ) { $ ("# Event_name"). AddClass ("Error"); ... ... I acknowledge that I'm losing little on this process and I am not sure Is that it still works However,: I am thinking of keeping it: $ this-> startWidget ('zii.widgets.jui.CJuiDialog', array ( 'Option' = & gt; array ('title' = & gt; 'my title', 'model' =>;)); resonance 'please wait while your f...

domain driven design - Persisting references non-root entities outside of aggregate -

All materials on DDD specify this as not strict number, but recently came in a scenario that makes a compelling case to think. Otherwise. Imagine 2 total roots and templates where template - & gt; (1: n) template, document - & gt; (1: N) Paramavlue and finally there is a reference to 2 roots document - & gt; (N: 1) Template . gross root barrier ParamValue should not be issued in the context of TemplateParam , can only be referred through a fleeting reference Template Received via gross route. Now if I want to apply a rule such as "Each paragraph of the document should mention a valid template related to the template referred to by the document owned by it". Ideally at the DB level, I have to give Paramvalue to template value in the FK, how to do it in DDD pattern ?? The reason for the one reason they act as a single entry point for a group of related entities to implement their Apurwyon. They ensure that an external object can mess with these instit...

- Where Developers Learn, Share, & Build Careers

So I have a script that pulls information from event webpage URL: This is PHP The script is calling a Python script (part of its loop): $ {"tmp" $ I} = utf8_encode (exec ("Python myscrape.py $ {" EU ". $ I } ")); This is the Python script that passes a URL: # - * - coding: UTF-8 - * - Import system URL = sys. Argv [1] # $ url = 'http://everguide.com .u / Melbourne / Event / 2012-Jul-14 / Color /' import urllib2 req = urllib2.Request (URL) response = urllib2.urlopen (req) Html = response.read () Beautiful soup soup = beautiful soup (html .decode ('utf-8') from Sundasubup import) soup.prettify () Re-import the import for the node for the soup. (All itemprop = "name"): n = '' .join (node.findAll (text = True)) Soup.findAll for node (itemprop = "url"): v = '' .join (node.findAll Text = True)) soup.findAll ("div", {"class": "time"}) for node: d = ''. For nod...

How can i build a project Ruby in Xcode? -

Mac I project bulid about Ruby I have a question on, thus there was an error: /sistm/laibreri/faremvrks/rubikfremvrk/versions/lk8/usr/lib/rubi/lk8/rubijns/kstm_rekvire. rb: 31: `The gem_original_require ': load such a file - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb the plist (LoadError ): 31: require the `s' ... / app.build/Debug-iphonesimulator/iphone.build/Script-2095E433129114D900424894.sh:3 command / bin / sh failed with exit code 1 Xcode 4.3.3 is installed on your computer, which uses Mac OS X 10.7.4, and I have installed 1.9.3 ruby ​​with rvm and set the default Ruby 1.9 .3: Use $ rvm 1.9.3 to use ../.rvm/gems/ruby-1.9 .3-p194 $ ruby ​​-v ruby ​​1.9.3p194 (2012-04-20 Revision 35,410) [x86_64-darwin11.4.0] No one knows the solution to fix the problem? You order-Xcode in-line tool? I think that you can open Xcode, go to preferences and there, you can install command line utilities. You may need t...

Data passing from Javascript to MVC controller -

I have to pass data from javascript to the controller in the MVC app. How can this be achieved? I want to set up a ViewModel property and then read it in that controller. My Javascript: function DoInfo @ (i.ToString ()) () {$ ("# Selected Sessions"). Val ($ ("# sessionid @ (i.ToString ())") .val ()); Warning ($ ("# sessionid @ (i.ToString ())") Val ().); $ ("# PageController") Val (70). $ ("#FormID") presented (). } I get a warning with the right session, but when I read it in the controller view model it is empty. Selected session but PageController is set to Reality, so I think I can select the same session. if (viewModel.PageController == 70) {pass = new PassingData (); Pass.personid = TSSessionService.ReadPersonId (viewModel. Selected session); TempData ["pass"] = pass; Return Redirect Action ("Index", "Info"); } Any clues? Add the selected session as your view to a field (perhaps a...

axapta - Static new and inheritance -

As preserved new method instead of establishing and using the new ... methods to reduce the lack of method overloading Recommend. So I have explained the use of this method But there is no legacy inherited. I had a look at the system sections hoping to find one so we have to define each sub-class stable construction and stable new methods .... Therefore, we lose some of the benefits of inheritance. Better solution but what I saw does not really help me: - Respect some new stable patterns and declare methods in subclasses - some examples of it without security Use New SalesFormLetter_Confirm Return (GetParmId: A "Square Factory", SalesFormLetter Constant SalesFormLetter Creation (DocumentStatus Document, Boolean getParmId = true) {Switch (Document) {Case DocumentStatus :: Mother class as the kind of confirmation;); Case Document Stats :: Picklist List: Returns SalesFormLetter_PickingList :: Creation (getParmId); Case Document Stats :: Packing Slip: New SalesFormLe...

- Where Developers Learn, Share, & Build Careers

I'm an iPhone developer. I'm trying to select multiple items in the dropdown box in the iPhone. Have tried, but unable to do it. Please suggest me it is really important to me. Thanks in advance Fabre .. Is there a dropdown box in the iPhone? I am silent that they are not present and are usually replaced by table wives or pickers. What I will do is, it is a table visit with self-made cell views that combines the text and buttons of 2 states which do not design a box check or button based on state. Behind it should work fine with the proper controller.

- Where Developers Learn, Share, & Build Careers

I am using an entity framework project whereby id needs to record the batch update. The primary key is available at runtime, and I would like to update all records like the following records: EntityTable update column = @ p0 The problem running in EntityID I am I have about 60k IDs (worst) to handle me And our database software (SQL Server 2008) can not handle it: The query processor was out of internal resources and could not prepare a query plan. This is a rare event and only a lot Expected for complex questions or questions, which refers to large tables or divisions. Please simplify the query If you believe that you received this message in error, please contact customer support services for more information. Through Google searches I have found that old-school DataTable and SqlDataAdapter call for it to complete, but If possible I would like to be within the spirit of the unit framework, or if needed, raw SQL Is there any way to do this in a proper way? EF doe...

- Where Developers Learn, Share, & Build Careers

I am currently developing an application using Symfony 2 and would like my routes to be case insensitive. I have included an example path. It only matches / some_ournal / I think that wants to match any variation on that pattern like / Some_url /, / SOME_URL / etc ... some_route: Pattern: / some_url / defaults: {_controller: bundle: controller: verb} Does anyone know how I can get it? Try this: Some_route: pattern: / {some_url } / Default: {_controller: Bundle: Controller: Action} Requirements: some_url: (? I: some_url) But as already mentioned in the comments, this is a bad practice

MySQL table design / architecture, table is too big -

I have a MySQL db that contains a lot of text, I'm in a data gathering from a website and a The table is inserted. I am using SSD HD (100 GB) for DB and I could not find the place, I think that something in the structure of the table is too big, I can not guess the size For all the columns, I'm using the varchar \ text \ media text for most areas. When I insert all the data to DB, then I monitor the errors and when I see that I am trying to insert a particular field I am increasing the size of the area (like varchar (1000) to Varchar ( 2000)). By now I have approximately 1.8 M lines, I think I am doing something wrong. Here is the structure of my table (1) default zero, `abstract` text,` foreign reference' value (15000) default zero, `currentUSClass` varchar (2200) default zero,` OtherReferences` mediumtext, `foreignPrio` varchar The default zero, `CurrentIntlClass` varchar (3000) default zero,` AppNum` varchar (45) default zero, `AppDate` date default zero,` A...

iphone - How to have IBAction happen on start of iPad app -

I have an IBAction command in the iPad app for the first time When it starts to start like What code can I use to do this? Thanks! Just call your firstViewController's viewDidLoad method to call your method This method will call on automatically start Happy Coding by using [self METHODNAME: nil] :)

php - Mysql query which returns category tree -

Image
I am working on category management. Where I have parents with each line categories can be n-level I can call the php function again, which will return to the tree tree array. Now the problem is: admin In the panel, I want the category list page as listed below. Products> Products 1 (edit) (delete) Products (edit) (delete) / li> Products > Product 2 (edit) (delete) Products> Products 2> Products 2 1 (edit) (delete) Products> Product 2> Product 2 2 (edit (Delete) Contact us (edit) (delete) I would like mysql query results in the same order as shown above. I'm not sure how I can achieve it. SELECT * FROM tbl_categories ORDER BY ??? Please guide. Any is not a single SQL query which will bring you the results the way From you are expected on the basis of this table structure. There are two ways to solve this problem: Use external application logic to create recursive calls (outside DB) Find children and make the tree in ...

- Where Developers Learn, Share, & Build Careers

, but any document or link Where can any of these keywords / examples be found? For example: I want to know where we use 'with' or 'use' in the keyword MySQL query I tried google to query / example mysql reserved keyword 'with' or 'use' but Google Did this wrong and displayed incorrect results with auto suggestions list If someone has examples of the use of these keywords, please share. There are several keywords and if you get an encounter then you will be able to use it in the MySQL manual, though Course entries for this are non-reserved words too. A lot of keywords are not included in this list and you need to go to the page describing the statement or function for more information; Like If you still wonder which keywords are reserved: This happens in MySQL-manual, which is probably the reason that "reserved keyword" There is also here. If you need to link all the keywords in your respective sense, then I know...

android - Update Facebook status without the SDK -

Okay, I'm losing too much hair on this .. just so! My app has a button that will call the Facebook app to update my status. I do not want to do this in my app, I want to do it in the Facebook app! I believe that SDK is not needed for it, right? So I found that the way an intent is being used, such as sending an SMS or sending it by Gmail. > Public static zero through activity (activity activity, string subject, string text) {intent smsIntent = new intent (intent.ACTION_VIEW); SmsIntent.setType ("vnd.android-directory / MMS-SMS"); SmsIntent.putExtra ("sms_body", text); Try {Activity.startActivity (smsIntent); } Grip (ActivityNotFoundException ex) {// handle error}} Public Static Zero (activity activity, string subject, string text) via Gmail {intent gmailIntent = new intent (intent.ACTION_VIEW); GmailIntent.setClassName ("com.google.android.gm", "com.google.android.gm.ComposeActivityGmail"); GmailIntent.putExtra (android.content.I...

javascript - image not getting displayed dynamically -

I am hidding an image in my HTML page using a hidden asset. But I'm not able to make it visible through

How to use the Python UFW (Uncomplicated Firewall) API in Ubuntu? -

I use UFW on Ubuntu 12.04 to allow and reject IP addresses from the command line. How do I use the API to do the following functions in Python? $ sudo ufw status $ sudo ufw from 207.46.232.182 Allow Currently I just make system calls from Python. Is there a web page or blog that describes the use of APIs?

c# - Why does the main thread stop every time -

I have a question about the main thread in my application, which I debug using Visual Studio. While the app is running, what I see in the input window is that the main thread is closed every time. So my question is: why the main thread always stops and the application is running The input window gives me the following: 'GestionDesImmobilisations .exe '(Manage):' C: \ Program Files \ Microsoft.NET \ SDK \ CompactFramework \ v3.5 \ Debugger \ BCL \ mscorlib.dll 'Charge' GestionDesImmobilisations.exe '(Managé):' c: \ Documents and Settings \ administrateur \ bureau \ gestiondesimmobilisations machi Howa Thaa \ gestiondesimmobilisations \ bin \ debug \ GestionDesImmobilisations.exe 'Charging, charging symboles. 'GestionDesImmobilisations.exe' (Managé): 'C: \ Program Files \ Microsoft.NET \ SDK \ CompactFramework \ v3.5 \ Debugger \ BCL \ System.Windows.Forms.dll' Charge 'GestionDesImmobilisations.exe' (Managé): 'C: \ Pr...

.net - Approaches to fast visualization of huge amount of data -

I want to summarize a large (and dynamically increasing) amount of data for visualization in graph view I am looking for ways. Say I have a binary file with timestamp-value pairs, this file is increasing in realtime and can easily be more than many gigabytes. There are several scenes that display this data in the form of a graph / plot, since in most cases we have more data than pixels on our X-axis, therefore, Have to be compressed. Each view may require a different resolution depending on its size on the screen. Apart from this, zooming in and out will cause quick changes in that resolution. The current algorithm divides the data into squares of the same length and calculates the minimum and maximum value. Now for each pixel on our X-axis, we want to draw a vertical line from the minimum to the maximum value. In this way we can ensure that the outliers are not remembered. (Which is a necessity) Every time a new resolution is necessary, we have to select the second segment...

c# - How to access the child element from xml structure? -

मेरे पास निम्न प्रवाहिक एसवीजी दस्तावेज 1 प्रवाह टेक्स्ट और 1 पाठ तत्व के साथ भिन्न हैं: & Lt;? Xml संस्करण = "1.0" एन्कोडिंग = "यूटीएफ -8" स्टैंडअलोन = "नहीं"? & Gt; & Lt;! - Inkscape (http://www.inkscape.org/) के साथ बनाया गया - & gt; & Lt; svg xmlns: डीसी = "http://purl.org/dc/elements/1.1/" xmlns: cc = "http://creativecommons.org/ns#" xmlns: rdf = "http: // www। W3.org/1999/02/22-rdf-syntax-ns# "xmlns: svg =" http://www.w3.org/2000/svg "xmlns =" ​​http://www.w3.org/2000 / एसवीजी "एक्सएमएलएन: सोडिपोडी =" http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd "xmlns: inkscape =" http://www.inkscape.org/namespaces/inkscape "width =" 744.09448819 " ऊंचाई = "1052.3622047" id = "svg2" संस्करण = "1.1" inkscape: संस्करण = "0.48.2 r9819" सोडिपोडी: डॉकनाम = "नया दस्तावेज़ 1" & gt; & Lt; defs id = "d...

Scala implicit conversion called twice -

I'm trying to institute classes of maps [string, Annie], through which some Jesan-RPC Is obtained. So I end the following problem: val mpa: map [string, any] = map ("key" -> 0.0) Built-in def anyToInt (a: Any): Int = A .asInstanceOf [double] .toInt The key is present all right Val I:. Int = mpa.getOrElse ("key", 0.0) I: Int = 0 But when the key is unavailable ...: scala> ; Val I: Int = mpa.getOrElse (not molded in "Val", 0.0) java.lang.Double on scala.runtime.BoxesRunTime.unboxToDouble (Unknown Source) at JavaklangkClassCastException: JavaklangkInteger KanyToInt be can (& lt; console & gt ;: 13 now, we are adding some verbiage such as: implicit def anyToInt (a : Any): int = {println (a) value b = a.asInstanceOf [double] .toInt println ("changed") b} We found: val i: Int = mpa.getOrElse ( "VAL", 0.0) 0.0 change 0 java.lang.ClassCastException: java.lang.Integer java.lang.Double the ..... ...