Posts

Showing posts from April, 2010

javascript - how to display image in file upload dynamically -

I have created a function for file upload. I get the file name and file type and do not know how to display pictures using dynamic controls! AddFileUpload function () {var div = document.createElement ('DIV'); Div.innerHTML = '& lt; Input id = "file" + counter + '"name =" file' + counter + '"type =" file "/> + '& Lt; Input id = "button '+ counter +'" type = "button" 'value = "remove" onclick = "RemoveFileUpload (this)" />;'; Document.getElementById ("FileUploadContainer") appendChild (div). Counter ++; } RemoveFileUpload function (div) {document.getElementById ("FileUploadContainer"). RemoveChild (div.parentNode); } Here's some code from the fun project I have is. & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Script & gt; Id (e) by function {return document. GetE...

augmented reality - CMMotionData to SceneKit SCNNode orientation -

Trying to use CoreMotion to rotate a sneaker camera properly, the scene I created is not easy ... everything I do, makes a bunch of boxes distributed in one area, and the camera just points to the Z axis. Unfortunately, the data coming up does not seem to relate back to the device's physical location and orientation in any way related to the device. It seems randomly redundant As I have suggested, I'm going through the orientation property of the camera quadrant directly on the camera node. Do I have a misconception that what the data core proposal is giving me? Should not the attitude reflect the physical orientation of the device? Or is it a incremental movement and should I build on pre-orientation? itemprop = "text"> Here this piece can help you: motionManager = CMMotionManager () motionManager .deviceMotionUpdateInterval = 1.0 / 60.0 motionManager .startDeviceMotionUpdatesToQueue (NSOperationQueue.mainQueue (), withHandler: {(Speed: CMDeviceM...

log4j custom pattern in otroslogviewer -

"itemprop =" text "> Hi I use otroslogviewer to view logs.But my application logs an error message about log ojtoslogviewer log4j Attempts to load tried to parse custom pattern my log4j pattern is property log4j.appender.FILE.layout = org.apache.log4j. PatternLayout log4j.appender.FILE.layout.ConversionPattern =% -5p:% d {dd-MMM-yyyy HH: mm: ss, SSS}:% c.% M ():% m% n Can someone tell me the correct pattern format, which I have in otroslovak Must be specified in ) If your logs look like: info: 11 10-Oct-2014: 30: 09,178: com.tcs.sgv.acl.service.AccessControlServiceImpl.getAllUserELement (): Global service loginPost In --- 100,016 Information: 10-Oct, 2014 11: 30: 09,179: com.tcs.sgv.acl.service.AccessControlServiceImpl.getAllUserELement (): userId ... 103,002 info: 10 Oct, 2014 11:30 to 30: 09,180 : Com.tcs.sgv.acl.service.AccessCo NtrolServiceImpl.getAllUserELement (): Locale ... en_US one ???? You can use the following log pattern (Menu T...

java - who calls the method TextView.onMeasure(int, int) and give it that two params? -

I want to apply a textView, and I'm overriding the "onMearsure" method, I just have a simple layout , Activity_main, just a linerlayout Xml like this: & lt; LinearLayout xmlns: Android = "http://schemas.android.com/apk/res/android" xmlns: tools = "http://schemas.android .com / tools" android: layout_width = "match_parent" Android: layout_height = "Match_parent" android: orientation = "vertical" & gt; & Lt; / LinearLayout & gt; And I put my TextView in this layout using the Java code. By the way: protected void onCreate (bundled saved instance) {super.onCreate (savedInstanceState); LinearLayout Route = (LinearLayout) layoutInflator.frame (this) .inflate (R.layout.activity_main, null); SetContentView (root); Ctextview TextView = new Ctextview (this, blank); TextView.setText ("ABCD"); Root.addView (TextView); } And now, I have created some log meager () method, it shows the width mode...

r - rbind + setkey in data.table slower than xts::rbind which automatically indexes? -

data.table xts से लगभग 6x धीमी होने का कारण क्या है अद्यतन करते समय (= आरबीआईडी) नई पंक्तियाँ? लाइब्रेरी (quantmod); पुस्तकालय (XTS); पुस्तकालय (डेटा योग्य) XTS = getSymbols ("AAPL", से = "2000-01-01", env = NULL) # संबंधित `data.table`: डीटी & lt; - as.data.table (as.data) (डीटी, सी ("दिनांक", नाम (एक्सटीएस)) # नोट: प्रत्येक परीक्षण चलाने से पहले उपर्युक्त पुन: चलाएं। System.time (1:10 में मैं) एक्सटीएस = आरबीआईडीआईएनएस (एक्सटीएस, एक्सटीएस)) # रीइंडएक्सिंग स्वचालित # यूजर सिस्टम बीत चुका है # 0.15 0.03 0.47 सिस्टम.टाइम (के लिए (i 1:10 में) डीटी = सेटकी (आरबीआईडी) (डीटी, डीटी), दिनांक)) # मैन्युअल रूप से कुंजी # यूज़र सिस्टम रीसेट करने की जरूरत है # 0.64 0.02 2.30 सिस्टम.टाइम (के लिए 1:10 में) डीटी = सेटकी (आरबीआईडलिस्ट (सूची (डीटी, डीटी)), दिनांक )) # डीटीओ # यूजर सिस्टम बीत चुका है # 0.60 0.02 2.20 डेटा योग्य (xts के विपरीत) मेरे कंप्यूटर पर आई & gt; 15 के लिए मेमोरी आवंटन भी निकालेगा । सामान्य प्रोग्रामिंग उपयोग का मामला तब होत...

double less operator in Go Tour 37 -

मुझे अजीब अभिव्यक्ति 1 & lt; & lt; आईआईटी (i) पैकेज मुख्य आयात "एफएमटी" फेंक मुख्य () {पॉ: = मेक ([] इंट, 10) i: = रेंज पो {पॉ [i ] = 1 & lt; & lt; यूआईआईटी (आई)} _ के लिए, मान: = रेंज पो {fmt.Printf ("% d \ n", मान)}} ऑपरेटर & lt; & lt; क्या? प्रोग्राम को आउटपुट मिला: 1 2 4 8 16 32 64 128 256 512 प्रोग्राम से बाहर निकल गया। यह एक बाइनरी पाली ऑपरेटर है। विशेष रूप से, यह एक बाएं पारी है (चूंकि वे बाईं ओर इंगित करते हैं)। यह क्या करता है, एक संख्या के द्विआधारी प्रतिनिधित्व में सभी बिट्स को स्थानांतरित कर रहा है ... बाएं। इसके लिए उदाहरण। 1 का द्विपदीय प्रतिनिधित्व (8 बिट प्रति बाइट के सुरक्षित धारणा के साथ) है: 00000001 । बाएं पारी को लागू करने का काम करता है: 00000001 & lt; & lt; 00000010 जो 2 का द्विआधारी प्रतिनिधित्व है। इसे फिर से लागू करने का काम करता है: 00000010 & lt; & lt; 00000100 .. जो 4 का द्विआधारी प्रतिनिधित्व है .. और इसी तरह। इसके विपरीत, सही बदलाव & gt; & gt; ...

c++ - calling different function depending on type -

I want to call different functions in templated functions based on type, such as: template & lt; Typename T & gt; T Funk () {static_assert (std :: is_same ; :: value} / * other permissions type * /, "type is not allowed"); T rate {}; // if T == int funkix (& amp; ret); // If T == / * Other Type * / / * Other Functions * /} Is such a thing possible? I tried to do this: std :: function & lt; Integer (* T)> Query; If (std :: is_same :: value) {query = funcInt; } but it gives me an error: Error: 't' does not represent any value is_same can be used in if statements: if (std :: is_same :: value & gt;) {/ * stuff * /} if (std :: is_same & lt; t, float & Gt; :: value) {/ * Other stuff This investigation has been done in theory on runtime, the compiler knows all the values ​​in compile time and most likely that any dead Eliminate Eche. The negativity is that the whole code in func should be syntactically and ...

xml - Looping results in xsl-fo with same node -

I am having trouble using JSL-FO to correctly display the selected values ​​in the loop. As you can see in XML, each & lt; Firstname & gt; For many & lt; Visit & gt; are nodes. I can call each & lt; Visit & gt; Trying to display the value in a faw: block tag, but at the moment it only displays all those for one: block which adds values ​​to squash with a line and I Can not understand XSL: & lt; Xsl: template match = "/" & gt; & Lt; Xsl: each selection = "company / employee" & gt; & Lt; To: Block & gt; & Lt; Xsl: select value = "@ id" /> & Lt; For /: Block & gt; & Lt; Xsl: each selection = "first name" & gt; & Lt; To: Block & gt; & Lt; Xsl: Select the value = "@ name" /> & Lt; For /: Block & gt; & Lt; To: Block & gt; & Lt; Xsl: value selection = "." / & Gt; & Lt; For /: Block & gt; & Lt; / X...

jquery - Track refresh of a browser -

I have a web application that was created using MVC. Now after each page is loaded, each internal activity is done using jquery ajax data loading. So I'm replacing data using Ajax again in the same container. Now if the user wants to click on the browser's refresh button, then I want to load the same data that is loading with the previous ajax call. The entire URL does not refresh using the url mentioned in the browser URL (because the data that will be returned will load the page loaded for the first time). Is it possible to do anyway, using javascript or jquery or any server-side methods? I am using .NET MVC 4.0 in the application. There are possible solutions, HTML5 has introduced history. PushState () & amp; Manually save the status of each page / ajax call using JavaScript in the JavaScript and on page load, which .

r - How do I repeat only a part of a vector? -

I have a vector: 0,24,12,12,12,9, 6, 12, 12, 12, 12 , 12,12 I repeat the last element (12) of only one part of it 96. The first part (0, 24, 12, 12, 12) I want to keep consistency. Can you please help? The answer depends on whether the number 96 is always located in the 6th position inside you Vector If so, please see the first comment below your question. If the position is variable, however, you can apply a simple query that identifies the position of 96 inside your vector, and then repeat the vector part as many times as you want (2 times in the code below). x

cypher - How to list out all the nodes which are having common properties in neo4j -

मुझे 4, नोड्स, ए, बी, सी, डी वाले गुण निम्नलिखित हैं, अब मैं सभी नोड्स को प्रदर्शित करना चाहता हूं जो समान गुण हैं या कार्य_इन / पदनाम आप ऐसा कुछ करने की कोशिश कर सकते हैं: MATCH (a: YourLabel) मैच (बी: आपका लेबल) जहां एक & lt; & gt; B और (b.works_in = a.work_in OR b.designation = a.designation) रिटर्न, कलेक्ट (बी) जैसा कि समान यह आपके सभी नोड्स से मिलान करेगा और तब प्रत्येक का उपयोग करेगा एक नई क्वेरी के लिए स्रोत के रूप में नोड एक & lt; & gt; बी स्वतः से नोड्स को बंद कर देगा।

asp.net - formatting of aspx file in Visual Studio -

I have a file with many things like this: How can I get the format to show it to me: & lt; Div & gt; & Lt; ASP: label runat = "server" text = "file name:" id = "llf file name" & gt; & Lt; / ASP: Labels & gt; & Lt; / Div & gt; Thanks a lot Ctrl + of + D will format the entire document for you in Visual Studio. If you want to change how the Visual Studio Auto Format HTML - which I think is what you are asking - you can easily change options by going to Tools. Text editor | Html | Formatting There is an option to wrap the tag for a specific length - which is what you have after.

c# - Get index of random matching value -

C # provides a way to get the first matching entry: int First = MyList.InxexOf (myList.Min ()) and Minimum ()) What is the easiest way to get a random index for a matching value such as: int anyOldOne = myList.RandomIndexOf (MyList You can get all the indexes and choose random index They are: // Once it is only var rnd = New random (random); // Every time you want a random element, select Var key = myList.Min (); Var indices = mylist. ((N, index) => New {n, index}) Select (x = & gt; xn == key). Select (x = & gt; x.index) .toList (); int any oldone = index [rnd.Next (index.account)]; Of course it would look better in a method.

javascript - JQuery UI Dialog not closing properly -

I am using JQuery dialog to present a partial view. Scenario: Step 1: Click the 'add' anchor link, the dialog will open with the text box. Step 2: User fills the text box value and clicks on Save button. Step 3: Details will be saved and the dialog will be closed. Step 4: Now the user will click on the 'View' anchor link, only the text box value will open for reading. Step 5: User will click on Cancel button. Step 6: Again click on the user 'add' anchor link, and open the dialog with the text box. Step 7: Click the value and Save button when the user fills the text box. Step 8: The problem starts here . This user should save the details that have been entered so far, but it is saving the old values ​​(which we have seen in step 4). I have tried to lower the code to click and present partial view on open dialog var div = $ ("# DivTaskDetail"); Var title = ""; If (mode == 1) {title = "edit job description";...

angularjs - show/hide content based on select value -

I want to show / hide content based on a sepipiginal value selected in the dropdown, but it is not working. $ scope.list = {'val1': 'abc', 'val2': 'xyz'}; $ Scope.Solidated Val = 'well 1' $ scope.isEnabled = $ scope.selectedVal == 'val1'? right wrong; html code & lt; Select ng-model = "selectedVal" ng-option = "for v as (k, v) in the list" & gt; & Lt; / Select & gt; & Lt; Div ng-if = "enabled" & gt; & Lt; Span & gt; Show me & lt; / Span & gt; & Lt; / Div & gt; I have not shown / hidden on the change of selectbox, what is wrong? var app = angular Module ('app', []); App.controller ('fCtrl', function ($ scope) {$ scope.list = {'val1': 'abc', 'val2': 'xyz'}; $ scope.selected val = 'well 1' $ radius. $ Watch ('SelectedVal', function () ($ scope.isEnabled = $ scope.selectedVal == ...

tsql - Strip off any characters from a string in SQL Server -

Image
I am trying to write a stored procedure that will give the next value on the line. In my case, I am sending a reference number and stored procedure MIN and & gt; Returns the next ref number using . However, the ref table contains 123GF, 256ER, 25GD characters, which gives me an error in converting from Varchar to int . How do I touch any non-numerical number before comparing the value with my passing value? This is my current process code: Create process [dbo] .nxprevious @refId integer, @Next on NOCOUNT set as the next bit; Select the @lReturn integer IF (@Next = 1) from the table REF declaration where REF = (select from the REF table) where REF & gt; @refId select any other from the table REF Where REF = ( Selection of MAX (REF) [REF-REF & LT; @refId] @lReturn = @@ ROWCOUNT Return @lReturn End GO If you are using SQLServer, then do the following Another solution is using the function change: Select replacement (reference, 'A', ...

java - MessageResources weird behaviour -

I have a web application for multilingual purpose I use Java Straps 1.3 from MessageResources I am The default language is Italian ( MessageResources.properties ) and the second language is English ( MessageResources_en.properties ). struts-config.xml : - Message processing - & gt; & Lt; Message-processing parameter = "message processing" /> In my index.jsp : & lt;% string language = request.getLocale (). GetLanguage (); & Gt%; Var lang = '& lt;% = language% & gt;'; & Lt; Script type = "text / javascript" src = "js / language.js" & gt; & Lt; / Script & gt; In js / language.js : $ (document) .ready (function () {var browser = null; Var val = navigator.userAgent.toLowerCase (); if (val.indexOf ("firefox")> gt; -1) browser = 'firefox'; and if (val.indexOf ("msie")> gt; -1) Browser = 'IE'; else if (val.indexOf ("chrome") gt; ...

asp.net mvc - Javascript in actionlink param -

I want to add the result of this function to param @ html.ActionLink ("Name", "action", $ ("input [type = checkbox]: checked"). Map (function () {this.name;} return). (). (","); ) Is this possible? You can not define this way form of the application link Use in (HtmlHelper, String, String, Object) @ HTMLActionLink ("Name", "Action", New {Object As You Want};)

multithreading - How to eliminate duplicate messages from command prompt while reading from inputstreams in java -

I'm reading an XML message from the CMNead prompt (simulator) if I put an XML message and if it's with Android Ends & gt; & Gt; Indicates the end of the message, that is, whenever I enter, it invites the server side thread and processes the message. If I put another XML message then I am getting both the message and the last message, but I do not want the first message, so let me solve it. The code below is inside the thread While (true) it will always listen to the message and send it to the server, while sending, I only need a temporary message. while (true) {if (clientsoc! = Null) {tempchar = br.readline (); Inputstring = inputstring + tempchar; If (inputstring.endsWith ("> gt;>")) {inputstring = inputstring.replaceAll (">>", ""); Serverstream.write (inputstring.getBytes ()); }} Hold (exception e) {try {serverstream.close ()} serverstream = faucet; Clientsoc.close (); Clientsoc = Null; } Hold (exception E1) {clientso...

javascript - Is it possible to run a function that is '2-deep' within another function? -

I need to execute a function from a window.onload event. I want to lie within the function's function. I know that I can run the function function1 () {function2 ()) from another function; } Function2 () {... a process ...} But since I did not run the 'code' window.onload event within this 'overall' function May be on the 'top layer' I tried to do this, but it was not working, but basically I think that this is what I want to do. & lt; Script & gt; Function () {function1 () {.. some stuff ..} function2 () {function1 (); }} Window.onload = function2; & Lt; / Script & gt; I can not just run the function 1 from the window.onload event because this object is bound by the onclick event. How to do any suggestions I can solve it ?? You should study and learn different JavaScript methods, which will code you in your candidate manner. There is a great resource and will show you the things you should know. Each pattern g...

c# - WPF how to access MainPage elements from Popup Page -

I am creating a WPF app that requires a numeric input from the user. I am using the navigation window and I An page is created in which there is a numeric keypad, the app requires numerical input more than once. Inspired by this, I want to put a popup inside a frame inside the page as follows: & Lt; Grid name = "main display" & gt; & Lt; Popup name = "popup dialog" placement target = "{bining elementname = an input box placement =" center "> gt; stackpayel & gt; frame source =" mynumpad.xaml "/> gt; & lt; button click = "OK_Outside_Click"> "Ok_Outside_Numpad" code> button is clicked, the numpad disappears and the main page is reactivated. The code is as follows: private Zero OK_Outside_Click (Object Sender, RoutedEventArgs e) {popupDialog.IsOpen = Wrong; mainDisplay. IsEnabled = true;} Two questions: Already a "OK" button inside MyNumpad.x...

excel - Change the SetSourceData range when chart is created -

I have some VB coding that hides the rows above and below the required cell values, which are simple for source data The line chart will be used as How can I select the remaining (non-hazardous) cell range as my set-source range? I can select the category with the following ... Range ("D6") Offset (1, 0). Select range (selection, selection. End (xlDown)) Choose ... Category always starts in cells below cell C6. When I try to use it as my SetSourceData category ... ActiveSheet.Shapes.AddChart. Select ActiveChart.SetSourceData Source: Range ("D6") Offset (1, 0) .Select.Range (selection, selection. End (xlDown)). Select ActiveChart.ChartType = xlLine ... I get the following error: Run-time error '438': object does not support this property method Any thoughts? Thank you Actually, the following code selects the data which makes me a little better ... range (" D7 ", cell (lines count," D "). End (xlUp)). Speci...

javascript - Unable to do mathematical calculations in angularJS -

What I'm trying to achieve is in this way, I have two columns in the present quantity present in my hand, The next time there is a pack-up column, it will have a text box with the default value, when I will change the value inside that textbox and submit the button, I should assume that my first column (quantity) (which is done) Should be deducted. After this I would like to add value to the text box in the previous column, so that I can see how many things have been packed so far so far I have made something like this & Lt; / TD & gt; & Lt; TD & gt; {{Data.packed}} & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td width = "100%" colspan = "4" & gt; & Lt; Button ng-show = "prdElement.show" ng-click = "new package item (PDF, $ event)" & gt; Next pallet & lt; / Button & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Tbody & gt; & Lt; / Tab...

Rename button disabled for github repository -

Such a simple thing as changing the name of a GitHub repository through its settings page now when I try new names I have a button named "Rename" has been disabled. What is the clue? solution This problem was not supported because of my browser. There were no errors or alerts, so I could not explain it earlier I can rename the repos using a different web browser.

qt - Openstreetmap(OSM) not loading with proxy server in QT4 -

I am using QT4 to create an application using OpenStreetmap (OSM) in a widget ... when The system is connected directly to the Internet without a proxy server ... but fails to load the map when connecting via proxy server ..... but QT5 (Proxy / Direct connection Method) .... To get a connection through a proxy You have to set up for your application. / P>

c# - How to read multivalued cookie in SignalR? -

How can the multi-spider cookie in the Signal R Hub read? For example: I have a cookie stored as - var myCookie = new nameValueCollection (); MyCookie.Add ("IdOne", "Value1"); MyCookie.Add ("Idtwo", "Value2"); Var webDummyCookie = New Cookie Header Value ("Dummuckie", Mikeuki); reaction. Heidder.educilities (new cookiehard value [] {webDummyCookie}); How can I get individually for IdOne and IdTwo? What can I do with the SignalR: cookie cookie; //Microsoft.AspNet.SignalR.Cookie var cookies = references request. Cookies; If (Cookies: TreeGate Value (Dummy Cookie, Cookie Outside) & amp; Cookie Value! = Faucet) {var obtained cookie = cookie.value; // This is the problem, as I can not do. Value [& lt; Key & gt;} Does anyone know how to do this? However the question is too old. Hope, it will help others. I use Signal R 2.2.1.0 and here's the solution: var httpContext = Context.Request GetHttpCon...

css3 - list-view & navbar font color change jquerymobile -

Image
How to change the font color: "page 1", "page 2", page 3 "," link a " , "Link c", "link c", "link c" list-view and "link c" & lt; ul data-roll = "listview" data using jQueryMobile 1.4.4 Navbar Liability & lt; / li & gt; & lt; li & lt; li & gt; & lt; li & gt; & lt; a href = "#" & gt; Gt; & lt; / li & gt; = "navbar" & gt; & lt; ul & gt; & lt; li & gt; & lt; a href = "#" & gt; link au Lt; / a & gt; & lt; / li & gt; & lt; a href = "#" & gt; Link B & lt; / a & gt; & lt; / li & Lt; li & gt; & lt; a href = "#" & gt; Link C & lt; / a & gt; & lt; / li & gt; & lt; / ul & gt; & lt; ; / Div> I have not tried the following but it works: ul # autocompl Atte took a {colo...

c++ - How to make these std::function parameters unambiguous? -

The following function overlaps are unclear when passing lambda. I found out that std :: function may be, even if their signature is no match. Therefore, the compiler can not tell which function to use. template & lt; Typename T & gt; Zero each (standard :: actions & lt; zero (t) & gt; iterator); Template & lt; Typename T & gt; Zero each (std :: function & gt; zero (t, id) & gt; iterator); Template & lt; Typename T & gt; Zero (each std :: function & lt; void (T & amp;)> Iterator); Template & lt; Typename T & gt; Zero each (std :: function & lt; void (t & amp; id) & gt; iterator); Here are some similar questions, but none of them can solve my problem. How can I solve the ambiguity without changing the usage? More than that, at that time I must explicitly mention the template type. Is there a way around this? It has one half, removing std :: function Constraint from overload resolution until the arg...

python - Runtime error with kombu on Mac OS 10.9.5 -

On OS X 10.9.5, I get a strange error while trying to use celery from python. It was used to work, but now (apparently) Kombu.five has failed to use some of the libraries while importing. Python 2.7.8 (Default, 24 August 2014, 21:26: 19) [GCC 4.2.1] Apple LLVM 5.1 (Clang-503.0.40) on Darwin More "Help", "Copyright", "Credit" or "License" for information. & Gt; & Gt; & Gt; Import celery traceback (most recent call final): File "& lt; stdin>", line 1, & lt; Module & gt; File "/usr/local/lib/python2.7/site-packages/celery/__init__.py", line 130, in & lt; Module & gt; Five files from celery imports in "/usr/local/lib/python2.7/site-packages/celery/five.py", line 51, in & lt; Module & gt; "/usr/local/lib/python2.7/site-packages/kombu/five.py" from the Kombu.five import monotonic file, line 52, & lt; Module & gt; absolute_to_nanoseconds = CoreServices.Abso...

Selenium Customise Xpath -

I bring all the elements of the page using driver.findElements (By.xpath .... In a page we as shown below Xpath is produced randomly: // * [@ id = 'ContentPlaceHolder1_dataListSessionTime_lblCinemasName_0'] / span // * [@ id = 'ContentPlaceHolder1_dataListSessionTime_lblCinemasName_1'] / span // * [@ id = 'ContentPlaceHolder1_dataListSessionTime_lblCinemasName_2'] / span and so on .. I like the elements present on a Need to calculate the number of pages I am trying to use exposed / code as shown below. * = xpath; Represent the beginning with the character. string MovieCinemas = // * [@ id * = 'ContentPlaceHolder1_dataListSessionTime_lblCinemasName_ List & lt; WebElement & gt; Elements = driver.findElements (By.xpath ("")); Println ("number of elements found:" + elements.size ()); I am unable to calculate the elements. Lso throws an exception, unable to find the element. You () instead function in XPa...

android - How to update display name with email id? -

I'm trying to update a contact display name & amp; E-mail. After receiving the code snippet after a lot of efforts. But there is a problem that I supply for any name to update, when it appears in the Contacts app. ArrayList & lt; ContentProviderOperation & gt; Ops = new arreelist & lt; Content provider operation & gt; (); Ops.add (ContentProviderOperation .newUpdate (ContactsContract.Data.CONTENT_URI). Special (ContactContact.com.comDatetimeEmailCONTACT_ID + "=?", New string [] {String.valueOf (model.getContactid ())} .withValue ( With contact contact.d data.MIMETYPE, email.contENT_ITEM_TYPE) .withValue (ContactContact.com.comDirectInd.Email.DATA, "priyankay27@gmail.com") .Value (ContactContact.com.comDayDayD.Eight.Digray, "PriyaCa"). Value (ContactCommandadinesEmail.TYPE, ContactEdit.CommandDayindEm La. TYPE_WORK) .build ()); GetContentResolver () ApplyBatch (ContactsContract.AUTHORITY, Ops); Reference ctx = getApplicationCo...

music - How to iterate through an array of arrays in PostScript? How to use a font with musical signs? -

I have struggled with some postScript code, and I have very little goal (PostScript language really cool!) What do I have so far: %! PS-Adobe-2.0 / Times-Roman SearchFont 20 ScalefontSetFont / R360 / 12 / DEF / Triades [(C DM M FGM BMB 5) (FGM Bbc DM Amb 5) (BB CM DM EG FMM 5 ) (EB FM GM AB BB CM DMB 5) (AB Bbm CM DB EB FM Gmb 5) (DB EBM FM GB AB Bbm) CMB 5) (F # G # MA # Mb # D # ME # MB5 ) (BC # MD # MAF # G # MA # MB5) (AF # MG # M ABC # MD # MB 5) (A BMS V # M DEF #MG # MB 5) (DMF5MGa BM C # MB5) (GM BM CD MF # B5)] DEF 336 3 Translation Trades {50 MMTO Show 30 Rotate} This gives me a page with 12 strings spaced through a circle, but there is a problem with this approach: it automatically spaces it, so in a number of chords in the # , the line grows and the chords are far more distant from each other. I tried to loop the nested, printing a print after the other, but he did not really work here, whatever I tried here is: %! PS-Adobe-2.0 / Times-Roman SearchFont 20 Scal...

scala - Does immutability argue of manufacturing data than storing it? -

I have seen a recent example of an account domain model, where the calculation of balance is done by every transaction log times It is very good as the condition of this object. But this is the root of irreversibility. (Such an answer is unable to tag here that goes ahead with the design) what you describe That is a powerful technique for writing systems; It guarantees too much that the system will never lose data, and that means programming errors will never "corrupt" your data - once a bug has been fixed, the system also gives the right result, while the bug Live was related to a useful technique (sometimes called "Lambda architecture"), this calculation is meant to behave as a "canonical" form of a piece of information, but it is efficient Cash on the top line is also provided - the database design is denormalized to a database to improve the performance of any particular questions. but not the only way to write systems with irreversible data...

java - OpenX login Error -

I have been using OpenX for a while. I tried to log in to my admin now, it keeps retaining this error. My cookies are enabled and tried different browsers, but I keep the same errors. / Home / highsch / public_html / adserver / lib / max.php line 223 Strict criteria: non-static method OA :: Strict standards: non-static method PEAR :: setErrorHandling () Debug () should not be called statically, it must be in linear reference to $ line / 138 in strict reference in / home / highsch / public_html / adserver / lib / max. Aerirhandler.ppp: non-static method log :: singleton () Should not be called statistically, assume it with an incompatible reference to $ 149 at /home/highsch/public_html/adserver/lib/OA.php. Strict Benchmark: Non-static method log :: factory () should not be called statically, it should not be called $ / 99 / static method: PEAR:: Error () should not be called statically, in this incompatible reference $ / Home / highsch / public_html / adserver / / 156 Can an...

forEach array javascript incomplete -

updated I try to create an array by calling a callback function and feeding it with values Other Areas However, I get only some values ​​and I can not understand why. The structure is the same: var sorted Data = []; ArrayProvidingTheValues.forEach (pushEl, sortedData); and callback function function push EL (element, index) {console.log (called "pushle"); This [index] = element; } Input: cyiconer = {obj1, obj2 obj3, obj4, obj5, obj6}; ContratArray = {obj21, obj22 obj23, obj24, obj25, obj26}; Interval = 5 Expected output sorted data = {obj1, obj2 obj3, obj4, obj5, obj6, obj21, obj22 obj23, obj24, Obj25, obj6, obj26}; PS: This is the distracted code to show you in more detail. for (var k = 0; k gt; = saisineArray.length) {} and if ((Kashmir + 1) * Interval> = cycinarere.lamp) {cyiconare. Solis (K * interval, cycinarere lamps). ForEach (pushEl, sorted data); } Else {saisineArray.slice (k * interval, (k + 1) * interval). For each (pushEl, so...

c# - Invoke WCF Method asynchronously -

मेरे पास निम्न समस्या है: मेरी WCF-method इस तरह दिखता है सार्वजनिक हस्तांतरण परिणाम & lt; bool & gt; ExecuteMyMethod (स्ट्रिंग जॉबनाम, संग्रह & lt; KeyValuePair & lt; स्ट्रिंग, स्ट्रिंग & gt; & gt; पैरामीटर) {कुछ करें; } संबंधित अनुबंध: [ऑपरेशन कॉन्ट्रैक्ट] ट्रांसफर रिज़ल्ट & lt; bool & gt; ExecuteMyMethod (स्ट्रिंग जॉबनाम, कलेक्शन & lt; KeyValuePair & lt; स्ट्रिंग, स्ट्रिंग & gt; & gt; पैरामीटर); अब हमारे प्रोजेक्ट में एक प्रॉक्सी आवरण मौजूद है जिसके साथ आप असिंक्रोनस रूप से तरीकों का उपयोग कर सकते हैं और मुझे इसका उपयोग करना चाहिए: सार्वजनिक शून्य InvokeAsync & lt; TArg1, TArg2 , TResult & gt; (एक्सप्रेशन एंड लेफ्टिनेंट; फ़ंक्शन & lt; IMyServiceClient, Func & lt; TArg1, TArg2, AsyncCallback, ऑब्जेक्ट, IAsyncResult & gt; & gt; शुरू मोड, अभिव्यक्ति & lt; Func & lt; IMyServiceClient, Func & lt; IAsyncResult, स्थानांतरणResult & lt; TResult & gt; & gt; endMethod, TArg1 arg...

java - Eclipse Kepler not loading my workspace anymore -

I stopped my machine and this morning I loaded it without any project when I launched my eclipse. Have tried to do this - clean it up to no avail. Also under the following path workspace \ .metadata \ .plugins \ org.eclipse.core.resources \ .projects \ All my projects exist Are there. [customized from the comments above] Em> Try importing existing projects again. Menu item file & gt; Import ... . In the resulting communication import , item normal & gt; Choose workspace in the current workspace You can select multiple projects in the dialog

php - Remove one hour from time() -

I have an online system and after 60 minutes of inactivity one user needs to log out. The current code is now reduced to 30 minutes. $ cut = time () - 30 * 60; Now I have thought that the following will remove one hour so that time is 60 minutes. $ cut = time () - 60 * 60; This is a complete code that happens. After 60 minutes of inactivity I need a person to log out. // users expire 60 minutes $ final = $ _SESSION ['time']; $ Cut = time () - 60 * 60; If ($ last Now that code does not work, I do not think so. Use strontem () It can be easy Like a session This way, every time the user makes a request, it declares. $ _ session ['time'] = strtotime ("now and"); coding part $ last = $ _SESSION ['time']; $ Cut = strotman ("- 60 minutes"); If ($ last & lt; $ cut) // can also use the stratotype ("- 60 minutes") directly {// session_destroy (); Not set ($ _ session ['time']); // Only use t...

Find temp space used by query in mysql -

How to find the temporary location used by a query? Explain and explain with explained detail but he does not show any information. Well, for one thing, when you can run a query on a temporary directory Keep an eye on How to do, there are special types of questions / situations that will arise to generate temporary files (not all). The answer tells you how to

html - Custom CSS Cursor not working in some areas? -

OK, so I'm trying to challenge myself in my HTML / CSS class by adding custom cursor to all pages . I have worked on it but it seems that randomly preventing custom cursors, and becomes default instead? I am using CSS for this: * {cursor: url ("image.gif") 33 33, auto; } I created the & lt; Span & gt; , and this is not deciding for me. I also tried to set the cursor in the body {} and it did not fix it. Any help would be appreciated! I went to Gogul and searched for more than 2 hours to find the answer that worked on the site. To post the site below so that you can see what I mean. (IE will not show cursor, yet unsure about safari or opera) Edit: A small version of my index.html And my main.css which recreates the problem here: & Lt; Title & gt; Gundam Base & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body bgcolor = "# 000000" & gt; & Lt; H1 & gt; & Lt; Center & gt; Gundam Bas...

css - How can I make my dynamically sized lightboxes overflow/scroll correctly? -

I'm sure I'm doing something wrong, but I could not understand it. My Lightboxes size is dynamically (percentage width), and I want content in the lightboxes to scroll essentially on the small screen without laying the boundaries (actually a box-shadow) around the material. An added warning, I need a "container" div for dynamic height when I set the Container Devices to Height: 100%, I want to see the lightbox function (see the code below) But when I remove the height setting, overflow does not work right now. This demo should help clarify my details: This is my CSS: html {Height: 100%;} body {font-family}: Verdict, Non-Serif; Font-weight: 400; Font size: 12pt; Color: #FFFFFF; Padding: 0 pixels; Margin: 0 px; Background: #ff0000; Height: 100%; Overflow: hidden;} div.container {background-color: # 6d6d6d; Padding: 20px; Height: 100%; & Lt ;! - I want to remove it, but without it one can not understand a way to get the same functionality - & gt; O...

Set value to [Flags] Enum from list c# -

I need to set the value of the values ​​taken from the list. I have Enum: [flags] public enum EnumTest {Val1 = 1, Val2 = 2, Val3 = 4} var value = new list & lt; EnumTest & gt; {EnumTest.Val1, EnumTest.Val3}; How can I get the following results using an advance? var result = EnumTest.Val1 | EnumTest.Val3; Thanks Here's a solution using the link: var result = value. Apply ((x, y) => x | = y);

Jenkins multi-configuration, ignore failed build -

I set up a Jenkins multi-configuration project to build build runs on two different slave environments (Erlang R15B03 and Erlang 17.3 is ). It is a 17.3 production environment for the actual release to begin preparing our projects. Currently construction of 17.3 for all projects is failing due to failure failures, which we decide, as well as R15B03 how can I create it? So that Jenkins (for now) will not ignore the result 17.3 and pass the build as if the construction of R15B03 passes? It is not a good idea that if any anything is wrong It is like later failing in tests to fix them - you forget about them. You probably should prepare two separate jenkins for RA15 and 17. In this way, every time, you will see that R15B03 passes and 17.3 until you do not fix all dependencies.

php - Where clause and Order By not returning as expected in WordPress -

I am positive I am missing something. I have a MySQL database table setup: kdate, Kday, kmonth, and content with kdate's expiration date (admin input) 01-01-2014 Formatted as Date (MDY) I am trying to get the dates in comparison to today to show the execution of the script. global $ wpdb; $ Today = Date ('M-D-Y'); $ Result = $ wpdb- & gt; Get_results ("select SELECT * FROM wp_kaltable WHERE kdate & gt; = $ today ORDER BY kdate ASC LIMIT 6"); // resonant "& lt; east & gt;"; Print_r ($ result); Echo "& lt; / pre & gt;"; Foreign Language ($ line result result $ line) {resonant "and" level class = 'calcutta' gt; & Lt; Div class = 'kal' & gt; & Lt; Div class = 'kdate' & gt; & Lt; P class = 'kimonath' & gt; "$ Line-> kmOnoth." & Lt; / P & gt; & Lt; P class = 'kday' & gt; ". $ Line-> kday." & Lt; ...

python - numpy fromfile using remote paramiko SFTPFile connection -

I have a binary data file on that server, which I want to read with numpy. Instead of entering the server and run my Python code, I think I can make a remote SFTP connection file using paramiko SSH2 module: import sftp_client = ssh_client.open_sftp () remote to # get connections: paramiko # (els039) ssh_client = paramiko.SSHClient () to remote servers SSH connection ssh_client.load_system_host_keys () ssh_client.connect ( "els039") # now SFTP The client gets the connection to the file rfile = sftp_client.open ('2013041506.dat') Now, I use the data standard dragon File can use reading functions, but I can not use Numpy to read the data. For example, I (known length) you want to read the 3 arrays of such data: zdat = np.fromfile (rfile, dtype = "& gt; F8", count = zdat_len) udat = np.fromfile (rfile, dtype = "& gt; F8", count = udat_len) vdat = np.fromfile (rfile, dtype = "& gt; F8", = vdat_len count) But oval ...

javascript - HTML5 Canvas scaling an image animation -

I made a straight forward linear HTML5 animation, but now I want the image to be large scale Scale at the height of the canvas. What is the best way to do this? This is a window.request animationframe = window. Request animationframe || Window.mozRequestAnimationFrame || Window.webkitRequestAnimationFrame || Window.oRequestAnimationFrame; Var canvas = document. GetElementById ('monopoly-piece'); Var reference = canvas.getContext ('2d'); Var img = document.createElement ("img"); Img.src = "picture / tophat.png"; Img.shadowBlur = 15; Img.shadowColor = "RGB (0, 0, 0)"; Var xSpeed ​​= 0; // px per MS var ySpeed ​​= 0.15; Function Animate (now time, last time, xps, yPos) {// Update if ((img.style.height + yPos)> canvas.hete} {xPos = 0; YPos = 0; } Var timeDelta = nowTime - the last time; Var xDelta = xSpeed ​​* timeDelta; Var yDelta = ySpeed ​​* timeDelta; // Clear Reference Pure Line (0, 0, Canvas. Wide, Canvas. Height); // Shadow...

javascript - Simulate a click with a URL parameter -

I am currently working on a page that has 4 separate tabs animated / toggled with javascript. To use the selected tab based on a URL parameter, it should be able to anchor these tabs. However, the only way to switch from one tab to another tab is to click on it at the moment. / P> Therefore, I think it would be an easy way to set 4 different URLs of the page. E.g. pagename.com # 1 pagename.com # 2 pagename.com # 3 pagename.com # 4 simulation tab of each click with each number From 1 to 4. Can I do something like this? Many thanks, GERAT As the answer given above, Can change the hash by using code> window.location.hash . But, if your tab does not lock into that functionality, then the active tab will not change / change the hash only. What do you have to do in your JavaScript as a current hash and determine which tab / panel will be displayed ... See this example: HTML: & Lt; Div id = "tab" & gt; & Lt; Div & gt; & Lt; A hr...

node.js - client_id undefinded on grant_type=password (oauth2orize) -

I am making an API in nodes with oauth2orize and passport, but when I ask for token, the client_id parameter is unsupported is. Oauth2orize: server.exchange (oauth2orize.exchange.password (function (customer, user name, password, scope, callback) {console.log (client); / / It has tried with client_id, clientId, id ... username: username , Password: password Why is the client parameter undefined? Thank you very much less like this There is a need to create a passport strategy: var passport = requires ('passport'), client password string = ('passport-oauth2-client-password') Strategy; passport.use ("client password", new client password (work (customer ID, customer service, done) {Clients.findOne ({clientId: clientId}, function (error, client) {if (mistake) Returns Done (mistake) if returned (! Client) (empty, wrong) if (! Client. Trusted client) returned (empty, incorrect) (client.clientSecret == clientSecret) returned (blank, customer) an...

geocoding - Can Bing Spatial Data Services be accessed programatically via C#? -

I read about Bing-specific data services, where a jQuery example is given. I want to know that BSDS can be accessed programmatically via C #. I want to pass this data in some file in some normal format (such as CSV or XML), and it came back with the underlined and latitude population. Is this possible? Yes Bing Special Data Services Can be accessed from the programming language. If you want to do batch geocoding, this can be done using the Geocode Dataflow API: The documentation has the C # sample. Note that if you are using this service using the original or trial account, then you will be limited to 50 lines of uploaded data. If you have a licensed enterprise account, you can upload 200,000 lines of data per file, and up to 25 files in a 24 hour period.

PHP functions from Android - What's the best method? -

I was thinking that the most widely used method of calling the PHP function from within an Android app What is it? The method I was thinking was using a variable in the URL and retrieving it from my 'functions.php' using $ _GET and to decide how to run that function in that way . I just wanted to know if this is the best way to do it or is there any other way it usually meets? Thank you! I will take a look at PHP for SLIM (), this is an exceptionally versatile, secure PHP release API Builds super quick to install I use it to throw server side pieces together as it allows me to change the implementation very quickly.

powershell - String comparisons not comparing -

I am trying to run a PowerShell script to delete some files in a directory. To be able to remove this name from me, it should be blahblahblah . In my tests subdirectory, I have several files with the same name I though when I execute the following code: $ itemsToDelete = get-childItem- Path $ pathName | Where {$ _. Name-blahblabla} " It does not select any item. I have a triple check to make sure that I am in the correct directory When the script is executed, edit as I have been told. I am included in wrong way and I am using. $ itemsToDelete = get-childItem-path $ pathName | where {(includes $ _. name) .In ( "Blablablah")} correctly My confusion. My comment (again with some background) again on the author's request. quote: archival Description: the prevention tells the operator. that includes a collection of test values ​​of reference values. forever Boolean value. the reference values At least one. When the value of the test i...