Posts

Showing posts from August, 2014

pydev - auto-generation of python file info(author, create date etc.) -

I am using Pyyx in EQUIPE when there is a new .p file, then generated information like below (author, Date etc.): "" "Created on October 10, 13:50:18 2014 @ Author: XXXX" "" How to Format Can change? Window-preferences- PyDev-Editor-Templates- Change your blank template

php - SUM of grouped COUNT which only calaculate max value and display count of max -

मेरे पास 6 फ़ील्ड के साथ एक टेबल है: पार्टीनाम राज्य निर्वाचन क्षेत्र candidatename जिला वोट भाजपा महाराष्ट्र नागपुर-पूर्व नितिन गडकरी नागपुर 1200 एएपी महाराष्ट्र नागपुर-पूर्व अरविंद केजरीवाल नागपुर 750 भाजपा महाराष्ट्र नागपुर-पश्चिमी विकी नागपुर 4800 एएपी महाराष्ट्र नागपुर-पश्चिम लकी नागपुर 3500 भाजपा महाराष्ट्र नागपुर-उत्तर राकेश नागपुर 100 एएपी महाराष्ट्र नागपुर-उत्तर रावण नागपुर 1500 मैं समूह पार्टीनाम, 'गिनती' के साथ निर्वाचन क्षेत्र और एक पंक्ति 'एसएम' चाहता हूं, लेकिन यह प्रत्येक निर्वाचन क्षेत्र से केवल अधिकतम मान की गणना करता है और फिर गणना और पंक्ति राशि। नीचे तालिका के लिए मेरा अपेक्षित आउटपुट पार्टी का नाम गणना करें 2 एएपी 1 bcoz बीजेपी नगपुर-पूर्व और नागपुर पश्चिम की ओर जाता है। इसलिए यह गिनती 2 प्रदर्शित करता है और नागपुर से उत्तर की ओर जाता है - उत्तर तो यह केवल 1 गिनती दिखाता है। > प्लज़ मुझे प्रश्न पूछते हैं ...... & lt;? Php $ state = $ r owdst [ 'राज्य']; $ Sqlst = "चुनें MAX (वोट) एएस वोट, निर्वाचन क...

