Posts

Showing posts from March, 2014

python - Pyside WebView example showing blank screen -

I'm starting playing with QWebView in PySide. I can load the HTML in the web view and see it, although I may not have to load the page online or set the URL. Here's my example: Import from PySide.QtCore import from * import system * from PySide.QtWebKit import * app = QApplication (sys.argv) web = QWebView () Web.setUrl (QUrl ("https://www.google.com")) web.show () sys.exit (app.exec_ ()) All I get is this Is there a nice empty white window anyone know what is missing? Maybe you are behind a proxy I have experienced the same behavior and a proxy for the application Has helped set up. PySide.QtNetwork Import QNetworkProxy Proxy = QNetworkProxy () Proxy .set Type (QNetworkProxy.Socks5Proxy) ; Proxy.setType (QNetworkProxy.HttpProxy); Proxy.setHostName ("*********"); Proxy.setPort (****); QNetworkProxy.setApplicationProxy (Proxy);

java - How to remove a row after adding it to a view object with createRow() -

I have a visual object and I to make such a line: ContactsVORowImpl Person = (contact VORowImpl) getContactsVO (). CreateRow (); Then I leaves the assigned some properties went lines formed, which overlooked the others (intentionally): person.setFirstname ( "Firstname"); //person.setLastname (""); person.validate (); I get a validation error complaint because last name is empty . Then I commit without any entry , line in the visual object: getDBTransaction (). Commit (); Here I Last Name The following exception to be null: exception class: class oracle.jbo.AttrValException, Message : JBO-27014: Attribution Last Name is required in ContactOo. Oracle.jbo.AttrValException: JBO-27014: contact attribute AO last name is required oracle.jbo.server.JboMandatoryAttributesValidator.validate (JboMandatoryAttributesValidator.java:224) oracle.jbo.server.EntityDefImpl.validate (EntityDefImpl.java:3200) on oracle.jbo.server.EntityCache.validate (on E

opennlp - R: annotate() gives error in R -

I'm new to R. I have to use POSTagger in my code. I am using OpenNLP when attempting the following sample code (in the sample r file): Library ("NLP") library ("OpenNLP") S & lt; - "Cache Witchhen, 61 year old, one on board", "Unqualified Director will be included as Nov. 29, \ N", "President of Mr. Vernon Elsevier NV", "Dutch Publishing Group"), Fall = "") S & lt; - as.String (s) sent_token_annotator & lt; - Maxent_Sent_Token_Annotator () a1 & lt; - The interpretation (s, sent_token_annotator) is [a1] and run this code from the R console (using the source ("sample .r")) I get the following error: error in as.data.frame.default (x [[i]], alternate = TRUE: can not force a data.frame class "c" ("Simple_POS_Tag_Annotator", "interpreter" ) " after the output of traceback () is in order: 14: stop (gettexf (" "data" Can not f

