Posts

scala - Writing /public directory in PlayFramework after deployment to production -

PlayFramework 2.2.x में play dist उपयोग करने के बाद मुझे / सार्वजनिक निर्देशिका। क्या यह एक ज्ञात समस्या है? क्या वैश्विक पथ के साथ किसी अन्य निर्देशिका को पढ़ने / लिखने का एकमात्र उपाय है? यह मेरा नमूना कोड है: val imageDirectory = "images / twitpics /" val localPrefix = "/ Public /" val publicPrefix = "/ assets /" val files = Play.getFile (localPrefix + imageDirectory) .listFiles.filter (_। GetName.takeRight (3) == "जेपीजी") val randomIndex = _rand.nextInt (Files.length) val imageFile = files (randomIndex) इसके अलावा निजी val _jsonConfigFile = "/public/data/data.json" def लिखने JsonToFile (सामग्री: स्ट्रिंग) = {आयात java.io._val pw = नया प्रिंटवायर (Play.getFile (_jsonConfigFile)) pw.write (content) pw.close} सार्वजनिक / निर्देशिका के बाद आवेदन जार में पैक किया जाता है, जिसे कक्षा में डाल दिया जाता है, ताकि आप एक्सेस न कर सकें यह फाइल सिस्टम के माध्यम से या इसे लिखें।

Opencart and VQMOD issue: Could not load controller in vq2-system_engine_controller.php -

I am using Opencart 1.5.6.1 and VQMOD 2.4.1. I have installed the Ewe Rapid 3.0 extension now and at checkout, I get this error: Notice: Error: Controller payment / EVE could not be loaded! On line 47 trigger_error ('Error: Could not load controller'. ($) At $ ($) ... \ vqmod \ vqcache \ vq2-system_engine_controller.php in line children! '!'); I'm not sure whether this is anything with the VQMD or EVE extension. How to fix this? Steps to try: Check if you have a eway.php in the list / controller / payment folder Verify the square name of that file: Class Controller Payment and Controller { . Check file permissions. It's a good day!

java - Android - Change class variable before onCreate -

I am new to Android development On my main activity I have this button: And here square (without importing) that is calling above intention intent. Enhances public class testing activity {static string text = "test"; @ Override Protected Zero (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); SetContentView (R.layout.activity_test); TextView mTextView = (TextView) Find ViewById (R.id.textView); MTextView.setText (text); } Public Zero change text (strings) {this.text = s; } @ Override protected zeros newly created (intent to intent) {super.onNewIntent}; String [] array = intent.getStringExtra ("method"). the division (":"); If (array [0] .equals ("changeText")) {changeText (array [1]); }} @ Override Public Boolean On Crate Option Menu (menu menu) {getMenuInflater (). Flood (R. menu. Test, menu); Back true; }} Actually I want to know if it is possible to change the value of string text , onCreate () . Basically each but...

python - Does tuple sort itself when looped through -

I have a tube that has many values ​​that I use to search for some files. I found this method as an input method. I try to search for that value (text) in a file and remove the related result. But I have a requirement that if that text is not found, then search for the 'unknown' value in that file and return the corresponding values. To achieve this, I am planning to add Tupal to 'Unknown' so that if it does not get anything, then it will be something like the 'Unknown' Will return But my question is, if I suppress 'unknown' at the end, looping is used in the same sequence while looping through this tube, in which the elements have been added? I tried to open the python and saw that it hides through it in the same order. But I do not want to accidentally search my code for the 'unknown' value before the intended ones. help please. Looping on Tupless always goes from the first element to the last. & gt; & Gt; & Gt...

internet explorer - SVG in IE Quirks mode -

The following mode modes are browser modes: IE9 Compatibility View Document Mode: Quirks I am displaying a svg in IE > SVG is not provided. Is it possible to present SVG using this mode? This depends on the IE version you use and the type of query mode. We start with obviously: IE8 and earlier do not support SVG, so obviously they will not give you SVG mode in QuarkX mode. IE9 supports SVG, but the reason for this quirks mode is to disable it (along with many other features), and thus the answer is still "no" for IE9 The Quirks mode is effectively designed for backward-compatibility mode to emulate IE5. Most features are disabled after IE5 when you are in Quirk mode. By the question, it seems that you are using IE9, this is the case, the answer is 'no', and you can stop reading now. IE10 and IE11 are slightly different, in this they have two separate quits mode, the old quirks mode is similar to the first, so SVG will not work with it. But the n...

c - Mpirun hangs when mpi send and recieve is put in a loop -

