Posts

Showing posts from March, 2010

How can I send a file/script from client to server using Jquery? -

I have a file in a client folder that contains some PHP scripts to be sent to the server. The file name is known and We do not have any users in the client side to browse the disk and then upload the file (I have shown some code on the internet how to upload the file from the disk to the server). I have to know how I can give a file name in jquery and can send the file to disk on the server and store it anywhere on the server. I think it is related to some security risks, but it is only for an experiment that is difficult to understand. Note: I do not need the code for which the user select "file" and then press the upload button. Further note: Consider the fully-running web-based application with 5 sub-tasks in the client side (local web server). At runtime, we decide to run 2 of the 5 tasks inside the local web server in the client side and upload it to the server for the rest. So how should this script be separated from the customer? It does not need to be fi

google chrome extension - Replacing user selected text in Javascript -

It was Google for a while and it seems really simple, but I can not exclude this issue . I have a Chrome extension, where you select some text, you right click and there is a button that makes some calculations on the selection. But for some reason, I can not reveal the selection in a warning window. if (window.getSelection) {window.alert ("what is entered if window.getselection"); Sel = window.getSelection (); Window.alert (SEL); } So if this enters the statement, first displays the warning, then the second warning is empty. My mind is trying to do this work, it feels like it will be so easy that I can remember it. Besides, what would be the best way to change the selected text? Thank you. Edit: You wanted to see my manifest file. "" Name ":" Convert "," Details ":" Laurem "," Version ":" 0.6 "," Permissions ": [" I thought "context menu", "tab", "windows"

objective c - NSMutableOrderedSet addObject not ordered -

मेरे पास एक NSMutableOrderedSet जिसमें NSDate ऑब्जेक्ट हैं प्रारंभ में, यहां मान हैं: 2014-10-08 12:46:48 +0000 2014-10-08 12:46:42 +0000 < पी addObject को कॉल करने के बाद 2014-10-08 12:45:40 +0000 , मुझे निम्न आउटपुट मिलता है: 2014 -10-08 12:46:42 +0000 2014-10-08 12:46:48 +0000 2014-10-08 12:45:40 +0000 क्यों नहीं हैं वे आदेश दिए हैं? एक NSMutablOrderedSet एक जावा TreeSet जैसा नहीं है जिसे सॉर्ट किया गया है। addObject: दस्तावेज़ीकरण देखें: किसी ऑब्जेक्ट को म्यूटेट किए गए ऑर्डर सेट के अंत में जोड़ता है, अगर यह पहले से ही सदस्य नहीं है। या कोड> - (शून्य) सॉर्ट यूसिंग कॉम्पापेरेटर: (एनएससीसमपैर) सीएमपीटी

pivot - SQL - How to place sequence of order of events for one person in one row? -

मेरे पास निम्न तालियां हैं: ग्राहक तालिका ग्राहक_आईडी 1 2 3 आदेश तालिका Customer_ID Order_ID ब्रांड Order_Date 1 101 A 01/02 / 2010 1 102 बी 05/02/2010 1 103 ए 06/01/2014 2 104 बी 02/01/2013 2 105 डी 02/02/2013 3 106 ए 07/03/2013 3 107 बी 07/04/2013 3 108 सी 07/05/2013 3 109 डी 07/07/2013 3 110 ई 07/11/2013 मैं यह कैसे प्राप्त करने के लिए दो अलग तालिकाओं से इस डेटा को स्थानांतरित कर सकता हूँ एक परिणाम विंडो: ग्राहक आदेश 1 क्रम 2 क्रम 3 आदेश 4 आदेश 5 1 101 102 103 2 104 105 3 106 107 108 109 110 ग्राहक आदेश 1 क्रम 2 क्रम 3 आदेश 4 आदेश 1 1 102 102 103 2 104 105 3 106 107 108 109 110 ग्राहक ऑर्डर 1 ऑर्डर 2 ऑर्डर 3 ऑर्डर 4 ऑर्डर 5 1 एबीए 2 बीडी 3 एबीसीडीई ऑर्डर 1-एन कॉलम केवल एक ही ग्राहक के आदेशों की अधिकतम संख्या के रूप में ही बढ़ेगा यदि ग्राहक 4 10 ऑर्डर हैं, कॉलम ऑर्डर 1 ऑर्डर 2 ऑर्डर 3 होगा ... ऑर्डर 10 धन्यवाद, आपने यह नहीं बताया कि किस तरह का डाटाबेस आप उपयोग कर रहे हैं सामान्य तौर पर आपको पिवट (जैसे mysql) या crosstab (PostgreSQL के लिए) का उपयोग

php - Autofill users informations in the database in Laravel -

