Posts

Showing posts from April, 2013

for loop - How to count from 10 to 1 in java -

For a simple Java program where I want to increase the program from 2 to 3 or 4 to 10 to 1 Can I change this code? Public class examples {public static zero main (string [] args) {// (for int i = 10; i>; i -) {System.out.println ( "I =" + I); }}}} Change the loop for : (int i = 10; i> 0; i- = 2) {System.out.println ("i =" + i); } i- = 2 is an abbreviation i = i-2 This means that the new value i i will have an old value of zero. i - this i = i-1 , which is i- = 1 Can also be written as

squarespace: send form data to email without using php -

I am using html form in a website hosted by SquareSpace. After the form is submitted, I want to send form data to an email. For my understanding, SquareSpace currently does not support PHP implementation, so I can not use a PHP script. Note that I can not even use built-in forms in SquareSpace (even if they have an email with data There is an option to send) What else can I use to send data to email? Any suggestions would be appreciated.

python - Caching a downloaded file based on modified time using dogpile -

I am writing a program that downloads a large file (~ 150MB) and the data is found in a more useful text format file Parsed The process of downloading, and especially parsing is slow (~ 20 minutes total), so I want to cache the results. The result of downloading is a bunch of files, and the result of parsing is a single file, so I can manually check that these files exist and if so, check your revised time Do; However, as I am using a dog with a radis backend for the web service call at other places in the first code, I was wondering if the dog can be used for this? So my question is: can it be used to cache files based on your modified time? Why you do not want to split the program into many parts: Downloader Parser & amp; on the file update. Importing OS import threading _lock_services = threading.Lock () tmp_file = "/ tmp / txt.json" update_time_sec = 3300 with _lock_services: # if File was created more than 50 minutes ago # You ca...

apache camel - Http request and response lost after receiving Response from Web Service? -

I have an Apache camel application that talks to the web service, it's purely an integration (mediation) application. Take the last request and call it a SOAP message (using VM templates) and call the web service. Get feedback from the web service, convert it to JSON and send it back to our customer. REST ----> Conversion to SOAP Reiki (velocity template) ----> WS ----> Call Get feedback ----> convert to JSON ---- > Respond to the caller. We are using सर्वोपरਾਲ endpoint to obtain a request from our customer. Before we call the web service, you can get the HTTPSation object from the Exchange: HTTPSVRTREY REC = Exchange.Jet IN (). Beacode (HTTPSAllTeuast.class); Http session session = req.getSession (); However, the problem is that I can not get HTTPSession from the exchange after receiving a response from the web service. If I check the exchange object in debug mode, Exchange.getIn () is the default message type instead of HttpMessage. That's why I thin...

javascript - Open Layers 3 Zoom map event handler -

I have to handle a zoom event in Open Layer 3. The following is my code: map_object = new ol.Map ({target: 'map', control: control_list) , Interaction: interaction_list, overlay: [overlay]; Map_object.on ("zoom", function () {console.log ('zooming ...');}); The code runs with no errors and shows a map, but there is no output in the console, so that this function is not firing. Is: map_object.on ("drag", function () {console.log ('drag ...');}); And this also does nothing. How to handle map control incidents in Oll 3 will be some help (especially zooming!) Note I have 'zoom' as well as the law Has tried to 'zoom' for the area of ​​type. levand Try with the event (see, and to see it in the "Top bar" Do not forget to uncheck »).

searchbar - Search Bar - filtering numeric value in swift -

I'm trying to figure out how to filter table view data based on the numeric value entered in the search bar For example, I have a table view with a list of people and want to show to the people of about 20 years .. Any help would be greatly appreciated I find numerical values Like I can do to repeat Rajiv String Changing A is my code below (candy: candy) - & gt; Bull in candy; (Candy: Candy) -> Cancers in Candies .cal & lt; SearchNumber}) } This is working for filtering & lt;, == and my last objective is to enter data range between 0.9 x of the registered value Need to search for 1.1x of the recorded value. When the search numbers add any arithmetic operation (called 0.9 * search numbers) then I am getting an error opening "double". And if I am starting to open it then the compilation error is on, but whenever I touch the search bar, even then the program is running and it says "fatal error: unexpectedly found zero while opening an alternativ...

apache - How to set up git over http? -

I need to install a git server with git-over-http (smart http), but there are resources available online Dirt, mixing in other Apache configurations, details are missing or not being sufficiently clear. Based on the lack of available resources, I am answering this question myself. First it is necessary to understand that there are 2 components for git-over-http: git and apache. These two challenges to configure the interface between these two components with names connected via a script git-http-backend, which is forwarded by Apache requests Jiaiti. Note: Security is outside the scope of this guide. Start by installing git and apache2 using your distribution package manager. Add the necessary modules by Epache to enable Git-Over-http These cgi alias and env $ a2enmod cgi aka env copy & lt; VirtualHost *: 80 & gt; . Setenv GIT_PROJECT_ROOT / data / Git setenv GIT_HTTP_EXPORT_ALL setenv REMOTE_USER = $ REDIRECT_REMOTE_USER ScriptAliasMatch \ ...

wcf - How to serialize a subclass using DataContracts -

I have just started a WCF project programming and have a serialization problem that I can not fix. I am using Data Contracts and Datamomers to serialize my classes into XML. I have a class TestResponse which contains a property TestParameter This property contains a string parameter. Also, I have a sub class of TestParameter named "TestParameterSubclass" . I need to sort this subcategory. These three squares look like this: TestResponse.cs [DataContent (namespace = service) Default namespace, name = "test response")] Public Category TestResponse {{Database (name = "Test Pimentator")} Public Test Parameters Ultimate (Receive); Set; }} TestParameter.cs [DataContent (namespace = service. Default namespace, name = "test pammR") ] [Known Type (TestParameterSubclass)] Public Class TestParameter {[DataMember (name = "ParamName")] Public String Paramine {get; PublicPrintParameterSubclass: TestParameter (Set);}} Te...

How to open the Windows Store page for a specific WP app from a WP8 app (MarketplaceDetailTask?) -

To open the Windows Store page for the current app, we usually use code like this: MarketplaceDetailTask ​​MarketplaceExpositionTask = New MarketExtensionTask (); MarketPlaceDetailTask.Show (); But how can the Windows Store page open for any other published product? Am I correct if I make some calls like this: high success = Windows.System.Launcher.LaunchUriAsync (new URI ("http : // www? .windowsphone.com / s APPID = d1a235ce -... 040e ")); or: Web browser task assignment = new webbrowserTask (); Task.URL = "http://www.windowsphone.com/s?appid=d1a235ce-...-040e"; Task.Show (); Is there a dedicated task like MarketplaceDetailTask ​​to open a specific product page? just use MarketplaceDetailTask ​​ , which you want to show var marketplaceDetailTask ​​= new MarketplaceDetailTask ​​() with the application grid; MarketplaceDetailTask.ContentIdentifier = "d1a235ce -... 040e"; MarketplaceDetailTask.ContentType = MarketplaceContentT...

php - MySQL database insertion error -

I am uploading the images to a directory on a project and storing the image path in the database table. Image upload work is fine but my text input for name is not working I need your help. if (isset ($ _ POST ['upload'])) {$ path = $ path $ _ Files ['file_upload'] ['name']; Br / & gt; Uploaded, if (move_uploaded_file ($ _ FILES ['file_upload'] ['tmp_name'], $ path) {echo ".basename ($ _ files ['file_upload'] ['name']),"; Echo '& lt; img src = "gallery /'. $ _ FILES ['file_upload'] ['name']. '' Width =" 48 "height =" 48 "/> $; img = $ _ Files ['file_upload'] ['name']; $ Query = "imgtables (name, imgurl, date) value ('$ name', STR_TO_DATE ('$ dateofbirth', '% d-% m-% y'), Insert "$ img", now ()); if ($ sp-> query ($ query)) {resonant "br / & gt; insert db";} Else {echo "er...

system command not working in C++ -

I took the following program as root user in C ++ int Main () {if (system ("sudo sh -c sync")! = 0) cout & lt; & Lt; "\ N sync fail"; If (system ("echo 3> / proc / sys / vm / drop_caches")! = 0) cout & lt; & Lt; "\ NClearning cache failed"; } However, I know that the cache is not clearing and I am getting the following output: Sync failed clearing cache failed I do not know where I am wrong Someone can help me with this. Avoid such things better. You can just call (this is one of the few which can not be unsuccessful) You can call (as FILE * f = fopen ("/ proc / sys / vm / drop_caches", "r "); ...) then & amp; In the second case fclose ; You should always test against failure and use the perror in cases of failure. Therefore, sync (); FILE * f = fopen ("/ proc / sys / vm / drop_caches", "r"); If (! F) {false ("FOPN drop sign"); Exhaust (EXIT_FA...

javascript - AngularJS - call controller method after animation is finished -

I have a button and a hidden div when I click on the button, the division width will expand in my HTML is by now: & lt; Div ng-controller = "PageController" & gt; & Lt; Button ng-click = "toggle page ()> show details & lt; / div & gt; & lt; div class =" page-slide-animation "ng-show =" page "& gt; & lt; / div My administrator provides the following method: $ scope.togglePage = function () {$ Scope.page =! $ Scope.page;}; And this is my animation: app.edimation ('.page-slide-animation ', [Function () {return {first adclass: function (Element, className, done) {if (className ==' ng-hide ') {jQuery (element) .animate ({width:' toggle '}, function ) {Done ();}}}}}, removeClass: Function (element, className, done) {If (className == 'ng-hide') {jQuery (element) .animate ({width: 'toggle'}, function () {done ();})}}}}}}}); This works fine so far.What do I need to...

c# - Posting request to Amazon MWS services -

I was already wasting a few days on this issue ... The main problem is - I do not know how Posting data I would like to start by OrderReferenceDetails (API section: Stop payment to Amazon, Operation: GetOferenceDetails). As I understand, what I should do is calculate the signature. So using it, and taking values ​​in Scratchpad, I made a string, which I guess was the signature. This string looks like this posting mws.amazonservices.com/offeramazonpayments_sandbox / 2013-01-01 action = GetOrderReferenceDetails and AmazonOrderReferenceId = [_my order reference ID_] and AWSAccessKeyId = [_My Access key] & Amp; Vendor id = [_ my seller ID_] and signature method = HmacSHA256 and signature version = 2 and timestamp = 2014-11-04 t 12% 3a 15% 3a 38.1988397Z & version = 2013-01-01 So I have taken it hashes and have received the signature, then I should add this query parameter such as and signature = [_ clamped signature] to my line I use the function to calculate the si...

asp.net mvc - Consecutive AJAX Posts C# MVC -

I am trying to post continuously through AJAX, but do not post it for the second time, I think that The page does not reload this post from different cells in a table and goes to different functions and everything is located in the MVC section where I render everything. I am working in MVC and this is my view where the posts are. First post: & lt; Tr & gt; Using @Ajax.Beniform ("Change Contact Information", Null, New Ajax Option {updateTargetId = "profileTable"}, FormMath.post) () @ Html.TextBoxFor (x = & gt; X.CurrentUser.ContactInformation, new {name = "ContactInformation"}) button type = "submit"> Spara } & lt; / Tr second post: & lt; tr & gt; @ (Ajax.Benfinform ("Change support message", blank, new Ajax Option {UpdateTargetId = "profileTable"}, FormMath.post)} {& lt; td & gt; @ Html.TextBoxFor (x = & gt; x.CurrentUser.ContactInformation, new {name = "TemporaryM...

Receive an email in SQL Server to add data to a table -

I have set up an email account, which currently uses the MSDB database which is automatically generated. I have set up the email sent from the server that works fine, although I am not getting the answer in the database, nor the stand-alone email sent to the database has been sent, it appears only in the email account I am sending emails from ... Can someone point me in my help or right direction so that I can send an email to a SQL Server database to update a file, for example I would say I want this format In order to send a timetable via email: Monday 08:00 17:00 Tuesday 08:00 17:30 if it is stored In the database I know that I can read it and then change it to change it. I can actually innovate, actually its ability to send an email to an email with which I am facing problems. I am using SQL Server 2012 as 64 bit also

sql server - PHP insert array of values -

I am not able to work my INSERT statement. I know the problem is that I'm working on how to bind the parameters before I joined the compounding parameter. $ inventoryQuery = "insert list (Whse, product details, QtyOnHand, QtyUnavail, BinLoc1, BinLoc2, GLCost, OnhandTotalValue, UnavailTotalValue, GrandTotalValue) values ​​(,,,,,,,, ,, '?' '?' '' '?' '?' '?' '?' '?' '?' '?' '?'); "; // INSERT statement executed $ conn = $ global ['conn']; $ Stmt = $ conn- & gt; Ready ($ inventoryQuery); $ Stmt- & gt; Bypass (1, $ sqlV [0]); $ Stmt- & gt; Bindamaram (2, $ sqlv [1]); $ Stmt- & gt; Bendam (3, $ sqlV [2]); $ Stmt- & gt; Bindamaram (4, $ sqlV [3]); $ Stmt- & gt; Bindamaram (5, $ sqlV [4]); $ STMT- & gt; Bindamaram (6, $ sqlV [5]); $ STMT- & gt; Baidam Parm (7, $ sqlV [6]); $ Stmt- & gt; Bind Parm (8, $ sqlV [7]); $ STMT- & gt; Bind Parm (...

php - how to replace methods with phpunit -

Say that I would like to change a method in an object that can obtain a database from a database, whose data is already populated. How do I do this? According to ... setMethods (array $ methods) can be said on the Mock Builder object that they specify methods to double a configurable test The place with other methods has not changed the behavior. If you call setMethods (NULL), then no method will be changed. Great So she tells phpunit what methods I want to change, but where can I tell it? I I found this example: make secure functions hmoc () {Return $ this- & gt; GetMockBuilder ('Net_SSH2') - & gt; Disableonational configuration () - & gt; Setmethan (Aray ('__ Destruction')) - & gt; GetMock (); } Great - therefore the __ destruction method is being replaced. But what is being changed with it? I do not know. The source for this is: Whatever does not do with a method , But whose behavior you can configure later, though I'm not...

How can I add a second parameter to a macro in Clojure? -

I have the following closing rapping macro with 1 parameter: (defmacro with- Init "check" wraps the details given with an init check. "[Body] '(if (initial?) ~ Body (throw (illegalstate exception." GOIP DB has not been started ")))) I want to add it to ip-version so that I can check that just : IPv6 or : IPv4 Has been initialized. However, I do not pass the parameter: (defmacro with-init-check "wraps the statement given with an init check." [Ip-version body] `(if (Initialized IP-version) ~ Body (throw (Invalid Stats Expression. "GOIP DB is not initial.")))) When I use it like this, "No such thing" "if-two [space ..." on line: (defn-lookup-location "IP location information appears." [Ip ip-version] (With-init-check Ip-version (if-let) (Get location ip ip-version)] {ip: countrycode (.countryCode location): countryName (.countryName location): area (.region location): city (.city location...

For loop in logstash -

मेरे पास लॉगस्टैस में एक इवेंट है जो दिखता है: {"terms": { "ए": 1, "बी": 0.5, "सी": 1.6}} मैं इसे इसे बदलना चाहूंगा: {" शब्द ": [" ए "," बी "," सी "]} मुझे लूप के लिए कोई भी दस्तावेज नहीं मिला है या कुंजी प्राप्त हो रही है मैं ऐसा कुछ करना चाहूंगा: फिल्टर {कुंजी के लिए [शर्तों] {mutate {merge = & gt; ["Tmp_terms", कुंजी]} mutate {remove_field = & gt; ["शर्तें"] नाम बदलें = & gt; ["Tmp_terms", "terms"]}} कोई भी सुझाव? लॉगस्टैश में लूप का निर्माण नहीं है लेकिन आप रूबी प्लगइन का उपयोग कर सकते हैं: filter {ruby {code = & gt; "घटना ['नियम'] = घटना ['नियम']। कुंजी"}}

java - Issue regarding JSP Forward -

In my code, I am trying to forward my request using the request given below & lt; Jsp: Forward Page = "& lt;% = request.getContextPath ()%> / Welcome.do" /> Although the error below org.apache.jasper.jasperException: /obajsp/OBAHeader.jsp(3,27) jbwbe 004214: attribute Error in exposing Edit: It is currently working in production without any issue and is giving issue to my local IDE Have you tried using the language of expression rather than scriptlets? & lt; Jsp: Forward page = "$ {pageContext.request.contextPath} / Welcome." / & Gt;

networking - How to determine which Interface belongs to each Network Destination - Java? -

If my host is connected to several subnets (through different routes), how do I interface the same for the given IP Can I get it? In other words, when you are trying to use another host (or network destination, if you use the root print in Windows, CMD), then I How can I read the actual interface? Right now I am considering opening a CMD window, using the root print, parsing the output and writing your own method to determine whether the IP address xxx.xx.xx.xxx Network Destination Xxx.xx.0.0, related to the mask. .] And then to read this interface value, but definitely there should be an easy way. The short answer is that there is no real answer to this. I have to check how my interface with the device is communicated with 11.135.20.30 (for example). What did I do, the device I want to reach and then strip it and want to read feedback packages there I found the destination IP and hence the interface address which I had searched.

c# - TextBox is not invalidated for the second time -

On the button click, I'm validating that the value in the text box is valid: TxtName .GetBindingExpression (TextBox.TextProperty) .UpdateSource (); And the text box is highlighted near the red border and error tip. Then I switch to another tab. Come back - clicking on the text box has not highlighted any more, I confirm again and the verification rule works fine and wrong, but the textbox is still not highlighted. How to highlight textbox again as invalid? Validation rules: public class text Requirement: Validation rules {public override Validation functions validate (Object value, Kalcrinfo Kalcrinfo) {var text = Value as string; Return new verification (string. ISNLLarlety (text), "Please, enter ALLEY"); }} Verification error ad (red rectangle) is being displayed in a drunken The layer that is related to some ancestors of TabControl when you switch tabs, the contents of the original tab are fluctuating, and at that point, the adorner is remov...

database - Login display error message -

I need your program on a user logs in a database. It has a diver numbers (such as a user name) and a password that already exists in the database. Unfortunately, I just do not know SQL and instead I will use it as a technique here. I get an error message in the run time which says: adotblDiversInfo: this action can not be performed on a closed dataset. In advance (you thank you very much for your help: This is my code: process TfrmHomeScreenkbtnLogInClick (Sender: TObject); var iDiverNumber: integer; sPassword, sKnownPassword: string; bFlagDiverNumber, BFlagPassword, results: boolean; start iDiverNumber: = StrToInt (ledDiverNumber.Text); sPassword: = ledPassword.Text; frmDM tax adotblDiversInfo.filtered with: = false; frmDM.adotblDiversInfo.Filter: = 'Diver Number' + IntToStr (iDiverNumber) ; frmDM.adotblDiversInfo.Filtered: = true, if frmDM.adotblDiversInfo.RecordCount = 0 then ShowMessage (IntToStr (iDiverNumber) + 'can not be found ") and sKnownPassword: = fr...

javascript - Change text on html button with class -

I have a button that I use to call back code in my aspx file. I'm not trying to change the text on the button. HTML: & lt; Button class = "radius button" runat = "server" id = "button" click on onsource "button" upload click "> execute SQL & lt; / button & gt; Here is javascript: & asp: Content ID = "Content2" ContentPlaceHolderID = "ContentPlaceHolder1" Runat = "server"> -%> link rel =" stylesheet "href =" stylesheets / foundation.monsss "& gt; ; & Lt; link rel = "stylesheet" href = "stylesheet / app css" & gt; & lt; script src = "javascripts / modernizr.foundatio N.js ">

java - How to configure hibernate properties without persistence xml -

मेरे पास स्प्रिंग एमवीसी वेब सेटअप है जो स्प्रिंग ओआरएम / हाइबरनेट फ़िरिसेंस लेयर के साथ है मैंने अपने LocalContainerEntityManagerFactoryBean को एक पैकेज पर स्थिरता इकाइयों के लिए स्वत: स्कैन करने के लिए कॉन्फ़िगर किया है इसलिए मुझे दृढ़ता से xml कॉन्फ़िगरेशन की आवश्यकता नहीं है मैं अपने बीन्स कॉन्फ़िगरेशन को कैसे सेट कर सकता हूं ताकि वह उत्पन्न प्रश्नों को दिखाए और स्टार्टअप पर मॉडल परिवर्तनों के साथ डेटाबेस को रिफ्रेश कर सकता है? स्थानीय कंटैनेरएन्टीएटीएमएनेजरफिचरबेन विस्तारित करता है सारएन्टीटिनेएजरफायरबेनबेन , जिसमें setJpaProperties (properties) विधि है। आप इस विधि से इस बीन पर कस्टम गुणों को पारित कर सकते हैं। गुण गुण = नया गुण (); Properties.put ("hibernate.show_sql", "true"); Properties.put ("hibernate.hbm2ddl.auto", "create-drop"); entityManagerFactoryBean.setJpaProperties (गुण); या यदि आप इसे स्प्रिंग कॉन्फ़िग फाइल में करना चाहते हैं: बीन आईडी = "entityManagerFactory" class = "org.springframewor...

android - Create three specified APNs for each mobile providers - automatically add APN -

How do I add APIs automatically? We have 3 mobile service providers (those providers will get inserted SIM cards and local carriers which are not listed globally) - For Pro, Probe and ProCo for PROA, name: A 1, APN: APN 1 For Probe, Name: B1, APN: APN 2 For ProC, Name: C1, APN : APN 3 - When I click the button I want to add 3 buttons to add favorite buttons of each APN Construction. How can I write this code and edit it in the manifest file?

java - Primefaces ConfirmDialog not vertically centered in form updated with ajax -

I have a form that "increases" when some operations are clicked through Ajax + Rendered. The problem is that my P: confirmDialog is not vertical when the form grows. Remove or add the attribute "appendToBody" When in "normal size", the dialog is centered correctly. Overwrite the "Top" in the CSS Is this an issue from Primates (currently using V4) Or am I doing something wrong? Since I use a lot of "rendered" features, do I want to "re-submit" the dialog? Here is a snippet of my code. & lt; H: form id = "myForm" & gt; & Lt; P: Field Set Legend = "Hello" & gt; & Lt ;! - Many things here - & gt; & Lt; / P: fieldset & gt; & Lt; P: spacer height = "20px" /> & Lt; P: FieldSet Legend = "Dashboard" ID = "This OnMakek The Formuli" is provided = "# {Beninduind or Bean Edit}" & gt; & Lt ;! - This is a lot of...

testing - Pass arguments to App object in Scala -

I am currently scalatest.org with some unit tests for my application: scala & gt; Object Test App {| Printlain (args) | } How can I pass the parameter to that object? I tried to override the value of arguments , but after a few research I came to know that it is not possible: / ** to apply the command line arguments Has been passed in the 'main' method. Array [string] = _args Private var_args: Array [String] = _ _ How do I pass a custom parameter in the code? Cheers I think that you main (argues: array [String]) The app wants to invoke the inherited method. scala & gt; Object Test App {args.foreach (println)} extends defined object test scale & gt; Test. Main (Array ("A1")) A1 Scale & gt; Test. Main (array ("A1", "A2")) A1A2

Show different custom login screens for different sets of Pentaho solutions -

I have two sets of solutions targeted at different users (ex: finance and operations). They are basically made of CDE dashboards. I want to present a different Penthouse Long screen for each solution, as they are shown that they are separate "applications", or a different group of dashboards Has there two customized login screens which can be brought according to a parameter or can be switched? Like the URL, say, sending and topic = new app? Has anyone done this? I've customized the login screen and created themes in Penthouse, so I know the basics. I am using Penthouse 5.2 CE Thank you! You will need to change the Login Redirect Filter. Every time you come to the Penthouse URL and you do not have a valid session that has been sent to the Pantheo / Login page. Then you have two options: change the redirect class so that it can be redirected to different login pages depending on the URL or the referral URL is parsed by the login page and depending on i...

meteor - Iron Router handle post data (file) on server -

It looks like you can define postal routes on the server and answer them - by looking at the document for iron router, though i can not see how to get the data posted. With the following coffee-script code: router. Return '/ test', where: 'server' .post - & gt; Console.log @request@response.end 'Hello \ n' I can request a post (form-data with JPG image) and get a 'Hello' response But the requested file / data requested on the console @log @ server is not included anywhere - I was expecting to find it in the request. Anything is empty .. Any thoughts? In view of the logic behind this, large amounts of image uploads have to be handled by the client from time to time on the server. Colfifax, although binary / data designed for uploads seems to be that it and node process rocket The CPU seems to be very slow to use, so I'm seeing the cheapest way to transfer files. Iron router got a solution through the busboy in the Gitob issue:

ios7 - Different NSError localizedDescription between iOS 7 and 8 -

How was I testing how my app shows mismanagement when not connected to the Internet and I saw that iOS 7 And 8 different error messages return to NSURLErrorNotConnectedToInternet (-1009) iOS 7 error Error domain = NSURLErrorDomain code = -1009 "Internet connection appears offline." UserInfo = 0x17d5edc0 {NSLocalizedDescription = Internet connection appears offline., NSUnderlyingError = 0x17ecdd20 "Inter Net connection appears offline. "} iOS 8 error error domain = NSURLErrorDomain code = -1009" action Can not be completed. (NSURLErrorDomain Error -1009.) "UserInfo = 0x1740f9c80 {_kCFStreamErrorDomainKey = 12, _kCFStreamErrorCodeKey = 8, NSUnderlyingError = 0x17405dd90" operation could not be completed. (KCFErrorDomainCFNetwork Error-2009.) "} Is there a way to generate an error message from iOS that will be similar to both iOS 7 and 8? Use the code, this is the same. If they choose to update the error message in iO...

php - encrypted object in mysql -

I am working to upgrade the old php system to .net I have difficulty reading the value from the column type of long text The data is being encrypted and I do not know what was used to encrypt the data. This encrypted data has approximately 1800 rows in the vertical column. I tried to run a selection that makes the system unstable, but was still able to get the value that is too big for the cell. A specific value looks like this O: 8: "cuesheet": 13: {s: 2: "db"; O: 6: "db_log": 23: {s: 4: "user", o: 8: "auth_acl": 17: {s: 16: "broadcast_groups", a: 3: {i: 0; S: 23: "broadcast_administrator"; I: 1; S: 23: "broadcast_cuesheet_user", i: 2; S: 21: "onmusic_administrator";}: 2: "db"; O: 8: "db_mysql": 25: {s: 6: "_debug"; B: 0; 19: "_default_error_mode", NK: 22: "_ default_error_options", NK: 22: "_ default_error_handler" of: 0: "...

python - pandas reindex with data frame -

I have a data frame with a multi index with three levels, for example: COL1 COL2 ... POS label chr1 43 str ... ...... ... strb ... ... ... 66 strc ... ... ... strb ... ... ... chr2 29 strD ... ... ... ... ... ... ... ... and the first two With a multi-functional level of a series dataframe index: val serum POS number 1 43 V166 v2cr2 29v3 ... ... ... I like to add a column with serial to DataFrame , Values ​​v1, v2 ... for each index that matches the first two levels, such as: COL1 COL2 new ... CHROM POS LABEL chr1 43 stra .. ... v1 ... strb ... ... v1 ... 66 strc ... ... v2 ... strb ... ... v2 ... chr2 29 strD ... .. V3 ... ... ... ... ... ... ... ... Note that there are no missing rows in the series, that is, There are also all in the dataframe (COOM, POS) series. I have a working solution: pandas.Series (variant_db.index.map (lambda i: cov_per_sample [sample] .loc [i [: 2]]), index = variant_db.index ) However, due to that lambda, it is very slow for large...

unix - script like logging utility for windows -

The Linux system provides a good tool (script) that can log terminal studout data into a file. To turn on logging: script [option] [file name] To stop logging: exit I'm looking for a similar utility for windows console and powershield (or support any native windows to log the session). Note: Please do not suggest. I believe that you are looking for. Keep in mind: It will not work in the ISE. Do not forget the stop-transcript at the end of your script!

c - Undefined reference SDL - Probably bad command to compile -

I am trying to create my SDL 2.0 hello world: GCC-O Test Test.c -lmingw32 -lSDL2main -lSDL2 - & gt; SDL_Init undefined reference or include it in: GCC-ic: \ minidie \ SDL2 -o test test.c -lmingw32 -lSDL2main -lSDL2 - & gt; Still unspecified references or this: Include in GCC-I "C: \ mingw \ SDL2" -o test test.c - Lmingw32 -lSDL2main -LSDL2 - & gt; No or include it in: in GCC-IC: \ minidie \ SDL2 -LC: \ minijew \ lib -o test test.c With -lmingw32 -lSDL2main -lSDL2 or "" . I can not find an easy-to-read document about how to compile a simple code.

gsettings - How to handle errors while using Glib.Settings in Vala? -

I am using Glib.Settings in my Vala application. And I have to make sure that my program will work properly even if the schema or key is not available. So I've added an attempt / catch block, but if I'm using the key that does not exist, the program segfaults. As I understand, it does not even reach the catch statement. Here is the function that uses the settings: GLib.Settings settings; String token = ""; Try {settings = new GLib.Settings (my_scheme); Tokens = settings.get_string ("token1"); } Hold (error e) {print ("error"); Token = ""; } Return token; and program output is: (Main: 27194): GLib-GIO-ERROR **: Settings key in schema 'my_scheme' Token1 'trace / breakpoints trap (core dump) (Of course I am using my real scheme instead of my_scheme) Can you suggest me where I am wrong? Methods, code in get_string GLib.Settings > Do not throw exceptions, they call abort inside the library. This is not...

c# - WebClient DownloadFile is in use by another process -

I am getting an error that my file is in use by another process, I believe this is because It is not complete downloading before entering the experiment statement? Below is my code, I have tried to invoke my download in Async and one downloadcompleted but it still produces the same problem. To ensure that the file was released to release the file was recommended, but it also does not help any help would be greatly appreciated. if (file.path.Contains (".zip")) {WebClient downloader = new WebClient (); Console WrightLine ("http://directory.com/api/download" + file.path); String download link = "http://directory.com/api/download" + file.path; Downloader Download file (new url (download link), "temporary."); Downloader.Dispose (); (Using LdifEntryReader LDIF = new LdifEntryReader (New LdifReader ("temp.ldif")) {for (login entry = ldif.ReadEntry (); entry = null;; entry = ldif.ReadEntry ()) Console.WriteLine ("Found: {0}",...

sql loader - SQLLDR CTL: Load date field received in DDMonYYYY to db fields with formats of YYYYMM or MM/DD/YYYY -

I have the source date data in the format of DDMonYYYY (e.g. 25Jan2014). I am using sqlldr to load the data in two different formats (1) YYY YMM and (2) MM / DD / YYYY in different areas. How do I accomplish this? Thank you. I think you are putting the data into a varchar2 column, so the lines of control file are required Look at something like this where the data is being covered by the way to change the formatting. First, to change it in a date, then use to_char to format it: , DATE_RX_WRITTEN CHAR "to_char (to_date (DATE_RX_WRITTEN, 'DDMONYYYY'), 'YYYYMM')" , DATE_RX_WRITTEN CHAR "to_char (to_date (: DATE_RX_WRITTEN, 'DDMONYYYY'), 'MM / DD / YYYY')" If you enable it, consider making a date datatype in the table and change it on the way. This way you can convert it when you select it instead: , DATE_RX_WRITTEN DATE "DDMONYYYY"

javascript - Get textarea value inside iframe -

I can get text from textarea with my current code but I want to receive it When an iframe has textarea , is it possible? My current code & lt; Script & gt; Function get_text () {var value = $ ('textarea'). Val (); . $ ('# Show_value') HTML (value); } & Lt; / Script & gt; & Lt; Text area & gt; & Lt; / Text field & gt; & Lt; Div id = "show_value" & gt; & Lt; / Div & gt; & Lt; A href = "#" onclick = "get_text ()" & gt; Click to show me text & lt; / A & gt; Trying to edit code like code below code but it did not work = "Snippet" data-lang = "js" data-hide = "false"> & Lt; Script & gt; Function get_text () {var value = $ ('iframe textarea'). Val (); . $ ('# Show_value') HTML (value); } & Lt; / Script & gt; & Lt; Iframe src = 'http: //check0909.vv.si/s.html'> & Lt; / Iframe ...

c++ - STL Algorithm for generating a vector -

I want to generate a vector using the STL algorithm to get the following Const int n1 = 10; // This is a content offset = 3; // also std :: vector & lt; Int & gt; Chans (10); For (size_t i = 0; i & lt; chans.size (); i ++) {chance [i] = offset + n1 * i; } Any suggestions? 14 with C ++: std :: generated (Chans.begin (), chans.end (), [=, calculation = 0] () instability {return offset + n1 * calculation ++;});

sql - Issue with CASE statement not giving correct value -

मैं SQL डेवलपर में निम्नलिखित CASE कथन का उपयोग कर रहा हूं: मेरे परिणाम खाली हैं जब मुझे कम से कम N प्राप्त करना चाहिए। यदि आप सभी चाहते हैं कि 'एन' प्राप्त करना है, जब आपकी अन्य स्थितियां पूरी नहीं होती हैं, तो आप ELSE कीवर्ड का प्रयोग कर सकते हैं: मामला जब ([दवा] = "एन") और ([नाम] = "एसटीएमईएस") और ([मूल इकाइयों] रिक्त नहीं है) तब "वाई" जब ([दवा] = "एन") और ([नाम] = "स्टाइट्स") और ([मूल इकाइयों] नल है) तो "एन" जब ([दवा] = "वाई") और ([नाम] = "स्टाइट्स") और ([मूल इकाइयों] रिक्त नहीं है) तो "एन" जब ([दवा] = "वाई") और ([नाम] = "STYMES") और ([मूल इकाइयों] शून्य है) फिर "वाई" और "एन" एंड

arduino - Coding multiple Piezos in C# -

Can someone help me write this function? At two different pizzas, I should be able to play two different tunics at a time. What should I change my code? zero beep (unsigned four speaker pins, int freq1, int freq2, milliseconds in long) {int x; Long-term 1 = (long) (1000000 / freq 1); Long delayed 2 = (long) (1000000 / freq 2); Long Loptim = (Long) ((Time Inmilicand's * 1000) / (Delay 1 * 2)); For (x = 0; x & lt; loopTime; x ++) {digital white (speaker pin 1, high); DigitalWrite (speakerPin2, high); DelayMicroseconds (delayAmount2); DigitalWrite (speakerPin1, less); DigitalWrite (speakerPin2, less); DelayMicroseconds (delayAmount2); You should use timers and interrupts to provide more accurate time, And run from loop () independently. There is already an Arduino function, tone () which plays a note at one time, but it can not be optimized as more than one because it Depends on PWM of a timer. Instead, you will need to write an interrupt service routine that toggle...

angularjs - ngMock is throwing template load error because of ngRoute's $routeProvider...? -

I just include ngMock in my project because I need $ httpBackend for this I have a bunch of Karma / Jasmine tests , And after adding NMMock, it is breaking due to an error: PhantomJS 1.9.7 (Windows 7): 41 successfully executed (0 seconds / 0 seconds) phantamJS 1.9 .7 (Windows 7) Error Error: Unexpected Request: Get Home / HomeOct C: / dev / app / bower_components / angular-mocks / angular-mocks Do not expect more requests at .js: 1181 It seems that it does not like the NGRUT / $ route provider, in particular it breaks otherwise / redirects on the Toto Statement. . If I comment on that section, the Karma / Jaskar test works without any errors. $ route provider. When ('/ house', angularAMD.route ({templateUrl: 'home / home.html', controller: ''})). Otherwise ({redirectTo: '/ home'}); Notice, I am using angularAMD to load lazy, but whenever I rewrite that segment with just {} without angularAMD.route (), it throws the same error. I.e.: $ rou...

java - Camera moving along with the background out of sync in LIBGDX -

I have a phantom that I am running around the world; When the user touches the screen, its velocity has increased based on its constant acceleration. I also transferred the camera with this Phantom; But I also have a BG image which needs to be still on the screen so that the camera moves with the exact speed and acceleration in the form of the background image so that it looks like the background is still though, I am between the camera and the background image Looking a little bit from synchronization; Background should still be, but it is not: @ Override Public Zero Render () {Batch.SetprogressMatics (camera.combined); World_velocity + = Acceleration; Back.setPosition (back.getX), back.getY () + world_velocity); Camera.position.y + = world_velocity; Camera.update (); } How can I sync a Bg image with the camera so that the BG image still persists? Note: If I use constant velocity (no update on acceleration), then there is no problem.

jquery - How to adjust data table column width -

I'm trying to set the dataset column width. Datatelle ({"Order": [[0, "desc"]], "Column deafs": [{"width": "" "100px", "target": 0}, {"width": "400px" "Target": 1}, {"width": "200px", "target": 2}, {"width": "200px", "target": 3}, {"width": "200px", "target "": "}": "200px", "target": 5}, {"width": "200px", "target": 6}, {"width": "200px", "target": "}", " True, "sPaginationType": "Bs_two_button", "info": false, "fnDrawCallback": function (oSettings): "9", "scrollX": true, // "sScrollX": "100%", "paging" {$ ('Td'). RemoveClass ('sorting_1');}}}; How to explicitly insert column...

vb.net - Text box cursor manipulation -

I was fortunate to find a solution to my problem, so I have come up with a new one. My program is multi-tab calculator, and for the user input I am making a goal for full keyboard navigation. I have my boxes in a grid, and the keypointe for every box is all that allows the user to navigate between the boxes to hide the arrow keys, using the arrow. I have a problem in finding out, if I input something in the box and make a mistake (during the runtime), then I have to either equalize the number of X and type it again Or change the cursor to a single character in the situation I'm looking at the need to use the left and right arrows to navigate the cursor position in the text box, but want to keep some navigation functions I So I have some questions based on this. / P> Is there any way to detect the position of the cursor in a text control? If so, then the cursor position is called numeric? That is, at the beginning of the position = 0 box, position between first and sec...

php - Autoloading Namespaced Classes -

I have searched high and low for an answer and have tried every example, but it is still my classes I fail to find why I'm receiving critical error: class 'project murphys \ model \ database' on C: \ Portables \ xampp \ htdocs \ ProjectMorpheus \ config \ config.php line 23 Not found Namespace Project Murphys \ Model; Finally, there is a function autoloader function in my config.php (note: __SITE_PATH = 'C: \ Portables \ xampp \ htdocs \ ProjectMorpheus \'): / P> / *** auto load model class *** / function __autoload ($ square) {$ parts = explosion ('\\', $ class); __SITE_PATH Include 'Model /'. End ($ parts) '.class.php'; } $ Dbh = \ ProjectMorpheus \ Model \ Database :: getInstance ($ DSN, $ username, $ password); The spl_autoloader appears to be used, but why? My only guess is that $ square is not equal in both instances. My spl_function looks like this: spl_autoload_register (function ($ square) {$ parts = explosion...

visual studio 2012 - VS2012 Project Reference's Properties' path does not match .vbproj HintPath -

My goal was to update a reference to a new version from my old DLL that was updated in VS2012. D: \ God \ & lt; Old_path & gt; \ TEST \ bin \ Company.dll D: \ DEV \ & lt; New_path_2012 & gt; \ TEST \ bin \ Company.dll In the .vbproj file ... & lt; Include references = "company, version = 0.0.0.0, culture = neutral" & gt; & Lt; SpecificVersion & gt; False & lt; / SpecificVersion & gt; & Lt; HintPath & gt; .. \ .. \ & LT; New_path_2012 & gt; \ Test \ bin \ Company.dll & lt; / HintPath & gt; & Lt; / References & gt; In the Solution Explorer, under context, I right-click on the context of the company and click Properties. The path is listed as ... D: \ DEV \ & lt; Old_path & gt; \ TEST \ bin \ Company.dll \ n \ / code> There are no errors or warnings are appearing to produce everything properly, but due to this discrepancy, I lack the confidence. How can I fix this? I tried to...

php - Website not working after uploading files via FTP -

I have a website written in PHP, which is running on Apache server. In the past, I make a change to a file, upload it back to the server on FTP, and see the changes I see in the browser. Recently, I've made changes to several files (I've changed all references from 'http: //' to '//' because we're using SSL), and I've used the entire site via FTP Uploaded on, but all the changes overwritten the server (I used the FileZilla client) Now, when I navigate to my site in the browser, nothing is visible (it is only empty). I tried to change the permissions (755 for the first directory and 644 for the files, then 755 for everything, 777 for everything then), but that was not working, is it possible that the upload broke something ? I am trying to figure out if it was an upload that broke something or if it was done for actual changes. thank you in advanced!

angularjs - Windows 8 and href -

I am trying to convert an AngularJS web app into a multi device app. On the web application I used ngRoute to basically do something like app.config (['$ routeProvider', function ($ migration provider) {$ routeProvider. ('/ Home', {administrator: 'homecount', template url: '/scripts/app/modules/home/home.html'}) }]; and index html in the page below as a simple href and ngView: ng-href = "# / Home"> Go home & lt; / a & Gt; & lt; div data-ng-view = "" & gt; & lt; / div> If I run an app in the rapel for Android, then go Works like, but does not work at all on Windows or Windows ARM! It seems that it does not explain # on the link. How can I solve it? Thank you! I thought this and thanks for that too! Actually the problem is that when the app is published as a Win app, Href is provided with a prefix such as 'unsafe: MS-APX'. {$ CompileProvider.aHrefSanitizationWhi...

java - Generating unique auto-incrementing instance IDs -

I'm trying to create unique IDs for examples of class starting with 1 like: public abstract class foo {static id = 0; Final intestinal id; Public foo () {this.id = ++ id; }} Then I realized that I have many classes that require this behavior, and so I tried to inherit a abstract class But I got it Edit: / Em> I did not clarify this, but for each subclass The requirement of indexing is not only unique, but also continuously. For example, if I inherited from the bar and baz foo : bar b1 = new bar (); Falcon B2 = new falcon (); Bar b3 = new bar (); should be b2 id == 1 , and b3 should be id == 2 . Not really! There are some things you can try: Create a IDGenerator class with a static method to create a new ID for a specific code. .generate () method in class Hashmap mapping will retain sections. It will keep all logic in one class, but in reality does not simplify things. Use a similar reference for each new instance of a IDGe...

Import JavaScript Polymer element to Dart -

How do I import a polymer element made with JS for dart? Is it possible to use one automatically or do I have to translate it to its internal JS in DART? Try to use the package that you want to create wrappers for core- and paper-elements is used to. See also

ios - How to force SCNView to render a new frame? -

Is there no animation inside the scene, so no way to force SCNView to present a new frame on demand is? If the scene gives static SCNView exactly once and then after a few changes Usually this is understood, but I am working together, which works with the Enhanced Reality framework of Vaforia , For which I have to provide a new frame every time to process a new video frame from the camera. I have worked on this issue by creating our own UIView with CIAAGLLear which presents the scenic content using SCNRenderer. It works very well, but I'm curious if there is any way to do this with SCNView, then I can save myself from touching OpenGL directly. you game property to yes

java - Math.pow yields different results upon repeated calls -

Errors were reported in our testing system after upgrading to Java 1.8.0_20, but the code did not change. I came to know that, Math.pow () is called with the same input parameter, generates different results on the call that is sent again. In Java 1.8.0_11, it behaves as expected and always gives the same value, but sometimes with Java 1.8.0_20 and sometimes even slightly different values. This is similar to the question, but it is different because the results are different (Pau) within a VM. The following Jute Testing fails when running under Java 1.8.0_20 and higher . Import static org.junit.assert.assertEquals; Import java.util.function.BiFunction; Import org.junit.BeforeClass; Import org.junit.Test; Public Class PowersTest {Private Static Final NN = 1000000; Private stable final double base = 5350.45632 9377186; Personal stable last double app = 2.0; Private Stable Double Eval (Last Biology & Lt; Double, Double, Double & gt; F) {Return F. Apli (base, APP); } Priv...

python - Matplotlib offset errorbar bug workaround? -

बग यहाँ प्रलेखित है: और यहाँ: असल में, मार्करों को 1 पिक्सेल से हर समय बंद कर दिया जाता है .. अगर आप दूसरे प्लॉट पर बारीकी से देखते हैं तो आप इसे मटप्ललिब के ट्यूटोरियल पृष्ठ पर भी देख सकते हैं: यह बहुत निराशाजनक है मैं मैटलप्लीब से प्रकाशन-गुणवत्ता वाले भूखंडों का उत्पादन नहीं कर सकता, और मुझे आश्चर्य है कि यह तय नहीं किया गया है। किसी भी मामले में, मेरे पास बहुत अधिक समय और कोड है जो कि एक अलग पैकेज पर स्विच करने के लिए matplotlib में निवेश किया है। तो मेरा सवाल है कि आप एक वैकल्पिक हल करने के बारे में कैसे जाना होगा? मुझे लगता है कि एक समाधान, मार्करों को 1 पिक्सेल त्रुटिबार से बाएं / दाएं को छाननी है मुझे नहीं पता कि यह कैसे करना है। मुझे पता चला कि कैसे मेरे साजिश बिंदुओं के डिस्प्ले निर्देशांक प्राप्त करने के लिए, लेकिन मैं एक इंटरैक्टिव प्लॉट कैसे कर सकता हूं जो 1-पिक्सेल ऑफसेट को सुरक्षित रखता है? मैं उन्हें 1-पिक्सेल ऑफसेट के साथ साजिश कर सकता हूं, लेकिन फिर आप भूखंड को ज़ूम या हेरफेर नहीं कर सकते।

c# - How to Detect css style by iPhone/iPad -

I want to change CSS style according to the tools. This is my. CSS file is // desktop @ media only screen and (minimum-width: 1224px) {. Pages {width: 990px; Margin-left: auto; Margin-right: auto; } Labels {font-family: verdana, ariel, non-serif; Font-size: 0.8 AM; //} ipad @ media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {. Page} {width: 100%; Margin-left: auto; Margin-right: auto; }. Details {Min-Height: 125px; Minimum width: 500 px; } Labels {font-family: verdana, ariel, non-serif; Font Size: 0.8M! Important; }} Media only screen and (minimum-device-width: 320px) and (max-device-width: 568px) // Iphone {Input [type = "text"], input [type = "password"] {width: 50px; }} but it has not changed. It just changed the desktop I was not working Pad and the iPhone. Please tell me what is wrong with my code. Try Media only screen and (minimum-width: 768px) and (max-width: 1024px) and not @ media only scre...

powershell - Struggling with foreach -

I am new and, well, awesome on this whole scripting thing: so any help would be appreciated. Actually I am trying to create a PowerShell script which installs an undetermined number printer on an undetermined number of computers. The computer name and printer name will come from local text files. This is what I have done so far: $ credentials = gate-credential $ printerlist = Get-Content C: \ setup \ printers.txt get-content c : \ Setup \ names.txt | Foreach-object {forefront printer ($ printer in printer printer) {rundll32 printui.dll printUIEntry / ge / c $ _ / n $ printer}} Edit: I'm getting the error, Unable to complete the process of per-machine printer connection can not be completed (error 0x0000007b) I tried to modify the script, but I can come up with it, which should probably be in lesser way. I do not think you have an issue with your foreach loop. I think this is the only use of rundll32 printui.dll printUIEntry sets the default printer: rund...

SQL Server CTE with Multiple Levels -

I am playing around CTE in the STP server, but I do not know how this task can be accomplished. I have the same table: ParentID, FolderID, name1, 1, folder1 1, 2, folder2 1, 3, folder3 2, 4, Folder 4 What I'm trying to do: Folder_Name, Folder_Path \ '\' lists all folders for the very parent in the same line Example above From: Folder4, Folder1 \ Folder2 \ Folder4 Is this possible? This is for an application that we use which has a front end; However, insects prevent us from doing anything and we are trying to copy the same using backend. Thanks

ios - Mobile sending message to each other with rails backend -

I did a search but none of them meets my needs, I can search for the wrong keywords If this is the case then please indicate me right direction. I have railways for Android and iOS customers app and backend. I mobile users can enter their account and send messages to their friends. Right now I am using http request + push notification, to implement it. More specific, we will send the customer a and b , a with a message to B , and The server will push that message to B and add that message to the table with message with the unread property if b open message page, a and b will be read . After doing some research, I realized that both A and B are sending messages for each other (i.e. Sending message page of A to B , and vice versa), it would be better to use socket to send messages, more efficient now my question That I should use the rail code as the server socket and each customer just join the server , or A or B server socket? If rails in the ...

Find all multivalued dependencies of a relation -

Image
Can anyone explain how to get all the multipurpose dependencies of the following relationships? I understand that any FD is also an MVD, so given from that definition Although the FD is a MVD, I have been lost to find all other MVDs First of all Remove "office" from "employee" by projection. Emp_offices ( name ) Now the "employees" are in BCNF, and at least emp_offices Is in 5NF. Next, "name" - >> "work" is a multi-layered multilevel dependency, and "name" is not a superk in "employee"; Remove "work" from "employee" by launch Employees ( names, projects ) emp_offices ( names , office) Emp_tasks ( names, Work ) All three of them are at least 5 NF. I have an "employee" relationship, because now it is not meant to be with the employees. Emp_projects ( names, projects ) emp_offices ( names emp_tasks ( names, Work ) If you need an algor...

javascript - jquery click handler only fires once -

Images used to show / hide content under a heading & lt;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Body & gt; & Lt; H2 & gt; Title & lt; / H2 & gt; & Lt; P & gt; Content & lt; / P & gt; & Lt; / Body & gt; & Lt; / Html & gt; $ (Document) .ready (function () {var $ imag = $ ("& lt; img src = 'arrow_down.jpg' & gt;"); var $ imag2 = $ ("& lt; img src = 'arrow_up $ ($ Imag); $ ($ imag) .on ("click", function () {$ ("p"). Hide (); ($ imag) $ (" $ ($ Imag2) .on ("click", function () {$ ("p"). Show (); ($ imag2) .remove () ; $ ("H2"). Attachments ($ imag);});}); $ (document) main (ready); The first time you click on the images click But the next time you click on it, this page will not even be without refreshing. The reason for this is that item handlers such as click () should be linked to elements that are already in ...