I was trying to use the program to use mifrewan on 4 node clusters. Distributing node 0 data in nodes 1, 2 and 3. In the program, from '90 'to variable values ​​of' dior 'to be calculated. Therefore the node is distributing data and collecting results in an omitted fashion (for different values ​​of var 'dir') when do {*******} Whereas (dir Loop is given, Mippun is hanging, and no output is found. But when I comment on two {*******} (dir The loop output is obtained for the initial value of variable dir dir = -90 ), and that output is correct. The problem occurs when the loop is given. Can anyone help me in solving this problem. #include "mpi.h" int main (int argc, char * argv []) Float dir = -90; Int rank, nanoprakash; MPI_Status status; MPI_Init (& amp; argc, & argv); MPI_Comm_rank (MPI_COMM_WORLD, & amp; Rank); MPI_Comm_size (MPI_COMM_WORLD, & amp; numprocs); If (rank == 0) {/ / data to begin / / (dest = 1; dest ...

c# - ExecuteScalar: Object reference not set etc -

Friends, I need some help. This is my first time developing an app that has DB, please consider, please Forgive my mistakes I am trying to get the boolean value from the database and if it is to apply another loop on it ... but it is throwing the "object reference not set" error on the ExecuteScalar function. Here the code is: - string sql = "// here is my SQL query"; String connectionstring = "// here is my connection string ..."; SqlConnection connection = new SqlConnection (connectionstring); SQL Commands Command = New SQL Commands (SQL, Connection); order. Connection = connection; Connection.Open (); Bool ev = (bool) command. Exclute form (); If (ev == true) {MessageBox.Show ("some error"); } Other {// some code} What am I doing? Support will really be appreciated. Regards. Probably query reverse tap. Try this: bool? Ev = (bool?) Command. Exclute form (); If (ev.GetValueOrDefault (wrong)) {MessageBox.Show (...); } ...

c# - Windows Store app - Sideloading & beta testing -

I have recently started developing a Windows Store app. I provide the app as a package for many beta testing users, and they need to log on with their Windows Live account to get a developer license. My problem is now one month's expiration date of installed app. Is it possible to extend expiration date by buying license or is there a better way of beta tests? I have already developed the Windows Phone app, it is possible to release a beta package in the Windows Phone Dev Center. This would be a great solution to my problem, but it seems that only Windows Phone Dev Center has the facility and it is not possible for the Windows Store app (Windows 8). Thanks! There is no official beta package option in the Windows Store because Windows is for the phone. Source: If you want to keep an existing method of sending a file and renewing the developer license, then they can use the following command in the powershell window (Administrator form Show- WindowsDeveloperLicenseReg...

email - PHP mail function is not working on my server? -

My mail function is on the online server. It was working fine but not yet. I'm confused why he has stopped sending mail. This message has been sent that an email has been sent, but no email has been received in the Inbox. My PHP code is: & lt ;? Php if (isset ($ _ POST ['submit'])) {$ name = $ _POST ['name']; $ Email = $ _POST ['email']; $ Phone = $ _POST ['phone']; $ Message = $ _POST ['message']; $ Headers = "From:" $ Email "\ N"; // address = "$" from $; // my mail id $ header = "MIME-Version: 1.0 \ n"; $ Headers = "Content-type: text / html; charset = iso-8859-1 \ n"; $ Theme = "test mail"; $ Body = '& lt; Html & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = utf-8" /> & Lt; Title & gt; "." & Lt; H3 & gt; "Hello Test," & Lt; / H3 ...

python - ERROR: Unable to find spider: tutorial -

I have created a project from a piece of command line and I have written a spider file with the tutorial name as follows: Import the scrapy.item from item, field class tutorial into (item): name = "tutorial" permission_domain = ["dmoz.org"] start_urls = ["http: // www. Dmoz.org/Computers / Programming / Languages ​​/ Python / Books / "," http://www.dmoz.org/Computers/Programming/Languages/Python/Resources/ "] DEF Pars (Self, Response): File No = Response.url.split ( But when I run the 'scary crawl tutorial' command this 'error' is displayed: Unable (files name, 'wb'). To find out: Tutorial 'Tell me what is wrong with my code here. Thanks Tutorials Follow it again, you are mixing an item and a spider definition, in general, the scrappy spiders can be used by spider class to tutor Ial should be obtained from the spider (spider) ... ...

java - show one panel after button is clicked and other panel when second button is clicked in the same frame -

Image
I'm building Swing-based application, which consists of two buttons on the bottom - now what I want is when clicked the first button it must be like for her actions, as shown below in the same frame label, showing Tekstfild and containing a button panel - and it will show a panel in the same frame as shown below is when you click one button. do not understand it How to implement this interface to provide this event by Headler and Action Listener .. So please let me know how I can store it. Any help would be appreciated .. Thank you There are approaches 2 CardLayout based. Create all panels (empty, field panels, panel with list) and add them to a container in the container> CardLayout (empty is a default). Swap the cards to show the required cards on the click button. Entertainment based. Create a new panel with new content on the click button Remove one from the old container and add a newly created panel. Then call: container.value (); Con...

matlab - Distance calculated between one row of array 1 for every row of array 2 then move on to next row of array 1 and repeat -

I am trying to find the distance between two lists of locations (lat, long). I have all been placed in different arrays, which is lat1, lon1, lat2, lon2. The first set is that I am reading a GPS system and the second is the reference. They have more than 1000 rows. What I have to do is latitude 2, calculate the distance between L1, loan 1 for all points of loan 2, then take the second row to the next 1, loan 1 again 2, calculate all the lines of loan 2 and repeat. Therefore, L1, loan 1 wave 2, should be done for every point of loan 2. I have to finally decide on the basis of output distance & lt; 4 Can anyone help with this? Please hope that you have the statistics toolbox, because you can only use it in pdist2 / code> for: pdist2 ([lat1, lon1], [lat2, lon2]) If you do not have statistics toolbox: % // Simple example data a = [0, 0; 0, 1; 1 1]; B = [0, 0; 0, 1; 1 1]; N = size (A, 1); [X, y] = ndgrid (1: n, 1: n) dist = sqrt (zodiac (one (x (:), :) - b ...

jquery - What does this do and can I achieve the same with vanilla JavaScript? -

यहां कोड है: $ ('& lt; div / & gt;') पाठ ($ ट्रिम (myId.val ())।) एचटीएमएल ()।; मुझे लगता है कि myId एक jQuery वस्तु है, और मुझे मूल्य मिल रहा है। मुझे लगता है कि मूल्य छंटनी की जा रही है मुझे संदेह है कि एक यादृच्छिक jQuery div ऑब्जेक्ट बनाया जा रहा है, myId से ट्रिम किए गए मान दिया गया है और फिर इसे पूरा करने के बाद html () विधि अंतिम परिणाम myId से मूल्य के किसी स्वरूपित संस्करण का है। सवाल क्यों है? क्या वेनिला जावास्क्रिप्ट का उपयोग करने का कोई भी तरीका है? संपादित करें: अंतर्दृष्टि की सराहना करते हुए मेरे बुरे फार्म में एक कोडा जोड़ना है, लेकिन क्या यह वही प्राप्त करता है? goog.string.html समस्त (goog.string.trim (goog.dom.forms.getValue (myId))); एचटीएमएल क्या करता है myId.val () का मान बच जाता है , किसी भी अग्रणी और अनुक्रमित व्हाइटस्पेस को हटाया जा रहा है। जैसा कि आपने पहले ही नोट किया है, $। Trim (myId.val ()) बस किसी भी अग्रणी और पिछड़े सफेद स्थान को निकाल देता है। / P> यह $ .tim (myId.val ()) के पाठ मूल्य के साथ...

c# - Comparing the dates logic in Linq -

मैं परिणाम से पूछना चाहता हूं सार्वजनिक परिणाम टाइप करें GetData (Int ClientID, DateTime CreatedDate) {Var Row = DB.tblPlans। जहां (एम = & gt; m.fkClient_Id == ClientID & amp; amp; amp; amp; & amp; amp; amp; amp; & amp;; & lt; = बनाया दिनांक) .ऑर्डरबाइडेस्किंग (एम = & gt; एमआईआईडी)। FirstOrDefault (); } लेकिन परिणाम अपेक्षित नहीं हैं क्योंकि क्वेरी में "m.PlanDate" समय की तुलना भी कर रहा है। इसलिए उपरोक्त समारोह में "निर्मित तारीख" पैरामीटर हमेशा "12:00:00 पूर्वाह्न" से जुड़ा होगा, जो इसे "2/17/2014 12:00:00 पूर्वाह्न" मानता है क्योंकि यह डेटपेकर नियंत्रण है और मैं इसे में परिवर्तित कर रहा हूं दिन-समय पर निर्मित दिनांक के मूल्य, जिसके साथ मुझे इसकी तुलना करना है, मूल समय लगता है "2/17/2014 11:58:35 पूर्वाह्न" और इसलिए मुझे वांछित परिणाम नहीं मिल रहा है । मुझे लगता है कि परिणाम ठीक हो जाएगा यदि समय अंश निकाल दिए जाए। मैंने उपरोक्त समस्या की खोज की है और इसके कई समाधान हैं जैसे :: ऐडडीय (1); लेकिन म...

html - CSS dropdown menu jumping -

The problem I am stuck with a drop down menu is that the "original" link is jumping. HTML: & lt; Ul id = "nav" & gt; & Lt; Li & gt; & Lt; Period & gt; Page 1 & lt; / Span & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A & gt; Additional page 1.1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; One & gt; Page 1.2 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; One & gt; Page 1.3 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Page 2 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; Period & gt; Page 3 & lt; / Span & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; One & gt; Page 3.1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt...

java - Primefaces call ConfirmDialog from Backing -

I would like to call confirmDialog via backing This code works perfectly, But how can I set the message and set the installDialog implementer through backing? There are two conditions, while: Check Option A on the user checkbox (I left the code), then it should print the text directly to the console. - & gt; This is done by a code given below If the user checks option B on the check box, then this confirmation should be shown DEOLOug and when the user clicks the button, then the second function on the backing Should call. How to do this? Thank you. & lt; P: command button value = "execute" icon = "ui-icon-circle-check" update = "frmContent" actionoff = "# {backing.validate}" /> & Lt; P: confirmDialog id = "cfmDlg" widgetVar = "wvCfmDlg" global = "true" & gt; & Lt; P: command button value = "yes" type = "button" style class = "ui-confirmdialog-yes...

cakephp - find with order => field divide field (field/field) -

So the problem is fixed in this way. (About to find out about split areas) Virtual files are required. In the model: Class User, AppModel {public $ virtualFields = array ('ORDER_KD' = & gt; 'User.field1 / User.field2') is expanded; In the Controller: $ this-> User- & gt; Find ('all', array (... // some conditions, etc. .. 'order' => array ("ORDER_KD" = 'gt;' desc '), // virtualField' limit '= & gt; 15)); thanks You virtualFields , Because the command field / field is used as the DB column name.

Rails: times in different time zones -

A room opens 'at 9 a.m. in San Francisco,' I have to record correctly at the time of the train. datetime.New (2013,11,19,9,0,0) # It produces GMT: Tuesday, November 19, 2013 09:00: 000000 DateTime.New (2013) , 11,19, 9 0,0) .in_time_zone ("Pacific Time (US and Canada)") # It is also recorded in GMT: Mon, 18 November 2013 01:00 PM PST-08: 00 I want to get the time because it is locally , that is: Tuesday, November 19, 2013 09:00 pm PST-08: 00 . How can I do this? time zone (a list of options available at the rack time: region: all ), time_zone = "Pacific Time (US and Canada)" You can then: ActiveSupport :: timezone [time_zone] .from ("2013-11-19 9 00:00")

vb.net - Winforms groupbox with colored border -

Image
I used the following code to create a group box with colored boundaries: Public Square BorderGroupBox inherits GroupBox Private _borderColor color Private _borderWidth Integer Private _borderStyle as ButtonBorderStyle as the shape ... dim tSize protected override as sub-OnPaint (ByVal E as PaintEventArgs) = TextRenderer.MeasureText (Me .Text, Me.Font) dim borderRect as rectangle = e.ClipRectangle borderRect.Y = CInt ((borderRect.Y + (tSize.Height / 2)) borderRect.Height = CInt ((borderRect.Height - (tS Ize.Height / 2)) ControlPaint.DrawBorder (e.Graphics, Borders, _borderColor, _borderWidth, _borderStyle, BorderColor, _borderWidth, _borderStyle, BorderColor, _borderWidth, _borderStyle, BorderColor, _borderWidth, _borderStyle) = e.ClipRectangle textRect.X = (TextRect.X + 6) textRect.Width = TSize.Width + 6 textRect.Height = tSize.Height e.Graphics.FillRectangle (New SolidBrush (Me.BackColor), textRec t) e.Graphics.DrawString (Me.Text , Me.Font, New SolidBrush (Me.ForeColor, textRe...

numpy - python "is" returns True but "==" returns False -

"==" should not be returned unless true "gives" right? [101]: NPNAN NPNN is NPNAN Out [101]: Really [102]: NPNAN == NP. Nan out [102]: In the wrong [103]: NP. NaN == np.nan out [103]: False [104]: np.NaN == np.NAN out [104]: Incorrect Edit: What float Nain bus are the 3 expressions for the legacy of the old NMP versions or for their other uses? No, for no you have found one of the exceptions. According to, the NAN is not equal to anything, not even by itself: Compared with an NAN, always gives an anord result while comparing itself. Not only behave like this: & gt; & Gt; & Gt; Nain = float ('nan')> gt; & Gt; & Gt; Nain hai nain true & gt; & Gt; & Gt; Nain == Nain false As per the IEEE standard, there will be any programming language implementing floating point arithmetic. Common Capitalization Name for Multiple Spelling. It is an abbreviation for not a number and individual people have brie...