asp.net - Object oriented design pattern for create more objects in a class(c#) -

I am new to OOP, I had a data storage class which needs to store temporary data, which requires application for calculation in the future, to allot different values ​​in this class and to return more than one return class Items need, according to my knowledge there is OOP pattern, which I can use for this kind of problem which increases the applicability again if I Please be experts in this field to find the best patterns to help my problem. Thank you! A possible solution is to use this. You can apply participants like this example: Defines the interface for component (librarian) objects that can dynamically add responsibilities to them. . Concrete blanket (book, video) defines an object with which additional responsibilities can be attached. The decorator refers to a component object and defines the interface that corresponds to the component's interface. The ConcertDecorator (Lending) connects the responsibilities to the component.

html - How do I grey out and show a loading GIF in the centre of a table -

I have a whole & lt; Table & gt; How does a loading image show in between? I have run some AJAX calls and are not able to enter the table and Ajax references are overlayed with a gray background with a loading GIF in the center when loading. This should work! Here, I betrayed with AJAX, it's not difficult. I have copied an AJAX call with my timeout function. By keeping in mind the other things, you can make that parent div a height Or width because my table is very low because it looks nonsensical from outside. Status: Relative is required because it allows the .page-loader to fill that space. You can clearly play with it. HTML: & lt; Div style = "position: relative" & gt; & Lt; Div class = "page-loader" & gt; & Lt; Img src = "/ content / loader.gif" style = "status: full; margin: auto; top: 0; left: 0; right: 0; bottom: 0;" Width = "100" alt = "Loading" & gt...

android - Place Button below ListView to fill all available space but Button should have min Height -

Image
How to move the button below the ListView to follow the next conditions: ListView The list available below is ListView content is too large if the bottom button should be scrolled down to ListV and ListView I believe it's impossible to do such a layout using XML layout Is obtained. You can try it dynamically. Create a test application with themes just like a proof-concept: & lt; Style name = "Aaptim" Original = "Android: Theme.Holo.Light.Actionbar. Fullscreen" & gt; Create Activity Layout activity_main.xml like this: Android: Android: Android: Android: Android: layout_width = "match_perrent" Android: layout_heck = "match_perrent" Android: layout_language parentbottom = "true" Android: text = "button" /> & Lt; / RelativeLayout & gt; And in this activity it works: the expansion of the public class MainActivity Activity (Private Button mButton; Private List View mList...

php - testing database results to set a checkbox as checked -

If a data appears in my database, then I have a checked attribute output on my checkbox Want to do / P> I tried to do in_array () , but it did not work due to values ​​(see database) I do not know how I will output them Well PHP Code: $ general_list = ""; ($ Line ['f_general'] == 'bar,') {$ general_list. = "& Lt; label class = \" bg-danger \ "& gt; & lt; input type = \" radio \ "name = \" normal [] \ "value = \" bar, \ "checked = \" Checked \ "/> bar & lt; / label & gt;"; } And {$ general_list. = "& Lt; labeled & gt; input type = \" radio \ "name = \" normal [] \ "value = \" bar, \ "/> bar, & lt; / label & gt; ; " ; } If ($ line ['f_general'] == 'restaurant,') {$ general_list = "& Lt; labeled> input type = \" radio \ "name = \" normal [] \ "value = \"...

javascript - jQuery-Mobile pagecontainerbeforechange does not fire -

I'm working on a single-page-application from jQuery-Mobile to pagecontainerbeforechange event Because I need to see if the class in my site-wrapper is " show-nav ". For this class in the site-wrapper, the site-menu is opened and the content moves 350px to the left. So if the user now clicks on the register, and before opening the site-menu, my register page is transferred and there is no possibility of getting it back because there is no site menu on the register page. First of all I tried to use the pagecontainerload event until I saw it disliked it. Then I changed it to page container loadbrush conversion event, but I can not work it. I want to check this page " .show-nav class" is id # registration Then, the user is on the main site, he Clicks "Register" and should replace " .show-nav " before the page. The function has already been set to remove the square, but I do not know how to call it correctly. function toggl...

cordova - Android 4.2.2 does not load google maps for my application -

Image
I'm developing an Android application (build with PhoneGap) for which the user's current location is displayed and the KMZ file Loading is required on Google Maps (with poly lines) (use Google Map API). My application loads the map at specific zoom level (11) and focuses the map on the basis of the user's current location (reducing data consumption). . I have noticed that the map for Android OS 4.2.2 has not been loaded at all, the message "Displaying its current status denied" message has been displayed. On the other side, the map OS is properly loaded for OS 4.1.2, 4.3, 4.4 (no messages received). Is this a security problem / bug for Android 4.2.2? Or is it a bug related to Phonebap that I use to create an APK? How can I resolve this issue? Do I have any configuration in mobile? Thanks It works fine on Android 4.2.2 or any other supported version It may be a mistake in your code setting. (1) In the HTML header section Step Include Google ...

sql - Get an extra row with a join -

मान लें कि मेरे पास निम्न तालियां हैं CHAPTERS | आईडी | शीर्षक | --------------------- | 1 | परिचय | LINES | आईडी | अध्याय | लाइन | -------------------------------------- | 2 | 1 | चौदह और ... | | 5 | 1 | शुरुआत में ... | मेरे एसक्यूएल परिणाम में मैं क्या देख रहा हूं | शीर्षक | लाइन | ----------------------------- | परिचय | रिक्त | | परिचय | फोरस्कोर | | परिचय | में भीख मांगना | इसलिए मूल रूप से मैं केवल एक शीर्षक और अन्य पंक्तियों के साथ एक तेज़ी पंक्ति चाहता हूँ मुझे अब जो कुछ मिल गया है, सिर्फ खिताब के बिना लाइन के साथ लाइनों के साथ सिर्फ 2 पंक्तियाँ हैं। कोई विचार? इसे आज़माएं शीर्षक का चयन करें, अध्यायों से लाइन के रूप में निरर्थक संघ चुनें शीर्षक, अध्यायों से लाइन a.id = B.chapter

java - How to run testng test cases in UNIX/LINUX environment -

I'm new to automation testing and Testng framework. I am developing my test cases in Java and in the Windows environment. I want to run these developed test cases in the Unix / Linux environment. Anyone can help me step by step in this process. Thanks a lot @Peter LowryI have me pom.xml below that I have Unix {& lt; Project xmlns = "http://maven.apache.org/POM/4.0.0" xmlns: xsi = "http://www.w3.org/2001/ XMLSchema-Example" xsi: schemaLocation = "http: // Maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> & Lt; ModelVersion & gt; 4.0.0 & lt; / ModelVersion & gt; & Lt; Group & gt; ProjTestAutomation & lt; / Group & gt; & Lt; ArtifactId & gt; ProjTestAutomation2 & lt; / ArtifactId> & Lt; Version & gt; 0.0.1-snapshot and lt; / Edition & gt; & Lt; Name & gt; ProjTestAutomation & lt; / Name & gt; & Lt; Description & gt; ProjTestAutomation ...

Why do Python regex spans extend one place past the actual match? -

Looking at the spaces returned from my Regex matches, I saw that they always make a comeback behind the actual match; In the example such as & gt; & Gt; & Gt; Print (P. Match ('::: Message')) None & gt; & Gt; & Gt; M = p.search ('::: Message'); Print (m) & lt; 0x to _sre.SRE_Match object ... & gt; & Gt; & Gt; & Gt; M.group () 'Message' & gt; & Gt; & Gt; In the example (4, 11) vs. physical location (4, 10) . Due to the limitations of its left hand and right hand, the reason for my problem is different and I have to compare the span's relative positions. Is there a good reason for this, or can I extend my preference to one by reducing the right limit? Because in Python, slicing and range, the end value is never always unique, and '::: message' [4:11] indicates the actual matching text: & gt; & Gt; & Gt; '::: Message' [4:11] 'Message' In this w...

How to specify the context for an EJB in JBOSS -

I've got some legacy code that runs in jeans which looks like this: @Stateless @Remote (MyClass.class) @RemoteBinding (jndiBinding = "app / service") public class myServiceBean {// some methods} When I see Bean in JNDI I look for the use of a string: ear-name / service / remote I'm fine with the last two parts of the name , But I do not have context with "ear-file" As I am being used as Maven, I will create the version number in the ear-file (which I want to traceability), but this means That whenever I release I will have to change all references to the service Text "itemprop =" text "> You can set your ear name in application.xml like this: & lt; Application-name & gt; Ear-name & lt; / Application-name & gt; Then you can have ear-namexxx.ear but your lookup will be done in the ear-name You can also do this for ejac modules: & lt; Ejb-jar & gt; & Lt; Module-name & ...

c# Parallel Processing throws NullReference Exception in task resource -

I try to parallel the processing of my data. That's why I start a processor object for each parallel function with the local parallel parameter, it works fine for every task to run first, but on the second iteration, I always get a NullReferenceException. The document is called parallel to the local Init parameter. ForEach: localInit: // function delegation which / gives the initial state of local data for each job So, what do I do? Processor Getmap Processor () {Processor Processor = New Processor (); // some initial return processor; } Zero similarities () {IEnumerable & lt; MyClass & gt; MyData = ...; Parallel.ForEach (myData, new parallelOptions {MaxDegreeOfParallelism = 8}, GetMyProcessor, (data, state, processor) => processor.dozing (); // I tried to do this and it works fine for me Can run it and tell me if you're still getting an exception? Fixed zero main (string [] args) {program p = new program (); P.ParallelThings (); } Processor G...

javascript - How can I pass PHP variable to Datepicker in jQuery? -

I am trying to set the default date in datepicker with a variable that I pass through PHP in html. Here is a simplified version of both my control file and the form: Control file: & lt ;? Php function render ($ template, $ value = []) / / Remove the variable in the local charge removal ($ value); // render template is required ("$ template"); } $ Default_date = date ("m / d / y"); $ Default_date = strtotime ($ default_date); $ Default_date = $ default_date + 604800; $ Default_date = Date ("Y, M-1, D", $ default_date); Render ("index_month2_form.php", ['default_date' = & gt; $ default_date]); ? & Gt; And this is the form: Doctype html & gt; & Lt; Html lang = "en" & gt; & Lt; Top & gt; & Lt ;? Php print "$ default_date"; ? & Gt; & Lt; Meta charset = "UTF-8" & gt; & Lt; Title & gt; JQuery UI Datepicker - default functionality & lt; / Tit...

.net - Converting VB6 using RtlMoveMemory to C# -

I am trying to convert an existing VB6 application into C #. The application should use the API which was also written in VB6 and is an ActiveX DLL. I am using .NET Interop functionality to wrap this API so that I can use it in C #. The problem is a bit of code that becomes a byte array, and then uses RtlMoveMemory () to move it with a C # code below in a composition, get. Collection Exception "Value does not fall into the expected category" Exception I have tried different variations of some marshaling along with this implementation, but I am slightly in depth in this field. Everything I tried in, it happened as an exception. Using a RtlMoveMemory () will fix a solution, but using Marshalling will also be a solution better. Hopefully this is just a matter of adding dots. VB6 code: public declare sub below Lib Type "kernel 32.dll" nickname "RTLMovemary" in any form, as long as ByVal bytes) type IntEventStruct IntTventStruct call DWApi.ReadEven...

c - Storage allocation for a function -

जब मैं इस तरह एक फ़ंक्शन परिभाषित करता हूँ: void foo (int a, int b ) {} कब आवंटित भंडारण है? जहां यह भंडारण आवंटित है? यदि आपका प्रश्न कुछ समान है "कंपाइलर के बाद क्या और कहाँ है यह फ़ंक्शन अपना काम किया ": कंपाइलर इस परिभाषा को विधानसभा कोड में परिभाषित करता है, जिसे तब बाइनरी निष्पादन योग्य में अनुवाद किया जाता है। यह आपके स्मृति में नहीं है (इसलिए कोई "भंडारण आवंटन" नहीं है), यह कंपाइलर द्वारा निष्पादन योग्य फ़ाइल आउटपुट में है ( a.out यदि आप अपनी इनपुट फ़ाइल, या खिड़कियों पर .exe फ़ाइल से कोई अन्य तर्क के बिना लिनक्स पर जीसीसी कहते हैं।) संपादित करें: थोड़ी आगे, और अपने कार्य के बाद से दो तर्क घोषित करता है: संकलक एक बाइनरी निष्पादन योग्य बनाता है, और यह वह जगह है जहां आपका फ़ंक्शन है अब, निष्पादन योग्य (जब निष्पादित) इन तर्कों (दो int s के लिए स्टैक पर कुछ बाइट्स) के लिए स्मृति आवंटित करेगा। दूसरे शब्दों में: अपने अंतिम निष्पादन योग्य , आपकी फ़ंक्शन परिभाषा सिर्फ उन निर्देशों का एक गुच्छा है जो आपके CPU निष्पादित कर सक...

How to extract distances from delaunay triangulation to list object in R -

Image
Suppose I have coordinates of digits, with each ID, I can put my data into this structure id & lt; -c ("A", "B", "C", "C".) "D", "E", "F", "G" , "H", "I", "J", "K", "L", "M", "N") x_coor & lt; -c 0.5,1,1,1,5,2,3,3,3,5,4,4,5,5,5,6,7,7) y_coor & lt; - c (5.5,3,7,6,5,5,3,5,3,1,5, 1,2,5,4,5,3,5,5.5) my.data & lt; - data.frame (id = id, x_coor = x_coor, y_coor = y_coor) # When I perform deluxe triangular, then I can see the distance .... Library (tripeak) my.triangles & lt; -ri.mesh (my.data $ x_coor, my.data $ y_coor) Plot (my.triangles, do.points = FALSE, lwd = 0.2) digits (my.data $ x, my .data $ y, col = " Black ", pch = 20, cex = 1.5) text (my.data $ x, my.data $ y, labels = my.data $ id) How can I remove" pairs "of the list points in this way the object? # I want something like this...

