Posts

Showing posts from July, 2012

ios - Display the slope view controller in XCode 5 -

Image
In XCode 5, I have the first answer to solve the first issue. However, in that question you have done some work in a window called "Slope View Controller" Can someone place me in the UI of XCode 5 where I can access this window? I suspect that the screen shot can be an old version and I should see something else, but I do not know what to do. slope view controller nothing is the name of the visual controller View Controller in the storyboard (Yellow Square located on the left side of the image). /WHL7X.png "alt =" Enter the image details here "> As you see in my picture this is showing the master view controller yellow color Master View Controller By clicking on it

C++ simple timer/tick function -

As the title says, I want to create a simple timer / tick function, which gives a 5 minute example I can call another function, the timer starts again again but without using the sleep or clock function. So what is a function or method, is an example counted for example above or below the second? Thanks for your help. Although you said that you want to avoid "clock function", count 5 minutes without clock How to View Result : The foo () method is called every 5 minutes. #include & lt; Thread & gt; # Include & lt; Iostream & gt; Zero foo () {std :: cout & lt; & Lt; "Hello! \ N"; } Int main () {std :: thread ([& amp;] {while (true) {// wait 5 min std :: this_thread :: sleep_for (std :: chrono :: minutes (5)); // our Call method foo ();}}) Apart (); // execution continues ... std :: cin.get (); Note: I passed a lambda on the yarn but any obligation would do this. is full of great stuff to manipulate the ...

xcode - Display location based currency identifiers in text field placeholder -

Basically I have pounds and pence value two text fields for input within my app I'm currently your app to the user like I am working on creating localized and I need to have participated in a problem placeholders pounds and pence in my Tekstfeld and display I placeholders based on the exchange of users and sub-currency ' Olrs' and based on locations such as St. I do not know how to do that which would be efficient and I was hoping for some suggestions how I could go about it. Any help would be greatly appreciated! You can get the name of the local currency using NSLocale: var locale = NSLocale.currentLocale () var CurrencyCode: (! AnyObject) = locale.objectForKey (NSLocaleCurrencyCode) locale.displayNameForKey (NSLocaleCurrencyCode, price: code) // "GBP" However, it seems that you can not be satisifed with the official name and I can create your own list using a number of places identifiers so you can also get pence or cents about Switch to I do ...

PHP Desktop app with Google Cast extension? -

I'm looking to create an app. I plan to use this I have users with their Chromecast app I want to allow to use. Is there a way to use this scenario? Thanks! Chromium embedded framework does not support Google Chrome extension. Plugins (NPAPI / PPAPI) are supported. Chrome Cast is an extension, so unfortunately this will not work.

python - Matplotlib Rectangle With Color Gradient Fill -

Image
I want to make a rectangle, together with a gradient color from left to right, with my arbitrary an arbitrary manner In case the axis example ( ax1 ) coordinate system. My first thought was Create a path patch and somehow set your fill as a color gradient. But there is no way to do this accordingly. Next I tried to use a color palette I used the ax2 fig.ed_xs ([left, bottom, width, height]) > Created and added a color bar for it ax2 = fig.add_axes ([0, 0, width, height / 8]) color = [grad_start_color, grad_end_color] index = [0.0, 1.0] cm = Linear Segment Colormap.from_list ('my_colormap', zip (index, color)) colorbar.ColorbarBase (ax2, cmap = cms, orientation = 'horizontal') but positional paragraph Itr FIG. is in the coordinate system of Fig , and the coordinate system of ax1 does not match. How can I do this? Thanks for any help. Have you ever solved this? I wanted to do the same thing and wanted to use the coordinate mapping fro...

python - How to find repeating individual strings in a list? -

