Posts

Showing posts from August, 2011

jquery - Checking internet connection using JavaScript -

itemprop = "text"> problem I want to show a warning that the Wi-Fi is off [I.e. no internet connection] In my webpage, I have lots of buttons, pop-ups, etc. Users can click on anything when offline. But I want to show that there is a failure in the API call or not. I can check navigator.online in each click. But I do not want to type the function calls or the number of lines, is this a normal way to use jQuery, JS, Ajax? "The alert should be shown when the call failed, which is caused by a user's action" such as $ Ajax with any error Should not be bound by the device / page. Hello, I have made the following efforts: Navigator.online // It works fine I used it as described below but it is not working . & Lt; Script src = "// ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script & gt; & Lt; Script & gt; Window.jquire || Document.write ('& quot; script src = "js / vendor / jq...

javascript - Jquery callback when any select box option is chosen (not changed) -

I have a dropdown selection form element when an option is selected, so I want to do something even If the value selected from the dropdown is already selected option, "On change" will not work in this case. How can I do this? Since your option is not "actually" changing, jQuery changes event will automatically fire Will not apply. Instead you have to pair it. Use the click event suggested by @ Peach: - Sample code: - // a local variable variable x = 0; $ ('# Single'). Click (function () {// Impression Local Variable 1 x = x + 1; // Since the click event will be removed twice (during the focus, selecting one more time and choosing another option) Compare the same selection For '2' (x == 2) {$ (this) .change (); x = 0;}}). To reset (work () {console.log (1); // to reset the value to 0 to the back of the X, set it as -1 (since the click event will be removed after the change). = -1;});

android - Facebook LikeView asks for logging in -

I'm following to integrate my app with the new LikeView. Android Facebook app as a logged user), I click on that view and it shows another dialog that asks me to enter. Is the second authority really necessary or is it doing something wrong? Do you have single sign on and deep from the developer site for your project Was added to? If not then please turn it on.

jsf - Order initializing managed bean -

& lt; h: फ़ॉर्म & gt; & Lt; p: पैनल & ​​gt; & Lt; h: पैनल ग्रिड स्तंभ = "3" & gt; & Lt; ui: शामिल करें src = "../ Filtros / FiltroGenerico.xhtml" / & gt; & Lt; p: स्तंभ & gt; & Lt; p: कमांडबटन मान = "बसकार" क्रिया = "# {pantallaBB.buscar}" /> gt; & Lt; / p: स्तंभ & gt; & Lt; / h: panelGrid & gt; & Lt; / p: पैनल & ​​gt; में @ostonstruct का # {pantallaBB} मैं अपने BB में कुछ सक्रिय और निष्क्रिय फिल्टर FiltroGenerico लेकिन मैं इसे पढ़ सकता हूँ क्योंकि पहले लोड @PostConstruct का # {filtroGenerico} और लोड @Postconstruct के # {pantallaBB} । मैं इस रेखा को और lt; h को जोड़ने का समाधान करता हूं: outputText मान = "# {pantallaBB.anyAtribute}" शैली = "प्रदर्शन: कोई नहीं;" / & Gt; से पहले & lt; ui: शामिल करें & gt; लेकिन मुझे पसंद नहीं है किसी भी विचार? उपयोग करने का प्रयास करें। & lt; f: मेटाडाटा & gt; & Lt; f...

javascript - how to disable right-click on google forms -

I am making a quiz on Google Form To prevent participants from copying questions, I right-click the button I want to disable Please tell how this can be done. Apart from this, I'm a newbie on javascripting, a detailed reply in the LeMan language will be appreciated. Try adding it (though jQuery) - to try Right click on the text $ (document) .ready (function () {$ (document) .bind ("contextmenu", function (e) {e.preventDefault ();}) ;});

bash - Linux shell script to copy last lines of a file in a directory to append to a file in another directory -

To copy the last lines of a directory file, add the following shell script to the file in another directory. wrote cd / opt / grinder / SVN / IAVS / GrinderLogs / GrinderBaseLogs / Lg2Logs GrinderLG1 = 'rm101sys1lweb22' GrinderLg2 = 'rm101sys1lweb23' fileCount = $ (ls -l | WC -l) echo $ fileCount ((c = 0; c & lt; = $ fileCount-2; c ++)) rows = $ (over $ Graindergah 2 "-" $ c "-data.log" | wc -l) Line 1 = `Exprod $ Lines - 1` `" Tail - "$ Lines1" f / opt / grinder / svn / I AVS / Grinderlogs / Grinderbselogs / Lg2Logs / "$ Grinderlg2" - "$ a" -detaklog & gt; & gt; / opt / grinder / Swn / Iavs / Grinderlogs / Grinderbselogs / "$ Grinderlgl" - "$ a" -detaklog "` #exec $ command ' When I am executing this script it says that there is no directory on the tail or the tail. Basically both files are present please help. tail - "$ rows 1" f / opt / grinder /...

windows - forfile - Delete files older than x days -

OS: Windows Server 2008 R2 I have a small batch-file that will remove all Old backups from x days in a specific folder should Command: forfiles / P "C: \ Lehreroffice Backup Batch Backup \" / S / M *. * / D-31 / C "CMD / C del @ path" Error: Invalid argument / option - '@ Pat' Does anyone know what I am doing? Remove the backslash ending in / p logic

C++ std: Making a polynomial class, how to suppress all 0 coefficients that the user inputs? -