dynamic - How to give an dynamicly loaded TreeViewItem an EventHandler? -

At this time, I mean programm a database based chat system : after login, By requesting names of user friends, string namesest [] = get.getUserFriendNameByUserID (current user ID); To load the given names as a treeitem in their friend list / tree / rootRootItem "rootItem" (int counter = 0; Counter & lt; namesSt.length; Counter ++) {System.out.println (namesSt [Counter]); TreeItem & LT; String & gt; Item = new tree item & lt; String & gt; (NamesSt [Counter]); Item.addEventHandler (MouseEvent.MOUSE_CLICKED, handler); . RootItem.getChildren () add (item); } When I now add my root item, I see the name in the tree view. But if I click on a name, the mouseover handler is not called. In addition to this, I want to request the text of Element which triggers the mouseover, so that I can submit the name to a particular type of name. Funktion How can I cure such a MouseEvent? How is it possible to call dynamically created triitom? Thanks for any ...

database - What is wrong with my PL/SQL block? -

I have a written program for calculating the average points of students: DECLARE rno number (10); Wt NUMBER (10); DBMS Number (10); From NUMBER (10); Torque number (10); Per float (10); Total NUMBER (10); Start: = & amp; Rno; Wt: = & amp; Wt; DBMS: = & amp; DBMS; From: = & amp; From; Toc: = & amp; Toc; If (wt & lt; 40 or to & lt; 40 or toc & lt; 40 or dbms & lt; 40) THEN dbms_output.Put_line ('unsuccessful'); Total: = (wt + to + toc + dbms); To: = (total / 400) * 100; If (per & gt; 75) THEN dbms_output.Put_line ('Grade A'); ELSIF (per gt; 65 and per & lt; 75) THEN dbms_output.Put_line ('Grade B'); ELSIF (per gt; 40 & amp; nbsp; & lt; 65) THEN dbms_output.Put_line ('grade c'); ELSE dbms_output.Put_line ('Invalid input'); end if; Dbms_output.Put_line ('percent is' || per); end if; End; / There is no error in the program. But the output of the program is as follows: Enter the va...