When a customer subscribes to our website, we want to create multiple rows in the database in this user-related function. For example, for example some examples, etc., to show how the product is working. This is almost similar to the database-being () but it should be for users, and not I handle it in a repository class that constantly manages the creation and modification of the data models. You can add a parameter to your creation function, which will populate the seed data after each input. & lt; Php class UsersRepository {/ ** * Create * * @ Ultimate array $ data * @ return user * / create public function (array $ data, $ seed = false) {// $ this- & gt; Valid ($ data); // $ data = $ this- & gt; Clean ($ data); $ User = User :: Create ($ data); If ($ seed) $ user = $ this- & gt; Seed ($ user); $ User return; } / ** * Seed * * @ Ultimate User $ user * @ Return User * / Public Function Seed (Array $ user) {// Modify user to add essential attributes - user

javascript - Using shift key and click to go to the next slide -

O people, I have added these links as a javascript on the rise of one click box: < pre> Dokyumentkonkedun = function (e) {if (Ikkekdae == 16) {Dokyumentkkptivtekkpasetvlua ( 'M_vrahandlekkpasmndgotolide', 5); }}; It does what it does, but after first pressing the rear on any slide, and I press the shift key to take it to 5: (another The question is how to set a mousudown and onsquua if I press the key of the shift and I click on a click box, then I am trying to reach the next slide. Edit Do: New code: document.onmousedown = function (e) {var c urrentSlide = document.Captivate.cpEIGetValue ( 'm_VarHandle.cpInfoCurrentSlide'); if (currentSlide == 5 & amp; amp; ekeykey == 16) {Document.Captivate.cpEISetValue ( 'm_VarHandle.cpCmndGotoSlide', 5);}} < / code> as I think, function should fire when I click on it, Buut, unfortunately it ... it does not identify Kaptivet Onsmudaun Event RE-Edit: I understand how to work it. Here is th

java - How to exclude unwanted packages like mail and ws from from javaee-api-7? -

I have a project that requires Zee API 7.jar responsibilities module or firm package. I want to exclude all these packages and filter it through my pom.xml as a Maven based project? How can I achieve that ? Does my pom.xml look like this? Determine which package / classes you need For those packages, the correct & lt; Dependency & gt; & Lt; / dependency & gt; Find Only those packages have their own Pom.xml . This is your only option if the Javanese 7 API modular is not enough, then you may only get the second code without any other packages, only firmness package . In case I think you can get trapped. I think this link can be helpful - - About halfway down the list: & Lt; Version & gt; 2.1.0 & lt; / Edition & gt; & Lt; / Dependencies & gt;

javascript - Decrypt in Crypto-JS gives numeric hexadecimal output instead of original plaintext string -

Image
I have been using the example of examples put a simple test: Page header: < / P> & lt; Script src = "http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/aes.js" & gt; & Lt; / Script & gt; In a JavaScript function: var encrypted = Kriptojesh.as.ansiript ( "Message", "secret passphrase"); Var decrypted = CryptoJS.AES.decrypt (encrypted, "secret passphrase"); Warning ('encrypted:' + encrypted + 'decrypted:' + decrypted); But the output is: encrypted: U2FsdGVkX19hsNqFBS5xcUoVBCu / hPHepEwZchqnUVU = decrypted: 4d657373616765 div class = "post-text" itemprop = "text"> Dekryptedktostring (Kriptojaskinkkutf8) // See "Message" The hash that you come back is not a string yet. It is a WordArray object when you use WordArray object in a string context, it is automatically converted into a hex string. You Other toString method called c

spring - Building custom java config annotations - similar to custom XML namespaces -

We are building a structure on top of spring & amp; Spring mvc Our structure is quite mature at this time - about 2 years old and widely used within our organization. Our structure is very modular (like very spring), there are many modules which can be used independently or together. When used together, they provide many benefits to the end user. We have created a handful of custom spring xml namespace (namespace handlers, beadiffinist parser etc.). Each module provides itself that brings in its set of XML configuration elements. It's all working great for us and really big win for us. What we want to do now is away from XML-based configuration and Java config. My thoughts / thought is to present a set of Java config annotations for each module, which can be used (like @EnableCaching , @EnableMBeanExport annotation) My question is this - even if I make my comments - how do I "wire" them so that they are present, can I do "stuff"? This namespace hand

regex - symfony2 security firewall pattern on windows -

I saw a strange behavior in Firewall pattern configurations in Symfony 2.3 in Windows7. Simply put, I use this configuration: support: Pattern: / support / * My The route has been identified and a security token is placed below the right firewall. If I use a regexp configuration: Support: Pattern: /support/.* My route is either There is also no more recognition and security token is not present. How is this possible? . * Should not be the correct regexp? This is not a valid pattern with the starting delimiter, try something like this: Support: Pattern: ^ / support /

java - How to add elements in a many-to-many relationship via Spring's @RepositoryRestResource REST API? -

I find it difficult to use the @RepositoryRestResource interface to create multiple-to-many relationships between the two Fairly simple institutions for For example, I have a relation with such a simple parent-child institution: @public parents of the public class {@} @ generatedValue Private Long ID; @ManyToMany private list & lt; ChildEntity & gt; children; } @Entity Public Class ChildInty {@Id @GeneratedValue Private Long ID; @ManyToMany (mapped = "kids") private list & lt; ParentEntity & gt; mother-father; } My treasures are using vanilla spring @RegositoryRRRSRSRSHatos API: @RepositoryRestResource (collectionResourceRel = "parent", path = " Parents ") Public Interview Parent Repository Paging & Supporting Repository & lt; ParentEntity, Long & gt; {} @RepositoryRestResource (collectionResourceRel = "kids", path = "kids") Public interface hair regoratory paging and supporting repository &

html - PHP Search Results display -

I am creating a basic search feature for my structure and how best to display search results ( Google Style) Returns the different pages based on my MYSQL query search query. The result from MySQL is correct, I need to do the following: An example may be that someone searches for the word "Hello World", my search results will return all those rows "Hello "And" world "will both include What I'm trying to achieve: Highlight the words in the search query, but only a piece of results I want to return only 200 characters and highlight the first occurrence of any word in the search term. The duplicate displayed is made in a CMS and has HTML tags in it. I am able to strip HTML tags before displaying it, but if I am doing it correctly then I have to get a response. The code I am currently using is: // query string: ("page results") AS $ results):? & Gt; // Clickable on the original page H3: & lt; H3 & gt; & Lt ;? =

javascript - Show/Hide Content without reloading the page -

I have three content boxes that I want to show and hide using controls. The HTML is as follows: & lt; Div id = "leermat1" & gt; The content here & lt; One square = "page-next" & gt; Next & lt; / A & gt; & Lt; One square = "back-past" & gt; Previous & lt; / A & gt; & Lt; / Div & gt; & Lt; Div id = "leermat2" & gt; The content here & lt; One square = "page-next" & gt; Next & lt; / A & gt; & Lt; One square = "back-past" & gt; Previous & lt; / A & gt; & Lt; / Div & gt; & Lt; Div id = "leermat3" & gt; The content here & lt; One square = "page-next" & gt; Next & lt; / A & gt; & Lt; One square = "back-past" & gt; Previous & lt; / A & gt; & Lt; / Div & gt; I have two anchors pug-next and page-back, which should be visible to the content divide at any poi

cordova - Phonegap SQLite id unique is null -

I'm not sure that I'm getting the ID primary key in my sqlite table. There are other properties, when I create my table, I use if any existing Not setting (id unique, uid, text, orglvl, habitstatus) is fine, and I can get results.rows.item (i) .text , but results.rows. Even when inserting item (i) .id is NULL , when I try to get the result . Indent ID , I get an error of "undefined", which started thinking about it all for me. What am I doing wrong - how do I have no ID when I made them in my table? "post-text" itemprop = "text"> To get one, you must use the INTEGER primary key.

node.js - Issue using instagram-node -

I get an issue using the module Instagram-node, I'm not able to get all the media ... There is a limit and I do not want this limit, I want to get all the means of current user ... My code: self.api.user_media_recent ( userId, function (err, medias, pagination, balance, limit) {console.log (medias.length); // Only 35 ... 200 or something like this ... medias.for each (work (media) { Var url = media.images.thumbnail.url;}); response.render ('Home / photo', {medias: medias, type: request.query.state});}); Depending on the , the result is endorsed, you need to do the following: p> var hdl = function (mistake, result, endorsement, balance, limit) {// your implementation here (pagination.next) {pagination.next (hdl); // get the result of the second page}}; Ig.tag_media_recent ('test', HDL);

arrays - How to match the data with new line.? -

I tried to match the data with Newline and some other data but it is not working. My Perl Code open (data, "file name"); @ File = & lt; Data & gt ;; @get = grep {m / ^ \ & gt; * \ N. * @} File; Print "$ Mill [1]"; My file like this & gt; 1AA7 LSLLSEVESFVLSVVPSGPLKAEVAQKLEEVFAGKQSELEVLLEFLKSKPVLSPLSKGVLGFVFSLSVPSEKGLQKKKFVQQALQGQGEPQQLEKAVKLFK & gt; 1ABV SEFVSVAKPFAKAAFEFAVEKQSVEKFQELLAFAAEVSKQEQLAELLSGALAPESLAESFVAVCGEQLEEQGQQLVKVLAEQGKLQALPEVLEQFVKLKAVSEASAEVEVVSAAALSEQQLAKVSAALEKKLSK & gt; 1AEP AAGKVQVAEAVQQLQKSVVQAAKELKESLGLPSPEEALQLLSEQAQAFKSKVAEVSSSLKQEAEKKQGSVAEQLQAFAKQLQQSVKEAASSLQLQEQLQSLQSALSQVGKQFQEVASKSQASAQEAFAPVQSALQEAAEKSKEAAAQLQQSVQSAVQKPAQ program in only & gt; 1ABV is not working \ n and the second charactor of my code but I expect this code to be output to & gt; 1ABV SEFVSVAKPFAKAAFEFAVEKQSVEKFQELLAFAAEVSKQEQLAELLSGALAPESLAESFVAVCGEQLEEQGQQLVKVLAEQGKLQALPEVLEQFVKLKAVSEASAEVEVVSAAALSEQQLAKVSAALE

linux - how to daemonize Rails Rake task on Elastic Beanstalk start up -

I have an elastic Beanstock web server environment called "mine-NV" I want to start my Execute the following bass command: bundle exec rake jobs: work . I am new to EB and my bash is mediocre (best). I talked about the whole day yesterday and came up with the following: .exextensions / start_worker.config : Edit: < Actually, the following is not working correctly; It seems that the work is starting to function properly and then the errors begin to create. Maybe the environment changes? command: create_post_dir: Command: "mkdir / opt / elasticbeanstalk / hooks / appdeploy / post" Undiscovered Errors: True Files: "/usr/sbin/jobs_worker.sh": Mode: "000755 "Owner: Root Group: Root content: | #! / Usr / bin / env bash / opt / elasticbeanstalk / support / envvars Export PATH = / home / ec2-user / .gem / ruby ​​/ 2.1.2 / bin: /opt/rubies/ruby-2.1.2/lib /ruby/gems/2.1.0/in Bin: /opt/rubies/ruby-2.1.2/bin: / usr / local / bin: / bin: / usr

xml - Maintaining two separate icons -

About maintaining two separate icons for Wi-Fi Bootstrap executable and add / remove programmable icons Any ideas? For example, I have: & lt; Bundle ... IconSourceFile = "blah.ico" ... /> But IconSourceFile sets both on the same icon. It reads the details: The path of an icon that will replace the default icon in the last bundle executable. This icon will also be displayed in programs and features (also called add / remove programs). Edit : I think it can be obtained through a custom function at the end of my installer that add / remove bootstrapper programs To change the icon is a part of the bundle. Someone has already filed a feature request for this: the YX team suspended it , Which means that they have no intention of doing so, but if someone wants to implement it, then they will have to accept the bridge request.

c# - How do you display the SQL statement of a Linq-To-SQL query? -

I am trying to get the date value of a specific date that is the earliest date value. The holder example has already been taken from data reference (without prefetching), now I need to search through IO EntitySet (that has not been received). I am doing this in a foreach loop, it takes a long time to retrieve the requested values ​​for each holder. The index did not help indexing, so I want to see the SQL statement to customize the database. This is the code that needs to be translated into SQL: DateTime? EntryDateTime = (Where in Holder.IOs io.IOStatus == "Entry" & amp; amp;; & amp; io.IODateTime.HasValue & amp; io.IODateTime.Value.Date == date.Date Selection io.IODateTime ) .Min (); I can not use LINQPad because the LINQ statement is directly DataContext, but iOS EntitySet does not quesry. Also, if anyone knows that to rewrite the linq statement to speed up recovery, please let me know I use the LoadOptions as the application to delay the appli

Making Batch for /f code work propely -

This is my file trying to read the host file For some reason, this is not working properly Try the code yourself to see error messages. For @echo off cd% windir% / System32 / drivers / etc / f "eol = # tokens = * delims =," %% (% windir% / System32 / drivers / etc / hosts) type %% one paused & gt; Null type hope for a file name This means echo was another issue, the host file is not a comma, but if the white space is different then you will need to include your placements and tabs, assuming you only hostname Want to

list - Python: if element1 from list1 is equal to element2 from list2, change element1 -

This is part of the homework for my 'Basics of Programming' course in UNI. It says: < Blockquote> enter a code (list, cod) function, where lst is a series of strings ccccyyyymmgg ( cccc < / Code> are random characters, yyyymmgg is a date) and cods is a series of 4-letter string. The function should work like this: If a CCCC in the CSCC is equal to the string in the CSS, the element with the CCCC is printed in [[CCCC, DD, MM, YAY] format; Otherwise it is printed in [[ccccyyyymmdd]] [[ccccyyyymmdd]]. For example, if "AcDa20140930" is an element of lst and , ACDA " is turned on cods , Then the list has been changed from "acDa20140930" to lst 4 elements "ACDA", 30, 9, 2014. . < / P> I tried to solve it like this: Def code (list, cod): for code in ccsc: lst1 = [] in element Lst: cccc = lst [0: 3] yyyy = lst [4: 7] mm = lst [8: 9] dd = lst [10:11] If cccc = '' code: lst1 + cccc, dd, mm, yyy

Migrating from Symfony 2.1 to 2.5, choice fields not working -

I'm updating a Siemens 2.1 project to 2.5, and it has seen that the country and foreign institution dropdowns are empty. This form is: named place KF \ UserBundle \ Form \ Type; Use Symfony \ Component \ Form \ AbstractType; Use Symfony \ Component \ Form \ FormBuilderInterface; Class Registration Type Abstract Type {Public Function Buildform (Forfbuilder interface $ builder, array $ option) {$ builder - & gt; Add ('first name', empty, array ('required' => true)) - & gt; Add ('Last Name' ('Required' => True)) - & gt; Plus ('email', 'email', array ('required' = & gt; true)) - & gt; Add ('Telephone', empty, array ('required' => incorrect)) - & gt; ('Country', 'country', array ('required' = & gt; true, 'property_path' = & gt; 'address' home code, 'empty_man' = & gt; 'user.registration_form.select_country',

mysql - How can I show values from two tables with one SELECT command in SQL? -

I have two tables in the first table, it contains prices foods. In another table, there are orders for food items in both tables, the name of eating the same food is what I would like to do, to show the price in the form of an additional column behind the special food item in a table. I do not even know how I am searching, I tried and failed miserably, so now I am changing those people who are the best in SQL. Hope someone knows my problem and can help me. Post-text "itemprop =" text "> use one: Include: . .foodname = command.funname

ios - Pass from UIUserNotificationTypeNone to UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound -

Do you know a way to go from UIUserNotificationTypeNone to UIUserNotificationTypeAlert. UIUserNotificationTypeBadge | UIUserNotificationTypeSound (iOS8)? UIUserNotificationTypeNone works well to pass, but when the user does not try to switch again to enable ... This is my code: // Register for push notifications, if iOS 8 is running ([Responds to app for sesame: @selector (register user notification setting :)) {UIUserNotificationType User Notification Type = (UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound); UIUserNotificationSettings * settingsAvailable = [UIUserNotificationSettings settingsForTypes: userNotificationTypes categories: nil]; [Application register user notification settings: settings available]; [Register application formation]; } Else {// register for push notifications before iOS 8 [application registerfororemote notification type: (Uyramot notification typepause | URImot notification type alert | URImot notification

excel - Surprising nested loops duration -

I have an internal and external loop in my VBA code. I think execution time in total external loop count * Internal loop It can be estimated as a number, but it does not seem that 10 * 10 ^ 8 functions take approximately 5 seconds during the performance, but 10 ^ 8 * 10 takes about 24 seconds for operation. Multiple iterations of the outer loop, compared to many iterations of these loops Not to make the total execution time, although the total number of operations is the same in both instances. Should that work? Why is it like this? Am I doing something wrong? Sub-testing () long as long as Jammu Eye as a single maxI = 0 '1 maxJ = 9' 1 billion while maxJ & gt; = 0 for t = timer i = 1 to 10 ^ maxI for j = 1 to 10 ^ maxJ next h next i debug. Print max + max J & amp; "" & Amp; Maxi & amp; "" & Amp; Max J & amp; "" & Amp; Timer - T Maxi = Maxi + 1 Maxje = MaxJay - 1 loop and sub Dinosatic resumance with the quadrat

angularjs - ngRoute RouteController getting called only once -

I have an intelligence to show my setup. The problem is that the controller function is only calling once on the page load, but then on changing the hash (link click As a result) the function routeController is not being called again. My links have arisen in another NG module, it is not certain if the link should be in the same module with the router. & lt; Div id = "router" & gt; & Lt; Div ng-view & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div id = "navigation" data-ng-cloak & gt; & Lt; Ul id = "folios" data-ng-controller = "folios controller" class = "nav navel-pills nav-stack" & gt; & Lt; Li data-ng-repeat = "folio in folio" ng-class = "{active: iactive ('/ search / {{folio.product_id}}')} & gt; & Lt; A href = "# / search / {{folio.productId}}" & gt; {{Folio.title}} & lt; / A & gt; & Lt; / li & gt;

objective c - Sprite Kit Detecting Collisions -

Sorry for reopening this title, but no title about this question has helped me so much. In my game you are a space ship and you are trying to avoid the incoming asteroids. When your ship touches an asteroid, then you blast my code like this; Fixed const uint32_t asteroidCategory = 1; Static Const UIT 32_T Player Category = 2; Static Const UIT 32_ T Laser Category = 3; Player.physicsBody.categoryBitMask = playerCategory; Player.physicsBody.contactTestBitMask = asteroid class; Player.physicsBody.collisionBitMask = 0; Asteroid.physicsBody.categoryBitMask = asteroidCategory; Asteroid.physicsBody.contactTestBitMask = playerCategory; Asteroid.physicsBody.collisionBitMask = 0; But I do not know what I should do on 'didBeginContact' method. Please help me, thank you ... Try -> (Zero) was done with Bijin Contact: (SKPSISCactact *) Contact {SKFISHICKSBODY * FIRST BODY, * SECOND BODY; If (contact.bodyA.categoryBitMask & lt; contact.bodyB.categoryBitMask) {firstBody

Stack Data structure operation -

इच्छा ढेर राज्य: स्टैक [8,5,3,6,5] स्टैक डाटा स्ट्रक्चर के उपरोक्त इच्छा स्थिति को प्राप्त करने के लिए स्टैक डेटा स्ट्रक्चर ऑपरेशंस (पुश और पॉप) के चरण को लिखें यदि आपको स्टैक में निम्न नंबर सम्मिलित करना है? संख्याओं के अनुक्रम की आवश्यकता होती है जिन्हें स्टैक में धक्का देना चाहिए: स्टैक [0,1,9,8,8,0,1,5,3,6,5] यह एक छात्र गृह असाइनमेंट लगता है। आप इसे स्वयं की कोशिश करनी चाहिए। यदि आपके पास संख्याओं का निम्न अनुक्रम है जो स्टैक डेटा संरचना में धक्का होगा, यानी, उन संख्याओं के अनुक्रम की आवश्यकता होती है जिन्हें इन्हें ढकना चाहिए स्टैक: स्टैक [0,1,9,8,8,0,1,5,3,6,5] निम्नलिखित कदम हमें स्टैक की इच्छा स्थिति प्राप्त करने के लिए प्रेरित करेंगे पुश (1) पुश (1) पुश (9) पुश (8) पॉप () पॉप () पॉप () पॉप () पुश (8) पुश (0) पुश (1 ) पॉप () पॉप () पुश (5) पुश (3) पुश (6) पुश (5) इच्छा ढेर राज्य: ढेर [8,5, 3,6,5]

SPRING MVC 3 - NOT displaying image in JSP -

I have a controller serving images from an external directory (such as c: \ images \ userID \ photo.png) , And this controller does its job very well, however, the IMG tag in my JSP file shows the image icon instead of the image given by this controller. Here's my controller: @RequestMapping (value = "/ load / {imageId} /", method = RequestMethod.GET) public responses & lt; Byte [] & gt; Load Image (@Path Variable ("ImageID") Long image id, HTTPSVette request) {end org.springframework.http.HttpHeaders header = new org.springframework.http.HttpHeaders (); Buffet image image; Photo Photo = Photo Manager. Getsinglephoto (Image ID); Headers.setContentType (MediaType.IMAGE_PNG); Try {if (photo == null) {file defaultFile = new file ("c: /images/default.png"); Image = imageIo Reed (default file); New Response & lt; Byte [] & gt; ((DataBuffered) image .getData (.) GetDataBuffer () back) GetData (), header, httpstats.create); } File fil

javascript - How to Use Polymer Elements -

I'm working through some demos in Polymer Here's one here: The code looks like this: & lt ;! DOCTYPE html & gt; & Lt; Html lang = "en" & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" & gt; & Lt; Title & gt; Ajax this. & Lt; / Title & gt; & Lt; Script src = "../bower_components / platform / platform.js" & gt; & Lt; / Script & gt; & Lt; Link rel = "import" href = "../bower_components / polymer / polymer.html" & gt; & Lt; Link rel = "import" href = "../bower_components / core-ajax / core-ajax.html" & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Core-ajax auto url = "http://gdata.youtube.com/feeds/api/videos/" params = '{alt alt :: "json", "q": "chrome"}' handles = 'json " & Gt; & lt; / core-ajax & gt; & lt; template repeat = &q

python - Index error on Polynomial array program -

I have this code which is receivestwo lists (considered in power order) though that I'm trying to multiply , I keep an index error and I do not understand why def by (a, b): a.reverse () b.reverse () c = [] al = len (A) bl = len (b) for category i (al): for category J (b): k = a [i] * b [j] ii = i + jc [ii] + = k C.reverse () returns (c) c [ii] + = k this line is an error Because the c [ii] list is last in the end. You can not increase the size of a list by specifying the index listed outside the range; You have to change any code such as attach or expand , or create lists with the elements already present. c = [lane (a) + lane (b)) in range for [0]

android - Dynmaic registration of BroadcastReceiver's actions (intent-filter) -

I have a broadcast receiver and a service in my application. I am receiving information about the action in the service from an activity. I have to dynamically register this action with the receiver. I have some actions defined in AndroidManifest.xml, but this action must be defined dynamically whether anyone can help me with it? Thank you. P.S. One sample receiver tag from AndroidManifest.xml is BOOT_COMPLETED one of the tasks I am referring to. I am receiving this information in this service & Lt; / Intent-Filter & gt; & Lt; / Receiver & gt; You can use it: IntentFilter intentFilter = new intent filter ("android.intent.action.BOOT_COMPLETED"); Your Receiver Receiver = New Your Receiver (); Local Broadcast Manager MBDactMGR = LocalBlockManager GetStation (getApplicationContext ()); MBroadcastMgr.registerReceiver (receiver, intent filter);

javascript - Getting a value of text area that created by Ajax request -

I have created a text area inside the table (also made as an AJAX request) and this table is a diva Inside is not made by Ajax request. I am trying to get the value of that text area through jazzery but it does not work, what can be the problem? Any assistance will be epi-assisted. & lt; Tr & gt; & Lt; td valign = 'middle' align = 'center' & gt; & Lt; label id = 'feedbackLabel' = 'feedbackText' for & gt; Feedback & lt; / Label & gt; & Lt; / TD & gt; & Lt; td class = 'diteend' wall = 'middle' align = 'center' & gt; & Lt; textarea id = 'feedback' & gt; & Lt; / Textarea & gt; & Lt; / TD & gt; & Lt; / TR & gt; $ ('# Resultdive'). ("Click", ".button", function () {var feedback = $ ('# feedback'). Val (); alert (feedback);}); Instead of trying to add your listener to the document element Do: $ (do

c - Accessing static global array from another file via function argument -

Segmentation error when accessing data from a static global array with another file; The indicator was passed as a function argument. Memory address shows the same from both files. in file1.c static long long T [12] [16]; ... / * inside some functions * / printf ("% p \ n", T); // address func_access_static (t) check; ... in file2.c zero func_access_static (long ** t) {printf ("% p \ n", t) ; // shows the printf to the same address ("% lld \ n", t [0] [0]); // Partitioning partitioning mistake} Am I trying to do that which can not be done? Any suggestion is appreciated. ** is not equal to one thing zero func_access_static (longer T [] [16]) or zero func_access_static (long Time (* t) [16]) This is a 2 dimensional array int [2] [3] looks in memory tt [0] t [1] + --------- + --------- + ----- ---- + ------- - + --------- + --------- + | T [0] [0] | T [0] [1] | T [0] [2] | T [1] [0] | T [1] [1] | T [1] [2] | + ------

c# - How do I scale an Azure Cloud Service using SDK 2.4? -

I remember, in the past, there was Wasabi in Enterprise Library 5, which was used to scale Eezur Cloud Services . I recently installed Enterprise Library 6 and saw that Wasabi is not part of it. How do I scale a blue cloud service deployment nowadays? Is it possible to set up scaling solutions locally for testing? How can I scale an Azure cloud service deployment nowadays? If you are looking for a blue cloud service in the cloud (and not on the local emulator), then you can use Ezur Auto Scaling . You can find this link useful for this. Is it possible to install locally scaling solutions for testing? It is not possible to do this in SDK 2.4. This is one of SDK 2.4. SDK 2.4 release notes: Absolute compute emulator dislikes - Full compute emulator has been deprecated in SDK 2.4. Like SDK 2.3, all new Cloud Services projects now use emulator Express by default. Emulator Express allows you to test your multi-role cloud service locally without the need for adm

c++ - what are the backtick symbols in vs user mode debugger -

मेरे पास Program.exe में बनाये गये निम्नलिखित सी ++ कोड है, जो बनाम 12 वर्ग foo {सार्वजनिक: foo () {std :: cout & lt; & lt; "सीटीओआर में \ n"; } ~ Foo () {std :: cout & lt; & lt; "डीटीओआर \ n"; } Std :: string s; }; Int main () {foo f {}; } फिर मैं डीबगर तत्काल विंडो में निम्नलिखित कमांड टाइप कर रहा हूं x प्रोग्राम! * Foo * यह मुझे निम्नलिखित आउटपुट देता है 0: 000 & gt; x प्रोग्राम! * foo * 00007ff6 '11ce4b00 प्रोग्राम! foo :: ~ foo (शून्य) 00007ff6`11ceaef0 प्रोग्राम! `foo :: ~ foo '::` 1' :: dtor $ 0 (शून्य) 00007ff6`11ce48f0 प्रोग्राम! foo: : foo (शून्य) 00007ff6'11ceae90 कार्यक्रम! `foo :: foo '::` 1' :: dtor $ 0 (शून्य) मैं समझता हूँ कि पहले आउटपुट है foo < / कोड> का नाशक और तीसरा है foo के निर्माता दूसरे और चौथे लोग (बैकटीक्स वाले) क्या हैं? अधिक सामान्यतः, अन्य जगहें हैं जहां मुझे उपयोगकर्ता मोड डिबगर में बैकटीस दिखाई दे सकता है? दिलचस्प है, बैकटीक फ़ंक्शंस समाप्त हो जाते हैं यदि न

excel vba - VBA Writing to Word, changing font formatting -

I am writing a VBA script in Excel in the output text based on some tables in the Word document. For the most part everything is working properly (I'm reading myself because I go with a lot of help from Stack Overflow). I've got a very long code, so it will be difficult to copy it here, I'll try and show the proper parts. The issue I am running is trying to change the formatting. As I am running, I have created some different styles to help standardize formatting options, .Styles.Add ("SectionHeader") with wrddoc .Styles.Add ("NoFormat") .Styles.Add ("Direct") .Styles.Add ("Failed") .Styles.Add ( "Unknown") .Styles ("section header") with .Styles.Add ("bold") .Font.Name = "Calibri" .Font. Size = 12 .Font.Underline = True font.Bold = False .Font. Italic = False .Font. Strikethrough = False .Font. Subscribe = False .Font.Superscript = False Finish with .font.color = RGB (0, 0, 0). ("

java - NullPointerException when using a file as a input -

I was given a ready code sample for an assignment but I can not get it to work so Love! Package kth.id2010.lab.lab04; Import edu.princeton.cs.introcs.In; Import java.net.URL; Public class driver {public static zero main (string [] args) {url url = driver. Class.tatsource ("KAP1WTPT"); Input = new in (url); // This is where nullPointer is pointing while (! Input.isEmpty ()) {string line = input. Readline (). Trim (); String [] word = row split (""); For (string word: word) {System.out.println (word); }}}} And here is the full exception which is printed. Exception in the thread "main" java.lang.NullPointerException at edu.princeton.cs.introcs.In (in.java:105) at kth.id2010.lab.lab04.Driver.main (Driver.Java 12) I am using maven < / Div> This is because your path is incorrect and the URL object is empty, please make sure that < Code> kap1.txt file is under your resource path and not in any other folder, also try: ur

javascript - Convert object array to hash map, indexed by an attribute value of the Object -

केस का उपयोग करें उपयोग के मामले ऑब्जेक्ट की एक सरणी मूल्यांकन करने के लिए प्रदान किए गए स्ट्रिंग या फ़ंक्शन के आधार पर एक हैश मैप में और हैम्सप में मान के रूप में उपयोग करें और ऑब्जेक्ट के रूप में मान। इसका उपयोग करने का सामान्य मामला ऑब्जेक्ट के एक हेश नक्शा में वस्तुओं की एक सरणी को परिवर्तित कर रहा है। कोड नीचे सरणी बदलने के लिए जावास्क्रिप्ट में छोटा स्निपेट है ऑब्जेक्ट का ऑब्जेक्ट ऑब्जेक्ट, ऑब्जेक्ट की विशेषता मान से अनुक्रमित हैश मैप आप गतिशील रूप से हैश मैने की कुंजी का मूल्यांकन करने के लिए फ़ंक्शन प्रदान कर सकते हैं (रन टाइम)। आशा है कि इससे भविष्य में किसी भी मदद मिलती है। फ़ंक्शन isFunction (func) {return Object.prototype.toString.call (func) === '[ऑब्जेक्ट फ़ंक्शन]'; } / ** * यह समारोह हैश मैप के लिए एक सरणी को धर्मान्तरित करता है * @परम {स्ट्रिंग | फ़ंक्शन} कुंजी हैमाप * @ परत के ऑब्जेक्ट * @Example * [{आईडी: 123, नाम: 'नवेन'}, {आईडी: 345, नाम: "कुमर"} के लिए कुंजी के रूप में उपयोग करने के लिए हर ऑब्जेक्ट में मूल्यांकन करने वाली

android - Querying in-app product inventory without connectivity -

When my app askss that there is an in-app product using IABHLper, I do not get any response, So I get this answer: Error refreshing inventory (item price inquiry) (feedback: 6: error) And it's okay. But when my app tries to purchase pre-owned items (not yet with any connectivity), Google Play returns that the user already has an item in question. So, since Google Play knows what the user has - Despite the app product or a connection being present, how do I get this information without trying to buy in-app product? I would like my app to know that there is no in-app product in it, even if no connectivity and inquiry inventory fails, and the only way to get this information is to know now that it is to try to buy the product. Firstly drop using iabhelper, this is for your own good second. Google Play services caches information, so sometimes you get responses when the device is offline. How and when this happens, depending on the implementation of existing services

Importing from Excel to SQL Server: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value -

Image
I have the following Excel workbook: To import it The formatted server for a SQL database has the following details: As you can see the importer True when I try to import the excel file, the situation is always the same, does not make any changes, i With Ank do with the column. 242: A 3621: statement has been terminated as a result of a datetime data type conversion of a datetime data type. What should I modify so that these rows can be imported without error? TEXT , then / p> 'I will see, but I am not sure why you are having this problem, you should strictly import imports from Excel and there are dates kept with you, at least you have the SSIS with the import wizard of SQL You can use. = TEXT (F2, "Yyyy-mm-dd") I like importing from Excel using OPENROWSET () , but requires some additional setup And its drawbacks are: SELECT * from OPERROWSET ('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0; Database = C: \ YourExcelFile.x

excel - Refer to sheet by a portion of the sheet name -

I have a sheet in Excel that I am trying to call in VBA. The way I call it: Mainmetrics. Sheet (Sheet10). Range ("A1: A1"). Select the name "Data Dump August" but I do not want to call it like this because this name can change, but the letter number will never be I What's wrong? You can call it: sheet 10.ange ("A1: A 1 "). Choose a sheet named "name" (which is on the tab of sheet) and a "codename" that appears in the VBAProject tree in your VBA / Macro editor. This style of reference uses "codename" to see if that & gt; & Gt; Go to Project Explorer, open your workbook in the tree and see the sheet name. This will look like Sheet1 (Sheet1) or Sheet 10 ("My Tab Name")

PHP Regex using the \Q \E syntax -

I am reading and it says: all the letters between \ q and \ e are interpreted The literal letter like $ pattern = '/ \ \ * * \ d + * \ E matches the literal text * \ d + *. Q ~! @ # $% ^ & Amp; () _ + |} {? & Gt; & Lt; / /] \ "[':'; \ E \ '; string =' ~! @ # $% ^ & Amp;;; * () _ + |} {& gt; & lt ;, / ] [": ';';?. Preg_match ($ patterns, $ string, $ matches); Echo "& lt; east & gt;"; Print_r (matches $); Echo "& lt; / pre & gt;"; This gives me an error: Parse error: syntax error, unexpected '~' in / application / XAMPP / Ximpipil / HTTox / xampp / web_development / NEU_Stridi_2014 / REJX.FPP on line 3 Why is it not working as described above? You forgot to cite your ' inside the pattern: $ pattern = '/ \ Q ~! @ # $% ^ & Amp; ; * () _ + |} {? & Gt; & Lt ;, / \] [": '; \ E /'; ^ - Start String # 1 ^ - End String # 1 ^ - St

c# - Does saving to context in MVC update object attributes? -

I was wondering if it always happens that ASP saves an object in an MVC to an object with DB? Just ask for example that I have a student class with field ID and where is the name the key to the records is clearly ID If I have a student: student student = new student ("student name"); and do context. Insert (student); Id will be assigned a number reference. Save (); After such operation, it is assumed that the "student" ID has been updated? Or do I have to ask it to the database. Thanks OK. .. depends on! :) You are describing a case where EF conferences are doing something for you. Code First Conference looks for those areas which have been named ID or [class name] ID and it determines that The keys are for the classes. You class design just match this conference. Because you have ID property integer type, EF has also configured it to be the identity column in the database. Therefore, when you save your object, it creates your database ID

php - Curl request Timeout -

I am currently facing a problem where my php file is running out of time. I believe this is due to my curl code which is: $ ch = curl_init ($ url); Curl_setopt ($ CH, CURLOPT_HTTPHEADER, $ headers); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, 1); Curl_setopt ($ CH, CURLOPT_CONNECTTIMEOUT, 600); Curl_setopt ($ ch, CURLOPT_TIMEOUT, 600); $ Result = json_decode (curl_exec ($ ch)); The file runs in the browser for 60 seconds and then returns with 500 internal server errors. I looked around and tried things like putting set_time_limit (0); at the top of the file but it still seems timeout always I am not very familiar with curls, so this is probably something wrong with me. After checking the error_log on my server, I see the following error: mod_fcgid: Read data timeout in 45 seconds So I gave it time and it makes 500 error after 45 seconds. Thanks quoted from: this error is Not specific to mod_fcgid, if you are using the current version of mod_fcgid, then y

xml - Java xPath/DOM - When importing a node into a document, xPath query is unable to find new node (and sub node) -

I am attempting to import a node into the 'new' dome document and then execute the xpath query on the newly imported nodes I do The XML I am working with is not the namespace I have followed the standard procedure for document creation, as shown: document newDoc = null; Document Filter Factory Factory = Document Builder. Try {DocumentBuilder Builder = factory.newDocumentBuilder (); NewDoc = Builder. New document (); } Hold (Parser Configuration Exception Piece) {// Parser pce.printStackTrace () can not be made with specified options; } To import more nodes ... // nodeToImport is a node from a pre xPath search (part of the node set) node docToRunXPathOn = NewDoc.importNode (NodeTimePort, true); Later, when I try to run the xpath query such as XPathFactory xPathFactory = XPathFactory.newInstance (); XPath xpath = xPathFactory.newXPath (); If (docToRunXPathOn! = Null) {try {XPathExpression expr = xpath.compile ("// version_id / text ()"); Return (strin

javascript - Google Drive API Public download private account files -

I'm searching for a while and I can not understand it. I want to know how this is possible and how to create a web app for anyone to download a certain file (starting at first and last name) stored on a Google Drive account. The problem is that these files have to be private in the drive. Is this possible? If it is based on PHP, Javascript or jQuery, then better. I know that I need the Google Drive API, but which certification should I use? Thanks a lot! Google Drive uses OAuth2 for API authorization In most applications the user has to go through OAuth2 flow Is known so that apps can access files in their drive. If you want to download a personal file from your drive, you want the user to go through OAuth2 flow and then store the credentials so that they can be used for all users.

jQuery ValidationEngine validation of inputs on tabs - prompt position and scrolling -

I have the multi-tab UI for private information, the form captures the entire "TabSet" Initially, I was using v2.2, which did not have the ValidWishFillfield flag. I have been upgraded now 2.6.2 To take advantage of this feature I have created a "dummy" form in which all my fields are included as hidden information and then created a form for each tab. Then I put it in the dummy form and submit it to collect all the data from each form for submission. The source code is too long for posting here but I have made a Bela here: (There is an invalid field in the address tab, filling the state address for country and country Is required and one of the mailing preferences should be selected) After some initial testing, the code has worked to some degree, it seems that the signal is placed in the wrong position and then the form Does not scroll on fields as default Is I tab added delay of 1 second after switching and it is still placed in the wrong posi

html - Horizontally center span within another span in making a tooltip? -

Image
After the text wrapped in "text" itemprop = "text"> a duration element, I try to make the tooltip manifested on I'm just using the plain CSS hover (without the different tooltip function, the reason is that I need to display latex within the tooltip). Tooltip is a duration within your parent duration . JSFiddle I have tried various combinations of display (inline, table, block) with automatic margin etc. Unsuccessful "itemprop =" text "> Try adding the following CSS property and I know how works for you: < / P> .link-cont: hover .tooltip {display: table; Left: 10%; } You should be able to adjust to your needs - your JS 10% seemed to be able to move with this specific example ( I have renewed. Bela for you for the above)

c# - Return SHA256 hash of PDF page -

I am writing a C # WPF application, where I have a 'header' as the first page of the batch of PDF documents. Enter the page. The header page is taken from the first page of the first pdf in the batch. The user will implicate this process, but I want to ensure that at the later date the user can not run the process again, the other headers will be included. Then I want to get the SHA256 hash of my plan header page and compare it with the hash of the first page of the second PDFs, if they match, then the first page is like the header page, Do not include the article. I have suppressed the code below to get the hash of the first page in PDF, but the hash is different each time it is run. Why is it different every time? Thanks using System.IO; Using System.Text; Using System.Security.Cryptography; Using PdfSharp.Pdf; Using PdfSharp.Pdf.IO; Namespace Sinkada {Public Class PDF Doc {Private PDF Document PDFFed; Public PDFDoc (string path) {pdfDoc = PdfReader.Open (Path, P

vbscript - Restarting Computer via VBS -

I need fewer dog / more effective methods to restart my computer via VBS. Below is an example of the code I have given so far. What is the more effective way to start the other again, SendKeys method ?? Options clear dim obj set obj = creatobject ( "wscript.shell") obj.run "CMD" Wscriptksleep 300 obj Ksendkeys "Shutdown / R" ObjkSendKeys "{ENTER} "obj.SendKeys" exit "obj.SendKeys" {ENTER} "wscript.quit Thank you you can use winmgmts, this script takes an argument for the computer name, but can be easily converted to use If wscript.Arguments.Count = 0 then strComputer = inputbox ("Enter the computer's name", "Enter the computer's name") if strComputer = "" then wsc ript.quit Else strCOmputer = Wscript.Arguments.Item (0) End If objWMIService = GetObject ( "winmgmts:" _ & amp; "{impersonation Livl = impersonation, (shutdown)}! \\" & amp; ;;;; ;;;;

python - UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 16: ordinal not in range(128) -

यह मेरा कोड है: #! / Usr / bin / python # आयात मॉड्यूल आयात pandas के रूप में पीडी आयात अनुरोध nppy np # के रूप में आयात करें ipython के अधिकतम पंक्ति प्रदर्शन pd.set_option ('display.max_row', 1000) # अपनी संकटनेट एपीआई कुंजी सम्मिलित करें api_key = xxxxxxxxxxxxxxx # अपने संकटनेट एपीआई एपीआई सम्मिलित करें api_url = 'http: // api .crisis.net / item? sources = twitter और tags = weather '# हेडहेडर हैडर हेडर बनाएँ = {' प्राधिकार ':' बैरियर '+ एपीआई_कीआई} # निर्धारित करें कि आप कितने डेटा बिंदुओं को कुल चाहते हैं = 10000 # एक डाटाफ्रेम बनाएं जहां अनुरोध डेटा डीएफ = pd.DataFrame () # जाना होगा एक समारोह को परिभाषित करें, डीएफ़ get_data (ऑफसेट = 0, सीमा = 100, डीएफ = कोई नहीं): # यूआरएल नामक एक चर का निर्माण करें, जिसमें अनुरोध जानकारी है, यूआरएल = Api_url + '& amp; offset =' + str (ऑफसेट) + '& amp; सीमा =' + str (सीमा) # अनुरोधित डेटा के साथ r नामक एक चर, आर = अनुरोधों। (URL, हेडर = हेडर) # कन्वर्ट डेटाफ्रेम में अनुरोध डेटा, x =

android - Merging activity intent-filter categories with Gradle -

ग्रैडल के साथ & lt; श्रेणी android: name = "android.intent.category.HOME" जोड़ना संभव है / & Gt; एक स्वाद मैनिफेस्ट में एक गतिविधि के इरादे फ़िल्टर करने के लिए ?. मेरा स्वाद मैनिफेस्ट में एक ही नाम के साथ एक बेस मैनिफेस्ट है, लेकिन मुझे निम्नलिखित लिंंट से मिलता है: त्रुटि: गतिविधि के लिए डुप्लिकेट पंजीकरण com.xxx.MainActivity [DuplicateActivity] इसके अलावा, लिंट की अनदेखी करके मुझे विलय मिल सकता है, लेकिन परिणामी मैनिफेस्ट में बेस के दोनों आशय-फ़िल्टर ब्लॉकों और दोनों के संयोजन के बजाय स्वाद प्रकट होता है। ग्रेडल संस्करण 0.12 है। + जिनमें से ऐसा लगता है कि यह संभव है। मुख्य मैनिफ़ेस्ट में निम्न गतिविधि होती है: गतिविधि एंड्रॉइड: name = "main.activity" & gt; & LT; आशय-फ़िल्टर & gt; & lt; एक्शन एंड्रॉइड: name = "com.reveldigital.player.RESTART" / & gt; & lt; एक्शन एंड्रॉइड: name = "android.intent.action.MAIN" / & gt; & Lt; श्रेणी android: name = "android.intent.category.DEFAULT" /