Posts

Showing posts from September, 2015

Hibernate ORM - supporting Java 1.8 Optional for entity properties -

I am trying to use java.util.optional in some continuous classes. Is there any alternative way to do this work? I have tried to use UserType, but it is not possible to handle it in any way, alternatively without mapping the SQL type (not acceptable) I also tried to use JPA converter, but it I do not support parametric types, I can wrap it using letters and setters, but it is more like hack than solution public square Las {private Other MyOtherClass; Public Optional: & lt; MyOtherClass & gt; GetOther () {Optional Optional. Return (other); } Public Woud set other (optional other) {this.other = other.orElse (null); }} Thanks! As explained, you can not do this java.util.Optional is not optional as serializable You can use the optional container in the gateer / setter methods. Being in hibernation can then take the actual type from the unit attribute, while recipients and setter optional : can use the personal string name Are; Public alternat...

Unable to start MongoDB MMS agent -

I have installed MMS agent for CentOS and when I start it as a service, I see the following error. I searched for this error, but no reference can be found, someone can tell me what the problem is. / usr / bin / mongodb-mms-monitoring-agent: error while loading shared libraries: Libsasl2.so.2: can not open the shared object file: such a file or directory thanks. I wrote to support Monggab and after his reply, I was able to start the agent, The response was: For my best knowledge, Fedora 20 is equivalent to RHEL 7, which is not yet supported by the Mongodiib, it has been planned for the OS, but I Can not guarantee a timetable for release Meanwhile, I believe it is possible to work with the following with this issue: CD / Lib64 sudo ln -s libsasl2.so. 3.0.0 libsasl2 .so.2 Hope this helps, and allows you to start the agent. Thanks to André de Frere from Mongodybi.

linux - Ordering requirement for a combination of the redirection operators < and > -

I have found that these two commands have the same output, when typing: 1 cat & Lt; File 1 & gt; File2 2. Cat & gt; File2 & lt; File1 It is confused whether there is an order requirement when using these redirection operators? As Matt Macbone points out, & lt; File 1 and & gt; File2 Basically assignments are interpretted before running the command. They are very much interpreted input = "file1"; Output = "file2"; Cat execution versus output = "file2"; Input = "file1"; Cat execution Which is clearly the same. However, in some cases the order is a matter! Cat & gt; Foo 2 & gt; & Amp; 1 : output = "foo"; Error = output; Cat execution In this case, the error and the output are identical with the comparison of the cat 2 & gt; & Amp; 1 & gt; Foo : error = output; Output = "afu"; In this case, output is set to "foo" , while error...

php - Calling environment variables inside class not working -

I'm not sure why this is not working? I want to be able to access the set set in my .env.php file, but NetBeans is showing an error that the getenv function is not recognized. This is my code & lt ;? Php class Blast Extends Lectures {... Protected $ connection = getenv ('DB_NAME'); } Set the value of the class from the manufacturer. class Blah provides eloquent {protected $ connection = null; Function __ conversion () {$ this- & gt; Connection = getenv ('DB_NAME'); }}

javascript - Anchor tag overridden by div's onclick upon adding target="_blank" -

यह मेरा (वर्किंग) कोड था: & lt; div onclick = " location.href = 'http: //somewebsite.com/'; "& gt; & Lt; a href = "http://someotherwebsite.com/" & gt; लिंक & lt; / a & gt; & Lt; / div & gt; अगर मैं लिंक पर क्लिक करता हूं, तो मुझे इसमें ले जाया जाएगा अगर मैं div में कहीं और क्लिक करूँगा, तो मुझे इसमें ले जाया जाएगा फिर, मैंने तय किया कि मैं लिंक पर क्लिक करने के लिए एक नया टैब खोलना चाहता हूं, इसलिए मैंने इसे अपना कोड बदल दिया: & lt; div onclick = "location.href = 'http: //somewebsite.com/';" & gt; & Lt; a href = "http://someotherwebsite.com/" target = "_ blank" & gt; लिंक & lt; / a & gt; & Lt; / div & gt; हालांकि, अगर मैं अब लिंक पर क्लिक करूँगा, तो मुझे इसके बजाय ले जाया जाएगा! जाहिर है, मेरे एंकर टैग के लिए target = "_ blank" जोड़कर मेरे एंकर टैग के href को ओवरराइड करने के लिए मेरे ऑनक्लिक विधि उत्पन्न हुईं I क्या हो रहा...

javascript - jQuery mobile pagecontainer load() -

यह कोड क्या करता है? $ (": मोबाइल-पृष्ठ कंटेनर")। पृष्ठ कंटेनर ("लोड", "# स्वागत 2"); मेरे पास एक jQuery UI स्वत: पूर्ण इनपुट बॉक्स है जो मैं आरम्भ करता हूं, लेकिन यह केवल तभी काम करता है यदि निम्न में से कोई भी सत्य है: मैं खंड पर कॉल करता हूं । # welcome2 ( # welcome1 से आने के बजाय) पर आगंतुक शुरू होता है संपादित करें: क्या यह उस क्रम में कुछ हो सकता है जिसमें jQuery के यूआई और jQuery के मोबाइल लोड होते हैं? EDIT2: ऐसा लगता है कि गैर-भारित खंड पर कोई विजेट नहीं हैं। मैं यहां तक ​​कि .checkboxradio ("अक्षम") जैसी चीज़ों को भी नहीं कर सकता जब तक कि खंड को स्पष्ट रूप से लोड नहीं किया गया हो। लोड आईआईटी मतलब क्या है और यह क्यों नहीं किया जाता है जब दस्तावेज लोड होता है?

vba - Application WorksheetFunction VLookup second variable -