create a matrix of samples in R -

I have probability distribution X and I would like to make samples of 100 comments: I sample (x, size = 100) , Substituted = TRUE) I want to plot sample on 100,1000,10000 samples, so I have the matrix (sample (x, size = 100, substituted TRUE), nrow = 100, ncol = 100) but it will generate the same sample in all the columns. Any ideas about how to create a new sample for each column? How about this? Instead of option with its sample call it will take a new sample for each column repeat (3, rnorm (10)) # [, 1] [, 2] [, 3] # [1] -0.439366440511456290974 0.349113310500896667499 2.10467702915785226381 # [2] 0.788892611945899879800 .572377925929974273878 .92566383997665424577 # [3] .098359807623723205516 -0.642162545019581476602 .28636140673186011307 # [4] -3.063133170307587249681 1.322694510750672014510 .66340500173312999532 # [5] 0.255018412772398617161 1.492588176987205361712 1.11444057062233659039 # [6] - 1.069621910039232570711 -1.460604130070508821504 -0.8153476862008137...

Create SQL Table that will import automatic from Excel whenever that Excel is updated -

So I have Excel spreadsheets with the product and notes. I would like to import this information into SQL and every time people get this excel Will enter more product and notes in the sheet, whenever I run the syntax, will it automatically be updated? I created the product - notes, which I imported the current table in that table. I was planning to use the insert in the function, and enter new values ​​in the table every day. But it seems to be a manual too. Is there a way I can do this? Excel spreadsheets are updated daily. I am using SQL Server 2008 I'm sure this is possible. You can connect Excel to your database and then you can write some macros to save the data in the table when changes occur or new lines are written. This will not be easy. There is a very complex logic here and Excel has not been written for a database for a front end. I believe that working in this way can be spent while changing your spreadsheet actually a client server to modify the databas...

java - What happens if we override only hashCode() in a class and use it in a Set? -

This can not be a real world scenario, but curious to know what happens below, code is. I am creating a set of square objects UsingSet according to the hashing concept in Java, when I have added the object in the first place that has "a" 97 will make a bucket and put the object in it. After experiencing an object with "A" again, it calls the override hashode method in class tools and it gets hashcode 97, so what's next? As I have not overridden, the method is equal to, the default implementation will return false. So where will the object be placed with "one" in the same bucket, where the previous object is placed with the headshot 97? Or will it create a new bucket? Does anyone know how it will be stored internally? / * Whatever the package; // package does not keep the name! * / Import java.util *; Import java.lang *; Import java.io * *; Using Class {String value; Public UsingSet (string value) {this.value = value; } Public string toasti...

ios - Xcode: Send value through target action from for loop -