Getting error message in try catch (C#, Window Service) -

It is possible to get an error message in capturing the C # (or window service that was written with C #) / P> string input = console Readline (); While (Input! = "Q") {try {double result = 10 / int.Parse (input); Console.light line ("+ input +" divided by "and result is" + result); } Hold (exception) {Console.WriteLine ("error, please try again"); } Finally {input = Console.ReadLine (); }} This was created for the ".exe" program. If I input characters ("A", "B", "C") or zero, then the program will show the message "Error, Please try again" so that I should know the error message. I do not want to edit the code. I need a tool to detect all the errors in the program. Thank you for your help. You want to print the message property of your own Replace hold with: hold (exception e) {Console.WriteLine ("An exception occurred:" + E. Message); }

How to search words in text files faster than "grep" of linux command? -

I have many files with code, I have to search different keywords along with the function. Currently I'm using the keyword "grep-i -r" which searches for "Linux" in search. However, I need to increase the pace of search to reduce time. I have also heard of the Boer-Moore algorithm which is a fast detector but I am not expecting the results I have achieved. So I am very excited to hear your comments and solutions. < Li> You should try ack (). It's designed as a fast search tool for code. If you want the ability to take your code into the language syntax account (the difference between the function and symbols) you should try it.

ruby - Reference a subset of a column in a CSV -

After itemprop = "text"> I want to insert a row-column into a CSV Ruby, and in the subsequent operations, on the sequential lines of a single column Performing a data like array [startrow..endrow] [3] .reduce (: +) something like I have a CSV file In a specific cell, such as: array [somerow] [somecolumn] / 2 but me ". .. any underlying conversion of the string Only get the "integer" error when I try to reference a subset Edit: I do the CSV import using the following, which correctly appears to change the number of strings I am: array = CSV.read ('spy_very_short.txt',: header = & gt; true, converters: all) when I run the suggestion test array [somerow] [somecolumn] .class I get back "float". without knowing more about what is returned (I think it always represents a number Is a string), I think you need to convert the string to something you can do with it: value = array [somerow] [somecolumn] print

ios - Swift: error when trying to communicate with web API -

I'm trying to make a really basic iOS app using Swift - this is my first time to do this Although most of this is actually straight forward, my app has a complete nightmare to speak to my API or to any site in general. I am using this code, and especially the code that is causing the error: NSURLConnection.sendAsynchronousRequest (request, queue: line, ending handler : {(Response: NSURLResponse !, Data: NSData !, Error: NSError) -> Zero (NSString (data: encoding: NSUTF8StringEncoding) in println!)}) It is the 'NSString (data: data, encoding: NSUTF8StringEncoding)' those errors as many tutorials as I can find, so I have returned the same problem. I have an 'EXC_BAD_INSTRUCTION' error: EXC_1386_INVOP, sub-code = 0x0 (which gives me a solution: NSURLErrorDomain - Code: 4294966291 I have not been led ... I feel that I have not done anything right in my establishment, or something should be running in my priorities, or some of those lines, unlik

android - 1 listview and 3 buttons. 1 button is not clickable, why? -

I have a section that listsActivity spreads inside 3 buttons and a list view (clickable items), list items And 2 buttons work fine, but do not respond to any click (it's made just like any other). I think that this is something related to the focus of the button, I have already tried Android: Focusable = "true" and "false" but nothing will change. This is my XML: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; RelativeLayout xmlns: Android = "http://schemas.android.com/apk/res/android" xmlns: Tools = "http://schemas.android.com/tools" Android: layout_width = "match_parent" Android: layout_height = "Match_parent" & gt; & Lt; ListView android: id = "@ android: id / list" android: layout_below = "@ + ID / checkout" Android: layout_width = "match_parent" Android: layout_height = "400dp" & gt; & Lt; / ListView & gt;

grails - Passing parameters in Link - Beginner -

The code I write to & lt; Link & gt; I'm going through in that case it's too long I can & lt; Td> & Lt; G: link action = "showresult" id = "$ {r.id}" param = "['DNA': r.dnasequence, 'command': r.order]" & gt; $ {FieldValue (Bean: Resultant Field, Field: "Patient ID")} & lt; / G: link & gt; & Lt; / Td> The value for r.dnasequence is more than 1000 characters long, so it all engages in the URL. How can I send it without including the URL? You can not send a post request using g: contact. It is better to use AJAX or remote links (deprecated). or

android - AndroidPieChart will not show -

यह मेरी XML है: & lt; net.kenyang.piechart.PieChart एंड्रॉइड: id = "@ + id / piechart" android: layout_below = "@ id / id_bar" एंड्रॉइड: layout_width = "match_parent" एंड्रॉइड: layout_height = "match_parent" / & gt; यह कोड है जिसे मैं आरंभ करने के लिए पाईचर्ट के लिए उपयोग करता हूं: ArrayList & lt; PieChartData & gt; AlPercentage = नया ArrayList & lt; PieChartData & gt; (); AlPercentage.add (नया PieChartData (55.0f, "1")); AlPercentage.add (नया PieChartData (45.0f, "2")); कोशिश {// सेटिंग डेटा pieChart.setAdapter (alPercentage); // एक श्रोता बनाने वाला pieChart.setOnSelectedListener (नया PieChart.OnSelectedListenter) {@Override सार्वजनिक शून्य पर चयनित (int iSelectedIndex) {Toast.makeText (PSTravelStatisticsActivity.this, "सूचकांक चुनें:" + iSelectedIndex, Toast.LENGTH_SHORT)। दिखाएं () ;}}); pieChart.setVisibility (View.VISIBLE); pieChart.invalidate (); } पकड़ (अपवाद ई) {Log.i (&q

Why does docker build not use the build cache? -

Every time I change my Dockerfile , the Docker runs all of my orders again , Even if I have some commands not cached at the end of the change file. Image in my special image was based on this statement Add ONBUILD This means that no statement can be cached in my Dockerfile when my Dockerfile changes, because add / some / path executes any statement before it is executed. In general: If any change in ADD Dockerfile invalidates the cache. P> My Solution was inserting files that I would like to specify on a subdirectory my_data And then want to add the contents of the subdirectory to the path: add my_data / some / path Unfortunately, Dockerfile < By adding to / code>. dockerignore does not help, because then Docker build can not be executed because it does not search for Dockerfile and you get an error Dockerfile DocAgnor Pattern was excluded by 'DockerFile'

c# - pass javascript model to controller -

I do not know what I'm missing. I have a javascript model that I'm making here, its Is there a demoded down version, does anyone see why my model is not being sent to my controller with data? JavaScript model that is being created: (it populates correctly) var myModel = {ThresholdDetailId: thresholdDetailID, thresholdId: threshold id, owner name: owner name , SelectedEnodeType: SelectedEnodeType, GroupID: GroupId} Ajax call: $. Ajax (reference: this, type: 'post', url: '/ threshold / editingtrrayhold /', data: {model: mymold}, success: function (result) {// do stuff}, error: work () { Error () ;}}); The model is empty whenever the action is taken on the controller. Here is the signature: [http post] Public JsonResult EditThreshold {ThreadholdDetail Model} {// Do Stuff} do not wrap myModel with an model property in an external object (unless That view modell is not binding you ultimately is set in the same way, which seems likely)

ios - Xcode 6 is telling me that UIViewController doesn't have a member named reloadData() -

मेरे पास एक दृश्य नियंत्रक है जो कि UICollectionViewController , UICollectionViewDataSource है, और UICollectionViewDelegate । हाल ही में Xcode को अपडेट करने के बाद, मुझे अब निम्न त्रुटि मिल रही है: '(UICollectionView, numberOfItemsInSection: Int) - & gt; निम्नलिखित कोड ( -didCompleteForecast: एक कॉलबैक विधि है) पर 'पुनः लोड' नाम वाले सदस्य का पुनः लोड किया गया नाम 'पुनः लोडडेटा' नहीं है: func didCompleteForecast () {// सामान println ("डेटा वापस मिला") dispatch_async (dispatch_get_main_queue ()) {self.collectionView.reloadData ()} एप्पल के स्वयं के अनुसार धन्यवाद ऐसा इसलिए है क्योंकि self.colectionView वैकल्पिक प्रकार है (UICollectionView?) ताकि आपको इसे खोलना होगा: self.collectionView! .reloadData ()

mysql - Is the following possible in SQL query -

Is it possible, I am threatening my brain to think about the solution. I have permission to add a line to the user, what I want to do ideally is a SQL table, a very simple table, some text columns and two integer columns Only the text column and the SQL enter the independent number in the integer column. Ideally ID numbers like these are random, but not already in the column (hence there is a unique number on each line). Also 10 points long (but it seems that it might be pushing). Thanks = post-text "itemprop =" text "> Sure - you can specify the string Insert the insert statement in the form and also the value - you can use SQL Fusion to generate random numbers after you calculate them, or use the code from which you are calling them.

sql - Converting Datetime to Time -

I have this code and I am trying to convert Datetime to time: Alternate Processes [DBO] BookingNo, RoomName, CONVERT (Varchar (10), DATEADD (S, CheckInDate, '71 71-01-01 00:00:00'), 101), Convert (Varchar (10), DATEADD (S, CheckinDate, '71 71-01-01 00:00:00'), 101), Breakfast from booking where idnm = @ iDnumber but I to: DATEAD (date format, number, date) You should be shown first part (second), then show a number (how many pairs or decreases), and then finally Show a date.

c# - Parsing XML with spaces in element names -

So I have to parse a simple XML file (only one level, no attribute, only element and value) but The problem is that the blank space (or may be) in the XML I know is bad (potentially horrible) practice, but I'm not the one who is building XML, it is coming from an external library. > Example: & lt; Live key & gt; Exam & lt; / Live key & gt; & Lt; No G & gt; Trial & lt; / No & gt; & Lt; Test & gt; Hello & lt; / Test & gt; Now my tactic is XML (I have a string as a) at the same time reading a letter and just the name of each element and Save the value as I get it, but it seems a little too complicated. Is there any easy way to do this? XMLReader throws an error because it thinks that XML is well formed, thus it thinks that "living" is the name of the element and "key" is a feature, so it "=" And a "& gt;" Unfortunately, the text returned by your library is well There

php - MySQL Query for Advanced Search multiple criteria -

I am working through an advanced search query where users select the checkbox based on multiple criteria. I am starting because I am hoping that I will know whether I am on the right path. I know that the query is quite messy Edit: I realized that there are two questions to be needed, so I have strictly modified a question question table data tables ss_users user_id FIRST_NAME LAST_NAME admin_level user_approved 1 Nick Jones 0 1 2 Johnny Rocket 0 1 table ss_user_profile_status user_id photo_uploaded 1 1 2 1 table ss_user_photos selected user_id file name photo_id 1 1 photo_1 .jpg 1 2 2 photo_2.jpg 0 3 2 photo_2.jpg 1 table ss_general user_id city state zip neighborhood 1 Baltimore maryland 00125 hamsterdam 2 Lekland My 11542 treemont table ss_languages ​​user_id French German Italian Spanish 1 0 1 0 1 2 0 1 1 Table ss_experience Waldorf Kumon homeschooling user_id 1 0 1 0 2 0 0 1 My current The result is that all users, which should not be the case: ... Select ss_use

cryptojs - reading encypted object in javascript -

var टोकन = "WMwiDeJrawUKHif7D5a8yd4ne6Mv"; Var नमक = "ERtrg56hfg5"; Var key = CryptoJS.enc.Hex.parse ('B374A26A71490437AA024E4FADD5B497FDFF1A8EA6FF12F6FB65AF2720B59CCF'); var iv = क्रिप्टोजएस.एन्सी। हेक्स। पार्स ('7 ई892875 ए 52 सी 59 ए 3 बी 588306 बी 13 सी 31 एफबीडी'); var एन्क्रिप्टेड = क्रिप्टोजेश.एएस.एन्सी्रिप्ट (टोकन, कुंजी, {iv: iv}); Context.setVariable ("एन्क्रिप्टेड", एन्क्रिप्टेड); लेकिन यह चर कहा जा रहा है कि यह एक ऑब्जेक्ट है। मुझे क्या करना है मुझे लगता है कि आपको encrypted.ciphertext का उपयोग करना होगा var एन्क्रिप्टेड = क्रिप्टोजेश.एएस.एन्सी्रिप्ट (टोकन, कुंजी, {iv: iv}); Context.setVariable ("एन्क्रिप्टेड टोकन", एन्क्रिप्टेड.सिर्फटेक्स्ट); क्रिप्टोजएस से: एन्क्रिप्शन के बाद आपको वापस मिले सिफरटेक्स्ट अभी तक एक स्ट्रिंग नहीं है । यह एक सिफर पैराम्स ऑब्जेक्ट है एक सिफर पैराम्स ऑब्जेक्ट आपको एन्क्रिप्शन के दौरान उपयोग किए जाने वाले सभी पैरामीटर तक पहुंच देता है। जब आप किसी स्ट्रिंग प्रसंग में ए

java - Using jUnit to test a class / object which is not created yet -

I am working on a program that would be a kind of game for beginner programmers. I intend to provide an area where users can write codes as necessary (method, class ...). When the user wants to submit the code, then I will copy the content of the text field to a .java file, I will call the compiler to compile this class, and then I want to test whether the code is correct using jUnit Works. Well, I know that jUnit is used for development purposes, but I think it can be very useful in implementing it in this case too. The problem now is that when I need to compile my program, the class that can be considered (the user's code) is not going there. So I can not just call assertEquals ("wrong amount", 6, Foo.sum (4, 2)); Because it will not know what the Fu Class is, since it will never happen at the time of compileat - before the user runs the application and coding begins. I thought I could make a dummy class just for a compilation, but then when I need the r

java - Big O notation (Complexity) -

What's the big oops for this loop? - & gt; I think the loop is going to execute n times. But the inside work of the loop also n times correct? So can it make an O (N ^ 2) or do I combine them and this is a simple O (n)? I personally think that this is just O (n) because that is how many times a loop is executed, but I would like some explanation as to why or why not? As any explanation I have in my midterm. / code> Think how often in the code executed by the loop. Each a [i] = b [i] is a.length bar, which we will call on n . So it is o (n) .

xcode - Skipping else statement in Visual Studio C++? -

Why did not the last and statement be dropped from the following method in VS C ++? I have the correct & lt; Operator has overloaded, so there is no problem there. In fact, when I take the same function and compile it again in XCode, it does this so that it fully considers because the details of else is executed. Why is this? Insert zero (comparative and amp; x, binary node * & amp; t) {if (t == nullptr) t = new bian node {x, nullptr, nullptr}; And if (x (lt; t-> element)) insert (x, t-> left); And if ((element T-> element) right); Other T-> Element. Merge (X. enzyme); } looks like code optimization C ++ to "exaggerate" it And if it thinks that it will never be killed, then it will not compile that part of the code too. Add {} to each other except it is easy to parse parsers that if you have a statement with them and you can divide it completely into separate ifs.

mysql - phpMyAdmin - #1267 - Illegal mix of collations for operation '<' -

मुझे निम्न त्रुटि संदेश मिल रहा है: SELECT * FROM Syshealth WHERE 'टाइमस्टैम्प' & lt; DATE_SUB (NOW (), INTERVAL 15 MINUTE) मुझे निम्न त्रुटि मिल रही है: # 1267 - collations के गैरकानूनी मिश्रण (utf8mb4_general_ci, COERCIBLE) और ऑपरेशन के लिए (लैटिन 1_स्विडिश_सी, NUMERIC) '& lt;' utf8_unicode_ci मैं पहले से ही कुछ लेख पढ़ चुके हैं, और मैंने सबसे ऊपर जवाब देने की कोशिश की है, लेकिन सफलता के बिना ... कोई और विचार है? संपादित करें: अतिरिक्त जानकारी - 'टाइमस्टैम्प' कॉलम प्रकार दिनांक समय / Div> यदि आप एकल का उपयोग करते हैं, तो आपको कॉलम की पहचान करने के लिए `(बैटकिक) का उपयोग करना होगा, यह स्ट्रिंग शब्दशः के रूप में माना जाएगा सिलेबल्ड से चयन करें WHERE 'टाइमस्टैम्प` & lt; DATE_SUB (NOW (), INTERVAL 15 MINUTE)

sql - Dynamically Join Enum Table with other Table -

I have the following table. These are not real tables but the concept is here. Table 1 --------------------------- ------- FieldID | Enumerated Values ​​| TextView ---------------------------------- Col1 | 1 | O ---------------------------------- Col1 | 2 | Test ---------- ------------------------ tomorrow 1 | 3 | George --------------------- ------------- call 2 1 | Random -------------------------------- - Call 2 | 2 | Wesley ---------------------------------- Col3 | 1 | Tompson ---- ------------------------------ Col3 | 2 | Ouo ----------------------------------- Table 2 ------------- ----------------- ---- Call 1 | Call 2 Call 3 ---------------------------------- 1. 2 | 1 - -------------------------------- 2 | 1 | 1 ------------- --------------------- 3 | 1 | 2 ------------------------ ---------- desired result a view ------------ ---------------------- Col1 | Col2 | Col3 ----------------------- ----------- Hey | Wesley | Tompson ---------------------------------- Test

java - How would I modify my code to search a multidimensional array diagonally from left to right and right to left? -

I have a multi-dimensional array to search from left to right and left to right. Do I need to search the array from right to the bottom right, from the bottom left to the right, the bottom has been left at the top right, and the bottom right Side. What would I need to change in my existing ways to create a new method for doing what? // Find the public static string from left to right Lettroit (four [] [] board, string word) {four [] letters = words. Charaire (); (Int i = 0; i & lt; board.length; i ++) {for (int j = 0; j & lt; board [i]. Length; j ++) {boolean found = true; (Int k = 0; k & lt; letters.length; k ++) {if ((j + k> = board [i]. Length) || (letter [k]! = Board [i ] [J + k])) {found = false; break; }} If (found) {return "string" + word + "row =" + + "col =" + j; }}} Return "string" + word + "did not get"; } // end findLeftToRight // Right to Left Public Static String for Rudder to Left (four [] [] Boa

when declaring css styles, what is the meaning of .classA.classB (two class names with a dot in the middle and no space) -

इस सवाल का पहले से ही एक उत्तर है: < / P> 2 जवाब 5 जवाब 1 उत्तर मुझे पता है जब बीच में एक स्थान होता है, तो यह बाईं ओर वर्ग के दाईं ओर वर्ग की खोज करेगा। .classA .classB {...} हालांकि, जब कोई जगह नहीं है तो इसके लिए क्या बात है? .classA.classB {...} पहला उदाहरण (अंतरिक्ष से अलग किए गए वर्ग) एक माता-पिता के रिश्ते हैं .classB अंदर .classA पाया जाता है। & lt; div class = "classA" & gt; & lt; div class = "classb" & gt; & lt; / div & gt; & Lt; / div & gt; दूसरा एक तत्व के लिए कई वर्गों के साथ है, जैसे: & lt; div class = "classa classb" & gt; & lt; / div & gt; बहुत अलग परिस्थितियों, लेकिन दोनों बहुत ही उपयोगी हैं! यहां और पढ़ें:

windows - exit a batch script that called another batch script -

I have a batch script which is called a sequence of batch files. There is an error case, I need to get out of the batch file that was called, as well as a parent batch file. Is it possible to complete this child in a batch file? Thanks in advance for all tips / help. test.bat Rim test 1.Bat will exit the error code. Call test1.bat rem to stop test1.bat errors to stop the script. Call test2.bat test1.bat can I get test.bat to end the test test from test.bat inside? Exit / B1 You can use the error level if the call batches Notify you to use exit 0 systematically continue and exit 1 to call the caller to stop, you call the caller Modify that way: Rim test 1.The batch will exit the error code. Call test1.bat rem to stop test1.bat errors to stop the script. If Error Level 1 Goto Fatal Call test2.bat Exhaust 0: Fatal Echo Fatal error exit 1

Can't create a Hive Table from an avro file -

I can create a table above an avio file using the following syntax without any error it is a blank on the FIR The table is Create an external table table named Partition (ingest day time BIGINT, record type STRING) ROW FORMAT SERDE 'org.apache.hadoop.hive.serd2.avro.AvroSerDe' INPUTFORMAT form Organized in 'org.apache.hadoop .hive.ql.io.avro.AvroContainerInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat' Tabletpropertia ('avro.schema.url' = 'hdfs: ///user/file.avsc '); When I add a line to the actual avio file link, I get a permission error Participate by creating an external table table ( Ingestiondateetime BIGINT, record type URL) RoE format sensor 'org.apache.hadoop.hive.serd2.avro.AvroSerDe' processed as INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat' OUTPUTFORMAT 'org .apache.hadoop Hive.ql.io.avro.AvroContainerOutputFormat 'LOCATION' / Loc

c - char array in switch statement with strange error message -

I have a question I have declared a letter as an array and based on any other parameter, this array Has to look different. Four maps [10] [10]; Switch (Stage) {Case 1: // map NR1 map [10] [10] = {{'#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '', '', '', '', '', '', '', '', '#'}, {'#', '', '', '', '', '', '', '', '', '#'}, {'', '', '', '', '', '', '#' ,' ',' ',' # '}, {' # ',' ',' # ',' ',' And ',' ',' # ',' ',' ', '#', '' , '#', '#', '', '', '', '#', '', '', '#'}, {'#', '', '#', '#&#

r - roll join of two non-overlapping `data.table`s -

There are two non-overlapping data.tables and include a rolling: library ( P = data eligible (id = c ("a", "a"), t = c (1,4), txn = c (0, 0), key = c ("id", " T = "") TX = DataTable (id = c ("a"), t = c (3), txn = c (1111), key = c ("id", "t")) #note index t = 3 P # id T TNN # 1: A11111 # 2: A4 0 P = [Tx, TxN: = ITN.N, roll = TRUE] falls into the ditch. <<< >> << code> txn previous available index ( t = 1 ) when roll> 0 I hope it will be brought in a next available ( t = 4 )? P # Expected # id t txn # 1: a 1 0 # 2: a 4 1111 to ? In the form of data roll = TRUE and i S matches all, but the last x is in the Combination column, and its price is the last i In (that group is included after the last observation in x ), then the prevailing value in X is forwarded. Here, the value from TX (= i) is T = 3, T = 1 and T = 4 to P In the middle of the d

javascript - Aligning four circle's inside a square in CSS and HTML5 -

Image
I am developing a simulation size game, and I am working on all javascript etc. Main I have problems with CSS; When you click it, everything works, Here's a silent image that I want to see: CSS: body {background-color : # 333; Color: #fff; } Ul {list-style: none; Margin: 0 20 px 0; Padding: 0; Text align: center; } Li {Display: Inline-Block; Padding: 3px; }. Wiper {status: relative; Width: 640px; Margin: 0 auto; }. Back {width: 700px; Height: 700px; Background color: black; } .pad {width: 200px; Height: 200 pixels; Z-index: 1; Margins: 10px; -M-filter: "Progress: DXimage Transforms. Microsoft. Elfa (Opacity = 60)"; Filters: alpha (opacity = 60); Opacity: 0.6; } .shape1 {status: absolute; Left: 0; Top: 50%; Margin-top: -300px; Width: 100px; Height: 100 pixels; Background color: green; Limit-Radius: 50%; } .shape2 {status: absolute; Left: 50%; Margin-left: -50px; Width: 100px; Height: 100 pixels; Background color: red; Limit-Radius: 50%; } .shape3 {status: a

c - Linked list structures initialized in functions not being assigned properly -

I'm sure that has been asked before, but not after searching this website or anyone else for it May be quite late. I am having trouble getting the values ​​of the structures that I am creating in a function and am amending I code looks like this: Structure Node {char name [35]; Int employee id; Structure node * next; } Typedef struct node employee; Insert zero in order (employee * head, employee * curu) {if (head == faucet) {* curr- & gt; Next = * head; * Head = * curr; } And {if ((Head-> Employee ID Employee ID) & amp; amp; amp; amp; amp; Employee;> employee ID & Lt; head-> Next-> employee id)) * * Curr- & gt; Next = head & gt; Next; * head-> gt; Next = * curr; } And insertInOrder (head-> next, curr);}}} zero addEmployee (four names [employee] * head, employee * curr) {int id; scanf ("% d", & amp; id); curr = malloc (size (employee); strcpy (curr- & gt; name, name); Curr-> employee id = id; insertInOrder (head, c

How to validate ajax javascript function to check current element id in rails -

I am trying to figure out how a string is or in javascript, when one receives it. I have in my received.js.erb file; $ ("# story_new "). FadeOut (); However, now I also want to play a different element that should get in such a way. Get.js.erb $ ("# story_new "). Fade (); $ ("# Story_siv" lt;% = @ story.id% & gt; ") Fade (); However, only one Ajax call will be available at the time. I thought maybe a if statement works, but it does not know where to start with it. Some with lines; var story_new = "# story_new and lt;% = @ story.id%>"; Var story_save = "# story_save <% = @ story.id%>"; If ........ story_new $ ("# story_new It does not make sense, because JS will not fail, if the selector does not get any element, but if you still want to see the element's existence, then you can do it with the following code: var story_new = $ ("# story_new and lt;% = @ story.id%>"); Va

c++ - CRTP error with XCode 4.5.2 - Parse Issue, expected expression -

I'm using something to implement, but stuck on an error in XCode 4.5.2. The following code is a simplified version that still replicates the error. It is on the line where the method api :: Enable is defined and there is something with the fact that when there is no code when Api :: Enable Call it-> T: Enable enum enum {FOO, BAR, BAZ,}; Template & lt; Typename T & gt; Class AP {Public: Template & lt; Enum E, bool On & gt; Enable Zero () {static_cast & lt; T * & gt; (This) - & gt; Enabled & lt; E, on & gt; ();}}; Class APiIPL: Public API & lt; APIIML & gt; {Public: Template & lt; Enum E, bool On & gt; Enable Zero () {}}; Int main (int argc, const char * argv []) {ApiImpl clsApi; clsApi.Enable & lt; FOO, true & gt; (); Return 0; } Here is a screenshot of error in Xcode:. I get the same error that I use "apple llv compiler 4.1" or "llmm gcc 4.2". MSVC Express 2010 compiles without error.

How to determine that input is an image in MATLAB? -

Therefore the title is fully described in the entire question. ifchar (image_sorce) img = imread (image_sorce); And if Imatrix (image_source) img = image_sorce; End; End; But Imatics returns 0 when the input variable image_source is created with IMed. & gt; & Gt; Help iamatrix Immatics is true if input is a matrix. Returns the return (M) return [MN] with the non-integer integer values, m and n, and logical 0 (wrong) otherwise ismatrix (m) logical 1 returns true (m) If you check its behavior, you receive: ismatrix (rand (10, Ismatrix (rand (10,10,10)) ans = then Ismatrix will only work for 2-D variables Try combining the numeric with a probe on the size of the dimensions, for example, for the 3-D variable where the third dimension should be 3 Should, some (ndim (x) == 3 and size (x, 3) == 3) .

Difference between android:windowBackground and android:colorBackground? -

एंड्रॉइड: windowBackground और android: colorBackground के बीच क्या अंतर है? ? उदाहरण: & lt; शैली का नाम = "थीम" & gt; & Lt; आइटम का नाम = "android: windowBackground" & gt; @ रंग / काला & lt; / item & gt; & Lt; आइटम का नाम = "एंड्रॉइड: रंगबैकग्राउंड" & gt; @ रंग / काला & lt; / item & gt; & Lt; / शैली & gt; कोई नई गतिविधि लोड हो रही है, तो आप किस रंग को प्रभावित करेंगे? विंडोबैकग्राउंड केवल मुख्य विंडो की पृष्ठभूमि को प्रभावित करता है रंगबैकग्राम न केवल मुख्य विंडो की पृष्ठभूमि बल्कि सभी घटकों को भी प्रभावित करता है उदा। जब तक आप इसे घटक लेआउट में ओवरराइड नहीं करते हैं। तो दोनों ही गतिविधि की पृष्ठभूमि को बदलते हैं, लेकिन colorBackground में भी कई चीजें बदलती हैं।

ios - Is there a Google Maps equivalent to mkmapsnapshotter? -

I have a UITableView which could possibly contain large numbers of cells, and some Showing a map of one of the UIImageView cells in a cell whose coordinates are only known at runtime. I want to scroll the table view easily and I want to see the map in cells I have been directed to avoid Apple Maps. In addition, MKMapSnapshotter is iOS 7 and above I have to support iOS 6. So what is my best option? I am already using it in any way, so if possible I would like to use it for that. But is this a feature? Is MKMapSnapshotter equal? I am surprised that I am not getting this document. There is a GMSScreenshot class in SDK, used to take screenshot can go. However in v1.2 Google removed it, because you can use renderInContext instead. Here you can see some background information and sample code: I think that although renderInContext < / Code> (and before GMSScreenshot ) is designed to take a screenshot of a map view that is already on a view, has been

Google BigQuery System Status Page? -

Is there a page that lets me see the system status of Google BigQuery? Today I only see a very long request time for Google BigQuery API (by web browser) some calls returning a 503 - {"error": {"Errors" : "Message": "backend error", "message": "backend error"}], "code": 503, "message": "backend error"}}: [{"domain": "global", "cause" Edit Edit: Delay and disappeared 4:05 MDT today as 503 Only one page that I know right now. That is, I see that others have such a problem. I also see where users can report.

Sending data over TCP from arduino to python -

I am struggling with this for a few hours and in reality it is not known where to go from here . I've got an Ardino Uno with a WiFi shield attached to the network, and the Ubuntu laptop connected to the same network. I am using arduino to connect to the network. I can send data from my laptop to arduino and print it successfully using: sudo nc -l 25565 I Also trying to do the same thing with nc using the following Python code which is also being run as sudo : P> #! / Usr / bin / env python import socket TCP_IP = '127.0.0.1' TCP_PORT = 25565 BUFFER_SIZE = 1024 s = socket.socket (socket.AF_INET, socket.SOCK_STREAM) s.bind ((TCP_IP, TCP_PORT)) s.listen ( Data Conn.recv (BUFFER_SIZE) data: Brake print 'Data received:', data conn.send ('1) (conn, addr) = s.accept () print' connection address: ', while corrected: ECHO ') conn.close () s.close () but it just hangs on (conn, addr) = s () . Using the client python script on the same la

c# - Converting inherited class with generic class property -

IListModel discloses a general inventory property, which is an abstract type of item item item item. But when I try to convert any Derivative orbit to IListModel, I get the "Object reference not set for an instance of an object" error. Public abstract class list itemModel {public string username {get; Set; } Public string SomeProperty {get; Set; }} Public Interface Illustudel & lt; T & gt; Where T: ListItemModel {list & lt; T & gt; Item {get; Set; }} Public Category UserListModel: IListModel & lt; UserListItemModel & gt; {Public string query {get; Set; } Public Intel TotalUsers {get; Set; } Public listing & lt; UserListItemModel & gt; Item {get; Set; }} Public class UserListItemModel: ListItemModel {public string first name {get; Set; } Public String LastName {get; Set; }} Var users = new UserListModel {query = "a", total user = 1111, item = new list & lt; UserListItemModel & gt; {New UserListItemModel {FirstName = &quo

blur - eventhandler (example from JavaScript & JQuery by Jon Duckett) -

फ़ंक्शन चेक उपयोगकर्ता का नाम () {var elMsg = document.getElementById ("feedback"); अगर (elUsername.value.length & lt; 5) {elMsg.textContent = 'test'; } Else {elMsg.textContent = 'Test2'; }} Var elUsername = document.getElementById ('उपयोगकर्ता नाम'); ElUsername.blur = जांच उपयोगकर्ता का नाम; फ़ंक्शन काम कर रहा है, लेकिन कॉल नहीं है। मैं इसे html से कॉल कर सकता हूं (दूसरी अंतिम पंक्ति के साथ, फ़ंक्शन में) मैं गलत क्या कर रहा हूँ? शायद कुछ बेवकूफ है, लेकिन मैं इसे पूरे दिन किया गया है। भी कोशिश की: elUsername.addEventListener ('धुंधला, चेक उपयोगकर्ता नाम, गलत); जे एस var को परिभाषित करता है और धुंधला लापता पर < var elUsername = document.getElementById ('उपयोगकर्ता नाम'); Var elMsg = document.getElementById ("फीडबैक"); फ़ंक्शन चेक उपयोगकर्ता का नाम () {if (elUsername.value.length & lt; 5) {elMsg.textContent = 'Test'; } Else {elMsg.textContent = 'Test2'; }} ElUsername.onblur = che

Where to put Apache vhost configuration (httpd-vhosts.conf or httpd.conf)? -

I just ask a simple question. I am studying vhost configuration, but I am confused why should I keep my vhosts configuration properly? I have a file named httpd-vhosts.conf and Httpd.conf I try to keep my configuration in these 2 files but After restarting various Web projects and my Wampserver, I can access them. Is it okay if I put all my vhost entries in the file httpd-vhosts.conf ? Or should I put it in the httpd.conf wrong. Apache has a global config file, which is usually default or specified in the startup script. This file then uses one or more secondary config files and directories. Different Linux distributions are included in different directories. I think on CentOS that for example you put a file in /etc/httpd/conf.d/example-com (Named as your domain, but anything could happen) .conf :

Implement method only in iOS 8 and above -

इस सवाल का पहले से ही एक उत्तर है: < / p> 2 जवाब मैं लागू करना चाहता हूं -tableView: heightForRowAtIndexPath: लेकिन केवल आईओएस 7 और नीचे में। उपयोग करने के लिए उचित संकलन-समय निर्देश क्या है, जिससे कि मेरी तालिका दृश्य इस पद्धति को नहीं बुलाएगा यदि ऐप iOS8 पर चल रहा है? क्या आपने इसे करने की कोशिश की है? #ifdef __IPHONE_8_0 #else #endif

sql - Convert DateTIme to Date / "int is not allowed" error -

I searched and searched - have found variations on the theme, but there is no real answer to my problem. I need to convert MAX from datetime to date , and put it in a new table I created . Here is my code: INSERT INTO [dbo]. [OPTITE EMails] ([email address], [first optode], [LastAutOutDate], [BOID], [brand_ID]) SELECT [[email_add]. [email_add], [dbo]. [email_add], [dbo]. [Email_add]. [Brand_ID], convert (date-time, max [[first optot date]) [FirstOptAutadet, Convert (Datetime, Max ([E-MailAddance_Samuri]] [LastOutOutDate]) from AS LastOutOut Date [DBO]. [Distinct Email address] [dbo]. [Email address = samurai] on [dbo]. [Distant email id]. [Email adrecise] = [dbo]. [Email address_samuri]. [Email adressed] WHEEE [DBO]. [E-mail Address_samuri]. [Lasta Tetradit] is not [dbo] by the null group. [Specific EM .. AilIds] [emailaddressid], [dbo] [emailaddresses_summary] [bu_id], [dbo] [emailaddresses_summary] [brand_id] ... GO < / Pre> It needs to go into this table:

php - mysql version 5.5.31 load data infile syntax error -

I'm trying to load a table on mysql table host on the table but this is throwing me a syntax error in my MySQL Version 5.5.31 is. mysql -u ykd202 -p -e 'load data INFILE "home / people / corp / intx.csv" table history prescribed by COLUMNS', 'alternatively' to 'avoid' 'Time-fixed by lines' \ n 'IGNORE 1 lines'; 'F2014' The above statement is the name of the database in f2014. And I'm getting the error Enter the password: Error 1064 (42000) on line 1: You have an error in the SQL syntax; Manual, which is in line with the correct syntax for your syntax, check the manual that is used to close the 'line by line' to avoid lines by using the 'connected to optinital' line. > You have posted the following for code: mysql -u ykd202 -p -e 'Load Data Info "House /folks/kosh/intx.csv" set by COLUMNS in Table History ", 'Optionally Avoid' '' '' Time Sorted

sql server - TSQL: How to get distinct values over a period of time but not within my group by -

I'm not sure the title is correct, but what am I trying to do, prepare a composite table with figures Has been done from hour , but I do not need different values ​​for a period of time, not until that time. Example: Date of ID Group ------------------------- 1 1 1/1/2014 11: 00 2 1 1/1/2014 11:00 1 1 1/1/2014 11:00 3 1 1/1/2014 11:00 3 2 1/1/2014 12:00 1 2 1/1/2014 12: 00 1 1 1/1/2014 12:00 2 1 1/1/2014 12:00 4 1 1/1/2014 12:00 The result will be: Calculation group hours ------------------------ 3 1 11:00 2 2 12:00 1 1 12:00 Notice how many times the ID of 1 is displayed within group 1, but only counted once in one hour, but is grouped for one hour. My problem is that I get unique with that time, but if one more hour is counted in the second hour this is my query: Merge dbo.tblStatsHourlyDomainCampaign Use the target as (select (left (conversion (VARCHAR, sl.CreateDate, 120), 13) + ': 00') as the report date, M. domaine, COUNT (separate slim EEMID) Op

oracle connection string with SID in c# -

Image
Hi, I have to connect to an ORCL database (which I know little about) using a Windows application. Applications of windows will not necessarily be in the same system. I just needed the connection string so I used the Connectivity functionality in Visual Studio 2014 to test the connection and to get the string. EDB is the SI which I have read < P> Now, using the above, I was able to connect to the database using this functionality and even in my Visual Studio Server Explorer all the tables of the Oracle database were being shown but I had connections in the windows application There was a need to use the string. So I used the following string: data source = 172.31.8.21: 1521 / edb; USER ID = PDB_E_GND_R I also added the password for this string data source = 172.31.8.21: 1521 / EEDB; USER ID = PDB_E_GND_R; PASSWORD = 123 I get an error when I run the application. System.Data.OracleClient.OracleException: ORA-01017: Invalid Username / Password; logon denied. S

python - Argparse, handle repeatable set of items -

Is it possible to create a set of related alternative arguments that related and repetitive? Let's say I have three arguments - A, -B, -C that sets a set, -a required, but -b and -c are optional (updated) I have the ability to specify many of these sets. Script.py -a 1 -b 2 -c3-A4-C6-A7-B8-A10 Thus Will be defined as a list of [["a": 1, "b": 2, "c": 3}, {"a": 4, "c" : 6}, {"A": 7, "B": 8}, {"A": 10}] One way to repeat the argument is to use an 'append' verb type: import argparse parser = argparse.ArgumentParser () parser.add_argument (' Parser.add_argument ('- c', action = 'append') argv = '-a 1-B2-2', 'parser.add_argument' ('-', 'action' = 'append' C3-A4-C6-A7-B8-A10 'Argos = Parser. Parsa_arag (RGR) .split () print creates args : namespace (a = ['1', '4', ' 7 ',' 10 '

dockerhub - How do docker containers resolve hostname of other docker containers running on the same machine? -

I started using the docker and liked it because the dock containers are light weight VMs. But I can not understand how the Docker Containers may be able to solve each other's hostnames. They can connect each other via IPS, but they are not using their hostnames, I can not edit / etc / hosts in containers so that anyone can do makeup. When I restart the containers, they get different IPs and so I want to use the hostnames instead of the IP to communicate with each other. Let us say that I want to run the zookeeper zookeeper in the containers, and I want to name the ZooKee server hostname in the config (Z.C.G.G.) files. It may be worth checking the Docker links (). When you link to the running container, the host entry is added to join the container in their example they show $ sudo docker run -t -i --rm --link db: db training / webapp / bin / bash root @ aed84ee21bde: / opt / webapp # cat / etc / host 172.17.0.7 aed84ee21bde. . . 172.17.0.5 dB As you see here, they

telerik - modifying IsFilterable of wpf RadGridView programmatically -

I do not have Xam for columns so that I want to set the "IceFilft" program, / P>> I have two checkbox columns, when the first checkbox column check box is also automatically checked in the second checkbox column, this should be the only way. Can you please guide me how can I do this? I got the solution: The way to get your requirement here is. Setting IsFilterable: There are auto-generated columns based on the data you populate with RadGridView from among those columns To change the default settings for anyone, you can subscribe to AutoGeneratingColumn events and work with e.Column, then you may be able to set the visibility of the IsFilterable property. Controlling the check box column: You should pair the two GridWorker checkbox columns in the same or related properties from your grid data object.

java - nested for loop prime checker -

Here's my code. I'm new to programmers in any way, and a user input value, Each import java.util.Scanner; Import java.math. *; Public class Sforprime {public static zero main (string [] args) {double box = 0; Double boxxx = 0; Int po = 0; Int blub = 0; Int no = 1; Scanner scan = new scanner (System.in); System.out.println ("Infolution Number"); Box = scan. NXIT (); Boxxx = Math.0 square (box); (For int bowlman = (int) box; batman> = 0; batman -) {if (no == 1) {no = 0; } And if (po == 0) {System.out.println (blub); Po = 0; } Blub = batman; (Int dot = (int) box box; Mot-gt; = 2; Mot -) {if (po == 1) {} else if (box% mot == 0) {po ++; }} If (po == 0) {System.out.println (blub); }}}} What is happening is nothing after this input of your number does what is going wrong with me? Since you have initial int int = (int) boxxx box% mot and 0 is always increased from 1 And so it never gets printed. Initial speed = Box -1, but you are advised to use the above pr

c# - How to get Scroll to work with a Vertically oriented Hub Control Windows Phone 8.1 App -

I am creating a WinRT Windows Phone 8.1 application. I want to use a vertical hub control with three center segments. However, the Hub is not able to work even after enabling all necessary scrollfire properties on the vertical scrolling hub for control. How do I enable vertical scrolling? Here is my Hub Control & lt; Hub Orientation = "Vertical" Scroll Weaver. VerticalScrollMode = "enabled" ScrollViewer.IsVerticalRailEnabled = "True" ScrollViewer.IsVerticalScrollChainingEnabled = "True" & gt; & Lt; HubSection & gt; & Lt; DataTemplate & gt; & Lt; TextBlock Text = "Hello1" Font Sections = "50" /> & Lt; / DataTemplate & gt; & Lt; / HubSection & gt; & Lt; HubSection & gt; & Lt; DataTemplate & gt; & Lt; Text Block Text = "Hello2" FontSize = "50" /> & Lt; / DataTemplate & gt; & Lt; / HubSection & gt; & Lt; HubSectio

c# - Getting Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool -

The problem I am experiencing over this period is that I am using mysql database more often and working on windows application I am I have also tried to use pen, but faced the same situation Public Bull VerifyStock (string serialnumber) {con = new MySqlConnection (connstring); String readData = "Choose * from Fn_Inventory * where ModelNumber = '" + serialnumber + "'"; CMD = new MySQL Commands (Reading Data, Con); Cmd.Parameters.AddWithValue ("Model Number", SerialNumber); Con.Open (); Dr = cmd.ExecuteReader (); If (Dr. HSRO) {// while (Dr. Reid ()) (Dr. Reid ()) {decimal invquntity = convert toDecimal (dr ["available amount"]. ToString ()); Decimal volume = convert toDecimal (txtQuantity.Text); Decimal sinvquntity = invquntity - volume; If (sinvquntity> = 0) {return false; } And {return true; }} And {return false; }} And {return false; } Con.Close (); } Increasing the size of the connection pool and timing will be quicker.