Posts

Showing posts from June, 2012

jquery - Disable iframe map zoom using Javascript -

I am including a third-party URL that manages Google Maps. I want to disable mouse zoom, scroll and touch pad zoom, but still want to enable + and - to zoom in and out. There is no way to disable the zoom event for the iframe map. What I have just done, by adding the class name to the scrolls, disabled-map $ ('# Map_iframe'). AddClass ('disable-' map '); }); $ (Window) .on ("scrollstop", function (e, a) {$ ('# map_iframe'). RemoveClass ('disabled-map');}); .disable-map {Pointer-events: none; } Is there any other better solution?

java - Need quick help on rainfall statistics program -

Basically I'm having a hard time keeping this program together, which is designed to ask users They want to see how many years of data they use, and depending on that input, this is how many set random double rain values ​​of 12 months are displayed. This is the product that should appear if the user enters in 3 years: Enter the year number: 3 1 Rain volume < / P> Month 1 Rainfall was 4.16 Month 2 Rainfall 6.85 Month 3 Rainfall 1.28 Months 4 Rainfall Amount 1.66 Month 5 Rainfall Amount 3.06 Months 6 Rainfall 4.62 Month 7 Rainfall 5.6 9 Month 8 Rainfall Amount 1.84 months 9 rain was 9.63, 9 months amount 10 rain was 8.60 month 11 amount was 3.34 months 12 rain Amount was 1.27 Year 2 Rainfall Amount Month 1 Rainfall 4.38 Months 2 Rainfall Was 4.64 Months 3 Rainfall 8.27 Months 4 Rainfall 3.19 Month 5 Rainfall 6.6 9 Months 6 Rainfall was 4.13 months 7 Rainfall 8.52 months 8 Rainfall was 5.71 months 9 Rainfall 3. 9 1 month 10 Rainfall amount 9.16 months 11 Rainfall

Query scope in different table using Laravel 4 -

I am using scope queries in my group list display, and the group belongs to the country table. I can use the group name as search and sort order without any problem. Do I now want to do the following: 1) Name of the search country that is stored in the country table 2) Sort order of country Name stored in host country # group model # class group provides clues {secure $ table = 'group'; Protected $ guarded = array ('id'); Public celebration country () {return $ this- & gt; Affiliation ('country'); } Public Function ScopeName ($ query, $ name) {return $ query- & gt; Where ('group_name', 'likes', "% $ name%"); } Public Function SkopSortname ($ query, $ order_b = 'acc') {return $ query-> By command ('group_name', $ order_by); }} # Country model # class country provides clues {secure $ table = 'country'; Public Function Group () {Return $ this- & gt; Hayman ('group'); }} # Group co

Git: restore my changes which were amended to merge commit -

I accidentally modified the merge command instead of creating a new one. Now I do not know how to remove general changes, which I can push. Changes will appear in gitk, but will not be visible in format-patch. please assist. You have 2 SHAs that are of interest here - Basic merge commits and modified merge commits What do you do Want git reset in your head original merge committment, while your index and working directory is protected then you can create a new commitment to close the merge commute. Are there. git reflog original merge commit reset git ORIGINAL_MERGE_COMMIT_SHA Reset the command with or reset to git reset {@} X where the position in the referral representing the merge committance is X1 or 1. You should be prepared for git commit for your basic changes and should not be near here - and here you are a new sin.

Create BAT file to get directory listing up to 2nd level only -

I have a window directory inside it with 300 folders and 4 level folders within each folder. Do I need to list the folder up to 2 levels in a txt file only? I need the full path of each directory I would like to use it on a bat file or CMD line prompt. Former: John completed the tester tester002 test003 tester004 Can someone help me do this? AECO of satelokal set "sourcedir = U : \ Sourcedir "PUSHD" / s for "% sourcedir%" dellimus = "%% a IN ('dir / b / ad 2 ^ & gt; nul') DO ECHO %% ~ FA / F" Dellymes = "% % A IN ('dir / b / ad') DO (PUSHD "%% A" FOR / F "delims =" %% x IN '(dir / b / ad 2 ^ & gt; nul') DO ECHO %% ~ FX popd) Popped GOTO: EOF This should work - you will need to change the settings of sourcedir according to your circumstances.

forms - Fetching HTML input from text and drop down menu in Javascript? -

I want to give users two input mechanisms - using the element, text entry and drop down menu. The input value is taken in javascript. I can work on every method, but not together. This is probably the fundamental question, but can someone else tell me what is the cost for each input for event handlers as well as this input? & lt; Form name = "myform" onsubmit = "return userInput ()" & gt; & Lt; Id = "myVal" onchange = "userInput ()" onsubmit = "return user input ()" & gt; & Lt; Options & gt; Select a country & lt; / Options & gt; & Lt; Option value = "all countries" & gt; All countries & lt; / Options & gt; & Lt; Option value = "Austriaia" & gt; Austria & lt; / Options & gt; & Lt; Option value = "Korea" & gt; Korea & lt; / Options & gt; & Lt; Option value = "Austria" & gt; Austria & lt; / Options

java - Default fetch type for one-to-one, many-to-one and one-to-many in Hibernate -

What type of hibernate is the default in mapping? What did I know after searching: It's curious for one-to-one. Lazy for one-to-many. But after examining it in eclipse, it was eager for everyone. Does it depend on whether I am using JPA or Hibernate? It depends on whether you are using JPA or Hibernate or not. , the default is: OneToMany: LAZY ManyToOne: EAGER ManyToMany: LAZY OneToOne: EAGER and in hibernate, all Lazy

data structures - How to check the symmetry of an integer singly-linked list in C++? -