After I now have my polynomial class (almost complete) with integer coefficients. In this category, member displays a polynomial of functions in this form: If user input: 1, -2, 0, 4 then the function is called "p (x) = 1 + -2x + 0x ^ 2 + 4x ^ 3 "Which is not expected because I want to end the word 0x ^ 2 because there is 0 coefficient. It is considered to be:" p (x) = 1 + -2x + 4x ^ 3 " instead of this. Now my "print" member function is here: Void polynomial :: print () const {// prints the polynomial outside the simplified string plus is; Plus = "+" of each element except the first element; Int k = 0; K cout and lt; & Lt; Coefficient [0]; For (int i = 1; i & lt; coefficient.size (); i ++) {if (coefficient [i] == - 12345) break; // where -12345 to use the input cout & lt; & Lt; Plus & lt; & Lt; The coefficient [i] of the & lt; & Lt; "X"; If (coefficient [i]! = - 12345) {k ++; } If (k> 1) {cou...

Using Codeception with Laravel and subdomains -

itemprop = "text"> I use codepection to handle a subdomain declared in Laravel 5 $ router Was hoping to do - & gt; Group (array ('domain' = & gt; 'administrator' .config :: find ('app host')), function () { An amOnSubdomain method for Webdriver, but Laravel Not for module 4. Is there any way to integrate this functionality with coding at Laravel? I tried but it throws an error $ I-> amOnAction ('Auth \ AuthController @ showRegistrationForm'); can not be on the action "aththought \ show controller @ showrstation form": SIM Fony \ Component \ HPPCL \ Exception \ NotFoundHttpException: How to get a little confused on how to proceed. I set a nickname with as the index and it worked for me: / p> root :: post ('/ login' , ['As' = & gt; 'admin.login', 'Usage' => 'AuthController @ postLogin']); $ I-> amOnRoute ('admin.login'); ...

sql - Delete a broken postgreSQL table -

My postgresqual has a table of ~ 20 million and I want to delete it. But every one of them does not work (it's still running more than 12 hours without success): - Delete - Trunket - Vacuum - Analysis I can not do anything in this table ... A few days ago, I tried to reproduce the ID (large number) of each line ALTER SEQUENCE "data_ id_seq" 1 Update with data Restart SET ID = Aggravation ('data_id_seq') and I think That This operation breaks the table ... If anyone knows how to help, thanks! Try it ... drop table table_name;

css - Force mobile layout in bootstrap -

Is there any way to force mobile layout to use only CSS in bootstrap responsive? I think a way to do this would be to really set a large number of @ScreenSm. But I did not want to mess with less files, should I use it only by CSS? I create custom bootstrap creation using the end-up of your website. Here's my version: If someone has a better way of doing this, please share.

How to call onchange function in kanban view in openerp? -

I want to call a on-conversion function in Kanban view. But I do not know how can I say this? I tried several ways, but still error. But there is no output and I have another question in the Kanban view: When I pull from one to the other, some values ​​will change. How can I apply it? & lt; Record model = "ir.ui.view" id = "hr_kanban_view_transfer" & gt; & Lt; Area name = "name" & gt; Employee Transfer Kanban & lt; / Field & gt; & Lt; Area name = "model" & gt; Employee.transfer & lt; / Field & gt; & Lt; Field name = "arch" type = "xml" & gt; & Lt; Kannaban default_group_by = "site1" & gt; & Lt; Area name = "site1" /> & Lt; Field name = "color" /> & Lt; Area name = "location1" /> & Lt; Area Name = "Location 2" /> & Lt; Area name = "site2" /> & Lt; Templates & gt; ...

How match elements from two lists in scala? -

I have two lists according to the following list- val a = list ( HarddiskVolume1, 31,1), (C :, 46552070, 433057), (E, 5435,1728), (_Total, 46557536,434786)) Value B = List (C, E :) I want the output as following: o / p (c:, 46552070, 433057), (E, 5435,1728) How do I get the desired output using Scala ?? val an = list (("harddiskvolume1", 31,1), ("c ("C:", "E:") a.filter (x = "46"), ("E:", "E:", 54351728), ("_Total", 46557536,434786) & Gt; b in (x._1)) / / If b is large, consider making it a set. // res0: list [(string, int, int) = list ((c:, 46552070, 433057), (E, 5435,1728))

algorithm - Filling a polygon with rectangles -

I have a smooth polygon, say that oval and polygons are transformed into straight lines with belges. I want to fill this polygon with as many rectangles as possible, but the rectangle can be of any size and any amount to maintain accuracy in the small corners in the polygon. The reason for this is testing a hit on a web page on the polygon, the only practical way is to fill it with divs and test the hits on all the divs. Of course, there will be a minimum square size for any rectangle, not so that we just guess the polygon and again with rectangle of pixel size. In the general case, if you have a digital shape with rectangle exactly Represents, you will need at least the rectangle, because the pixels on the corners of the outline are made if you think of a digital straight edge at 45 degrees, it means a rectangle per pixel. This is a serious limitation (and can not even think of non-digital shapes.) That said, you guess the figure with a certain error, and I suggest yo...

Error connecting android to SQL -

Iam is writing an app that should communicate with the MySQL database. Ive added the class mysql to the driver .. *. Jar is successfully loaded for the project and also if I try to connect to the databse I get the following error: 10-09 21: 01: 01.626 27334-27334 / Dd.edope.quizmasters d / libcï¹ ?? [Net] getaddrinfo hostname mysql.1freehosting.com, servname NULL, ai_family 0 10-09 21: 01: 01.626 27334-27334 / dd.edope.quizmasters w / system. ? com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not make connection to database server. My code here: Private static final string url = "jdbc: mysql: //mysql.1freehosting.com/u741539452_quiz"; Private Stable Last String User = "...."; Private Stable Last String Pass = "...."; Public Zero Test DB () {Text to TV = (TextView) Routview.FindvibIID (RID. Questation); Try {class.forName ("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection (url, user,...

python - Random function selecting -

A strange problem with my code 14 times asking questions, I should ask only 10 questions. Then it is not calculating the score correctly. Any help to fix these two problems is appreciated! In advance thank you random studentname = import input ("Please enter the name:") def question_a (): score = 0 points1 = random.rendant (1,10) num2 = random Randint (1,10) num3 = num1-num2 answer = int ("what is + str (num1) +" - "+ str (num2) +"? "))) If answer == num3: print ( "Well score (score): score = 1 point = 1 = random.randint (1,10) num2 = random.randint (Score: 5, Average rating) 1,10) num3 = num1 + num2 answers = (What is "+ str (num1) +" + "+ str (num2) +"? ")) Answer == num3: score = score + 1 print (" Ok, you are right ") and: Print ( "This is a wrong answer") Turn score DEF question_c (): score = 0 number1 = random.Rendent (1,10) num2 = random.randint (1, 10) num3 = num1 * num2 answer = int (in...

html5 - Unable to add multiple audio formats to audio tag using javascript -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मैं तीनों एक एचटीएमएल 5 ऑडियो टैग में फ़ाइल स्वरूप जो विभिन्न ब्राउज़र के लिए खेलता है फ़ंक्शन सेटअद्योसोर्स (स्रोत) {var ऑडियोटैग = दस्तावेज़.getElementById ("myAudio"); console.log (स्रोत); ऑडियोटैग.src = source + ".wav"; AudioTag.type = "ऑडियो / wav"; Console.log (स्रोत + ".wav"); ऑडियोटैग.src = source + ".mp3"; ऑडियोटैग। टाइप = "ऑडियो / एमपी 3"; Console.log (स्रोत + "। एमपी 3"); ऑडियोटैग.src = source + ".aac"; ऑडियोटैग। टाइप = "ऑडियो / एएसी"; Console.log (स्रोत + ".aac"); } ऑडियो टैग केवल .ac फ़ाइल का चयन करता है और नहीं wav या mp3 फ़ाइलें। अगर एएसी ऑडियो मौजूद नहीं है तो यह वाव या एमपी 3 फाइल नहीं खेलता है ठीक है, आपको इसे बनाने की ज़रूरत है & lt; स्रोत & gt; नोड और इसे जोड़ें। अब के रूप में, आप एक ही नोड को ओवरराइट कर रहे हैं। var ऑडियोटैग = document.getElementById ("myAudio"); Var wavSrc = do...

authentication - Google Directory API(PHP-client) - error 401 Login Required -

I am trying to add a user by using a service account and am continually getting the '401 login required' error . I have already added p12-key to the server and allowed to add service account / area permissions in the Admin console. I have implemented with general authentication but there is only one problem. & lt ;? Php session_start (); Set_include_path ($ _ server ['DOCUMENT_ROOT'] '/ src / php /'.); Need_once ('Google / Client.php'); $ Scope = 'https://www.googleapis.com/auth/admin.directory.user'; $ Client_id = 'xxxxx.apps.googleusercontent.com'; // Client ID $ service_account_name = 'xxxxx@developer.gserviceaccount.com'; // email address $ key_file_location = 'key.p12'; //key.p12 $ client = New Google_Client (); $ Client- & gt; Set upspan ("test product"); If (isset ($ _ session ['service_token'])) {$ client-> SetAccessToken ($ _ session ['service_token']); } $ Key = file_ge...

Java/JavaFX8: Perform action when input in TextField has certain length -

I currently use AutoComplete TextField functionality from ControlsFX when user shows suggestions during typing. The amount of suggestions is large, and therefore this list does not fit on the page. I would like to set the length of the list of maximum wires, but it is not possible in the controller FX yet (as I can conclude). Therefore, I was thinking about an alternate solution, in which the list appears only when the user has typed 3 or more strings. I have now set to execute this action when TextField is clicked (where search customer is my textfield): @ FXML Private Zero Search client ) {// Get all customers from the store string [] [] customersofop = octocash.main.databaseConnection.getData ("some query", array.select ("some column names")); // Convert 2D array 1D array int noOfRows = customersOfShop.length; String [] customersForList = new string [noOfRows]; For (int k = 0; k How to do this in Java / javaFX8? One way to see the duration of the...

html - Loading a css file to Magento -

So I basically got my full CSS layout and I want to change the layout of my Magnavento frontend. I have seen in this post: but it is not loading in my CSS. I did this: I added custom layout updates to XML: & Lt; / References & gt; And I found this in my html editor: & lt; Div class = "header" & gt; & Amp; Nbsp; & Lt; / Div & gt; & Lt; Div class = "header_2" & gt; & Amp; Nbsp; & Lt; / Div & gt; Just in case: CSS .header {width: 80%; Margin-left: 10%; Height: 15%; / * Border-radius: 12px; * / Background color: white; } .header_2 {width: 80%; Margin-left: 10%; Height: 5%; Background color: gray; Font-size: 200%; } My style.css is in this directory: / skin / frontend / default / csstest / I also tried to put it in: skin / Frontend / default / default / css / Am I missing something? You can also enter your csstest / style.css in the CSS folder. & lt; Verb method = "addItem...

selenium - screen resolution in mode "Run whether user is logged on or not", in windows task scheduler -

I am using Python 2.7 and Selenium 2.39.0. To test a web application when I run my test as Windows (7NT.), With the option "Running users are logged on" option, this screen resolution or window sizing changes looks like; Some buttons hide behind the toolbar at the bottom of the browser window and therefore, it can not be clicked by Selenium If I choose the option I do not have this problem "When only the user is logged on is"; Even if the screen is locked, the buttons are viewable and clickable. According to the windows function properties, it is using the same user account. Is there any way, browser settings or a registry key that can help keep the same resolution and size in both ways? I know that I can scroll down the page, but I am trying to understand and it can prevent the difference between the behavior between the two, two modes. Thanks I have the same problem I tried all the registry keys Those who can meet me, disabled TMM, but no benefi...

ios - uploading to the wrong URL? when integrate Google drive and youtube API in objective c -

I tried to integrate Google driver and YouTube API into a single driver. Integrated both APIs to upload videos successfully I logged in using Google Drive and uploaded the video to Google Drive successfully. While trying to upload a video to YouTube, with the same login, I'm getting under the error The same scenario is also the sub-contrast. Exclude the application 'NSInternalInconsistencyException' due to exception exception, 'Unexpected response data (upload to wrong URL?)' Below is the code used for authentication. If (@ "youtube" is avastostring: TYPE) {self.youtubeService = [[GTLServiceYouTube alloc] in this]; Self.youtubeService.authorizer = [GTMOAuth2ViewControllerTouch authForGoogleFromKeychainForName: kKeychainItemName Client ID: kClientID Client Secret: kClientSecret]; If (! [Has the right of himself]) {// is not authorized yet, request authorization and press Login UI on the navigation stack. [[Self-Navigation Controller] Push V...

php - add page x of y in single custom post type - wordpress -

I try to create a custom pageignation in my custom post single.php I tried to use this code But this is not the work gt;> ;); ? & Gt; Do I need to ask my post before, so the pages that will be shown are in my posts only in my posts ?? please try it one gt;> ;); ? & Gt; thanks

android - Keep the correct value item in a listview using AsyncTask -

I am a beginner using Android and I have a problem when I try to display a list of images together I am facing an event with a button for each image when displaying the URL of the image when pressing the button. So, when I scroll on the screen, different URL in the new images appear when you press their buttons are the first pictures of the same match these values ​​to be displayed before the scroll on the screen My main address this Type is:. Public class ImagenesAdapter extends BaseAdapter {Private context mContext; Private map & lt; String ,? & Gt; MListImagenes; Static class viewer {public button buttonholder; Public ImageView imageviewHolder; Int position; } Public Imagination Adapter (Reference C, Map & lt; String,? & Gt; list) {mContext = c; MListImagenes = List; } @ Override Public Interest () {Return MList Imagensis (); } @OverWide Public Objects Found Itam (Int Position) {Return MList Imagines.Jet (Status); } @ Override Public Long ITMID (Status of In...

android - How to get info of what user listens currently in Spotify app -

An Android app (runs on background and uses SpotIt SDK) gets information about the information in which the user Is Spotify Android app listening at the right time at the right time? I think you'll be interested in. If you are developing an Android application and want to know what is happening in the Spotify app, you can subscribe to broadcast notifications from it.

c++ - Qt: get text from button in QTableWidget -

QTableWidget in my Qt application, and I add it to the button like this: QPushButton * startButton = new QPushButton ("Start"); Ui- & gt; Table Widget_tvConnection-> Set Grade (line, call, start button); Connect (Startbutton, Signal (clicked)), This slot (Startbutton pressed ()); And when it is pressed, I need to get the text from it, so I tried to do it: void MainWindow: : StartButtonPressed () {... QPushButton * button = ui- & gt; Table Widget_tvConnection-> Salviddetate (row, color); QDebug () & lt; & Lt; Button & gt; Text (); } but the compiler does not allow me to convert from QWidget * to QPushButton *: Error: From 'QWidget *' to 'QPushButton' Invalid conversion * '[-fpermissive] Is it possible to receive text from buttons within QTableWidget? If this is not mine, then how to solve it in my application, but it would be really good. You get QWidget , so you get it from QPushButton . After this, y...

list - How to get sum of all elements in json using Scala? -

मैंने जेसन- "डिस्क" का पालन किया है: [{"name": " "V2.16", "डिस्क एग्रीगेट": "एग्रग्रेट", "डिस्कआरपीएम": 15000, "कुल साइज़बिट्स": 1077477376, "विक्रेता आईडी": "NETAPP", "उपयोग किए गए बिट्स": 1070071808, "डिस्कटाइप": "एफसीएएल", "यूयूआईड" : "एफसी: ए", "रेड ग्रुप": "आरजी 0"}, {"नाम": "वी 4": "4 ई 455441: 50502020: 56442 डी 31: 3030304 डी: 422 डी 465 ए: 2 डी 353230: 32353836: 30303030: 00000000: 00000000", "पोर्टनाम" "डिस्कएग्रेगेट": "एग्रग्रेट", "डिस्कआरपीएम": 15000, "कुल साइज़बिट्स": 1077477376, "विक्रेता आईडी": "नेटएपीपी", "उपयोग किए गए बिट्स": 1070071808, "डिस्कटाइप": "एफसीएएल", "यूयूआईडी": " 4 ई 455441: 50502020: 56442 डी 31: 3030304 डी: 422 डी 465 ए: 2 डी 353230: 32353633: ...

blending - CSS blend background with elements below -

Image
क्या कोई भी तत्व तत्व के रंग के साथ मिश्रण-ब्लेंड-मोड का प्रयोग कर रहा है जो इस समय समर्थित नहीं है (पढ़ें: यह क्रोम द्वारा समर्थित नहीं है)? नीचे दी गई छवि का एक कच्चा उदाहरण क्या है I के बारे में बात कर रहा हूँ: सीएसएस के साथ तत्व {फिल्टर: ग्रेस्केल (100%); फ़िल्टर: यूआरएल (# ग्रासस्केल); फ़िल्टर: ग्रे; -विबकिट-फिल्टर: ग्रेस्केल (1); } आप एक छवि ब्लैक एंड व्हाइट बना सकते हैं। मैं जो सुझाव देता हूं, अपनी पृष्ठभूमि बना रहा है, फिर उसी पृष्ठभूमि से एक डिवेल बनाएं और सीएसएस ने दिखाया ऊपर तो यह काले और सफेद हो जाएगा इसके बाद आप अपनी डिवी को चारों ओर ले जाने और नीचे की छवि से मेल करने के लिए पृष्ठभूमि-आकार और पृष्ठभूमि-स्थिति विशेषताओं को सेट कर सकते हैं। यह चाल करना चाहिए! यहाँ एक है।

javascript - Change the URL of node server -

I just deployed my first AngularJS app using Heroku The following is the node script below. There is URL on the site now. However, I would like to be it How can I do this? var gzippo = require ('gzippo'); Var Express = Required ('Express'); Var app = express (); an app. Use (gzippo.staticGzip ("+ + __dirname +" ")); App.listen (process.env.port || 5000); With Express (4x) you can do this for example: // Announce your router var router = express.Router (); // Define your router router.get ('/', function (rieke, ridge) {// your stuff}} // define other routes and so on ... // ... And make sure that all your routes will be prefixed with the Beta app. ('/ Beta', router); Now, http://project.herokuapp.com/beta is the main path, and the other path always / beta

javascript - Break on variable change in Chrome using Angular -

Similar to the question, I want to break a variable change in Chrome. However, I am using angular, so the variable I want to break is only defined in HTML. Essentially something like this - & lt; Div ng-click = "show =! Show" & gt; ... & lt; Div & gt; & Lt; Div ng-class = "{expanded: show}" & gt; ... with no code in the controller. So when I change , how can Chrome be stopped? I know that I can convert the code into a function call that wraps up show and then puts a breakpoint there, but its time is inappropriate and I would like to know whether the straightforward break There is no way to do variable changes on. OK, you can get the desired feature through the console: Get access to the first radius, on which the show property is defined. An explanation of how you can do it. You can then see the changes of this scope object through Chrome's Object.observe . To simplify this process, you can define a global fun...

authentication - ember-simple-auth with ember-cli -

/ P> शुरू में यह करना है: npm इंस्टॉल --save-dev ember-cli-simple-auth ember ember-cli-simple-auth उत्पन्न करते हैं लेकिन जैसे ही मैं कोशिश करता हूं कि 'एम्बर उत्पन्न' मुझे निम्न त्रुटि मिलती है: `ember generat` कमांड की आवश्यकता है इकाई नाम निर्दिष्ट करने के लिए अधिक जानकारी के लिए, `एम्बर हेल्प` का उपयोग करें ऐसा लगता है कि ember उत्पन्न कमांड सही नहीं है ... किसी को भी मदद करने में सक्षम? क्या मैं एक प्रारंभिक या कुछ को उत्पन्न करने के लिए हूं? धन्यवाद दो चीजों की जरूरत थी यह सॉर्ट करने के लिए। सबसे पहले ember-cli के संस्करण को अपग्रेड करने के लिए यह यहां कवर किया गया है: एम्बर सीएलआई के नवीनतम जारी संस्करण में अपडेट करने के लिए एनपीएम का उपयोग करें। npm इंस्टॉल --save-dev ember-cli जब आप नवीनतम संस्करण में अपडेट करें जिसे आपको ऐप ब्लूप्रिंट से फाइलों को फिर से स्थापित करने और नोड एनपीएम निर्भरताओं को अपडेट करने की आवश्यकता हो सकती है। एम्बर इनिट प्रोजेक्ट ब्लूप्रिंट से फाइल कॉपी करें आप मौजूदा फाइलों को अधिलेखित करने के ...

testing - How do I facilitate and encourage implementation of my specification? -

Let's say I have written a library in programming language (for example Java) to interact with an external component (such as a database). Now I would like to provide community implementation in other languages. How can I enable and encourage, to provide implementation to other developers who are similar in my functionality? Some examples can be: provide Provide a reference implementation Provide a test framework So that they can validate their implementation (can this be done in many languages?) Are there other options available? All should be the abstraction level of the general way. Since they are a set of guidelines for programming languages, which recommend methods for a piece program written in the style of programming styles, practices and methods, these conventions generally include file organization, indentation, a comment, a declaration, Statement, a white space, a naming conventions, a programming practice, programming theory, thumb programming rules...

event handling - Python Kivy: Properly start a background process that updates GUI elements -

I have a Python script that makes some deep processing of user files and can take some time I used Kiwi To create a user interface, which allows the user to choose the file, processing mode, and shows some messages when the process is turned on. My problem is that when the main Kiwi loop calls the nearby user interface, the window is free. The correct way to solve what I have understood is creating a separate process in which the script will be off-loaded and send updates of user interface. However, I have no idea how to send the messages back to the application from a different thread or how to do it or there was no instance of it. Anyone please do this properly or point me in the documents related to this topic? Update: To make the program sustainable, I would like to avoid calling the elements of processor loops from the main thread and instead one Call long process which returns to the updated elements of the GUI such as progress bar or text field. It seems that t...

java - Center view during simple scale animation -

I am trying to scale / in animation for activity / frigate transition here Two animations: & Lt; / Set & gt; - & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Set xmlns: Android = "http://schemas.android.com/apk/res/android" Android: Period = "500" Android: Interpolator = "@Android: Anime / Accelerate_Desiret_Inporator" & gt; & Lt; Android translate: fromXDelta = "100%" Android: fromYDelta = "0" Android: toXDelta = "0" Android: toYDelta = "0" /> & Lt; / Set & gt; Use this as: Override pending transition (R.anim.slide_in_right, R.anim.slide_to_behind); The problem is that the activity is not low in the center of the screen, it is the top / left stick of the screen Any thoughts what I miss in WM ? Or are you doing wrong? Add a pivot in your scale animation Add it to your XML: Android: PUTx = "50%" Android: Pi...

javascript - Want to arrange css divs in a proper way -

Image
Please, answer / help me. I have three div with CSS and it is dynamically generated. And I call them wincontainer , smalldiv and largediv . wincontainer is a container smalldiv and largediv as we can see in the image. Div s properties As we can see, we have 2 largediv s and 4 smalldiv s which are dynamically ready yet Question: I want to arrange a small div in a proper way. Picture like this picture.1). But they are coming in the form of figs (2) As I said I can not make sub wrappers because they generate dynamic and very important serial intelligent ... if I make subwrapper then according to this serial Note: I do not have another specific div to include smalldiv or largediv to isolate it Because that small and big div is in accordance with a serial so we have a special Can not put into containers and they are dynamic. In JSFIDDLE - & gt; It will work fine when you remove the upper most ultraviolet, but when you add a small ba...

r - How to best generate multiple HTML files from RMarkdown based on one dataset? -

I have an RMMarks report which is very useful and has many pages long with all the statistics and tables in HTML file . It uses the same dataset for all data and tables. I keep this large HTML file and then several new subdirectories with their own HTML files and subdirectories, each with their own html files. In this case, the full report contains data from a department, then each subdirectory will have an html output related to each group, and each of them has HTML output for each person in each group. Together there will be a subdirectory. In this way, if someone is interested in only one group, or one person's metric, then they look at the most suitable output. Parent DIR: Data for the same large HTML file with which the data and tables are generated for the whole department. __Subdir for each group: output based on the same data, but only the group's metric. __Subdir For each person: Output based on the same data but only individual matrix What is the best ...

Is there any way for php to highlight the difference between two strings? -

I have a table that has two mySQL records, one original and one that has been edited and for acceptance / rejection The flag is flagged by the administrator I want to change the column color to highlight the rows that have been edited. The color highlighting on the changing lines works for all the rows except "Pay" and "Email", for some reason they are always different even when the values ​​look completely identical. Does PHP have a function that highlights the difference between the two strings, so I know where the difference is? Here my code is for one line: & Lt; Td> & Lt ;? Php htmlout ($ flagged [[salaryfrom ']. ""); ? & Gt; & Lt; / TD & gt; & Lt; / TR & gt; Function htmlval ($ text) {return html_entity_decode ($ text, ENT_QUOTES); } Use it & lt; Php if ($ cand ['salaryfrom']! = $ Flagged ['from salary']) $ tcolor = "# 000000"; Else $ tcolor = "# D3D5E8"...

sql - Using Columns As A Category Series In BIRT -

I currently have such a select statement: select COUNT to (CHECK_FORWARD.ID) from CHECK_RETURN UNION sELECT aLL COUNT (CHECK_DEPOSIT.ID) select CHECK_FORWARD UNION aLL COUNT as as CLOSED_SUMS CLOSED_SUMS (CHECK_RETURN.ID) from CHECK_DEPOSIT as CLOSED_SUMS This gives a table like this CLOSED_SUMS ----------- 1 1 21 I'm trying to make a BIRT pie chart that shows the breakdown of those sums, take What it is to lose about how to lose I Biaiarti wants a Division Series (to classify the amount) CLOSED_SUMS STATUS ----------- - to create a table is not to use a calculated column to create a list: ---- 1 1 sent back 21 plus I do not send "sent" (ie, to return to a column with the three strings, to create an expression in the column column expression wizard. Received, "Return", "Dipajited") It repeats the strings for all values. Should I use an array to keep the value? And if so, how would I go about doing this? select COUNT in C...

python - plotting datetime object in matplotlib -

मेरे पास datetime ऑब्जेक्ट्स की एक सरणी है जो निम्न है dates = [datetime डेटाइम (1 9 00, 1, 1, 10, 8, 14, 565000), डेटाइमडेटटाइम (1 9 00, 1, 1, 10, 8, 35, 330000), डेटटाइम डेटटाइम (1 9 00, 1, 1, 10, 8, 43, 358000), datetime.datetime (1 9 00, 1, 1, 10, 8, 52, 808000)] तब मैंने तिथियों का उपयोग करके उपयुक्त ऑब्जेक्ट्स को matplotlib में बदलने की कोशिश की = Plt.dates.date2num (dates) फिर मैंने इसे ax1.plot_date (dates, datac) का उपयोग करते हुए कुछ मानों के विरुद्ध साजिश करने की कोशिश की लेकिन प्राप्त त्रुटियों को निम्न प्रकार से किया गया है: Tkinter कॉलबैक ट्रेसबैक में अपवाद (सबसे हाल ही में कॉल अंतिम): फ़ाइल "C: \ Python34 \ lib \ tkinter \ __ init__.py", पंक्ति 1487, में __call__ return self.func (* आर्ग्स) फ़ाइल "C: \ Python34 \ lib \ site-packages \ matplotlib \ backends \ backend_tkagg.py", पंक्ति 278, resize में self.show () फ़ाइल "C: \ Python34 \ lib \ Site-packages \ matplotlib \ backends \ backend_tkagg.py ", रेखा 349, आरेखण चित्र...

python - Using numpy to find the number of non-zero values in an array -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मुझे अक्सर खोजने की आवश्यकता है मूल्यों की एक बड़ी 1D सरणी के लिए कुछ शर्त संतोषजनक मानों की संख्या थोड़ा परीक्षण और त्रुटि के माध्यम से मुझे निम्न विधि के साथ समाप्त हुआ: आयात करें np के रूप में np a = np.random.random_sample (500000) # बस कुछ परीक्षण डेटा num_above_half = len (np.nonzero (एक & gt; 0.5) [0]) एक समान विधि: num_above_half = sum (a & gt; 0.5) मेरे मशीन पर लगभग 300 एक्स धीमी है पहली विधि ठीक है, लेकिन वाक्यविन्यास थोड़ा गंदा है, क्या ऐसा करने का एक बेहतर तरीका है? एक निश्चित स्थिति को गिनने के लिए अलग-अलग तरीके से बेंचमार्किंग से पता चलता है कि np.count_nonzero सबसे तेज़ है। में [2]:% timeit len ​​(np.nonzero (एक & gt; 0.5) [0]) 100 loops, 3: 2.24 एमएस प्रति लूप में सर्वश्रेष्ठ [3]:% timeit राशि (ए और 0.5; 1) 1 छोरों, सबसे अच्छा 3: 1.23 एस प्रति लूप [4] :% Timeit (a & gt; 0.5) .sum () 1000 छोरों, लूप प्रति 3: 906 μμ के सर्वश्रेष्ठ [5]:% timeit np.count_nonzero (a & gt; 0.5) 1...

sql - MySQL HELP- print the cno, sectno, and the average gpa of the students enrolled in Computer Science -

How can someone guide me: Instructions are printed "Every Computer Science Class, The average GPP of students enrolled in CNO, Sittano, and Classroom. " I have attached my table and my selection. Will someone tell me if my search shows that I am going in the right direction and if so, then I am stuck on how to write my atom I will call the student SID = Nomination SID to attach this table I do; I'm just confused how will it work? Please help me guide me .. Thank you .. Students (SID, SNAM, Gender, Age, Year, Qpa) Department (DNA, MMFDS) Professor (PNA, DNA) Course (CNO , CNNA, DNAM Major (DNA, SID) section (DNA, CNO, Secto, PNA) Enrol (SID, Grade, DNA, CNO, Secto) Selection Nomination Name, Enroll, Register, Student. From the AGG (GPA), recruit zone 'student' on WEEI DNG = 'Computer Science' To join you need to specify which columns are related to tables, and when you use consolidated functions like AGG, you need to use the group by clause...

html - Centered textbox with an offset label? -

I have a text box centered on a page What I want is to display an error label on the right side, if necessary, And place the focused textbox on the page. The page has a panel, which is focusing the whole page. & lt; Asp: panel id = "pnlStart" runat = "server" CssClass = "center" & gt; ... ... ... & lt; Tr & gt; & Lt; TD & gt; & Lt; Div & gt; & Lt; Input type = "text" id = "pName" name = "pName" runat = "server" class = "pName" style = "color: # 7A0000; width: 33%;" Value = "Enter your name" onfocus = "inputfocus (this)" onblur = "inputblur (it)" /> & lt; ASP: Labels ID = "pNameValidationLabel" style = "width: 33%;" Name = "pName" runat = "server" text = "* Please enter your name." Class = "pName" view = "wrong" & gt; & Lt; / Asp: Label & ...

gbm - R - Caret - Using ROC instead of accuracy in model training -

Hi my name and I'm using the carat to create a GBM tree-based model. Although accuracy instead of my metrics want to use ROC as there are code I have so far myTuneGrid & lt; - expand.grid (n.trees = 500, interaction.depth = 11, shrinkage = 0.1) fitControl & lt; - trainControl (method = "repeatedcv", number = 7, repeats = 1, verboseIter = FALSE, returnResamp = "all", classProbs = TRUE) myModel & lt; - Train (Cover_Type ~., Data = modelData, method = "GBM", trControl = fitControl, tuneGrid = myTuneGrid, metric = 'ROC') However, when I run this code I Warning Warning message: in train.default (x, y, weight = w, ...): The metric "roc" result was not in the set. Instead, accuracy will be used How do I use rock instead of my model of purity? What am I doing wrong here? Is there a link to the GitHub project for the source code?

c++ - Bit manipulation issues with signed and unsigned ints, XNOR -

I am implementing parallel radix sort, I want to calculate the bit value on a specific bit index to calculate I am trying to scan two offsets for offset addresses for radix, one for bit value of '0' and one for '1' bit. I am trying to make a flag that I want to work with it, a specific bit value or not, I pass a boolean flag in my colonel which states that I '0' or ' I want to work with 1 'bits, the flag is called the doOnes if the flag is true, and the bit value is 1, then I would justify another flag useBit But I want to know how to move it to my kernel. If the flag is true and the bit value is 0, then I should have the useBit flag false. I can confirm that I'm getting the proper bit value. My issue is computing below useVal // This kernel bool doOnes = Signals the flags given in false; // This is an unsigned int bit value symbol that I get within my kernel unsigned int bitVal1 = 1; Unsigned int bitVal0 = 0; Printf ("& g...

python - Kolmogorov-Smirnov test in Scipy with non-normalized data -

I am trying to check whether a list of values ​​is evenly distributed or not. I know that there is a proper examination to run the Kolmogorov-Smirnov test. However, my results do not matter to me. In the code given below, I create two lists of values ​​that are evenly distributed, and y is not evenly distributed. What should be: I run SippyCest () on both XP and Y, and for the X pass does not pass P-Well, YK-P-value. / P> What's happening: I run SippyCest () on XP and Y, and P-Value is 0.0 for both X and Y. [1] In SPE import data, SP imports are imported as SP imports, as imported matplotlib.pyplot plt% matplotlib inline according to NP import math import [2]: X = np.random.uniform (size = 1000) sigma_x = np .std (x) mean_x = x.mean () plt.hist (x) plt.show () in [3]: y = x ** 4 sigma_y = Np.std (y) mean_y = y.mean () plt [4]: ​​(0.499, 0.0) in [5]: statistics. (4):. Kstest (y, 'uniform', args = (mean_y, sigma_y)) [5]: (0.67400000000000004, 0.0) You ar...

R code. write a floor function -

I want to write a floor function in R, which is why a floating number gives your nearest integer I tried down function Of It seems that it allocates the value if I X works and runs the code inside the function would, but when I try to put everything in function would later call the function name it Fails Do anyone know how to fix that? Thanks! & gt; My_floor & lt; - Function (x) {x & lt; - x-0.5 as.integer (x) returns (x)} & gt; Y & lt; - 3.1052255 & gt; My_floor (y) [1] 2.605225 Not quite sure what you But if you just want to convert the input to the nearest integer for the nearest of zero (i.e. floors as you run your question), then there will be a way to do this: / P> This leaves the integer part of your input using RK trunc : which you call directly That means trunc (y) will still give you the desired results. If you want to use your function above "as is" then: my_floor & lt; - Function (x) {x & lt; -x-0.5x ...

Perl LWP SSL connection: certificate verify fails -

My application requires LWP under SSL, but I do not seem to connect it properly without getting errors so may. failed to verify the certificate) LWP :: Protocol :: https :: Socket: SSL connect attempt failed with unknown error error: 140 9 0086: SSL routine: SSL3_GET_SERVER_CERTIFICATE: Proof Verify the letter failed on C: / Perl /site/lib/LWP/Protocol/http.pm line 51 Every time I load the website in Firefox on my server, I get this connection is unreliable (Technical error: sec_error_unknown_issuer) Whenever I load it in Chrome, it confirms exactly I have Firefox on my computer and I can load the page in Chrome and can not get any SSL verification errors at all. I have no indication that is different between my PC and my server; Both of them are using the same Firefox versions, so I'm not sure why this will not be verified properly. I have tried to work by putting in $ ENV {PERL_LWP_SSL_VERIFY_HOSTNAME} = 0 in the Perl script, but it seems that it is st...

c# - Detect if application was started in a new or existing console -

इस सवाल का पहले से ही एक उत्तर है: 4 जवाब मैं कैसे पता लगा सकता हूँ कि मेरा कंसोल एप्लिकेशन को किसी अन्य कंसोल से शुरू किया गया था, या यदि लॉन्च पर एक नया कंसोल खोला गया है? उदाहरण के लिए अगर मैं चाहता हूं कि कंसोल में कुछ कस्टम रंग हों, अगर यह एक नया कंसोल विंडो खोलने पर, या बस सब कुछ छोड़ दें जैसे कि यह दूसरे कंसोल से शुरू हो गया है। (जैसे PowerShell.exe की तरह लगता है) बस एक नई विंडो में ऐप जो भी शुरू होता है ( शॉर्टकट, एप्लिकेशन) को कॉन्फ़िगर करने के लिए कॉन्फ़िगर किया गया है कि आपके एक्जीक्यूटेबल के लिए कमांड लाइन पर एक विशिष्ट पैरामीटर पर्यावरण को रंगीन होना चाहिए। उदाहरण के लिए, myapp.exe -RunInNewConsole एक और विकल्प यह निर्धारित करना है कि क्या आप विधि का उपयोग करके कंसोल में पहले से ही चल रहे हैं: [DllImport ("kernel32.dll")] स्थिर extern bool AttachConsole (int dwProcessId) ; निजी स्टेटिक बूल आईसलिंग इनकॉन्sole () (अटैक कॉन्सोल (-1); }

java - SQLite 64bit integers recognized as ints in jooq -

I have a SQLite database that I am using with jOOQ when I use jOOQ's code generation tool , It creates all tables and records squares as expected, however, all solitites change in the INTEGER column in the generated code in the java.lang.Integer field. The problem is that SQLite INTEGER's can store up to a 64 bit signed integer, where java.lang.Integer is only a 32 bit signature Is integer. Could it tell jOOQ to use java.lang.Long (which is 64 bit signed) for these columns? In fact, there is no real INTEGER in the form of data type in SQLite Is only one, which can actually store up to 64 bit signed entries. However, when you use DDL, you will usually use one of the (most) standard "type name", which is used for CREATE TABLE statement and CAST Expressions can be done in: INT INTEGER Tinnit Muhammad MidiMiniti INT2 INT8 generate a java To get jOOQ for Lang.Long , you must enter BIGINT or in your CREATE TABLE sta...

newrelic - New Relic for Amazon Kinesis worker monitoring -

We are using Amazon Keynes (a queue service) and are a queue reader written in Java. They basically read from the queue and put the data into our datastore. I was thinking that someone has had success in using New Rick to monitor the background queue staff? Some analyzes are interested in me: How many queue workers are running now? (They raise the top and bottom on the basis of weight) How many messages / seconds is each line worker handling? How does it look over time? How many messages / second full employee fleet handling? Workers request both MySQL and Cassandra which part of their time is spent? We are logging with log4j if workers have created errors / scripts, then what are they? What is the error rate over time? Thanks, Consulting There is no problem with the job of batch in opposing web transactions in the new residue, so there will be no issue. Assume that you are starting with Java for which the source code is available, the best way is to use ...

Update Multiple Objects using SQL way in Django -

I have a comment model that requires admin approval. I am providing a view to admin to do this However, I am using an expensive method to update the approval status. comments = # Comment with a comment object for C: c.approved = true C.approved_on = #now c.save () As you can see, I am looping all the objects in the list and every time I am killing the database. I am looking for a way in which I have to do something like SQL as UPDATE comments SET Approved = 1 WHERE id (....... ....) This will do the same thing in a single SQL query. Is there any way to do this in Django? In this way, with the use of an approval method in the manager? comment.blogs.filter (pk__in = [1,2,3]). Approved (). () Easiest way: def Approval (self): back to self .get_queryset (). Update (Approved = true) Note : The problem with this solution is post_save and pre_save signals Will not be called. If you need this signal, you will have to recreate items such as in you...