Posts

Showing posts from February, 2014

apache httpclient 4.x - Error while sending email from android app using SendGrid -

Trying to send email using the grid sent to my app. AsyncTask I is the following code SendGrid sendgrid = New SendGrid ("XXXXXX", "YYYYYY"); PublishProgress ("Preparing mail message ...."); SendGrid.Email Email = New SendGrid.Email (); Email.setFrom (args [0] .toString ()); Email.addTo (args [2] .toString ()); Email.setSubject (args [3] .toString ()); Email.setText (args [4] .toString ()); // androidEmail.createEmailMessage (); Published progress ("sending email ..."); Try {Sendgrid.send (email); } Hold (SendGridException e) {System.out.println (e); Log.i ("SendGrid Exception", "Mail Not Sent"); } Published progress ("Email Sent"); When I run it, I get the following error: by: java.lang.NoSuchField error: org.apache.http .message.basicLineFormatter At org.apache.http.impl.io.DefaultHttpRequestWriterFactory On & lt; Init & gt; (DefaultHttpRequestWriterWitter.java:52) at org.apache.http.impl.io.De...

c# - Interdependent Generic Classes? -

An example below this post is how a solution might seem, though clearly the example is invalid because it is in BaseNode and Without giving type while doing basic inheritance to BaseEdge I am trying to create an intangible graph class, where both the node class and the square of the side should also be intact. Essential methods must be implemented from the base classes by adding methods and properties of individual implementation of each class. I have an existing solution that uses base types only for everything, although I quickly found myself in a mess casting. Only the graph class should be exposed publicly, although others may be, so the solutions containing the nodes and the incremental classes inside the graph class are acceptable. Can it be structured in any way that all such assets are of the right kind, which are expensive in the system without any reason? It is more important that the implementing classes do not have to be put everywhere, but in this case performa...

Node.js + socket.io runs locally with foreman but crashes on heroku -

I get the following error while walking on my lock: 4-07-26 T22: 24 : 01.691178 +00: 00 Horoku [Web 1]: State has been replaced by crashing 2014-07-26 T22: 24: 01.6 9 2242 + 00: 00 Hiroka [Web 1 ]: Changed from state 2014-07-26 T22: 24: 04.483585 + 00: 00 ap [Web.1]: 26) ... 2014-07-26 T22: 24: 04.484066 + 00: 00Ap [Web. 1]: 2014 got crashed to start -07-26 T 22: 24: 04.485813 + 00: 00Ap [Web.1]: on module.load (module.js: 356: 32) 2014-07-26 T 22: 24: 04.484057 + 00: 00P [Web.1]: Throwing; 2014-07-26 T22: 24: 04.485806 + 00: 00Ap [Web 1]: on requirement (Module: JS: 380: 17) 2014-07-26 T 22: 24: 04.483677 + 00: 00Ap [Web. 1]: Module.Jes: 340 2014-07-26 T 22: 24: 04.485808 + 00: 00Ap [Web.1]: On object. & Lt; Anonymous & gt; (/app/node_modules/socket.io/node_modules/socket.io-parser/node_modules/emitter/index.js:6:13) If I use, "Hawkock Lab : Enabled Websockets "," I do not get any such facility: website " problem Heroku can not find an ob...

Spacing between tics in Gnuplot -

I am getting mad looking for the answer to this question. How can I fix the distance between the ticks on gnuxlot? Currently, Tycox is working very hard in my conspiracy together. I want them to spread further. Here's an example: I have a graph that looks like this: 100 - | | 50 - | | 0 - I want to see it like this: 50 - | | | | | 0 - Note that after the sample there is actually a low tick. As suggested by another by Andyrs (), you control the size of your terminal I could also have a problem, where I wanted to get the tiktis equal in equal value in the axis (although I do not know its value, but the grid must be quadratic at the end). If you want to make a quadratic grid / difference of your type, then set set terminal pdfcairo size 100, 100 Put rectangle set terminal pdfcairo 100, 200 and so on. Again, this one Aruras has suggested, not me I took my answer, which works for my case.

javascript - How to trigger a function from a object -

मुझे console.log को आउटपुट true या false .icons div पर क्लिक करें। यहां कुछ जीवित कोड है: मेरे पास नेविगेशन नामक मॉडल है $ scope.navigation = {status: false; } और एक बड़ा ऑब्जेक्ट जो UI को टॉगल करेगा $ scope.toggle = {menu: function () {$ scope.navigation.status = ! $ scope.navigation.status; चेतावनी ($ scope.navigation.status); }}; ट्रिगर एक एनजी-क्लिक = "open.menu ()" है: & lt; div class = " वर्ग "एनजी-दोहराने =" (कुंजी, वैल) वर्गों में "एनजी-शैली =" परिप्रेक्ष्य "एनजी-क्लिक =" टॉगल .मेनू () "& gt; कोशिश करो: टॉगल.मेनू () के बजाय open.menu ()

javascript - How to add object to array in constructor -

I am programming in Javascript and I have created an array by the user's name and created a constructor for the user object. Every time a new object is created, I want to add it to the array. var users = []; Function user (username, password) {this.username = username; This.password = password; Users [users.length-1] = this; }; Var = New User ('Joe', 'JoaA 100'); The above method does not work. How can I add objects to an orange in the constructor? "user" is an empty array, that means its length is 0 when you kill the constructor . Therefore assigning "this" to length -1 will assign "this" to the "1" index ... so why is not she doing the job ... get rid of -1, or. .. Use the javascript array.push () function instead of adding it to your array See examples on the W3Schools site ...

html - My div wont stay in my div container -

I have some divisions in the table and I want to make one of my devices so that it does not close the page. I want to add a scroll to the container device but instead, I still close my page: & Lt; TD & gt; & Lt; Div id = "container" style = "overflow-x: scroll;" & Gt; & Lt; Div style = "width: 1100px;" & Gt; The chart containing DIV 1 & lt; / Div & gt; & Lt; Div style = "width: 1100px;" & Gt; Div in which the chart is 2 & lt; / Div & gt; & Lt; / Div & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; First, overflow - x: Scroll to Container Then add an extra divide to each of the divs you want to scroll through: & lt; Div id = "container" & gt; & Lt; Div class = "scroll" & gt; & Lt; Div class = "chart" & gt; Div in which the chart1 & lt; / Div & gt; & Lt; / Div & gt; & ...