I'm completely trapped! First I have used vlookup VBA below to get my results. For example: worksheets ("part number"). Room (i + 1, 2) = _ "= VLOOKUP (RC [-1], 'Supplier'! C [-2]: C [1], 3.0) Let me now The application worksheet function is required to include the result of cell (number) and not the function. Even how far away I have: for i = 3 LR 'Last Line LUVLUE = Worksheets ("Part Number"). (I + 1, 2) Worksheets ("Part Number"). Cell (i + 1, 3) = _ Applications Worksheet Function. Vilupuup (Lewolu, [Supplier_Range ], 3, Next I This includes the following error details as I read that it has not been specified, then can cause problems for some time: Cells (i + 1, 3) Worksheet ("Part Number") If IsError (Worksheets ("Part Number") Cell (i + 1, 3) = "NA", if finished. When I run it, I'm unable to get the error 'Workspace attribute class' when I debug I can see that my luvva...

java - how to check if javafx application is already running programatically? -

I am trying to run out of the scope of the application class to run a Java class application from a thread. The problem is that I am using the loop for a while to generate the application and whenever it is called twice, then it throws it illegally, so I need to know different ways if my other tasks To continue any ideas, the application is already running? The only way you can do this is to catch IllegalStateException You see JavaFX source code: if (launch collade.get endset (true)) {new invalid format expansion ("Application launch should not be called more than once") ; }

c# - Search string from array and reference array number -

I'm new to C #, and I do a string search to see if it's a string Members are trying to include array. Some of the string arrays are included, so I record the index number of the array members found it, and then want to display it. string stringToBeSearched = "I want to apply ITEM2 or item6"; String [] array = {"item 1", "item 2", "item 3"}; // Find anything in the array stringToBeSearched, then the number of integer position integer position = // array index item found in the Console.WriteLine // Enter the value of the member value ("{0} was found.", Array [position]) ; Console.ReadLine (); You can compare an array element with the itemprop = "text"> stringToBeSearched after

python - Trouble using webbrowser module to open a Google search -

Hey, I'm currently trying to follow a simple Google search with Python script, I'm following the code line from the line. The issue in the attached video is that my code will open a new tab and bring me to the Google homepage but it does not do the actual search. The odd thing is that the search query appears in the URL but it's more to accept my search does not. Any help would be appreciated, thank you. Code for Python script import webbrover new = 2 tabUrl = "http://google.com/?#q="; Term = raw_input ("Enter search query:"); Webbrowser.open (tabUrl + period, new = new); Here's the problem: when you enter a word as a query string , "Python"), your code works just fine. However, if you want to find more than one word ("Python Webbuster Module"), then you have a problem. Since there are spaces in the search term, the URL will be empty space. Some browsers and operating systems, such as Firefox 28 (My current setup) at Ub...

Haskell IO - file lines to list -

I am writing a hascal program and having trouble with IO types. It seems that something is wrong with my readLines function and the way it wants to return I want to return a list where each element has a line from the file that has been opened with the openDict function. This is my code. main :: IO () main = do fileHandle & lt; - openDict readLines fileHandle putStr "end of program \ n" readLines :: handle - & gt; [Io string] readLines fileHandle | IEOF & LT; - HISF file handle = [] | Otherwise = [hGetLine fileHandle] ++ readlines fileHandle openDict :: IO handle openDict = do puttr "Enter the file path:" filePath & lt; - GetLine OpenFile File Path ReadModa Here is an error: With type 'IO' type '[]' can not be matched with expected type: IO (IO String) Actual Type: [IO String] 'readlines' in the return type of call STMT of a 'Do' block: readLines fileHandle expression: do {fileHandle & lt; - openDict...

Eclipse "assign to new local variable" (crtl+2-l) not available for c++? -

I am trying to use Eclipse as a C ++ IDE, because I have an Eclipse shortcut in Java World However, using (CRTL + 2-L), which assigns the result of expression to a new local variable, does not work in the C / C ++ perspective. With any thought how can I use this eclipse aid in C / C ++? While working with an unfamiliar API, it is really useful because you can get a new local variables from function calls without knowing the return type of the function. Alt + Shift + L / Kbd> Also try right-clicking inside the editor and see what to do refactor .

machine learning - SVM Scores - Upper Bound? -

I have concerns about supporting vector machines, that is, their classification score: Is there an upper limit on the score of these classifications? I do not think, because a SVM is only a hyperplane, and the score is basically the distance of a point from that hyperplane. Without restriction, a point can be anywhere, and thus there is no obligation in the distance, right? I am asking because I have read the following line: "When decision scores are surrounded - and SVM is surrounded by margin ... ... " Can you explain it? I do not know how it is bound to know the fringe score ... Thank you for your help, I appreciate it! Your intuition is correct Whatever misrepresentation you misread is best or simply wrong (any case Some reference is necessary). SVM decision is not upper bound in values. It relies entirely on test instances. The SVM function is a linear combination of internal products in the Value Spacing Value Support feature's feature space and...

rust - Differences between `fn` and `||` in type for an array of functions -

I was doing some simple experiments in war, which included an array of tasks, and finally this working code Came out with: fn fun1 (arg: & string) - & gt; String {prefix = string :: se_strik ("a:"); Prefix.add (arg)} fn fun2 (Arg: & string) - & gt; String {prefix = string :: from_string ("b:"); Prefix.add (arg)} fn doall (arg: and string, funcs_vec: & amp; [fn (and string) -> string]) {for funcs_vec.iter (f) {println! ("{}", (* F) (RGR)); }} Fixed Fax: & amp; 'Stable [fn (and string) - & gt; String] = & amp; [Fun1, fun2]; Fn Main () {doall (and String :: from_str ("foo"), fx); } who prints: a: foo b: foo Then, reading, I have a syntax Seen | & Amp; String | - & gt; The string should also work, but trying it like this: fn doall (arg: & string, funcs_vec: & amp; [& string | - & gt; string]) {for funcs_vec.iter () {println! ("{}", (* F) (RGR)); }} Fixed fun...

ios - Truncate NSString to fit particular rect area -

In one of my applications, I want to show the short version of the comment after the ellipses. If we use UILBL, then it can be done easily because the UILB itself does it. But I'm showing this comment in STTweetLabel which does not automatically So I have to minimize the string and put the text set in STTetLabel. I came to the function to shrink NSString according to the specific width, but I am unable to shorten the string to capture the specified reset area to specify it. Say that I have posted a comment in (320, 100) "This is a very long comment and I want to shorten it in 4 lines and then with oval. To fit it in the specified width, but having problems with filtering it in the specified region, please help me to get the necessary behavior. " In the frame below it (320,70) Should show "This is a very long comment and I I want to translate it into 4 lines and then want to be oval. I can shorten it to fit in a specific width, but it can get issues with...

android - IInAppBillingService show a warning - method getInterfaceDescriptor is never used locally - How to remove? -

I know this is a warning, and there is no problem, but I want to keep my projects clean. Can such a warning be removed from the IInAppBillingService? The method is never used locally by the getInterfaceDescriptor () type IInAppBillingService.Stub.Proxy IInAppBillingService.java

while read line strange output -

I have a script that reads the file line through the line There are several columns with many spaces in each row, such as: 1 A1b1c1d2d2a2b2c2d3a3b3c3d I want to work on the first column of each row. I have a script: #! / Bin / sh file_name = myfile.txt while the reading line is = `cut-d '' echo 'f1` is" ve ve "done & lt; $ File_name but output is: instead of 1a 2a 3a this is 1a 2a this is 3a your first Example of cut is all input account. You probably meant it ve = `echo" $ line "| Cut-D "" -f1` I recommend that you cite your variable well: #! / Bin / sh file_name = myfile.txt while reading the line; Do = "resonant" line "| Cut-d '' -f1` echo 'this $ ve "done and lieutenant; "$ File_name"

ruby - How to add line break in rdoc -

मेरे पास RDoc के लिए कोड और टिप्पणियां हैं: rdoc foo.rb द्वारा आउटपुट दस्तावेज़, फिर लाइन विराम को HTML फ़ाइल में अनदेखा कर दिया जाता है। लाइन ब्रेक जोड़ने के लिए मैं इस तरह से लिख सकता हूँ: # पहले पंक्ति टिप्पणी & lt; br & gt; # सेकंड लाइन टिप्पणी या # पहली पंक्ति टिप्पणी # # दूसरी पंक्ति टिप्पणी लेकिन मुझे लगता है कि दोनों बस लाइन के अंत में दो या अधिक स्थान जोड़ें और यह काम करेगा। # पहले टिप्पणी #second टिप्पणी def foo end पहली पंक्ति में टिप्पणी के बाद 2 रिक्त स्थान हैं।

language agnostic - Which metric should be used for benchmarks? -

When I benchmark some code, either on a fixed set of input data or on the random input, the control flow Affects: What is the best metric to use to evaluate the performance of my code? I have always used many runs on minimum runs because any deviation from the minimum would be due to the CPU being busy in unrelated things, but I could not find a reliable source that confirms that This is the best practice. Other obvious options are average or average run time (seems to be odd, because it is dominated by unrelated CPU spikes.) Are there any better ways to understand the statistical data gathered from multiple runs? As Paksidipolo says, if I can measure CPU time directly that would be ideal. But when I can only make time for the benchmark wall, what do I have to do? As I said that I did not find anything reliable on this, but maybe I did not get the right Google keywords, so if you can point me to something current, that's already a big Also, please feel free to transfer th...

php - How to remove last two characters every line of text file -

How to remove the last two letters of each line of the text file? for example. A.T.T. In the new txt file: 100815 100815 100822 100822 200811 Thank you :) $ Content = file ("long.txt"); $ Fp = fopen ('short.txt', 'w'); Forex currency ($ $ $ content in line) {$ small = substrate (trim ($ line), 0, -2); FILIT ($ FP, $ small. "\ N"); } Fclose ($ fp);

php 5.5 - include_path related problems in php -

मेरे पास PHP अनुप्रयोग है जहां autoloader /var/www/html/example.com/src में स्थित है /vendors/autoloader.php var / www / html / example.com ऐप / विक्रेताओं / विक्रेता- a / example.php विक्रेता_ब / विक्रेता / autoloader.php सार्वजनिक / में autoloader.php मेरे पास एक पंक्ति है जिसके लिए example.php से vedor_a / फ़ोल्डर की आवश्यकता होती है। हालांकि यह मेरे स्थानीय आभासी बॉक्स में चल रहा है जो सेंटोस, php-fpm, nginx में कार्य करता है, यह मेरी वीपीएस में काम करने में विफल रहता है, जिसमें मेरे स्थानीय होस्ट में चल रहे हर कार्यक्रम का एक ही संस्करण है I मैं php5.5.14 का उपयोग कर रहा हूं और जब मुझे ऊपर की फ़ाइल की आवश्यकता होती है तो मुझे यह त्रुटि मिलती है। चेतावनी: (vendor_a / example.php) की आवश्यकता: स्ट्रीम को खोलने में विफल: लाइन / 2 पर /var/www/html/example.com/vendors/autoloader.php में ऐसा कोई फ़ाइल या निर्देशिका नहीं है ; यूनिक्स: "/ पथ 1: / पथ 2"; शामिल_पाथ = "।: / Php / में शामिल है" मैं यहाँ एक समाधान से ज्यादा देख रहा हूं क्यों...

Import Java library to Scala sbt project -

I'm trying to use the Import Ivava library in the SBT project (play framework), but my code can not be compiled P> import com.google.common.net.InternetDomainName class MyClass (link: string) {personal val domain = {val host = new URL (link) .getHost val domain name = InternetDomainName. From (host) DomainName.topPrivateDomain (). Name ()}} I get a compilation error Object is not a member of google package com Can anyone explain, what is the problem? Did you add the Java library to your build.sbt file's library As a dependency? You can find that file in the project's root directory. There you can add dependency to the pab library: libraryDependencies ++ = Seq ("com.google.guava"% "guava"% "17.0", // other dependencies separated by commas)

ios - SpriteKit moving Nodes faster with time -

I want to speed up the object over time, for example I found an object that was added every 1.5 seconds. is. This object is moving towards x = -100 with period = 5. After 30 seconds it should proceed faster. - (id) initWithSize: (CGSize) size {if (self = [super initWithSize: shape]) {..... SKAction * Spawn = [SKAction performSelector: @selector (enemy OnTarget: Self]; SKAction * Delay = [SKAction waitForDuration: 1.5]; SKAction * SpawnThenDelay = [SKAction sequence: @ [spawn, delay]]; SKAction * SpawnThenDelayForever = [SKAction repeatActionForever: SpawnThenDelay]; [Self run action: spontaneous daytime]; .....} - (Zero) Enemy {Enemy = [SKS Princenode spriteNodeWithImage Nominated: @ "Anime Page"]; Anime size = CGSizeMake (85, 85); Anime Jeepishan = 2; Enemy = name = @ "Annie"; Enemy.physicsBody = [SKPhysicsBody bodyWithRectangleOfSize: CGSizeMake (50, 50)]; Enemy.physicsBody.dynamic = NO; Enemy.physicsBody.allowsRotation = No; Enemy.physicsBody.usesPreciseCo...

Bootstrap sticky nav and grid issues -

I am using bootstrap for the overall site, but with a margin of 12 in a 12 column grid, Edge ' There is a secondary sticky NAV to work in page linking (with APIs), but the point is that when the NAV decides, it is removed from 12 columns (Z-index 99 99) and leaves buffer Any ideas how focused and 'back to the grid' will be appreciated! HTML & lt; Div id = "strip" class = "strip" & gt; & Lt; Div id = "navstrip" & gt; & Lt; Ul class = "navstrip navbar-nav2" & gt; & Lt; Li & gt; & Lt; A href = "# content1" & gt; Link 1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# content2" & gt; Link 2 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# content3" & gt; Link 3 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# conten...

c++ - What should I choose for an easy to code balanced binary search tree? -

Image
I would like to know which simple BST will be easy to code in C ++, and yet complexity is almost equal to o (Logan). I have already tried red black tree, but would like an alternative which is less complex for code. I have worked with Traps in the past, but are interested in finding the options that are either better performing or easier to implement. What are your suggestions? AVL tree Usually in my experience better performance than traps And they are not difficult to implement. They work by moving the branches of the tree which is unbalanced after any entry or removal. It guarantees that they will have the right balance so that they can not be "cheated" with strange data. Traps on the other hand randomly , Which is balanced for large data sets, but you still do not get the right o (logan). Apart from this, you can come in a data set that is involved in a very unbalanced way, and your access time may be close to O (N). See Wikipedia's page for m...

sql - Why is it showing trigger 'AICHAT.BI_USERDATA' is invalid and failed re-validation as an error? -

बनाएँ तालिका "USERDATA" ("USERDATAID" NUMBER, "FNAME" VARCHAR2 (4000), "USERNAME" VARCHAR2 (4000), "पासवर्ड" VARCHAR2 (4000), "संपर्क" VARCHAR2 (4000), कॉन्ट्रैक्ट "USERDATA_PK" प्राथमिक कुंजी ("USERDATAID" सक्षम) सक्षम करें या ट्रिगर बनाएं "BI_USERDATA" प्रत्येक पंक्ति के लिए "USERDATA" पर सम्मिलित होने से पहले "USERDATA_SEQ" का चयन करें। में निम्न: NEW.USERDATAID से दोहरी; समाप्त; / वैकल्पिक ट्रिगर "BI_USERDATA" सक्षम / यह तालिका और ट्रिगर बनाने के लिए मेरा कोड है लेकिन यह दर्शाता है कि "AICHAT.BI_USERDATA 'अमान्य है और एक त्रुटि के रूप में फिर से सत्यापन विफल रहा है जब भी मैं एक नया मूल्य डालने का प्रयास करता हूं। इसके साथ क्या गलत है?

python 3.x - When using telnet to sent commands to my raspberry pi I am returned with error: AttributeError: 'tuple' object has no attribute 'encode' -

I am using Telnet to connect with my Raspberry P and I am controlling the 4 serosos associated with it. I have an example of using Python 3. below that I am using code: import tkinter import import from telnetlib import sys getpass bot = telnetlib.Telnet ("192.168 .1.128 ") Bot.read_until (b" login: ") bot.write ((" pi \ n "). Encodings ('ascii')) bot.read_until (b" password: ") bot.write ( ("Chamonix007 \ n") .encode ('ascii')) bot.write (("cd /home/pi/pibits/ServoBlaster/user\n").encode('ascii ')) bot.write ((" ("Ascii") encode stbmid (): bot.write (("echo"). 1 = "+ str (mid.get)," & gt; /dev/servoblaster"+"\n").encode('ascii ')) bot.write (("echo 2 =" + s Tr (mid.get), "& gt; / dev / servoblaster" +. "\ N") encode, "& gt ('ascii')) bot.write ((+ str (mid.get" 3 = Echo "); ...

minify - Developing javascript for minification -

I have read many answers but I am thinking the best way to get the following - I have a commission to provide a widget-type javascript tool where my client will include the script, give a div an id and the widget will take care of loading itself. So far, in development I have divided the widget into many files for uniformity (as the client wants to change the source code and repeat it again). I connected to the script tag $. To check the load and callback methods like mechanisms, check whether the library exists or not, and if they are not included I maintain this functionality and consistency, while at the same time Provide for minification in? I think this objective is defeated in 6 or 7 smaller files, but if I have to include several libraries in my argument and link to other source files, of course I just can not reduce it in one file ? Your LIbs should be pre-minified, or available in the same way, and your app is a The object should stay in singles. Generally: F...

asynchronous - ASP.NET MVC best way to implement asynchronously in Controller -

The logs sorted version of interaction models of a database I have a contact form and an email with the form data is. Between two actions, it takes up to 2 seconds to complete. Although not much time, it is enough to disturb the impatient users. Contact controller: public class ContactController: Controller {// GET: contact Public Aekshnaresk Index () {return View (); } // Post: / Contact / [Actiteepiost] [Vadantiforgritin] Public Action Result Index (model. Contaktmodel contact) {if (Modlstet. ISI Walid) {XML Sseriylaijhr xml Sseriylaijr = new XML Sseriylaijr (Contact. Gettaip ()); (Stringwartr text Warit = Using new Stringrraitr ()) {xmlSerializer.Serialize (textWriter, contact); Log in. Create ("email", text author. Toastring ()); } Smtp.sendMail (sendTo, contact.Email, contact.Name, theme, contact. Comment, Aipiadres, from email, contact. Phone, sendBcc); // use RedirectToAction instead RedirectToRoute so / contact can be used to return a redirect Riro ( "de...

android - design pattern - many simple receivers vs one complex reciever -

I have an Android app that includes many types of text views that display different types of incoming data (speed , Direction, temperature, level ...). However only a handful is visible on any one screen. So my question is: What is the smallest implementation? Should I have a broadcast receiver (to open the incoming data and update various textview as appropriate-complex) or every TV should register its own receiver and update itself as much as possible - simple I'm not sure how much upper part of the receiver has this, for now I have implemented this as the second option because it is well The system protects the system, but I think the receiver of the off-screen sequences are still firing and there is no one / the receiver register / cancel the accountability due to the restart methods for the responses are important so I have to make the application as much as possible Want to keep the light Thanks in advance

android - How to call unregisterReceiver on a BroadCastReceiver -

I have some such activities that are extending from a custom square that I wrote that in return Activity . I named this class as loginfinder activity and override the onCreate function on it Private Broadcast Receiver Filler Receiver = tap; Public static final string ACTION_FINISH_LOGIN = "ACTION_FINISH_LOGIN"; @ Override Protected Zero (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); Log D. ("Login finisher activity", "ont () called."); FinishReceiver = New Finnish Receiver (); Register Receiver (full receiver, new intent filter (ACTION_FINISH_LOGIN)); } Now the number of activities that have been extended to login-seeking activity is for those people, whenever I click on the system's back button. That is, I am on a welcome activity and I want to proceed in sign-up activities. But when I sign in or sign up, I work on NavigationActivity > Activity increases, that means it needs to be closed, whatever came from the ac...

javascript - How to hide textarea that have focus on Android? -

I use textarea as a clipboard, and I try to work it on Android. To create the Textarea function, I needed to set the width and height of 10px. There are some hiding options, but if I try to use any of them (like opacity 0 or clip) the text does not work at all, then I'll try putting a black mask on it and background and color black But when Texta has taken note of Android, it always looks and it is always white with black text. Nobody knows how can I textarea and still work on Android? It seems that jquery mobile work accessible accessible: Textarea {status: complete; Left: -9999px; Clips: Rect (1px, 1px, 1px, 1px); } Need to set the width and height, it can not be 0: width: 10px; Height: 10px;

ios - Xcode 6 Beta 4: Use of Unresolved Identifier 'NSFetchedResultsChangeInsert' -

Text after "div class =" itemprop = "text"> Installed Xcode 6 Beta 4, and it's already compiled code now 'Not resolved identifier' on every switch of NSFetchedResultsChangeType Fails with I examined the release notes, and of course to see that someone has experienced this, but nothing has come so far. ! Any information appreciated thanks function controller! (Controller: NSFetchedResultsController, didChangeSection sectionInfo: NSFetchedResultsSectionInfo, atIndex sectionIndex: int, forChangeType type: NSFetchedResultsChangeType) {println ("Running CordetTV.V. controllerDidChangeSection") Switch type {Case NSFetchedResultsChangeInsert: self.tableView.insertSections (NSIndexSet (index: sectionIndex) , withRowAnimation: Fade) case NSFetchedResultsChangeDelete: self.tableView.deleteSections (NSIndexSet (index: sectionIndex), withRowAnimation: Fade) when an enumeration NS_ENUM (NSUInteger, NSFetchedResultsChangeType) typedef {NSF...

mvvm - ExtJS 5 bind toggle button to multiple components state -

I am working with ExtJS 5 and I have pressed the configuration bind of a toggle button In other words, it should be something like this: Ext.define ('MyApp.view.MyPanel', { Expansion: 'Expandal panel', nickname: 'Widget mappal', is required: ['route to view'], see model: {type: 'myname'}, item: [{xtype: 'button', reference : 'Btn1', enableglu: true}, {xtype: 'button', reference: 'btn2', enableToggle: true}, // ... bunch of other buttons {xtype: 'button', enableToggle: true, bind : {Pressed: '{btn1.pressed & amp; amp; btn2.pressed}'}}},}); In addition, I should be able to add or remove components in a demented toggle button. How can I get it?

Dart SVG Matrix Transformation -

I am trying to create a square (in dart) which makes a SVG group variable through metrics. I have tried to use the 'setAttribute' route, and it works for a single SvgElement: Conversion class: string _x; Element_transport element; Zero setx (int value) {_x = value.toString (); _transformElement.setAttribute ('x', _x); } DART file: Transform test = new transform ('test object'); Zero main () {test.setX (25); } However, I would like to be able to run all the sets through a matrix. Here's my code: Conversion Class: Matrix _matrix; Zero set x (int value) = & gt; Set transform (x: value); Zero Set Transform ({Integer scale X: blank, intra squaws: faucet, int skew: null, int scale: faucet, int x: faucet, int y: faucet}) {_matrix.a = scaleX; _matrix.b = skewX; _matrix.c = skewY; _matrix.d = scaleY; _matrix.e = x; _matrix.f = y; _transformElement.setAttribute ('width', _matrix.a.toString ()); _transformElement.setAttribute ('he...

javascript - Object property not being set but console says otherwise -

I am trying to install a bar verification service using angular. I basically want to call StripeResponse.get () and want to send it back with either error or token that responds with the strip. My problem is that when I execute this code, if I var a = StripeResponse.get (); and then log in to a in the console, I see null . If I Console.log (this); OK before back to this Give Feedback , I see the following: object {response: zero, get: function}> Receive: function () {v response: object code: "invalid_number" message: "this card number invalid" parameter looks: "number" type: "card_arthror" I understand There is a discrepancy between "feedback: nullity" and "reaction: object" in the console log below that is not my code for service / module. var app = angular Module ('stripe verified', []); App.service ('Stripe Response', Function () {Return: response: blank, Receive: function () {var...

java - Eclipse jump to end of scope/method with keyboard shortcut -

Is it possible that any method, loop, if statement, end of scope such as switch statement ... etc ... keyboard shortcuts with? I know that this is possible with control shift p , but it only concludes the beginning of the crisp brace, And not above it. For example: This is my code. if (x When I press control + shift + P then my cursor jumps here: If (x & Lt; 10) {System.out.println ("X is less than ten."); |} // My Cursor '|' But I have to go here. if (x Is this possible? Your keys are mapped, different from my keys, but preferences (normal -> key ) To see what orders are available for your edition of Eclipse and OS. I think that running the closest order for the item you are looking for is in line (where you have to point out in line with the curly bracket).

php - 403 forbidden error when trying to install script on sub-directory -

I have my own server, which I run from some sites. I have sub-directories that link to full domain (/ music points -> www.music-site.com) My problem is that I am getting a 403 forbidden error with a script The sub-directory I have installed on any other The .htaccess file is as follows: & lt; IfModule mod_rewrite.c & gt; & Lt; IfModule mod_negotiation.c & gt; Option -multi view & lt; / IfModule & gt; #RebrandTraining revalts at redirection slash ... revised rule ^ (. *) / $ / $ 1 [L, R = 301] # Handle Front controller ... revoked code% {REQUEST_FILENAME}! -d rewrite% {REQUEST_FILENAME}! -Frelease Rowl ^ Index.php [L] If it makes a difference, then the script I'm trying to install is Laravel And based on bootstrap framework. Does anyone know this issue?

javascript - Build vertical menu with sub-menus -

Image
I am creating my own vertical menu CSS3 & amp; HTML5: Let me first "item 1" In two buttons, the first is still "item 1", the second one is the arrow button, which will open / close the hidden edge with the sub-items: First button - Call default action is selected from sub-templates. Second Butthouses to choose a user - what to do now or what happens when the 1 button is always pressed. How can I divide the first item into two buttons? HTML: & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Script src = "./js/jquery-1.11.1.js" & gt; & Lt; / Script & gt; & Lt; Link href = "./ css / WMenu.css" rel = "stylesheet" /> & Lt; / Head & gt; & Lt; Body & gt; & Lt; Ul class = "WMenu" & gt; & Lt; Li id = "" class = "dublin" & gt; Item 1 & lt; / Li & gt; & Lt; Ul for = "AddPageBtn"...

c++ - OpenGL, gluUnProject gives -1.#IND -

I tried to do almost everything, but copied a lot of code from different forums but nothing works. What's the problem? I have a loop where I draw the object from the vector. I want to create that object where the user clicked in the 3D space. This code is where I am trying to do this: if (glfwGetKey (window, GLFW_KEY_F) == GLFW_PRESS & amp; glfwGetMouseButton (window, GLFW_MOUSE_BUTTON_LEFT) == GLFW_PRESS & amp; check == incorrect) {Double X, Y; GlfwGetCursorPos (window, & amp; x, & amp; y); Double MV Metrix [16]; Double progmatics [16]; Int viewport [4]; Double DX, DY, DZ, Dedlblicke; // glUnProject uses doubles, but I am using these 3D vectors for floating glGetIntegerv (GL_VIEWPORT, viewport); Glaggad WP (GLIMDLIUUUUUTIIIIRIIX, MVMatrix); Glagetable (GL_PROJECTION_MATRIX, Proogamatics); DClickY = Double (1080 - y); Mouse report with dX, & amp;, sub, & amp; // open below, gluUnProject (0,0) above (0,0) on x, dClickY, 0.0, mvmatrix, projmatrix, viewport,...

javascript - chrome extension problems in content_script -

I have my Main.js file in content_scripts Main.js file provides a button and when user clicks HTML page reloaded with reloading the html page. But when the user clicks the button a second time, the button is not working as the last few values, where the button was clicked for the first time while it was set. There is no way in Chrome from Main.js, automatically loaded or executed as a fresh script on every click. Windows.onload methos is not working on my main.js file, so how do i solve it It is not possible that you Location.reload function

html5 - Input type time with angular.js -

According to the Docs input [time]: Sufficient to use input type time Make it a date in OID, though it does not work as I expected. & lt; Input ng-model = "time" type = "time" placeholder = "hh: mm" minimum = "08:00" max = "17:00" required & gt; and $ scope.time = new date (); As a result, I want to see just HH: mm inside the input field. There is a JSfield to play here: I think you need at least angular 1.3.0 beta for this to work, as it seems it was started. : ... attributes input : support type date, time , Date-time-local, month, week (,) ....

javascript - JS—List of all registered Elements -

I am looking for a way to get a list of all the elements (nodnames) that are supported / registered on the customer. In other words: & lt; A & gt;, & lt; B & gt;, & lt; Captions>, & lt; Div & gt;, ... and many more known HTML elements can create and use one. You can add a more with document.registerElement . As the title, I am looking for a way to get all the elements currently registered (at least their names). Some dummy codes may look like this: var list = document.listRegisteredElements (); // yield ['a', 'body', ..., 'div', 'i', 'my-registered-element', ...]; Thank you so far!

javascript - Variable after -= properties -

How do I insert a variable after jQuery's animate = properties? var slideObject = $ ('. Item'). Width (); $ ('Next'). ('Click', function () {event.preventDefault (); // View - = Slide Object $ (Slide Container). Animat ({margin lift: - = slide object}, 500);}); Error in console: Unkit syntax error: unexpected token - = You are not using your event correctly: $ ('. Next'). ('Click', function event) {// $ ('. Object') $ ('. Object'). Width (); $ ('. Next'). ('Click', function (event) {event.preventDefault (); $ (slideContainer) .net ({marginLeft: We .animate () The object is passed as a Object Lidral : var obj = {marginLeft: 200, // valid (number) margin right: "100" , // Valid (string) margin hat: top value, // valid (variable) marginbottom: "100px" // valid (string)} (Yes, you The above can be used as $ (slide kontata) iner) .animate (obj, 500); ) ...

sql - Sqldf: convert and select -

I am trying to read a SQL database in R (sqldf, postgresql), but there is some restriction on one column (Convert and choose). In the column I want to adjust, there are three possible elements (all wire), ie empty string, four numbers or four number one space and two characters after An example can be "2378", "", "432 9", "4193 AM", "2195" Are real numbers and between 1000 and 1200 (and instead of string types change int). The column name is "post" and it is that I have achieved so far query = "SELECT *, cast (posted as int) postConv base WHERE length (post) ) & Gt; 0 and length (post) The problem is I do not know how the selection is like the new converted number 1000 and 1200. For now, one Additional columns 'postcorn' will be created, but is it even possible that the converted elements are only stored in 'post'? select * from the base where '1000' and ' 1200 'be...

c# - ASPX Loading Page -

So I'm learning to develop .aspx websites on Visual Studio 2013 and want to know if there is any way What is a "loading screen" during executing an executable? The idea is that the user generates the button, it runs executable and displays the second page / pop-up windows / etc. There will be a loading image and some text until the executable is finished. So I want to redirect it to another page. Is that the best way to do this? Code examples are always a plus! Thanks From a high level perspective: The user requests the process To get started on your web-application (I think this is a command-line .exe that you want to run and wait) Request handler one The new spawn will be thread which then starts the new process and waits for the process to end. Your code will provide an arbitrary tag to this thread / process and store it elsewhere. When the process is finished, the child tells the Thread Store to update that the process has ended. The request ha...

android - Hiding a view inside Fragment -

I am using support.v4.app.Fragment and once I hide my loading view (progress bar) Attempting the network class (using the async task) to load all the data ends I made the progress bar stable and created a static function inside my piece that calls the network class PostExecute Static work inside static: public static zero Ndpuarn loading () {loadingView.setVisibility (see. GONE); GvLikes.setVisibility (View.VISIBLE); } The network class calling the static function: @Override Secure Zero PostXtech (Boolean result) {super.onPostExecute (results); ......... if (type.equals ("Postfragment")) {PostFragment.likesFinishedLoading (); } And if (type.equals ("post")) {Post.likesFinishedLoading (); }} The type can be either postfragment (using fragment from the support library) or post (general section). The code has been implemented exactly in the postfragration and post. In any case, static work is executed, but only in the hidden view post (general section...

excel vba - VBA Random Element from Array , Subscript out of Range error -

I'm vba noob so be easy for me. I want to select a random array element in my card_range_string array (random typing, see the last line) but I get a "out of bounds" error What could be wrong? sub gener_random () 'generates a random card as slow random_card long: random_card = Int (Math.Rnd * 13) + 1 dim random_type random_symbol variable as string dim Dim card_Range_string () as the variant: Card_range_string = Range ("A1: A4"). Variable as value dim card_range_simbol (): Card_Range_Simbol = Range ("B1: B4"). Value random_type = card_range_string (Int (Math.Rnd * 3)) End Sub I Solved it Remember that arrays are two-dimensional, so I missed only to exclude the second dimension. Creating: random_type = card_range_string (int (Math.Rnd * 4 + 1), 1) solves the problem

standard gestures does not trigger gesture event on iOS, fire monkey delphi xe6 -

I do not know what I did but standard gestures do not work on my project. I have added a gesture manager and alloted it for TTAB-control, which is the left and right signal selected from standard gestures. When I do not work with the project gesture, the TitBong Generation event is not removed. When I change the gesture manager to do nothing, nothing changes. When I make it a simple application it works well. What did I do? You need to set the tab control. Tap the dots.

c - Tricky pointer aliasing issue -

The following code fails to compile because the complainant complains about the four ** Does call four * cons * in the call PrintStrings () . If I declare the strs variable as const char ** , call PrintStrings () works, but Memcpy () and free () calls then complain that they are receiving const type anyway around this issue? Note that I do not want to enter strs in PrintStrings () incompatbiele type const char * const * because I never -Until ever-breaking aliasing rules, I am using very aggressive compiler optimization. #include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; #include & lt; String.h & gt; Zero print saturation (cons four * cons * strings) {int x = 0; While (strs [x]) printf ("% s", strs [x ++]); } Int main (zero) {int x = 0; / * If I do this "const char **" then the memory and free will fail, but if I close the const, then call printstring () call * / char ** strs = malloc (5 * sizeof (char) *))...

Why does "use" in Clojure call "in-ns" to return to the original namespace? -

Loads a lib in usage in the closure and additionally refers to the namespace of Lib . Load . Then what is the purpose of the IN-NS command to use Liberty users => ; (Closeor.core / in-ns 'user) (closeor.core / ref' project.core) (use closeor / load "/ project / core") (use "project.core: verbose" ) In other words, (clojure.core / in-ns' user) is not unnecessary in the previous example? This does not actually call in-ns - this " Lineboding verbosli "(this is if you are near : verbose as the option of usage ) so that you know how the name of reference is named. It will also do that if you need with as : as to specify that the location of the name will be created in the alias: user = & gt; (Clojure.set: as set): verbose (clojure.core / load "/ clojure / set") (clojure.core / in-ns' user) (clojure.core / alias' set 'closure.set) This is useful when initial load creates more name...

Google BigQuery SQL Statement -

I am trying to get some data from the GitHub Archive using Google Big Query I am requesting that the current amount of data is very low for the BigQuery process (at least free level), so I am trying to limit the scope of my request I limited the data I want to do as if the repository which currently will return more than 1000 stars historical data. It's just saying the repository_watchers> 1000 is more complicated because it will remove historical data for the first 1000 stars received a collection. select repository_name, repository_owner, created_at, type, repository_url, the repository_watchers [githubarchive: Github.timeline] WHERE type = "WatchEvent" ORDER created_at Diissi Edit: Select the solution I used (@ Brian based on answer) select y.repository_name, y.repository_owner, y.created_at, y.type, y.repository_url, y.repository_watchers [githubarchive: github.timeline] select joining y of (repository_url, Max (the repository_watchers) [githubarch...

javascript - Error Jquery for html -

Read Before Responding This function does not work. I need this company equally When you are the exchange of this exchange, select the period in which the link and content of the DIV Skype will be: benhur.augusto Need to make changes with price or ID? & lt; Select name = "select" sourceindex = "0" & ​​gt; & Lt; Option value = "1" & gt; Mansl & lt; / Options & gt; & Lt; Option value = "3" id = "trimestral" & gt; Three dimensional (3% de desconto) & lt; / Options & gt; & Lt; Option value = "6" id = "semesteral" & gt; Semestal (6% de desconto) & lt; / Option & gt; & Lt; Option value = "12" & gt; Unusual (12% de desconto) & lt; / Options & gt; & Lt; / Select & gt; & Lt; Div id = "p01" square = "value" & gt; $ 3.99 & lt; I & gt; / Por mês & lt; / I & gt; & Lt; / Div ...

javascript - Raw AngularJs markup appearing in Google search results page -

We only update parts of our website with AngularJS - especially the login page. When I look at search results in Google, the cached page and small snippet appear that it is automatically raw connor markup, so lots of {{model.username}} , {{Model errorMessage}} , etc. I will not link to the results because it is very embarrassing Lesson "> It would be great if you have any embarrassment to test any thing for all of us Samudha Turn it into service, because you are seeing a situation that some people accept or want to reproduce themselves. :) Google is relatively (or too much, you ask It is good to ignore the hidden content, they apply back in such a way when people used to use the blocks to use the contents of keyword-content that were set to "Display: None" Or small / Unreadable / white-on-white fonts. Seeing again is a problem for more than SEO, so I am suggesting that things like Prior .io are great, but they Only solve a piece. What about us...

bash - capturing output of vncserver execution via SSH -

I am trying to automate the process of starting a VNC server on a remote computer (by which I am automatic I'm guided by a login server) and connecting it to the bash. The idea is that the VNC server starts the command via SSH. The output of this command is parsed to get the details of the VNC server and then a connection is established to the VNC server. I'm having trouble capturing the output of the VNC server start command and is welcome ssh user1@lxplus.cern.ch 'vncserver: The VNC server start command is executed remotely via SSH: ssh user1@lxplus.cern.ch 'vncserver' This will produce an output such as the following: New 'lxplus0180.cern.chhew (user1)' desktop is lxplus0180.cern .ch: 2 /afs/cern.ch/user/ Logs in the applications that are started in u / user1 / .vnc / xstartup I have / AFS / CRNK / User / U / User / 1 / VNC / LXPlus 0180.cern.ch: 2.log I can parse this output like this Such as the following: "$ {response}...

vb.net - How does the implicitly created Form work? -

If I create a new Windows project and add another form (Form 2), then I only created it inherently I can see the form showing the class name: Form2.Show () If I look at the definition of the process, then it Form class is not listed as a shared member, how to call Show () in the name of the Form 2 class I packed? I tried to do it, and then decompiled executable with ILSpy. It seems that quietly in Form2.Show () MyProject.Forms.Form2.Show () instead. MyProject.Forms is a generated class that captures lazy singleton insertion of each form in the project. It appears that there is a feature of IDE instead of compiler, because in LINQPad, I need "reference to an non-shared member to object reference."

mysql query based on value of previous row -

I want to run a mysql query where the results are directly based on the cell of the interest at the value of the cell. For example: I am calculating the time spent in a series of behaviors and would like to identify such instances where the period of walk time runs longer than the time of feeding immediately. Here is a sample data set: ID Duration (minutes) Time Behavior 1 21 9: 1 Spec 1 31 9: 22 Eat 1 15 9:53 Let's 1 21 10:14 Eat 2 7 1:00 Run 2 9 1:07 Eat 2 4 1:16 Walking I want to identify two rows of my query, in which the 'duration' amount is small for the previous Line IE: The third entry for ID1, and the third entry for the ID2. Any help would be greatly appreciated by Thx Sample data : create table T (PKI et auto_interpret primary key, `id` at,` duration` integer, `tod` time,` transaction 'varchar (4)); Price (1, 21, '9: 1', 'Speech'), (1, 31, '9: 22', 'Khao', 'T' (`id`,` Period`, `Todd`, 'Behavior...

go - Example of using Gob in stream processing -

Gob is good in space and execution ability when reproducing data structure internally, as the processing or document of stream data Do large pieces. However, after some searches I can not find a direct example. Can anyone give any examples or links for example (possibly infinite) in the streaming input? (Like reading a worker from the queue) The transaction from the stream originally io.Writer / io .Reader . I share a snippet on the playground, hopefully they help.

Use MATLAB to double a parameter until a certain value -

I want to double a parameter (population size) until it reaches a fixed value, even if the number of loops (Generations). Say I have the following loops: population_sage = 10; Size of initial population for I = 0: 10,% no% for generations (* call function for model *) Population = size = (population_ size + 2); Gene_frequency = (gene_transfer * population_size) / population_ size; Yvon has suggested, use a while loop which, unless you complete a certain condition, I can see that your population Size is doubling, and you make while loop, unless it is not equal, or more than this number. I have a question, however: your gene_frequency calls seem to be unusable, you're taking variable, multiplying by population_size , then Population_size .... and you will get the same number as you did last time, I am leaving this statement because it does not make any meaningful contribution for your question. Like: population_ size = 10; % Size of the initial population ta...

R - get the column index of a matrix based on a function for each row -

& gt; सेट.सेड (2014) & gt; एम एंड एलटी; -मैट्रिक्स (नमूना (10,16, स्थान = TRUE), नेरो = 4) & gt; [4,] 4 7 1 5 [मीट्रिक टन] [4,] 4 7 1 5 एम [, 1] [, 2] [, 3] [, 4] [1,] 3 6 1 7 [2,] 2 1 2 6 [3,] 7 10 7 7 [ / कोड> प्रत्येक पंक्ति के लिए, मैं उस पंक्ति का पहला तत्व प्राप्त करना चाहता हूं जो कि अंतिम तत्व के बराबर या उसके बराबर है, और अन्यथा नहीं। इसलिए, पंक्ति 1 के लिए, पहले तीन कॉलम में कोई तत्व नहीं> = 7 हैं, इसलिए एनए को वापस करना चाहिए। 3 पंक्ति के लिए, पहला तत्व> = 7 है इसलिए 1 लौटा जाना चाहिए। इसका परिणाम लम्बाई 4 के बराबर होना चाहिए (एनए, एनए, 1, 2) मैंने सोचा था कि समाधान लागू हो सकता है लेकिन मैं समझ नहीं पाया कि यह कैसे सही हो। इसके अलावा, कृपया ध्यान रखें कि मेरी असली मैट्रिक्स में लाखों पंक्तियाँ हो सकती हैं। धन्यवाद एक और प्रयास: लागू करें (मी [, - ncol (मी)]> gt; = m [, ncol (m)], 1, मैच, x = TRUE) # [ 1] एनए 1 2 या को लागू करें : chk & lt; - m [, - ncol (मी) ]> Gt; = m [, ncol (m)] को बदलना (max.col (chk, "प्रथ...