Posts

Showing posts from June, 2014

java - AdMob - Error inflating Class com.google.gms.AdView -

I can not add ads to my Android app, I tried to work on it in the last 6 hours and research into improvements Have done, but nothing seems to work! so frustrating. Here is the code: setContentView (R.layout.splash); in this(); LinearLayout layout = (LinearLayout) findViewById (R.id.linearSplash); AdView = new ad view (this); AdView.setAdSize (AdSize.BANNER); AdView.setAdUnitId ("a14ff402be4457c"); Layout.addView (adview); AdRequest adRequest = New AdRequest.Builder () .addTestDevice (AdRequest.DEVICE_ID_EMULATOR) .build (); AdView.loadAd (adRequest); But I get an error: Unable to start activity - android.view.InflateException: Binary XML file line # 17: Enhanceing a class com Error. Google.gms.ads.AdView Is anyone sure? I am using the Google Play services jar file, not general adobe 6.4.1. You have the wrong AdView in your layout file. You have the com.google.android.gms.ads.adview package in your layout as Google Play services , not your Curre

Similar function Arduino bitWrite -

For a Raspberry P project, I am trying to change the arduino code. Does anyone know such a similar task? Thanks a lot. OK, I think I can do it on my own :) zero bitwait (uint8_t & x, unsigned int n, bool b) {if (n & lt; = 7 & amp; amp;;> = 0) {if (b) {x | = (1u

Mongodb. Aggregation. $match: [another collection keys] -

User and purchase are two collections The reference key in the purchase store is 'user'. I need to get the entry from the shopping store Which relates to some of the users raised by the city's tag. results = db.users.aggregate ({{$ $ $ $ $ $ $ $ $ {{'$ match': {'user_info.city1': 0}}] Db.userset.insert (Results ['Result']) db.purchase.aggregate ([{'$ match': {'user': usersarray (?)}}]) Can I get more than $ millions of dollars if I have more than a million, and every user can buy more than 10000? Is there another way to do this with aggregation? This example is indexed and about embedded documents Not in. Yes, the entire query is 16A MBN's BSON document is within the limit. Your second query is most likely to be: db.purchase.aggregate ([{'$ match': {'user': {'$ In ': [' user1 ', ...' userN ']}}}])

c++ - Can someone explain this code for me please? -

I am trying to understand what is the comparison of an Ieterter?: Can anyone please explain in the code given below is? Thanks in advance Maps & lt; String, cvsvm & gt; Classes_classifiers = predictor.getClassesClassifiers (); Map & LT; String, the map & lt; String, integer & gt; & Gt; confusion matrix; (Map CvSVM> gt; :: iterator = class_classifiers.begin (); it! = Classes_classifiers.end (); ++ this) {for (string, cvsvm> gt; :: iterator it1 = classes_classifiers Begin;); It1! = Classes_classifiers.end (); ++ it1) {string class1 = ((* this) .first.compare ("Foods") == 0)? "People": (* this). First; String Class 2 = ((* it1) .first.compare ("Foods") == 0)? "People": (* it1). First; Illusion _matrix [class 1] [class 2] = 0; }} This can be written in a less vague way it-> ago == "Foods"? "People": this-> first; Since returns string :: comparison if string is equal to logi

javascript - How to detect a click outside the current textarea in prototype? -

I have a div that "converts" into a text string. Well, this is a hidden textera that shows when the Divis clicks on a div, the divis will hide and Texera will find the Div's internal HTML. The user can now edit the text and after that it is finished, I want to click outside the text. Now the teaser hides and the div appears again with updated HTML content. But at the moment it does not work as expected when a user clicks outside of the texts, how can I find out? Is there any .not () equals jQuery? The user should be able to resize the texts At the moment, it stops after resizing. any idea? Here's a fiddle: HTML here: & lt; Div class = "media_box" & gt; & Lt; Div class = "label" & gt; Textfeld: & lt; / Div & gt; & Lt ;! - Debit will be editable with the content of the property but there will be no line break - & gt; & Lt; Div class = "txt_area" & gt; Advertise on this website Now there

mysql - Get nearest location in database -

I am trying to get the closest position to any user input from within the database (closest store at latitude and longitude ), So based on the postcode of users I am converting latitude and longitude, and with these results, I need to search my databases for shops that are closest to these values. I have tried to do some of the latitude and longitude of all the stores and so far (seeing past questions): SELECT * mystore_table from WHERE 'latitude' & gt; = (51.5263472 * 9) and `longitude` & amp; Lt; = (- 0.3830181 * 1.1) Order by stomach (latitude - 51.5263472 and longitude - -0.3830181) boundary 1; When I run this query, it displays a result, but it is not a nearby store, not sure it can happen with negative numbers, both my column latitude + Is longitude saved as a decimal data type? You should try this one arithmetic instead of command : WHERE 'latitude' & gt; from SELECT * mystore_table = (51.5263472 * .9) and 'Regdt` & lt; = (-

install4j - How to use classes like RegistryRoot correctly in custom actions? -

I have to implement a custom action to find the Windows registry for the installed version of the dotnet framework. So I thought of expanding ReadRegistryValueAction to integrate my personal search algorithm. But the custom action will not be found on IDE. Therefore I increase the action from AbstractInstallAction and include the Registry root class to configure the action inside the IDE in the same way, as provided by the install4j framework With Registry functions done CheckDotNetInstallationActionAbstractInstallAction {Private Registry registry Root; Public registry root getRegistryRoot () {registry return registry; } Public Zero SetRistrictToot (Registry root registry) {this.registryRoot = registryRoot; } @ Override Public Boolean Install (Installer Project Instinct Contact) throws UserConnected Expressions {// Custom Search Returns False; }} But instead of getting a dropdown list, there is only one blank field, I expect a dropdown list in the same way as there are n

Java: Had to move away from using enums as keys for HashMaps, why does an enum keyed HashMap.get() returns null pointer? -

enum MyKeys {AKEY, BKEY, CKEY} मानचित्र & lt; MyKeys, Clazz & gt; Zzz = नया हैशमॉप & lt; मायकेज़, क्लाज & gt; (); Zzz.put (MyKeys.BKEY, नया Clazz ()); zzz.get (MyKeys.BKEY) .setValues ​​(someValues); क्लैज xxx = जेज़.गेट (मायकीज़ बीकेई); // रिटर्न रिक्त हालांकि यह सरल परिवर्तन सही मूल्य वापस करता है: enum MyKeys {AKEY, BKEY, CKEY} मानचित्र & lt; स्ट्रिंग, क्लाज & gt; Zzz = नया हैशमैप & lt; स्ट्रिंग, क्लैज & gt; (); Zzz.put (MyKeys.BKEY, नया Clazz ()); zzz.get (MyKeys.BKEY) .setValues ​​(someValues); क्लैज़ xxx = जेज़.गेट (मायकीज़.बीकेई.ओस्टस्ट्रिंग ()); // रिक्त नहीं लौटाता है क्यों? मानचित्र & lt; MyKeys, Clazz & gt; Zzz = नया हैशमैप & lt; MyKeys, स्ट्रिंग & gt; (); // इसका मतलब है कि यह शून्य नहीं लौटाएगा, मूल्य zzz.put (MyKeys.BKEY, नया क्लाज़ ()) को आरम्भ किया जाता है; // यह भ्रामक हिस्सा है ... कुछ अंक शून्य हो सकते हैं zzz.get (MyKeys.BKEY)। सेट वैल्यू (कुछ वैल्यू); क्लैज़ xxx = जेज़.गेट (मायकेज़.बीके); // निश्चि

android - Django Rest Framework + gson : utf-8 can't decode -

I am working with Django Rest Framework to build my API and with Android + GSON in my client side I am working. There is a problem with encoding when I try to send a POST with a field "country" and the value "Peru". I got the error: {"detail": "JSON parse error - 'utf8' codec can not decode byte 0xfa in position 15: invalid start byte"} I have changed a parameter in my post with it: postRequest.setEntity (New String Entity (GS.N.Togson (object), HTTP.UTF_8); The server does not return the same error to me, but it throws an HTTP 500 error. Is there a way to manage it in the client or server side? Which one do you recommend?

Re-install Windows Service - Fail -

I developed a Windows service project, then I installed it. Then I made some changes to this project, and tried to make it again, but this change did not apply, so, I tried to uninstall and install it, but there is an error. : "Service already exists" I try to delete, reboot, but I'm still unable to restore the service (shows the same error). Does anyone know how to fix this? And when I make changes in the project, I only have to stop the service and build the project, that change is applicable? Thank you If the Windows service is only installed, then you can reboot without problems Should be able to After rebuilding it then you have to choose any change you made after running it. However, if the service is running while trying to resume, then you will run on the build issues because the assemblies are in use and can not be changed. In this way, you have to stop the service first, rebuild it and then make the service Will have to start again. As far as

d3.js - Setting tick intervals on a D3 time axis throwing an exception -

I have a simple piece of JavaScript that creates a time axis in D3: var xScale = D3.time.scale () .domain ([testData.datapoints [0] .at, testData.datapoints [testData.datapoints.length - 1] .at]) .ange ([0, ( New Date (testData.datapoints) [TestData.datapoints.length - 1] .at - testData.datapoints [0] .at) .gettime () / interval) * 21], xAxis = d3.svg.axis (). Scale (xScale) .orient ("bottom"). Tick ​​([d3.time.minute, 15]) / * This row is an exception * /. Tick ​​format (d3.time.format ("% d /% m /% y% H:% M: It is to say that to make a tick at a 15 minute interval: scale.ticks (d3.time.minute, 15) ; But I get an exception: Line 9204, column 7 in Dell. 7 0x800a138a - JavaScript runtime error: Function expected < / P> (NB does not make any difference to the chain in the xScale series> moving the offensive line from xAxis .ticks (20) Excludes an exception, but I'm not after that.) D3 The line where the error has been thrown, this fu

python - Applying a dictionary of string replacements to a list of strings -

Say that I have a string and a dictionary specified list of replacements: Example my_replacements = {'1/2': 'half', '1/4': 'quarter', '3/4': 'three quarters'} And a list of strings, where each string might contain a key from the above dictionary, such as: ['I have my 1/2 bottle', 'me 3/4 profit' ] How do I apply a replacement to the list? What would be an insignificant way to do this? o (n) solution: reps = {'1 / 2 ':' half ',' 1/4 ':' quarter ',' 3/4 ':' three quarters') li = ['My 1/2 bottle is only' ',' give me 3/4 of profit '] ([Reps.get (w, w)) [6]: [' I have half a bottle '] ([repsget (w, w)) [] for lamps (lambda s:' '. (S) s.split ()] , 'Give me three quarters of profit'] # For those who do not like 'map', list presentation version: ['' ([For reps.get (w, w)] in sentence sentence.split

<!--more--> being ignored when WordPress content is displayed -

I am trying to write a plugin that will take page ID and return a preview of the page. Here is my code: function page_preview ($ atts, $ pageid = null) {citations (shortcode_atts (array ("pidid" => gt; '$', $ atts)); $ The_query = New WP_Query ('page_id ='. $ Pageid. ''); Global $ more; $ More = 0; If ($ the_query-> is_pause ()) {while ($ the_query-> is_pos ()) {$ the_query-> The_post (); $ Title = get_the_title (); $ Thumbnail = get_the_post_thumbnail ($ page id, 'preview'); $ Content = get_the_content (); }} Return '& lt; Div class = "callout" & gt; . '& Lt; H4 & gt; ' . $ Heading '& lt; / H4 & gt; ' . $ Thumbnail $ content '& lt; A href = "'. Get_the_permalink ($ page ID)." & Gt; Continue reading & lt; / A & gt; & Lt; / Div & gt; '; } Add_shortcode ('Page Preview', 'Page_preview'); And it's called as s

sql - Query to search data -

I have two tables, which have specific text keywords in one column and one column has another table with large text , Each has different number of records I want to type in the query to check whether the second table has any keyword from the text field 1 table. I want to see all my keywords along with all the records in the text field of the second table. Thanks in advance. put you the as clause in JOIN needed. Select Tabletwo T2 from Select SELECT * TableOne t1 ON2.ColumnOne '%' + t1.ColumnOne + '%'

how to eat up all the android memory in an android application? -

Recently, I'm testing the performance of swap partitions for Android devices. I need to eat all the memory in a test application (may be the root authority), so that some pages can be swaped. how can I do this? Thank you. Since you can use ADB and have a bizbox, so you can use a shell script Ripped from this reply See: #! Sleeping time in the "Bin / ash echo" type number [SufiFX] can be "echo" SFFX for second (default), 'm' for minutes, 'h' or 'd' days for hours Start reading all the "echo" memory for "read-p" & gt; late "echo" ... "$ 1000 in the index; $ Value = $ (seq -w -s' $ index $ ($ $ index + 100000)) eval array $ index = $ value done echo "... end allocation memory" echo "$ delay $ sleeping" sleep $ delay

javascript - algorithm/formula to move elements so they reach a specific x and y coordinate at same time -

I want to take a div 70% left and 10% above my viewport when I scroll My code for here is: flowers. Protopp Animatablemeframe = function () {var scrolls = window. PageWay Offset / Window.VerHeight * 100; // Check if the next keyframe has to be loaded (! This.animationDone) {// var formula = (this.initialPos.top - this.keyframe ['top'] * percentage hight) / (this.initial. Pos.left - this .keyframe ['left'] * percentage) * (scroll * 5); / * * Animate the top spot / / (If this .pop.tap> gtight = * this.keyframe ['top']) {this.domEl.css ('top', (this.initial.pos .top - (* scroll .speed) + 'PX'); } And if (this.page.top and lieutenant; percentheit * this.keyframe ['top']) {this.domEl.css ('top', (this.initial.pos.top + (scroll * this.speed) ) + 'Pixels'); } / * * Animating * / if (this.pos.left & lt; percentwidth * this.keyframe ['left'] on the left) {this.domEl.css ('left', (this.initial.pos.left

ios - UILocalNotification versus EKReminder with EKAlarm -

What is there I can explain the difference and when to use the UK Rikimn vs. Ikearminder with Ikeelarm? Uaielokl notification you can send in-app notifications. When you want to access the OS Reminder DB, the EK is using the Reminder. If you set the arrimminder, even if the app is deleting, you will get a notification.

Python 3.2 Cx_Freeze won't compile whole tkinter -

I have created this small calculator, which I tried to complain with cx_freeze, it calculates something and lets you type in the message box Gives the answer. When I run it from IDLE, but when I run it from IWEL, it works fine, when it opens the GUI created with the tanker, but if I press my calculation button, the message box pops up I get an error in the DOS Shell: 'Exception in the Talkator Callback Traceback (Last Call Last): File "C: \ Python32 \ lib \ tkinter__init __. Py", line 1399, Call returns in self. Func (* Args) File "calculator1.pyw", line 46, Kinetic Name in Energy: Error: The global name 'Messagebox' is not defined ' I use the following' setup.py ': Cx_Freeze Import Setup, Executable Setup (name = 'Kinetic Energy calculator', version = '0.1', Description = 'calculation', executable = [Executable ('calculator1.pyw') from )],) and run it from cmd with 'C: \ Python32> python

iframe - Access form elements on different Frames in VBScript -

मेरे पास वेबसाइट पर इन तीन फ्रेम हैं। & lt; फ्रेम स्क्रॉलिंग = "ऑटो "Src =" ../../ वििक्स / थालाद / रंगसामी? मोकाकुमाता 1234567 "नाम =" ऐन "& gt; & Lt; फ़्रेम स्क्रोलिंग = "ऑटो" src = "../../ vix / thalada / रंगसामी? मोकाके **** 13245678" नाम = "बैन" & gt; & Lt; फ़्रेम स्क्रोलिंग = "ऑटो" src = "../../ vix / thalada / Rangasamy? मोकका **** 85234175" नाम = "कैन" & gt; यह कैसे जाता है: सेट करें oIE = CreateObject ("InternetExplorer.application") oIE.Visible = True oIE.navigate ("https: //ec.rcuweportal.au.eds.com/cics/r1cb/rm0p00ba?cb246 ") oIE.Document.getElementsByTagName (" a ")। आइटम (0)। क्लिक करें // यह काम करता है और यह एक छवि बटन पर क्लिक करता है फ्रेम नाम AAN ठीक अगला जब मैंने एक और टेक्स्ट बॉक्स तक पहुंचने की कोशिश की जो कि बैन नाम की फ़्रेम में मौजूद है, तो मुझे ऑब्जेक्ट नहीं मिला त्रुटि मिली। जाहिर है, क्योंकि मैं अभी भ

javascript - backbone.js remove item from series -

I am currently learning backbone.js and thinking about removing an item from a series. I'm working on the infamous recipe app and I'm directing step by step in the terrace. I want to be able to delete a text without removing all of them. The construction event is like this: "#btnAddDirection click": "addNewDirection" addNewDirection: function (ev) {Ev.preventDefault (); This.directionCount ++; This.render (this.directionCount); }, and my clearance looks like this: Click '.subDirection': 'Subdivisions' subdivision: function () {this. $ El Deletion (); } I have the issue that when I click on the [-] button, all the directions are removed instead of a single. I am thinking that for the direction I have to give some type of identifier. Any help would be appreciated. Thank you. Here is the full direction control view: // See the direction control all directions control = backbone. View. Extension ({rendere: function (direction

Mahjong Set of Blocks Javascript -

I am trying to create a set of blocks from a user's given dimensions. Displays a box in the code box and does not block the submission form, and I'm not sure what is wrong. & lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Mahjong Games & lt; / Title & gt; & Lt; Div class = "boxing" id = "div1" & gt; & Lt; / Div & gt; & Lt; Name of the form = "Dimension" Parameter = "Board ()" & gt; & Lt; P style = "color: black" & gt; Type the number of colors you want & lt; / P & gt; & Lt; Input type = "number" name = "col" /> & Lt; P style = "color: black" & gt; Type the number of rows you want & lt; / P & gt; & Lt; Input type = "number" name = "row" /> & Lt; P & gt; & Lt; / P & gt; & Lt; Input type = "submit" value = "submit" /> & Lt; / F

java - Error with Random.nextDouble math -

I am working on a small app that has to deposit and withdraw money from a bank account. This program is mostly going well, but I am getting serial numbers from many transactions, in which there are many trailing decimals. I am randomly producing doubles, which should only have 2 decimals, so I'm not sure where they are coming from. c: \ user \ John \ document \ class \ java & gt; Java Savings Account Balance Balance: 62.0 Deposit Number: 0 Word Count: 0 Annual Interest Rate: 0.09 Service Charges: 0.0 Active: Submit the wrong first return, then randomly generated amount. Balance: 62.0 Forcibly: Deposit: 8.76 35.43 Your account is inactive: Inadequate fund *** unable to complete the withdrawal. *** Remaining: 97.43 per day: Deposit: 16.83 3.98 Balance: 84.58000000000001 With: Deposit: 99.44 35.2 Inactive due to your account: Inadequate fund *** Unable to complete the withdrawal. *** Submit to continue C: \ Users \ John \ Documents \ Class \ Java & gt; This issue is

Use facebook sharer.php to share on a page wall -

I want to link to create a share post on my FB Company page without authenticating any user. Currently I can share these with them on my wall: & lt; A href = "http://www.facebook.com/sharer.php?s=100&amp;p [title] = xxx & amp; p [summary] = xxx & amp; amp ;P [url] = Xxx & amp; amp; amp; p [images] [0] = xxx "& gt; & Lt; / A & gt; But I'm not sure how I can get it to share the wall of a page instead of its timeline. I've come close to some extent using the communication feature: But it showed only as a normal share, but " Through ", unless there is no step, I am not remember to link my app to my Facebook page? Thank you! Unfortunately, the sharer.php method is used only for sharing on the user's timeline. . If you want to ask the user to post on a page's timeline, then you have to create an app, ask the user to authenticate it and then use the Facebook API to post it. Please. I think your case wi

Excel SaveAs trying to replace files after running a VBA macro -

I created macros using Excel 2013. What does the macro do by default: Create a workbook to consolidate SAP data Remove data from SAP in a floating sheet (many Times), then copies data from the temporary sheet for the workbook. Format the workbook with the extracted data and keep it The macro runs fine, but after it's finished, when I "File -> Save as "or click on" File -> Open "and try to select a folder on any Excel workbooks, which are open to me, to display a folder, the display and the file are not visible Will try, and try to save all Is a message that is a message "already has a file named" xxxxx.xls "in the folder. Do you want to change" I do not understand "that Excel now lets me save or open files Why not allow to select until I close the application. I tested the macro in Excel 2003, and there was no problem. Is this office 2013 bug or something like this? ? I code Tried to remove irrelevant parts, exc

php - How I take value from menu bar using Javascript -

I am very new to javascript, but I want to solve this problem. My code is: Javascript: function win (anchor) {var value = anchor.getAttribute ('value'); Var html = anchor.inner html; Document.write (value); Document.write (html); } HTML: & lt; Ul id = "nav" & gt; & Lt; Li & gt; & Lt; A href = "# 1" onclick = "victory (this)" & gt; Quantitative & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# 2" onclick = "win (this)" & gt; Cause & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# 3" onclick = "victory (this)" & gt; English & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# 4" onclic = "victory (this)" & gt; Common knowledge: & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A hr

python - Using CBV form_invalid() method to update Model object -

I want to update existing object in the model. But I am using form_invalid (self, form) for this. ** views.py ** class SomeClassView (UpdateView): model = some form_class = SomeForm template_name = 'some.html' DEF form_inville (self, form): something.bjects.jet ( ID = Sway Kevar ['PK']). Update (** form.ScaledData) Returns HTTPPRPSPoint Redirect (AutoRequest. POST [Redirect_url ']) ** urls.py ** url (r' ^ Edit / (? P & lt; pk & gt; \ d + ) / $ ', SomeclassView.as_view (), name =' edit '), AttributeError at / edit / 1 / 'some' objects have no attributes 'Update' < Div Class = "post-text" itemprop = "text"> This is because get () returns no query, instead it gives an example of this model. Try to change some.bjects. Gat (id = self.kwargs ['pk']). With update (* * Form.cleaned_data) some.objects.filter (id = self.kwargs ['pk']). Update (** form .cleaned_data

c# - Work with CookieContainer on WP8 -

I want to parse an html page. But when I get authenticated on the server, I can only read this html page but with my current code, it has happened that I am not logged in. Here is my current code: // When I open a button Private zero BtLog_Click (Object Sender, RoutedEventArgs e) {String url = "https://subcard.subway.co.uk/de_cardholder / Servlet / SPLoginServlet "; Stringbirder body = new stringbuilder (); Body.Append ("language =" + "D"); Body.Append ("& amp; user =" + tbUser.text); Body.Append ("& amp; Password =" + pbPassword.Password); Body.Append ("& transIdentType =" + "1"); Body.Append ("& amp; programID =" + "6"); Bool isNetwork = NetworkInterface.GetIsNetworkAvailable (); If (! IsNetwork) {} else {try {WebClient webClient = new WebClient (); WebClient.Headers ["content-type"] = "application / x-www-form-urxed"; // Your app header content-type we

Javascript Syntax Error With Sequence "<%...%>" in Internet Explorer Only -

I define two tokens in javascript that contain arbitrary characters (generated by a server side script) If the token1 sequence and token2 sequence %> , the Internet is meant to be included, the explorer says that there is a syntax error in the line token 1 - but only if each variable has its & lt; Script & gt; is defined in the block. For example, this is OK: xxxxxx ";> but it is invalid: & lt; script Type = "text / javascript"> Var token 1 = "xxxx Var token 2 = " X% "> xxxxxx"; & Lt; / Script & gt; Both methods have been reported as valid markup in Firefox using the HTML validator extension, and errors are not reported in the error console. In addition to this, I have noticed that I solved this problem by encoding the percentage signaling for these digits as \ 045 or \ x25 I can, or if I split the strings before and after the percent sign accordingly: var token 1 = "xxxx

java - KeyListener for multiplayer game with keys being pressed at the same time? -

I am writing a two-player snake game. The arrow keys respond to a snake and the WASD keys answer the other, though I have seen in my code that if one key is pressed at the same time for each snake then only a snake turns up. I have two main listers. Which consists of an array of four keys which should answer it. Class PlayerExpilerListener implies KeyListener {set of currently pressed keys set to personal finals & lt; Integer & gt; buried; Private int event []; Private color C; Private IT; Public PlayerPreviousListener (Int [] A, Color Call, Int I) {Super; Pressed = NewHashet & lt; Integer & gt; (); KeyEvent = a; C = col; This.i = i; } @ Override Press the public volume key (key E) {if pressed content (main event [0]) || pressed ears (key event [1]) || pressed ears (key event [2]) || pressed Pressed (keyEvent [3])) .ed (e.getKeyCode ()); ProccessKey (e.getKeyCode ()); } @ Override Public Wide Key Related (Key Event E) {Pressed. Remove (E. gecakecode ()); } @ Over

performance - Issue in nested for loops : How to speed up nested for loops -

I am trying to combine several values ​​which will be used as parameters in an equation. The problem ism, it is very computationally expensive and hanging machine hanged. When there are only 3-4 parameters, it works fine for the loop and I get results within the proper time. Otherwise, it just freezes! The following is the code, can someone make available in a efficient way to generate a combination of these numbers so that the whole process is fast and I do not wait for days to get results. Update on ANSWER1 based on answers: (just a simple attempt) & gt; & Gt; A1 = 0.1; & Gt; & Gt; B1 = 0.2; & Gt; & Gt; A = a1 + [0: 0.01: 0.04] A = 0.1000 0.1100 0.1200 0.1300 0.1400 & gt; & Gt; B = B1 + [0: 0.01: 0.04] B = 0.2000 0.2100 0.2200 0.2300 0.2400 & gt; & Gt; Aa, BB = ndgird (a, b) Undefined function or variable 'A' Some other questions: (1) What is wrong with the way I did it? (2) 0.04 What does the word mean? (3) How do I sp

c++ - C2440 when assigning `Derived**` to `Base**` -

मान लें कि मेरे पास एक आधार वर्ग और एक व्युत्पन्न वर्ग है: वर्ग बेस {}; श्रेणी प्राप्त: सार्वजनिक बेस {}; मैं मजेदार अब स्पष्ट रूप से व्युत्पन्न को myBase की सामग्री के लिए एक सूचक निर्दिष्ट कर सकता हूँ : शून्य मजेदार (बेस ** myBase) {व्युत्पन्न * myDerived = new derived (); * MyBase = myDerived; } Int _tmain (int argc, _TCHAR * argv []) {base * myBase = NULL; मज़े (& amp; myBase); वापसी 0; } अब, समस्या यह है कि मैं बेस * की एक सरणी को आवंटित करना चाहता हूं (मैं हस्ताक्षर के बाद से तीन-स्टार को मुखौटा करने के लिए टाइप टाइप किए नहीं कर सकता मजेदार का ऑटो-जेनरेट होता है): शून्य मजेदार (बेस *** मेराबेस) {डिलीट ** myDerived = new derived * (); * MyBase = myDerived; } मुझे क्यों C2440 मिलता है: '=': 'डिरिएटेड **' से 'बेस **' में परिवर्तित नहीं किया जा सकता है जबकि व्युत्पन्न * से बेस * बिल्कुल ठीक है? उत्तर में झूठ में बताता है कि क्या वास्तव में सी ++ में एक डास्ट बेस पॉइंटर है निम्नलिखित सरल उदाहरण पर विचार करें:

Linux coreutils timeout Relative or Absolute time? -

I am using coreutils 8.13 and want to use a timeout command to combine it with a dragon subproses. If the system clock is changed during long lasting call, then will the timeout command work? In other words, does the timeout command use absolute timing (affected by changing system clock) or relative time (unused by changing system clock)? EDIT: After some excavation, I have reduced the answer, depending on the behavior of "alarm" in Unistd.h. Still digging through the source ... Please save me < P> Editing 2: Old version of Corrects (& lt; 8.13) uses an alarm (2) from time to time with ITMEEL (> = 8.13) timer_create (2) with CLOCK_REALTIME for timeout Use Post tells me that my implementation is on the system clock Though it should be affected by the recitation, it is not. A simple test using a Python script, while running a loop, shows me that changing the system clock does not affect the timeout ??? CLOCK_REALTIME clock adjustments have no effect on

sql server - Is there an appropriate way to show correlation or causation from a SQL query? -

If there is a way that can provide a function to show correlation or earnings from Microsoft Access or SQL Server SQL, then I Be curious and select the results and its results. This is basically a case scenario: Assume that you have two tables, table student carservehys and table online course review . At the forefront, most of these two tables are unrelated, but the curriculum may be based on name, for example "England 101". studentCourseServveys is a table that captures the data that students submit to their individual course surveys at the end of one semester. For example, in the last days of class students, on the basis of those things, the form is obtained to rate the train such as "the exams were related to the actual lecture material", "the trainer was ready on time" and then the end They have short answer opportunities to give them additional comments in Online Counselio is a table used by the internal department which reviews co

field - html5 - How to show all required invalid inputs after submit the form -

How can I show, perhaps with the red borders , all invalid required fields (including < Code> required = "" ) When I submit the form because by default, being represented one by one. If I understand you correctly, you should only show the first empty field "red" for. You can submit a form to submit a loop of your form items to check that have been filled! $ ("#submit") .click (function () {$ ("item") .each (function) (if ($ (this) .val () = = "") {$ (This) .css ("border: thin solid red");}}};});

javascript - Parsing XML to table with jQuery -

I am using YQL to drag into a remote XML feed, I have to work in all other areas, But can not get it Parsing the data and format in a table is here. The XML looks like this: & lt; String xmlns = "http://tempuri.org/" & gt; & Lt ;? XML version = "1.0" encoding = "UTF-16"? & Gt; & Lt; BTCE & gt; & Lt; TickerList / & gt; & Lt; Ticker & gt; & Lt; Average value = "" /> & Lt; BuyPrice value = "443.95" /> & Lt; Currency Value = "USD" /> & Lt; High Value = "456.96" /> & Lt; Low value = "424.00" /> & Lt; Cellpiece value = "444.27" /> & Lt; Quantity value = "18754.79784877" /> & Lt; Last price value = "443.95" /> & Lt; Time value = "04/28/2014 15:56:54" /> & Lt; / Ticker & gt; & Lt; Ticker & gt; & Lt; Average value = "" /> & Lt; BuyP

java - Color Picker with one single Slider -

Hi I am implementing an Android application, but it's offtopic. I have a slider <... testText.setTextColor (0xff000000) + Progress); But when I am sliding colors, it can be difficult. How do I deliver more harmonic colors to colors? I think flicker is moving along with you as a hex RGB value combined with base 10 value instead of value 1) Before trying text color, try converting your decimal values ​​into hex testText.setTextColor (Integer.valuef (progress, 16)); Instead of just adding it, pass the value to the text color alpha default F. F (opaque) so that you do not worry about it. 2) Ensure that the color of the text has changed to the handler or the asynchronous function. Apps that try to sync your commands can be flickering. 3) Flicker may need to be aligned with alpha values ​​(FF at the beginning of hex) is messing up with lines, just to ensure in your code, just follow it through your code. . 4) Make sure that you are taken repeatedly, wh

php - How to put two regexs together -

I've been stumped I'm getting two regexs that are making me individually important, but I'm not sure That's how they work in combination. \ b ([a-zA-Z])? \ D {5} \ b After finding the correct 5 letters, the wire is finding an alternative single letter pattern. & lt; A \ s + (?: [^ & Gt;] *? \ S +)? Href = "([^" * *] " is matching the URL to an anchor tag. Now that I want to match (for replacement purposes)) 5 digits (Without or without the preceding letter) that is within the URL of an anchor tag. Sample content: This lesson should be 3 matches, 3 inclusive The numbers going to end are not going to end in. Divide the work into two. First, retrieve all href attribute content, use a regular expression for a dome parser such as PHP's docdict, and then to change the specific part. The advantage of this method on a regular expression is that Your markup format changes in the future, even if Shri it breaks. $ html = &

ruby on rails - Can't install gems because "undefined method `invoke_with_build_args' for nil:NilClass" -

I am on a Ruby track and I am in the process of establishing Rail on Ruby. I am trying to install gems but it is not happening and I am not sure why and how to fix it. $ gem install bundler Error loading command: install (LoadError) dlopen /Users/nthulanemakgato/.rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64 - darwin13.0 / openssl.bundle, 9): Library not loaded: / usr / local / opt / openssl / lib / /Users/nthulanemakgato/.rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64 - darwin13.0 / openssl.bundle Reason: libssl.1.0.0.dylib image not found - / users / nthulanemakgato / .rbenv / versions / 2.1.1 / lib / dark red / 2.1.0 / x86_64 -darwin13.0 / openssl.bundle Error: By executing the gem for zero ... (NoMethodError) the undefined method `invoke_with_build_args': NilClass this The solution is one that I have tried: I have opened openssl-1.0.1g I am using Mac 10.9.2 - Ruby 2.1.1p76 (2014-02-24 Revision 45161 ) [X86_64-darwin13.0] rbenv 0.4.0- 97-gfe0b243 It's not like

c# - Dynamic Class To Support User-Defined Database Fields -

I am currently developing a WCF service in C # to serve as the basic API for an existing internal app I am The API I am developing specifically focuses on adding and removing records from the database. However, the app allows end-users to change existing database structure by adding custom fields to each table. This means that a departmental customer table can look like this: Id. First name Last name | City | State | FavColor While other departments' customer table looks like this: Id | First name Last name | City | State | FavFood | FavMovie Which class can I design to support the given user-defined (FAV) field given structure? I have user-defined fields: public class customer {public entry ID (get; set;} public string first name {received; set;} public string LastName {Get; set;} Public string city {receipt; set;} public string state {get; set;} public dictionary & lt; string, string & gt; UserDefinedFields {get; set;}} Is it better to handle t

c# - Read the value of a complex object -

मुझे इस फ़ंक्शन द्वारा एक वस्तु मिली: वस्तु temp = NAOData.memory.getData ( "FaceDetected"); फ्लोट अल्फा = अस्थायी [1] [0] [0] [1]; आउटपुट यहाँ वर्णन किया गया है:। लेकिन मैं डेटा निकालने में असमर्थ हूं। मुझे मिला है "प्रकार वस्तु 'की अभिव्यक्ति के साथ अनुक्रमण [] को लागू नहीं किया जा सकता। कोई भी सुझाव? धन्यवाद। एक ऑब्जेक्ट सभी संदर्भ प्रकारों का आधार प्रकार है। इसकी बुनियादी चीजें ही हैं। getData वस्तु वस्तु से निकलने वाला कुछ देता है (या एक में बॉक्सिंग है) और इसलिए आप एक वस्तु को किसी वस्तु में "डाउनकास्ट" कर सकते हैं और संकलक को यह नहीं पता है कि आपके नए ऑब्जेक्ट पर एक इंडेक्सर है। इसे आज़माएं: var temp = NAOData.memory.getData ("फेसडेटेक्टेड"); फ्लोट अल्फा = अस्थायी [1] [0] [0] [1];

java - How to return to code after I'm done with JavaFX scene -

मैं अपने JavaFX दृश्य को लॉन्च कर रहा हूँ: Applicaiton.launch (Main.class); < मेरे जावा कोड को फ़ॉर्मेट करें। मेरे द्वारा जावाएफ़एक्स के साथ काम करने के बाद अपने कोड पर वापस कैसे जाना है उदाहरण: सार्वजनिक स्ट्रिंग विधि () {Stirng s = "MyName"; Application.launch (Main.class); // यहाँ मैं JavaFX दृश्य s.trim (); // कैसे इस दृश्य के साथ कर रहा हूँ के बाद यहाँ वापस आने के लिए। } यह उस तरह से काम करने वाला नहीं है। आप javafx.application.Application को बढ़ाकर शुरू करते हैं, तो प्रविष्टि बिंदु प्रारंभ (स्टेज) है, जिस पर आपको ओवरराइड करना होगा। यह विधि वह जगह है जहां आपको अपने चरण के लिए दृश्य सेट अप करना होगा, नोड (बटन, लेआउट मैनेजर, पाठ फ़ील्ड, चेकबॉक्स) के साथ लेआउट का निर्माण करें। और ईवेंट हैंडलर्स को पंजीकृत करें आप getParameters () के साथ स्टार्टअप पैरामीटर एक्सेस कर सकते हैं। एप्लिकेशन को सामान्य मुख्य () प्रदान करके लॉन्च किया जा सकता है जो कॉल launches ( ) , JavaFX की सुविधा है तो न्यूनतम जावाएफ़एक्स एप्लीकेशन ऐसा दिखता है: सार्वजन

pip - Solving install issues with Python 3.4 on Windows -

Image
I recently tried to install Python 3.4 as an alternative installation on my system, which attempts to familiarize myself before migrating the code. My main Python installation is 2.7.6. I tried the 64 bit installer for Windows, but it came with an error message There is a problem with this Windows form of the installer package setup Was not expected to run a program in contact with your support personnel or package vendor. After that, the install has been rolled back (from the point shown below): I finally found a solution to this post posted below and decided to do so with someone else's issue. After some online viewing, I came to know that this problem was related to the disputed PIP installations. A version is already installed for Python 2.7 and is apparently not compatible with this version, which is with Python 3.4. To solve this problem, I just installed the following installation Out of the options - move forward smoothly:

python - Regex match JNDI name as long as line isn't commented out -

I am trying to scan java files and drag jndi names using regex. I have a string match that works as follows: ((?? Lt; =) "java: / jms /. + (? = \")) But I want to exclude the commented lines - i.e. line matching: ^ * // However, I do not think so @activationConfigProperty (propertyName = "destination", propertyValue = "java: / jms"> For example, from the following lines: / qi-good "), // @activationconfig property (propertyName =" destination ", propertyValue =" java: / jms / que-bad "), let me return New: java: / Jms / queue-good I'm doing this from a Python script.

php - WordPress child theme for admin only (development) -

I want to see a child theme only for me, administration, for development purposes. Then I can change those changes, who can see and see them without other people seeing those unfinished changes. Once I'm done, I take affected files and take them to the original theme's folder to make visible changes for everyone. Is it possible with some type of script through functions.php? And I'm not just talking about enqueuing the style.css file, I have the sidebar I am talking about setting up a full child theme with php, header.php etc. and only loading child theme files for it. For the purposes of development, the administrator should probably define the child theme directory. One way is embedded in a situation that is a user administrator or not. thanks :) is a plugin that is called to you. I have not used it before but I think this log-in user uses some filters to update the theme at runtime for users. Basically, you install your new theme and activate it using th

jQuery How to auto sync groups of radio buttons -

मेरे पास निम्न वेब फ़ॉर्म मार्कअप है: & lt; इनपुट प्रकार = "रेडियो" मान = "1" नाम = "विकल्प [1]" वर्ग = "एबीसी" & gt; & Lt; इनपुट प्रकार = "रेडियो" मान = "2" नाम = "विकल्प [1]" वर्ग = "डीईएफ" & gt; & Lt; इनपुट प्रकार = "रेडियो" मान = "3" नाम = "विकल्प [1]" वर्ग = "घ" & gt; & Lt; इनपुट प्रकार = "रेडियो" मान = "1" नाम = "विकल्प [2]" वर्ग = "एबीसी" & gt; & Lt; इनपुट प्रकार = "रेडियो" मान = "2" नाम = "विकल्प [2]" वर्ग = "डीईएफ" & gt; & Lt; इनपुट प्रकार = "रेडियो" मान = "3" नाम = "विकल्प [2]" वर्ग = "घ" & gt; & Lt; इनपुट प्रकार = "रेडियो" मान = "1" नाम = "विकल्प [3]" वर्ग = "एबीसी" & gt; & Lt; इनपुट प्रकार = "रेडियो" मान = "2" नाम

angularjs - Setting custom "view" text with select while maintaining the ability to set an object to ng-model -

With select , if you enter an NG model with a value, it will be displayed That selected option I have such an object: start date: {views: "April 2014", month: 03, year: 2014} To select dates, with another object like this: Initial: [[View: April - 2014 year: 2014 month: 3}, { View: May - 2014 Year: 2014 Month: 4}, {View: June - 2014 Year: 2014 Month: 5}, {View: July - 2014 Year: 2014 Month: 6} , {View: August - 2014 year: 2014 month: 7}, {View: SEP - 2014 year: 2014 month: 8}] I have a statement that looks like this Is: & lt; Ng- options = "date" date = "date_view =" start-date "ng-change =" millstust (date) "as date.view for date. & Lt; / Select & gt; I should have a display startdate.view but still allow to populate ng-model = "start date" The object is selected. I hope this is not a misleading question. Any help would be great. You can find different options. Try to use: & gt

Extract lines from a file in bash -

I have such a file I would like to extract with line 0 and 1 (file All the rows in) though in a separate file, the sequence does not start with 0, but it can also start with 1. However, the line always comes straight after the line (site). Besides, I would like to extract the CITTE line in a different file. Does anyone tell me how is this possible? In addition, I want to remove CITET line in a separate file This is a simple part: grep '^ SITE:' infile & gt; Outfile.site is a little harder: remove after line: grep --after-context = 1 '^ Site: 'Infail' | Grep '^ [01] * $' \ & gt; Outfile.nr - The context after (or -A ) specifies that followed by In addition to printing the match line, we again use the second grep to print that line, and in fact the matching line (and not the delimiter grep Each <-context ) Alternatively, you can use the following to match the numerical rows: grep '^ [01] * $' infil

windows - How to get output and give input from/to batch file using java -

How can I get output from a batch file, but input the batch file as well? My question is self-explanatory. As I created a small code to run a batch file: process process = runtime.gettime (). Exec ("(My file)"); . But what will happen now? You can get input and output streams from the process by using the respective recipient methods. / P> Edit: getInputStream () and getOutputStream ()

Use values from Google Sheet to populate Google Form -

I am trying to create a form to help manage tasks. I want to be able to get value values ​​already in the spreadsheet, and I want to use spreadsheets to add or manipulate the values ​​that appear in Google Form. For example, a list of work will look like this: | Assignment Due date Appoint | ------------------------------------------ | Take the trash. Tuesday | JonMitten | | Wash dishes. Monday | Baby Beer | | Underwear Auth Tuesday | Not assigned. With an irreversible value "Assignment" and "due date" but where the form user can delegate the job to him or herself. I want to be Is this possible? HTML

Converting all CSS measurements to EM -

There is a positive information about changing typography to EM units, but there is a good practice to change everything in EMS, in it Includes: padding, margin height etc? EMS are for general types only, and for media query breakpoints (I have everything in EMS For all sorts of shapes went through a phase, and now look at that stage as a strange hesitation on the learning curve.) But note that there can be references in padding in examples It should be in EMS, such as to generate spaces after paragraph I often use it for: p {padding: 0 0em} , but again it makes sense because this font -Size is inappropriate. The convenience of using EMS for responsive design is that you can be on the one side while sitting in the font size that you can easily cascade all kinds of elements, such as you type -Composition and size in EMS, e.g. Mobile-first: @ Media (minimum-width: 37.5em {{body} (font size: 1.1em;}} @ media (minimum-width: 75m {{body {font Cascading behavior can some

html - Background slider is distorted on mobile. (WordPress) -

Image
I am a full page slider for the background of my site, it works great on the desktop. However, when I switch to a mobile device, the picture becomes very distorted and there is a black difference on the left side of the page which is not quite good. Look at the attached photo for a scene or drag it to your phone, url Is there any way to resolve this with some CSS? (Edit) CSS as requested: #supersized {display: block; Status: Sure! Important; Background size: Cover! Important; Left: 0; Top: 0; Hidden flurry; Z-index: -999; Height: 100%; Width: 100%; } Physical Background Image CSS: body {background-image: url (http://plunderfest.muvltd.com/wp-content/uploads /2014/04/starry4.jpg)! Important; Repeat Background: Repeat Any! Important; Back-to-back attachment: Sure! Important; Background-Size: 100%! Important; Width: 100%! Important; Height: 100%! Important; } Only the maximum width of 767px CSS: @ Media (max-width: 767px) {.hidden-desktop {display: inherit! Ess

Using HTML variables in JavaScript -

इस सवाल का पहले से ही एक उत्तर है: < / P> 17 उत्तरों मैं HTML पर बहुत नया हूँ / सीएसएस / जावास्क्रिप्ट, और मैं सोच रहा था कि मैं एक वैरिएबल का उपयोग कैसे करूँगा जिसे मैंने एचटीएमएल में घोषित किया है, और इसके साथ जावास्क्रिप्ट में कुछ करें नीचे दिए गए कोड में, मैंने एक चयन बॉक्स बनाया है, और मैं "if (...) की चेतावनी (" ")" की पंक्तियों के साथ कुछ का उपयोग करके एक संदेश आउटपुट करना चाहता हूं "। मैं के बराबर कैसे करूँगा (मूल्य == "क्रोम") {चेतावनी ("आप क्रोम का उपयोग कर रहे हैं");} " मान "HTML में है, लेकिन तुलना जेएस में किया जाएगा। यहां कोड है: & lt;! DOCTYPE html & gt; & LT; html & gt; & Lt; head lang = "en" & gt; & Lt; मेटा वर्णसेट = "यूटीएफ -8" & gt; & Lt; title & gt; हैलो, इंटरनेट! & Lt; / title & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; h1 & gt; & Lt; p & gt; Webstorm & lt; / p & gt; &

javascript - Extjs 5 - How to add routes on init -

I have some routes in my App.controller that I like to extend on init (I get root from server ). What is the method or function to add to the routes? I am looking for something like this this.application.addRoute ({path: 'new page', verb: 'show-new page'} ); Let me say that I have this setup below to clarify my questions: Ext.define ('APP.controller.AppController' , {Extension: 'Ext' app controller ', nickname:' apparatus', config: {route: {'page': {verb: 'show page'}}, init: function () {// how to add new route For this controller's root? This.addRoute ({route: 'new page', action: 'shownowpages'}), show page: function () {}, show new page: function () { }}); is a setRoutes () method :) Ext.define ('APP.controller.AppController', {extension: 'Ext.app.Controller', nickname: 'APPATOR', CONFIG: {LINE: {'PAGE': {action: 'showPage'}} (Action: 'show

android - What is the difference between ViewPropertyAnimator's translateYBy() vs yBy() methods? -

View-property animators () have two types of methods for transferring views: TranslateX () vs. x (), translate y (), y (), translate xbin () versus xbin () and finally translate YBy () vs yBy () Can you tell the difference between the methods? The answer given above is not correct. The document states that X and y properties are full positions, while translationX and translationY Are referred to LEFT and TOP assets respectively. Then, animated (). Difference between X () and Animate () ) is that it is animated for a full price, while the other animated is still at full price, but is set based on LEFT and TOP values . On the contrary, Chetan (). XBy () and Animate (). Translation XBy () Increase in property value from specified amount (algebraic). This is the quote of "some math" above.

How can I dump all a Go process's stacks? -

A go process is in progress By adding anything to its source code without adding < / Li> Dump a stack trace for every goritanine from the outside without killing it. How can I do this? It should be easy - the facility was requested: and, according to the findings of that formula, it was implemented. It was two years ago. But neither the issue thread nor any sign of how to implement this feature. The feature request mentions that SIGQUIT invokes this feature on JVM, but it is not; At least 1/2, SIGQUIT # 1 and # 2 does, but it also kills the process. Someone asked a related question one time ago: But he did not explicitly ask for # 2 or # 3, no one in the answer does not meet # 2, and he accepted the answer Which does not meet # 2, then this is a different question. If you are using pure / http, then you can login through goroutines debug Handler If you see the following source You will see the profile, goroutineProfile , on line 62. The profile writi

Getting ZooKeeper server version via Java API -

I know that some Apache curator dishes do not work with earlier versions of ZookPayer, this is not an issue, except that I keep developers in my company, I tried to write some code and it fails due to any error or log message because an old version of their local machine is running. That's why I want to revoke ZuckiePair server version, which I'm connected to and die with a useful error message if the version is too old. However, I can not find any way to get the version number of the server with either the curator or the Zuckeeper API. Does anyone know how to do this? "four letter words" can help you connect to a local ZK example at Port 2181 And a "srvr" can execute four letter words. You will get lines of information back, one of which is the version. How to obtain this program: For a sample, take a look at the four letterword classes of Exhibit.