Posts

Showing posts from March, 2010

ios app layout on device is not the same as on the Xcode simulator -

I am using Xcode 6. I am developing a universal app. When I had adjusted the main screen layout due to lack of settings in the device portrait or landscape. The problem is that the buttons adjust the IOS simulator properly, but when I test on the iPhone 5S, the scenario screen can not change its layout and buttons appear outside the screen. That is equal to layout in portrait mode. I was playing with obstacles for a few days and could not understand why he was not doing the job. I'm reaching Apple about how to deal with it. I advanced in XCode 6 in the afternoon, and I'm experiencing the same thing. I installed XCode 5.1.1 on my machine, cleared my project and run both simulator and on my device. Everything runs as expected. In my case, custom collection view cells are loaded into the UI collection view. Inside the nib file, I have set leading, trailing, up and down constraints so that the object fills its supervision. My device is running iOS 7. Those obstacles ...

clojure - How do I use core.match in Clojurescript with goog.events.KeyCodes? -

(Edit mode-mode? [] "A hardcode (for moment) value will appear in DB later Goog.events.KeyCodes.Down (def LEFT 37) ;; Goog.events.KeyCodes.LEFT (def Write 39);; false; ; Goog.events.KeyCodes.RIGHT (def W 87) ;; Goog.events.KeyCodes.W (def S 83) ;; Goog.events.KeyCodes.S (def one 65) ;; Goog.events.KeyCodes.A (Def D68) ;; Goog.events.KeyCodes.D (def E69) ;; Goog.events.KeyCodes.E (def ESC 27) ;; Goog.events.KeyCodes.ESC (defan delta [e] ;; E A Google Closure Event (js / console.log (.-KeyCode e)) (js / console.log (editing-mode?)) (Match [[edit-mode?] (.- KeyCode e)] [false 38 ] [: Slide: top] [false 40] [: slide : [False] left: [false 37] [: false [left]] [false 39] [: slide [wrong] [false [87] [: slide: top] [false 83] [: slide: bottom] [false 65] [: Slide: left] [false 68] [: slide: right] [false 69] [: starting-therapy] [true 27] [: done-editing]: else zero)) The code above works, however, if I try to be a bit less and straighten the use of gog keycode, then ([edit-m...

sql - Raise Application Error in Trigger and still update table -

I am facing some problem, when the customer does not pay in 60 days, the trigger will update the customer table and Still get error-20003. What do I know that the update function will be canceled when the exception exception is made? Is there no way to do this? Description of each line; cust_ID BILL.custID% Create or replace traggers before reading for TYPE; Posted_bind BILL.sentDate% TYPE; Pay_date billingpayment date% type; Bad_StatusCustomer.badStatus% TYPE; First_name Clients First name% TYPE; Last_name CUSTOMER.lastName% TYPE; NRIC- Any customer RIC% type; PRAT_ID CUSTOMER.pRateID% TYPE; No_new_reading exceptions; Select cursor cust_cursor b.custID, b.sentDate, b.paymentDate, c.badStatus, c.firstName, c.lastName, c.NRIC, c.pRateID to bill b, customer c, read WHERE (sysdate - SentDate) & gt; 20 and the period of payment b.readingID for the update of zero and B.code = C custid and r.readingID = c.badStatus; BEGIN open cust_cursor; Loop Fetch cust_cursor in cust_ID, se...

sql server - SQL Syntax on DISTINCT Query -

I have an employee table with their department code. I want a list of different departments and their first Created date It will also show that the first time the employee was enrolled for a particular department in the employee table. I used: choose interoperato, created from the employee The date return incorrect is incorrect. A specific syntax to control this problem.

javascript - jQuery wrap only around string -

I'm working on some jQuery code to start In & lt; Block & gt; & Lt; X & gt; Citation & lt; / X & gt; & Lt; Cite & gt; Author & lt; / Cite & gt; & Lt; / Blockquote & gt; So far, I'm trying to loop through each block quote, by separating the element, using the jQueries wrapInner function to wrap the remaining string in the element, then the element Add again. Edit: The ultimate goal is to do something like this. In addition to using jQuery to automate the appointment of .bqstart; .bqend I'm new to javascript jQuery, though I have experience in many other coding languages, so I'm not sure how to implement it and if it is to get me to meet it correctly is . Hey, I'm not even sure the title of this question is justified. Some guidance would be greatly appreciated: P EDIT2: For anyone in the future, or anyone curious, here's the code that I have ended You can check the node type to childNode...

android - Google play services (Leaderboards) with AndEngine -

"itemprop =" text "> I am trying to integrate Play Services into my AndEngine game to Google. Everything is working perfectly and my leaderboard gets up, but my problem is when I return to the game when I go back to my game from leaderboard, again the resume is called my default when onResume is called my game The crash doesen't give this error: E / Adreno200-ES20: & lt; Qgl2DrvAPI_glUseProgram: 1319 & gt;: GL_INVALID_VALUE and the screen turns black as I described here: classes have stuffed here: and here: Overriding read about OnBackPressed, but I know I have to call startActivityForResult (intent, string) how can I apply this - where the intention is compliance called by Google though I have read in the Android API that onActivityResult (int Requestcode, inc. Result, code, intent data ) On exit from leaderboard activity, my returned values ​​are: I / requestCode: 1337 I / resultCode: 0 I / Intent: Null When these are clearly incorrect...

r - How can I create a reduced data frame which sums a numeric variable based on another variable? -

एक उदाहरण के रूप में यदि मेरे पास तालिका है: ID X वर्ष 1 2.5 1990 2 3.5 1991 3 4.0 1990 4 4.5 1991 मैं एक नया कम तालिका कैसे बना सकता हूं जो साल के आधार पर एक्स की गणना करता है वर्ष X 1990 6.5 1991 8.0 धन्यवाद! इस प्रकार के कार्य के लिए data.table का उपयोग करें : चरण 2: डेटा सृजन df & lt; - data.frame (x = ((5: 9) / 2) [- 2], वर्ष = प्रतिनिधि ( 1 99 0: 1991,2)) चरण 1: data.tfr को data.table में कनवर्ट करें: लाइब्रेरी (डेटा योग्य) setDT (df) चरण 2: साल के योग को पूरा करें: df [, sum (x), द्वारा = वर्ष] अधिक जानकारी के लिए डेटा के बारे में पढ़ें योग्य उनके पास व्यापक दस्तावेज हैं।

ruby on rails - Better, non numerical and non sequencial ids for ActiveRecord -

I use ActiveRecord in my Rail 4.1.1 application and I keep the objects in the database but I actually I do not like the IDs assigned to my objects (1, 2, 3, and so on) I want these IDs to be non-integer and non-sequential, such as mongoide gem. How can I do this? I assume that you want this change because you do not like how id The URL is coming ... http://my_application.com/posts/3.html There is no other reason to change the ID. .. They do things that they want and they are internal to the app (except for the above situation). The technique you can think of is using the "slug" Create an attribute in your model called Slug , which will be used by your model " Title "or" name ", but in a URL-friendly format ... make it an earlier action ... class post ActiveRecord :: before bbs_service: create_slug def create_slug #strip string slug = title. Streft # Blowlo Apostrops slug.gsub! / ['`] /," "# @ - & gt; On, and ...

java - Retrieving data from a map when using a SwingWorker -

I have a class that creates a GUI and there is an item with listener JComboBox I create a worker at an ItemEvent.Selected event and try to read data in a map, but the content is always empty. My guess is that this is happening due to the thread being executed and leaving ItemListener before the thread is complete. I have added my related pieces and hope that you can help me decide where the problem is. Private Zero Update UI (String Text) {StringUtilities.invokeLater (New Runnabel) {@Override Public Zero Run ({{.append (text + "\ n");}}} Private class ComboBoxListener ItemListener Expanded {@Override Public Zero Item StateChange (ItemEvent E) {if (e.getStateChange () == ItemEvent.DESELECTED) {return;} if (e .getStateChange () == ItemEvent.SELECTED) {// do stuff Map & Lt; string, string & gt; map = new hashmap & lt; string, string & gt; new) MyWorker (var1, var2) {@Override public update UI (string text) {UpdateMainUI (text);} @ Override public up...

android - onCreateLoader() only called one time -

I have a piece that increases ListFragment and implements LoaderManager.LoaderCallbacks. Inside this piece I have a button that should call the website and fill the list. The problem is this method which is called only once, only when the piece is made, and I will be called every time that I press the button: @overराइड Public loader & lt; List & lt; ResultSearchUser & gt; & Gt; OnCreateLoader (int arg0, bundle arg1) {new search options Task back (getActivity (), page, size); } This is my button: @ Override public view creatives (LayoutEfter Influator, View Group Container, Bundle Saved InstantState) {... Button ButtonSchurch == (button) Amliner layout. FindVibIID (R.Button SQLSUsers); Button SearchUsers.setOnClickListener (New View.OnClickListener () {@Override Click Public Zero (see V) {if (user.getInterests)! = Null & user.getInterests (). Size ()> 0) {Page ++; GetLoaderManager (). InitLoader (0, blank, SearchFragment.this);}}}); .... Why is t...

c# - Paint DataGridView ColumnHeader with it's default gradient styles -

Image
I have DataGridView setup similar to the left. I have some columns that are used to show images / errors. It works fine, my problem is that I really do not like the split of each section of those columns. Ideally I want to paint the column headers as if they are a column header, so it looks just like the one on the right. Is not it a way to use some internal datagrid visual rendering methods, not know? I tried to see this To see that this is actually a column header painting, but I can not find anything, the datagrid reflects the visual code. I thought what I was doing and could be able to expand the boundaries of the cell to cover each of the first four columns. Summary: What do I have: What do I need: Override and paint the event> code> randex for cellpinning to -1, as you wish. Alternatively, you can create a new class that comes from the DataGridViewColumnHeaderCell and overrides the color scheme for it, but there are some other steps (w...

c++ - CodeLite - Console runs but code is not working -

Image
I have just installed CodeLite 6.0 in two of my PCs, although I get the same problem in these two computers: I I am able to create and run the project, but when I see that the console starts: This is my code: #include & lt; Stdio.h & gt; Int main (int argc, char ** argv) {printf ("hello world"); Return 0; } And if I try to add some crazy instructions that are not actually present, then the console will still not appear with errors and the project will not even be created with any errors I for example, using the following code: #include & lt; Stdio.h & gt; Int main (int argc, char ** argv) {printf ("hello world"); Notrealcode & lt; & Lt; "Oh"; Return 0; } and cout & lt; & Lt; "Hello World" is not working either. I'm sure you have not installed a compiler, knowing the way to select and add compiler Check out this tutorial for:

twitter bootstrap - installation difficulties for BraincraftedBootstrapBundle on Symfony 2.5.2 -

I have Symfony 2.5.2 which is running inside a site on Apache at Ubuntu 14.04. I'm trying to use the BrainCradebootStepBundle to add bootstrap to the site. I have tried to follow the instructions, but I did not get success. I was initially trying to use the SaaS compiler (my preference). However, with this configuration: Acetic: debug: "% kernel.debug%" use_controller: wrong bundles: [java]: / usr / bin / java filter: cssrewrite: ~ sass : Bin: / usr / local / bin / sass apply_to: "\ .scss $" # stop: # jar: "% kernel.root_dir% / resources / java / compiler.jar" #yui_css: # jar: "% kernel. Root_dir% / Resources / java / yuicompressor-2.4.7.jar "short: node: / usr / sbin / node node_path: [/ usr / local / bin / node_modules] apply_to:" \ .less $ "braincrafted_bootstrap: less_filter: sass When I run an app / console helper: dump: [symphony \ component \ config \ definition \ exception \ invalidConfigurationException] for ...

javascript - Replace comma with period jQuery -

इस सवाल का पहले से ही एक उत्तर है: 5 जवाब मुझे कॉमा को बदलने की ज़रूरत है मुझे पता नहीं है कि मेरे कोड में क्या गलत है। मैंने कंसोल की जांच की, लेकिन कुछ भी नहीं ... $ ('# stats li')। प्रत्येक (फ़ंक्शन () {$ (this) .text ()। Replace (/, / g , '।');}); इस कोड को प्रत्येक & lt; li & gt; में & lt; ul id = "stats" & gt; लक्ष्य करना चाहिए। फिर इसे प्रत्येक , को प्रत्येक और में बदल देना चाहिए और उसे से प्रतिस्थापित करना होगा। मैंने यह भी कोशिश की : ( $ ('# stats li')। (कॉमा, '।');}}) की जगह; और मैंने इसे करने की कोशिश की: $ ('# stats li')। प्रत्येक (फ़ंक्शन () {var stats = []; statistics.push ($ (This) .text ()); stats.replace (/, / g, '।'); Console.log (आँकड़े);}); यहाँ है। समस्या यह है कि विधि एक नया स्ट्रिंग देता है यह जगह में स्ट्रिंग को संशोधित नहीं करता है इसके बजाय कोशिश करें: $ ('# stats li')। प्रत्येक (फ़ंक्शन () {$ (this) .text ($ (this) .text ...

multithreading - Open a directory dialog using python -

I am trying to create a simple file dialog for the use of local server (preferably system one) I can not use the tanker because it is run in a sub process and the dialog box will not be open in a sub-process on the Mac. I can not use a thread because it will eventually lock. Is there a way to open the system file without using the tanker? This first file is a self-contained job. I want the version of behavior (at the very end to ignore any kind of error) Import talk forms of import threading In tkFileDialog import askdirectory def createDialog (communicationQueue): Diameter = Dialog (CommunicationQE) Diameter. Show () class dialog (): def __init__ (self, communicationQueue): self.communicationQueue = communicationQueue self.root = tk.Tk () self.root.overrideredirect (True) self.root.geometry ("0x0 +% d + Print 'root' print 'root' created by self.root.update () self.root.deiconify () print 'directory' (0, 0))% '(0, 0) ask' directory ...

html - Positioning footer logo -

So I want to add a logo to the footer. It needs to be right apart from the text on the left side. & lt; Div class = "siteFooterBar" & gt; & Lt; Div class = "content" & gt; & Lt; Img src = "http://i.imgur.com/nuRmQJX.png" width = "70px" height = "70px" align = "left" & gt; & Lt; Div square = "foot" & gt; 2014 © All rights reserved. & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; Both use margin-left / margin-right because the length of the different resolutions is definitely Will be different. This is what I want to achieve. What is the best way in this direction? If I have margin-left / margin-right ? What if practicable div class = "post-text" itemprop = "text"> aligned Do = "left" image as follows: & lt; Div class = "siteFooterBar" & gt; & Lt; Div class = "content...

google app engine - Trying to access another closure's property from a Gradle test task -

First of all, my actual goal is to inform my functional tests on which Port Gradle will start my development server (if you're interested again), the easiest way to do this is to establish a system property What am I trying to do: epenin {httpPort = 8081 ...} test {systemProperty "httpPort", appengine.httpPort} I'm still very new to gradeal and maybe my g V Scoping knows the rules well, but it should be possible to do something, right? I've seen using "global def " to talk about this type, but it seems that there is a more elegant solution for this particular case. Ah, here's the trick: I especially wanted to pass system properties in my functional tests . For some reason I was still the right place for that place, and that appenagine functional test would be the successor to that, but it is not so. Once I close my test EpgenineFunctional Test Specifically, Grad Dot was able to connect. I'm still a little secret with the scoping...

osx - Socket Server Example with Swift -

I tried to make an example of simple socket server. Build and run successfully though it does not work well. The client could not connect to this server. How to solve this problem? I need your help, thank you Import the Foundation to BUFF_SIZE = 1024 function antstread & lt; S & gt; () - & gt; S {let struct_pointer = unsafePointer & lt; S & gt; .alloc (1) let struct_memory = struct_pointer.memory struct_pointer.destroy () return struct_memory} func sockaddr_cast (p: ConstUnsafePointer & lt; sockaddr_in & gt;) - & gt; UnsafePointer & LT; Sockaddr & gt; {Return unsecured pointer & lt; Socadr & gt; (P)} Faken Socon_t_cast (page: insecure pointer & lt; int & gt;) - & gt; UnsafePointer & LT; Socklen_t & gt; {Return UnsafePointer & lt; Socklen_t & gt; (P)} var server_socket: Int32 var client_socket: int32 var server_addr_size: int var client_addr_size: int var server_addr: sockaddr_in = initStruct () var...

c++ - How to check if any 2d point in boost r-tree is in a given triangle? -

How to check if any 2d point in the rectangle is in a given rectangle? This is the website I wanted to know about. But how am I confused that the R-tree in any point is within a given rectangle or not? The C ++ code will be commendable. R-trees only work on rectangle . If you are collecting non-rectangular data in an R-tree, then it will only provide you candidates which you check again Requires ("Verify", "Extended", "Refine") and more detail. The idea of ​​the entire R-tree is as simple (efficiently handling and managing) of almost a bounding box. The boost library may provide some helpful functionality for this. , But probably outside the RTD package, in the geometric packages itself.

php - Searching for an entry in a MYSQL table -

I have a MYSQL table called to the members with 2 columns: Name John Sam allows me to create a PHP query which allows me to select the users who like a specific college (such as "$ college). I have written this code But this is not working (I'm new to PHP, this is the first line of code I'm writing). Can I help with correcting it? college = 'yale'; $ result = "Select members where $ college IN 'colleges_i_like'"; $ college = 'Yale'

java - list add error without activity in android -

Image
When the code is run without extended activity and returns the error by calling the method: Public class RequestActivity {// Extends activity {// Create protected at zero (Android bundle saved instenestate) {// super. Casket (alert instant state); // HTTP client is creating HTTP client httpClient = new DefaultHttpClient (); // HTTP Post HttpPost httpPost = New HttpPost ("http://www.example.com/login"); // Building Post Parameters / / Key and Price Couple List & lt; NameValuePair & gt; NameValuePair = New ArrayList & lt; NameValuePair & gt; (2); // The following errors in the following 2 lines: / ======== Errors: ================= // Many markers on this line // - Syntax Error Token "Add", = expected after this token - Syntax error on / token, incorrect creation (names) Name ValpPair.add (New BasicNameValuePair ("email", "user@gmail.com")); NameValuePair.add (New BasicNameValuePair ("Message", "Hi, Android! HT...

firefox - Allow specific local javascript -

I am using pinboard for all my bookmark storage, and they have a little javascript Provide bookmarks, found in my Firefox toolbar, beautify code: javascript: q = location.href; If (document.getSelection) {d = document.getSelection (); } And {d = ''; }; P = document.title; Zero (open ('https://pinboard.in/add?showtags=yes&url=' + encodeurIComponent (q) + 'and Description =' + Encodericonant (D) + '& amp; title =' + encodeurIComponent (P ), 'Pinboard', 'toolbar = no, scrollbar = yes, width = 750, height = 700')); which works wonders for all http sites, but when I try to bookmark HTTPS sites, I get it in the console: Content security policy: The page's settings blocked the loading of the resource: An attempt to execute inline scripts has been blocked. I am not sure if the SE site is right for this, but I am wondering how can I allow that particular script to be executed everywhere. If I copy javascript to the addr...

http - Frontend-backend communication for a mobile app -

I am a lot new to the stuff related to server and backend services and I have to develop a mobile app with a backend part Want to I want this backend to serve an iOS app, an Android app as well as a website. Today I have worries about how the frontend part communicates with the backend part: Does this work the website in a way? Which is the general solution to my problem? Li> Is this an effective way to serve mobile websites along with mobile websites to this backend? Is Pars () a good starting point? Thanks Looking at your questions in return: Does this work only a website works? (HTTP request for server?) There are several options, but perhaps the most common, or fashionable, is to use an interface at the moment: First, a SOAP Web based web service may be the most common option: Here are some discussions on why you can still use instead of SOAP: How does the dataset exchange between the frontend and the backend? HTTPS is used to transport message...

javascript - Loading backbone js view iframe inside jquery ui dialog -

I am creating a view for the iframe of my report. & lt; Div id = "aDialog" & gt; & Lt; / Div & gt; Define ReportView : here (["jquery", "underscore", "backbone",], function ($, _, Backbone) {var reportview = backbone view.extension ({L: "#Jangfram", Start: Function () {this. $ El.html ('& lt; iframe src = "http: / / Ipadressofreportserver / jasper / blahblah "& gt; & lt; / iframe & gt; ');}, render: function () {}}); return report detail;}); Then I have another view which can allow the user to print the above iframe, here is the main sequence verb: 'printingReportIcon': Function () {var page = "http: // localhost / source / # reportview"; Var $ dialog = $ ('# aDialog') .load (page) .dialog ({autoOpen: incorrect, model: true, height: 625, width: 500, title: "some title"}); $ Dialog.dialog ('open'); The problem The dialog...

detection - how to detect bug on iOS8_beta4 webgl vertex shander sampler2d -

On iOS Beta 4, iPad 2, I have checked some whether the device supports GPU particle simulation. gl.getParameter (gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS) & gt; = 1 !! Gl.getExtension ('OES_texture_float') They both say yes, but do not really work. .. I know how this kind of bug will be detected ... so that I can come back to other things ... webgl preview and src: Screenshots: I use it to detect iOS 8 Beta 4 and earlier ... Is there a better way to detect and fallback? if (navigator.usager.match (/ (ipod | iphone | ipad) /)) {var usrA = navigator.userAgent; Var info = usrA.match (/ (Opera | Chrome | Safari | Firefox | MSI | Trident (? = \ /)) \ /? * * (\ D +) / i) || []; If (pageflat (notice [2], 10) & lt; = 9537) {check.gpuSim = false; }} to read thx> v Check for user agent to do anything in HTML / Javascript Its being done. The correct way of his case is whether you make a floating point texture (something that is usually needed for part...

html - Wordpress Walker class for wp_list_pages -

I am using wp_list_pages to create navigating pages in my site. In a few pages, I need a dropdown menu in the nav to show hair pages. I am using Bootstrap to create dropdown menus. Class me to use the bootstrap I think the best way to add these classes is using the custom walker class. How do I write this custom class? Add the sections I need. Output HTML & lt; Ul class = "" & gt; & Lt; Li class = "page_item page-item-6-current_page_item" & gt; & Lt; A href = "/" & gt; Home & lt; / A & gt; & Lt; / Li & gt; & Lt; Li class = "page_item page-item-6-current_page_item" & gt; & Lt; A href = "/" & gt; Profile & lt; / A & gt; & Lt; / Li & gt; & Lt; Li class = "page_item page-item-8page_item_html_school" & gt; & Lt; A href = "" & gt; Products & amp; # 038; Service & lt; / A & gt; & Lt; Ul class = 'chi...

linux - how to replce empty lines with text using sed -

How can the blank rows change with text using SAL? I tried some tricks of the previous post but it does not work, can some body help me with this? Example file content - Linux is an OS. Linux's opensource has different flavors like Firdado, Census etc. in Linux. I want to change these blank lines with text like Hello. Just match the start-line, if you just want the empty lines, then just the interval sed -e's / ^ $ / hello / g ' If you also want to match lines with spaces, > sed -e 's / ^ \ s * $ / hello / g'

java - Selenium - trapped in an iframe -

I am trying to navigate to the original frame of a frame with tinimax that I have navigated: driver.switchTo () frame (1); I have tried to use the driver switchTo (). DefaultContent (); To navigate parents back, but it is not working, it is not throwing any errors, it refuses to recognize any web element which I know is on the parent page. WebDriver I navigated into the frame of tinimax. final list & lt; WebElement & gt; Iframes = driver.findElements (.tagName ("iframe")); Println (iframes); // Console: [] (An empty list) Before this code, and for navigation, post: driver.findElement (by. Xpath ("// * [initial (@ id, 'ask_answer_link')]")). Click (); Thread.Sleep (5000); . Driver.switchTo () frame (1); Web Element i = Driver.Fid Element (By CCSSilec ("#Tinense")); Javascript explorer js = null; If (javascript excluser for example driver) {js = (JavaScript Excerpt) driver; } Js.executeScript ("Logic [0] .innerHTML = ...

selenium - Email is not taken or not sending a key through xpath -

I am starting at Selenium WebDriver and I'm trying to login via Gmail account Expect, now the problem It is that I have got xpath for an email and send a key to it when we run the key sent to the password field instead of the email, so please help solve it. Here is my code: Using the public class Xpath {stable Boolean C, C1, C2; Public static zero main throws an exception (string [] args) {/ TODO auto generated method stub WebDriver wD = new FirefoxDriver (); WD.get ("https://www.gmail.com/"); Thread.Sleep (2000); C = wD.findElement (By.xpath ("/ html / body / div / div [2] / div [2]")) isDisplayed () .; If (c == true) {System.out.println ("signin board is present"); } C1 = wD.findElement (By.xpath ("/ html / body / div / div [2] / div [2] / form")). IsDisplayed (); If (c1 == true) {System.out.println ("form exists"); } C2 = wD.findElement (by.expath ("/ html / body / div / div [2] / div [2] / form / input [15]")). ...

finding element in map with list c++ -

I have a conviction with an integer (x) and a list (list). std :: map & lt; Integer, std :: from the list & lt; Integer & gt; & Gt; My_map; My list 1 contains 100,200,300 elements and I see it in integer 1 Elements in mylist2 are 99,199,299 and I see it in integer 2 My_map.insert (pair & lt; int, std :: list & lt; int & gt; & gt; (1, mylist1)); My_map.insert (pair & lt; int, std :: list & lt; int & gt; & gt; (2, mylist2)); Now one element tells 200, how can I return value 1 (saying that element is related to the 200 list which is mapped to 1 element integer? You should use the elements of the lists as keys and as an integer value. : Std :: multimap & lt; int, int> my_map; my_map.insert (std :: make_pair (100, 1)); my_map.insert (std :: make_pair 200, 1)); my_map.insert (std :: make_pair 300, 1)); My_map.insert (std :: make_pair (99, 2)); My_map.insert (std :: make_pair (199, 2)); My_map.insert (std :: make_pa...

ios - NSMutableArray crashes or have 0 data -

I am trying to use an unstable array of data to keep, and as my edit program uses it. NSMutableArray * array; NSN * A = 1; NSN * B = 0; NSNumber * C = 3; These methods have tried to define the array: Method 1: array = [[NSMUTABELARROL] init ]; [Array addObject: a]; [Array addObject: b]; [Array addObject: c]; // Results - Accidents Method 2: array = [[NSMUTABELARROL] initWithObjects: a, b, c, nil]; // result - [array number] return 0 method 3: array = [[NSMUTABELARROL] INST]; Array = [NSMutableArray arrayWithObjects: a, b, c, zero]; // Results - Crash It seems that if I do [[NSMutableArray alloc] init]; This will be the cause of the accident, I am not sure that there is a line which causes the crash. How do I solve it? Start NSNumber objects like: A = [[NSNL Elok] INIT WITHIN: 1]; B = [[NSNumber Elok] Init Withd: 2]; C = [[NSNumber Elok] InitHath: 3]; Code> or [array addObject: a]; [Array addObject: b]; [Array addObject...

php - Can't upload photo in Laravel 4 -

I am trying to add some products to my database and I have to upload the photo of this product. I have created a controller, but see but when I click on Create, I have no errors, but I do not even have a picture. I just want to upload JPG, JPG, GIF, PNG files. How can I do this? Here is my code: Controller: Public work postAddProduct () {$ destinationPath = ''; $ Filename = ''; $ NewId = Products :: Maximum ('ID') + 1; $ Validator = validator :: Create (Input :: All (), array ('name' = & gt; 'required', 'description' = & gt; 'required', 'partner_link' = & gt; 'required', 'Image' = & gt; 'required')); If (input :: isfile ('image')) {$ file = input :: file ('image'); $ DestinationPath = public_path () '/ Upload / product /'; $ Filename = $ newId '.' $ File- & gt; GetClientOriginalExtension (); $ UploadSuccess = $ file- & gt; Move ($ dest...

kineticjs - Set group width depending on content -

I want to use KineticJs, and I am writing a function that is position: absolute; For true: ..px for element group (with kineticJS), I do this: correct: function (dist) {this.x (250- This.width () - dist); } (250 is the container width) but the group element's width is 0, even if I use the group.add (image). I would like to know that there is a way for the width of the group, in this case it will be the width of the group's image. You can create a function resizing group based on the sizes of your children: P> Example code and a demo: Change the size of the font grouptuent (group) {var width = 0; Var height = 0; group (); (hair) (). Each (function (node) {var true = node.x () + node.width (); if (right & gt; width) {width = right;} var below = node.y () + node .height () ; If (below> height) {height = bottom;}}); Group.width (width); Group.height (height); Layer.draw (); }

android - Intent Not working in MenuInflater and with Buttons -

So I was trying to work on graphics and wanted to use intent to switch between activities and This is not the first time this but I can not really get the error, so I am posting code for my mainness and I appear here. Please tell me the reason for the problem @Override Secure Zero to Create (Bundle Saved InstantState) {super.onCreate (SavedInstanceState); // Fullscreen Request WindowFeature (Window.FEATURE_NO_TITLE); GetWindow () SetFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); SetContentView (R.layout.activity_main); Button B1 = (button) Find VibibIID (R.B. button 1); Click B1.setOnClickListener (New View.OnClickListener () {@Override Public Zero (click V) {// TODO auto generated method stub intent P = new intent ("com.example.menuinflater.GFX") ; StartActivity (p);}}); } And the manifet looks like this: Android: allowBackup = "true" android: icon = "@ drawable / ic_launcher" Android: Labels =...

java - n! BigInteger makes a loop -

I wrote this small program to search n!: public class Fattoriale {public static zero main (string [] args) {int n; Do {n = input. ReadInt ("Enter a whole number (int> = 0)"); While (N & T; 0); Tall fat = 1; For (int i = 2; i & lt; = n; i ++) {fatta = fatt * i; } System.out.println (n "+!" + "=" + Fatt); Now I am trying to rewrite this program using BigInteger. I have written this: Import jbook.util. *; Import java.math. *; Public class Fattoriale {public static zero main (string [] args) {string s = input. ReadString ("Enter an integer number."); BigInteger big = new BigIntega (S); BigInteger tot = new bigigner ("1"); BigIntega i = New BigInteger ("2"); (; I.compareTo (big) & lt; 0; i.add (BigInteger.ONE)) for {tot = tot.multiply (i); } System.out.println (tot); }} But with BigInteger this program creates a loop and why I can not understand I hope someone will help me. Thanks a lot ;). (Ignoring ...

multithreading - Python multi threading with queue -

यह मेरा कोड है; पंक्ति आयात से आयात थ्रेडिंग पंक्ति शब्द = खुला (" Word.txt ") लॉक = थ्रेडिंग। लॉक () धागे = 10 क्यू = क्व्यू (अधिकतम आकार = 0) def myfunction (q): lock.acquire () प्रिंट q.get () lock.release () q.task_done () के लिए रेंज (धागे) में एक्स: धागा = धागा। धागा (लक्ष्य = myfunction, args = (q,)) m.setDaemon (सही) m.start () शब्दों में शब्द के लिए: q.put (word.strip () ) Q.join () raw_input () यह आउटपुट होगा: शब्द 1 शब्द 2 शब्द 3 शब्द 4 शब्द 5 शब्द 6 शब्द 7 शब्द 8 शब्द 7 शब्द 10 शब्द 10 तब यह बंद हो जाएगा फ़ाइल में बहुत अधिक शब्द हैं, मैं इसे कैसे जारी रख सकता हूं? मेरी समझ से, q.join () को तब तक इंतजार करना चाहिए जब तक क्यूई रिक्त नहीं है और अधिक जोड़ने के लिए। मैंने सोचा था कि इसे इस तरह से एक पाश में डालना: शब्द के लिए शब्दों में: रेंज (थ्रेड) में एक्स के लिए q.put (word.strip ()): m = थ्रेडिंग। धागा (लक्ष्य = myfunction, args = (q,)) m.setDaemon (True) m.start () लेकिन कभी-कभी मुझे यह कहते हुए एक त्रुटि मिलती है "नया थ्रेड प्रारंभ न...

CouchDB view default options in design document not working -

समस्या सरल है: मैंने कोचडीबी डेटाबेस के डिजाइन दस्तावेज़ में map फ़ंक्शन लिखे हैं, जो कुछ {"_ id": doc._id} का उत्सर्जन करता है। साथ में include_docs = true क्वेरी विकल्प के साथ, मैं लिंक किए गए दस्तावेज़ों के साथ वांछित परिणाम प्राप्त करेगा I क्योंकि नक्शा फ़ंक्शंस include_docs = true के साथ काम करने के लिए डिज़ाइन किए गए हैं, मैं डिज़ाइन दस्तावेज़ में यह विकल्प डालता हूं और इसे डिफ़ॉल्ट बना देता हूं: {... "विकल्प": {"include_docs": true} ...} हालांकि, जब मैं दृश्य को पूछता हूं, तब भी परिणाम उन लिंक किए गए दस्तावेज़ों के बिना होते हैं, और I क्वेरी में स्पष्ट रूप से विकल्प निर्दिष्ट करने की आवश्यकता है मैंने डिजाइन क्वेरी में अन्य क्वेरी विकल्प (जैसे limit = 200 ) को पु की कोशिश की, उन्होंने या तो काम नहीं किया। मैं CouchDB 1.5 का उपयोग कर रहा हूं, और कोई चर्चा नहीं मिल सकता है , मुद्दा या इस बारे में बग क्या किसी को कोई ख़याल है? उन्नत में धन्यवाद! संपादित करें: मैंने अपाचे में समस्या की सूचना दी है, और मुझे बताया गया है कि इस बा...

javascript - js onclick function params -

How can I pass a feature of div in my own onclick function? For example, I have this div: var join_button = document.createElement ("div"); Join_button.setAttribute ("category", "include_button"); Join_button.innerHTML = "contains"; Join_button.setAttribute ("room_name", name); Join_button.setAttribute ("onclick", "join_room ()"); Now, in the function join_room () I need to know this join_button's cell name attribute. Of course, I do not have to Only one join_button is on my page, I do not know that it is name and I have to handle them all. If I try to use this tells me that has no undefined function function join_room () {this.getAttribute ("room_name"); } is not a undefined function You can use this to read the object attribute. var join_room = function () {var room_name = this.getAttribute ('room_name); } Then set onclick in this way. join_button.on...

summary - devexpress grid control custom sum on specified columns -

I am trying to sum some column values ​​through cell selection (3 columns are affected). . It works, but trees sum values ​​are always the same for all three columns I'm trying this: private sub gvIktato_CustomSummaryCalculate (ByVal this object as a result, Gavai e DevExpress.Data.CustomSummaryEventArgs) handles gvIktato.CustomSummaryCleculate Dim GridView as View = CType (sender, Gridwu) if e. Sumiri Process = Custom Sumini Process See if again. Aiselsels (e. Rohandl, gvIktato.Columns ( "NETTO")) then e.TotalValue = Convert.ToDecimal (e.TotalValue) + Convert.ToDecimal (View.GetRowCellValue (e.RowHandle, "NETTO")) if View. IsCellSelected (e.RowHandle, gvIktato.Columns ( "brutto")) then e.TotalValue = Convert.ToDecimal (e.TotalValue) + Convert.ToDecimal (View.GetRowCellValue (e.RowHandle, "brutto")) if View.IsCellSelected (e.RowHandle, gvIktato.Columns ( "SKONTO_OSSZEG")), followed by e Kulwu = convert. ToDecimal (e. Kulwu)...

php - Laravel error in exception handler -

I have set laravel 4 and when I go to the following URL: http: // localhost / laravel / public / I got this error: error exception handler like I said on the subject I've tried yet but it can not help me any ideas? Laravel need to write some files in the app / storage folder to allow write app / Storage Chmod 777 has a suggested as the object as the URL or www-data: www-data -R app / storage

puppet - how to install rpmrebuild in openshift for restricted user? -

Hi dear I need to set up a puppet in the app that opens so I rpm Should run -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm from this site: Http: //docs.puppetlabs.com/guides/install_puppet/install_el.html but I get this error: bash: / bin / Rpm: By hacking the RPM with permission rpmrebuild I need to run a new RPM for my restricted user Yum Install rpmrebuild but I get this error: error: the package can not open the database in / var / lib / rpm / CRITICAL: yum . Main: Error: rpmdb open failed So do I know that I can install rpmrebuild or puppet in my RelapseStit guitar by ssh and putty? Thanks a lot. You can not normally install the rpm package without root privileges . Your best option is probably to get it. Do not worry about the documentation pseudo which is not available to you, however - gems can usually be installed properly.

c# - Remove row in a datatable using listview itemdeleting event -

I want to delete a line in the data table, when the user clicked the button with the item deletion event. Am I forgetting something? When I click on Linkbutton lnkdelete , the row is still there aspx code: & lt; Table class = "table-table-border table-small-responsive" & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; Th & gt; Product ID & lt; / Th & gt; & Lt; Th & gt; Product name & lt; / Th & gt; & Lt; Th & gt; Quantity & lt; / Th & gt; & Lt; Th & gt; & Lt; / Th & gt; & Lt; / TR & gt; & Lt; / Thead & gt; & Lt; Tbody & gt; & Lt; Asp: ListView id = "lvSODetails" runat = "server" onitemdeleting = "lvSODetails_ItemDeleting" & gt; & Lt; ItemTemplate & gt; & Lt; TR & gt; & Lt; Td> & Lt; Asp: label id = "lblID" runat = "server" text = '& lt;% # Eval ("ProductID")%...

android - How to Stop a Toggle Button from being deactivated by a click -

मेरे पास 4 ToggleButton s को एक OnCheckedChangeListener () में सेट अप करें । टॉगलबटन 1 को स्टार्टअप पर सक्रिय किया जाता है और श्रोता को सेट किया जाता है ताकि जब आप एक और टॉगलबटन को चेकर के अंदर दबाएं, तो पहले बटन को निष्क्रिय कर देगा और फिर उस बटन को सक्रिय करता है जिसे आपने क्लिक किया था। हालांकि, जब मैं एक टॉगलबटन पर क्लिक करता हूं, जो पहले से सक्रिय है, तो वह खुद को निष्क्रिय करता है जो मुझे नहीं चाहिए। मैं जानना चाहता हूं, क्या ऐसा करने का एक तरीका है कि एक सक्रिय ToggleButton को अन्य एक ToggleButton s को चेकर के साथ दबाकर केवल निष्क्रिय कर दिया जा सकता है? यह मेरे पास क्या है, लेकिन यह काम करने के लिए प्रतीत नहीं होता है। ऑनचेचेड चेंज लिस्टनर टॉगलChangeChecker = नया ऑन चेकेड चेंज लिस्टनर () {@CheckedChanged पर सार्वजनिक वाइड ओवरराइड (कम्पाउंड बटन बटन दृश्य, बूलियन हैकैक्केड) {/ / TODO स्वतः-जनरेट किया गया विधि स्टब यदि है (चेक है) {यदि (बटन दृश्य == एक) {one.setChecked (true); two.setChecked (गलत); three.setChecked (गलत); four.setChecked (गलत); } अगर (...

python 2.7 - Bottle micro framework suddenly crash -

I have a web app that I developed using the Bottle Micro Framework. Although it does a lot without any action and suddenly crash them (without using the web app) So I have reviewed the log file and found the following errors (I do not know what is the cause of these errors): traceback (the most recent call last): file "/ home / Hamod / lib / python2.7 / bottle.py ", in line 2699, run server.run (app) file" /home/hamoud/lib/python2.7/bottle.py ", line 2385, run srv = Make_server (auto.opt, self.port, handler, ** self.options) file "/usr/local/lib/python2.7/wsgiref/simple_server.py", in line 144, make_server server = server_class (host, Port), handler_class file "/usr/local/lib/python2.7/SocketServer.py", line 419, _ In the _init__ self.server_bind file "/usr/local/lib/python2.7/wsgiref/simple_server.py", line 48, server_bind the file in HTTPServer.server_bind (self) "/usr/local/lib/python2.7 /BaseHTTPServer.py ", line 10...

angularjs - Angular: action directive for eye gaze steering, wrap ng-click in another directive -

For a web app, which can be controlled either by mouse or eye movements, Special instructions are required Let us call it ng-action . My question is just about: How to call your debate within an angular instruction? So it is not relevant, what is the logic behind the control of the eyes, but it may be: How to hide ng-click in another instruction, so we have more control over what to say during the operation? & lt; Button ng-action = "activate field (1,2)" & gt; Activate ... & lt; / Button & gt; OK, I think the answer has been found. I thought it was easy area $ Eval (atts.ngAction) does.

RegEx with pattern and matcher in JAVA -

I have a text / html file, I need some information from this For this, I am using RegEx as the code given below. My problem is, I want the results of pattern P and pattern L in the same matching because the result is very important in the system in my code. The wrong sequence of output is because it prints the results of the pattern P and then the result of the pattern. How to solve this problem? string pattern 1 = "& lt; img class = \" gallery element shown \ "data-src = \" "; string pattern 2 =" \ "src = \" \ " /> "; String pattern 3 = "& lt; img class = \" galleryElement shown \ "src = \" "; string pattern 4 =" \ "/>; Pattern p = Pattern.compile (Pattern.quote (pattern1) + "(. *?)" + Pattern.quote (pattern2)); Pattern l = Pattern.compile (Pattern.quote (pattern3) + "(. *?)" + Pattern.quote (pattern4)); Matcher m = p.matcher (res.toString ()); While (m.fin...

libgdx - How to prevent old android phones from crashing when accessing GooglePlayServices -

I'm ending my old game in which the Leaderboard feature is available for the user. I'm still using the latest GooglePlayServices available and BaseGameUtils from this source. It works fine on Android 4.0. +, But I test it on older Android phones eg 2.2.1 This exception denotes java.lang.NoSuchMethodError as you can see below. This is my main activity and expansion gamehelper.setup (this) : @ override protected zero Create (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); Android Application Configuration Config = New Android Application Configuration (); Start (new megam (this), config); Try {if (gameHelper == null) {gameHelper = new GameHelper (this, GameHelper.CLIENT_GAMES); GameHelper.enableDebugLog (true); } GameHelper.setup (this); } Hold (exception e) {e.printStackTrace (); }} The logkit is shown in: 07-27 17:18: 02.111: E / Android Random (1505): Fatal Exception: Main 07-27 17:18 18: 02.111: E / Android Random (1505): Java. Lung Any ...

sql server - Create 3 tables from 1 table in mssql -

I am creating a database of horse racing data, data is net-to-net, excel, and then a table in a MS SQL database Race_Master . The column includes such data: date status barriers horsename trainname jockeyname many Of course, horses, jockeys and trainers The name is stored in an inefficient and non-relational way, see the btnby entry being repeated. So I have created 3 new tables: horse_name trainer_name jockey_name none of those tables are duplicates I now , A new table which will take data from Race_Master and instead of using horse trainers and jockey names, how can you see those related tables and use their IDs as a reference? If you have already created a table ..... Select NewTable (MasterID, JockeyID, TrainerID, HorseID) to insert M.MasterID, J.JockeyID, T.TrainerID, Race_Master M from H.HorseID from inside M.JockeyName = J.JockeyName Insider on Jockey J Join Trainer T on M.TrainerName = T.TrainerName Insider Join H. HorseName = H.HorseName If you w...

jenkins - Github Pull Request Builder - Test this please not trigger build -

I have configured the Github Pull request builder by following the instructions It is only through the cron It works from - it works every hour though, do not comment directly on "please test it" or trigger the push build to the repository. I have an 'bot' administrator in my repository as Jenkins-user. I have also visited Griffith-Webhawk and / Jenkins / ghprbhook for WebHooks & amp; Service I would like to know that PR builder responds to the "test this please" comment. Can I monitor it? I will answer this question as myself, now that I am clear. Actually, if you follow the instructions and setup Bridge Request Builder, it is a cron. For every periodic run, it detects that after a check New comment or "Please check this please" comment. If so, it will trigger the build. Note, PRB will create a temp branch that will merge your PR code into the default branch. And this will warn you if there is a conflict in code. Hope i...

scala - filter collection based on value of field -

मेरे पास यह संग्रह है वर्ग ConvEntry (पदनाम: स्ट्रिंग, साईटिक: डबल, सामान्य ("16 गेज", 0.05 9 8, सत्य), नया कॉन्वेंट्री ("1 / 16th इंच", 0.0625, सत्य), नया कॉन्वेंट्री ("15 गेज", 0.0673, गलत) , नए कॉन्वेन्ट्री ("14 गेज", 0.0747, झूठे), नया कॉन्वेंट्री ("13 गेज", 0.08 9 7, झूठे), नया कॉन्वेंट्री ("12 गेज", 0.1046, सत्य), नया कॉन्वेंट्री ("11 गेज", 0.1196, झूठे), नए कॉन्वेंट्री ("1/8 वीं इंच", 0.1250, सत्य), नया कॉन्वेंट्री ("10 गेज", 0.1345, झूठे), नया कॉन्वेंट्री ("0.160 इंच", 0.1600, झूठे), नया कॉन्वेन्ट्री ("8 गेज नया "ConvEntry" ("3 / 16th इंच", 0.1875, सच है), नई ConvEntry ("0.190 इंच", 0.1900, गलत), नए ConvEntry ("0.204 इंच", 0.2040, गलत), नया Convrentry ("1/4 इंच", 0.2500, सत्य), नया कॉन्वेंट्री ("5/16 वीं इंच", 0.3125, सत्य), नया कॉन्वेन्ट्री ("3/8 इंच ", 0.3750, सच है), नई कॉन्वेंट्री (" 7/16 व...

ruby on rails - Kaminari and extra params -

I have looked around and I can not find anything near the answer. I think this is a very unique issue, although I am not surprised. I have an index page, where I am showing all the leads, but I have 3 different ways to show it: without review, review, all. Do I use current_page to accomplish this? Helpful, add:? Unreviewed = Correct for URL This is not a problem in its own right, when I add it to the comer for the pager, the page parameters are disturbed and make it the current page? How can I decide, or is there a better way to accomplish this goal? This is using Rail 4 and Kamarini 0.15.1 Controller: DIF index @ lilus = lead. Order (: ID). Page Params [: Page] @reviewed_leads = Lead. Where (reviewed: true) .order (id). Page Params [: page] @edit_lades = leads. Where (reviewed: zero) .order (: id). Page Params [: Page] current_page_no = lead.page end Index.html.erb & lt; Tr & gt; & Lt; Td colspan = "7" style = "text-align: center;...

ios - Stop UITextView From Scrolling Parent UITableView -

I have placed a UITextView in a UITableView for individual and I do not have to do this to make it Is there a bunch of resizing and what not based on the size of the screen. The only problem is that when the user taps on the text view, he scrolls the tableview so there is no text at the top. If there is anything in it, then it is right that I have not received any such document that is why it is or how to stop it. If anybody can provide input or suggestion, then it will be appreciated.

servlets - How to bypass dispatchOutsideContainer in mobicents tomcat container -

I am trying to send Tomcat container to all SIP messages in my SIP servlet. However if the request of the message is different from the Yuri host IP, then Tomcat container calls sending outsideContainer () and never get my SIP servlet message. Is there any way to avoid this? You need to make sure that your application is configured to handle requests 127.0 You can read more at on the container through the SIP Servlets management console on .0.18080 / sip-servlets-management.