Posts

Showing posts from February, 2012

Primefaces switches between multiple dialogs -

Image
I am using Prime 4.0 I have three communication components (Dialogue 1, Dialogue 2, Dialogue 3) and three The button is a page with components (button 1, button2, button3), click on dialog 1 will be shown from button 1, dialog 2 will be shown by click button 2, and dialog 3 will be shown with click button 3. User can be the same In time, these three dialogs can open, this means that user users will be able to access these three conversations. Can do some work with all the show, like: When the user does some work in a dialog, then I need to change Bean to change some values ​​and update some components for the first time, and when the user has a button Clicking displays a dialog, then there is no problem and when the user clicks on the button , But when the user changes the active dialogue from dialogs and click dialogs shown to three: How can I change active dialogue dialog to 'Dialog 2' from e-dialog? Here is my XML code: & lt; P: Command links onclic

python - pandas complicated stacked barplot -

Image
मेरे पास निम्न डेटा है: वर्ष भूमि उपयोग क्षेत्र एरिया 0 2005 कॉर्न एलपी 2078875 1 2005 मकई यूपी 149102.4 2 2005 ओपन भूमि एल.पी. 271,715 3 2005 ओपन भूमि उत्तर प्रदेश 232290.1 ​​4 2005 सोयाबीन एल.पी. 1,791,342 5 2005 सोयाबीन यूपी 50,799.12 6 2005 अन्य एजी एल.पी. 638010.4 7 2005 अन्य एजी यूपी 125527.2 8 2005 वन / वेटलैंड्स एल.पी. 69,629.86 9 2005 वन / वेटलैंड्स उत्तर प्रदेश 26,511.43 -10 2005 विकसित एल.पी. 10225.56 11 2005 विकसित 1248.442 12 2010 मकई एल.पी. 2,303,999 13 2010 मकई यूपी 201977.2 14 2010 ओपन भूमि एल.पी. 131696.3 15 2010 ओपन भूमि उत्तर प्रदेश 45845.81 16 2010 सोयाबीन एल.पी. 1,811,186 17 2010 सोयाबीन यूपी 66271.21 18 2010 अन्य एजी एल.पी. 635332.9 1 9 2010 अन्य एज यूपी 257439.9 20 2010 वन / झीलों एलपी 48124.43 21 2010 वन / यूपी वेटलैंड्स 23433.76 22 2010 विकसित एल.पी. 7619.853 23 2010 उत्तर प्रदेश विकसित 707.4816 मैं पांडा का प्रयोग कर एक स्टैक्ड बार भूखंड कि y- अक्ष और उपयोग करता है 'क्षेत्र' पर क्षेत्र से पता चलता बनाने के लिए क्या ढेर के निर्माण के लिए और एक

haskell - How to create instances for phantom types returning phantom type? -

