Posts

Showing posts from August, 2014

c++ - Is it safe to use a weak_ptr in a std::set or key of std::map -

std :: weak_ptr और std: के बारे में आज कई प्रश्न हुए हैं : owner_less और साहचर्य कंटेनरों std :: set और std :: map में उनका उपयोग करें। इसमें कई पद हैं जो एक weak_ptr का उपयोग करके एक std :: set में गलत है, क्योंकि अगर कमजोर संकेतक की समय सीमा समाप्त हो जाती है, तो यह अनिर्धारित व्यवहार होगा। क्या यह सही है? एक कारण std :: owner_less मौजूद है इस आदेश को प्रदान करने के लिए, और कमजोर संकेतक समाप्त होने की उपस्थिति में इसकी सुरक्षा की गारंटी। मेरा तर्क है सबसे पहले, std :: owner_less ऑपरेटर () की परिभाषा एक सख्त कमजोर आदेश को परिभाषित करता है जैसा कि 25.4 में परिभाषित तुल्यता संबंध के तहत ऑपरेटर () , ! ऑपरेटर () (ए, बी) & amp; amp; ! ऑपरेटर () (बी, ए) , दो shared_ptr या कमजोर_पीटी उदाहरण समतुल्य हैं यदि और अगर वे स्वामित्व साझा करते हैं या दोनों खाली हैं। दो मामलों हैं वे एक ही वस्तु साझा करते हैं, जो व्यावहारिक दृष्टि से मतलब है कि वे एक ही संदर्भ गणना वस्तु साझा करते हैं। / Li> ये दोनों खाली हैं। अब, मुझे विश्वास है कि भ्रम की स

ios7 - Automatic phone dialing application for iPhone -

I am trying to develop an application that dials phone numbers from the iPhone at regular intervals without user contact Can do. The problem occurs when the phone dialer app comes in the foreground, then my app goes into the background. I tried to use the web view to call the phone number but this number indicates the user before calling the number. Or, what is the way to dial a number from a webview without prompting the user? Or there is no other job to bring my application to the foreground after the call is over. My app is going to the app store, so there is no private API problem. EDIT: I tried to use Telepropton: // But I do not need any user interaction. I can not even break the prison As IOS7 you can not make phone calls from regular iOS apps This means that I want to call CTCallDial to dial the phone code without the user's permission. Background / Foreground Your app will run on the background and you can not do anything about it if you want to run your ap

ruby on rails - 20 questions quiz game app problems? -

I am trying to write a twenty-question app for school, and I have tied a speed. On line 26, I'm getting the error: 20q2.rb: 26: Warning: String Verbatim Status . Besides, I have a scoring system to tell the user what their final score is and it prints the score after every question when it is displayed at the end of the quiz. The code works otherwise, so if someone can help me two problems which I am doing will be great Here is the code: #quotions quesions in a row QANDA = [["Sky is blue?", "Y"], ["Is it dark" Is this a yes or no question? "," Y "], ["Is this a small answer question", "n"], ["Is this program written in rail? "," N "], [" Is this program written in Ruby? "," Y "]] # create a variable for the scoring system # num = 0 # Create a loop to ask questions automatically. #spaces for user input puts" y or n "ans = gets. Chomp ansdown = ans.downca

android - What is position of Scene, Velocity property in PhysicsHandler? -

Image
I'm starting Android programming with the endengine framework. And I learn with tutorials on the internet. I do not know that I am wrong about the wrong position about the property of scans and velocity in PhysicsHandler. here: And if I The opinion is true. Thus, how to set the velocity property of physics handler to follow the status of the scene? This is my example: and my code: scene.setOnSceneTouchListener (new IOnSceneTouchListener () {@Override public boolean onSceneTouchEvent (visual pScene, TouchEvent pSceneTouchEvent) {if (pSceneTouchEvent.getAction () == TouchEvent.ACTION_UP) { PositionUpX = pSceneTouchEvent.getX (); positionUpY = pSceneTouchEvent.getY (); ball = new ball (status download x, positiondoni, position opxx, positioning event, mfaetector project, getVertexBufferObjectManager ()) ;attach child (ball); return if; Pscnt t Cavt. Gate action () == Tcavent. Akshn_ DOWN) {positionDownX = pSceneTouchEvent.getX (); Sthitidaunwai = pSceneTouchEvent.getY

is there any concept like FrameLayout (Android) in java Swing? -

Image
I'm new to the Java swing framework and for many years I've been working with Android . So, naturally I am related to the layout of Android with the swing layout of Java I need something like FrameLayout in Android. FrameLayout works as Android; FrameLayout is designed to block an area on the screen to display an item. You & gt; Multiple children can be added to a frame layout, but all children are & gt; At the top left of the screen the children are drawn in a heap, with the most recently added child. The size of the frame is the size of its largest child (plus padding), which is visible or not (if parent permit of Frameleout). Is there a layout or an implementation that works the same way? I need to implement the following UI; There is a container , which is JetBirdPane . I have applied this partially, I am unable to apply the deep bar behind the tab. I think enter the image details here"> You can use frameless jdesktoppane instan

javascript - Stream Images using a local server -