python - how to create a jpeg picture with a triangle of 3 specific point and specific color -

Now I'm trying to create JPG pictures with 3 distinct points and a special color triangle. By the way: A JPG picture (256 * 256) I get three points and draw a triangle filled with JPEG with a specific color color I with Python I am using Python 2 (by forked PIL) You can draw a polygon: / P> import image from PIL, image by dot point = (20,20), (20, 100), (10020) IM = image. NY ('RGB', (255, 255)) Draw = ImageDraw.Draw (IM) Dropoline (Points) # Outline = 'Red', Fill = 'Blue' IIM ('Triangle .jpg')

meteor - Prevent calls from the console of the browser Meteorjs -

How can I stop calling a meteor calling directly from the browser's console through the Developer Tools? You can not at least do this in all browsers, so you can trust it can not do.

java - Copying a snapshot of a Canvas to a BufferedImage -

I am currently using canvas with an affiliate buffer cart. How can I copy the contents of the canvas and save it to a buffard image? So far I have tried BufferedImage image = ... g = image.createGraphics (); Canvas.printAll (g); // or color all However, it appears that only 'blank' (filled with background color) screen is being prepared; I think because this is the default behavior of Canvas.paint () . There is currently a way for me to retrieve the image on the screen (the last shown with BufferStrategy.show ( ), or do I want to draw on a bufffered image and image the buffer swap Need to copy in graphics. It seems that / could be a great slow; Why would this happen? Why (because I know someone wants to ask): I have a set of classes set up as a framework for the creation of the game, which can benefit from the fastest screen, And I'm looking to create an Aden Framework, to tie one of these canvas into a remote server, sending it the picture displayed to other ...

ruby on rails - Why am I getting an Application Error error page for my brand new app hosted by Heroku? -

Image
I am quite new to ROR and thus I create my own web-based app I have been following a video tutorial, and I found this step: git pushed my master master When in git bash, this is an error which claims that it does not compile the ruby Could Now, it says that it has been launched and deployed, but this is still the error on the page for my app, Any ideas ?? I can add files if necessary. The requested file (files): App / Config / APR My comment requires a file extension_path ('.. / boot', __FILE__) 'rails / all' # config / application.rb config.assets.initialize_on_precompile = false # Gems listed in the journal are required, including any gem # You are limited: testing,: development, or: production Bundler.require (* Rails.groups) module Myrubyblog class application & lt; Rails :: App # settings preceded by those specified in config / environment / *. # The application configuration should go to the files in the config / initializers # - All the .rb f...

c++ - Path shortener with MFC -

I need to display the path in the context menu in my app and need to find a way to shorten them. For example, what Microsoft apps do in their "Recently used" list, if the original path is : the \ clientName \ projectName \ programName \ componentName \ SomeFileName.cpp convert me into something like this Need to c: \ ClientName \ ... \ SomeFileName.cpp . So I'm curious that if C ++ / MFC or maybe a WinAPI? Use path path to shorten the path components by changing it with ellipses.

json - Jquery receiving return value from $.post as array -

I have read many threads about it and still it is not working, but actually got passed i jquery My database will return a record: $ row ['parcel_id]' ' and $ row [' address] , just 2 columns, Which is then json_encode () . json is encoded using data in my query return. I have something like this: var arr = $ .parseJSON (data); Warning (data); This return: {"parcel_id": "1", "address": "5000 Charlotte Avenue"} However I can not data.parcel_id or data ['parcel_id'] So my question is, what is the return value is? Is this an array? Objection? How can I use each element? Since you have arr , you have to: arr.parcel_id or arr [parcel_id] ']

dependency injection - When using CDI in Java is the default constructor necessary? -

I'm looking at the code-base of the open source project, which uses the CDI, in most sections a deprecated non- ARGE constructor and A constructor has been annotated @ Inject is an example class in a remarkable project that has used this approach. So my question is whether we do not have any non-RG constructor, even if we have the constructor annotated @ inject ? The following are the import and annotations in the linked class: import br .com.caelum.vraptor.Controller; ... import br.com.caelum.vraptor.routes.annotation.Routed; ... @Root @Controller Public Class Questions Controller {...} I have found @target (value = TYPE) @ documentation @ @ reseteton (value = routum) @tweetirip @ request public @interface controller note @RequestScoped here annotation. Request scope is a general scope (as well as the areas of application, session and conversation) and the Jebos Weld client proxy for normal scood beans. To be able to create a proxy, the weld requires the f...

browser - Why does dragging generate blue blocks on an HTML page? -

Image
I think if you open any page, youtube.com is called, and you can use the button Drag the mouse with large blocks of blue will appear, it does not seem that the mouse is dragging or not. In the image below Youtube.com, for example, I pressed the left button and pulled the mouse left to right with a red line and when the point reached at the right point, all the areas on the top became blue: Does anyone know what's happening here and how can I stop it ? This is a problem for me because I give people a page where they can attract things and there is one of them, so that they can drag and drag a box around a group, but unrelated things on the drag page Creating blue to create. / P> thanks When you select an element, it highlights the whole element . You can use CSS to disable user selection on specific elements: -webkit-user-select: none; Select -mose-user: none; -MMS User Select: None; Select user: none; Alternatively, with javascript you will need to stop default...

What's wrong with this line of wordpress PHP code? (from a tutorial) -