I tried this solution: but it was not working from my list format. Was showing the wrong answer. I used the same code and I used to store all the lists with a key: common_suffix = os.path.commonprefix (for list item [list [ - [1 -]] [[- - 1] stripped_titles = [item [: - for items in the list] [transactions] Print lain (stripped_titles) The answer I get 0. These are the lists I have already created these lists with the CSV file data: list1 = ['a1', 'b2', 'c4 ',' Y7 ',' u5 '] list2 = [' b4 ['b2', 'a 1 '] list 4 = [' B2 ',' A1 '] list 5 = [' R4 ',' C4 ',', 'T5' ',' G1]] 3 = ['B2 Here I want to search for the repeated string, say, I have three elements: I want to take a1, b2, c4 (from list 1), I have to find out how many times these three strings are in other lists. The order does not matter, string items should be in other lists In this case, it exists in a1,...

jquery - toggleClass on separate child elements -

I am using the toggleclass method in a function like this: JS $ ('section .handle'). Click (function () {$ ('section h3 i'). ToggleClass ('rotate');}); HTML & lt; Section & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; Div class = "handle cleanfix" & gt; & Lt; H3 & gt; Item A & lt; I class = "fa fa-arrow-down" & gt; & Lt; / I & gt; & Lt; / H3 & gt; & Lt; / Div & gt; & Lt; Ul class = "panel" & gt; & Lt; Li & gt; Larem ipsum & lt; / Li & gt; & Lt; Li & gt; Larem ipsum & lt; / Li & gt; & Lt; Li & gt; Larem ipsum & lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Section & gt; & Lt; Section & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; Div class = "handle cleanfix" & gt; & Lt; H3 & gt; Item two & ...

Using properties inside a Javascript object literal -

I am trying to create javascript json objects which have a dynamic field that will return a value based on previously specified properties. . So far it is what I have ... var car = {color: 'red', tires: 4, hubbaps: 'spinning', age: 4, full_name: this. Color + '' + this.spinning} I was thinking that this is possible? My goal is to be able to reference values ​​such as car.color or car.full_name . For this example, the car.full_name value can be red spinning Wrap your object in a function so you can take action on it, eg Concatenations var car = function () {var color = 'red', hubcaps = 'spinning', full_name = color + '+ hubcaps; Return {Color: color, wheels: 4, hubs: hubbies, age: 4, full_name: full_name}; // (); & Lt; - Anonymous call after defining it}} (); // true car.full_name === "red spinning"; Edit: As @gimit 1988, if you want to instantiate new versions of these functions, that means oo javascript...

c# - How to package MSMQ (or similar) server into an application? -

I am putting an application that is set to install copies of itself in a downstream server (s). I am reading about Rabbit MQ, and when message / upstream / downstream applications speak to each other then I am very interested in using message rout from what I can do both RabbitMQ and MSMQ, server / broker component First of all, I would like to use an NuGet package or similar from either an installer or a script so that the upstream application is a person (or script) Programming without installing unconditionally to install a copy of the downstream of itself, because it is always to reach at all times. My question - Is there a message queue library available, where I can embed it in my application for both MQ client and server components? The idea is to do something (psuedo-code): class program {static zero main (string [] args) {MyQueueServer.Start (); MyQueueServer.MessageReceived + = FancyCallback; } Fixed Zero FancyCallback (Object Sender, CustomEventArgs e) {ReadMessag...

google app engine - Adding new Endpoint class in Android Studio -

I'm using #GoogleCloudEndpoint on #AndroidStudio using this post. I can make modules and play around it (API names, customers, etc. change), but when I tried to add another endpoint (as a class in the same module) , Then I can not see those APIs reflected on / _ah / api / explorer. I do not see any error messages in the building, but it is just that the Explorer only shows an API. Thank you. You will need to make sure that the web.xml file has an entry For example, look at this code in web.xml which is a sample from my code: & lt; Servlet & gt; & Lt; Servlet-name & gt; SystemServiceServlet & lt; / Servlet-name & gt; & Lt; Servlet category & gt; Com.google.api.server.spi.SystemServiceServlet & lt; / Servlet category & gt; & Lt; Init-param & gt; & Lt; Ultimate Name & gt; Services & lt; / Lastname & gt; & Lt; Ultimate Price & gt; Com.mindstorm.stocktickerapi.QuoteEndpoint & lt; / Super-...

open source - Auto-Spell in C# Microsoft Visual Studio -

Is there an open-source toolbox in Microsoft Visual Studio that does auto-spelling words like Microsoft Word? I use it, its good, but it's not free. I really need this in my OCR application. Please help me. You can try the SPELCheck class in .net There are other attempts made by the hobbyist in the codeproject you can see it.

php - Value is still not setting to an integer? -

I have a simple script that will dynamically convert minutes, minutes, hours and days dynamically (it means That I have 1 minute, the script will keep "1 minute," and if I have 61 minutes, then the script will say "1 hour and 1 minute" etc. with proper grammar). Basically, although I try to set the value of a value as a variable, my current time (112 minutes) comes from: 1.8666666666667 hours and 52 minutes. settype ($ otime, "integer"); Set type ($ hour, "integer"); Set type ($ min, "integer"); Set type ($ hour, "integer"); If ($ otime == 1) {$ otime = "1 minute"; } And if ($ otime & lt; 60 & $ otime! = 1) {$ otime = $ otime} "Minute"; } And if ($ otime> = 60 & $ otime = 1440) {$ days = $ otime / 1440; $ hours = $ otime% 1440; $ hours = $ hours / 60; $ mins = $ hour% 60; if ( $ Day == 1 more & amp; $ hours! = 1 & amp; $ minutes! = 1) {$ otime = $ day. "Days". $ Hour...

javascript - MathJax removes all body content in UIWebView -

I'm trying to create a class method that will take the Mathjacks string, wrap the required HTML around it and load it one The specified UIWebView is my code below: + (zero) LoadMathJax: (NSString *) Webview in jax: (UIWebView *) webview font size: (int) fontisms {NSString * mathJaxPath = [[NSBundle MainBundle] pathForResource: @ "MathJax" type: @ directory in "JS": @ "Mathjax"]; NSString * htmlContent = [NSString stringWithFormat: @ "" @ "& lt; html> Head & gt;" @ "& Lt; Meta name = 'viewport' content = 'initial-scale = 1.0' / ​​& gt; @ "& Lt; style type = 'text / css' & gt; @" body {background color: transparent; Font-size:% d; Color: black;} "@" & lt; / Style> "@" & lt; Script type = 'text / javascript' src = '% @? Config = TeX-AMS-MML_HTML and MML-full '& gt; "@" & lt; / Head> from "@...

ios - Getting downpress and constant coordinate for UICollectionView -

When the user presses on a cell in my UICollectionView , so I want to do an action. It is implemented smoothly representatives - (void) Collection see: (UICollectionView *) collectionView didHighlightItemAtIndexPath: (NSIndexPath *) Anukrmnikapath {} However, I also want to get consistent feedback for the situation where the user's finger is on the screen. To do this, I was thinking about adding UILongPressGestureRecognizer . Does this make sense? According to the doctor, I will believe. For this, they need to touch the screen at all times to work their finger. In addition to archive footage of the gesture identifier to implement UICollectionViewDelegate method (A) to select an item / removal is unnecessary appears. Press the gestures are constantly introducing gesture (UIGestureRecognizerStateBegan) when the allowable number of fingers (NumberOfTouchesRequired) has pressed for the specified period (minimum press) and touches the limits movement (acceptable Ma...

swift - iOS dynamic UI in simple terms? -

This can be very basic or may require rephrasing. I am in the process of learning Swift and iOS programming and have developed a basic application that runs successfully on my iPhone 5. The app contains a label, a button and a UIImageView. It seems that I want to do it on my iPhone 5. I just play that I am preparing all these elements with a programmer. The code looks like this: Banner = UILBL (frame: CGRTX (X: 10, Y: 10, width: 300.0, height: 75.0)) button = UI button (frame: CGRT) (X: 45, Y: 75, width: 235.0, height: 60.0)) imageView = UIImageView (frame: CGRTX (X: 22, Y: 150, width: 280.0, height: 410.0)) And then I configure them to show the content in viewDidLoad Now the question ... how do I get the right size when running on different devices? Aun? I can load the app on my iPad Mini, but it's all about the left side of the scene. So I need to do some sort of dynamic layout, but it is not sure where to start from. Appreciate all help! Clearly see the si...

animation - Fade In/ Fade Out a Screen in JavaFx -

I have created a JavaFix application that has a main screen. And that main screen has buttons, each button shows a different screen. Now I want to, when I press a button, my current screen at FadeOut and new screen on FadeIn public-class gaipactus applications Enhances {personal stage stage; Public stationary zero main (string [] algens) {application.launch (GuiPractice.class, (java.lang.String []) tap); } @ Override Public Null Start (Stage Primary Stage) throws an exception {try {stage = primaryStage; Stage.setTitle ("Home Screen"); GotoWelcome (); stage show(); } Hold (Exception Pre) {Logger.getLogger (GuiPractice.class.getName ()). Log (Level.SEVERE, null, ex); }} Private Wide Goto Welcome (try {{WelcomePageController wc = (WelcomePage Controller) Citizens ("WelcomePage. FMCL"); // Check 'replaceScene' below wc.setApp (this); } Hold (Exception Pre) {Logger.getLogger (GuiPractice.class.getName ()). Log (Level.SEVERE, null, ex); }} // When I pre...

R determine image width and height in pixels -

I have an image on the disk, it's called image.jpg, how can I determine that the image width and height How much is pixel r using statistical language There is no such idea that starts with a minimum example, I'm scared. If a person can easily suggest packages and functions, then I possibly can do the rest. You can use the jpeg package to be very self-explanatory Required: required (jpeg) img & lt; - readJPEG ("myimage.jpg") Dim (IMG) [1] 700 700 3 The same author (Simon Arbeck) also sent png and Tiff package containing the same syntax ( readPNG and readTIFF )

How to add a row in an existing Excel file using Java? -

How to add a line to an existing Excel file using Java? I tried to use this code but it is not working. Please tell me what I need to improve. Try {string s1, s2, s3, s4; S1 = jTextField1.getText (); S2 = jTextField2.getText (); S3 = jTextField3.getText (); S4 = jTextField4.getText (); FileInputStream fis = null; File excel = new file ("e: \\ two \\ record.xlsx"); Fis = new FileInputStream (excel); XSSFWorkbook wb = New XSSFWorkbook (fis); XSSFSheet ws = wb.getSheet ("cmss"); Int rowNum = ws.getLastRowNum () + 1; Line line = ws.createRow (4); String [] s = new string [4]; S [0] = s1; S [1] = S2; S [2] = S3; S [3] = s4; {Cell cell = row.ctetate (i); for (int i = 0; i & lt; 4; i ++); Cell.setCellValue (s [i]); } JTextField1.setText (""); JTextField2.setText (""); JTextField3.setText (""); JTextField4.setText (""); } Hold (FileNotFoundException pre) {Logger.getLogger (Addxl.class.getName ()). Logs (level SESEE, blank, ...

python - How does 'yield' work in this permutation generator? -

def perm_generator (lst): अगर लेन (lst) == 1: उपज lst else: i के लिए श्रेणी में Perm_generator (lst [: i] + lst [i + 1:]) में पर्म के लिए: उपज [lst [i]] + perm यह कोड है मुझे गड़बड़ कर दिया गया है, क्योंकि मुझे नहीं पता कि कैसे उपज एक दूसरे से जुड़ते हैं मेरी समझ यह थी कि उपज एक रिटर्न की तरह काम करती है, लेकिन इसे अस्थायी रूप से रोकता है जब तक इसे फिर से नहीं कहा जाता है यह कैसे उपज s काम करता है? यह एक संस्करण को देखने में मदद कर सकता है जनरेटर का उपयोग नहीं करता: def perm_generator (lst): res = [] अगर len (lst) == 1: वापसी [lst] else: श्रेणी के लिए मैं (लेन (lst) ): Perm_generator (lst [: i] + lst [i + 1:]) में perm के लिए: res.append ([lst [i]] + perm) रिटर्न res gen = perm_generator ([1,2,3]) प्रिंट जनरल # प्रिंट [[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1] ]] जैसा कि आप देख सकते हैं - यह "उपज" के साथ "वापसी" के "ढूंढें और प्रतिस्थापित" नहीं है "वापसी" संस्करण में हमें नतीजे को जमा करना होगा, ज...

php - eregi_replace() is deprecated -

Code> ($ i = 0; $ i & lt; size ($ badwords); $ i ++) {srand ((double) microtim () * 1000000); $ Rand_key = (rand ()% sizeof ($ replacement)); $ Str = eregi_replace ($ badwords [$ i], $ replacement [$ rand_key], $ str); } Return $ str; } When I submit bio, saves text, but I get this error: Deprecated: function eregi_replace () to / home / U557520691 has been deprecated /public_html/inc/Global.php line 177 Does anyone know how to fix this problem? try this or turn off the notice error_reporting (E_ERROR | E_WARNING | E_PARSE | E_NOTICE); or error_reporting (E_ALL ^ ​​E_DEPRECATED);

c++ - Crossed folders in eclipse luna -

Image
I have just installed Eclipse Luna and some of the folders appear in my project explorer, and I do not know it How to remove it and even what it means. It seems that the engine And the gameplay folders are also being repeated. What is happening? Thanks What I did was: Project Properties -> C / C ++ General -> Paths and Symbols There I added the directories to the folder and on the tab added to the source location I clicked: Edit the filter -> Remove I think how did you add folders to this project (via eclipses , A source folder or external form A.)

youtube - Resize video when scaling/minimizing YoutubePlayerView in android -

I can make the YouTube player view minimized to the bottom right, where to build the functionality of YouTube, given below The tutorial has followed the link in the hand corner of the screen. However, the video is not currently on a low window-size scale and maintains the original size. How do I update the YouTube player Wipe to change the size of the video to replace with scaling? view.xml: Android: Android: id = "@ + id / container" Android: layout_width = "match_parent" Android: layout_height = "match_parent" & gt; ; & Lt; Com.example.views.YoutubeVideoViewAndroid: id = "@ + id / youtubeLayout" Android: layout_width = "match_parent" Android: layout_height = "match_parent" Android: orientation = "vertical" Android: visibility = "visible" & gt; & Lt; Com.google.android.youtube.player.YouTubePlayerView Android: id = "@ + id / youtube_fragment" android: layout_width ...

Cannot pass parameter 2 by reference error in php PDO -

I'm getting the error: Can not go into context with parameter 2 ..... In this line ... $ stmt1- & gt; Dam (': value', $ _SESSION ['quantity'. $ I] * $ _SESSION ['value'. $ I], PDO :: PARAM_STR); What's wrong with the code above ?? It expects the second parameter is a variable that can be passed from context. Assume that $ stmt1 is a PDO statement, such as BindParam Unlike the PDOSTattement :: Bind value (), the variable is bound as a reference And only PDOStatement :: execute () is evaluated on time. Your second ultimate one expression is ( $ _ session ['quantity'. $ I] * $ _SESSION ['value'. $ I] ) A variable Not because you want to evaluate the expression now, I think you should use bindValue () instead.

Trigger script when duplicate a record filemaker -

itemprop = "text"> I am trying to trigger a script when a user records duplicates in a layout in FileMaker 13. But I can not do this action. In the answer to the question, as is asked, use the filemaker Pro 13 Advanced. The custom menu feature will allow you to override the duplicate record menu function with your script. However, according to your comment, it is the right question that you are trying to answer: "How do I clean the field when the record is duplicated?" To freeze the Auto-At data value of the field, you can upgrade FireMlder Pro or Filemaker Pro. You can do this (there may be some minor changes to the Windows computer): Go to: File menu & gt; Manage submenu & gt; Select Database ... Select: Your table from the field tab, and then click your date field: Check the option button (selected with your date field): Check the data in the Auto-Enter tab, leaving the data field blank

ios - Subclassing UIView and adding a property -

I've tried UIView subclassing. Because I want an enum in my UIView so I can check whether UIView has to tap into my game twice. But I do not have much experience with subclassing and it is not working Make subclasses Build assets within a custom subclass Change sub-squares from UIView in the storyboard Change all UIView announcements from my game class in the subclassic declaration Code: #import & lt; UIKit / UIKit.h & gt; Type-FED NSNUm (NSITF, VISU SATAT) {ENNYMALAPEP, EUNDUBEBELTAP}; @ Interface bannerview: UIView @property (nonatomic, assign) viewStaat staatVanDeView; @end and declare a property in the INIT from the UIVVI. @setuphesize staatVanDeView; - (id) initWithFrame: (CGRect) frame {self = [super initWithFrame: frame]; If (self) {staatVanDeView = ENUMDubbelTap; NSLog (@ "Set"); } Healthy return; } The log is not being called, so I do not know what is wrong. The integer 0 stays at all times from staatVanDeView . method...

returning DB data via ajax json -

I am posting data to an administrator via Ajax (selected) and want to return some database Jason-data . When I return only the data sent (selected), it all works well, but as soon as I want to return the DB data I have a server 500 error (the supernatural model is definitely present and the second in the same class Function works) Thanks for any indication! Ajax call: $ ('# country'). ('Change', function () {var selected = $ ('# country'). Val (); $ .ajax ({url: "inputChange", type: 'post', data: {selected: selected}, data Type: 'json'}). (Function (data) {console log (data.name_en);});}); Root: Root :: Anyone ('InputChange', array ('as' = 'InputChange', 'Use' = & gt; 'UserController @ inputChange')); Controller (working without DB data): public function inputChange () {$ select = input :: get ('selected'); Return Feedback: Jason ($ selected); The controller (DB i...

Getting data from xml in android -

I'm working on Android apps In my app I got an XML data response from the server and it was stored in the string. Now I need to appear in every value and dropdown of that XML. How can i do it Please help me with this. Be truly grateful. My XML data: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Root & gt; & Lt; Status & gt; First & lt; Status & gt; & Lt; Details & gt; Very cool & lt; / Description & gt; & Lt; FirstNames & gt; & Lt; Name & gt; CoderzHeaven & lt; / Name & gt; & Lt; Name & gt; Android & lt; / Name & gt; & Lt; Name & gt; Iphone & lt; / Name & gt; & Lt; / FirstNames & gt; & Lt; SecondNames & gt; & Lt; Name & gt; Google & lt; / Name & gt; & Lt; Name & gt; Android & lt; / Name & gt; & Lt; / SecondNames & gt; & Lt; / Root & gt; I'm getting the above mentioned...

neo4j - Hierarchical Cypher query with literal result -

itemprop = "text"> My object structure looks like this: Containers are in the form of a root nodes, which contain subcontractors in each sub-container There are also sub-texts. To indicate in the cipher MATCH: (Container) - [: HAS_SUBCONTAINER] -> (Subject) - [: HAS_TASK] -> (task) - [: HAS_TASK] -> (subtasks) ) I want to write a query that gives the literal representation of Jason to this Hirachi: {name: 'maine', subclaimer: [ {Name: good luck}, work: [{name: 'parent1', child: [{name: 'child1'})}]}]} whether such a cipher Is there a way to do a question? I found a level hierarchy solution: MATCH (cnt: container {name: 'main'}) - [: HAS_SUBCONTAINER] - & gt; (Subcnt) returns {name: cnt.name, subcontent: extract (subsy is assembled (subcnt) | {name: subc.name})} but for a more complex case Can not tell any idea how to do it? By looking at the depth of your matching pattern, you are nesting (consignor) i...

javascript - Math.min/max.apply set values as percent of new range -

मेरे पास मानों की एक सरणी सूची है var v = [0.009865,0.009866,0.009309 , 0.009831,0.009919,0.009965,0.009806,0.009509,0.009731,0.009888]; मैं सीमा को बनाने के लिए न्यूनतम, अधिकतम और दोनों के बीच अंतर की गणना करता हूं var max = Math.max.apply (यह, v) / 100; Var min = Math.min.apply (यह, वी) / 100; Var dif = अधिकतम-मिनट; console.dir ({ 'अधिकतम': अधिकतम, 'मिनट': मिनट, 'dif': dif}); कंसोल डैर शो अधिकतम: 0.00009965 मिनट: 0.00009308999999999999 वि: 0.000006560000000000005 तब मैं लूप के माध्यम से (सीमा के भीतर इन्हें प्रतिशत में परिवर्तित करने का प्रयास प्रत्येक मान, न्यूनतम मूल्य से कितना बड़ा है, अलग-अलग जवाब देकर 100 से परिणाम गुणा करना (वी (i) - i) के लिए (var i = 0; i & lt; v.length; i ++) {v [i] = ((v [i] -min) / dif) * 100; console.log (V [i]); } console.log उन मूल्यों को दिखाता है जो वास्तव में मुझे देखने की अपेक्षा नहीं रखते हैं (0-100 के बीच की उम्मीद) 148962.04268292672 148977.28658536574 140486.43292682915 148443.749999...

Generate a random image from a group of images in C# Windows Store App Development -

I am trying to generate a random image from a group of images with my pictures. I have not tried any code yet, because I'm not getting any suitable More specifically, the name of my images is "orb1, orb2, orb3 ... orb18". Orb2-18 are set to invisible I want to show one of them randomly on my specified position when orb1 is pressed. I have solved the press function of an image so that there is no problem. Here's my code: Public Start 1 () {this.InitializeComponent (); Orb2 Visibility = visibility Collapsed; Orb3 Visibility = visibility Collapsed; Orb4 Visibility = visibility Collapsed; Orb5 Visibility = visibility Collapsed; Orb6 Visibility = visibility Collapsed; Orb7 Visibility = visibility Collapsed; Orb8 Visibility = visibility Collapsed; Orb9 Visibility = visibility Collapsed; Orb10 Visibility = visibility Collapsed; Orb11 Visibility = visibility Collapsed; Orb12 Visibility = visibility Collapsed; Orb13 Visibility = visibility Collapsed; Orb14 Visibilit...

autohotkey - Handling loops in AHK script -

I am thinking - What is the best way to handle loop in AHK script? Example instead: ; [= IE.document.getElementsByClassName ( "name") 0] .innertext String_Object: Results gather 1 sleep 1000 Addr1 = StrSplit (addr1, "` ") if (substr (Addr1, 1, 2) =" M ") {Addrl : = String_object [2] ",". Trim (string_object [3]) ",". PostCode MsgBox,% Addr1%} Other {Addr1: = String_Object [1] ",". Trim (string_object [2]) ",". PostCode MsgBox,% Addr1%}; = IE.document.getElementsByClassName ( "name") [1] .innertext String_Object: Results collected 2 Sleep 1000 Addr2 = StrSplit (addr2, "` ") if (substr (Addr2, 1, 2) =" M ") {Addr2 : = String_object [2] ",". Trim (string_object [3]) ",". PostCode MsgBox,% Addr2%} Other {Addr2: = String_Object [1] ",". Trim (string_object [2]) ",". PostCode MsgBox,% Addr2%} I want to do something like this (note this is a ps...

javascript - How can I preload images in a Worker? -

I try to preload an image in a worker: Var img = new Image); This will get an error for: Unwanted references: Image is not defined. Are there other ways to preload the images in a worker? Can XMLHttpRequest do this? If so, when I use to preload XMLHttpRequest images to work, then will my main UI thread cache that image? Should I use the image or XMLHttpRequest in my main ui thread? Workers with the Web, you do not have access to the DOM in the same way, as you are referring to the page Want to run javascript in Web laborers go in their own context, but this does not mean that you can not pre-load images, you have to do it differently, for example: var x = New XMLHttpRequest (); X.responseType = 'blob'; X.onload = function () {// something} x.open ('GET', url, true); X.send ();

ajax - How to serialize ZF2 form object to JSON? -

I am using a zf2 form object on the server and ajax code on the client to implement my registration form. I post the prices of the form in the AJAX request, there is no problem, and form them $ form-> Fixes with set data ($ request-> getPost ()); After validating the form and registering on the server, I want to send the form back to the customer, especially if there are errors, so I can show them to the user. I'm looking for a standard way to sort the form object in JSON format or using a plugin, so I can send it in response to an AJAX call. Any ideas? What can you do well on your form of verification and then you come back Your Form within New JasonModel A small example of how to handle your controller: class registration controller extends AbstractActionController {public function register (action) {$ form = new RegisterForm ( ); $ Form-> SetInputFilter (new register input filter ()); If ($ this-> getRequest () -> isPost ()) {$ form-> SetD...

java - Simultaneously processing in one Servlet -

I have a service that receives a request, to get 5 tasks (hold the external data form) and return all data Order the client. After completing all 5 tasks, how to process 5 tasks together and continue the servlet code? You can use a synchronization help Allows one or more threads to wait until the set of operations to be completed in the second thread. Sample code: count initial start signal = new calculation log (1); Countdown is signed = new MozillaLock (5); // 5 working class worker Runnabal {personal finals countdown start.signal; Private Final Getsdown Latched Sainle; Private final interval form number; / / You can also pass the extra logic along with the worker (CountdownLunch StartSignal, countdownloaded, sign, int threshold) {this.startSignal = startSignal; This.doneSignal = doneSignal; This.threadNumber = threadNumber; } Run Public Zero () {try.signal.await (). do your work(); // Actual work is done to be done here Signal countdown (); } Grip (Prerupted Pre-...

java - Two dimensional array with million rows and columns -

I have user-event data that participates in user ratings for user ratings. I have the equality matrix for which two-dimensional array is needed as input (User-Event Matrix with Event Ratings) I have three columns of data: User ID, EventID, Rating But the number of users is approximately two million and events count approximately 1 million, then what would be the efficient method to use the Java Library for computing similarity matrix? Be it As the numbers are large and not fit in memory in my system. I am using Java for the problem. Thanks Aman

c++ - Use 64 bit lib in 32 bit code -

I'm wondering if there is a way to use 64bit lab in 32bit executable. I can design a 64 bit script according to this, so I can expose specific APIs for that purpose in which they will have clear 32-bit coalition variables, if it would be helpful. Actually we have a large part of the software that has been compiled to 32 bit, and for that time we do not want to recompile it as 64 bit, because it will cause a lot of headaches. Now under the current code, we want to use a new API that we are creating, that the new API is hiding a 64 bit implementation, but the API itself is "out" on 32 bit We are posting with ideas like passing the data through remote execution or sockets, but it any thoughts? P>

Qt - emit a signal from a c++ thread -

I want to emit a signal from a C ++ thread (study :: thread) in QT. How can I do this? You definitely have a thread ( QThread , std: : Thread or even boost :: threads ). Only you should be cautious with the fifth parameter ( Qt :: ConnectionType ) of your connect function: If the Qt :: DirectConnection : slot applied immediately Goes (from the current thread), when the signal is emitted. If the Qt :: QueuedConnection : the slot is applied to the control return on the event loop of the receiver thread, the i slot is executed in the receiver thread. See more options. The problem is not really that, by which you throw the signal, it is high which thread is being slot activated. For example, I think that QLabel :: settext should be executed with the master thread (primarily the main thread) of QLabel . So if you emit the signal associated with a thread from a QLabel to settext , then with the connection Qt :: AutoConnection , Qt :: QueuedConnection or Qt :...

Extract key name from single element dictionary in Python -

If I know that my dictionaries will always have the same elements, then there is a way to remove the key name without going through the list ? I am currently doing this. data = {'foo': [1, 2, 3]} key_name = data.keys () [0] No more Have a skilled technique? Change the yield keys. Use: & gt; & Gt; & Gt; Data = {'foo': [1, 2, 3]}> gt; & Gt; & Gt; Next (ITR) 'EFU' Benchmark: In [1]: data = {'Foo': [1 , 2, 3]} in [2]:% timeit next (IARAR) 1000000 loops, 3: 1 9 7 best per loop in NS [3]:% timeit data.keys () [0] 10000000 loops, Best 3: 155 ns per loop [4]:% timeit data.iterkeys () Next () 1000000 loops, 3: 226 ns per loop [9]:% timeit k, = data.keys () 100,000,000 loops, best 3: 151 ns per loop [10]:% timeit k, = data # & Lt; --- The fastest 10000000 loops, the best 3: 81.4 loop per loop

qt - How to repetitive function while holding QPushButton? -

मेरे पास निम्न कोड है: शून्य MainWindow :: OnClicked () {otesanek-> gt ; सेटपोस (ओटेसेंक- & gt; pos ()। X () + 5, ओटेसानेक- & gt; pos ()। Y ()); } कनेक्ट (सही, सिग्नल (क्लिक किया ()), यह, स्लॉट (ऑनक्लाइट ())); otesanek QGraphicsScene में QGraphicsItem है और सही एक ही दृश्य में QPushButton है मेरा लक्ष्य: होल्डिंग द्वारा बटन (दाएं) आइटम को 5 पिक्स के ऊपर ले जाता है, जब तक कि बटन दबाए नहीं जाते। यह कोड कर रहा है: मुझे 5 पिक्स और फिर 5 पिक्स से अधिक स्थानांतरित करने के लिए फिर से दोबारा क्लिक करना है मैंने इसे दबाने वाले फ़ंक्शन के साथ करने का प्रयास किया, लेकिन मुझे कोई परिणाम नहीं मिला। आशा है कि आप मेरी समस्या समझेंगे उत्तर के लिए धन्यवाद: -) आप बार-बार अपनी कक्षा में स्लॉट कॉल करने के लिए QTimer का उपयोग कर सकते हैं और MousePress और का उपयोग कर सकते हैं। QTimer MyGraphicsView.h ईवेंट > #include & lt; QGraphicsScene & gt; # शामिल करें & lt; QGraphicsView & gt; # शामिल करें & lt; QMouseEvent & gt; # शामिल...

Facebook SDK. File required is not in the folder -

This is my first Facebook app, which I am trying to build. I started reading about it, I downloaded the SDK, looked for example and I found that in every code, they start importing a facebook.php file which I can get from the SDK folder I am missing that I have downloaded from Facebook. Even the code shown on Github starts with , 'facebook-php-sdk / src / facebook.php'; But once again, this file does not exist, how do I use SDK? You are viewing the wrong version on the Gitub, it is v4: Works completely differently, as you can see in the example code. If you do not now include "facebook.php", then you either use the composer or you load autoloader.php in the src folder of the SDK. Tutorials for a basic PHP SDK here:

java - Gmail API Users.Messages.get throws User Rate Limit Exceeded -

Trying to use the RESTFul API from Gmail and I'm getting this error: the user rate limit exceeded However, I do throttling (in 5 seconds and not 5 times, when Google says that there are no 25 calls in 1 second) and even when I'm getting an exception and there is a lot more, I still I am implementing this. This exception is still happening Therefore, what can be the problem here? Thanks There is a well defined quota for Google API, here There is one for Gmail: There is a small utility class to handle quota (for single thread, thread implementation is slightly more complicated): public Range of APLRTimeters {Private long-time selective; Private Final Quaterifier Second; Private int quata remanning; Public ApilRateLimiter (last full quotaPerSecond) {this.quotaPerSecond = quotaPerSecond; This.quotaRemaining = quotaPerSecond; This.timeSliceEnd = System.currentTimeMillis () + 1_000L; } Approval of obstruction of Public Zero Reserve (final quota reserved for quota)...

java - Convert long to "byte-array-ed" text, without heap allocations -

I would like to convert a (positive) primitive long to byte [] in my text form , In java An easy way would be for example: 123 = & gt; "123" = & gt; [49, 50, 51] Although for a long time it assigns a string to change the string and I am trying to avoid it, for my GC free library, I would like to present it directly on the pre-allocated byte array. Therefore, my question is how do I go for a byte [] representation for a long time, if I have a string constructor (for example above) I am calling with "123" To clarify, I do not want to convert it into binary form as long as it is in the form of byte [] , but rather literally Thank you! N This simple program: long L = 123; Int size = (int) (Math.log10 (l) + 1); Byte [] array = new byte [shape]; For (int i = 0; i I tested it for the current time in milliseconds and acted as expected: LC = System Syrtetime milliseconds (); ... System.out.println (Arrays.toString (array)); Ou...

javascript - using google maps api to show locations with multiple custom marker -

I am a JavaScript novice, I am currently experimenting with a small Google Map based job. I have a large set of latitude and longitude, around thousands and for each set of latitude and underlined pair, I have some value that comes from some sevier's. I can catogorize each value to something like excellent, good or bad Now what I want to do for the above scenario, shows all classified values ​​in specific latitudes and underlines and are excellent, good or good Uses different custom markers for poor price My question is, can I use the Google Maps API without any key and how can I use multiple color based custom markers to show all the latitude and diagrams? One help would be appreciated

shell - How to include variable to output filename using awk -

is a command that prints the file from the CSV file to the extent of the range: Date1var = mm / dd / yyyy hh: mm: ss date2var = mm / dd / yyyy hh: mm: ss awk -F, -v d1var = "$ date1var" -v d2var = "$ date2var" '$ 1 & Gt; D1var & amp; Amp; $ 1 & lt; = D2var {print $ 0} 'OFS =, plot_data.csv & gt; Graph1.csv I'm guessing is it possible to include my variable in the output filename? The last name of the file should be the same: graph_d1var-d2var.csv Any ideas? Let the shell handle it: you're starting with the shell variable after all date1var = mm / dd / yyyy hh: mm: ss date2var = mm / dd / yyyy hh: mm: ss awk -F, -v OFS =, -v d1var = "$ date1var" \ -v D2var = "$ date2var" \ '# awk script is unchanged' plot_data.csv & gt; "Article 1 _ $ {date1var} - $ {date2var} .csv"

seo - Do I need hreflang x-default and can I've multiple hreflang point to same URL? -

Based on this, I've come to this but I have N and the default point is another Instead of being n / , will it be okay to have a single URL? I do not have to make another folder because it requires additional maintenance. Basically, the default and main site is in English if users need to look at another language, then go to the additional folder zh - * & lt; Link rel = "alternate" href = "http: // Example.com" hreflang = "en" & gt; & Lt; Link rel = "alternate" href = "http://example.com/zh-hant" hreflang = "zh-hant" & gt; & Lt; Link rel = "alternate" href = "http://example.com/zh-hanz" hreflang = "zh-goose" & gt; & Lt; Link rel = "optional" href = "http://example.com" hreflang = "x-default" & gt; It is also okay that I reduce the zh-hant to cht and zh-hans in the URL to chs ? If English is the default, then you...

sql - logic to split revenue data by account if there are multiple data points -

First of all, the SQL Noob is here so that I do not understand my question. In Table 1 there is an ID and the name (table I want to add data) is a large table with 2 million data points, from which I need to draw revenue information. There is a detidency in Table 2, which I change in months and years. In some way, I want to gather months and years in a quarter year and how far I have got it. I need to keep this script as below, but have just modified a bit. So in the end I have to get revenue on the basis of product and quarterly basis. What am I missing? Month period_idtoid (t1.date_id, DATEID, MONTHOFYEAR) month, - - year period_idtoid here my script select t1.nameid, t1.date_id, As the year (T1.date_id, DATEID, YEARID), select t1.month, t1.year in case when month (1,2,3) and year = 2012 then 'Q1 2012' WHEN in month (4, 5, 6) and year = 2012 then 'Q2 2012' when month (7,8,9) and year = 2012 then 'Question 3 2012' month (10, 11, 12) and year = 20...

optimization - Optimizing this haskell linear algebra code -

I have this Haskell code to test the collision between size (it depends on linear and lens packages) Import Linear Hide (Trace) Import Control. Lens. Gator ((^.)) Type Vec3 = V3 Float Data Triangular = Tri Vec3 Vec3 Vec3 Data Box = Box Vec3 Vec3 - | A Primitive Colloidal Access in 3D Class :: A -> [VAC3] - | Back to all potentially different axes, generalized - | Project of the shape on the general axis, a 1D line segment project :: a -> Vec3 - & gt; (Float, float) intersection :: (colloid A, collide b) => A - & gt; B - & gt; Bull A B = Hesiolap pierces all the axes where axs = axes a ++ axes b - line segments overlap? Overlap (L, R) (L ', R') = L '& lt; = R & amp; Amp; R '& gt; = L isoverlap ax = project an ax 'overlap' project b ax {- # special intersects :: box -> Tri - & gt; Bull # -} Examples are colloid tri where - normal normal and edge normals {- # inline axis # -} axis (triangular quark) = map normal (face:...

uitabbarcontroller - IOS conditional view controllers under tabbars -

I am creating an app with a login system. There is a tab in 4 tabs and a home tab. I have to keep a conditional sub-view controller where the user is not logged in, it will be a login page, where the user will be logged in, the user will be redirected to a different view controller Will be directed. I have used the Navigation Controller between my tabiovi controller and tabview controllers. Dennis Just asked @ duci9y to elaborate on what said. You can do something like this: In the implementation of your first tab: if (! User.loggedIn) {loginViewController * loginController = [LoginViewController new]; [Self-present ViewController: Animated login controller: yes complete: zero]; } in your login view controller // after user login [auto shotgun viewer: unlimited: yes complete: zero];

regex - Replace parts of a URL in Greasemonkey -

I'm trying to change a portion of the URL using Greasemonkey script, but what I try to do To am doing The same as the original Urls: http://x1.example.to/images/thumb/50/157/1571552600.jpg http: // X2. Example.to/images/thumb/50/120/1201859695.jpg http://x3.example.to/images/thumb/50/210/2109983330.jpg Do I have to I want to get: http://example.to/images/full/50/157/1571552600.jpg http://example.to/images/full/50/ 120 / 1201859695.jpg http://example.to/images/full/50/210/2109983330.jpg I just thumb x2 .example.to, x3 .example.to, x4 .example.to etc. Originally a completely new URL like example.to/images/full / will start from the original URL, how do I get it? I have got a Gramzakki script and I tried to work but failed. Here's what I have done here. // == Ususcript == // @name Examples Images Fixer // @namespace Example // @ Descriptive Image Gallery Resolves // @ Include http: // *. Example.to/* // ==/userscript == var links = document....

mysql - Unable to delete specific entry PHP -

Then I have this PHP app where you can work and delete them. The problem is that when I have more than one task, then all the deleted work links will remove the work you want to delete instead of the work you want to delete. For example, in the latest work ID = 25 I want to delete the job with id = 18, but clicking on the deleted link removes the task with id = 18. The code for the work views is here: while receiving ($ line = $ stmt-> (PDO :: FETCH_ASSOC)) {$ id = $ _SESSION ['id'] = $ line ['id']; $ _SESSION ['Jobs'] = $ line ['Work']; $ _SESSION ['Start'] = $ line ['Start']; $ _SESSION ['Ended'] = $ line ['Ended']; // Start a session starting for a PHP date object $ startdate = new date time ($ _ session ['start']); $ Endadet = new date time ($ _ session ['end']); // echo work property in a table print " "; Print "& lt; p & gt; & lt; a href = 'editview.php? Id =...

r - Specifying lag in `dlnm` when passing arguments to `crossbasis` -

I am using the dlnm package to create a limited distributed interval non linear model. I intend to test the ideal fit based on various lag levels, from which it shows which interval is appropriate. There is no need to mention that I will implement some domain knowledge to make a good call. I am using these two available resources, which is to accomplish this complex task: I have created the matrix for the first time, in which both of these are my predictions -Using linear effects: Impressions AX & Lt; -onebasis (locanatmodelset $ ImpressionsA.x, Fun = "poly", degree = 2) Impressions AA & Lt; -onebasis (locanatmodelset $ ImpressionsA.y, fun = "shift", degree = 2) Since my non-linear relationship is going to be quadratic, I am using 2 degree polynomials . Now I want to factor in the lac for each variable by calling on crossbasis . This is where I am confused. According to package documentation, the function format is: cb My suspicion is: ...

objective c - NSAnimationContext On Several Views Simultaneously -

I have two NSViews . I am playing with the NSAnimationContext and have been successful in getting a nice simple animation, though it 'alerting both of my thoughts. Here's my code: [NS Animation Contact Sampling]; [[NSAnimation contactcontactcontact] Setdition: 1.4]; [[NSAnimation contact content content] Setting function: [CameticTiming function functionWithname: KCAMDITIMING functionsSInisAut]]; [[NS Animation Contact Contains] Set Ends Handler: ^ {//..Collect Callback Code Goes Here ...}]; [Self.loginView.animator setFrameOrigin: NSMakePoint (self.loginView.frame.origin.x + animView offset, self.loginView.frame.origin.y)]; [Self.signUpView.animator setFrameOrigin: NSMakePoint (self.signUpView.frame.origin.x + animViewOffset, self.signUpView.frame.origin.y)] ;; [NSAnimation contacts and grouping]; All I'm doing to move both scenes from left to right, to 1000 pixels (that animViewOffset ) As the code is currently, it will only animate gaviewview if I c...

Why changes python the 'from .. import ..' behaviour depending on script from the package -

I am working on my first package, and with this package, it intends that you get it from [MyPackage] Import 'import' so that you have to write [MyPackage]. every time. However, this package contains subpages, so I did it like this: __init __ Py from subpackage1 import * from subpackage2 import * etc. In this way, you only have to do '[MyPackage] Import *' once and it will work. It was a good solution, till I did not decide that I want to import this subpackage completely. I thought that it would be a good idea to have an additional subpackage to name all the modules, in this way, the same result ' [MyPackage] Import will be received from all modules: allmodules.py from .subpackage1 import * .subpackage2 import * etc .. However, it seems that this does not seem to work, because doing so No function seems to be more. Why is this not a work and how should it be decided? thank you in advanced! MyPackage.allmodules import *

python - How to find lists after a specific word -

I am trying to find all the lists after those words, which I want to do in categories according to that word . So my sample data is as follows: & lt; P & gt; & Lt; A href = "#" & gt; Word A & lt; / A & gt; & Lt; / P & gt; & Lt; Ul & gt; & Lt; Li & gt; Some & lt; / Li & gt; & Lt; Li & gt; Some & lt; / Li & gt; & Lt; Ul & gt; & Lt; P & gt; & Lt; A href = "#" & gt; Word & lt; / A & gt; & Lt; / P & gt; & Lt; Ul & gt; & Lt; Li & gt; Some & lt; / Li & gt; & Lt; Li & gt; Some & lt; / Li & gt; & Lt; Ul & gt; Keeping the above example in mind, I want Tiwari Fetch Word A and the categories that are in the list below, and for this WordB . Is it possible to search for WordA and below & lt; Ul & gt; Find tags Changing all the links in the paragraph, parent for each link Get the ul tag ...

ruby on rails - How to implement ActiveRecord has_many through polymorphic association with different source types -

I have 3 models: votes, students and teacher students can vote for any other student or teacher. Earlier, a student could only vote for a student or a teacher. But now I have the option to vote for many students and teachers. Vote model additionaly is a category_ id and a rating repository, so that you can vote different rated in the same category. I use the fourth model for voting and multi-lingual relations among the teacher / student, which is called Single Vote Relation, which has been voted, voted, voted and voted. Now I have the ability to vote. Receive and receive the collection of voting figures (student or teacher) without manually messing with the single voter table: is_a any: Voted, via: Single_Votted_relation / But I get an error message when I try to do my work Do not look model: related_to: voter, class_name: "student "Has_maya: single_ explosion_related_medium: vote Made through Ga_stutents :: Akl_visfotit relationship Srot_prkar: "student...

php - Warning: mysql_connect(): No connection could be made because the target machine actively refused it -

I am using SQLplus and zend servers when I try to run config.php, I get an error I do not know what this is because. This is the code of config.php & lt ;? Php $ host = "jojo"; // hostname $ username = "system"; // MySQL usernameName password = "A1234"; // MySQL password $ db_name = "project_db1"; // Connect the database name to the server / server and select the database. Mysql_connect ("$ host", "$ username", "$ password") or die ("can not connect to server"); Mysql_select_db ("$ db_name") or die ("can not choose DB"); ? & Gt; I tried to change the code above and made the connection using the following code: $ conn = oci_connect ("system", " A1234 "," (description = (ADDRESS = (protocol = TCP) (host = jojo) (port = 1522)) (CONNECT_DATA = (server = dedicated) (SERVICE_NAME = orcale)))); The connection problem was resolved but now mysql_se...

Does python compile_command consider the environment? -

दस्तावेज़ में compile_command फ़ंक्शन को code मॉड्यूल में वापस आ जाएगा एक वैध कोड ऑब्जेक्ट यदि उपयोगकर्ता इनपुट "पूर्ण और मान्य" है मैं यह जानना चाहूंगा कि क्या यह निर्णय अजगर के चलने वाले वातावरण पर निर्भर है, जैसे वे चर और आयातित मॉड्यूल जो कि compile_command चलाता है। इसके कारण मैं यह पूछ रहा हूँ क्योंकि मैं अपने स्थानीय मशीन में एक अजगर से एक उपयोगकर्ता इनपुट को एक निष्पादन के लिए एक दूरस्थ मशीन में अजगर में भेजना चाहता हूं। मैं यह तय करना चाहता हूं कि वास्तव में निष्पादन के लिए भेजने से पहले उपयोगकर्ता इनपुट पूर्ण है या नहीं। मेरा प्रश्न यह है, क्या यह मेरी स्थानीय मशीन में compile_command को कॉल करने के लिए पर्याप्त है, या क्या मुझे यह तय करने के लिए कि क्या यह पूर्ण है या नहीं, दूरस्थ मशीन को उपयोगकर्ता इनपुट भेजना है। संकलन निष्पादन वातावरण से स्वतंत्र है। यही कारण है कि compile_command ऐसा करता है जैसे ग्लोबल्स और स्थानीय लोगों पैरामीटर नहीं लेता है। इसलिए, संकलन Python कोड सुनिश्चित करता है यह वाक्यविन्यास सही है और यह भाषा के नियमों का ...

angularjs - Why does Vimeo iframe flicker when clicking anywhere on the page? -

I have created a simple filter that loads Vimeo iframe . It's inside a ng-repeat code everything works fine, except when IFrame flickers whenever I click anywhere on the webpage, every time I get a textarea Or pressing a key ("keypad") in the Input area, it's a bit weird because there's nothing else on the page - only iframe I have a code here: & lt; Div ng-app = "myApp" & gt; & Lt; Div ng-controller = "myAppCtrl" & gt; & Lt; Div ng-repeat = "item in item" & gt; & Lt; Div id = "{{item.video.code}}" & gt; {{Item.video.code | Vimeo}} & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; Var myApp = angular.module ('myApp', []); MyApp.filter ('vimeo', function () {return function (vimeoID) {var data = '& lt; iframe src = "http://player.vimeo.com/video/' + vimeoID + '" width = " 360 ...