I have a HTML with lots of data and part I am interested in: <tr valign=top> <td><b>Total</b></td> <td align=right><b>54</b></td> <td align=right><b>1</b></td> <td align=right>0 (0/0)</td> <td align=right><b>0</b></td> </tr> I try to use awk which now is: awk -F "</*b>|</td>" '/<[b]>.*[0-9]/ {print $1, $2, $3 }' "index.html" but what I want is to have: 54 1 0 0 Right now I am getting: '<td align=right> 54' '<td align=right> 1' '<td align=right> 0' Any suggestions?
I want to use Regex non-capturing groups in scala, briefly worded "?:". After hours of testing various cases I came here to search for a solution. I found this question and its answer, but it didn't worked for me. Is it possible to make non-capturing groups work in scala regexes when pattern matching So I wrote a minimal example to test the statement of the thread above. val test = ("""(?:<.*>)(.*)(?:<.*>)""".r findFirstIn ("<test>hello</test>")) getOrElse "" println("DEBUG MESSAGE (test): " + test) Expected Output: hello Real Output: <test>hello</test> So what is wrong with my code?
I'm using Python 3.4.1 64 bit on Windows 7. When I tried to install scikit-image using pip, I ran into the popular problem: "unable to find vcvarsall.bat". I made sure that I have both Visual Studio 2009 and 2010 redistributable installed and also added VS90COMNTOOLS and VS100COMNTOOLS to environment variable. But that didn't help. The same error persisted. Then I decided to give MinGW-w64 a try. So I installed it. Add the bin folder to PATH. Then create a distutils.cfg file that has this code [Build] compiler = mingw-w64 Then I get this error message: "don't know how to compile C/C++ code on
I need to be able to highlight cells that are modified and before the sheet is closed, remove the highlighting. Typically the cells that will be changed are always in one column. I've been reading the developer reference and playing in vba all day. Despite my best efforts I can't seem to figure this one out. I have a string of code that highlights any targeted cell: Target.Interior.Color = RGB(181, 244, 0) I was thinking of making an array that recorded targeted cells and on a BeforeClose event, clearing the formatting based on the arrays values. Is that even possible? Thanks in advance!
I have written the code below to send headers, post parameters. The problem is that I am using SendAsync since my request can be GET or POST. How can I add POST Body to this peice of code so that if there is any post body data it gets added in the request that I make and if its simple GET or POST without body it send the request that way. Please update the code below: HttpClient client = new HttpClient(); // Add a new Request Message HttpRequestMessage requestMessage = new HttpRequestMessage(RequestHTTPMethod, ToString()); // Add our custom headers if (RequestHeader != null) { foreach (var ite
I'm creating multiple instances of tomcat using opscode chef cookbook. I see that tomcat.conf was not written into my instance of tomcat but is only in the base instance. I created a softlink to the base instance tomcat.conf file. When I tried to start the server, I get the following error with no logs. There are no logs in /var/log or tomcat folder. Please provide hints on how to debug. [root@centosclient2 ~]# service tomcat6-obi_sandbox_tomcat start Starting tomcat6-obi_sandbox_tomcat: Error code 4 [FAILED] I saw below in /var/log/tomcat6-obi_sandbox_tomcat-initd.log -sh: /usr/sbin/tomcat6-o
How can I display the dynamic content of PHP with bootstrap pagination.The result is displaying using ajax call in div id 'msrResult', how to relate with bootstrap pagination code. Here my code: <script src="//code.jquery.com/jquery-2.0.3.min.js"></script> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script> <script src="//raw.github.com/botmonster/jquery-bootpag/master /lib/jquery.bootpag.min.js"></script> <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"> </head> <div id="content2">Dynamic Content goes here</div> <d
I have an Android application. I want to scan for all classes within a package for a specify annotation. I have: package com.sample.package; import com.sample.core.Controller; import com.sample.core.ProtocolId; @Controller public class OtherController implements ControllerInterface{ @ProtocolId(id=100) public void doSomething(){ //do something } } I'm finding for classes annotated with @Controller for a specify @ProtocolId number. I'm using Google Reflections library. Here is how I'm scanning: package com.sample.package; import org.reflections.ReflectionUtils; import org.reflections.Reflection
The question is a little bit long but I wanted to supply all the information in advance I have the following class: package test.api.soap.server; public class TestClassA { public TestClassA() { } public String doA() { System.out.println("Start doA()"); return "In do A"; } } I want to expose it as web service but not directly so i created wrapper class: package test.api.soap.server; import javax.jws.WebMethod; import javax.jws.WebService; @WebService public class MyClientApiV2_5 { public MyClientApiV2_5() { } @WebMethod public TestClassA getTestClassA() { return new TestClassA(); } } I creating
I want to monitor JVM performance on my production environment. I have installed only JRE, not JDK, Hence I can't use jstat, jconsole etc. to monitor the JVM performance. Can somebody please help to understand how can I monitor JVM performance in this scenario? Is there any way to achieve this? (Please note that I don't want to monitor it remotely through JMX or something else. I would like to install local agent in each machine which will send the metrics to server at the interval of 1 minute.)
My CXF JaxWs Endpoint is hosted on a weblogic through a war. I'm trying to access an operation from a Stand-alone JaxWsDynamicClient. The Client is getting created but the following exception is thrown while trying o access the operation. I've pasted the Server Side and Client Side Exception, SEI, client code and the respective Service and Client pom(s). Didn't find any luck researching over this issue, mostly there seems to be no answer. Server Exception java.lang.RuntimeException: Cannot create a secure XMLInputFactory at org.apache.cxf.staxutils.StaxUtils.createXMLInputFactory(StaxUtils.jav
I validate my form with jQuery validation plugin. I change style dropdown menu with jQuery select2 plugin. If validate callback throws an error my input shows/adds a class error box (red border). Otherwise it shows/adds a class success box (green border). This worked in normal input but won't work in select2. When I choose any value for select box, the error box (red border) does not hide/switch to success box. select2 worked after click submit button. JS: $('form').validate({ rules: { firstname: { minlength: 3, maxlength: 15, required: true }, lastname: { minlength: 3, maxlength: 15, required
I am trying to convert TIF / TIFF images to JPG which works fine but for few TIF images I am getting an IllegalArgumentException: Bad endianness tag (not 0x4949 or 0x4d4d). Exception : java.io.IOException: Bad endianness tag (not 0x4949 or 0x4d4d). at com.sun.media.jai.codecimpl.CodecUtils.toIOException(CodecUtils.java:76) at com.sun.media.jai.codecimpl.TIFFImageDecoder.getNumPages(TIFFImageDecoder.java:98) at com.sun.media.jai.codecimpl.TIFFImageDecoder.decodeAsRenderedImage(TIFFImageDecoder.java:103) at com.sun.media.jai.codec.ImageDecoderImpl.decodeAsRenderedImage(ImageDecoderImpl.java:140)
I am creating an application using cordova: openDatabase('testname', '1.0', 'Database display name', 5 * 1024 * 1024) I am using a plugin to sign in with Facebook https://github.com/wizcorp/phonegap-facebook-plugin. After a successful login I am calling the following function: facebookConnectPlugin.api("<user-id>/?fields=id,email", ["user_birthday"], function (result) { alert("Result: " + JSON.stringify(result)); /* alerts: { "id": "000000123456789", "email": "[email protected]" } */ openDatabase('testname', '1.0', 'Database display name', 5 * 1024 * 1024) }, function (error) { alert("Failed
I want to delete all completed orders in WooCommerce using a single MySQL query. I am having a performance issue with the WordPress admin dashboard: when I try to view completed orders, the page goes blank (likely memory exhaustion due to 7,823 completed orders). Is there a safe way to delete all completed orders directly using a MySQL query in phpMyAdmin?
At the place where I am working, proxy settings are not allowed. Is there any way by which I could record HTTP sessions and use them in JMeter during replay?
I am trying to download a pdf file from a website using urllib. This is what i got so far: import urllib def download_file(download_url): web_file = urllib.urlopen(download_url) local_file = open('some_file.pdf', 'w') local_file.write(web_file.read()) web_file.close() local_file.close() if __name__ == 'main': download_file('http://www.example.com/some_file.pdf') When i run this code, all I get is an empty pdf file. What am I doing wrong?
I'm developing SMS application which sends a lot of SMS's from a database.But when I'm sending SMS appears a popup "Messaging is sending a large number of SMS messages. Do you want to allow this app to continue sending messages?".How I can avoid this poup??
I am using iReport. I want to know how to make an auto height rectangle? as per this sample image of detail band. There is two part one is data part on right side which fetch data and show. and left side part is a textarea data which is passed as parameter. I want to make both rectangle same height. It may possible that left side data height is bigger than right side part and vice versa. So I want to make both rectangle height same all the time. For achieving this i use following code. where I don't use rectangles but a lines only <columnHeader> <line> <reportElement x="0" y="28" width="555" h
I have installed oracle forms 10 g on my windows 7 32 bit local machine. Everything is fine, but whenever I try to run the form it gives the error FRM-40039 can't attach library while opening form. BUT it works fine whenever I put my .fmb, .fmx, .pll, and .plx libraries in oracleDEVhome_1\forms. But when I place all .fmb, .fmx, .pll, and .plx files in a separate directory like c:\orion, it gives the error frm-40039 can't attach library while opening form abc. All my .pll, .plx, .fmb, .fmx files are in the same file named orion. The overall configuration that I did is 1)default.env FORMS_PATH=c
I am trying to utilize chrome for remote debugging of an android web application. I am unable to get any open tabs from the device to show under chrome://inspect list for remote debugging. I have done the following: Made sure my device driver is installed appropriately. Turned on developer mode and usb debugging on my device via the developer menu. Checked and made sure that my device is listed in adb list via issuing "adb devices" from the command line. My device is displayed under the device list via (chrome://inspect) just cant seem to get any open tabs listed any help would be much appreci
I am trying to reformat my pivot table. Currently, there are two columns called closed and completed, which essentially represent the same thing. I would like to merge these two columns together. How can I do this?
I have copied Client/Server Socket Program from the following source http://www.php.net/manual/en/sockets.examples.php but when i run it in my browser it gives following error message: socket_bind() reason: Only one usage of each socket address (protocol/network address/port) is normally permitted. I have searched and tried different solutions but was unable to found the solution. Please help My code is below. Server.php <?php error_reporting(E_ALL); /* Permitir al script esperar para conexiones. */ //set_time_limit(0); /* Activar el volcado de salida implícito, así veremos lo que estamo obten
I need to know the selenium version the webdriver is communicating with. I think this could be done before with getEval and Selenium.version, but I cannot find now how to do it. Is there a way?
-----------SOLVED----------- thanks for taking the time to help me. i managed to make it work now. i think the problem was my negligence. i have to add the getVal on my modal like so id="modal_"getVal. it was calling the wrong modal, thats why the input box returns empty. Im very sorry for this and I appreciate the help people do. thank you i have a simple modal which contains a textbox and button. <input type="text" class="form-control" id="textb" val_A="1"> <button type="button" id="but"> submit </button> i want to get the textbox .val() and the attributes val_A upon button click $(document)
I'm using SSRS 2008 and wanted some advice on the best practices for handling multiple result sets. I have a stored procedure which returns 4 result sets of related data, however each result set has a different number of records returned. Of course in SSRS only the first result set is processed, so I'm left with 2 options, as far as I can tell: Create 4 different stored procedures which return the 4 different data sets Insert all 4 result sets into a temporary table and return the results from that table. The problem with the first option is that the 4 results are all derived from the same bas
I am trying to code a listItem which will have 2 values "New" and "Edit". I also have a search (Push Button) in the same canvas. I want to disable the Search button when I have selected "new" in the list item and enable it when "Edit" is selected in the list item. Here is my code : I am using Oracle Forms 6i , WHEN_LIST_CHANGED Trigger .. begin if :CONTROL.LI_DO='New' then go_item('PB_SEARCH'); SET_ITEM_PROPERTY('PB_SEARCH',enabled,property_false); else if :CONTROL.LI_DO='Edit' then go_item('PB_SEARCH'); SET_ITEM_PROPERTY('PB_SEARCH',enabled,property_true); end if; end if; end; Any help is app
In this trivial example, test2 fails to compile even though test1 succeeds, and I don't see why that is the case. If arr[i] is suitable for a return value from a function marked constexpr then why can it not be used as a non-type template argument? template<char c> struct t { static const char value = c; }; template <unsigned N> constexpr char test1(const char (&arr)[N], unsigned i) { return arr[i]; } template <unsigned N> constexpr char test2(const char (&arr)[N], unsigned i) { return t<arr[i]>::value; } int main() { char a = test1("Test", 0); //Compiles OK char b = test2("Test", 0); //error:
I have an Excel VBA userform with several text boxes. The user will input a weight in a text box. They can then do other things on the form or click Apply, Update, Previous Event, Next Event or Cancel. After the weight is input, it must be validated, and if it is OK, the form is marked as mbFormChanged=True. This validation occurs in the text box's AfterUpdate event. My problem is that if the user types in a value and immediately clicks Apply, Update, Previous Event or Next Event, the field is not validated and it is as if it was never changed. I.e enter weight: 200[Update] However, if the use
In Maven projects, there is an option in IntelliJ IDEA to automatically download sources (and Javadoc) for all libraries. For Gradle projects I found no similar option, just to open a class and click "Search in internet". This is very annoying if you have a lot of libraries. Is there any way to automatically attach sources from the internet (Maven repo)?