I have found a list of values ​​coming from the database, each of which has its own unique identity. I want to be able to delete a line from the list. My point is, I am trying to understand how to send the value through button action used in the called function. For pre: NSString * sId = [_idArray object endx: i]; _fId = [sId intValue]; [DeleteBtn addTarget: Self-action: @selector (deleteFeed: _fId) for control events: UIControlEventTouchUpInside]; _fId is a value that I am trying to understand how to send the deleteFeed function, I know that it should be something simple, but when I do a Google search I do not pinned it down can do. AddTarget has set the parametric set and you can not send custom. As an alternative solution, you can do the following: Use the following API and set _fId as the tag: Action: @Selector (Delphid :) ie [deleteBtn setTag: _fId] [deleteBtn addTarget: auto operation: @selector (deleteFeed :) forControlEvents: UIControlEventTouchUpIns...

haskell - Why does the operator ** fail where the operator ^ works? -

So, here are two lists that understand, first uses ^ while the other uses ** : & gt; [X ^ 2 | X & LT; - [1..10], weird x] [1,9, 25, 49,81] & gt; [X ** 2 | X & LT; - [1..10], weird x] & lt; Interactive>: 9: 1: Any examples arising from the use of printing (Show T0) type variable ???? TA ???? Note: There are several possible examples: Show example twice - defined in GHC. Floatio Example showing float - defined GACC. Example (see Integral A, A) = & gt; Show (GHC.RialArtioA) - Define GACC. In real ... plus 23 other interactive GHCI commands in an STMT: Print it As far as I know the difference between two operators is that with integers first Works, while the second floating works with point value, exactly the expected output: [1.0.0.0.0, 25.0, 49.0, 0.81.0] The real question is why does the understanding of the second list fail? As you say that ** works with floating ponits Although it works with weird only integral s, so understandi...

javascript - jquery search for a table cell -> update neighboring cell -

How do I find a table cell with the value (text) of "foo" and how to set the next cell in that row? "Bar" for? To set a cell, there may already be some text that needs to be overwritten. Try it but I have not tested it. $ ('td'). Filter (function () {return $ (this) .text () = ('TD'). Text ('bar')

numpy - how can the string convert to int in python? -

Image

date - C program on how to check leap year -

How do I get the output of this code: We say When I type in 2012 Production should be on February 29, 2012 a leap year (same thing with other leap year) If I type in 2013, the output should be 2013 a leap year is not. This is my current code: Add & lt; Stdio.h & gt; Int main () {int year; Printf ("Enter a year to check it is a leap year \ n"); Scanf ("% d", and year); If (year% 400 == 0) printf ("% d is a leap year. \", Year); And if (year% 100 == 0) printf ("% d is not a leap year. \ N", year); And if (year% 4 == 0) printf ("% d is a leap year. \ N", year); Other printf ("% d is not a leap year. \ N", year); Return 0; } What should I set on the day of the week of February 29 in a leap year? Your question makes me feel like getting it myself and that I started receiving a code that would return one day by inputting a date pattern. In your case if it was a leap year, the date would be 29, 2,...

c# - Prevent Kendo Grid from running two queries -

Currently, when I attach a datasource to a condo grid, it two Runs. First of all: A calculation (*) to create the correct number of pages and tells the user how many records are present. Second: One My problem is that even with . Pageable (p = & gt; p). Enabled (false). Information (false)) This is still running the query (*) query. The query I'm running is very expensive and I would like to finish running the first query (*) query If you want to separate the data into pages, then you have to find a way to count the server The way you can not get around it As CodingWithSpeak said, it may take longer to show all the rows in the same page that you have to get this count (*) so that you have some solutions at this point. A) You set maximum rows to fetch in the same page. Just make sure the user knows about this limit. B) If the number of records in your table is constant, you can cache the count on the server. C) You can also cache the table data on...

java - window.open redirects to a URL but the original window shows a white blank page after redirection -

छापनेवाला बाहर = response.getWriter (); out.print ( "& LT; स्क्रिप्ट & gt;"); out.print ( "window.open ( 'http: //chfdsd/manu/zseriessection9.pdf','_blank')"); out.print ( "& lt; / स्क्रिप्ट & gt;"); यह स्निपेट स्ट्रट्स में एक्शन क्लास में है मैं इसे यूआरएल को एक नई विंडो में रीडायरेक्ट करने के लिए उपयोग कर रहा हूं। लेकिन, इस स्क्रिप्ट निष्पादित होने के बाद मूल विंडो को बदलना नहीं चाहिए। लेकिन मामला वह नहीं है। कृपया मदद करें! ऐसा इसलिए है क्योंकि आप सर्वर पर प्रत्यक्ष अनुरोध कर रहे हैं सर्वर प्रतिक्रिया केवल उस हार्डकोड जावास्क्रिप्ट का टुकड़ा है जो आपके ब्राउज़र क्लाइंट में लिखा जाएगा। यदि आप अपने खाली पृष्ठ के स्रोत कोड की जांच करते हैं तो आपको वह कोड दिखाई देगा: & lt; स्क्रिप्ट & gt; Window.open ('http: //chfdsd/manu/zseriessection9.pdf','_blank') & lt; / स्क्रिप्ट & gt; इसलिए यह रिक्त पृष्ठ नहीं दिखा रहा है, प्रदर्शित करने के लिए कोई HTML घटक नहीं है। आपकी समस्या ...

Problems with cluster's virtual IP -

I apply 99% high altitude cluster using heartbeat / korosinic + pacemaker for communication between some servers. I am planning to do this but these machines are not in the same gateway / netmask and I can not share a virtual IP for heart beat. There is a way to fix it without plug-in all servers in the same router (because its not the option) ??? Thanks for the attention Availability of 99% means that your system Makes more tolerance Downtime for one to three and a half days a day, you should be able to achieve that availability with commodity hardware and without using pacemaker. If you want the possibility of high availability or system maintenance, you can get high uptime using DNS without interrupting the service. You can either manually switch DNS records of TTL or use a service such as an Amazon Route 53 to switch automatically if any kind of health check fails. You can.

Possible "Traveling Salesman" function in Matlab? -

To solve the problem of a travel vendor using the matrix to find the least amount of time between the transit Seeing. The matrix looks like something: A = [inf 4 3 5; 1 Inf 3 5; 4 5 Info3; 6 7 1 INF] represents the node "from y-axis" and shows the node "from the x-axis" I try to find the optimum time from node 1 to node 4 I am doing I was told that there is a MetLab function called "TravelingSallemen" is it true, and if not, how would I have to go about solving this matrix? Thank you! 1 Here is a framework for brute-force algorithm to solve TSP for path from pre> . For each permutation of nodes, C = inf P = zeros (1, n-2) [2..n-1] // path always starts with node 1 and node n c = a (1, p (1 ) + A (P (1), P (2)) + A (P (2), P (3)) + ... + A (P3), P (N -2) + A (P-2, N) If C & LT; MinCost minCost = C minPath = P elseif C == minCost // You only need this part if you want minpath = [minpath; p] // most All paths with a short distance e...

NUnit v3 alpha: trying to get parallel tests to work -

I am trying to get parallel test to work in NUnit v3, however, this does not seem like in tests is. Considering the following test classes: Namespace NUITELFA 3 Experimental {[TestFeacions] [ParallelScope children]] Class Dummy Tests [[Test] Public Zero Muscovites () {Assert.IsTrue (true); File IO.appendToFile ("output.txt", Reflexion.GetCurrentMethodName ()); } [Test] Public Zero Mustafel () {Thread. Sleep (500); File IO.appendToFile ("output.txt", Reflexion.GetCurrentMethodName ()); Assert.IsFalse (true); }}} Every time I run my test, "Mustafel" is always output before "Mustache", "MustSuccess" should be output first, if tests run in parallel Maybe there is something wrong with my properties. I do not know. Please help please. EDIT: I added / workers = 8 for my command line: [...] \ NUnit3 \ nunit-console NUnitAlpha3Experimental.exe /framework:net-4.5-workers = 8 But still, My tests do not move in parallel. More info...

c++ - Setup GDB with QtCreator -

I have a simple project to use OpenCV and cmake, and two source files only segmentation. H and segmentation CPP Are there. Here is cmakefile: project (segment) Cmake_minimum_required (version 2.8) set (CMAKE_BUILD_TYPE debug) set (CMAKE_VERBOSE_MAKEFILE true) if (CMAKE_COMPILER_IS_GNUCXX) Message (position "GCC revealed, compiled flag ") set (CMAKE_CXX_FLAGS" $ {CMAKE_CXX_FLAGS} -O0 -g -std = c ++ 98 -Wall ") Andaif (CMAKE_COMPILER_IS_GNUCXX) find_package (OpenCV required) add_executable (Lulu segmentation.cpp segmentation.h ) target_link_libraries (Lulu $ {OpenCV_LIBS}) I created a debug build with the case sent to the limiter: -DCMAKE_BUILD_TYPE = debug However QtCreator still leave the break points, and gdb sh Can not interact with OK: & amp; "Warning: GDB: failed to set controlled terminal: device \ N inappropriate ioctl" How to fix this problem? project , play and in run settings Check the box that Play in a terminal . T...

ruby on rails - has_many through relationship to the same Model -

मेरे पास उपयोगकर्ता तालिका है: वर्ग उपयोगकर्ता & lt; ActiveRecord :: बेस है_माइंडो: ब्रोकर_क्लाइंस,: class_name = & gt; "ब्रोकरक्लाइंट्स",: विदेशी_की = & gt; "ब्रोकर_आईडी" है_माया: क्लाइंट,: के माध्यम से = & gt; : ब्रोकर_ग्राहक, विदेशी_की = & gt; "ब्रोकर_आईडी" के पास_माइयां हैं: दलालों, के माध्यम से = & gt; : ब्रोकर_ग्राहक, विदेशी_की = & gt; "क्लाइंट_आईडी" एंड और ब्रोकर कलियल्स तालिका: वर्ग ब्रोकरक्लाइंस & lt; ActiveRecord :: बेस is_to: broker, class_name: "user" belong_to: client, class_name: "user" end अब जब मैं एक रिश्ते बनाऊँगा: & gt; & gt; BrokerClients.create (broker_id: User.first.id, client_id: User.last.id) यूज़र लोड (9। 7 एमएमएस) SELECT "users"। * "उपयोगकर्ता" से "यूज़र्स" द्वारा "।" आईडी "एएससी लिमिटेड 1 यूजर लोड (1.3ms) "उन" चुनें। * से "उन" से "उन" आदेश। "आईडी" DESC सीमा 1...

android - java.lang.ClassCastException: Help me find whats wrong please -

Ok here is the XML code I try to fix I've been in for more than an hour, I do not know what's going on. I get an error on the last line of code: ph0ne = (EditText) findViewById (R.id.testphone); increases the MyActivity activity of the public class {@ Override Creates the Protected Zero (Bundled Saved Instance) {super.onCreate (savedInstanceState); SetContentView (R.layout.activity_my); BTN1 = Find (VBIID) (RID Button Go Tunber); BTN2 = (VBIID (R.D.Test 3 button); LEHEM = (linear layout) Find VVBIID (R.D.L.H.M.D.D.); LayAddNumer = (LinearLayout) findViewById (R.id.test3LAY); Ph0ne = (EditText) findViewById (R.id.testphone); }} Edit: for some reason i XML code I can not add .. The stacktrace here: java.lang.RuntimeException: Unable Initial Activity ComponentInfo {com.spiratessgmail.myapplication / com.spiratessgmail.myapplication.MyActivity}: java.lang.ClassCastException: android.widget.LinearLayout can not be inserted for Android. Widget.EditText atroid.app.A...

php - In a value object, why use specific property set and get methods? -

By looking at a pattern, I know that they meet different sets and property functions, which both write There are boring and many opportunities for typo errors. Is there a reason to write in this style, rather than the usual received / fixed routine? This is the boilerplate I am using: Class ValueObject {protected $ property1; Protected $ property2; Protected $ property3; Get public work ($ propname) (if (property_exists ("ValueObject", $ propname)) {$ $ - $ propname}}} Public function set ($ propname, $ value) {if (property_exists ("ValueObject", $ Propname)) {return ($ this-> $ propname = $ value);}}}} The idea behind the gates and the setters is quite interesting. Suppose we have a user object with username, first name and last name and age, something like that class user () {public $ username = 'special!'; Public $ firstname = 'johnny'; public $ Last name = 'difference'; public $ age = 55;} Everything is fine, and...

Merge two vectors based on index in R -

I am trying to merge two vectors of the same length where the vector in NX "a" Align with "b" and vice versa: a should be output: 1, 2, 3, 4 Thanks for the help! Edit: The solution I used was a is.na (a)] [b] is [an isna] value a is.na ( A) should be replaced with the value of b , which corresponds to the denial of is.na (b) . Here I define a new vector d so that the original vector should be written on a or b . D & LT; - Ad [is.na (d)] & lt; - b [! Is.na (B)] d # [1] 1 2 3 4 If you find that the value of NA starts in the second position, you assign Can also be optional. d & lt; - Ad [c (wrong, right)]

php - Create table and use it - Codeigniter -

I am facing a very strange thing using CI, I Make a table using the DBforge class, all is well and the table is actually built on my DB. However, when I try to use the newly created table (insert, check that exists etc.) I have nowhere to get the following simple code: (Both are inside the work model) function create_modules_table ($ tablename) {$ fields = array ('module_name' = & gt; array ('type' = & gt; 'VARCHAR', 'constraint = & gt; 100' '),' Position '= & gt; array (' type '= & gt;' VARCHAR ',' constraint = 'gt;' 100 ');); $ This- & gt; Dbforge-> Add_key ('module_name', TRUE); $ This- & gt; Dbforge-> Add_field ($ sectors); $$ --- gt; Dbforge-> Return_table ($ tablename); } A function is followed by table_exists ($ table) {back to $ this- & gt; Db- & gt; Table_exists ($ table); } If I run $ this-> Create_modules_table ('table...

math - Fetching input back after OR of two inputs -

I have two numbers: A and B. I do the following. A or B = Output How can I now get the Number B from the output and A i, A ? Output? (1 or 0 = 1) and (1 or 1 = 1) since A = B There is no general connection to detect B. You can only find B if A = 0, B = output.

css3 - Using html5 appcache with media queries for pixel ratio -

I have a web app that delivers images of the appropriate resolution for client devices. For example, it will distribute 1x images with a Windows desktop and 2x images retina display in the iPhone. I'm interested in using my web app to enable offline use. To do this, you need to create a manifest file that lists all the files your app requires. When a user touches the app, the browser gets registered and ready to go offline, all files listed in it are downloaded. It seems to me that it will reject the issue of my media questions I will put images both 1x and 2x in the manifest, and all clients will end up downloading all the images. The main solution to the brain is to deliver the dynamically to the manager, use the sniffing of the user agent, to determine whether the manifest contains 1x or 2x images or not. This is practical for me, but I am curious what other solutions are to deal with this issue, or is this just a known boundary / Shankaracharya? I have a hip that...

java - Jersey REST error, MessageBodyWriter not found for media type=application/json -

Image
I did not find the messaging recorder when I called for a web service call. I have included genson-1.1.jar in my square path, which I believe is to include messaging implementation, I still get this error I am using Jersey 2.13. I have also tried without registering "GensonJsonConverter.class" and still gives the same error protected zero doPost (HttpServletRequest request, HttpServletResponse resp) ServletException, IOException {ClientConfig config = new ClientConfig () throws; WebText target = client.target ("http: // localhost: 8080 / web services / comfort / hello"); Target.path ("Lion King"); Target.register (GensonJsonConverter.class); String response = target. request (). Accept (MediaType.APPLICATION_JSON) .get (String.class); Resp.getWriter () print (feedback). } @Path ("Hello") Public class greetings {@GET @Produces (MediaType.APPLICATION_JSON) public book getThisBook (@PathParam ("bookName") string bookName) {R...

java - Requires a permission that's already there? -

I was trying to start an activity from a different project, but when I run it, it crashes And tells me I need permission. I already have a & lt; Use-permission & gt; is added, so I do not know what is wrong to any help The code that appears for the intention & lt;; ? Xml version = "1.0" encoding = "utf-8" & gt; & Lt; Xmlns Reveal: Android = "http://schemas.android.com/apk/res/android" package = "course.labs.permissionslab" Android: versionCode = "1" Android: versionName = "1.0" & gt; & Lt; Use-sdk android: minSdkVersion = "8" Android: targetSdkVersion = "18" /> & Lt ;! - TODO - Use-allow element addition - & gt; & Lt; Usage-permission Android: name = "course.labs.permissions.DANGEROUS_ACTIVITY_PERM" /> & Lt; Use-permission Android: name = "com.android.browser.permission.READ_HISTORY_BOOKMARKS" /> Should the code appear fo...

ios - How do I do the UISearchDisplayController's tableView to use the prototype cell defined for the regular tableView -

I have a table view controller with a search bar and a search deputy controller. A prototype cell defined on the table view storyboard of that main tableview controller. I'm crashing on the line FileManagerTableViewCell * cell = (FileManagerTableViewCell *) [tableView dequeueReusableCellWithIdentifier: cellIdentifier]; When the search table view is going to appear. Apparently the search table can not reach prototype cells defined on the main table on the View Storyboard. How do I obtain a search table view for the prototype cell defined for the main tableview on the storyboard? If you want to use both tables in the same cell, you will see a xib file instead of the storyboard In that room should be designed. Register both tables, using registerNib: forCellReuseIdentifier: .

mapreduce - How do i set reducer output name in Hadoop? -

I have a job that will emit 900,000 different outputs. Each one of them should be identified by a specific unique name ... that is, "name" I have on map otputaki, how can I reduce it to the map? You can use multiple output , you will find an example in which you Almost required, you have to replace it with the generFileName function: string generatedFilename (KK, VV) {Return K.OustString (); }

Liquibase generateChangeLog not outputting schema -

changeSet type to create a table, you can specify the schema of the table (see) the output does not include schema. For reference, here is the Liquibase. Property file I am using: Driver: org.h2.Driver classpath: h2-1.4.181.jar URL: JDBC: h2: ~ / test.db Username: Sa password: Which changeLogFile: baseline.xml liquibaseCatalogName: LIQUIBASE liquibaseSchemaName: once defaultSchemaName: once outputDefaultSchema: true outputDefaultCatalog: true output to one of the tables: & lt; CreateTable TableName = "Products" & gt; & Lt; Column name = "id" type = "INT (10)" /> & Lt; Column name = "CODE" type = "VARCHAR (10)" /> & Lt; Column name = "PRICE" type = "decimal (9, 2)" /> & Lt; / CreateTable & gt; I used to write this manually, so I included the schema: & Lt; Column name = "CODE" type = "VARCHAR (10)" /> & Lt; Column name...

cURL PHP request and download output -

How can I use a CRL command, to create a PSP request in the output table data in a .csv file and then Have you got ready to download that file? So far I have: PHP if (isset ($ _GET ['FROMCURL'])) {if (isset ($ _ GET ['table' ])) {$ Table = $ _GET ['Table']; } If ($ _GET ['FROMCURL'] == "test") {dump_data ($ db, $ table); }} Function dumpet ($ db, $ table) {$ tables = array ("x", "y", "z"); If (in_array ($ table, $ tables)) {try $ $ dumpData = $ db- & gt; ("SELECT * FROM $ table"); $ DumpData- & gt; Executed (); $ Data = fopen ('../$ Table _'. Time (). 'Csv', 'a'); While ($ line = $ dumdata-> fetch (pdo: FETCH_ASSOC)) {$ csv = array (); Forex currency ($ key as $ $ line => $ val) {if ($ key! = 'X_blob' || $ key! = 'Y_blob' || $ key! = 'Z_blob') {$ csv [] = $ Val. ','; }} Fputcsv ($ data, $ csv); }} Hold (PDOException $ e) {echo ...

java - Not sure what i'm doing wrong here (Boolean flag) -

There is a snippet of my code for assignments. I can not see the boolean flag to work properly. When I try to understand it, every name is missed or no name is missing. Mike or Diana should be given a rebate to clarify the name First string; // user's first name boolean discount = false; // flag, if the user is eligible for discount inch inch; Size of size of Pizza Four Crust type // Size; // code for the type of crust string crust; // Crust Double Price = 12.99; // Last Cost of Pizza Double TAX_RATE = .08; // Double sales tax rates; // amount of tax choice; // user's choice string input; // user input string topping = "cheese"; // number of topping int numbersofopting = 0; // Get the number of topping // Prompt user and first name system.out.println ("Welcome to Mike and Dian's Pizza"); System.out.print ("Enter your first name:"); FirstName = keyboard.nextLine (); Firstname == "Mike" || First name == "Diana" || First...