Posts

Showing posts from September, 2010

c++ - GCC not recognize imread in OpenCV -

I compiled and linked OpenCV project under Visual C ++ Express under Windows, Ubuntu compiled under GBC But there is a link error: finder.cpp | 219 | In reference to the undefined reference `cv :: imed (cv: string cons and int) '. I've added the library: -lopencv_calib3d -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_highgui -lopencv_imgproc -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_photo -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videostab and for example cv: line processor is ok but imread only one error (up to now)

ios - Get info about current simulator device -

As I know I want to know what type of device is using (iPod, iPhone 4 , IPhone 5 etc.) I should but this code works only with real devices and if the work simulator just says: code> iPhone simulator and never mind what kind of information I currently have about the simulator device. Can i The simulator is running as Check Screen Size to determine what device is: ScreenSize: CGRact = USScreenMinesScreen (). Width screenview = screen size. Width; ScreenHight = Screen Size. height; If you want to get the version of OS etc You can use UIDevice.currentDevice () to access additional details:

php - Executing javascript in an an AJAX response - Codeigniter -

I am using Codigniter to redo a website. I have the following control code: public function get_topics () {$ subject = $ this- & gt; Input-> Post ('input_data'); $ Themes = $ this- & gt; Firstcoast_model- & gt; Get_topics_like (theme $); Foreign currency (subject $ $ as Wax) {resonant "and" pre-id = \ "pre_". $ Val ['id'] "\" & Gt; "; Resonance $ val ['formula']; echo" & lt; Generate a unique Javascript file. $ F = "file_" $ Val ['id'] ".js"; if (! File_exists ($ f)); {$ File = fopen ($ F, "w"); $ Js = "\ $ (\" # button_ "$ val ['id']. \"). Click (function () {\ $ (\ "# pre_". $ Val [ 'Id']. "\"). Hide ();}); "; Fwrite ($ file, $ js); Fclose ($ file); } Echo "& lt; script src = \" file_ ". $ Val ['id']." .js \ "& gt; & lt; / script & gt;"; Ech...

jquery - Fullpage.js not scrolling to full height of the content -

I have implemented the plugin but I am having a problem when the content section is too long for the page. As you can see from the following link: And going from any device or desktop to section leaders You will notice that all the tables reach the scroll bar before the end of the scroll bar. So how do I fix this problem so that the scrollbar will see the entire table contents. My full page () Announcement: $ ('# container-event-page'). Full page ({vertical central: false, loop, edge: false, scroll overflow: true, CSS 3: true}); Fix it by removing top padding from the body and apply it to the paddingtop option Full page () Function and it now works perfectly.

How do I specify max screen size in Android Manifest to be 5 inches? -

Image
I want to limit my app to devices that are larger than 5 inches in screen. I have this code, but it seems that works for 4.7 inches: Android: Android: Android: small screen = "falls" Android: common activation = "true" Android: large scan = "True" Android: xlargeScreens = "true" Android: requireSmallestWidthDp = "536" /> Can you help me? Thanks! This way the Android screen splits categories, I do not think you can specify more

driver - Initiating system restart from kernel space -

I have a custom embedded board in which Linux is running, which is under the supervision of 24V power source in a driver's monitor is. If the source goes down then the battery gets more than the power and the IRQ is shut down. I want to start the reboot after 30 seconds running on the battery which gives the board gracefully down. Currently emergency_sync (); Kernel_restart (zero); works but it suddenly brings down the system after almost half an minute of call to the kernel-retest. There is no announcement of resumption and the system normally runs until it does not happen. Can I start an "init 6" or resume with an announcement that closes everything properly arranged from the kernel space (such as turning on reboot on the command line)? I think the function ctrl_alt_del () does what you want is normal It starts a prompt on init to start the reboot sequence.

c# cannot cast object to interface in a method with multiple generic parameters -

I'm playing with generics and try to put one method in the interface with two common parameters , Which does not work. The code below shows the problem: Private void GenericMethod & lt; T, U & gt; () Where T: Block where U: IBlock {var list = new list & lt; T & gt; (); // This Casting works var items = new blocks (); Var iItem = (IBlock) item; Foreach (var l) in the list {// it does not compile var variables = (U) L; }} The block here is a square and IBlock has the interface implemented by this class. Why Casting (U) Fails? How can I do this? If T is obtained from the block, and from IBBlock, u does not mean it if block with ULblock For example: Public category TBlock: Block {Public Zero NewMethod () {}} Public Interface UIBlock: IBlock {void AnotherNewMethod (); } To work this example, you must change where T: block where U: iBlock From P> where U: iBlock where T: block, u make sure that you have inherited Yu.

Adding multiple listeners to the same Firebase in an iOS app -

I have an iOS app that uses Firebase and stores data in dictionaries in the following basic succession ... Users & gt; Projects & gt; Board (The children of the board are the children of the project, which is the child of the user) I have an audience at the project and board level - I started a firebase reference Is the URL for each of these (using the initWithURL). The data stored at the project level is very small and is not updated sometimes (basically like the project name) but the data at the board level is significant enough size and will be updated very often - it Is a live drawing app, so at any time a user has his finger on the board, sending and receiving data. My question: Is there any major reduction in this with 2 listeners in this way, one of which is a child which is constantly being updated, while the parents are relatively stable? Should I take data at the board level outside this hierarchy so that the listener at the project level closes simultaneo...

javascript - How can I stop a function early? -

I have created a time-bound function that starts before the delay for 9 seconds after the page starts. However, I would like to cancel it if a user contacts the divi who is affecting it. Here's my code to call the function. function button changed 4 () {$ (". Button4"). CSS ("background color", "yellow"). Delay (3000) (Work (Next 4) {$ ("Button4"). CSS ("Background Color", "Silver"); Next 4 ();}); }; Var buttonshop3; $ (Document) .ready (function () ($. "Button4"). Delay (9 0000) .Q (function (Nexttoo) {buttonchange4 (); ButtonShop3 = Set enterwall (change button 4, 12000); Nextto ();});}); And my code is to stop the function. $ ('. Button4'). Click (function () ($ (".button4") .stop (); Clear interval (buttonShop 3); $ ('. Button4'). CSS ("background color", "yellow");}); For some reason, even after a delay of 3 seconds it changes the background color...

php - PDO bindValue works for other inputs, why not this one? -

I am creating a form where users can update the features of books. Is a dynamic formatted HTML form where users can enter new values ​​for things like "title", "author", and "description", which looks something like this: resonance "& lt; form id = changerform name = changerform action = updates mm.fip method = post & gt;"; Echo "& lt; span id = titlebox & gt; Title: & lt; input class = attributefield style = 'border: none' type = text size = 100 id = title value = ''. $ Item ['title']. ' / 'Gt; ; Change it? & Lt; / Span & gt; & Lt; Br> "; Echo" & lt; Span id = authorbox & gt; Author: & lt; Input class = attributefield style = 'border: none' type = text id = author value = ''. $ Item ['author'] '' / & Gt; replace it ? From & lt; / Span & gt; & Lt; Br> "; Echo" & lt; Span id = descrip...

C program gets an invalid conversion in a function -

I have commented some error after this lesson, I do not know what the compiler is trying to say to me The last function to list is that I do not have a problem, the problem is that I want to ask the user for 2 characters, after which he will have to send it to a function that will give the string as a password and login Will compare if wire is equal The disease continues. \\ Start the argument 1 of the initial consultant (1, four) \\ \\ Illegal conversion from four * to 'four' \\ #include & lt; Stdlib.h & gt; # Include & lt; Stdio.h & gt; #include & lt; String.h & gt; Invalid introducir_datos (Strict Agenda Client [30]); Zero mostly_data (Strict agenda client [30]); Four consultants (four logins, four passwords); Infrastructure agenda {four numbers [10]; Four epileodes [10]; Int Added; Four Terror [20]; Int codigo_postal; }; Int main (empty) {straight agenda client [30]; Int menu; Four elections [3], login [8], passwords [8]; ("\ N === Ho...

cannot control height w/ percentage in CSS menu -

Image
I have created CSS menu w / submenus using pixel values ​​for dimensions. Now, I see how an idea is stupid, I tried to convert all pixel values ​​to the percentages using constants to make the menu pensioner (code / reference) * 100 . The basic version looks like this: After finishing everything in it, the percentage value ends with it: The main reason for this is that I am still using PX to estimate the height of NAL Lee. Whenever I try to specify that height in percentage, the top menu points (NAL Lee) do not change their shape at all, and when hovering over one of them to bring submenu (NAL Lee Ul) out The top menu point increases in height everywhere. Can anyone tell me what can be done due to this behavior? First of all, CSS that does this is: NAV & gt; UL & gt; Li.hasSubMenu: Hover + Li {/ * It-> * / Margin-left: 25%; } And this: Nevala Ull Lee: Hover> Ul {display: block; Status: Relative; / * And below * / top: -100%; Left: 100%; } Remove ...

Can't generate wicked pdf in rails 4 -

Hi Everyone I'm trying to use the PDF to the wicked 4. I follow this page. I did: Installing Rogue PDF to Mani Then I tried the command Rail G. bad_pdf ### and found "Generator could not be found" I am trying to export a view here Can someone please help me configure bad_pdf? some things Previously, you should have your Gemfile Enter gem 'wicked_pdf' and gem 'wkhtmltopdf-binary' and run bundle install second, Rail G bad PDF instead of the docs you must enter rail g evil_pdf

sql - SQLite compare single value to multiple values -

I have the following: Remove from myTable where someNum = (something of difTable Choose ); My problem is that "return different from some different " value 1,3 which it should, but I will only remove rows = "post-text" itemprop = "text"> You only get back the first value - IN = Use IN instead of operator: Remove from Meritel where there is nothing (select something different);

Hyperlink changes from # to %20-%20 when clicked in Excel -

I got a hyperlink in the Excel 2013 sheet that links to the internal website when I right click and edit the "hyperlink" ", I see it in the address bar (which is correct): https://myserver.company.com/home/default.html# However, when I Left clicked, middle click, or right click -> left open hyperlink then I get the same behavior: IE11 opens and I have a 404 error Not found joins the links) shown below (a. https://myserver.company.com/home/default.html%20-%20article?id=1203291003 what # Can change from % 20-% 20 ? This is very strange because % 20 is a location and there is no place in the URL. It is with MS Excel, in fact, the hash / pound ( ) The icon is a valid character to use in a filename, but has not been accepted into hyperlinks in Office documents . Looks by the conversion design in % 20-% 20 . However, take a look at this question, highlight the same issue, but with Excel 2010: Indicates that this may be a browser problem with I...

c# - How can I connect two parallel 2d polygons to create a seamless 3d mesh? -

Image
Suppose I have two polygons, which is above the other like this: I make my perimeter around a 3D triangle around the circumference I want to connect. This picture shows you in a way that you can do this (orange lines show triangle edges): Such things can be easily done by humans, but I am having difficulty translating it into an algorithm. Polygon as a list & lt; Vector 2 & gt; They will always be easy, and they can be intervals. I will do this like this: For example CW such as curved rule ) Redirect the top order for it It does not have to be exact In but will cause incorrectly errors in production mesh position of the selected center complex concave shapes. Add angular information for each header The angle is easy to use angle for [degree] index: 0 1 2 3 4 green: 355 085 135 170 230 blue: 020 135 255 Now you just match 2 to the nearest vertebra from a polygon to another Do not forget that angle The diffe...

c++ - Get GUID of a monitor? -

I registry based on being used to monitor want to save some of the settings of your program to do , I need to get a unique identifier for the monitor so that it can be sure that there is never an unknowable duplicate (rather than using ./DISPLAY1 or the tool string). The There is no way to get what GUID primary monitor on Windows, or using the Win32 or DXGI?

c++ Class Header - "error: expected unqualified-id before ')' token" -

I should look a bit simpler, but in such a short time I have to do so that I have to do more work. Anyway, here's the place where I'm getting the error. #include & lt; Iostream & gt; # Include & lt; Algorithm & gt; #ifndef number # defined number class number {public: number () {efficiency = 5; Used = 0; Data = New unsigned long [capability];} This is simply a creator for class numbers as follows: The private sector of the class is as follows. Private: unsigned long * data; Used Std :: size_t; Std :: size_t Capacity; }; Again, maybe it's something that I can not see right now and I'm sure others have to run into problems too. Edit: The error is as follows numbers.h: 9: 11: error: before expected inefficient id) 'token number () {capability = 5; Used = 0; Data = New unsigned long [capability];} ^ Run through a preprocessor, It: #ifndef number # defined number class number {public: number () {capability = 5; Used = 0; Data...

excel vba - Run-time error '-2147418113 (8000ffff)': Automation Error -

After "c =" "then" if my code is running completely. At this point runtime error '- 2147418113 (8000ffff)': Automation error has been raised. I have started an error again, to see this, start the next statement again if I leave this line and it gets cured, then it is fine. I do not really understand what this error meant and I was not getting useful information about it. Can anybody bring this problem to light? I have the "if c =" "then" to "that Lennon (c.value) = 0 Then" have tried to change, but all variables AddresRawDataFile raises the same error (range) The form is defined in public and they were determined by taking into a separate module, called PublicVariable, which is said by every process. private sub CommandButton3_Ok_Click () variable as a version "array used to dim MsgAlert string dim as above as MsgBoxAlert each structure dim AddressRawDataFile 'dim for many investigations C message box as the ...

heroku - Rails Data Migration Mystery -

My bank account model and a card model. Currently, both of them have a customer_id and a company_id. I am trying to convert those who are just a molecular collaborator for "owner". I added proper relationships to the model, and then went to write data migrations for all existing customers and companies. This migration looks like this ... Class AddOwnersToCardsAndBanks & lt; ActiveRecord :: Migration Class Card & lt; ActiveRecord :: Base; And class bank account & lt; ActiveRecord :: Base; Card ,: def # changes related to card add_column change again OWNER_ID ,: integer add_column: Card ,: owner_type ,: string # BankAccount related changes add_column: bank_accounts ,: owner_id ,: integer add_column: bank_accounts ,: owner_type ,: string Card.all Do .each | Card | If card.try (: CUSTOMER_ID) card.update_attribute (: owner_id, card.patient_id) card.update_attribute (: owner_type, "patient") end end BankAccount.all.each | Bank_acount | If bank_acount.t...

python - How to insert string into another string with same multiple occurrences -

How can the following syntax be simplified? three = 'three' result = 'one-two-% s, one-two-% s, one-two-% s'% (three, three, three)) Another surprise is: KeyIer: 'border' on: color = '# 262626' style = "Qprogressbar {background color: {PH: s}}". Format (pH = color) & gt; & Gt; & Gt; Three = 'three' & gt; & Gt; & Gt; Results = 'one-two- {pH: s}, one-two- {pH: s}, one-two- {PH: s}'. Format (pH = three)> & gt; & Gt; & Gt; Print result one-two-three, one-two-three, one-two-three edit : & Gt; ; & Gt; & Gt; Style = "QProgressBar {{background-color: {PH: s}}}". Format (pH = color)> gt; & Gt; & Gt; Print style QProgressBar {background-color: # 262626}

Modify object via Python multiprocessing.Pool: strange behavior -

I have an object with two characteristics: a dict and an int. When I modify the object using a forked process through multiprocessing. Poll, I take the object back with the modified int attribute, but the word is not modified. Why is it like this? Some Diff Forks () from Multiprocessing Import: For some classes () I in range (10): someObject.method (i) print ("In the fork, some object is Dct =% s and nbr =% i" % (SomeObject.dct, someObject.nbr)) Some object def test (): pool = pool (process = 1) result = pool.apple (func = fork) prints ("main, some objects in DCT =% s and NBR =% i "% (result.dct, result.nbr)) class some object (dct = {} nbr = 0 def method (self, nbr): self.dct [nbr] = nbr self.nbr + = Nbr if __name __ == '__ Main__ ': test () in output: , fork, someObject in dct = {0: 0, 1: 1, 2: 2, 3: 3 In main, some objects in dct = {} and nbr = 45, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9} and NBR = 45 SomeClass.dct and SomeClass.nbt From the ...

jquery - data-value as a selector? -

इस सवाल का पहले से ही एक उत्तर है: 10 उत्तर मेरे पास यह div है: & lt; div डेटा-मूल्य = 'उदाहरण 1' वर्ग = 'आइटम' & gt; उदाहरण 1 & lt; / div & gt; मैं इस div को डेटा-वैल्यू का चयन करने की कोशिश कर रहा हूं और यह कैसे करना है इस बारे में उलझन में है? नोट: मैं एक प्लग-इन का उपयोग कर रहा हूं जो कि दिए गए क्लास और आईडी दोनों पर निर्भर करता है ताकि बदलते / जोड़ने वाले वर्ग और आईडी एक समाधान के रूप में काम नहीं करेंगे। प्रत्येक div का एकमात्र अनूठा मान डेटा-मान है, जिसे मैं चयनकर्ता के साथ लक्ष्य करने की कोशिश कर रहा हूं। $ ("data-value = 'example1')। क्लिक करें (फ़ंक्शन () {चेतावनी ('हैलो')}) मुझे पता है कि ऊपर गलत है, लेकिन यह वही विचार है जिसे मैं शूटिंग कर रहा हूं। कोई भी विचार? आप शायद लिखना चाहते थे: $ ( "Div [डेटा-मूल्य = 'उदाहरण 1']")। क्लिक करें (फ़ंक्शन () {चेतावनी ('हैलो')});

postgresql - row number 0 is out of range 0..-1 returned when using setSingleRowMode libpq -

मैं PQsetSingleRowMode का उपयोग करके पंक्ति को एक बार पुनः प्राप्त करने का प्रयास कर रहा था। अंतिम 3 पंक्तियों को छोड़कर परिणाम संख्या ठीक है, पंक्ति संख्या 0 के साथ वापस की जाती है 0 ..-1 यह मेरा मुख्य कार्य है: int main () {/ * डेटाबेस से कनेक्शन बनाने के लिए कोड ठीक है, इसलिए मैंने इसे छोड़ा * / PQsetnonblocking (conn, 1); Const char * DML_statement = "itsdb.PvKeyword से चयन करें"; Int स्थिति = PQsendQuery (conn, DML_statement); Int हैसिंगेमोड = PQsetSingleRowMode (conn); Res = PQgetResult (conn); Cout & lt; & lt; "अगर 1 सिंगल मोड होता है तो प्रिंट करें:" & lt; & lt; isSingleMode; चार * फ़ील्ड 1; Char * field2; चार * फ़ील्ड 3; जबकि (PQgetResult (conn)! = NULL) PQresultStatus (Res)! = PGRES_TUPLES_OK || PQresultStatus (Res) == PGRES_SINGLE_TUPLE) {res = PQgetResult (conn); फ़ील्ड 1 = PQgetvalue (res, 0,0); Field2 = PQgetvalue (रेस, 0,1); Field3 = PQgetvalue (रेस, 0,2); Cout & lt; & lt; फ़ील्ड 1 & lt; & lt; "," ...

Sending automatic emails with java -

मुझे मेरे वसंत एमवीसी आवेदन से प्रत्येक निश्चित समय पर स्वचालित ईमेल भेजने की आवश्यकता है I टिमर टिमरटस्क मेरा सवाल यह है कि मुझे उन ई-मेल भेजने की ज़रूरत है, भले ही पीसी बंद हो, मुझे लगता है कि मेरे कार्य में मेरे पास कुछ प्रकार का सर्वर है यदि यह कार्य केवल द्वारा नहीं किया जा सकता है मेरे आवेदन का उपयोग करना अगर यह मामला है तो मुझे यह काम करने के लिए अपने सर्वर से क्या करना चाहिए? धन्यवाद अग्रिम में यदि आपके पास एक सर्वर है, तो आपको बस अपने स्प्रिंग एप्लिकेशन को शेड्यूलर के साथ तैनात करना होगा। यहां वह समय कॉन्फ़िगर करें जब आप भेजना चाहते हैं, सर्वर को अपने शेड्यूलर कार्य को पूरा करने के लिए चलना चाहिए।

java - How to use maven outside company's network? -

मेरा ~ / .m2 / settings.xml जैसा दिखता है & lt; सेटिंग & gt; & LT; pluginGroups & gt; & LT; pluginGroup & gt; org.inst.maven_inst_plugin & lt; / pluginGroup & gt; & Lt; / pluginGroups & gt; & LT; दर्पण & gt; & LT; दर्पण & gt; & Lt; id & gt; स्थानीय केंद्रीय दर्पण & lt; / id & gt; & LT; mirrorOf & gt; केंद्रीय & lt; / mirrorOf & gt; & LT; यूआरएल & gt; http: //maven.corp.org.com: 9999 / भंडार / सार्वजनिक & lt; / यूआरएल & gt; & Lt; / दर्पण & gt; & LT; दर्पण & gt; & Lt; id & gt; स्थानीय कोडहाउस स्नैपशॉट मिरर & lt; / id & gt; & LT; mirrorOf & gt; codehaus & lt; / mirrorOf & gt; & LT; यूआरएल & gt; http: //maven.corp.org.com: 9999 / निकटता / भंडार / codehaus & lt; / यूआरएल & gt; & Lt; / दर्पण & gt; & LT; दर्पण & gt; & Lt; id & gt; स्थानीय कोडहाउस दर्पण & lt; / id & gt; & Lt; दर्पणऑफ़...

python - Modify the width of a cell with Xlwt in Django -

This is the code that I have in my view.py to download notification of a template in a special file: def descarga (request, id_factura): really = Factura.objects.get (p = id_factura) book = xlwt.Workbook (= 'UTF8' encoding) sheet = book.add_sheet ( 'report' ) align = xlwt.Alignment () alignment.horz = xlwt.Alignment.HORZ_LEFT alignment.vert = xlwt.Alignment.VERT_TOP style = xlwt.XFStyle () # Create style style.alignment = alignment # style Add alignment header_font = font () # Header Font Preferences header_font.name = 'Ti mes New Roman 'header_font.height = 20 * 15 header_font.bold = true # header cell style definition header_style = XFStyle () header_style.font = header_font body_font = Font () # body font preferences Body_font.name =' Arial 'body_font.italic = True border = borders () borders. Left = 1 bore ders.right = 1 borders.top = 1 borders.bottom = 1 header_style.borders = borders # body cell named style definition body_style = XFStyle ()...

selenium webdriver - How to judge whether an element does not exist? -

I want to stimulate a case when an element does not exist, but it throws an exception. I have to wait unexpectedly Waiting time is another better way? This is not clear from your question, but if you have a case of testing when an element does not exist, Then use findElements instead of findElements . Something like this: driver.field elements (// your criteria) Even if your element does not exist, This error does not throw away 'instead it returns an empty list, you can use the size method to check! Hope it helps.

Laravel Eloquent query with optional parameters -

I am trying to figure out whether to pass a variable number of parameters in a query in the echo The easiest way is, hopefully using a array . There is no way to do this without looping through the input of what I can get, see what was set in the request. Here the example: This will work, but in its complexity / interest, I experience non-larval. Here's where I am, and this is not possible, just someone else has solved the same problem: $ where = array ("user_id" "=> 123," status "=> 0," some more "=) & gt; "Some values"); $ Order = order :: where ($ where) - & gt; Find () - & gt; ToArray (); Return Feedback: JSON (array ('order' =>> $ order), 200); This returns an error on the course strtolower () is expected to be a string of parameter 1, given array . Is this possible? Order :: Where actually provides an example of a query builder, it is probably easier than you think. If you ...

java - Puzzling implicit conversion during Array map() -

I have a usage case where I get the Java array of wrapper sections, for example wrapping a gut, and I want to I wanted to convert them to the same data value, but I had a problem with missing conversions here. Here's an example of Java and Scala that I'm trying to do: .. / java / demoapi / somewrapper.java package demo; Public Class SomeWrapper {public static final full JavaOne = 1; Public stable final end JavaTwo = 2; Public int m_theInt; }; ... / scala / demo.scala package demotest import demoapi._Office extension of TestEnum calculation {val one, two = value} object SomeWrapperEx {in Java (from: array [SomeWrapper]): TestEnum.ValueSet = {in.map (x = & gt; fromInt (x.m_theInt)}} def fromInt (in: Int): TestEnum.Value = {match {Case SomeWrapper.JavaOne => TestNen.A case: SomeWrapper.JavaTwo => TestEnum.Two}}} The map fails to compile with the following error: error (11, 27) values ​​m_theInt is not a member Demotest.TestEnum.Value in.map (x = ...

android - How do I test a that crouton message ALERT was displayed using espresso -

I am doing automated testing using espresso, generally if I have a message, then I see TextView or I use the resource ID to test the element. This way onView (withId (R.id.myTextViewID)). Check (Matching (string ("checking message")); Now there is a problem with crouton ALERT messages, I do not know which ID to check with. This should do the trick: onview (with text (string ("Messages that you are checking")).) Tests (matches (some ()); matches () section already checks That view is present in the scene hierarchy, I think that to test You can change the isDisplayed () with some () , if it does, but this check may fail if it has been done immediately when Crouton The view has been added to the view hierarchy, but partially still is not visible.

ios - How can I check if a UIButton is being held down? -

Is there a way that a button with a xcode and swift one finger is coming? I am using SprintKit and I want to know whether a button is being touched in the update method. You can create a UILongPressGestureRecognizer , for some time (1 second ), And set a flag to which a button is being touched. On release (to be a representative method), toggle the flag.

c# - Why is the stream left open in this code? -

I have a question about a piece of code from the book: C # Exam 70-483 in the programming code is here: WebRequest requests = WebRequest.Create ("http://www.microsoft.com"); WebResponse response = Request GetResponse (); Streamer feedbackflow = new streamerdidder (feedback. Gatesresponsescrew ()); String feedback text = response light Readout (); Console.WriteLine (responseText); // displays HTML of the website. Stop it (); My question is why does the feedback stream stop in this example? Why is the feedback object closed only? As NSGOSW said, Docs says that the call to the web resolution stops the underlying current. Then there is no point in trying to close it. But I can not help answering and can not take into account that in the example code processing does not do anything to save itself from the leak. If the exception occurs, whether in your code or in communication with remote web servers, the feedback will not stop and the underlying stream will not be rele...

Drop a MySQL event if a condition is met -

मेरे पास तालिका (table_rne) है id maxv curv 1 200 20 और मैंने एक इवेंट (वृद्धि_curv) बनाया है जो प्रत्येक 1 मिनट में 10 मिनट तक 'करव' बढ़ाएगा। अनुक्रमित प्रत्येक 8 सेकंड पर अनुक्रम वृद्धि_curv बनाएँ UPDATE table_rne SET curv = curv + 10 WHERE आईडी = '1'; लेकिन मैं घटना को छोड़ना चाहता हूं जब 'करव' अधिकतम-वी (200) तक पहुंचता है। ऐसा कैसे करें कि MySQL शर्तों का प्रयोग करना है? आप ऐसा कुछ करने की कोशिश कर सकते हैं; अनुक्रमित करेंइंडैक्रव ईकाई बनाने के लिए हर 8 सेकंड अगर कर्व & lt; 200 फिर अद्यतन तालिका_आरएन SET curv = curv + 10 WHERE id = '1' ELSE ड्रॉप इवेंट [यदि मौजूदा] increase_curv END अगर;

angularjs - Compile custom directive before ui-bootstrap directive -

I am trying to make my own instruction for a datepicker, so that when the page is opened on mobile device The input type change is displayed instead of the UI-Bootstrap date picture, which is still showing on the desktop, and the original date picture is changed to type = "date" . I want my instruction to be compiled first, so I can remove the UI-Bootstrap date picture instruction inside my command's compilation function and it is not compiled. Is there any way to do this? I have already tried setting priority: 99 99 on my directive but still the U-BootStrap instruction gets compiled first. I'm just trying something like this: A corner instruction priority starts with 0 (which means most important). Therefore, if you want your instructions to be executed first, then you must specify priority: 0

ajax - PHP: Run function in background (and track it?) -

I have several parts of this problem. First of all, I have found a website and I can import data from another system I am trying, but the import may take a few minutes. Meanwhile I want to let the user go and continue to work on the website, I want to run the import in the background. I am doing my Dev on a local WAMP server, but test and production environments are Linux. I have given many answers here, some people suggest using the pcntl_fork () , others recommend running a command-line PHP script and others Ajax suggests. My problems with each of these problems: pcntl_fork () uses another example of Apache, Which is not what I am Ajax closes the website until the import is complete. I'm trying to run a function instead of the entire script, so I do not believe the command line will work. Does anyone have any idea how to run this specially in the background? Apart from this, in any way to check and see if the process has been completed?

java - How to take the square of a number in Android -

I'm trying to create a number squad (for example, x ^ 2) in the Android code, Error: Operator ^ Logic type (s) int, Boolean is undefined for a different way for a number / variable class in Android? Do this as you do in core Java. Math.pow (yournumber, power) works yournumber ^ power . import java.lang *; Public class MathDemo {public static zero main (string [] args) {// two double numbers double X = 2.0; Double y = 5.4; // printed by x and then y system.out.println ("Math.pow (" + x + "," + y + ") =" + + Math.pow (x, y) ; / / X ^ Y system out. Printline (works like "MathPo (" + y + "," + x + ") =" + Math. Pow (y, x)); y ^ x} }

MP3 audio stream in c# with Media Player component -

I am using Visual Studio 2012 on Windows 7 to create a small program to listen to a live stream at http Can go I felt it with the Media Player component and it works well for a few minutes ... The problem is that it stops streaming after about 4 to 5 minutes. When I want to play again, the last 5 minutes of Bufford Stream starts playing again from the starting point. How do I continually tell the media player to buffer live streams for countless times? Experience the same problem for everyone: I created a php file The stream from which the content is read, sets the MP3 content type and outputs the stream to the file ... I wanted to save bandwidth on my streaming server from the streaming server to just one connection to the PHP server. .. It was not a good idea! This was the solution to the problem: Using the original URL to file MP3 on a streaming server via Portal 8000 That Android and C # Media Player component But solved the problem for me.

plot - Find Range of Values in Matlab Figure -

I want to find a range of values ​​between the two points in Matlab statistics. I made this figure is using plot () . Now this figure will be used as input and as output, I want the value between the point A and B . Note: Points A and B are using Photoshop mentioned in the picture which are not part of the plot , Just clear the question for it HC = get (GCA, 'children'); Data = get (HC, {'xdata', 'ydata'}); T = data {1}; Y = data {2}; TA = 250; TB = 1000; The% TA score is starting and TB is the last point of the data, as the ur figure is yinterval = y (t> = tA & amp; t & lt; = tB); Display (yinterval);

java - RCP application display menus listed in ApplicationActionBarAdvisor -

I need some help in displaying menus in my RCP application. I think there are two ways to display the menu 1 & lt; Extention point & gt; By specifying the Plugin.xml 2. By applying the menu in ApplicationActionBarAdvisor.java. I am able to see the menu specified in the plugin .xml file, but unable to see anyone specified in the ApplicationActionBarAdvisor. The Java class specifies me in the plug.xml to reflect it Is there a requirement? Below is the code in the application actionbara adver public class ApplicationActionBarAdvisor Extends ActionBarAdvisor {Private IWorkbenchAction saveAction; Private IWorkbenchAction saveAsAction; Private IWorkbenchAction introAction; Private Menu Manager new menu; // // Actions - It is important to allocate them only in the operation, and then use // // in the methods of filling. This ensures that the actions are not reproduced / when the fillActionBars are called with FILL_PROXY, the Public Action Airebrier Advisor {Super (Configu...

c# - Data class public properties to Dictionary -

I use the following code to convert the public properties of my class into a single dictionary: Public Stable Dictionary & lt; String, Object & gt; ClassPropsToDictionary & LT; T & gt; (ClassProps) {classProps.GetType () returned GetProperties (BindingFlags.Instance | BindingFlags.Public) .toDictionary (prop = & gt; prop.Name, prop = & gt; prop.getveralu (classProps, tap)). ; } This works fine, but I do not want to refer to the class reference: public class unit {public virtual string description {get; Set; } // Fine Public Virtual Employee Employee Employee {Received; Set; } // do not want it} What binding flag do I want to avoid from the employee's member? Thanks where with IsClass Use the property: classProps .GetType () .GetProperties (! BindingFlags.Instance | BindingFlags.Public). Where (x => x.PropertyType.IsClass) .ToDictionary (prop = & gt; prop.Name, prop = & gt; prop.getValue (classProps, tap)); There is...

eclipse - Java 'project manager'? (comments, class view, etc...) -

Reading the files of some open source Java projects, I think I am not using all the advantages of the current developer tools Has to offer. Commentaries are often included in: @complete @ returns {@link * classname *} etc. Is this the only 'good' style / best practice or does it mean that the developer has used some kind of device to make its code easier for others to read? If so, can you start with some recommendations? I am currently using a very light version of eclipse and thought it would be enough, but if it is the common way of using such tools, most programmers use it, There are good reasons for this. This is a syntax that creates a document for your Java classes. Since you are still using Eclipse, do this: Click on "Window" -> "View" -> "Other" -> Type "javadoc". Open Jadavo Opinion This view shows you how documents will be provided after all. Now open any of your classes and type "/ **...

objective c - panGestureRecogniser and table cell delete -

I'm having some problems with the conflict of many types of work I am using SWRevealViewController to create a sidebar And it works with the following line: self.view.addGestureRecognizer (self.revealViewController (.). PanGestureRecognizer ()); However, this is working on the same page as TableView , where allowing deleted buttons to work on swipe left on rows Meets. If I have a piggystarscrever then the delete button will not work on the table table because it is difficult to hit it properly. If I comment on this line of code, then swipe works perfectly to remove thanks "post-text "Itemprop" = "Text"> I believe it can be linked to: However, I believe How does it implement with my code and table cells in default swipe (as I'm not actually calling a UISwipeGesture anywhere)

java - How to validate single property of a bean at one time in Spring MVC using custom validator? -

I need to send a forgotten password link via e-mail, once the user has entered his email Must be valid only. I had the same pauso confirming the email, password and password. Similarly, when the link sent by the user is clicked, his form has been shown to enter and now use these two attributes to be valid for confirming the password. I had only one custom validator to perform that recognition. So is there any way to do this? My code below User.java public class user {private string name; Private string password; Private string confirmation password; Public string getName () {return name; } Public Zero Setname (string name) {this.name = name; } Public string getPassword () {return password; } Public Zero Set Password (String Password) {this.password = password; } Public string getConfirmPassword () {confirm the return word; } Public Zero Set Configure Password (Confirm Confirm Password) {this.confirmPassword = confirmPassword; } MyController.java snippet @RequestM...

sqlite - I want to delete images from database using ios page controller -

I want to delete images from the database (eslite) using the iOS page controller, but it is not working properly is. I have this user ID, page number and image in the database using the three fields in the image table. When I want to delete a record based on the page number, it is working fine for the first time, but the next time it is not removing the images database (sqlite).

vba - FindFirst in opening Form -

I have an overview form (list with all numbers and titles) which has a search field Form opens an issue Each number has a special number, so it can be identified by this number. Now I want to use this search function to get the detailed information (only one problem is shown in the detailed information form). There is no problem opening the form but the findfirst command does not work. So it does not show the right point. Private Sub-SemiqumosechClick () 'Search Function - Check NMB and Optional NMB DIM Dat Searchmbel Long If Lang (NJ (Mettquamosearch)) and LT; & Gt; 0 then doCmd.OpenForm = DCount ("*", "tblNumber", "[NMB] =" and searchNMB & or [NMB optional] = "& findNMB) then searchNMB = MEETCQM "NMB linking form", AC vevonormal with m. Recorcit. Source = "SELECT * FROM TblNumber" .FindFirst ("[Nmb] =" & SearchNmb & OR [Nmb optional] = "& SearchNmb) & with MSBbox Finish (...

devise - Rails cucumber simple test, step redirect after login_as -

I am new to the BDD approach and I am studying to write this in all my future projects. I am trying to run a simple test in which the user must log in to access a particular page (create a new mail page) and fill out the field form before submitting. It seems that I was able to manage the entry since the passage of examination, but when I try to access the Fair Pages, I always welcome / The index is redirected, which I do not understand. As a result, I'm unable to receive the "Failed" message in the "Next" button. Here are my files that help you to understand my problem: Fairs Feature: In order to make a new fair, a user must be logged in order to make a fair, proper form Fill the scenario: Make a new fair, which I have logged in as a superuser and I am on the Junk Mela page and I fill out the "Name" when I press "Create Fair" then a new object must be made with success create_fair_s Teps.rb (only with the problem I have): ...

objective c - loading big xml file -

What I'm trying to load a large file server, but it always seems to be very slow to load you me Methods can suggest, how to load faster, then 200k objects? data printing Details: (Ansdita *) data = 0x08e51d80 151341098 bytes NSURLRequest * urlRequest = [NSURLRequest requestWithURL: url]; NSOperationQueue * queue = [[NSOperationQueue alloc] init]; [NSURLConnection sendAsynchronousRequest: urlRequest queue: queue completionHandler: ^ (NSURLResponse * reaction, NSData * data, NSError * error) {if (error) {NSLog (@ "error,% @", [error localized description]); } Else {NSLog (@ "% @", [[NSString alloc] initWithData: data encoding: NSASCIIStringEncoding]); }}]; Two point: You can use the file Instead of catching the entire NSData in the memory output stream for network requests, for example, AFNetworking supports such options. You can use the SAX parser with stream support to separate your data from the file, again, avoid loading full XML memory. Fo...

html - Comparing the excel cell value while importing in spring -

I am importing Excel data using HTML, Spring and Apache POI APIs. I need some assumptions before saving the data. For a cell, I need to check that its value is greater than 01 and less than 32. I cell .getStringCellValue () Have seen like regex; I have used this in a solution like this if (cell.getStringCellValue (.) Matches ("\ b ([1-9 ] [12] [0-9] | 3 [01]) \ b ")) But as I read, using regExp to compare numbers is a good idea No, it's mainly for strings. So my question is, is there a better way to solve my problem, to find out whether the cell value comes within a range or not You must add [1- 9] before 0 to 01 to In order to match the number limit of . \ b (0 [1-9] | [12] [0-9] | 3 [01]) \ b

event tracking - custom variable issue in google analytics -

Using the following code to track users' clicks by using Hi Custom Configurator. But my custom variable has been reported that counting is increasing for user logging, but not for button click event. In a variable, the User ID is logged in as a login in the login and custom variable method. jQuery .ready (function () { jQuery ('# buybutton') .on ('click', function () { _gaq.push (['_setCustomVar', 2, 'gaid', & lt ;? php echo (json_encode ($ userName)) ;; & gt; 1]); _gaq.push (['_ trackEvent' , 'Button-webtrader', 'click', 'webtrader-buttonclickevent']);});}); I have found a solution for this. Instead of custom variables, I used Event Tracking to achieve this. I have used the following function in the click event of the button. _gaq.push (['_ trackEvent', 'button-category', 'click', 'user clicked: & lt;? Php echo (json_encode ($ userName)) ;; & gt; ']);...

game engine - Unity3d How to support different screen size in Portrait orientation -

Therefore, I know in Landscape Orientation Game, I can create a background that is sufficient to accommodate the wider possible screen Is (like 16: 9). Extra backgrounds for wide screen are only ignored on other aspect ratios. My problem is that my game is in portrait mode (like space shooter game), I want to cut extra background in unity, vertical direction, not horizontal direction, currently, unity in the left Leave the background and right on some screen sizes, I want to ignore the background above and below it on some screen sizes. I do not want to resize the camera aspect. So how to do it? Thanks! While preserving aspect ratio, according to the width of the screen, manually re-size your background Please give it.

functional programming - Java 8 fill array with supplier -

Is there a way to fill an array using Java 8? I would like to write: Supplier & lt; Object & gt; Supplier = () - & gt; New object (); Object [] array = new object [size]; Arrays.fill (array, supplier); Note: I know that I can write my own method. when you fill out an already existing ARA View data from the supplier, or use it with creative solution: arrays.asList (array) .replaceAll (x -> supplier.get ( )); // If you have no problem with creating a new array , then you use `subList` You can also overwrite a category. You can use object [] array = stream.generate (Supplier), filled with the results generated by the supplier .limit (arraySize) .toArray (); You can use toArray (IntFunction & lt; YourType [] & gt; for different types of / / objects / ^^^^^^^ will return the new array; generator); as toArray (YourType [] :: new) (). string [] array = stream.generate (Supplier). Limit (10) .toArray (String [] :: New;); ...

how to include and execute php variable with html and other php variables in it -

I'm stuck ... I have a variable that contains html (sometimes javascript) and php code (other variables) It's stored in a MySQL and DB. Actually, what I have to do, put the variable in a page -> what works, but the php code is not executed, just like it looks like txt. So I'm exploring a way to insert variables so that php code can be recognized and executed (wars are included) .. What I have tried so far: (very simple) Sample code is stored in DB: Image Wise (new_p_img): & lt; A href = "product.php" & gt; & Lt; Img src = "new.png" alt = "new product" width = "250" height = "250" & gt; & Lt; / A & gt; Image display code Var (new_p_dis): & lt; Div class = "new-products" & gt; & Lt ;? Php echo $ new_p_img; ? & Gt; & Lt; / Div & gt; I try to display in the site This code is fully displayed in the source code but the PP echo code has not been ...

html - CSS image as background with overlaying gradient color -

I have a picture as the backdrop of the list element. I want to make a gradient of the background image overlay of the list item which should be transparent CSS foreground, the image overlay should be like this:. .listItem {background: linear-gradient (white, black); Opacity: 0.2; } I can not wrap a div around the list element, because the structure does not accept it. .. this is your CSS .listItem {Try in the background: Linear-Slope (RGBA (255, 255, 255, 0), RGBA (0, 0, 0, 0.5)), URL ('http://t0.gstatic.com/images? Q = tbn: ANd9GcSEtKrXuUIiURHP7PFGY_cdYDXyuWhilTgWHkJxZRWAt3-tlSy6epfAAFQQ ') Do not repeat; Background size: cover; } You can use the RGBA color, which will be opacity properties with general hope The colors are better than it will help you

jquery - On click add class current to single targeted menu item from anywhere on the website -

I only have to use jQuery to turn the class on a specific menu item, but from anywhere in the site I I want to add this link to make it effective Currently I have some jQuery citations that click on any menu item as class "on" and removed it from the previous active link. So I have a portfolio page of portfolio links, will exit between different categories and sub categories, and currently you can click on them from anywhere on the site and on this portfolio page Goes, but currently Portoli adds the current class to the menu item. The following are links, when any of them are clicked, they only need to influence the header menu item portfolio, which will be "Data-Goto =" 2 "and the menu below It is shown that the menu leader should start the class: ; Li class = "people" & gt; one class = "toggle PT-trigger" href = "#" data animation = "59" data-gotto = "2" data-toggle = "# people" ...

python - Netflix API - alter video? -

So I want to know whether to write a video that is to change the video written on netflix, writing scripts or for the service A plug-in An example: a 22-minute show. Let's say I want to leave the first 2 minutes and release the video from there. I mean, there should be some way to do this, I hope it is if (Video. Play) then video. Play (Timestamp) or something like this if (colorcode) then skip.frame (); or whatever. For Silverlight playback, you can get a reference on the video object that their site has the following javascript ( Such as using something like Tamparkki): var vp = netflix. Cadmium.objects.videoPlayer (); Vp.seek (60500); / / In millisecond See also the comment at the end.

javascript - Deploying Meteor 0.8.3 application to Heroku -

Recently I was trying to deploy the meteor application to Hiroku but the current version of BuildPack is outdated, so I Has spent some time working with the latest meteor release 0.8.3. You can find the buildpack repository here and if anyone shows the whole process of the movie step-by-step , So please hope here that it will help you :).