इसमें निम्न डेटा प्रकार हैं: डेटा Foo1 a = Foo1 डेटा Foo2 a = Foo2 (Foo3 ए) डेटा Foo3 a = C1 (Foo1 ए) | C2 Int और अब हम Foo1 या Int से Foo3 प्राप्त करने में सक्षम होना चाहते हैं। एक प्रकार एक वर्ग का उपयोग करने का समाधान हो सकता है: वर्ग ToFoo3 a to tofoo3 :: a - & gt; Foo3 b - यहाँ इस प्रेत प्रकार b ... उदाहरण ToFoo3 (Foo1 b) के साथ समस्याएं शुरू करें जहां toFoo3 foo1 = C1 foo1 उदाहरण ToFoo3 Int जहां toFoo3 int = C2 int और यहां कंपाइलर शिकायत करता है (सही!) कि वह बी 1 के साथ बी मैच नहीं कर सकता क्योंकि क्लास की परिभाषा में "बी" की संख्या Foo1 में से एक के समान नहीं है। क्या कोई तरीका है {- # LANGUAGE MultiParamTypeClasses # -} {- # भाषा फ्लेक्सिबल इंस्टेंस # -} डेटा Foo1 a = Foo1 डेटा Foo2 a = Foo2 (Foo3 ए) डेटा Foo3 a = C1 (Foo1 ए) | सी 2 इट क्लास ToFoo3 a b जहां toFoo3 :: a - & gt; Foo3 b उदाहरण ToFoo3 (Foo1 b) b to tofoo3 foo1 = C1 foo1 उदाहरण ToFoo3 Int b जहां toFoo3 int = C2 int जिस तरह से मैं इसे समझता हूं, आप में कोई फ़ंक्शनल निर्भ

centos - How to mount google storage into our local using gcsfs? -

I'm new to GCS (Google Cloud Storage), I'm using CentOS 6.5, I need to mount my local GSC. GSUITIL and GCSFS are already installed. Please help to mount GCS in our local system through GCSS. Thank you, Yes, in the end I got the solution. Locally Mount GCSS-F MountPoint (/ MNT / Test) I now copy, edit and GCS (from local mount point I am able to delete files in. Note: - Files are copied successfully but end of execution order will give this input / output error, error error is occurring. But the files have been copied successfully thanks, thanks, offerings

linux - Git Install Script How to enter shell command -

This is more of a git related question than opensitift. When I push files to git server using git server, see i see that file permissions of my pearl index.cgi file are changed to 700 in my opening repo. That's why every time I push one, I will have to enter the server using SSH and in my chmod a + x index.cgi in my $ OPENSHIFT_REPO_DIR Change to 755 I have read in the git document. It is possible to add hook and I tried updating the update script in the hook directory with the following command exec chmod a + X $ OPENSHIFT_DATA_DIR / index.cgi Although it does not seem that has worked Can you please tell me what I am doing? How can I make sure that every time I push files, do not need to change chmod ? How to execute shell commands via a git install script (I do not know what the installed script is, I think it means hook) Based on this I thought I would need to add a hook on the server, so I tried to do this, but I got an error $ git .git / hooks /

why can't int type be the iterator in STL vector? -

after chapter vector is the first question on question "c ++ STL" I have no answer Can give And while surfing the Internet, I do not get the answer. A clear answer to a question (as has been asked) is that an Iterator like an indicator Need to work, so for some arbitrary iterator, * iterator is a valid code (working as a * is an unary operator). For a int , this will not happen - something like i type int , you * i (except in a reference where * will be interpreted as a binary operator, such as multiplying j * i ).

java - Why System.out.println("hey s1==s2:"+s1==s2); prints "false" as the output instead of printing "hey s1==s2:false" -

); String s2 = new string ("Shan"); String s3 = "grace"; String s4 = "grace"; System.out.println ("he s1 == s2:" + s1 == s2); Println ("S3 == S4:" + S3 == S4); System.out.println ("s1.equals (s2):" + s1.equals (s2)); System.out.println ("s3.equals (s4):" + s3.equals (s4)); System.out.println ("s1 == s3:" + s1 == s3); System.out.println ("s1.equals (s3):" + s1.equals (s3)); System.out.println ("he s1 == s2:" + true); Output: false false s1.equals (s2): true s3.equals (s4): true wrong s1.equals (s3): true Hey s1 == s2: true Why line # 5 results as "O s1 == s2: false" instead of just "false" as output? line 5: System.out.println ("he s1 == s2:" + S1 == s2); Before resolving operator's priority "s1 = s2:" + s1 before and then s2 For those who go false. Give it the highest priority to solve it right. Parenthesis is the t

Parse error “installing an apk using intent” on Jelly Bean android -

I am creating an Android application that is capable of including over-the-air updates in the Android application. That's why I am generating a WebSave to obtain the annotation code so that I will compare the version of the installed application, if it is less then I will trigger a update to install from the server, I am using string path = environment .getExternalStorage directory () + "/ download /"; File file = new file (PATH); File.mkdirs (); File outputfile = new file (file, "yourapp.apk"); Download file (file_upport, outputfile); InstallApk (); // Download File Function Private Static Zero Download File (String URL, File Output File) {URL U = New URL (URL)); URL Connection Connection = U.open Connection (); Int contentLength = conn.getContentLength (); DataInputStream stream = new DataInputStream (u.openstream ()); Byte [] buffer = new byte [contentLength]; Stream.readFully (buffer); Stream.close (); DataOutputStream fos = New DataOutputStream (New

spring - How to remove an Activity from a WorkFlow in BroadleafCommerce? -

I am using BroadleafCommerce to remove ValidateAddRequestActivity from AddItemWorkFlow I have a requirement. I have given my activity equal to the same order, such as Value Added Protection Act. However, I am getting it in activities. How can I remove Value AddedAdueActiveActivity Activity and keep my own place. Here is my code snippet. How do I override this? Thanks in advance. & Lt; Bean P: order = "1000" id = "xxSkuValidate" class = "com.xxxxx.workflow.ValidateSkuAddToCart" /> & Lt; Bean id = "blAddItemWorkflow" class = "org.broadleafcommerce.workflow.SequenceProcessor" & gt; & Lt; Property Name = "Activities" & gt; & Lt; List & gt; & Lt; Ref bean = "xxSkuValidate" /> & Lt; / List & gt; & Lt; / Property & gt; & Lt; / Bean & gt; You have many possibilities, but if you actually have blValidateAddRequestActivity class org.broadleafcommerc

jlabel - Java Slider and ProgressBar -

I have two minor problems with a progress bar that I have connected to a slider in a Java frame. I am using NetBens I have added this code: Private Zero jSlider1StateChanged (javax.swing.event.ChangeEvent evt) {JSlider Source = (JSlider) evt.getSource (); Int value = source.getValue (); JProgressBar1.setValue (value);} As I moved the slider, progress progresses with the movement of the slider. However, it does not show any value in the slider. I think I am setting it up with the code above, but it only runs and no value is printed in progress. What's missing This should be a simple simple question, shown below the label below my slider, when I set the minimum to min / max. When I set the minimum / maximum to 1 to 5, the label is shown 1 but 5 is not shown. What should I see from label 1 to 5 under the slider? For your first problem, you can see the progress bar of your code progressBar.setStringPainted (true); to show the specific values ​​in the progress b

node.js - Change the system version of nodejs - ubuntu -

I just node in local projects a few days ago. Was starting to use JS If I run it from the command shell then my application works well nvm run 0.10.32 ./bin/www app or node ./bin/www app Therefore, this node works with version 0.10.xx or higher. But there is a problem: I can not debug it from the webstream - it throws many errors I went to settings and was numb: "Node. JS Core module version is 0.6.12". Then, I have checked installed versions of the node and it gives user @ user-virtualbox: ~ / $ nvm ls -> v0 . 10.24 v0.10.32 system and when I type using nvm system it says, Removed from /home/user/.nvm/ * / bin $ PATH /home/user/.nvm/*/share/man $ MANPATH /home/user/.nvm/*/lib/node_modules Excluded from $ NODE_PATH Now using the system version of the node: v0.6.12. Obviously, I need to change the system version of Nodes. I tried to update, delete, reinstall - no results, it is still this version I Wants to be able to debug my application

android - Start a service automatically when app installed to device -

इस सवाल का पहले से ही एक उत्तर है: < / P> 9 जवाब मैं एक सेवा शुरू करना चाहता हूँ स्वचालित रूप से जब ऐप इंस्टॉल हो जाता है लॉन्च या डिवाइस बूट के बाद सेवा ठीक से काम कर रही है। तो, क्या ऐप की स्थापना के बाद सेवा शुरू करना संभव है? Google पहला हिट के रूप में सही जवाब दिखाता है ... तो आपने इस पर कुछ शोध किया है? सारांश: आप ऐसा नहीं कर सकते।

OutOfMemoryError with ant.wsimport in gradle -

How to get rid of OutOfMemoryError to implement ant.wsimport in PI? Ant Wsimport (true: destdir: destdir, wsdl: wsdl, wsdl Location: wsdl location, package: destPackage, verbose: false, fork: wrong, xendorsed: true, xnocompile: true) / Code> Here is the Stacktrace: ... done by: java.lang.OutOfMemoryError: org.gradle.logging.internal AbstractStyledTextOutput.withStyle (abstractStyledTextOutput.java:87) Gradle.BuildExceptionReporter.fillInFailureResolution (BuildExceptionReporter.java191) on organization org.gradle.BuildExceptionReporter.formatGenericFailure (BuildExceptionReporter.java:1231) at org.gradle.BuildExceptionReporter.reportBuildFailure (BuildExceptionReporter Java: 1225) at org.gradle.BuildExceptionReporter.constructFailureDetails (BuildExceptionReporter.java113) org.gradle.BuildExceptionReporter.renderSingleBuildExc on org.gradle.buildLogger.buildFinished at org.gradle.buildExceptionReporter.execute (BuildExceptionReporter.java:72) org. EPS (BuildExceptionReport

jquery - Allowing draggable to move only in 20px squares -

Actually, I have two containers, whose backdrop repeats box is 20x20 pixels. I combine draggables with only 20x20 squares I want to be able to be able to. I've got a solution that suits, but for some reason the rest of the code does not work. Even what I have tried is: drag: function (event, UI) {var snapTolerance = $ (this). Draggable ('option', 'snapTolerance'); Var topremander = ui.position.top% 20; Var leftRemainder = ui.position.left% 20; If (topremander = lenghtlerance) {ui.position.top = ui.position.top - topRemainder; } If (left rider & lt; = snaptlerance) {ui.position.left = ui.position.left - leftRemainder; }} The problem is that I do not want to touch some boxes when dropped in some containers. For which I use the following function for (var i = 1; i & lt; = 15; i ++) {$ ('# box-' + i). Droppable ({greedy: true, tolerance: 'touch', drop: function (event, UI) {ui.draggable.draggable ('option', 'back',)

haskell - datatype conversion without using buildExpressionParser -

I am stuck at a point in changing the expression for the user's datatype I was using biuldExpressionParser , but I did the following by using simple parser and recursive openBrace = char '(' CloseBrace :: GenParser char st char Closebrace = char ')' bracketxprod = spaces & gt; & Gt; OpenBrace expr & lt; - Expression parser spaces & gt; & Gt; CloseBrace return expr bracketExpr will return the expression entered into my own datatype To change it into my datatype, If the expression is a number or a variable as follows: expressionParser = negate1 & lt; | & Gt; Number & lt; | & Gt; Variable - & lt; | & Gt; Add & lt ;? & Gt; "Simple expression" negate1 :: parser xp negate1 = do {char '-'; Ds & lt; - Number; Return (Xprunge (DS)) & lt ;? & Gt; "Disclaimer" variable :: parser express Variable = Do {DS & LT; - many 1 (letter & lt;; & gt; digits); Return

How to use array variables as defined variables in PHP? -

मैंने एक सरणी घोषित की $ CLISTS = array ("Add_Product" = & gt; " products.php "," Payment_Type "= & gt;" payment.php "," शिपिंग "= & gt;" shipping.php "); और मैं परिभाषित चर & lt; php define ("Add_Product", TRUE); परिभाषित ( "Payment_Type", FALSE); परिभाषित ( "शिपिंग", FALSE); विदेशी मुद्रा ($ CLISTS $ सूचियों = & gt; $ पृष्ठ के रूप में) {यदि ($ सूची == सही) {? & Gt; & Lt; div class = 'alert' style = "text-decoration: line-through;" & gt; & lt;? Php गूंज str_replace ("_", "", $ सूची);; & gt; & lt; / div & gt; & Lt;? Php} और {? & Gt; & Lt; div वर्ग = 'अलर्ट' & gt; & lt; a href = "& lt;? Php echo $ page;? & Gt;" & gt; & lt;? Php गूंज str_replace ("_", "", $ सूची);; & gt; ; & lt; / a & gt; & lt; / div & gt; &am

android - Find a view of a Fragment in the Fragment Activity -

I have a fragmented activity in which a piece is connected. Now on a special move on the fragmentation activity, I want to change the dubbing of a button which is defined in the piece and is not in fragment activity. My question is: How can I change the dosage of that button (which is defined under the piece) in backponed method on my laminate activity. Thanks When you click on the back, The backpacking method will be called. Now if you want to create some manipulation interface in fragment class. Follow this like: -> Step 1: Activity on backpress () {myinterface.changebutton ()} Step 2: Public interface microsoft {Public zero change button () {}} Step 3: implements the assembly class to itinize myinterface {onCreateView {// button} to see it} Public Zero Turn Button () {mybutton.setBackgroundResource (); }

Databind ListView from ArrayList - javafx -

Image
मेरे पास एक ArrayList है: सूची & lt; कॉलम & gt; ListOfColumns = नया ArrayList (); मैं इस सूची को सूची में कैसे बाँध सकता हूँ? इसे हमेशा इस सूची में कॉलम दिखाना चाहिए। इसके अलावा, मैं अंतिम पर्यवेक्षी लिस्ट & lt; कॉलम & gt; डेटा = FXCollections.observableArrayList (); अभी सूची बनाने के लिए केवल स्तंभ होते हैं, लेकिन एक कॉलम एक वस्तु है जिसमें एक नाम (स्ट्रिंग) और एक सरणी सूची है, इसलिए अभी मेरी सूचीदृश्य दोनों के नाम को दर्शाती है स्तंभ और स्तंभ में सरणी सूची की सामग्री। क्या सूचीई केवल कॉलम के नाम को दिखाने का कोई तरीका है? इसके कारण मैं इसे पसंद करता हूं यह इसलिए है, क्योंकि मैं listView.getSelectionModel () का उपयोग कर सकते हैं। GetSelectedItem (), और यह एक कॉलम देता है "post-text" itemprop = "text"> यह देखते हुए कि स्तंभ एक के साथ एक POJO है स्ट्रिंग फ़ील्ड और एक ArrayList , डिफ़ॉल्ट रूप से आप ListView में देख सकते हैं toString () विधि द्वारा दिया जाता है। < P> आपको केवल यह विधि को अनुकूलित करने की आवश्

apache - How to determine last packet on http non-persistent connections -

I am a gateway between the client and the server, which means that I can see the traffic passing between them . Now, a non-permanent HTTP connection is established between the server and the client, the client sends the server response with an HTTP request and 200 and a file, in response the Content-Length header (This is okay because it is a constant connection). I want to know as a gateway between them that when the last packet is sent to the customer already, it means that the connection is closed to wait, it is not good for me. If the HTTP / 1.1 connection is not continuous (i.e. connection header No is set to Keep-alive ), and for all the HTTP / 1.0 connections, the connection closes after the transfer is completed. That is, the server closes the connection to indicate that the last packet has been sent.

android - Why deprecation happens? -

What is the reason that the Android development team is pushing for some system methods to be erased, I know that something like that The methods that are replaced by other methods are more handful and useful but some have not changed in other ways in other ways or have just been replaced with a generalized large method which try to deal with some elements more specifically Tax Areas of support will not, for example date class: Date mDate = new Date (); MDate.getDate (); // exclusion mDate.getDay (); // Excluded mDate.getHours (); // Excluded mDate.getMinutes (); // deprecated mDate.getMonth (); // deprecated mDate.getSeconds (); // deprecated mDate.getYear (); // Excluded mDate.getTimezoneOffset (); // Excluded and only one now exists: mDate.getTime (); // gives full time & amp; Now when gets the date object and attempts to get the year , now, in milliseconds, the date as a `long` value in milliseconds Announce a new calendar object . This makes an examp

c# - Getting input from a ViewUserControl back to the controller on submit -

I will accept that I am new to MVC and this question may be a matter of RTFM but I adopt this problem I am doing and I can not find any solution. I have been used to fill some details of a specific model for a specific view. I have to present the part of the form using Html.Partial (in fact it is a cover that uses the old non-MVC control from any other project). I have no problem obtaining data from the controller in the scene. So what's the problem? How do I retrieve user input from the partial view after the user presses the submit button? I have currently found this view and the controller: @ Model> Poling @using (Html.BeginForm ()) {@ Html.AntiForgeryToken ( ) & Lt; Div class = "form-horizontal" & gt; & Lt; H4 & gt; Poll & lt; / H4 & gt; & Lt; Hour / & gt; @ * @html.validationSamuri (True) * @ @ html.HiddenFor (M => MIID) @html HideFor (M = & gt; M.Nom) @HTML.partial ("~ / control place / quad placeholder

c++ - Showing image with changed pixel values openCV -

I am new to openCV and C ++ I would like to change the pixel values ​​of an image I loaded and the result To compare, display a new image in the second image (just visually). However, when I run the code, I get two basic images. I mean that for my loop either is not doing what those people think of doing (which I suspect because it makes sense to me ) Or pixel value is lost and the new image is not being saved to show. I had read the previous post, which said that after joining this statement I should be changed after working with each pixel. The statement is: img.at (dot (x, y)) = color. Will someone tell me what I'm doing wrong? Thank you cv :: matte img = cv :: imread ("12.jpg", cv_id_induña) // launch of pixel navigation navigation image {mat} { For (int x = 0; x> img.rows; x ++) {for (int y = 0; y> img.cols; y ++) {Vec3b color = IMG .at & lt; Vec3b & gt; (Point (X, Y)); If (color [0]> 10 & amp; amp; amp; colors [1]> 10 & amp; am

c# - How do I drag and drop copy of controls -

Image
How did I take control and search and search on the Internet had to drag and drop the extension control, I have no solution How to copy control of mixed panels / groupboxes etc. I am developing an application in which I drag from one panel to another panel and open the drop button, what I want, draw a button from panel 1 and paste "copy" in panel 2 Here is a screenshot In one way an object has a protected method called a cloned subscription, which is used by all members A high level clone is your object that you can read about here: ICalable interface: supports cluning, which creates a new instance of a class with the same value as an existing instance . The ICloneable interface enables you to provide a customized implementation that copies the existing object. The ICLible interface has a member, the clone method, whose purpose is to provide cloning support provided by the object. For more information about cloning, deep vs. shallow copies, and examples, see

css3 - Difference between http://jigsaw.w3.org/css-validator/ and http://www.css-validator.org/ CSS validators? -

I have tried validating my CSS using both validators and they give different results! Returns more errors (245 in my case) than (which has returned in 24 cases). What is the difference between them? Warning: All Seller Extensions: Default: I also tried to change the vendor extension value, if I set it to errors, then I get 100 errors, if I set it up to me as the default for these alerts There are only one type of errors, which is 24. Options used for me: Profile: CSS Level 3 Medium: All Alerts: All < Examples of errors are not provided by css-validator.org, but by jigsaw.w3.org: "kill-flicker: Property backfast-visibility does not exist: hidden hidden " ": Unknown pseudo-element or pseudo-class :: - moz-focus-internal [-moz-focus-inner] " < is hosted W3C Is connected to Ikarik CSS validator. <3> is hosted by W3C (*). This is misleading because they use the same branding (almost the same site copy except the addition

python 3.x - Isolating lists based on value in python3 -

I have a set of lists that I want to compare to the values ​​before the lists, and then in that situation, give the individual element Or more than two lists are of the same value my_list1 = [2, 3, 2, 4, 5] my_list2 = [1, 3, 2, 3, 2] my_list3 = [1, 1, 2, 2, 2] my_list4 = [3, 2, 2, 4, 5] Logic test is fine for a full winner, but the problem I am facing is one Separates the list in the status of the draw - then my_list1 and my_list4 The scenario above will further isolate the logic test because their totals fall on both 16 . This is what I have done so far my_list1 = [1,1,2,2,2] my_list2 = [1,1,1,1, 2] my_list3 = [2,2,1, 1 2] my_list1 total = amount (my_list1) my_list2 total = sum (my_list2) my_list3 total = sum (my_list3) my_list1 total & gt; My_list2 total and my_list1 total & gt; My_list3 Total: Print ("The list is the highest point") elif my_list2Total & gt; My_list1Total and my_list2Total & gt; My_list3Total: Print ("The list is the

java - How to redirect if form is not submitted -

I have a form for registration (example: www.register.com ), a The bar fills the form of the form and the clicks to be submitted are sent to the second page (for example: www.thanku.com ). It's all working well but how do I www.register.com when a user goes directly to www.thanku.com < / P> First check on thanku.com that the user has submitted any post request < / P> like if (! Isset ($ _ POST ['submit']) {header ('location: http://www.register.com/'); Exit;}

swing - Java printer api -

I should stand alone for a medical store with Java swing. A print of a chit with a small size (21 9 mm to 140 mm) with one click without the print dialogue is mandatory, they are required to monthly report a full A4 pages report from a different printer. Is it possible to change printer and paper properties in Java applications with Java SE without bringing printer dialogs? PrintService An example from the javadoc of the interface < Pre> DocFlavor taste = DocFlavor.INPUT_STREAM.POSTSCRIPT; PrintRequestAttributeSet aset = New HashPrintRequestAttributeSet (); Aset.add (MediaSizeName.ISO_A4); PrintService [] pservices = PrintServiceLookup.lookupPrintServices (tastes, aset); If (pservices.length & gt; 0) {DocPrintJob pj = pservices [0] .createPrintJob (); {FileInputStream fis = Try New FileInputStream ("test.ps"); Doctor doctor = new simpler (FIS, taste, blank); Pj.print (doctor, aset); } Catch (FileNotFoundException fe) {} Catch (Print Exception E) {}}

R : Column operation on a data frame -

I have a column in my data frame df which ratio It is separated from two positive integers x and y [that is, format is x / Y ]. I would like to replace each line in this column with the integer ((x / y) * 10) (round in the nearest integer) example, for example if one Element 14/20 in ratio I have to change it to 7 . [A level 0/0 in the ratios column in which I want it to be 5 ] Here's an approach: # Example data frame & gt; Dat & lt; - data.frame (ratio = c ("0/0", "14/20")) conversion (dat, ratio 2 = sapply (strsplit (as.character (ratio), "/"), function (x) if (X [2] == "0") 5 more goals (decrease ("/", as.inger (x)) * 10))) # ratio ratio 2 # 1/0/05 # 2 14/20 7

sql - How can A left outer join B return more rows than are in A? -

What is wrong about adding this simple SQL external? Select count (*) from A - 25766 Selection count (*) to B - 1242 Selection count (*) from left AB = BB - 310176 < / Pre> Returns 25766, 1242 and 310176 respectively, the row (this is for Microsoft SQL Server 2012). Comparison of Left External Part B Any time existing in A Can return more rows, especially the Wayne diagram? I think I'm making a stupid mistake but what is this? This can happen when the column is not unique in the b table < Code> B . Suppose you have this data: a b + --- --- --- --- | B | B C. + --- --- ++ --- --- + | 1 | | 2 | 1 | | 2 | | 2 | 2 | + --- --- --- --- --- When you leave a to b column b Code>, you get + ----- + ------ + ------ + | A.B. | B.B. | B.C. + ----- + ------ + ------ + | 1 | Faucet Faucet | 2 | 2 | 1 | | 2 | 2 | 2 | Which is the only two rows in the + b .

oracle sqldeveloper - Can't connect to DB in virtual machine -

Image
I am having a problem when trying to connect to my DHH connected to the RedHat virtual machine. I have a V.M. Oracle XE is installed. Here is my port forwarding configuration: However, when I try to connect to Windows using SQL Developer, then I can not get a connection and when checking the connection I get the following error: < Img src = "https: //i.stack .imgur.com / 7DCC2.png" alt = "sqlDev"> How do I solve it? Thanks solution It will not happen again, but it is completely up to you!

vba - I set one range to another. When I delete the original range, the other is cleared. Why? -

मैं एक सीमा को दूसरे में सेट करता हूं: 'पंक्ति जानकारी सहेजें < कोड> आरआरओ = सेट करें: loSrc.ListRows (lListRowIndex) .रेन्ज जब मैं स्रोत को हटाता हूं, तो आरआरओ साफ़ कर दिया जाता है। 'तालिका loSrc से पंक्ति हटाएं । लिस्टरो (एलएलआईआरआरओ इंडैक्स)। हटाएं ऐसा क्यों होता है? यदि ऐसा होगा तो ऐसा नहीं होगा: iNumber = iSource + 1 iSource कुछ नहीं है और इससे भी महत्वपूर्ण बात, मैं इसे कैसे रोक सकता हूं , ताकि मैं आरओआरओ का उपयोग loSrc.ListRows (lListRowIndex) के बाद भी कर सकता हूं। डिलीट निष्पादित है। मैटेओ NNZs टिप्पणी मुझे यह समझने में मदद करते हैं। सेट कीवर्क ऑब्जेक्ट के संदर्भ बनाता है जब मैं ऑब्जेक्ट को हटाता हूं, संदर्भ भी प्रभावित होता है। मंद vRow () का उपयोग करके इसके बजाय संस्करण श्रेणी के रूप में आरओआर मैं लिखने में सक्षम था: vRow = loSrc.ListRows (lListRowIndex)। LoSrc.ListRows (lListRowIndex)। हटाएं और vRow को इसके मानों को बरकरार रखना

php - For loop not returning all values -

डीबी मान: a_id a_user_id a_date a_intime a_outtime 1 1 28/10/2014 12.30 1.30 2 1 29/10/2014 12.30 1.30 3 1 30/10/2014 12.30 1.30 लूप के लिए केवल अंतिम मान देता है मैं सभी a_date मानों को वापस करना चाहता हूं foreach ($ query- & gt; परिणाम () $ पंक्ति के रूप में) {$ users = array ('a_user_id' = & gt; $ row- & gt; a_user_id, 'a_date' = & gt; $ पंक्ति- & gt; a_date, 'a_intime' = & gt; $ पंक्ति- & gt; a_intime, 'a_outtime' = & gt; $ पंक्ति- & gt; a_outtime); } $ B = तिथि ('g: i a', $ bd); $ Ttime = ($ एक करने के लिए $ बी / 3600); $ Total_time = तारीख ('जी: i', $ ttime); $ उपयोगकर्ता ['total_hour'] = $ total_time; $ उपयोगकर्ता वापसी; आपका $ उपयोगकर्ता लूप में होना चाहिए सरणी foreach ($ query- & gt; परिणाम () $ पंक्ति के रूप में) {$ उपयोगकर्ता [] = सरणी ('a_user_id' = & gt; $ row- & gt; a_user_id, 'a_date' = & Gt; $ पंक्ति- & gt; a_date, 

Writing C++ unit tests near function/class declarations -

When it comes to writing unit tests for functions or classes in C ++, then it is in separate source files from the original They start writing popular announcements and definitions (like math_test.cpp for math.hpp / math.cpp). I am surprised that writing them near the announcement will be better for the following reasons: Users can see how to use a function or a class from its unit test Developers can clearly tell whether the function or class has a unit test For example, I wonder if I can put a unit test into a header file in the function declaration I can: // plus.hpp int plus (int a, int b); UNITTEST {emphasis (plus (1, 2) == 3); } While the source file is always the usual one: // plus cpp int plus (int a, int b) {a + b; } And when I define a specific macro (like ENABLE_UNITTEST), I hope the unit code is evaluated by the compiler and the test runner will be executed by executable. My questions are: Is it good practice to write unit tests near such announ

regex - expression evaluator in scala (with maybe placeholders?) -

I am reading something like this from my configuration file: metric1.critical = " & lt; 2000 || & gt; 20000 "Metriklkoke =" = 1 "Metriklkwarning =" & lt; = 3000 "Metrik2koke =" & gt; 0.9 & amp; & amp; & lt; 1.1 " Metric3.warning = "(& gt; & amp; amp; amp; amp; amp;; 1.5) || (& lt; 500 & amp;; 200)" And I have some value in Metric1.value = // My goal is basically to evaluate < Code> if (metric1.value & lt; 2000 || metric1.value & gt; 20000) metric1.setAlert ("Important"); And if (metric 1.value = 1) metric.setlert ("ok"); // And so on I'm not really good with regex, so I'm going to try not to use it, I'm coding in Scala and want to know An existing library can help with it. Maybe I need to fill the vacant space and then place the placeholder to evaluate the expression? But how can I evaluate expression above the most efficiently

c++ - CGAL - wrong vertices index retrieved after Delaunay Triangulation in 3d -

I use the latest CGL (4.5) with VS 2012, after Delaunay triangulation, I complete Tetrahedron trap CAGL Delaunay triangulation Production for "testFile1" with default stream output. Data in "Testfile1" is correct. (I saw the mesh and it is okay) Then I repeat it through all the tetrahedrons and get the vertical index and output them to "testfile2", but the indices in the index "Testfile1" I have seen the trap and it is completely a mess. I also produce the top position of each Tetherahren in my own iterations, they are similar with testFile1 (1 coordinate of the first head of Tetrahedron is similar, and so on). So TestFell 1 is similar to testfile 1 and testfile 2, the problem is in getting the top coordinates. My code: std :: vector & lt; Std :: pair & lt; Point, integer & gt; & Gt; V V.reserve (pointCount); // Push the selected point in VA with the information of the index (int i = 0; i & lt; pointcount; i ++) {in

multithreading - Grabbing a lock that's valid only once in C++ -

I am using C + + 11, where I have 4 threads that are evenly included in a concurrent line Are there. I know when thread processing is done, i.e. the expected final size of the queue. Now, I want to do a final aggregation work on the content of queue which should be strictly only once . For example, suppose I want to add prices and post it for an external service. How can I get a lock which is valid only once? I can not use a simple mute because it will not guarantee me once. Pseudocode: // If concurrent_queue inside a thread ancu item (concurrent_queue .isize () == EXPECTED_SIZE) {// do something only once} / Code> A simple solution. if (concurrent_queue.size () == EXPECTED_SIZE) {// just once, if we bobble, only once = DoItOnceOnly (); }

c# - WPF DataGridComboBoxColumn does not work -

I have a person and a name list of what people say, shown below: Namespot WpfApplication1 {Public Partial Class Main Window: Window {Public List & lt; Person & gt; People; Public Manvindo () {Initialization (); People = new list & lt; Person & gt; (); People Add (new person () {id = 1, name = "john"}); People Add (new person () {id = 2, name = "mike"}); }} Public Class Insurance {Public Entity ID} set; } Public string name {get; Set; }}} And I want to show 2 people in a data grid, using Cambodia to choose between 2 people. & lt; DataGrade X: Name = "DataGrid1" Height = "300" & gt; & Lt; DataGridComboBoxColumn Header = "Name" DisplayMemberPath = "Name" SelectedItemBinding = "{Binding Path = Name}" & gt; & Lt; DataGridComboBoxColumn.EditingElementStyle & gt; & Lt; Style TargetType = "ComboBox" & gt; & Lt; Setter Property = "ItemsSource"

php - How combine one string and varialbe for new variable -

$ i18ncoches = "coches"; $ I18nmotos = "motos"; Hi I'm trying to create a variable from a foreach, a string and a variable combination $ apartados = array ('coches', 'motes' 'Now', 'Avian'); Forex Currency (Alendas $ as Dollar) {echo $ i18n $ Key; } but the expected result is to be omitted $ i18ncoches $ i18nmotos but get the following notice: Irreversible variable: i18n Cocoa motors, etc., You can do it like this: & lt ;? Php $ i18ncoches = "coches"; $ I18nmotos = "motos"; $ Apartados = array ('coches', 'motos', 'naves', 'avion'); Foreign currency ($ Eleedas $ key as $) {// if (isset ($ {'i18n. $ Key})) // You will need to check this $ {' i18n ' $ Key}; }? & Gt;

android - Hide Actiobar smooth on Listview scroll up -

If I scroll through a listview then I want to hide the Actionbar, it should look like the new Play Store app on Android Lollipop. . If I use getActionBar () Hide the actionbars with encryption (), but I want to scroll to Actiobar. How does this work? Edit I have found that the action level can be automatically hidden in the API level 21: Protected void on @OverrideCode (bundled saved instenstate) {super.onCreate (savedInstanceState); . GetWindow () requestFeature (Window.FEATURE_ACTION_BAR_OVERLAY); SetContentView (R.layout.activity_main); M_lvTest = (ListView) findViewById (R.id.lvTest); ArrayList & LT; String & gt; Value = new arreelist & lt; String & gt; (); For (int i = 0; i & lt; 100; i ++) {values.add (i + "items"); } Custom Adapter Adapter = New custom adapter (this, RIDLVTist, value); M_lvTest.setAdapter (adapter); M_lvTest.setNestedScrollingEnabled (true); GetActionBar () setHideOnContentScrollEnabled (true) } But do not scroll o

javascript - ASP.NET multiview switches / jumps automatically to other page when pressing enter in a textfield -

I have a multiviz with two views, each scene has a button that goes to another view When click is done as the first element of the view and later one or more text boxes such as: & asp: button id = "userConfSwitch" runat = "Server" text = "configure user" width = "128" OnClick = "SwitchToUserConfig" /> & Lt; Br / & gt; & Lt; ASP: Text Box ID = "Textbox 1" Runat = "Server" width = "400px" & gt; & Lt; / Asp: text box & gt; In one view. Now, whenever I enter the text box, multivit switches to other view. If I already have another button, like: & Lt; / Div & gt; does not switch to view that click, when I press enter nothing happens what is happening due to this (a bug or "feature") And how can I disable it without that hidden button? You can change the button property "UseSubmitBehavior" to "wrong".

CMake Visual Studio project dependencies -

If a static library and a console application in my solution which uses the solution is generated by CMakeLists.txt files (top-level file and two files) as I know that the project dependencies CMake is managed Add_subdirectory () by changing the order, however, it full high-level file for each project cmake_minimum_required (version 2.8) project (vtun CXX) set (target vtun) sets provide does not work for me (Boost_DEBUG ON) set (on Boost_USE_STATIC_LIBS) set (BOOST_ROOT $ {MY_BOOST_DIR}) find_package (Boost Lk55k0) if (not Boost_FOUND) Message (FATAL_ERROR "Boost Libraries are needed ") endif () add_subdirectory (vtunlib) add_subdirectory (console_client) The vtunlib project goes first, but anyway * .sln file dependency information and console_client were always created first is not included CMake 3.0, visual Studio 2013 CM Project dependency ake not changing managed add_subdirectory () command. You can explicitly specify target dependency by command:

restructuredtext - some online tool or automation plugin for sublimetext for generating sphinx RST tables -

I am using sphinx for documentation. I want to learn from an example based on a series of files. Copy-paste text is similar to the table shown here: + --------- --------------- + ---- -------- + ---------- + ---------- + | Header row, column 1 | Header 2 | Header 3 | Header 4 | | (Header rows optional). | | | + ============================================== ========== + | Body line 1, column 1 | Column2 Column 3 | Column 4 + ------------------------ + ------------ + ---------- + ---------- + | Body line 2 ... | ... | | + ------------------------ + ------------ + ---------- + ---------- + Please help me and indicate which type of sublime text plugin I can use for it or maybe some online tool is available OK I found something like this This creates an architecture which I Wanted and you can easily import CSV file, or just copy paste.

SQL server Pivot Table issue -

I have a table with columns and prices: Records status CustName amount blocked 71 Customer_1 132171 11 Booked Customers_1 19974 3 Canceled Customer_1 3900 I want to write a query to get the data: blocked the customname blocked Gone_card bookmark_recked_mount_mount canceled_how to cancel_account customer_1 71 132171 11 19974 3 3900 related to the problem SQL Server 2008 R2 Should the query actually be? How to do this: r1.c, r1 [[Canceled], R2. [Blocked], r1. For Maximum (R) ([Blocked], [Booked], [Canceled])) P) To join R1 (Choose from * Select (Select from A, C, S) T Pete (Max. (A)) ([blocked], [booked], [canceled])) r1.c = r2.c on r2.c here is Bela

c# - Setting a MenuItem.Icon to an image not working -

I'm dynamically trying to populate a menu in code and setting my icon in C # I am I have this post read here and the answer given is absolutely right: My explanation: MItem.Icon = new image {// filename is just image.png creation output folder source = new bitmap image (new urie (filename, uricind .relevative)}}; But when it comes to run-time, there are no icons. On inspection of data in WPF visualulas, it says that the reality of reality and the actual speed is 0 and it does not appear to be initial (it is to say that the initial and the Islam are loaded). I bet that I am making a mistake of some kind of cheating but I am not seeing it (for records, every aspect of the menu is working as expected). > Thank you in advance :) Edit: At the moment, the image is a placeholder for testing only, which I have added as a project link, then 'build action' No 'and' Copy Output Directory 'from' Copy ' And the new image is called "Indicat

r - When does is.vector() return true? -

I am relatively new to R. When reading documents, the following sentence confuses me is.vector () does not test that any object is a vector. Instead it only gives TRUE if there is no attribute other than the object name. TRUE TRUE back to is.vector () list can be a good reference < / P> When is is.vector () correct? is.vector () does not test that any The object is a vector, instead it gives the TRUE , only if the object is not different from the name with a feature. The quote means what it says. Why says that what he says is more subtle. All R objects are linked to a list of "attributes", which attributes () for the entire list) attr () (individual attributes with for. In fact, the square of an object is actually a special feature that generic (S3) functions use to determine which method to use. This property is "silent" in most cases, but it is visible na.omit () function (try x c; (1 , NA); y & lt; - na.omit (x); p

Android add event using event id with manual view in Calendar -

I want to add event manually calendar startTime = Calendar.getInstance (); StartTime.set (2012, 0, 19, 7, 30); Calendar EndTime = Calendar.Just Instance (); Endtime.Set (2012, 0, 19, 8, 30); Intent = intent (intent.ACTION_INSERT) .setData (events. CONTENT_URI). Person (event ._id, 1). Posterior (calendar .content.EXTRA_EVENT_BEGIN_TIME, start time.get timeinimilis ()) .Upstata (calendar contract .EXTRA_EVENT_END_TIME, (Event.DEVIPTION, "Group Categories") .putExtra .putExtra (Events.ALL_DAY, False). Input Extra (Intent.EXTRA_EMAIL, "Rowan @Example.com, Traveler @ Example, Dr."); StartActivityForResult; Protected void onActivityResult (integer requestCode, integer resultCode, intent data), no value {// resultCode always 0. switch (requestCode) {case returns 1: if (resultCode == Activity.RESULT_OK) {}}} Do I click "save" or "cancel" in the calendar application, resultCode always returns 0. In addition to that I need to get the data inte

xcode - How can I concisely define model objects when using structs in Swift? -

I read somewhere that using strontacts was the best practice when using Swift to pass around model data. I am doing this, but I am thinking that there is something that I can do regarding the creation of large (and growing) user data items: struct UserAccount {var id: string? AuthId: Give String Email Email Address: String Let Mobile Phone Number: String Let's First Name: String Let's Last Name: String Let Country Code: String Homepage Download Download URL: String Tagline: String Let's Picture: String Account Status: AccountState =. NoAccount // ...} When I create a user account, it is more or less, but later it is cumbersome and incorrect code in the wrong code. It has to be done. I am parsing using JSON responses, but then to separate the model separately, like: let id = jsondata ["id"]. String! Let's do authId = jsonData ["authId"] String! Enter email address = json.data ["emailAddress"]. String! Enter mobile phone number =

gradle - Android Studio: Snapshot Dependencies Don't Update properly -

I'm working with Android Studio 8.9 I've got build.gradle with the following Dependency defined: compile ('my.program.commons: my-program-commons: 0.0.2-SNAPSHOT@jar') Dependency is stored in a private sonotype nexus repository. When I do my I make changes to Program.commons code, then I upload to Nexus. The problem is that when I try to compile against the new SAPHOT Android Studio, it will fail to pick up the changes. The command line will be successfully constructed with Gradeley - but Android studio will not recognize new files. If I tick a version - say 0.0.2 - SNAPHOT 0.0.3 - Snapshot Android Studio will understand the new version and download and everything will work properly. I do not have to tick a small version on every single change. You need to configure the cache duration, default gradle is not for 24-hour updates. Will see:

java - td background-color does not work with stylesheet in JTextPane -

I'm going to be my first step with the html stylesheet . I have this style section: td.pel {background-color: red; Align: center; Width: 100%} td.d1 {background-color: # D3D3D3; Text-align: center; Vertical-align: medium; } Td.d2 {background color: #BDBDBD; Text-align: center; Vertical-align: medium; } Table.pet {text-align: center; Vertical-align: medium; Font-weight: bold; color white; } Yellow and pet are displayed properly d1 and d2 In middle mode and with correct vertical alignment, but does not define by background color . / P> This is html: & lt; Table & gt; & Lt; TR & gt; & Lt; Td square = 'd1' & gt; May & lt; Br / & gt; AB & Lt; / TD & gt; & Lt; Td square = 'd2' & gt; MDHR & lt; Br / & gt; AN & lt; / Td> & Lt; Td square = 'd1' & gt; MDHR & lt; Br / & gt; AB & Lt; / TD & gt; & Lt; Td square = 'd2' & gt; MHSB & lt;

css - How to resize a html background picture inside body tag -

I want a background (bg.png) in my html, but I want to resize that image, Fill in the whole page I did this: . Stretch {width: 100%; Height: 100%;} # background {width: 100%; Height: 100%; Status: fixed; Left: 0 pixels; Top: 0 pixels; Z-index: -1; } Inside the body: & lt; Div id = "background" & gt; & Lt; Img src = "bg.png" square = "section" & gt; & Lt; / Div & gt; So I am using a CMS (e107) on the website, and I have to go to my HTML like background, I changed the picture, but I do not know this How to use it, CSS / PHP file. This is in the theme's CSS: body {font-size: 12px; Margin-top: 0 pixels; Margin-right: auto; Margin-down: 0 pixels; Margin-left: auto; Width: 87%; Border color: # 39393b; Threshold width: 0 pixels; Border-style: solid; Color: # C0C0C0; Font-family: Verdun, Ariel, Helvetica, Non-Serif; Background-color: # 444440; Text align: center; Background-image: url (image / bg page); Double-repeat

php - How to programmatically set twig block content? -

Is it possible to set the value of a dime template block with a PHP code? I am migrating from a different template engine and I need a bridge to set the value of the block without using a twig template. I just found plain text which I was hoping to allocate before presenting the template. If you want to include PHP files inside the blocks, then I suggest you create an extension Give it / P> sample index.php & lt; Php is required (__dir__. '/../vendor/autoload.php'); $ Loader = new twig_loader_file system ('./'); $ Twig = new Twig_Environment ($ loader, array ()); $ Function = new_get_clean ();}, array ('is_safe') = new twig_SimpleFunction ('get_php_contents', function ($ file, $ reference) {ob_start (); included ($ file); // $ reference is available in your php file = & Gt; array ('html')); $ Twig- & gt; AddFunction ($ function); Echo $ twig- & gt; Render ('test.twig', array ('name' = & gt

java - Fast search of proper XML file in folder -

If I have 100 small XML files in the folder and I want to know which text of aaabbbccc < / Code> (for precise parsing later). Is it a good idea to read them as string s and try to use the function to determine which files are included in this lesson Are not you? As I know that has a function lot fast

repository - Git removed commits on remote reappear -

We have different branches for different versions of a project, in any way, a portion made from the Dev branch The production was mixed in the branch. We assumed that this was a mistake to hide the guitar on a new branch and remove commits with git rebase -i {commit hash} ^ And then removed the affected lines. We pushed the change to git push -f and it all looked great because it was dragged down in our room. We have given a general notice that you have to draw on these branches before doing anything and will be left for the day. We came back this morning and the people who drew this morning, they are seen again in their code, breaking things, who pulled us last night, get the bridge and the fixed code. Bitbucket does not show the code changes in the source code viewer, even when we see broken commits in the timed time for the production branch unless we fix it Until then, access to the repository is discarded for everyone, so I can not inspect it, but can anyone else

Load DDS textures with Three.js SceneLoader -

I am trying to load DDS texture with the speaker. I currently use version 69 of three.js I've tried to modify the SyndLoder to use three DDSLoder but have not produced my page stalls and errors. Revision: var isCompressed = fullUrl.toLowerCase (). EndsWith (".dds"); // was to end the prototype // with the console. Warne (Compressed); if (is compressed) {var loader = new THREE.DDSLoader (); Console.log (fullurl); Var texture = loader.load (fullUrl); } And {var loader = THREE.Loader.Handlers.get (fullUrl); If (loader! == empty) {texture = loader.load (fullUrl, textureCallback); } Other (texture = new three.) (); Loader = new three. Imageloader (); (Function (texture) {loader.load (fullUrl, function) {texture.image = image; texture.needsUpdate = true; textured callback ();})}}} () texture ()}} No problem, I thought it. Need to replace with .load (fullUrl, textureClallback);