I know that it is usually frowned upon, but I took this from a tutorial, so I wonder Why this is not working. Here is the affected line of code: $ document_root = rtrim (str_replace (array ('/', '\'), '/', $ _SERVER [' DOCUMENT_ROOT ']),' / '); Error Message in Apache's Error Log: [Sun Jul 27 01:01:47 2014] [Error] [Client 24.62.230.8] PHP Parse error: syntax error, unexpected '[DOCUMENT_ROOT]' (T_STRING), [8] hopefully on line 8 in 8/8/8/8 / wp / wp-config.php [July 27 01:01:47] [ Error] [client 24.62.230.8] PHP steak trace: [sun 27 July 01:01:47 2014] [error] [client 24.62.230.8] PHP 1. {main} () / home / folders / yp / index .fapx [Sun Zule 27 01:01:47 2014] [Error] [Client 24.62.230.8] Required PHP 2 () / Home / folder / WP / index.fp: 3 [sun July 27 01:01:47 2014] [error] [client 24.62.230.8] PHP 3. require_once () / home / folder / wp / wp-blog -header.php: 12 Reference: This is the tutorial that I have done to ge...

C# - Read JavaScript file and access variable -

I have a javascript file that contains variables defined and they have values ​​specified. Is it possible to read .js file with C # and easily recover variables and prices? I know what variable names will be, but the values ​​will be a JSON string. I hope that I do not have the support of regular expressions. EDIT: I do not have control over the content of the JavaScript file. A third party takes the file to a location and I have to choose it, read it, and paste it. Edit 2: Fine, forget I mentioned Jason. Actually there is nothing to do with my question ... which is not a simple solution at this point. So I went through the line to read the .js file line, search for variable names and get value. Code below for reference. Using (StreamReader r = new streamrider ("myFile.js")) {while (r.Peek ()> = 0) {var line = r.ReadLine ( ); If (line.inx ("myVariableName")> gt; -1) {var arr = line.split ("="); Var variable = arr [0]. Trim (); Var Value = ...

elasticsearch - Elastic Search Relevance for query based on most matches -

मेरे पास निम्न मानचित्रण है posts ": {" properties ": {" prop1 "" प्रकार ":" नेस्टेड "," प्रॉपर्टीज ": {" आइटम 1 ": {" प्रकार ":" स्ट्रिंग "," अनुक्रमणिका ":" नहीं_अनलाज्ड "}," आइटम 2 ": {" प्रकार ":" स्ट्रिंग " , "सूचकांक": "not_analyzed"}, "item3": {"type": "string", "index": "not_analyzed"}}}, "name": {"type": "string", "index" : "Not_analyzed"}}} इन मैपिंग के लिए अनुक्रमित ऑब्जेक्ट्स पर विचार करें {"name": "name1", "prop1": ["आइटम 1": "वेल 1", "आइटम 2": "वेल 2", "मद 3": "वेल 3"}, {"आइटम 1": "वेल 1", "आइटम 2": "वेल 5", "आइटम 3": "वेल 6 "{2}" और "एक अन्य वस्तु...

javascript - setInterval to requestAnimationFrame -

How to convert the following setInterval () to request? Below is a simple task set interface that I'm using. $ (document) .ready (function () {$ ("# add"). Click (function () {$ ('# result'). Html ((perforflight ($ ('' NAA '') .Val ()) + Perfalot ($ ('# NMB'). Val ()) .ststring ());} set interval (function () {$ ("#add") Click ()}, 1000);}). I have seen a one whose loop is required, but my code is not about gaming. It's about parse the strings. The document is a bit complicated. I have tried some tests-errors, but no success so far. Thanks for any input. You need to repeatedly apply the requestAnimationFrame , for example : ! Function frame () {$ ('# add'). ) RequestAnimationFrame (frame)} () Demo:

Simple&Basic JS - 1st attempt to javascript (want it jQuery free) -

Javascript's first attempt ... is not sure what I am doing ... "sample cleansing Try here "when I hover or click the mouse or focus. And the warning when the button is clicked. I recommend how I can use functions inside HTML and I can use them to completely separate JS / html. ! & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Java Script Practicing & lt; / Title & gt; & Lt; / Style & gt; & Lt; Script & gt; Document.onreadystatechange = function (if {document.readyState == "full") {// page loaded function (go) (warning ("done"); } Function clear () {var x = document.getElementById ("x"). Values; X = ""; }} & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Form method = "post" & gt; & Lt; Input onclick = "clear ();" Type = "article" id = "x" value = ...

javascript - In a JS array of objects, should I use a keys to identify each object? -

I'm still learning JavaScript patterns, and I'm curious about it. If I have an array of objects, should not I use the keys of objects (eg A), or their keys (example B)? An array of objects without any key: or as unique ID Key An array of objects to use: var soylent_green_candidates = [12341: {name: "don", gender: "male", weapon_of_choice: "kangaroo cannon"}, 24325: {name: "Jimmy", Gender: "Male", Weapon_of_choice: "Sushi Blaster"}, ...] Your second example is invalid, so that the question should sleep. In Javascript you have the option of arrays , which is sorted but essentially "key is low". Each array entry can be reached only for its numerical index, period. The other options are objects , which do not have any guaranteed order, but they are imposed on the basis of criteria. : (Note: When you can arrays arbitrarily numerical index for keys based on order and requiremen...

angularjs - When a service is injected into a parent controller should I also inject into the child or just inherit the service -

I am trying to understand how a service will bring in the controller, when service parents and children are both controller and Is it used in the parents and children HTML? Should I be brought to the service in the parents and then get a copy of this kind of service in a child like this: $ AppController '] Producer (Public $ area : IAppControllerScope, public config: IConfigService) {$ scope.app = this; $ Scope.config = config; } // this.config is used here} Category AdminHomeController {public app: AppController; Public configuration: ConfigService; Static $ injection = ['$ scope']; Creator (Private $ area: IAdminHomeControllerScope) {this.app = $ scope.app; This.config = $ scope.config; $ Scope.home = this; } // this. Should I bring this service to both parent and child controller: AppController {Fixed $ injection ============================================================================================= { ['$ Scope', 'configService'] Manufacturer...

javascript - Add onclick to element, but keep current onclick event -

Is it possible to add a JavaScript event to a DOM element, which is already an onclick event, I want to keep the property I have radio buttons like this: & lt; Input type = "radio" name = "checkout-pay" value = "56" id = "checkout payment -56" square = "checkout-radio checkout-payment-radio checkout-payment-radio" onclic = "payment changed (this ); "/ & Gt; I want to add window.location.href = window.location.href to the original onclick Keeping, but I do not have access to HTML, I can only modify it via javascript. Therefore my desired code will be & lt; Input type = "radio" name = "checkout-pay" value = "56" id = "checkout-payment -56" class = "checkout-radio checkout-payment-radio checkout-payment-radio" onclic = "payment changed ( It); Window Location.href = window.location.href "/> wrap window.location.href function ...

autohotkey - If/Else statement is not when trying to grab address list -

Image
I am trying to run the if / else statement on the following URL: and My code is below: ; Results 1 sleep 1000 Addr1: = IE.document.getElementsByClassName ("name") [0]. WinnerHTML if substrate (Addr1, 1, 2) = "mk" {StringSplit, AddrNew, Addr1, `StringTrimLeft, AddrNew3, AddrNew3, 1 Ader 1: = Adrion New2", ". AddrNew3 ",". PostCode MsgBox,% Addr1%} if substrust (eder1, 1, 2) & lt; & Gt; "Mk" {stringsplit, adrion new, aper 1, string trimlift, adrion new2, adrenu2, 1 ader 1: = adren1 ",". AddrNew2 ",". PostCode MsgBox,% Addr1%}; Results 2 sleep 1000 Addr: = IE.document.getElementsByClassName ("name") [2]. WinnerHTML if Substr (Addr, 1, 2) = "mk" {StringSplit, AddrNew, Addr2, `StringTrimLeft, AddrNew3, AddrNew3, 1 edit: = Adren New2", ". AddrNew3 ",". PostCode MsgBox,% Addr%} Otherwise, if substrust (eder, 1, 2) & lt; & Gt; "Mk" {stringsplit, ...

android - JsonArray Out of Memory -

Hello friends, I am trying to get a JSN variable from my server. The return value may be I sometimes get out of memory error. I am trying to implement this one service. try {Response = CustomHttpClient2.executeHttpPost (as the URL,); String return string = response .ststring (); JSONArray jArray = New JSONArray (return string); Int jc = jArray.length (); Int count = msl.getCount (); Msl.delete (); For (int i = 0; i & lt; jArray.length (); i ++) {{try {JSONObject json_data = jArray.getJSONObject (i); Feedback = json_data.getString ("pair"); // Log.w ("coin", apis [is] + ": pair is" + // response); Long tempres = msl.createEntry (feedback); } Hold (exception e) {// TODO auto-generated catch block / e.printStackTrace (); Logs. W ("coincidence", "JSOXpressation:"); } // log. W ("coincarker", "a:" + tamperes); }} JArray = null; } Hold (exception e) {// TODO auto generate generated blocks} I also tried ...

java - How to replace single element of array -

I have a series of random arrays. array1 [] = {1,2,3,0,0,5,6} array1 [] = {1,2,0,0,4,5,6} I want to end them like that, so I change the first 0 with x. array1 [] = {1,2,3, x, 0,5,6} array 1 [] = {1,2, x, 0, 4, 5 , 6} The code I am using is all given zero instead of just one. array 1 [] = {1,2,3, x, x, 5, 6} array 1 [] = {1,2, x, x, 4,5,6} Not what I see. I just want to be happy in place of one or just one using Code I, for (int i = 0; i & lt; array.length; i ++) {If (fruit [i] == 0) fruit [i] = x; } Hope it was clear, thanks for any help! Try to use the brakes. for (int i = 0; i & lt; array.length; i ++) {if (fruit [i] == 0) {fruit [i] = x; break; }} This will ensure that only one change has been made, max.

VBA error in Excel: Invalid Use of Property -

I've written the code at CommandButton_Click () , but it returns the following error: / P> Error Compiled: Invalid use of property. Folk Sub SectorName () as a slow score string, the result of integer as integer as an integer = 1 to 473 score = category ( "AB" + a_counter). If the score = "Technology and FM" then results = "25" als score = "operating equipment and supplies" then results = "26" als score = "interior and design" followed by result = "27" als score = "outdoor And Result Experience "then Results =" 28 "Els Score =" Horaco "then Results =" 29 "Els Score =" Retail and Franchise "Then Results =" 30 "Els Score =" Design "Then Results =" 33 "Els Score = "Health and Fitness Exits, P & S" After Results = "32" Else score = "Entertaining fun and am p; Adventure" then result = "...

python - How to get the true current size of a Label? -

Image
मेरे पास रूट विंडो में एक फ़्रेम है (रूट विंडो का आकार .geometry () ) जिसमें मेरे पास दो Label जो फ़्रेम को भरें। मैं अपने टेक्स्ट के फ़ॉन्ट आकार को अनुकूलित करने के लिए Label के वर्तमान आकार को जानना चाहता हूं। लेकिन मैं वापस लौटाए गए मानों का कोई मतलब नहीं बना सकता नीचे दिए गए उदाहरण से मुझे सामना की समस्या का उदाहरण मिलता है (तीन प्रश्न बोल्ड में हैं): आयातित टीके रूट के रूप में टिनकॉन्टर = टीके। टीके () रूट.जीमेट्री ("200x200") # शीर्ष स्तर फ्रेम , नीचे दोनों लेबल युक्त रूट को भरने के लिए विस्तारित करें f = tk.Frame (root) f.pack (विस्तृत करें = सच, भरें = टीके। BOTH) # नीचे दिए गए पाठ में उल्लिखित दो मामलों के लिए शर्त अगर सच: टेक्स्ट = "" अन्य: टेक्स्ट = " नमस्कार \ nhello \ nhello \ nhello "# दो लेबल, ऊपर एक के txt को बदल दिया जाएगा l1 = tk.Label (f, text = text, font = ('arial', 40), background =" green ") l1.pack (विस्तृत करें = सही = भरें = टीके। BOTH) l2 = tk.Label (f, text = "hello", font = ('ar...

delphi - How to check inheritance in generics with inherited parameter_ -

मेरे पास 2 श्रेणी पदानुक्रम हैं: 1। TObject --टाम ऑब्जेक्ट --टीएमएफ़िल्ड --टीएमएफ़ाफ़ 2। टूबाइजलिस्ट & lt; टी: टीएएमओबैज & gt; --टीएमऑब्जेक्ट लिस्ट & टीटी: टीएएमओबैज & gt; मेरे पास TTreeView के नोड्स से जुड़े कुछ ऑब्जेक्ट हैं। फिर मेरे पास एक जांच करने का कार्य है: pre> अगर TObject (node.Data) TAmObject या अगर TObject (node.Data) TAmObjectList & lt; TAmObject & gt; पहले जांच अच्छी है और मुझे कोई समस्या नहीं आती है दूसरे के साथ मुझे कुछ समस्याएं हैं। Pls मुझे चेक बनाने का तरीका बताते हैं। । तब संकलित उदाहरण के लिए मैं TamFarmList नोड से जुड़ा हुआ है मुझे कहते हैं: TObject (node.Data) TAmObjectList & lt; TAmObject & gt; = FALSE लेकिन टूबाइजेक्ट (नोड। डेटा) टीएएम ऑब्जेक्ट लिस्ट है & lt; TAmFarm & gt; = TRUE लेकिन मुझे सभी सूचियों के लिए सामान्य जांच की आवश्यकता है। Pls मुझे रास्ता दिखाती है क्या यह संभव है? यह सहानुभूति की समस्या है जो डेल्फी का समर्थन नहीं करता है। चूंकि सामान्य प्रकार उनके...

osx mavericks - Change path to MPICH installed by macport in mac osx 10.9 -

I am trying to set up a library on my Mac and it is one of the requirements of this library which I am installing MPIH You should do and make sure that the system path is configured to point it out instead of the default OpenMPI installation. That's why I have installed MPIT2 using McPort and I have to make sure that the system is using one, how can I do this? You will have to do it the same way as you would with other library / programs. Set your LD_LIBRARY_PATH and PATH variables so that the MPIO path is in front of the open MPI. However, I indicate that on Mavericks, I do not think the Open MPI is still distributed as part of the operating system. Welcome to use the Homebrew MPEEC project has been shifted from being called MPIT 2 to install MPIH because it went on version 3.0. The latest version is 3.1.2. You can either download it and install it on www.mpich.org/downloads or by MacBroau on Mac. I believe it is also in the Macports but I do not know enough about...

awk remove non-numerical values -

I just need to keep 'line' which starts with 'now'; And there is no letter between 'now' and 'cd'. I need to remove 'AB' and 'CD' from these lines. Input: abi am jhoncd ab32.58cd abi live in AB 22 of America. My birth was in NYCD ab58.2cd ef output: 32.58 58.2 thanx people! via awk, $ awk '/ ^ ab [^ Az] + cd $ / {gsub (/ now /, ""); Gsub (/ cd /, ""); Print} 'file OR $ awk' / ^ ab [^ [alpha:]] + cd $ / {gsub (/ ab / , ""); Gsub (/ cd /, ""); Print} 'file 32.58 58.2 searches for the above awk command lines which starts with ab followed by alphabet (or alphabetical) characters It does not happen again or after it, if it gets any earlier on the string cd , then it will be able to enter the string ab gsub Code> and cd . Finally the result was redirected to standard output. Pattern Details: ^ It indicates that we start the line. matc...

css - Can I use same class name for different elements styles? -

Is the use of the same class name acceptable for different styled elements? For example: table.dom {background color: # F9FAFA; float right; Degradation: collapse; Display: Inline-block; Width: 352px} th.dom {background-color: # 8FA4AD; Color: #fff; Font-size: .8em; Padding: 8px 0; Border: # 2C3A44; Border width: 1px; Border-style: solid; Width: 88px; } Td.dom {font-size: .7em; Border color: # 313841; Background color: # F9FAFA; Border width: 1px; Border-style: solid; Height: 30px; } I think if I call 'Dom' class for different elements, then there will be no conflict with it?

Spring MVC ViewResolver not mapping to HTML files -

I can not get spring MVC to solve .html view files. I have the following visual folder structure: Web-ANF-> View - | Home.jsp `- home.html I have a simple Hello World controller method which just prints the message and view name" home "back I have a home.jsp file , But instead use home.html. & lt ;! - Functional Mapping - & gt; & Lt; Servlet-mapping & gt; & Lt; Servlet-name & gt; Spacecraft & lt; / Servlet-name & gt; & Lt; URL pattern & gt; / & Lt; / URL pattern & gt; & Lt; / Servlet-mapping & gt; & Lt ;! - Work servlet reference - & gt; & Lt; Beam: Bean class = "org.springframework.web.servlet.view.InternalResourceViewResolver" & gt; & Lt; Beans: Properties name = "prefix" value = "web-nf / view /" /> & Lt; Beans: Properties name = "suffix" value = ".jsp" /> & Lt; / Bean: beans & gt; When I hit SpiceShip / Home, ...

jquery - Modify css class with Javascript doesn't work -

I am currently writing a little chrome extension to modify an existing site. I try to modify a div element if the child has a specialty with value (for example red, blue, ...). If the child has a value with the attribute value red, then I want the original foot color in red. I have removed this JS: // find parent div element element = element.getElementsByClassName ("existing-category-to-find-div") [ 0]; // Check whether the child is blue from the specialty ... if (color == blue) {element.className + = "RedColorClass"; } If I elemsent printout with element.outer HTML or className everything is fine and I'm seeing new value. But the actual site is still old value and it has not changed. Do I have to trigger something to refresh the html site? Use element.classList .add ("RedColorClass") or, If you use jQuery: $ (element) .addClass ("RedColorClass");

html - Container-Fluid has little padding on each side of the cols -

Image
I want a liquid container that is more than 100% of my screen. The problem is that advertisements are bootstrapped for padding in each call so that the total width is more than 100%. Adding a "no-padding" class to each colony probably works, but it can not be the right solution, or It's strange, it works correctly in my JSField in my project : In my project: & lt; Div id = "section1" & gt; & Lt; Div class = "container-liquid" & gt; & Lt; Div class = "row" & gt; & Lt; Div class = "col-lg-2" & gt; Test & lt; / Div & gt; & Lt; Div class = "col-lg-2" & gt; Test & lt; / Div & gt; & Lt; Div class = "col-lg-2" & gt; Test & lt; / Div & gt; & Lt; Div class = "col-lg-2" & gt; Test & lt; / Div & gt; & Lt; Div class = "col-lg-2" & gt; Test & lt; / Div & gt; & Lt; Div class = "col-l...

javascript - Adding + sign to a table, revealing more rows -

Problem: I'm totally new to the front-end development, I am using JSONP and AJAX Using a table with some data about university course, I am able to create a table. However, I have to add a new column to sign a + one at the beginning of each line. When this is clicked, a new group of data describing all the students of the course opens, and gets + one - I do not yet see the best way to do this. Any advice? Code: & lt ;! DOCTYPE html public "- // W3C // DTT XHTML 1.0 Transcriptional // N" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" & gt; & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" /> & Lt; Title & gt; Request json test & lt; / Title & gt; & Lt; Script src = "http://code.jquery.com/jquery-1.5.js" & gt; & Lt; / Script & gt; & Lt; ...

wpf - Textbox does not show a verticalscrollbar -

& lt; विंडो xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation "Xmlns: x =" http://schemas.microsoft.com/winfx/2006/xaml "xmlns: डी =" http://schemas.microsoft.com/expression/blend/2008 "xmlns: mc =" http: //schemas.openxmlformats.org/markup-compatibility/2006 "mc: Ignorable =" d "x: कक्षा =" WpfApplication1.MainWindow "शीर्षक =" मुख्य विंडो "ऊंचाई =" 350 "चौड़ाई =" 550 "मिनहाइट =" 350 " & gt; & Lt; डॉकपैनेल पृष्ठभूमि = "ब्लैंकहेड अलेमैंड" & gt; & Lt; डेटाग्रिड पृष्ठभूमि = "पीलेग्रीन" डॉक पैनेल। डॉक = "शीर्ष" मिनहाइट = "100" & gt; & Lt; / डेटा ग्रिड & gt; & Lt; StackPanel DockPanel.Dock = "नीचे" ओरिएंटेशन = "क्षैतिज" फ़्लो डायरेक्शन = "राइट टूलीफ़्ट" मार्जिन = "10" पृष्ठभूमि = "पीलेग्रीन" & gt; & Lt; बटन क्षैतिज अनुरेखण = "दायाँ...

javascript - How to validate Integer value in jquery -

I have to validate the input field, it should be an integer (0-100), if max_seat = 5 then min_seat is less Should be equal to or equal to maximum_set & Lt; / Form & gt; And jquery looks like this, how to make rules in this way, thank you $ ("# table_info"). {Rule: {min_range: "required integer", max_ seats: "required integer"}, message: {max_ seats: "* required", min_range: "* required",}}); It is not how many rules you declare (this short story style is used Only can be done with a rule.) Rules: {min_range: "required integer", max_seats: "required integer"} You have to declare each rule separately. And for an integer, you can use it. Your HTML is also not valid for this plugin ... & lt; Input class = "span6" id = "max_seat" name = "default_seats" type = "text" / & gt; & Lt; Input class = "span6" id = "min_seat...

php - Koken: Force overwriting the URL -

I have a website running Status is that I installed varnish on port : 80 And it redirects everything to Nginx, which is on the port : 8080 . Now I want Nginx to write an error message when someone tries to access it from the outside (port : 8080 ), I want all Some first be managed by varnish. Problem: You can not set a custom URL in Koken, so all posts on my site http://foo.com:8080/bar redirects. Do you know how URLs can be banned in a custom URL? Thanks for the reply, Balint Adding it to your nginx.conf Try: port_in_redirect closed; This should keep 8080 out of your URL To make sure you have to clear your cocaine system cache (in Settings> System) later on.

Perl run PSGI on linux centos and apache shared hosting -

I have a PCMI test application on a Linux Sentos, in which the CPNL hosting is shared. How can I call it under the PSGI protocol: http://domain.com/app.psgi I mean how capable to do. Psgi Running under the PSGI Protocol I want to be able to run any .psgi automatically under the PSGI protocol. I know that I can run it using the plackup command. The problem is that the use of share hosting is to use Apache in other words, in mod_perl, available mod_perl Required, but it is not psgi.

javascript - jQuery not working if input field is prefilled (toggle clear function) -

I found a jQuery script on that brings a clear sign inside the input field . It fits in my website but it does not work when the input value is prefilled. I changed the additon for many onchange () , mousemove () and additionally has been changed into the script and in the following HTML: & lt; Body onLoad = "tog (v);" & gt; JS Function tog (v) {return v? 'AddClass': 'removeClass';} $ (document)) .on ('input', '.cluralable', function () {$ (this) [tog (this.value)] ('x');}) . ('Mousemove', '.x', function (e) {$ (this) [tog (this.offsetwidth-18 But it did not help. Do you have any solutions? You need to trigger the input event program $ ('Clear.'). Trigger ('input');

javascript - Reference error geolocation -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मैं जियोलोकेशन का उपयोग करने की कोशिश कर रहा हूं जावास्क्रिप्ट में हालांकि, मेरे सांत्वना पर मुझे एक त्रुटि दिखाई देती है: संदर्भएरे: सफलता की परिभाषा नहीं है । परिणामस्वरूप मैं असमर्थ हूं कि मेरा कोड बाकी के कार्यों को निष्पादित करने में असमर्थ है I यहां मेरा क्रियान्वयन है: फ़ंक्शन पर क्लिक किया गया () {console.log ("अंदर क्लिक किया गया"); अगर ($ ("# चेकबॉक्स-एच-2j")। प्रोप ('चेक')) (यदि (नेविगेटर। स्थान) {navigator.geolocation.getCurrentPosition (सफलता, त्रुटि); } और {document.getElementById ("हैलो")। InnerHTML = "समर्थित नहीं"; } फ़ंक्शन सफलता (स्थिति) {lat = position.coords.latitude; Lng = position.coords.longitude; Document.getElementById ("हैलो")। InnerHTML = "lat:" + अक्षांश + "& lt; br & gt; लंबे:" + lng; } फ़ंक्शन त्रुटि (त्रुटि) {document.getElementById ("हैलो")। InnerHTML = "त्रुटि कोड:" + error.code; अगर (err....

javascript - Can I detect non-japanese chinese characters in text -

I have some text that is in Japanese, but some non-Japanese Chinese characters mixed in it. I looked at it because the Japanese does not support the font I use and the browser offers them using a different font. As far as I have seen that those letters are not used in Japanese, they accidentally meet (text comes from OCR). I wanted to find Kanji in the lesson, but it seems that not all Chinese characters are Kanji, but only Kanji. Is there any reliable way to detect those non-Japanese characters, such as checking some sections of Unicode? The only solution I can think of is that he is using a complete list of Kanji (or more searching) in use and checking every character if it is in the list, but I doubt It may be a little slow but even if I do not find a better way of getting it, then maybe I'll solve it in this way. Is there any reliable way to detect non-Japanese characters such as Unicode To check out some sections? No. For example, to support all your characters ...

how to initialize PostgreSQL database in openshift only once -

To design my flask postgrascled based app, I want to start my database with some items, Created for manage.py This is because I want to enter the item in the database only once. After that, I want to go normally (git push my project) my project works fine, i do not know how to manage me how to manage and how should i use it as admin or make sure Do this just run once, I use manage.py as python manage.py create_tables. This is my wsgi folder: ├── app.py ├── auth Py ├── flaskapp.cfg ├── forms.py ├── ├── ├── ├── ├── ├── ├── ├── ├── ├── ├── ├── ├─ ├─ ─ ├── ├── ├── ├── ├── template │ ├── base.html │ ├── evaluate.html │ └── show_all.html └── views.py and this is my project folder: manage.py readme.md requirements.txt setup .py venv wsgi wsgi.py Obviously, I want to initialize the database in such a way that every time I change the code and Push, I do not want to restart the database with the same entries but only when I want and as an administrator too. This is my applica...

python - List URL Route Flask -

मेरे पास एक सूची है imageIds = ["zw8SeIUW", "f28BYZ"] जो लगातार जोड़ा जा रहा है। मैं अपनी साइट को / images / zw8SeIUW और अन्य सभी imageIds पर पहुंचने में सक्षम होना चाहता हूं। ऐसा क्यों कुछ नहीं होगा? मैं इसे कैसे काम करूं? छवि आईडी में छवि के लिए @ app.route ('/ images / & lt; animage & gt;') def imagePage (): return render_template ('imagePage.html ') छवि पृष्ठ फ़ंक्शन ओवरराइट किया जाएगा और केवल पिछले एक रहेगा (क्योंकि डीएफ़ ब्लाह (..) पुरानी एक को ओवरराइट कर देता है।) कई फ़ंक्शन को परिभाषित करने के बजाय, दृश्य के रूप में अनुसरण करने के तरीके के बारे में कैसे? @ एप। रूट ('/ images / & lt; image & gt;') डीआरफ़फ़ेज पेज (छवि): अगर छवि छवि आईडी में नहीं है: एबर्ट (404) अन्य: रिटर्न रेडर_टामप्लेट ('imagePage.html')

java - Gantt chart with nanoseconds -

I need to create a Gantt chart for data from a microprocessor, which has the accuracy of nanosecond and the total duration of one second The Gantt Chart completes my needs in the Geoffrey Chart, except that it is Java. Tissue Which is exactly the exact millisecond (as mentioned here). The date 4G can be used instead, but it is not really possible to change a lot of internal code. To make a nanosecond, it is necessary to create a value addition subclass. There are some examples in this, which deal with custom labeling with value addition and unfortunately I could not find any way to make a nanosecond's timecale. If someone can show me that the current date is latitude nanosecond labeling with Gantt chart. I am managed to solve my problem by overwriting the date axis with the number format format Used to keep clock cycle in X axis square plot plot = (category plot) chart.getPlot (); CategoryImrenderRender Render = Plot Gate Renderer (); Renderer.setSeriesPaint (0, Col...

connection time out in firefox browsers -

I have a loop that takes 30 minutes. So when the browser timed out. I change the maximum execution time in php. INI but give the same error. How can I change settings in Firefox? My script runs successfully in order. Time of connection to Firefox for shuffle Open Firefox and Amp; Type 'about: config' in the address bar & amp; Press enter Accept 'I'll be careful, I promise' button. Search for the network. Enter the Http.connection-timeout and value (in seconds)

xml file validating in notepad++ but not in C# -

मेरे पास निम्न xsd स्निपेट है: & lt; xs: element name = "TR "टाइप =" टीएनएस: ब्लाह "/ & gt; & Lt; x: जटिल टाइप नाम = "ब्लाह" & gt; & LT; XS: अनुक्रम & gt; & Lt; xs: तत्व minOccurs = "1" maxOccurs = "1" name = "Res" प्रकार = "tns: Res" / & gt; & Lt; xs: तत्व minOccurs = "0" maxOccurs = "1" नाम = "SNotifications" type = "tns: ArrayOfSNotification" / & gt; & Lt; xs: तत्व minOccurs = "0" maxOccurs = "1" नाम = "अनन्येशन" प्रकार = "टीएनएस: अर्रेउफनोटिफिकेशन" / & gt; & Lt; xs: तत्व minOccurs = "0" maxOccurs = "1" नाम = "TNotifications" type = "tns: ArrayOfTNotification" / & gt; & Lt; / XS: अनुक्रम & gt; & Lt; / XS: complexType & gt; और मेरे पास निम्न XML है: & lt; टीआर xmlns: xsi = "http://www.w3.org/2001/XMLSchem...

bootloader - How to combine a boot loader and a kernel -

I want to create an operating system, and maybe a pre-built bootloader and kernel such as GRUB and maybe Linux kernel I write in System C. I know there is no need for any other OS, but I want to do it for academic purposes and want to know how the computer works at lower levels. I'm not sure which kernel I should use after downloading a bootloader and a kernel, how do I 'combine' or 'put them together'? Once I had done this, how do I print a message on the screen using C? I'm starting a lot in OS development, and I really appreciate it if someone can help me or tell me the articles I'm trying to do / connect bootloders and kernels I am I do not want to code my own bootloader or kernel just in the rest of the OS Any help is greatly appreciated. Thanks in advance I followed the guide and used grub-mkrescue.

c++ - Reading string in to float produces incorrect accuracy -

इस सवाल का पहले से ही एक उत्तर है: 3 जवाब अब मैं समझता हूँ फ्लोट s डबल से कम सटीक हैं, लेकिन जब यह मेरे पास है std :: string : " 7.6317 " और मैं करता हूँ: फ्लोट x = एटफ़ (myString.c_str ()); हो रही 7.63170004 की उम्मीद है? क्या कोई तरीका है मैं केवल पहले 4 दशमलव स्थानों को पढ़ने के लिए एक्स के असाइनमेंट को बता सकता हूं? या फ्लोट प्रतिनिधित्व किस तरह से संख्या 7.6317 स्टोर करता है, इसका कारण यह है? कुछ फ़्लोटिंग प्वाइंट लिटरल्स नहीं करते हैं कंप्यूटर में सही प्रतिनिधित्व है, भले ही - दशमलव संकेतन में - संख्या हानिकारक लगता है। इसका कारण यह है कि कंप्यूटर आधार के रूप में 2 का उपयोग करता है। इसलिए भले ही किसी संख्या में 10 के आधार पर एक सीमित प्रतिनिधित्व हो, हो सकता है कि यह आधार 2 पर न हो।

python - Different std in pandas vs numpy -

Standard deviation is different between pandas and numpy. Why and which is right? (The relative difference is 3.5% which should not come from the sphere, it is high in my opinion). Example NP import pandas Stringaio as PDS numpy Stringaio imports as import e = '0.057411 0.024367 0.021247 - 0.00180 9 -0.010874 -0.035845 0.001663 0.043282 0.004433 -0.007242 0.029294 0.023699 0.049654 0.034422 -0.005380 '' 'df = pd.read_csv (Stringaio (e. bar)), Delim_whitespace = true, header = none) df.std () == np .std (df) # false df.std () # 0.025801 np.std (df) # 0.024926 (0.024 926 - 0.025801) / 0.024926 # 3.5% relative difference I have these versions uses have: pandas '0.14.0' oval: '1.8.1' In short Does not have the "wrong" use Pandas ( N-1 in each language), while it is not normal by normal. for them to behave the same way, have ddof = 1

MySQL Syntax Error When Creating a Trigger -

I am trying to create a trigger but I am getting a syntax error and I really do not know why I I am Create Triggers Section - After Entry Section - & gt; Starting for each line - & gt; Include in the audit (change time, tagname, work) value (now (), 'section', 'INSERT'); Error 1064 (42000): There is an error in your SQL syntax; To use near '3 'for line 3, check the manual associated with your Mariadaby server version for the correct syntax. The following might be useful: DELIMITER // Drop Trigger if If present, 'section_internet' // display tab if existing 'stream' // create table 'stream' (`change time ') DATETIME not tap,' tagname 'VARCHAR (64) No' Action 'VARCHAR (64)) / Create / Create trigger 'for each section after signing `Section' for 'Start section_In' corals (now,), 'section', 'INSERT'); 'Audit' (`change time`,` tagnamename`, `verb '] END // DELI...

delphi - Access violation with TDictionary.Add -

Image
Does anybody know why I'm getting an access violation with the following : unit TestForm; Interface Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Generics.Collections, Vcl.Grids, using Vcl.ValEdit Does; Type TClientThing = class private iCDic: TDictionary & lt; String, string & gt; Published property Dic: TDictionary & lt; String, string & gt; ICDic Write iCDic; End; TForm1 = Class (TForm) vleHeader: TValueListEditor; Process formulas (sender: toobject); Private {Private Announcements} Clienting: TClientThing; Public {public declaration} end; Var Form 1: Teform 1; Implementation {$ R * .dfm} Process TForm1.FormCreate (Sender: Toubys); Var vCustomParamKey: string; VCustomValueKey: string; J: integer; Edited Begin // config directory to start with ClientThing Get header parameter J ...: = 0 vleHeader.RowCount to - 1 vCustomParamKey be started: = vleHeader.Cells [0, j]; VCu...

java - How do I convert List<String[]> values from UTF-8 to String? -

I want to convert some Greek text from string to UTF-8, because they can not be recognized by Java is. Then, I want to populate them in a jetty. So I use the list to help me I have the code snippet: string [] [] rowData; & Lt; String [] & gt; MyEntries; // ... try {this.fileReader = new FileReader ("D: \\ Book1.csv"); This.reader = New CSVReader (fileReader, ';'); MyEntries = reader.readAll (); // Here I want to change every value from UTF-8 to string converts 8 (myEntries); // ??? This.rowData = myEntries.toArray (new string [0] []); } Hold (FileNotFoundException pre) {Logger.getLogger (VJTable.class.getName ()). Logs (level. SESEE, ANNEL, X); } Hold (IOException pre) {Logger.getLogger (VJTable.class.getName ()). Log (Level.SEVERE, null, ex); } // I have created a method public string convert format (list & lt; string [] & gt; s) String out = null; {String string stratus: s) {try out {new string (s.getBytes ("ISO-8859-1"), ...

html - Can't get webpage title to look centered on all browsers -

This is my newly developed webpage - and I can not find the right title. It seems like the way Firefox and IE should have it. It does not look right on Chrome and Opera. If you click on the title "Inspepat Element" - you will see that the highlighted area has its own separate position with title (Highlight area is correct). For this reason I can not make my headline right - because when it focuses on IE and Firefox, it is not centered on chrome and opera. I wanted to play with margin etc. But I am learning html / css for just 3 days and now I feel frustrated. What can I do?

Use Capybara to click link in Bootstrap split-button -

When I use Capibara (latest, 2.4.x), how can I click on the 'Last 100 Closed Accounts' link? Bootstrap (Latest 3.2) in Split Button Below? Ignore ng-click as this is an AngularJS instruction. & lt; Div class = "btn-group" & gt; & Lt; Button ng-click = "Recent (50)" class = "BTN BTN-Default" & gt; & Lt; I class = "fa f-refresh" & gt; & Lt; / I & gt; Refresh & lt; / Button & gt; & Lt; Button class = "BTN BTN-default dropdown-toggle" data-toggle = "dropdown" & gt; & Lt; Span class = "caret" & gt; & Lt; / Span & gt; & Lt; Span class = "sr-only" & gt; Toggle dropdown & lt; / Span & gt; & Lt; / Button & gt; & Lt; Ul class = "dropdown-menu" role = "menu" & gt; & Lt; Li & gt; & Lt; An NG-Click = "Recent (200)" & gt; Previous 200 open accounts & lt; / A ...

java - Abstract class or interface for translator objects on Android -

I want to summarize the translator service for the user. I have the idea of ​​doing this in two ways: or interface with this method: public null translation (T basic, T1 source); Or an abstract class with the same method, with generic classes to use with both classes. Its better, interface or intangible class witch? How can I do this in Android with normal classes? Because the compiler says that symbol can not be solved I hope that I understand correctly Generic parameter should appear in the Interface (or Abstract Class) Declaration: Public Interface Translator & lt; T, T1 & gt; {Public Zero Translation (T Basic, T1 Source); } Whether an abstract class or an interface is more suitable, it depends on the fact that the interface (or sub-classes of the abstract class) can be seen as an implementation Is similar to the interface / abstract class or not. If the answer is yes, then an abstract class is appropriate.