I want to stream images (server's print screen) using a local server (Apache). For one example, I will go to the website using a machine on the same network and then this web site will show a set of images at the speed of 30 fps (then I will see it as a video). Image quality should be good Currently, I can go to this website using a machine connected to the local network. But I can not understand a way to stream images and I have no knowledge of PHP. Is it possible ?? Can someone tell me in the right direction ... thanks Ffmpeg can help in making videos with images It is a CLI binary that can work. Ref:

Emacs projectile with multiple repos (git/svn etc.) in one project -

I have a single git repo with a directory structure that looks like this: Root ---------- src | | | ------ 3 Route is my working directory; 3rd contains multiple third-party git submodules. Finds files in Provincial-search-file only src , it does not work for submodules. Provincial-GIT-Command code> git ls-files So I resolved the problem with the following code: (setq projectile-git-command "git -ls-all-files ") git-ls-all-files is a shell script: \ # ! / bin / zsh files = `git ls-files -co --exclude-standard` sb_files = 'GIT - no-pager subpload --quote foreach' git ls-files --full-name -co --exclude-standard | Sed s! ^! $ Path /! '`All_files = $ files $ sb_files $ all_files resonate

c# - What does it mean the something is Hardcoded ? -

I am following a movie MVC tutorial, and the author says the following: Code> Public String Index () {Return "This is my default & lt; / b & gt; action ..."; } Currently, the index method gives a string with a message that is a hard code in the controller class. Change the indexing method to return a visual object, as shown in the following code: public performance index () {return view (); } OK, okay, so he changed the signature of the ceremony. But why does he call it hardcode? When you do hard work , then this is usually the string Refers to things like values ​​and other settings that are part of a compiled code. In short, if you want to return the index method, then you have to make changes and recompile. Use configuration files for optional settings, such as app.config and web.config files when it comes to certain strings (which are used as user interfacing messages) , You use resource files that allow you to store multi language

java - Why do we use >> to get colour values from RGB? -

I know that to get color values ​​from RGB b = rgb & Gt; & Gt; 0g = RGB & gt; & Gt; 8R = RGB & gt; & Gt; 16 Does anyone tell me why does this work? Each of them is correct 8 bits? Do not & gt; & Gt; N give n bits first? How does it work for B and R? Actually it should not work unless you strip the bar at some point in the unnecessary bits. & gt; & Gt; is the correct shift operator, where zero bits are sent from the feed and right to the rolling bits. BitBasket (left) assume that the 24-bit RGB value has the following bit, eight color per capita: < rrrrrrrrggggggggbbbbbbbb Right-transfer that gives you 0 bits from the same value, it gives you the rrrrrrrrgggggg when you move correctly by eight bits , And corrected by sixteen bits, gives rrrrrrrr . So you can see that the three shifts give each of the three color values ​​in the "lower" (to the right) eight bits. One more legal way to do this would be to e

android - actionlayout on menuitem does nothing -

Image
I am setting an action on the menu item and setting the background color and image, but it is not respected . In my activity, I have: getMenuInflater (). Flood (rmenu submit_action, menu); My deposit_app is: & lt; Menu xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: app = "http://schemas.android.com/apk/res-auto" & gt; & Lt; Android Android: ID = "@ + ID / Action_Submit" Android: Action Layout = "@ Layout / Check" App: ShowAsaction = "Always" /> & Lt; / Menu & gt; My check layout & lt; Relative layout xmlns: android = "http://schemas.android.com/apk/res/android" Style Android: Android: ATR / ActionButton Style "Android: Layout_Wind =" Fell_Parent "Android: Layout_Height =" Fell_Parent "Android: Background = "# E8A8A8" Android: Clickable = "True" Android: Content Dictionary = "LOOL"> & L t; / Relativ

How to execute a flume configuration file using java program? -

मेरे पास फ्लू कॉन्फ़िगरेशन फ़ाइल है filename.conf , जब मैं इस फाइल को टर्मिनल में निष्पादित करता हूँ तो यह काम करता है कुंआ। लेकिन मैं रनटाइम.गेटरीटाइम ()। Exec फ़ंक्शन का उपयोग करके जावा प्रोग्राम में एक ही फ़ाइल को उत्तेजित करने की कोशिश कर रहा हूं। यह यह मेरा flume निष्पादन कमांड: / home / path / flume / bin / flume-ng एजेंट --conf फाइल /होम / पाथ / फ्लूमेम / फ़िलेनाम.कॉम --name एजेंट- Dflume.root .logger = INFO, कंसोल यह मेरा जावा कोड है: प्रक्रिया p; P = Runtime.getRuntime ()। Exec ("/ home / path / flume / bin / flume-ng एजेंट --conf फाइल /होम / पाथ / फ्लूमेम / फ़िलेनाम। कॉन्फ़ - नाम चहचहानाअगेंट- Dflume.root.logger = जानकारी, कंसोल "); p.waitFor (); BufferedReader रीडर = नया BufferedReader (नया InputStreamReader (p.getInputStream ())); स्ट्रिंग रेखा = ""; जबकि ((रेखा = रीडर। रीडलाइन ()) = नल) {System.out.println (रेखा); } मुझे कोई त्रुटि नहीं मिल रही है। जावा प्रोग्राम का प्रयोग करके कॉन्फ़ फाइल को चलाने के लिए एक एपलीकेशन क्लास। क

sql server - Sql Calculating history from migrated data -

Image
I have some data like below The problem is, I count the history based on the number assuming that the number" submission form "Has a unique identity. Every time there is a change in the value of a column, then I have to change it. Below is the structure for the history table. Now in our system two forms Are together with numbers 2 and 4. Then the result history data should look like this. In MSSQL you can use the function to get the previous value. With the CT (SELECT ID, number as subdimedge, 'zodiac' as the field, leg (zodiac) over (based on old number id) as the old value, The amount of new value in the form of T) SELECT * is whistle where there is no order by Old Volume, IDID ID Another method of using the ROW_NUMBER () function to add an existing record to the previous record is so that you Receive all the values ​​from the previous record Enable: P> with in the form of whistle (SELECT T. *, ROW_NUMBER ()) (according to ID DESC a

python - How to scrape and extract similar xpaths onto different rows in csv using Scrapy -

I am facing a page that contains several H2 tags and I need all those titles That's stored in separate rows. My CSV sheet I am using scary for this and my current code is: items ["title"] = title. Selection ("// h2 / text ()"). Extract () Obviously, it ends in a single cell in my CSV to store all the H2 tags on that page. Is there any way by which I can break every H2 tag? Thanks You can loop on each h2 To set the "title" for each item, note the items starting with items

c++ - Memory leak on CreateErrorInfo when analyze from debugdiag? -

I am analyzing the memory dump generated by debugdiag. I shows the CreateErrorinfo method call which is similar to the memory leak , I am using proper map files for both mydll and myanotherdll. What does CreateErrorInfo mean? How is it leading to memory leak? Function Source Destination mfc90u! Operator new + 33 mfc90u! CPlex :: Create + 1f mfc90u! Operator new kernel32! TlsSetValueStub kernel32! TlsSetValueStub MYANOTHERDLL ! CreateErrorInfo + 188e2 MYDLL! MyClas :: OnTimer + a3 ...... \ myfile.cpp @ 4639 MYDLL! CMainFrame :: OnTimer + 71 ...... \ mainfrm.cpp @ 1246 mfc90u! CWnd :: OnWndMsg + 407 mfc90u! AfxCallWndProc + a3 User 32! MDICLTEDPDWMM! MCDLLDU! __SSE2_ Available_inited + 657b MFC 90U! CWND :: WindowPro +24 MFCU! FxCollwide Proc + A3 MFCCD! FxWandPro + 37 MFCCD! Fxcollwand Prakr Mfcd! FxWrapCrabbase + 56MFCDUFXWdProppiMfC90U! AfxWndProcBase Is it not related to not issuing an interface? Interfaces from manufacturer IrroInfo should be issued by

javascript - When i call the ajax in node.js as a return undefined -

मेरे node.js कोड index.js var Mysql = की आवश्यकता है ('mysql'); var एफएस = की आवश्यकता है ('एफएस'); Var ejs = require ('ejs'); Var क्लाइंट = mysql.createConnection ({उपयोगकर्ता: 'रूट', पासवर्ड: '1234', डेटाबेस: 'कंपनी'}); export.index = function (req, res) {fs.readFile ('views / index.html', 'utf-8', फ़ंक्शन (त्रुटि, डेटा) {client.query ('स्पा से चयन करें', फ़ंक्शन (त्रुटि) , परिणाम) {if (error) {console.log ('error:' + error);} else {res.send (ejs.render (डेटा, {title: 'express', परिणाम: परिणाम}))}} / एंड एंड}}; // एंड क्वेस्टि}}; // एंड एफएस}; मेरी index.html कोड & lt; स्क्रिप्ट & gt; $ (दस्तावेज़) .ready (function () {function listView () {$ ('# output') रिक्त (); $ .ajax ({url: '/', प्रकार: 'GET', सफलता: कार्य (परिणाम ) (चेतावनी ('सफलता'); चेतावनी (प्रकार (परिणाम); $ (परिणाम) .each (फ़ंक्शन (इंडेक्स, आइटम) {var आउटपुट = ''; आउटपुट +

java - How to add a picture in html page in Spring application -

I got the spring application and I JBoss 7.1.1 my To run the server When I click submit, it goes to my controller which allocates the method to another Java class. This method creates a picture: ... private string filePath = "./qrcode.png"; ... FileOutputStream fout = New FileOutputStream (filePath); ... Finally, the picture has been saved to the directory: jboss-as-7.1.1.Finnil \ bin Now, I want to show this image in my HTML page. In the controller I said: model.addAttribute ("qrimage", "/qrcodes/qrcode.png"); I have found (I use thymeleaf ): And when I look at my page, see: ? Background_fr ?? Instead of my picture when I use my Java class: Private string filepath = "./../standalone/deployments/myproject-web.war/qrcode Png "; instead of personal string filePath = "./qrcode.png"; Everything works. I have found in my mvc-servlet.xml : & lt; MVC: location of resources = "/ qrc

iOS - How to silent/ringing iPhone within App -

Currently I'm working on a task where I have to mute the iPhone inside the app. I found ! But developers say that Apple refuses to use this library in your app and they reject your app. So how was it developed? And if possible, how can someone guide me? When you review those applications If you look at, you should recognize bad ratings. Some users say that the application does not work. I had a similar problem and asked God in Appletaktok that it is impossible and as you said your app will be rejected.

Android studio unable to install apk -

I'm unable to install applications from Android Studio. When I try to run appliction, they say: Waiting for the device. Target device: Samsung ... I am able to select the target device, but all this ends there any idea what should I do? Have you switched to USB debugging under the developer option? Also, check out Unknown Sources to install apps from sources other than Play Store.

c# - Schema in SQL Server Management Studio -

By default, the name of schema is dbo.mytable, how can I convert it to my user specific schema name? You can change the database schema using the following query: < Code> ALTER SCHEMA dbo TRANSFER yourNewSchema ABC; MSDN reference:

mysql: How to update many to many relation table -

I am using the cakepap for website development, now I have this table < Code> id | Student_id Now my question is how to update this table, I am currently removing all previous figures of a particular student and linking new studentizations given by the student. Based on what you are trying to do, it seems like a reasonable way to do so If you do not want to delete the previous special data, consider adding a timestamp and only one of the most recent questions in your question

ios - OS X, keychain. store data that can be only changed by my app, not by user, or other app -

On iOS we use keychain to keep information in app purchases (so users can not change them) . We now close our app to make Mac (publish it in the Mac App Store). Can we use Macchain to store in app purchases? Are we some kind of China data in the key? We want to change prices only in our app keychain, not any other app or user Other applications can access keychains without asking the user Users always change the data - both on Ios and osx Except on the OSX it is really easy and on iOS It is not;)

selenium chromedriver - How to Test Print-preview of Chrome browser using Chrome webdriver? -

मैंने स्ट्रिंग winHandleBefore = driver.getWindowHandle () का उपयोग कर विंडो के बीच स्विचिंग का उपयोग करने का प्रयास किया है ; & Lt; प्रिंट करने के लिए कोड & gt; के लिए (स्ट्रिंग जीतहाण्डल: ड्राइवर.जेटवांडोहैंडले ()) चालक.switchTo ()। खिड़की (जीतहैंडल); । Driver.findElement (By.className ( "अभी नहीं")) पर क्लिक करें (); । Driver.switchTo () खिड़की (winHandleBefore); यह प्रिंट पूर्वावलोकन पृष्ठ खोलने के बाद मेरे परीक्षण केस निष्पादन को लटका देता है। इसके अलावा जावास्क्रिप्ट निष्पादक पद्धति के साथ भी प्रयास किया गया, लेकिन इसका उपयोग नहीं किया गया। जावास्क्रिप्ट एक्सपेक्टर जेएस = (जावास्क्रिप्ट एक्सपोट्राकर) चालक; Jse.executeScript ("window.close ()", ""); कृपया ऐसा सुझाव दें कि ऐसा करना संभव है। मुझे मेरे प्रश्न का उत्तर मिल गया है। मैं नीचे कोड स्निपेट का इस्तेमाल किया // डेस्कटॉप स्क्रीन स्क्रीन के लिए एक क्षेत्र बनाएं रेगियोन s = नया डेस्कटॉपस्क्रीन रेगियन (); // डेस्कटॉप स्क्रीन में नीचे छवि के साथ लक्ष्य ढूंढें लक्ष्य

sql server - how to load data to many comboboxes from 1 database? -

Text after "div class =" itemprop = "text"> I had 2 source code for comboboxes and ii table 1, but when selecting data Form combobox2 also ComboBox1 , change the same as I want to make your selection with different value. cn.Open () sql1 = "Select from Table_Illness *" dim = da SqlDataAdapter (sql1, cn) da.Fill (dataset, "Table_Illness") beforillnessComboBox.DataSource = Dataset.Tables ("Table_Illness") beforillnessComboBox.DisplayMember = ("Illness_Name") beforillnessComboBox.ValueMember = ("Illness_ID") afterillnessComboBox.DataSource = Dataset.Tables ("Table_Illness") afterillnessComboBox.DisplayMember = ("Illness_Name") afterillnessComboBox.ValueMember = (" Illness_ID ") cn.Close () You set a different for your combo Required dim bs = new binding source () B.Datasource = Dataset Tables ("Tables_Ilnness") Béfrontillins Columbobox Data ource = bs befor

sql - Postgresql record to array -

I need to change back into an array to change lines from the array and filter the records. I am using info_schema._pg_expandarray in a SELECT query to get a line copy value in the array. Looking at the following array: "four" [] {i, i, o, t, b} _pg_expandarray leaves 5 rows with 1 row type record: records (I, 1) (i, 2) (o, 3) (t, 4) I have to filter this result set 't' to exclude record records. How can I do this? Should I convert back to the array? What is a way to filter the array directly? Thanks in advance. If your purpose is to create one set of the above rows, but remove the 't' in the line So, this is the trick: test => Information (i), 'o', 't', 'b' i. N --- --- --- i | 1 mother 2 o | 3b 5 (4 lines) As a side, unless you specifically want to return the index as a second column, then I unnest () < / Code> information_schema._pg_expandarray () , which does not appear in the document

c++ - Get number of columns in SQLite result -

Well, it should be ultra-simple, but I command it 1001 sqlite-related. AS: I am making a SELECT statement, with sqlite3_prepare I'm getting results per line with sqlite3_step I code The question is: How do I get the number of columns ? (= The limit in which X can ... move ...) ps question d (I'm basically developing in D), but it will not make much difference because it is using the original cinding ... , int sqlite3_data_count (sqlite3_stmt * pStmt); The result of the generated statement returns the number of columns in the existing row of the set pStmt .

php - Create a Multidimensional Array with Codeigniter and MySQL -

I am developing an internal mailing system using codeigniter, just like the Gmail Mailing System, leaving the answer. I want to show both messages and current messages in a message (if mail is answered) such as Gmail Let's say that I have a table of threads in which there are many relationships with table messages. Thread thread_id | Msg_id | Sender_ID | Sender_fell | Receiver_id | Receiver_fell | Status Message ID | Topic | Body | The above tables work fine to show inbox and mail Are sent. But now I want to show the message sent with the original message. (Like Gmail) / p> For this, I am planning to change the structure of the thread table (by adding two more field answers- 0 or 1, answer_id) select < Code> subject , body , cdate , sender_id , username ash email, lbs_mails . ID AS mail_ id, status , sender_role , thread_ID FROM ( lbs_mails ) JOIN lbs_threads ON lbs_threads . msg_id = lbs_mails . ID join lbs_auth o

jquery - Getting wordcount when using tinymce -

I'm using the tinymce editor on textarea. I am able to initialize the text editor but now I want to get wordcount in the text editor on the key press. When the user types the word, then there is an easy way to use that word quota. Very easy, there is already a plugin for this. Example: tinymce.init ({plugins: "wordcount"}); There are many resources from here. View this:

c - how to Find the Mount Path of Pendrive in better way? -

I have a requirement that my embedded system is included in the program which is initially a pendrive in pendrive and specific directory Looks for If the directory is considered as a bootable device. Consider below code: uint8 Chek_ BB_rootfs_Availability () {uint8 b_flag = 0x00; Dw_PkgAvailFlag | = BB_PKG_AVAIL_MASK; If (! (System ( "ls / media1 / sda / UPGRADE_FILES / BB /"))) {path_argv [0] = "/media1/sda/UPGRADE_FILES/BB/rootfs.ubifs"; } And if (! (System ("ls / media1 / sda1 / UPGRADE_FILES / bb /"))) {path_argv [0] = "/media1/sda/UPGRADE_FILES/BB/rootfs.ubifs"; } Else if (! (System ( "ls / media2 / sda / UPGRADE_FILES / BB /"))) {path_argv [0] = "/media2/sda/UPGRADE_FILES/BB/rootfs.ubifs"; } And if (! (System ("ls / media2 / sda1 / UPGRADE_FILES / bb /"))) {path_argv [0] = "/media2/sda1/UPGRADE_FILES/BB/rootfs.ubifs"; } And if (! (System ("ls / media / sda / UPGRADE_FILES / bb /"))}

php - disable session default set id and name in yii -

I am setting the following session value in yii when the user is logged in In my configuration Settings file 'session' = & gt; I have set these values ​​in the authentication of user identity ('sessionName' = & gt; 'ems', 'class' => 'cdb.htipesation'), P> Yii :: app () -> session ['login'] = 1; Yii :: app () - & gt; Session ['display_name'] = $ this- & gt; User name; But when I print the session, I get this value Array ([display_name] => admin @ xxxxxxxxx [logged_in ] = & gt; 1 [8f9f85051824e063ad61f50fedc52f93__id] = & gt; admin @ xxxxxxxxxx [8f9f85051824e063ad61f50fedc52f93__name] = & gt; admin @ XXXXXXXXX [8f9f85051824e063ad61f50fedc52f93__states] = & gt; array ()) 8f9f85051824e063ad61f50fedc52f93__id, How to disable the name or where it will be set this value in the class, in the login method, see And. "8f9f85051824e063ad61f50fedc52f93" is the

javascript - Read more opens 1st one all the time -

I have a page with about 10 short articles as each of them read "Read more "Button is pressed, which displays the hidden text that is pressing " Read more "button 10 on one of the issues I have at the moment, this first article shows hidden content and selected is not. I think I need to set a unique ID for each article .. and the Read more button should be linked. But I do not know how to set it up. I looked at it, but it could not work var widget contenthide display = {init: function () {if ($ ('$ content-display-hide '). Size () == 0) Return; $ ('Triggerable') click (function (e) {var element_id = $ (this) .attr ('rel'); var element = $ ('#' + element_id); element.toggle (); if (Element.is (': visible')) {$ ('. Readmore'). Hide ();} and {$ ('. Readmore'). Show ();} Return false;}); }} Var div = documentElemnt ("div"); Div.id = "div_" + New Date () Gettime (). ToString; $ (Doc

postgresql - Autovacuum is not running on Openshift Online Postgres cartridge -

My postgraz 9.2 on my opsheft online cartridge using Pgadmin3, for the autovoum setting for postgresql.conf ( By ticking the box) is enabled. However, autovacuum does not seem to be running. What do I have here: ps -ef | Grav-i Vacuum No AutoWakeWidth Process Has Not Appeared Using the psql console, Show AutoWakeView says its value is turned on Using psql / P> In the pgAdminIII, the properties tab on DB says that AUTOXUm value of 'not running' What do I miss? Edit - I can not even use postgresql.conf when trying to find a file on the server - I am hoping to manually edit the file instead of using pgAdminIII . - found this https://www.openshift.com/forums/openshift/how-do-i-set-maxpreparedtransactions-on-my-postgresql-cartridge now i postgresql.conf I am able to view / edit Approximately, Autovocum is already there, so there is the right setting in the Conf. Try another address for the collector of data LOG: Could not

ruby - Chef attributes "no implicit conversion of String into Integer" -

I'm writing a chef recipe that just creates a database config file, but I only use the attributes I'm stumped for I have some PHP applications that are being deployed in every example, and oopsworks use the same recipes for everyone, so I have some different settings in the attribute file. Features / Database-Settings. Rb # API Default [: API] [: Path] = 'App / Config / Database.FP'; Default [: API] [: host] = 'test'; Default [: API] [: database] = 'test'; Default [: API] [: user name] = 'test'; Default [: API] [: password] = 'test'; Recipes / Database-Settings. Rb Chef :: Log.info ("Database Settings!"); Node [: deployed]. Shorten | Application, Posted in | If node.has_key? (Application) Chef :: Log.info ("Application: # {application}"); Path = node ["API"] ["path"]; # Error Chef :: Login to access here. ("Path: # {path}"); Template Path Source "Database. ARB" mod

c# - Call function from DLL -

It is well known that you can work in a DLL, referencing DLL and then your main performance Can call functional function I want to know that the reverse route is also possible? So I want to call a function in the main executable from DLL, without actual function which should be called without DLL. Reason: I'm working on a plugins system. Yes, executables can be added as references in your project, you can use them in the same way On which you call functions from referenced DLS

node.js - Dust: How to check if an array which is passed to a dust file contains a certain element or not using dust helpers? -

res.render ('home', o); ओ = {नाम: "नि: शुल्क भोजन", विशेषाधिकार: [3,4], const: {RESET: 1, ADD: 2, DELETE: 3 प्रबंधन: 4, रिपोर्ट: 5}} < पी> मैं जांचना चाहता हूं कि क्या धूल-सहायक अगर शर्त है कि रिपोर्ट के अनुरूप मूल्य 5 है जो विशेषाधिकार सरणी में मौजूद है या नहीं। & Lt; @ सीआईडी ​​= "......" & gt; किसी भी विचार यह कैसे करना है? आप सरणी पर पुनरावृति कर सकते हैं और प्रत्येक तत्व का परीक्षण करें लेकिन मैं सोच भी नहीं सकता कि पुनरावृत्ती के बाद आप इस तथ्य को किस प्रकार इस्तेमाल कर सकते हैं / स्टोर कर सकते हैं। मैं वर्तमान भाषा सुविधाओं के साथ ऐसा करने का एक तरीका नहीं जानता, लेकिन यही वजह है कि कस्टम धूल सहायताकर्ता प्रदान किए जाते हैं आप एक {@arrayContains key = array value = value} सहायक प्रकार का निर्माण कर सकते हैं चूंकि आप यह नहीं कहते हैं कि आप अस्तित्व / गैर-अस्तित्व का निर्धारण करने के बाद क्या करना चाहते हैं, यह स्पष्ट नहीं है कि जांच के बाद सहायक क्या कर सकता है।

giraph - Which version of CDH using Cloudera Manager automatically Installs JDK1.7? -

I am using Claudera manager with CDH 4.2.2 for my 3+ cluster. Upon installing the installation with Cloudera Manager, it automatically installs and installs JDK1.6. I want to use JDK1.7 with CDH for my convinience. Is it possible or is there any version of CDH, which automatically downloads and installs the Hydop in the cluster and successfully handpop to JDK 1.7 Runs along? If yes, then I can know which version of CDH is and where do I download it? I want to work with JDK 1.7 instead of 1.6 because I have to set up Apache girder on CPD, but it seems that the ground is OK with JDK1.6 and needs JDK1.7 . JDK 1.7 is supported for all CDH 4.4 and Cloudera Manager 4.7 CDH application in form As it is being said, a version of Cloudera Manager 4.x installs JDK 1.7 during installation (the latest version is 4.8.2). The only version of Claudera manager which installs JDK 1.7 5.0.0 automatically. To summarize: If you want an automated installation of JDK 1.7 through Clodaria Manag

Use "default channel grouping" as a dimension in Google Analytics API -

I want to use the Google Analytics API to display data on the Acquisition Overview webpage. Specifically, I'm also using the default Channel Grouping Need to break the session (formerly visits) by: Direct, Organic Search, Referral, Social, Paid Search, Email, Display and (Other). As mentioned, these groups are based on regex, so it may be possible to re-encode these rules, but I would prefer to use these groups as one dimension. I googled it and the answer is talking about most Multi Channel Funnels (MCF), but according to it, it is more about conversion to get any such information How does the Google Analytics API (or GA MCF API) work? Thank you very much! Acutaly I think you should see more that something which is slightly It's hard to have the first column. That column is the type of traffic and there is nothing that you can export directly, it is calculated on the basis of source / medium Direct = Source is not equal to biological referral and CPC (simi

javascript - Trying to draw multiple level scene in html5 canvas -

यह मेरा जेएसफ़िल्ड है: // स्टार्ट - मूव कैमरे var p = new b2Vec2 (); पी = (ball.body.GetWorldCenter ()। एक्स) * भौतिकी। स्केल; pos.push (पी); Var लंबाई = pos.length; Var s = (pos [लंबाई - 1] - pos [लंबाई - 2]); // पिक्सेल में अगर ((आधा चौड़ाई & lt; (dw - p)) & amp; amp; (पी & gt; halfwidth)) {ctx.translate (-s, 0); } मैंने यहां कोड का पालन किया: गेंद का रेंडरिंग अजीब और धीमा हो रहा है i इस उदाहरण को देखा: लेकिन मैंने यह नहीं समझा कि उसने 3 वेरिएबल्स stage, x, y कोड का उपयोग किस प्रकार किया है, यह अनिर्धारित है। और इंपैक्टज द्वारा इस डेमो की जांच करें और देखें कि कैमेरा कैसे चालक के साथ चलता है मुझे इस कार्यक्षमता की आवश्यकता है: कृपया मुझे इस में कोई भी मदद कर सकता है जब तक ball.body.GetPosition ()। X & gt; 48 , this.current प्रत्येक अद्यतन पर बढ़ते शुरू हो जाएगा, है ना? लेकिन आपका ड्रॉ () केवल 0, 1 और 2 को संभालता है।

node.js - Are variables defined in the global context accessible when there's name collision? -

If I want to define a variable, define the global context from within an area where already equal A variable with the name exists: var variable = 'value'; Function someScope (variable) {variable = 'this not'; Var global = function ('return it') (); Console.log ('this & gt;', global.variable); } Can still reach any kind of global expanse? Neither the global object nor the works. ( global.variable returns are undefined) if the variable is actually global It's global Can access through the name, even if there is a collision with a local variable. For example // notice is not "var" here variable = 'global'; Function someScope () {var variable = 'local'; Console.log (variable); // local console.log (global.exchangeable); // global} someScope (); However, if you define your variable with "var" at the top of the file (as you are in your code) then it will not be global and you will get diffe

php - jQuery JSONP "undefined" response -

I know there are so many questions about JSNP - I have gone through all the answers practically and - Cannot- Why do not I get the right result for my life? I've spent many hours, really going back to the hours ahead, trying different tunes, etc. Anyway, to pile it under: My script (on the same page as my form) $ (function () {function log (message ) {$ ("& Lt; div & gt;") .text (message) .prependTo ("#log"); $ ("#log") .scrollTop (0);} $ ("# name"). Autocomplete ({source: function (request, response) {$ .ajax ({url: "search.php", jsonp: "callback", data: {word: request.term}, data type: "jsonp" Type: "GET", success: function (data, position) {if (position == "success") {$ ("# log"). Html (response);} response ($ .map (Data, function (item) {return {label: item.label, value: item.value}}}))}}};}, minnabbon: 2, select: function (event, ui) {log (ui .item? "Select

java - How to store single entity instead of collection? -

I need to create an institution that should store the history of my employee. Here is my table create table worker_history (id INT not original primary key AUTO_INCREMENT, employee_id INT, company_id INT, hire_date DATE DEFAULT NULL, resign_date DATE DEFAULT Zero, foreign key (employee_id) reference worker (ID), foreign key (company_id) reference company (ID)); The problem is that I do not have a single entity employee history / <> code collection, collection & lt; Employee history & gt; needs to be archived. Any ideas how to solve this problem? UPD: Result for Employee Mike: 1, Mike, Grid Dynamics, 2000-08-10, 2003-01-01 2, Mike, IBM, 2012-04-03, 2014-02-15 3, Mike, Grid Dynamics, 1997-04-17, 1998-03-08 UPD2: My company unit class @inti @Table (name = "company") Public category company serializable {@Id @ Generated Value (strategy = Generation type. Et o) private integer ID; Name of the @column private string; @JoinColumn (name = &

setup ichat message app with localhost ejabberd -

I have an ejabberd server on Mac and create two users using the admin panel. I'm following the test for the xmpp server. I successfully setup user in adium. I now want to set up user in Mac ichat app using local user but it is not connecting to my local host server. I fix the problem by setting the server name and port of the server Name: localhost port: 5222

c# - XAML Conditional Binding in DataTemplate -

I have a datatapplet for a list view in XAMML: & gt; Datamapplet X: Key = "ResultItemTemplate" & gt; & Lt; Grid grid. Column = "2" & gt; & Lt; Grid.ColumnDefinitions & gt; & Lt; Column width = "*" /> & Lt; Column width = "Auto" /> & Lt; /Grid.ColumnDefinitions> & Lt; Grid.RowDefinitions & gt; & Lt; RowDefinition Height = "Auto" /> & Lt; Roadfinion height = "*" /> & Lt; RowDefinition Height = "Auto" /> & Lt; /Grid.RowDefinitions> & Lt; Text block text = "{binding name}" margin = "0,10,20,0" grid. Column = "0" grid. Line = "0" /> & Lt; TextBlock Text = "{Binding Timestamp}" margin = "0,10,10,0" grid Column = "1" grid. Line = "0" /> & Lt; TextBlock Text = "{Binding Text}" Grid. Column = "0" grid. Colspan = "2&quo

c# - Is it possible to Pass Empty Parameter to sql server from code behind? -

I have some parameters in the SQL query that only accept the 'value' which does not consider it blank, 'How is this value as a parameter, my code below which I am trying to do? param = new SqlParameter ("@ CodeNumber", SqlDbType.VarChar); If (! String.IsNullOrEmpty (SearchCriteria.CodeNumber)) {param.Value = SearchCriteria.CodeNumber; } And {param.Value = DBNull.Value; //param.Value = ''; I want to do something like this} CMD. Parameter. Add (Ultimate); Ultimate = new escappamator ("@ Licensed", SqlDbType.DateTime); If (Search Certification .License Date! = Null & amp; Search Calculator. License Date! = Default (Datetime)) {param.Value = SearchCriteria.LicenseDate; } And {param.Value = DBNull.Value; //param.Value = ''; I want to do something like this} CMD. Parameter. Add (Ultimate); I have not received any error but in the query it is not taking it as '' empty string as a parameter when the underlying field i

jax rs - CXF RS proxy service example -

I need to create a proxy service for the rest of the services I know about creating proxy services, -RS /Jaxers services need help creating some simple proxy services. If any one can provide examples .. If you do not want to change the request and response You can set up a simple HTTP proxy with camel, just like this. ("Jtti: // localhost: 8000 / proxy /") .to ("http: // service / context /? Pullpointpoint = true")

check the clipboard is disabled in javascript -

I am working on a JavaScript function which requires data from clipboard. Using IE only. But for some clients, Clipboard IE - & gt; Tools-> Internet Options- & gt; Security-> While the custom level will be disabled, we can disable the 'Allow programmatic clipboard access' checking time as clipboard data .getData ('TEXT') = = '' Good coding does not seem to be there any way to see that the clipboard has been disabled in the browser trash java script. clipboard data .getData ('TEXT') == '' work Not if the programmatic access to the clipboard has stopped. We have only clear data, set up data and get data for clipboard data objects.

driver - Access SATA drive via AHCI directly in efi shell? -

If we want to read (write / write) SATA drives through AHCI in the EFI Shell, can anyone read / write Is the interface for this purpose? That is, does the AFI shell application need to drive the AHCI device to the drive? Or in the application only specific "read / write" interfaces (such as SCSI_PATH_THROUGH in Windows) and "(Command to execute the command command, command command and command) EFI AHCI driver " changes to these low-level access routines? If there is a driver available for SATA drive in your UEFI, and the file system you access It is supported, then the process of reading / writing is done through simple (ISH) protocol calls. The best example I can think of is the Linux Kernel Stub Loader (which enables the Linux kernel to load itself in EFI allocation). Be sure to use an existing 3.15 rc or later, since there was a bug in the first code that uses defined functions to access file system access. Alternatively, an application can d

Typescript: How to call method defined with arrow function in base class using super keyword in child class? -

दिये गए वर्ग बेस क्लास {count: number = 0; सार्वजनिक कुछ विधि = (): शून्य = & gt; {this.count ++; }} क्लास चाइल्डक्लास बेस क्लास का विस्तार करता है {सार्वजनिक someMethod = (): शून्य = & gt; {super.SomeMethod (); // यहां अधिक काम करें }} मुझे त्रुटि संदेश मिलता है: बेस क्लास के केवल सार्वजनिक तरीके 'सुपर' कीवर्ड के माध्यम से पहुंच योग्य हैं। < / Blockquote> @ बासरात यहाँ कुछ जानकारी प्रदान करता है लेकिन यह भाषा के लिए एक असली हैक की तरह लगता है। 'इस' के प्रासंगिक उपयोग को संरक्षित करते हुए यह कैसे किया जा सकता है? क्या मैं सही ढंग से तीर कार्यों का उपयोग कर रहा हूं या क्या वे वास्तव में केवल कॉलबैक की तरह कुछ घोषित करने की एक विधि के रूप में उपयोग किए जाने चाहिए? तीर कार्यों को ठीक से या क्या वे वास्तव में केवल कॉलबैक की तरह कुछ घोषित करने की एक विधि के रूप में इस्तेमाल किया जाना चाहिए? वे वास्तव में केवल कॉलबैक। यदि आप एक वर्ग पदानुक्रम चाहते हैं तो प्रोटोटाइप का उपयोग करें। प्रोटोटाइप भी आपको स्मृति बचाता है। जबरन तय: केव

c++ - Adding a char into a temporaryChar outputting garbage -

Image
I am making a method in which I load the notepad file in random data in it, and I have to read the character through it Character. Then I check whether this character is a digit or a letter and so on and so forth. I have invented a method called a deed (f) in which it accepts the character that is loading and checks what it is between 0 and 9 If it is a digit, then it has been added to a newly created char tempString . Problem is that whenever I add it four tampstring the first number comes out properly, but the rest (from 1 to 5 in my dummy file) as garbage Comes. What could be the reason? Below you have code and output coding token Lexer :: MillTetoken () { Four f; Four temporary string; Std :: ifstream input ("dummyData.txt"); While (input) {input.get (ch); If (isDigit (ch)) {tempString + = ch; Cout & lt; & Lt; TempString & lt; & Lt; Endl; Colonel ++; } And if (f == '\ n') {cout & lt; & Lt; "\ NThe new line \ n&qu

Celery multiple instances and Redis -

I have two servers running sealeries and a radis database. Both of them listen to the same queue because they are "workload" . Work is queued on red, but it seems that my celeb servers lift the work at the same time, so execute it twice (once on every server). Can not stop any way with radis / celery setup? Thanks, Using the same name for each of my server celery laborers Were there. Since then, I have added% h at the end of the worker name (-n my_worker_% h) to show the host name. Thus, the Serie Flower displays all the workers in their line, and no confusion is more possible.

java - Convert StreamResult to string or xml -

Use for spring as a stream result StreamSource source = new StreamSource (New StringReader (message)); StreamResult Results = New Stream Result (System.out); WebServiceTemplate.sendSourceAndReceiveToResult ("http: // someUri", source, new SOAP action callback ("some callback"), results); Return result; I get results, but I want to remove it as an XML or string (just want to see the content to generate the feedback). How can I do this? Try it: Try {stream source source = new StreamSource (new stringreader ("& lt; xml & gt; blabla & lt; / xml & gt;")); Stringworld author = new stringwriter (); Stream result result = new streamerscult (author); TransformFactoryTFC = TransformerFactor.New instance (); Transformer Transformer = TFTC NEUT Transformers (); Transformer.transform (source, result); String strResult = writer.toString (); } Hold (exception e) {e.printStackTrace (); }

java - Catch Exception from Method Reference -

I'm trying to cross a method reference that throws a check exception: < Code> Files.list ((Paths.get ("/ some / path"))) Maps (files :: readAllLines). How can I manage this exception (to wrap the context of the method without any rules). If you want to catch exceptions for a specific value in .map If I try, I would not recommend a method reference instead of using a lambda: files.list ((paths.get ("/ some / path"). Map Work with (someVal) -> {try {// do 'someVal'} (prior to your expansion) {// handle error}}); If you If you want to open the exception again, you can see the error reference through the box. You can do this manually: using the exception to the last box yourself gt; e = new box & lt; & gt; (); files (List. ((Path ("/ some / path")) map ((some val) - & gt; {try} {work with some '' some '') (pre-expansions) {// handle error e.setVar (former);}}); if (e.getVar ()! = Null)

css - SASS throws an error for BEM syntax -

I'm just trying to use "modifier" and "element" BEM syntax in SASS. .second-title {background-color: green; & Amp; - touched {background-color: black; } & Amp; __ left {background color: red; }} The CSS file is compiled correctly but when I try to run "Huffy Service" throws the following error: Syntax error: \ "& Amp; - \" after invalid css: Expected number or function, \ "- Touched {\" \ A on D: / webdev / angularjs / ang-snapscan / app / styles / mobilestyle.scss " In order to use the parent selector in this way, You must use Sass 3.3: if If you are stuck using the old version, you can try it: $ Module: 'second title'; .second-title {# {$ Module} - touch {background -color: black;}. # {$ Module} __ left {background-color: red;}

java - Spring MVC i18n not working -

I'm not able to get internationalization in my project to run I'am. I have tried many stack overfollow solutions and without the success the online tutorial message-key, which I want to receive, can not be found and the locale / long can not be switched. Here is the i18n portion of my servlet-context.xml: & Lt; Beans: Property Name = "Default Encoding" value = "UTF-8" /> & Lt; / Bean: beans & gt; & Lt; Beam: Bean id = "locale change interactive" class = "org.springframework.web.servlet.i18n.LocaleChangeInterceptor" & gt; & Lt; Beans: Properties Name = "Paramount" Value = "Lang" /> & Lt; / Bean: beans & gt; & Lt; Beam: Bean id = "locale resolver" class = "org.springframework.web.servlet.i18n.CookieLocaleResolver" & gt; & Lt; Beans: property name = "default locale" value = "n" /> & Lt; / Bean: beans & gt; &

jquery - What is the best practice for referencing javascript that is specific to a PartialView in asp.net-mvc? -

I have an asp.nset-mvc site and I have a partial view that is present in many different views . There is also a .js file attached to the functionality used by partial visualization. I am currently adding that JS file to each parent scene that puts this partial view inside the head section. Now I am thinking that to keep it easy to remove the reference of the file from every parent's view and insert the context within the body of the partial scene. (Hence it is listed only in one place) Do anybody see any consequences for this change? Is this a recommended practice with javascript that is leverage by only a special partial view? I will ask myself some questions: How big is the JS file is? How big is this? How often is it used in the average use in your application? If this is a large file that has not been used too much, I will include the script inside the file and will not make any deal about it. You should remember that JS files are cached, and if the

php - Get a Sub String starting from a certain character of a long string. -

There is a problem getting a sub string starting with a certain letter of my long string, but I'm having such a string That's what I do not want. This is my string $ school_title = Bangata Elementary School - P0101001 I To get the P0101001 what I have done < $ index_num = stristr ($ school title) , "- P", incorrect); This function output is to be excluded from - P0101001 I '-' How can I do this? $ school_title = 'Bangata Elementary School - P0101001'; $ Index_num = substr ($ school_title, Stropo ($ school_title, "-P") + 2); Echo $ index_num; // P0101001

java - Encoder doesnt creat xml file -

Try I have an xml file, but it just does not work. save it and load funcs public class Presenter implements Observer {public void savegame () FileNotFoundException {Last XMLEncoder encoder = new XMLEncoder (New BufferedOutputStream (new FileOutputStream ( "Model2048State.xml")); Encoder.writeObject (model); Encoder.close (); } Public Game2048Model loadGame () FileNotFoundException {XMLDecoder decoder = throws new XMLDecoder (new FileInputStream ( "model2048State.xml")); Game 2048 model i = (game 2048 model) decoder. Read object (); Decoder.close (); Refund M; }} setters, getters and D Co is all, of course, are installed in the model class my presenter class also happens a lot .. but it is relevant code thanks not to be stopped BufferedOutput for this possibility should be: Final OutStream = New BufferedOutputStream (New FileOutputStream ("model2048State.xml")); Final XMLEncoder encoder = new xmlencoder (outstream); Encoder.writeObject (

c++ - Zlib and Minizip - How to add a new directory to a .zip file -

I wrote an application from C ++ to compress the contents of the directory in a .zip file, and Minizip is well documented online but the file "zip.h" has comments in the source code. Uses my application and creates a .zip file which is shown here as and to get a list of all the files (and subfolders) in the directory and within the zip Opens new files. Then I read the source files with fopen and fread and write content for newly created files in zip folder. It all works fine, so the directory works to include compressed only those files, and no subfolders, but I comment in the source code how do I understand that by adding a new folder to a .zip file in that folder and writing the files then can not do. As it turns out, you do not need to create a new directory in the .zip file separately You can simply pass the parameter "folder \ filename.ext" to the zipOpenNewFileInZip method and it will create the "Folder" directory so you then add a new f

ruby on rails - NoMethodError in OrdersController#create -

I'm building a simple shopping app and using Ryan Bats's "# 145 integrated active businessman" Checkout process I am using the guidance. Order Model: class order & lt; ActiveRecord :: Base has_many: order_products has_many: Product, via: order_products attr_accessor: CARD_NUMBER ,: security_code,: card_expires_ondef CREDIT_CARD @credit_card || = ActiveMerchant :: Billing :: CreditCard.new (: first_name = & gt; first_name ,: last_name = & gt; last_name, CARD_NUMBER = & gt; CARD_NUMBER: verification_value = & gt; security_code ,: month = & gt; card_expires_on {Month}: years => card_expires_on {year}) end DEF self.purchase (basket) response = GATEWAY .purchase (Product.total_basket_price (basket), CREDIT_CARD) end end Orders_controller: Create DEF @order = Order.new basket.each | ITEM_ID | @ Order.order_products.build (Product: product.find (item_id)) End if @ order.save! If the @ order.purchase render "show" and submit

CakePHP 301 redirect -

I have a very simple problem that I would like to solve with the cake paths. I have old passages which users still use and I want to redirect them to new correct paths. So I have defined several routes using the prefix / group / > This controller references the 'group' but now I get redirect All routes that start with / group / are to be liked, it does not matter what is done after it / group / , then the parameters Will be controlled by the managers I have already createdFor example, I need that / group / 28 / delete

graphics - LIBGDX: What is a "viewport"? -

This post related to a previous post to learn how to properly submit between LIBGDX and Box2D. I have to understand the viewport very well before moving forward. After more code / post reading, I thought "viewport" meant to open the rectangle of the camera lens, which looks at the game world of LIBGDX, where I can go to see the world to see what I want " . But, after reading more, I did not have to go anywhere near the real meaning. I have read LIBGDX Wiki, and have read in the OpenGL documentation, which explain the viewport as two separate things. LIBGDX Wiki: "The viewport is a rectangular viewing area of ​​the screen, where 3D visualization is estimated, nothing more than mapping 3 dimensional objects. 2-dimensional plane. " OpenGL: " Viewport shows the size of the available screen area in which the view is mapped. " Stack overflow: "... there are several definitions in different contexts ...": ( I have tried to r

backbone.js - BackboneJS How to load Youtube Iframe in view -

I have a backbone app where I have a view in which I want to display a YouTube player: < P> Then in my view, after the reader - I did this: AfterRender: function () {var tag = document.createElement ('script') ; Tag src = "https://www.youtube.com/iframe_api"; Var firstScriptTag = document.getElementsByTagName ('script') [0]; FirstScriptTag.parentNode.insertBefore (tag, firstScriptTag); Var player; Function: {'On': OnPlayer Read, 'Onestate Change': '' On YouTube ';' Onplayerstate Change}}); }player read (event) on function {event.target.playVideo (); } Var done = false; Function on playerstate change (event) {if (event.data == YT.PlayerState.PLAYING & amp;!) {SetTimeout (stop video, 6000); Did = true; }} Stop the video (event) {player.stopVideo (); }} but it does not have any rendering but I can not even get errors and in my console I can see that the YouTube API is loaded ... then I What's wrong here?