I have a question about a single-linked list in C ++. An integer array is called [0 .. n] symmetric if array [0] = array [n], array [1] = array [n -1], ... For example: 1 2 3 4 5 4 3 2 1 So, is there a way to check the symmetry of an integer single-linked list? I have thought of copying their value under an array, then check the symmetry this array but I think it is not good because the hidden things in the links list will be lost. The way in the classic fold and press the elements halfway on a stack, then from the stack Pop and compare the remaining elements. bool isPalindrome (forward_list & lt; int & gt; & amp; l) {forward_list & lt; Integer & gt; Pile; Auto = l.begin (); Int len ​​= 0; Int i = 0; While (this! = L.end ()) {++ len; This ++; } If (lane and lieutenant; = 1) are true; This = l.begin (); While (i & lt; (lane / 2)) {stack.push_front (* it); ++ i; This ++; } If ((lane% 2) == 1) ++; While (! Stack.empty ()) {if (stack.front (!)! =

How to set value for a base class from derived class in c# wpf -

पब्लिक क्लास बेसक्लास {निजी इंट मेटल = 0; निजी इंट एमआईडी = 0; सार्वजनिक कुल कुल {मिल {वापसी एमटोटल; } सेट {mTotal = value;}} सार्वजनिक एंट आईडी {get {return mID; } सेट {mID = मान;}}} सार्वजनिक वर्ग Derivedclass: बेसक्लास {निजी Int mX = 0; निजी आईआईएम एमआई = 0; सार्वजनिक int X {get {return mx; } सेट {mX = value; कुल = कुल + एमएक्स; }} सार्वजनिक int Y {get {return my; } सेट {mY = मान; कुल = कुल + एमआई; }}} सार्वजनिक आंशिक कक्षा टेस्ट: पृष्ठ {बेसक्लस बी = नया बेसक्लस (); Derivedclass डी = नया Derivedclass (); सार्वजनिक परीक्षा () {गणना (); } सार्वजनिक शून्य गणना () {के लिए (इंट आई = 1; आई & lt; 5; i ++) {बीआईडी ​​= आई; के लिए (इंट जे = 0; जे एंड एलटी; 5; जे ++) {D.X = j; डी। वाई = जे; } MessageBox.Show ("आईडी" + बीआईडी ​​+ "कुल योग" + बी के अतिरिक्त); बी कुल = 0; }} // आउट होना चाहिए // आईडी 1 कुल राशि 16 / आईडी 2 कुल राशि 16 / आईडी 3 कुल राशि 16 / आईडी 4 कुल राशि 16} यहां I दो वर्गों, बेसक्लास और व्युत्पन्न वर्ग हैं मैं एक्स और वाई संपत्ति की कुल राशि का

r - ROC function in package TTR throws an error: unused argument (na.pad=na.pad) -

The code below has worked so far lately. Library ("quantum") library ("PerformanceAnalytics") library ("ggplot2") library library ("fPortfolio") library ("fAssets") library ("reshape2") library ("corrplot") ") Library (" gridExtra ") Library (" dplyr ") Data_SP & lt; - new.env () ### Download Yahoo Finance SP_tickers & download data from LT; -c ("Spy", "AAGPX", "AUIAX", "BHBFX", "CABDX", "CGRWX", "EHSTX", "HDGYX", "KDCAX", "LEIFX", "NBPBX", "OLVAX" "PGRWX") start.time & lt; -proc.time () getSymbols (SP_tickers, = "1998/12/29", env = from Data_SP) & lt; - eapply (Data_SP, function (s) ROC (ad (s), type = "discrete") proc.time () - starters. The system comes back with the following error: Error in interval (X, N, not Pd =

Large scale business application - Azure cloud database & storage issues -

We are making massive, database oriented business applications. This business application is the majority and we want to provide it as a SOA (software as a service) in AZUR Cloud. The blue SQL database limit is only 150 GB which is not enough for us. There is a huge amount of data in our customers, which is likely to increase every year. Our application database is relational and complex and uses complex questions (group, connects, total work), stored procedures to obtain / save data, so we are reluctant to use the Big Table directly. There is a suggestion to break the database in the database and file groups, but we are not going to do this. There is only one possibility that only the current year's data should be restored in the app and in other partitions / backup databases, but it is not in line with our application because previous data is often used. If we use the blue table, then our complex operation will be carried out in memory, which is not possible due to limited me

php - using glob to delete image files along with corresponding db row -

I am using the following as the 'Delete all' option for users, the user has the thumbnail of every image Together they have images in their account, each image has a similar line in the database. This works, I am worried that during the execution of this script new images can be uploaded with new lines in 'DB'. So say that large amounts of images are now being removed ... all the images have been removed in the loop first ... Now perhaps new images have been added during this ... Now the thumbnails are removed when new thumbnails are removed, where the image was not deleted, the first pass. Finally, the rows in DB are removed ... the same thing ... new entries are removed and now there is an image and thumb which is not yet related entry in DB. Hope this makes sense. Can I make sure that the same data has been removed from all the three functions? // Delete all screenshots before $ ss_files = glob ($ _ server) 'DOCUMENT_ROOT'] '/ .. / user's

Best algorithms, image processing techinques used to compare images -

To find the difference between them, a set of tshirt tags labeled images scanned with a master tag label image There is a need to compare. Color difference The difference in image content The difference in image size Positioning difference < P> Finally everything should be measured and the image matching percentage should be output as a result. Please explain the appropriate algorithms and image processing techniques to make this solution.

php - oci_connect() only works on cli -

I have installed httpd and httpd-devel packages on a server and have installed php and php-devel. I downloaded and installed the original client and SDK for Oracle and then proceeded to use the PECL to install the OCI 8 extension. When I try to run the OCIconnect function page on CII, it works fine. But when I try to load the same PHP page at http, I get the following error: Fatal error: Undefined function in / var / www / html / index.php Call oci_connect () on line 10 I compared both of php ini and note that /etc/php.d/oci8.ini The file is loaded in CLI and the Http version However, the module details are available only on the clear version: oci8 OCI8 support = & gt; Enable OCI8 DTrace support = & gt; Disabled OCI8 version = & gt; 2.0.8 Modification = & gt; $ Id: f04114d4d67cffea4cdc2ed3b7f0229c2caa5016 $ Oracle Run-Time Client Library Version = & gt; 12.1.0.2.0 Oracle Compiled Time Instant Client Version = & gt; 12.1 Director = & gt; Lo

ruby on rails - How to encrypt password only if it is not empty -

Enter the code here I am using MD5 to encrypt my password, though The user does not edit his password. That's why except for password but the password is always updated in my implementation. The code in my account is model. Rb square administrator :: account // < Strong> edit class admin :: accounting controller & lt; ApplicationController before_filter: check_login, only: [: new,: index, edit: show, delete] before_action: set_admin_locale, only: [: new,: index, edit , Show: delete, create, update: layout 'admin_layout' # first_one: set_admin_account, only: [: show,: edit, update: deleted] #GET / admin / accounts #GET / admin / accounts Json def Update_user @admin_account = Admin :: Account.find (params [: id]) response_to do | Format | If @ admin_account.update (admin_account_params) @success = true session [: nationality] = @ admin_account.nationality format.js else @success = false format.js end-to-end personal action to share common setup or barr

scripting - Script to send email notification in Teamcity -

Teamcity builds green and red when I need to send an email to a particular group Any ideas in? There are some teamcity plugins that you can benefit from but the most promising job If you are tracking, you may have to prepare a job when you complete every build for that project, this build will do the following: Call for the final status of the build project. For reference, replace "insert-base-url-here" with your teamic base URL; "BtXXX" from your build id http: // {insert-base-url-here} / app / rest / builds / buildType: (id: btXXX) / statusIcon Save the result of this call in DB or in a txt file For every subsequent call, check to see if the new value is the same as the previous one; If they do not send an email if the values ​​do not match then proceed to the four steps In the recipient / distribution list, inform an email about the change in position in the build position. My personal priority is to do all this in a single Nand script, b

Eclipse CDT (C++ IDE) with Visual Studio 2013 Compiler -

Image
First of all I want to say that I do not know much about Compiler. I want to use Visual Studio's compiler but I do not want to use Visual Studio's IDE. I'd rather use IDB of codeboc or Eclipse C ++ IDE I do not want to use Kodhalax's Minhad GCC compiler (because it runs things that it should not do). So I can use the Codex or the Eclipse IDE with the Visual Studio 2013 C ++ compiler. Yes you can use MS Visual C ++ Toolchain in Excel: < P> and then C / C ++ Build -> Settings

layout - Android: images laid out in grid, and 4-way navigation -

Image
मैं स्केच की तरह कुछ करना चाहूंगा। 9 छवियों का ग्रिड, प्रत्येक छवि का आकार स्क्रीन आकार फिट बैठता है, उपयोगकर्ता ग्रिड ऊपर, नीचे, बाएं, दाएं (स्नैप के साथ) एंड्रॉइड में इस व्यवहार को कैसे प्राप्त किया जा सकता है? भविष्य में वहाँ अधिक छवियां होंगी, इसलिए समाधान को स्मृति का प्रबंधन करना चाहिए ताकि आउटऑफमॉमी प्राप्त न हो ।

asp.net mvc - authentication gets shared in different applications -

I have two MVC-applications I have to debug at the same time with different user logins. Two apps do not share any databases or anything else. The problem is: When I debug both apps at the same time, and then puts a user in app 1 (default asp.net), after that I have a different user login in app 2 When I return to App 1 and refresh the page, the logged in user in app2 is logged in app1. So, this is a bug or how do I fix it? I can do so that I can log in to my two apps in different users As an A? Edit: When I have apps in different browsers (one in Chrome and one in Firefox) As a solution for debugging, you can open projects in different browsers, but if you want to resolve it permanently, then you should know that the subscription How domain login varies. Take a look at this: and another: < / Div>

java - Get device names connected on RS232 port -

We are developing a Java web application and it must be read barcode. We are using a barcode reader named Graphene And it works properly. We are able to read barcodes from Java. We are using the RXTX API (similar to JAVACOMM). But what we want to know is how the device's name is connected to the RS232 port if a user's computer has several devices connected to different RS 232 ports, then we just want to listen on that port , Where the barcode reader is connected. With the next code I can only get port name (COM1, COM3, COM5, ...) enumeration & lt; CommPortIdentifier & gt; PP = CommPortIdentifier.getPortIdentifiers (); While (pp.hasMoreElements ()) {System.out.println (pp.nextElement (). GetName ()); } I would like to get something like "graphon" or "serial port for barcode scanner". Thanks

javascript - Hide spinner if ajax call time below 1 sec -

I want to hide the spinner for all AJAX calls which takes 1 second for the server to respond. My current code is $ (window) .ready (function () {$ ('# main_wrapper'). CSS ({overflow: 'hidden'}) Append ('& lt; Div class = "splash" style = "position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 99 99; background: # 0096d6;" Gt; & lt; div id = "spinner" style = "position: absolute; width: 44px; height: 44px; top: 50%; margin-top: -22px; left: 50%; margin-left : -22px; & gt; & lt; / div & gt; & lt; / div & gt; ') .appendTo (' # main_wrapper '); startpinner ($); $ (' # main_wrapper ') .JexStart ( Function () {$ ('body'). Attach the ss ({overflow: 'hidden'}) (' lieutenant; / div & gt; & Lt; / Div & gt; ') .appendTo (' body '); StartSpinner ("# 145A8C"); $ ("Splash") hidden () delay (1000) .show () .. }). A

ruby on rails - How to easily uncheck all checkboxes with Capybara -

I have a list of checkboxes that have been created using. When it is tested in a feature / integration test, using CAPABAR, and want to make the page "normal" by unchecking them all, then I want to check: inner_foldset ('product') # Reset all checkboxes for a level gamefield. # What to do? Enable check boxes for # products. Manufacturer | Products | This is in a so-called PageObject, so I want some generality: it was in real test, I would have known which fields were examined and unchecked them. But this more general assistant has no such knowledge. I have tried on the lines of ('input [type = checkbox]'). All {| Checkbox | Uncheck (checkbox)} , which should work but gets complicated complexly, does not it? Is something uncheck_all ()? , in Capepara? Does it have a similar pattern to "reset" a form in Capepara in an empty position before it starts in fill_in forms? Try this: all ('input [type = checkbox] ]] '). Do each.

java - Can't open Object Arraylist with fileio function -

I'm trying to use the function to open an array of objects with fileIO, but right now I'm stuck I think there is something wrong with my setter function (file test.txt already exists) The following sections I am using to get the file work to work < / P> Paslijst Public class Paslijst implies Serializable {Private ArrayList & lt; Pas & gt; Paslijst; Public Arrestist & lt; Pas & gt; Set Pastist (Array List and Lt; Pas & gt; Palestist) {this.paslijst = paslijst; Return petitionist; } This function opens a file that throws the Public Pellowship Open (String Fiction) IOException; File IOPAS Is ClassNotFoundException {FileInputStream FileInputStream = new file inputstream (filename); ObjectInputStream Object InputStream = New ObjectInputStream (fileInputStream); Return (Paslijst) objectInputStream.readObject (); } main public static zero major Paslijst paslijst = new Paslijst (); Try {paslijst.setPaslijst (fileiopas.openen ("te

android - how to get a single result from a voice recognizer with out "["and "]" in the start and the end of result -

I am using a voice identifier in my app. But I Speech recognizer not "[" and "]" results should receive voice identifier. Currently I have a code that gives me a result but gets in front of it and in the result "[" and "]". Please check your code to make possible corrections and modifications and apppriate answers I am very new to Android. code: MainActivity.java Import JavakutilkArrayList; Import android App Import android.content.Intent; Importroid.os.Bundle; Import android.speech.RecognizerIntent; Import android.view.View; Import android.widget.Button; Import android.widget.TextView; Public Classroom increases main activity activity {Personal Static FINAL end RECOGNIZER_EXAMPLE = 1001; Private Text Viv TV; @ Override Protected Zero (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); SetContentView (R.layout.activity_main); Tv = (TextView) findViewById (R.id.text_result); // Set Up Button Listener Button Start But

javascript - How to find a Coordinate of a point on Image after zoom -

I have an image that zooms on the mouse wheel. I want to put another image on that image and I want it once when I zoom the first image, then my second image goes to the same point of the image on which it is lying first. In short, I want to know the coordination of the point of the image on the zoom.

VS 2013 cannot create new asp.net web application project -

Then I'm trying to create a new asp.net web application in Visual Studio 2013. I select the empty project template (right). Then I get an error message "Unspecified error (exception HRESULT: 0x80004005 (E_FAIL)). My Searching for nearby nets helps, but there is no happiness yet. I have seen many people saying this as saying "Tools> Options> Source Control" to ensure the environment "Get everything when the solution or The project is opened "un By default, all of these boxes are built in. Source Control Environment seats do not have anything near the Team Foundation, make sure what to do?

objective c - How do I find out in iOS if an XML file from URL is unencrypted? -

I was thinking of a class on NSXMLParser with a class method (BOOL) UnncryptedXML: and the implementation of a NSXMLPerser's local Example using your initWithContentsOfURL: This assumption, if it does not start, then he can not read XML, so it is not encrypted. Will you find such a fair implementation? Is it reliable in terms of my question? You can do 2 things. Write an xml file to & lt ;? Xml which will not parse an encrypted XML file, try parsing it and if it is not created properly then the parser will fail < / Li> If 1 & amp; nbsp; 2 is unsuccessful if the file is invalid: encrypted / broken if only 1 is unsuccessful, < / P> You can encrypt /

linux - Store values from arrays in config-file to variables -

I have found the following problem: I found a config-file with many arrays (written in Bash), these arrays From config to config, there are three values ​​in each array Now, this config file is taken in the main Bash script. I want to go to the array from the array and store the values ​​in a single variable. My actual solution: If desired for [= "$ i" = 0] then <= (i = 0; i = 2; i ++)) then desired = 1 = "$ {array0 [" $ i "for If desired ["$ i" = 2] then = "$ {array0 [" $ i "=" $ {"$ i" = 1] then the desired value = "$ {array0} ["$ I"]}]} "Previously I think it will work for a specific array. But I would like to analyze each array in this kind of config file How can I tell the script for you? Thanks for any help! In the ranks, the ARM can be found through the set . It removes the names of those arrays in which there are three elements: set | Sed -n 's / ^ \ ([_A_Za-z] [_A-Z

excel - Delete blank rows using Macro, after Row x -

I found this macro on another post: sub-del.bank rows () column ("A: A"). Choose. Specialcells (xlCellTypeBlanks). Select the selection. Enterro.downloaded This can be modified so that it removes only rows after the line row (I'm currently working on line 14 spreadsheets)? Thank you! This is quite straightforward. rows (x & amp; ":" & amp; y) Interval Delete Just swap the x and y for the rows you want. On the one hand, it is best to avoid unnecessary selection of boundaries because it only slows things down. At any time you select a category, with the selection Do something, you can perform that task directly on that range instead. Edit: Re-read the question - so try it: Range ("A14: A" and Sale Special Call (xlCellTypeLastCell) .ro.) Special Kael (XLcil Type Bals) Interstate Delete

angularjs - Angular with bootstrap: set modal window "id" property -

The following (), I'm trying to set the "id" property of my modal window (to set up custom css Properties). In my opinion: & lt; Script type = "text / ng-template" id = "myModalContent.html" & gt; & Lt; Div class = "modal-header" & gt; ... & lt; / Div & gt; & Lt; / Script & gt; In my controller: OpenModal_AddDevice function (size) { var modalInstance = $ modal.open ({templateUrl: 'myModalContent.html', Controller: 'ModalInstanceCtrl', size: size, resolution: {device: function () {return $ scope.selectedDevice;}}}); The result of: & lt; Div class = "modal-dialog" ng-class = "{'modal-sm': size =" SM "," model-LG ": size == 'LG'}" & gt; & Lt; Div class = "modal-content" modal-transclusion = "" & gt; & Lt; / Div & gt; The result I'm trying to get: & lt; Div id = &quo

postgresql - How to handle large PL/pgSQL Functions migration with Flyway? -

We are using flywheels for managing database migration (PostGrace SQL but my question is not vendor specific). So we have a directory per schema, which has a migration file per schema version. It is working well to add structure and small tasks. But now, I am working on a large PL / pgSQL function, for which we need to easily track history and we need to split it in. So many files for clarity These functions need to be placed in a separate file (files) and these files must be included in the fly patch file, when we need to update it. I did not find any way to do this, with the flyway, is it possible to do this? Or is there another way to deal with this matter?

java - Issue with creating a shape with inputs for a row, column and a character to fill the shape -

I am accepting an integer value for rows and columns, then a string value for the character. If the user enters the character of 5 for the value of 5 for the row and 2 for the column for the user's line: @@ @@ @@ @@ @@ The code so far is below, where the comment is, the place where I can input Loop is not working to make the loop work to create a shape with the input that is entered for the desired rows and columns using the loop. import java.util. *; Public class makeup {public static zero main (string [] args) {scanner = new scanner (System.in); String errors = "Please enter amount in category 1 and 25", result = ""; System.out.print ("Enter the number of rows:"); Int r = integrator.parcent (in nxtine ()); If (R & lt; 1 || R & gt; 25) system.out.printeline (error message); Else {System.out.print ("Enter the number of columns:"); Int c = integer.center (in.nextline ()); If (c & lt; 1 || c> 25) system.out.pri

Splunk query language for R -

I use heavy SPLUNK and SPLUK Rest API most of the time it works fine. It is easy to use SPUNK query language for non-developer also to test software strength, I use R in front of SPLUNK to develop an advanced analysis package. I want to mix both. Is there any R package or R software that accepts and processes the SPLUNK query? If not, then does anyone need this functionality? Yes! It is called It's really easy to use. | R "output = data.frame (name = c ('a', 'b', 'c'), value = c (1,2,3))" . Or simply the name of an R script file that has been uploaded to the app: | R myscript.r comes in the form of input input and you want to bring them back to your results in the output Download the app The path to your r bone is $ SPLUNK_HOME / etc / apps / r / default / r.conf Add to r = / usr / bin / r R pipe in your search command like this: | Here is a slightly more complex example: "exp" (mean (log (data

apache - Redirect subdomain with www. Code without www is working (Wildcard) -

Now I have the rule in the .htaccess redirect ( is on wildcard ) several subdomains of other domains For example: subdomain123.domain.com -> other- domain.co.uk/subdomain123 but do not work with redirect www . For example: www. Subdomain123.domain.com -> Other- domain.co.uk/subdomain123 - ** 404 Error - Please help with www. rewrite angle% {http_host}. RewriteCond% {http_host}! ^ Domain.com [NC] rewrite code% {http_host} ^ ([^.] +) \. Domain. [NC] rewritable ^ (. *) Http://other-domain.co UK /% 1 [R = 301, L, QSA] Alternatively matches a "www": rewrite% {http_host}. RewriteCond% {http_host}! ^ Domain.com [NC] RewriteCand% {http_host} ^ (www \.)? ([^.] +) \. Domain.com [NC] rewritable ^ (. *) Http: // other-domain.co.uk/%2 [R = 301, L, QSA]

android - Call new request only if response of previous request returns from server -

I need to get a status from the server every 5 seconds. I am using it asyncTask. Use the request for every 5 seconds myListTimer = new timer (); MyListTimer.schedule {@Override Public Zero Run (run) {runOnUiThread (New Runnabal) {@Override Public Zero Run () {updateMyList ();}}}}}}, 0, 5000); Update hereMyList method calls AsyncTask and it works fine. But sometimes due to the network issue I could not find any response within 5 seconds, and the timer again requests a new response. So what I want, it will only request if the last return of the server will be returned if the previous request is not answered then it will not request a new response. boolean received reception = false; MyListTimer = New Timer (); MyListTimer.schedule {@Override Public Zero Run (run) {runOnUiThread (New Runnabal) {@Override Public Zero Run) (If (Received Reports) {updateMyList ();}}})}} } 0, 5000); Set the receipt receipted to correct the set code, when the response is received, it is

java - Encoding of same special characters -

I use JasperReports for export PDFs. I have a problem with special characters (è, à, û) While there is no problem with me (é, €) when I generate my file with Jaspersoft Studio There is no problem (all special features are ok). The problem occurs when I export the PDF from my application (and only those characters do not work perfectly (è, à, û) and not (é, €) here is my code : try {jasperprint = JasperFillManager.fillReport (jasperReport, parametres, connection);} hold (JRException e) {throw e;} finally {connection.close ();} Jasper print back ;} Public byte [] ExporterMoisPDF (String Searaut, Long Anne, Look Mice, String Latex_Decurement, String Date_Decleration, String Moise_ Late, string namefisher Jasper) throws exceptions [Byte [] Rappport PDF = empty; Jasperprint jasperPrint = genererExportMoisJasper (siret, annee, mois, num_declarant, date_declaration, mois_lettre, nafichier jasper); Jasper print .SetLocalcode ("UTF-8") ; Rappport PDF = JasperXportManager.

xslt - Insert javascript in XSL -

I am trying to insert a JavaScript variable in my XLS page (called by XML) page name Show / write for I want to use the name of the page as a variable. This is what I am using:

javascript - Getting an error even when checkbox is checked -

From all instances, I have found that is used (': check') to The correct checkbox is checked, and if it is not wrong in my case, it lies on both situations, what is my fault? {xtype: 'checkbox', box label: 'show message', id: 'main box', handler: function () {alert ($ (this) .is (': check That ')); According to} , I will try: {xtype: 'checkbox', box label: 'show message', id: 'main box', handler: function (field, value) {warning (value); }}

c# - SuperWebSocket server can receive only one message -

I follow SuperWebSocket discussions to create a small web socket server with echo functionality, however, my server only receives a message Can receive and send it back, when I try to send it to another message, the connection closes. I use to test my server. This is my code (I use WPF without MVVM here): Public partial class MainWindow: window {Private WebSocketServer ws; Public Manvindo () {Initialization (); } Private Zero ConnectButton_Click (Object Sender, RoutedEventArgs e) {var r = new RootConfig (); Var s = new serverConfig (); S.Name = "Supervisse"; S.IP = "any"; S.Port = 8089; S.Mode = SocketMode.Tcp; Var f = new SocketServerFactory (); If (ws! = Null) {ws.Stop (); Ws = null; } Ws = new WebSocketServer (); Ws.Setup (r, s, f); Ws.NewMessageReceived + = ws_NewMessage received; Ws.Start (); } Private Zero ws_NewMessageReceived (WebSocket session session, string e) {session.Send ("Message:" + E); }} I can send messages to the server witho

Setting different XML blocks based on Magento storefront ID -

I am currently trying to install a multi store version of Magento, which will be local in different countries. I am trying to specify different XML blocks on which the store front is in use. For example, on British version, show British images, French one, French images show. I have the following in a local.xml file, but this does not seem to change the item, although the tags are working, for example if I delete a header tag then that Remove the header block from the storefront. & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Layout version = "0.1.0" & gt; & Lt; Default & gt; & Lt; / Default & gt; & Lt; Cms_index_index & gt; & Lt; Reference Name = "Basic" & gt; & Lt; Block type = "banner / banner" name = "banner_home_main" template = "unibanner / banner-file.phtml" & gt; & Lt; Action Method = "SetData" & gt; & Lt;

Constructing an SQL Query in DB2 for SQLJ -

I have a table called Live: Make table live (animal varchar (10 ) No faucet, Insert tap of the year, Zoo (10), Primary key (animal, year)); with the given data: Anem year year ---------- ---------- - ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Judy 2004 b Rabbi 2003 de Alfred 2006 a The animal was in the year, and the year of the zoo was in that year. I need a query that gets the pair of all the animals (A, B) which have always been in the same zoo all year round, and such as B (e.g., A and Lieutenant B ) Is grammatically smaller. More precise, such pairs (A, B) satisfy the following condition: If there is a life of livestock in the zoo during the year, then it remains in the zoo during the same year, and on the contr

c# - Hidden async function -

I am trying to create a library that only has a public function, which gives an NAM. Personal functions, based on my needs, these powers should be asynchronous due to the Android platform. What I want to do, only the public function is used as a non-async function. I know that this can be counter-intuitive, but I have my reasons as far as the function's user is concerned, they had to first run the code as synchronous, and this requirement does not change anymore. That is, it is wrapped in a more efficient library. I do not want them to wait for the law. Even though I am so far away, but I am struggling with public method: public enum DialogResult {Button1 = 1, Button2 = 2, Button3 = 3,} Class MsgBox {Public DialogResult Show (String Title, String Caption, Context Reference) {} Private Async Tasks & lt; DialogResult & gt; ShowAsync (String title, String caption, context reference) BuildAsync for return (title, caption, reference); } Private Tasks & lt; Dialog Re

java - Log4j seems not to work in Spring Boot -

Image
I add one of my existing spring and Maven Attempted project, and I think there is no matter how I configure, logging is going out of my control. I tried entering log4j.properties to src / main / java and src / main / resources (actually I'm not sure where to give it) But when I use Log4j to log in, the log is displayed only in the console, log4j.rootlogger = DEBUG, A1 log4j.appender.a1 = org .apache.log4j FileAppender log4j.appender.A1.encoding = utf-8 log4j.appender.a1.file = e: \ programming log \ debug.log log4j.appender.a1.Threshold = DEBUG log4j.appender.A1.Append = true log4j.appender . A1.layout = org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern =% -d {yyyy-MM-dd HH: mm: SS} [% t:% r] - [% p]% m % N I'm not sure whether I'm missing something or overrides spring some settings, because I Maven and Spring . PS: Before adding the dependence of pom .xml before log4j , though I Org.apache.log4j.Logger Thi

node.js - Why Mongoose saves references of child ids in parent model? -

I am trying to log into MongoDB and Node.js and found that the most recommended module for using is Mongoose I liked the idea of ​​making a schema like my SQL and it is very easy to use. One thing I did not understand is about references. date, default: date.nuh}, customer: {Type: string, required: true}, event: [{type: schema type. Object, ref: 'event', required: true}]}); Var EventSchema = New schema ({Created: {Type: Date, Default: Date.nuh}, Session: {Type: schema. Object ID, Ref: 'Session', ChildPath: 'Events', Required: True} , Data: schema type. Mixed}); Now the question is - why do I need to reference Event ID from within the session? Why not just ask events.Model.Fund ({session: session._id})? I am afraid that this will create large session documents because there can be hundreds of events in one session. What am I missing here? Depends well, generally the common path is to create those types of references To populate your query with

optimization - mySql optimize a query -

I'm looking to get the last 10 places from my database for each driver (authentication_ID). But two different questions have to be written, which use the results area of ​​the past. How can I write it as a single question? Certification_ID related to GPS where the GPS_track is from (location_timestamp) = DATE (now () ()) loop resultset for every $ authID ... Select Latitude, WHERE authentication_id = ". $ AuthID." You can enter a query inside a query. It is called '' example select latitude, from GPS_track to WHERE authentication_id (selection difference) Authentication_ID from GPS_track) where date (location_timemstamp) = DATE (now ())) location_stimestamp DESC limit 10 "; Performance optimization Apart from this, your question was also indicated about performance (optimization). If this is a problem, you can put indexes on the columns you try to filter (the columns used in the WHERE statement). There are several ways to optimize you

sql server - SqlServer stored procedure called from php doesn't return integer output correctly -

I'm trying to get a SQL Server 2008 database using php mssql functions out of a stored procedure. Code errors run iwthout, but I'm getting back to a strange vlaue one of my production standards stored procedure code: .. create procedure [dbo] [check_barcode_and_return] @Barcode nvarchar (20), @IsInDatabase integer output, selected as @Product_Info nvarchar (100) output @IsInDatabase = COUNT (*) dbo. product_info WHERE barcode = @Barcode declared select brand @Brand varchar (45) set to announce @Brand = @Description varchar (dbo.product_info WHERE barcode = @Barcode) (50) set @Description = (product_desc dbo.product_info Choose where barcode = @Barcode) select @Product_Info = @Brand + '_' + @Description returns GO the php code that says: & lt; Php // is used in one barcode to access the database $ barcode_yes = '11335577'; // $ barcode_no = '0011223344' use a sbarcode not in the database; $ Host = '00 .000.000.000 '; $ Db = '

java - How to read from textfile and display specific words(numbers) from that txtfile based on diffrent groups -

How to read from a text file and display specific words (numbers) from that text file based on different groups? I have a txt file that contains: [computer] keyboard = 3 mouse = 5 [animals] cow = 10 pig = 5 < / Pre> The numbers will always change with the second program. I want to create a form that can display like this: Cars: 3 keyboards / N 5 mouse animals 10 cow 5 pigs I do not know how to do this, I know how to be read from the file but next ... It is that my frame will see the package for the monocon; Import java.awt.BorderLayout; Import java.awt.EventQueue; Import javax.swing.JFrame; Import javax.swing.JPanel; Import javax.swing.border.EmptyBorder; Import javax.swing.JButton; Import javax.swing.JTextArea; Import javax.swing.JTextField; Public class frametast extends to JFrame {Personal JPanel contentPane; / ** * Launch Application * / Public Static Zero Main (String [] Elgus) {EventQueue.invokeLater (New Runnabal) (Runed by Public Zero) ({FrameTest

Python list splite -

इस सवाल का पहले से ही एक उत्तर है: < / P> 52 जवाब मैं अजगर में एक सूची को विभाजित करने की कोशिश करता हूं, और मुझे उसे समान आकार में विभाजित करने की आवश्यकता है - उदाहरण के लिए मेरी सूची है: / P> [(1,1,2), (2,3,3), (2,1,2), (2,2,3), (1,2, 2), (2,3,2)] और इसे [[(1,1,2) के रूप में विभाजित किया जाना चाहिए, (2,3,3 )], [(2,1,2), (2,2,3)], [(1,2,2), (2,3,2)]] मैं सोच रहा था कि किसी के पास किसी भी लम्बाई की सूचियों के लिए इसका अच्छा समाधान है, धन्यवाद! मेरा कोड है: श्रेणी में मीटर (0, लेन ( FIRST_ROW), 640): जिस तरह से इसे अन्य प्रश्नों के रूप में डुप्लिकेट नहीं किया गया है, उस सूची में (1, 1, 2) के अंदर निहित है और मैं बहुत उलझन में महसूस करता हूं कि क्यों मेरा कोड काम नहीं करता।

postgresql - Postgres: how to print values in the loop -

I want to print all the tables found from the query, however my code only shows the name of the function. to remove or replace a # function_assine () # $ $ # DECLARE # Records as line record zero; # Table # schema = 'public' and 'table_name ~' measurement [0- 9] '# loop #right notice' **%, quote_ident (row.table_name) in # line # info_schema.tables for tables_name; # End loop; # End; # $ $ LANGUAGE plpgsql; Choose Create # select_scene () function; Remove_scene -------------- (1 line) # The reason for this is that you are not seeing anything that your function does not return anything. The text which is "written" will be displayed in the customer using the Raise Notice if a) supports the client (which does psql) and b) if your session actually returns them You have to use the psql to be configured for you: set client_min_messages = notification; Your current setting is probably alert and no notice is displayed for it. Howev

passing comma separated string value to a wcf rest service -

Having the following problem with wcf rest service I try to access this endpoint from a browser I am doing, https: // localhost: 443 / service1 SVC / Jason / GetCourtData / ABC America, ABC UK / MQA / ABC America, ABC UK is a string argument different from a comma The problem occurs when I tried it on my local, it is absolutely free. The works, but when I tried it on a remote host browser only shows that the page can not be displayed. I'm not sure there is some setting on IIS. I am hosting the service on IIS. This is a response from remote IIS failed https: // remoteserver: 443 / Service1.svc / json / GetCustomerData / ABC America, ABC UK / MQA / The error that is written in the log is the maximum number of objects, which can be serialized or discreased in the object graph, change the '65536' object graph or MaxItemsInObjectGraph Increase quota. I think it is confusing, besides, I myself am using a signed certificate pass (because the values ​​

Comma-Delimited List with "and" concatenated before Last Element in Oracle SQL -

I am using LISTAGG to create a comma-delimited list for a report, but I have "and" the last element First of all, there is just my output for 3 different cases: First, second, third first, second first but now the desired output is : I had thought of doing a case when he examines the count and if If 2 is, then 'and' as the delimiter, but how can I go about doing this for more than 2 elements? Thanks You can try regexp_replace: < Select pre-> duplex to regexp_replace ('first, second, third', ', ([^,] +) $', 'and' 1 '); , ([^,] +) until the end of the last comma + string and anything else searches for a comma and changes it with "and" First expression (For example, if your comma does not include a comma then this should work) Full example: select regexp_replace ( Select the name 'first' from the double association between listagg (name, ',') group (sequence by name), ', ([^,

Android Youtube SDK - Know when first frame is loaded -

I want to show a loading screen while launching the YouTube player, but hide this screen when the first frame of the video Loaded and shown to the user. The reason for this is that if I remove the screen on initialization, then there are few seconds that the player is black. After that the player loads the first frame or video image poster, and shows the play button. If possible, I can trace the scenario. Thank you. is a YouTubePlayer. PlayStorage Change Listener Interface You Can Listen for This Purpose player.setPlayerStateChangeListener (New YouTubePlayer.PlayerStateChangeListener) {@Override Video Starred on Public Zero () {} Loading on the Public Zero at Public Zero () {} @ Override Public Loading on Zero () {} Loaded (string entry) {} @} override public wide on error (error zone RGR) {} @ override at public space vacant () {}}; Onloaded tells that the video has finally been loaded, so this is the moment where the play button and video posters appear on the screen

regex - QRegularExpression - How to extract string from between two <ca> tags? -

I am trying to get the text in many tags as the following: < Strong> Text file: Internal auto-configured settings file ________________________________________ ((do not attempt to manually edit it)) ________________________________________ # Saved certificate: & lt; Ca & gt; Text that I want to remove & lt; / Ca & gt; ... & lt; Cert> Another lesson I want to remove & lt; / Cert & gt; ... In my code I open the previous file and read its contents & amp; Store it in a QString So far, I have done the following without any success: QRegularExpression regex ("& lt; ca & gt; (. *) & Lt; / ca & gt; ", QRegularExpression :: MultilineOption); QRegularExpressionMatch match = regex.match (content); QString ca = match.captured (1); QDebug () & lt; & Lt; CA; QDebug () & lt; & Lt; "\ N \ nDone !!"; & lt; & Lt; & lt; Cert> I did the same for , but I got an empty string for

MongoDB Text Search -

I think we limited the number of items scanned in mongodb text search using the method outlined in this document Can: Let me write briefly. I have a collection of inventory documents: {_id: 1, dept: "tech", Description: "Lime green computer"} {_id: 2, dept: "tech", Details : "Red Piere"} {_id: 5, dept: "Wireless Red Mouse"} {_id: 3, dept: "Kitchen", Description: "green place"} {_id: 4, dept: "Kitchen", Description: Then I have created an index: I can write this question and it works: db.inventory.ensureIndex ({dept: 1, description: "text"}) db.inventory.find ({Department : "Kitchen", $ text: {$ search: "green"}}) Now, if I see this view I use the triangle, then I search in a specific department. My problem is, I want this feature, but I also want freedom of searching in all departments. But this query does not work: db.inventory.find ({$ text: {$ sea

javascript - How do I handle interaction between the DOM and the Controller? -

I read (and tried to test) the angular application, I see it is a bad practice for a controller. Look at the DOM (for example). I should be missing something big, because if the controller can not access DOM (like "regular" JavaScript calls like document.getElementsByClassName ), then I do not understand How to do a lot of things on which I think very basic. Here's a simple and straightforward example, which has some problems that my app does: I have an instruction that is just a red box (some styles , A division is applied), and uses ng-transcture, so I can call it my html file like & lt; Red-box & gt; Text that goes into the red box & lt; / Red-box & gt; A button, when clicked, changes the color of all the red boxes in blue. Something like this will happen in my HTML file: & lt; Intput type = "button" value = "make them blue" ng-click = "makeThemBlue" /> In the makeThemBlue function of the controll

c# - Calling a cmdlet via a value -

My psm1 file contains a variable that is a KVP hash $ subcmdlist = @ { "Adhost" = "Ad-Host"; "Delete" = "remove-host"; "Set parameter" = "set parameter"; } This psm1 file also has a function called 'new task' which accepts the $ subcommand argument. I wonder how the cmdlet add-host the new task adhost has been released from the shell. I tried to resonate it, but he did not do that very good value is printed. Thank you! & amp; ; Sign (aka call operator), like this: & amp; "Nights-host" . It works at least in Powershell 3.0

mule - Single global JMS Connector across flows or using multiple JMS configurations -

I am a mule a newbie and one of the best practice questions is: There are many sisters in my searched app That many active listeners are listening on the queue, which are following the systems and jobs states that are being processed. I have installed a single JMS connector configuration, which is being shared by all the flows, in the form of an inbound endpoint and as an outbound endpoint Is this the right setup or do I need to use several JMS connectors? Any help would be appreciated. A JMS connector can be shared in Mual Flow as you specify. Different connectors are used when you need different settings for different flows.

Moving Shape via Mouse in Opengl -

रिक्त आयत (शून्य) {glClear (GL_COLOR_BUFFER_BIT); glBegin (GL_QUADS); glColor3f (1.0,0.0,0.0); glVertex2f (m_x-0.25, m_y-0.25); glColor3f (1.0,0.0,0.0); glVertex2f (m_x-0.25, m_y-0.75); glColor3f (1.0,0.0,0.0); glVertex2f (m_x-0.75, m_y-0.75); glColor3f (1.0,0.0,0.0); glVertex2f (m_x-0.75, m_y-0.25); glEnd (); glutSwapBuffers (); मैं आयताकार को दबाए हुए माउस पर ले जाना चाहता हूं। M_x और m_y ग्लोबल वेरिएबल हैं। इस फ़ंक्शन ने मुख्य ग्लुत डिस्प्लेफंक (आयत) में कहा है, माउस फ़ंक्शन इस तरह से: शून्य माउस (इंट बटन, इंट स्टेट, इंट एक्स, इंट y) स्विच बटन) {case GLUT_LEFT_BUTTON: if (state == GLUT_DOWN) {m_x = x; m_y = y; आयत (); glutSwapBuffers (); } टूटना; डिफ़ॉल्ट: ब्रेक; } जब अनुप्रयोग चलाता है, तो यह एक आयताकार खींचता है जब मैंने माउस को चूहे के आयत को खो दिया। मेरा क्या गलत है? अपने माउस हैंडलर में सामान को उस तरह से प्रस्तुत न करें, बस ऑब्जेक्ट स्थिति को अपडेट करें और glutPostRedisplay () : #include & lt; GL / glut.h & gt; फ्लोट objX = 100; फ्लोट objY =