Posts

Showing posts from February, 2012

Java: array methods -

This code is assumed that an array of integers is examined for 9 and returns this frequency but the method validation Not getting. Any help please make this code work. public fixed int array COUNT9 (int [] nums) {int count = 0; For (Int i = 0; I Change your method call to: < Code> System.out.println (array number 9 (new int [] {1,2}}); Optionally: int [] a = {1,2,9}; Println (arrayCount9 (a)); The shortcut syntax {1,2,9} can only be used when an array type can be started if you want to do this signaling If you pass by one method, it will not be interpreted by the compiler as an array.

jquery - Animation on each element -

$ ("कौशल कौशल")। होवर (फ़ंक्शन () {$ ("। कौशल Iknow") ({अस्पष्टता: '1'}, 300);}, फ़ंक्शन () {$ ("। कौशल।")। रोक ()। चेतन ({अस्पष्टता: '0'}, 300);}) ; मेरे पास यह साधारण एनीमेशन है: जब आप "माईवेयर" पर अपना माउस पास करते हैं, तो पाठ "मैं जान" ऊपर दिखाई देता है। लेकिन जब आप अपने माउस को अनदेस और इलस्ट्रेटर के बीच उदाहरण के लिए ले जाते हैं, तो मैं जो पाठ जानता हूं वह श्वेत रहता है: जब आप किसी शब्द के बीच में बदलाव करते हैं, तो क्या यह गायब हो जाता है और प्रकट होता है? पुनश्च: क्या किसी को पता है कि एनीमेशन का रंग सफेद / काला क्यों काम नहीं करता? यदि आप चाहते हैं कि इसे वापस बाहर निकल जाए, तो आपको इसे लागू करने की आवश्यकता है, अन्यथा यह होवर स्थिति में रहता है। प्रयास करें: $ ("कौशल।")। रोक ()। चेतन ({अस्पष्टता: '1'}, 300)। मान ({अस्पष्टता: '0'}, 300);

php - How do I include a form in a form and still control the included form? -

I am currently creating a webpage where the user can submit an order and can add many items to the order . At the moment I have an order form in which there is a field in which the shipping address and all are needed. Then I included the item form and closed the form. I can not control the included form now. Here's the form: @foreach ($ errors-> all () as the $ error) & lt; P Class = "'error" & gt; {{$ Error}} & lt; / P & gt; @earnachch {{form :: open ()}} & Lt; Input type = "text" name = "shippingaddress" placeholder = "shipping address" /> & Lt; Input type = "text" name = "project_id" placeholder = "project id" /> & Lt; Input type = "text" name = "user_id" placeholder = "user id" /> Include @ ('partial / item') & lt; Input type = "submit" value = "send request" /> {{Form :: Closed ()} You

C - Swapping nodes in a linked list with a sorting algorithm -

I am working on a project for school where I need to sort a linked list with a sorting algorithm (preferably bubbles) - please - Note that swapping of each node data is not allowed because I hope to swap nodes. I can not paste all the code in my project because it is very detailed and it is in Spanish, due to which I will show you the parts in which I try to implement the nodes swapping. , the project is very simple, a linked list where every node has information about a person (name, last name, age, etc.). I have to sort the alphabetical order according to the list. Please keep in mind that I can not implement the swapping algorithm in sorting and functioning (to say that, I can not create the 'swapnod' function and in the code I have been successful in swapping two nodes after this argument: firstNode = auxiliar-> next; auxiliar-> gt; next = first Node-> next; first node-> gt; next = auxiliar; this completely 2 nodes Works for swapping. The proble

ios - Autolayout and Facebook Pop -

currently using structures with auto layout or do you need to use springs and take a way is? I think it possible that I am reading it, but I do not know what is the syntax to enliven the top obstacle to a sequence in this case you have to animate a NSLayoutConstraint want you can with a pop and it will animate barrier. Note that the POPSpringAnimation barrier is being added . NSLayoutConstraint * barrier = // NSLayoutConstraint the one that is applied to some footage POPSpringAnimation * layoutAnimation = [POPSpringAnimation animationWithPropertyNamed: kPOPLayoutConstraintConstant]; Layout animation. Spring Speed ​​= 20.0 f; Layout Animation. Component = 15.0 f; LayoutAnimation.toValue = @ (value also to go); [Barrier pop_addAnimation: layoutAnimation forKey: @ "detailsContainerWidthAnimate"]; The main property to use is kPOPLayoutConstraintConstant as shown above. So if you want to do it on auto layout restrictions, then you can use this barrier property. The

java - Split string by new line symbol -

इस सवाल का पहले से ही एक उत्तर है: < / P> 13 उत्तर मैं विभाजन करने की कोशिश कर रहा हूँ इस लाइन में नई लाइन प्रतीक "\ n" और यह बस काम नहीं कर रहा है ... मैंने कोशिश की है: स्ट्रिंग [] शब्द = strline.split ("\ n"); Println (Arrays.toString (शब्द)); [महासभा मकबरा [æbət] & lt; N & gt; \ n ओप] स्ट्रिंग [] शब्द = स्ट्रेलिन। स्प्लिट ("\\ n"); Println (Arrays.toString (शब्द)); [महासभा मकबरा [æbət] & lt; N & gt; \ n ओप] स्ट्रिंग [] शब्द = स्ट्रेलिन। स्प्लिट ("\\ r | \ r"); Println (Arrays.toString (शब्द)); [Abbot abbot [æbət] & lt; n & gt; \ n opat] यहां तक ​​कि: स्ट्रिंग [] शब्द = strline.split (System.getProperty ( "line.separator")); Println (Arrays.toString (शब्द)); [Abbot abbot [æbət] lt; n & gt; \ n opat] मैं BufferedReader और readLine विधि का उपयोग कर फ़ाइल पढ़ रहा हूं । मुझे यकीन नहीं है कि मैं आपको सही ढंग से समझता हूं लेकिन मैं देखता हूं कि आपकी फ़ाइल में \ N लिटरल्स

vba - SQL Syntax Error in Update Statement - Combining multiple fields -

Ok for my life I can not find it that I've never collected many fields and it threw me out As far as the syntax goes, I know that I have a quote quoted. 'S, but do I do the same string in the string field? Where am i messing on The error I get is just "syntax error in the update statement" current DB.exect "update tblfinal SET (tblfinal. [Short item description] = & Amp; tblFinal. [2 digits year] & '|' & tblFinal. [License type] & amp;; 'trim (tblFinal. [License number]) & amp; # 39; & # 39; & amp; nbsp; & amp; nbsp; & amp; nbsp; & amp; nbsp; & amp; nbsp; & amp; nbsp; TBFafnal. [State] and & # 39; & # 39; & # 39; & # 39; T & Post-text "itemprop =" text "> I do not know much about access, but I think That you have some misdemeanor double quotes in the mix: CurrentDb.Execute "update tblFinal SET tblFinal. [Short item description] = TLFanfal [2 digit ye

java - Installing Solr on Server: Location? -

OK, I'm going to be accessible on a server after installing solar and accessible via Drupal. My question is the correct place of solar? I know my Java works, is testing with java -version , I know that my tomcat works, test tomcat6 with service Begins: [tomcat6] Started [OK] Note: However, through to http: website.com: 8080 (I left the port default) to tomcat Can not access My current setup is as follows: / usr / bin / java (Java installation - via yum) / usr / share / tomcat6 (tomat Installation - via yum / Opt / solr (Solr instance installation - manually) / opt / share / home / website2 / public_html (just another site) / home / website3 / single site / home / website1 / public_html (bus One site - I want to use Solar here) / Home / Website 2 / Public_html (just another site) As stated, "Solr Multiple Search Index , or core , use a simple application of the solar application Haran. Each c ore is configured independently, and there is a single configur

Python port forwarding -

I am developing a client-server game in Python and I want to know more about port forwarding. For example, what I'm doing is going to my router (192.168.0.1) and allow me to request a request for my real IP address Local address is being redirected to 192.168. 0.X. This really works well but I am thinking that I can do it automatically by coding? I think Skype works like a type of p2p and I can see in my router that Skype is automatically port sent to my PC address Can I do it in Python too? Here are various solutions, but most are not trivial, and you have to read something, The fallback will be required. The simplest if your router supports it, and it is configured to allow, and you know how to get low-level networking code or old fashioned SOAP web service code To write, you can ask the router to provide a port. If it reacts with success, then start using that port and you are basically doing it. If you can run the server with a public address (very low

Share embedded video on facebook with inline play -

I have a page that has an IFRAME to play the video. When someone shares a link to Facebook, I would like to play it inline on my wall. I have tried many fasebags tags and nothing is working. When you share the link, you get the picture with the playback overlay, but when you click, nothing happens. When I right click on the image, it shows 'Movie not loaded ...' This is my source: & Lt; Title & gt; Offer & lt; / Title & gt; & Lt; Meta name = "description" content = "photographed odd proposal. Weird! & Amp; nbsp; with some great animated typography, congratulations Adam Roselboom!" / & Gt; & Lt; Meta Property = "OG: Title" Content = "Proposal" /> & Lt; Meta Property = "OG: Type" content = "Article" /> & Lt; Meta Property = "ogg: url" content = "http://laurafolco.com/video/video.html" /> & Lt; Meta Property = "OG: Image" conten

udp - On iOS, how do you use GCDAsyncUdpSocket to listen to two ports? -

I am using GCDAsyncUdpSocket on iOS (successfully) and using data by using UDP Receiving and receiving is as low as: udpSocket = [[GCDADINCDPSet alloc] initWithDelegate: self representative Que: dispatch_get_main_queue ()]; NSError * error; BOOL result = [udpSocket bindToPort: Error 3054: & amp; Error]; The device sends back data to port 3054, which I see using the delegate call udpSocket: didReiveiveData: fromAddress: withFilterContext: . The device also sends information to the 9750 port, and I also see that, also. I have not tried to force a specific port, but it fails for other reasons. I have also tried to start a separate socket using udpDataSocket = [[GCDAsyncUdpSocket alloc]: initWithDelegate: self delegate queue: dispatch_get_main_queue ()]; NSError * error; BOOL result = [udpDataSocket bindToPort: 9750 Error: & amp; Error]; There is no error in these calls, but I do not get data from port 9750. I know to make sure the data is being sent; This is a

Limesurvey 3 Answers Slider Bar -

Image
I have a slider bar where I have two answer options with the option "no answer" and "I am unsure "Which were modified in JavaScript Do anyone know how it can use Leicester or Javascript?

python - Compairing a list and extracting a number -

I'm trying to get a list containing the IP address' with subnet mask (1.0.0.0/24) And the total number of IP addresses in that list 'However, I am trying to avoid compiling the same IP address, but there is a high subnet mask. Example 1.0.0.0/24 1.0.0.0/16 1.0.0.0/8 I would like to use I / 8 to calculate the IP address / because in it / 16 And / 24 I have put all IP addresses in a list, such as, the newset ... Example 1.0.0.0/24 1.0.0.0/16 1.0.0.0 / 8 2.0.0.0/24 2.0.0.0/16 etc .... Then I use the following code to pop up subnet masks / 24, / 16, / 8 etc. then by ipTotal for example subIP = [i.split ('/', 1) [1] i) Gps of ip space I am declaring the universal for element in subtype: y = 32 - int (element) x = pow (2, y) ipTotal = ipTotal + x But now I'm counting 1.0.0.0/24, 1.0.0.0/16 and 1.0.0.0/8, when I only do everything to calculate 1.0.0.0/8. Actually I am calculating the amount of IP space. How do I need to reach it? I thought

php - cakephp - passing url params to the homepage -

I am trying to create a link on my homepage that contains the ultimate in the URL which By the way I am trying echo & lt; A href = "'. $ This- & gt; webroot.'cat: garden'" & gt; Garden & lt; / A & gt; '; But if I think I get an error "You do not have permission to access the requested item." I know that I can do echo & lt; A href = "'. $ This- & gt; webroot.'page / home / cat: garden'" & gt; Garden & lt; / A & gt; '; It contains with 'Pages / Home' but it does not look good if you hover over the link or page, if it's just www.wheatever.com/cat : Garden Any ideas, so would it be good?

bitcoin - How to keep Websocket API session alive -

I am trying to subscribe to the blockchain.info websocket API for the new block. I basically closed the code and plugged in the blockchain.info parameter. It works, but I think it will be automatically disconnected after some time. How do I keep the session alive? & lt ;! DOCTYPE html & gt; & Lt; Meta charset = "UTF-8" /> & Lt; Title & gt; WebSocket Test & lt; / Title & gt; & Lt; Script language = "javascript" type = "text / javascript" & gt; Var wsUri = "wss: //ws.blockchain.info/inv"; Var Output; Function init () {output = document.getElementById ("output"); TestWebSocket (); } Function testWebSocket () {websocket = New WebSocket (wsUri); Websocket.onopen = function (evt) {on open (evt)}; Websocket.onclose = function (evt) {onClose (evt)}; Websocket.onmessage = function (evt) {onMessage (evt)}; Websocket.onerror = function (evt) {onError (evt)}; } Function On Open (EVT) {writeToScreen (&qu

javascript - Knockout.js mapping database data to multiple objects -

I am trying to load data into two JavaScript objects that I created using Knockout.js but I Actually it does not know how it is. Currently, I have the following objects: function session (data) {this.id = data.id; This.class_id = data.class_id; This.user_id = data.user_id; // User objectives need to be answered. Stored_elapsed = data.stored_elapsed; } Function user (data) {this.id = data.id; This.first = data.first; This.last = data.last; } Thereafter, my view model for loading my data is: function session vivodel () {// data itself = it ; Self.sessions = ko.observableArray ([]); // Load data $ .getJSON ("/ session / milllist", function (all data) {var mapped sessions = $ .map (all data, functions (items) {return new session (item)) // session in user Objects are needed;); Self. Sessions (mapped sessions)}); } Ko.applyBindings (new session model ()); This session works to create an object, but how can I create part of the session objects as a user object?

Import issues in Python -

I have an import error issue in the test script, it looks like doing something with the directory structure. I have the following folder structure: A1F1 │ ├── __init__.py │ └ ── Src │ └── F2 │ └─ ─ __init__.py └──Test1 └──Test1 └── test_script.py A / F1 / SRC / F2 in F1 "__init__py" has its level at "__init__.py" at level F2 In the same level as F1, another folder "test1" Test1 / test1 / test_script.py < / P> In test_script.py, I have a line that says to import F1.src.F2 with the above, telling me an error Is there any one called "F1.src.F2" Do not have the module Does anyone know what is happening here? imported from F1.src.F2 is a complete import To work, "F1" should be located somewhere on your Python path ( sys.path ). Normally it also includes the existing directory if you run a python on the command line. So if the A directory is not one of the directories on your Python path and your curren

angularjs - Accessing the state of AngularUI tab from within the elements it contains -

I used AngularUI to create a tabbed bootstrap theme: ; Tabset & gt; & Lt; Tab & gt; & Lt; Tab-heading & gt; JavaScript & lt; Span class = "badge" & gt; {{Count}} & lt; / Span & gt; & Lt; / Tab-heading & gt; & Lt; / Tab & gt; & Lt; Tab & gt; & Lt; Tab-heading & gt; Python & lt; Span class = "badge" & gt; {{Count}} & lt; / Span & gt; & Lt; / Tab-heading & gt; & Lt; / Tab & gt; & Lt; Tab & gt; & Lt; Tab-title & gt; Ruby & lt; Span class = "badge" & gt; {{Count}} & lt; / Span & gt; & Lt; / Tab-heading & gt; & Lt; / Tab & gt; & Lt; / Tabset & gt; those & lt; Span & gt; See {{count}} with ? I would like them to be shown only that if their tabs are selected (active) Something like this will happen: & lt; Span ng-show = "tab.active" class = "badge" & gt; {{

java - Does adding "synchronized" affect method overriding? -

मेरी समस्या ये है कि: search_text.addModifyListener (नया संशोधितकर्ता () {@Override सार्वजनिक शून्य संशोधित टेक्स्ट (संशोधित ईवेन्ट ई) {आरे लिस्ट & लेफ्टिनेंट; ऑब्जेक्ट & gt; GPDMvalue = (अर्रेलिस्ट & लेफ्टिनेंट; ऑब्जेक्ट & gt;) multiSortList.getValue (ArrayList & lt; Map & lt; स्ट्रिंग, ऑब्जेक्ट & gt; & gt; मूल्यसूची = getDefaultValue (GPDMvalue); multiSortList.clear (); यदि (GetGPDMList ()। आकार () == 0) रिटर्न; मल्टीस्टोर्ट लिस्ट .सेटडेटासोर्स (getGPDMList ()); // नया धागा 1 बहुआवश्यकता .सेटडिफ़ॉल्टऑराएडवैल्यू (मूल्य लिस्ट); // नया थ्रेड 2}}); जब पाठ बहुत तेजी से बदलता है, और धागा 1 या धागा 2 पूरी तरह से उत्तेजना नहीं करता है, और शायद कुछ समस्या है, तो मैं चाहता हूं कि सिंक्रनाइज़ इस तरह से सार्वजनिक सिंक्रनाइज़ किए गए शून्य संशोधित पाठ (संशोधित ईवेंट ई) , क्या यह अभी भी ओवरराइड विधि है और क्या यह काम करेगा? सिंक्रनाइज़ किए गए कीवर्ड को एक विधि को ओवरराइड करने के तरीके में नहीं मिलता है (यह अभी भी ओवरराइड किया गया है) क्योंकि वही र

What does the 'specify' method do in ruby on rails? -

So I'm working through chapter 6 of Michael Hartl's tutorial and came to this code description with "invalid password" (to do this: user_for_invalid_password) {found_user.authenticate ( "invalid")} {not_not eq user_for_invalid_password} specify {expect (user_for_invalid_password) .to be_false} What does the last line do? Specifically, what does it specify? I did not find anything about it through Google Specify just Nickname you < / p> There may be more investigation the last line simply do not or can check the false , if you supply an invalid password

Python - Find number of characters that are found in both string1 and string2 -

I am trying to find the number of characters in the first string which also comes in the second string. This is what I've done so far: def main (): text1 = raw_input (enter "word1:") text2 = raw_input ("word 2:") print ( "Number of characters that are in", text1, "and", text2, "both" count "), the DRT calculation (text1, lesson 2): for text = 1, in text I: text2 for j In: if i == j: char + = 1 return rayon main () I'm having trouble on def count () I'm not sure how I can count how How many letters are repeated in text1 and text2 Any help is appreciated! The main problem is, you do not calculate function, but count function object printing. It should have been print ("number of ....", lesson 2, "Yes", count (text1, lesson 2)) In addition, you need to increase the counter, if the characters meet in the second string, and then you will see the next string in the next On letter C

javascript - jQuery element add event doesn't response to certain syntax -

I have a jQuery problem, jQuery does not respond to some syntax: $. ("#itemid") change (function (e) {....}); It does not work at all. But when I use it: $ (document) .on ("change", "#itemid", function (e) {....}); It works well, I've read the jQuery manual and I did not get any answers. My test browser is Chrome version 36. OK because the event is connected before the DOM is presented on this page. - If the elements are not dynamically added, then you need to wrap the document preparation process: $ (document) .ready (function () {// or $ (function () {$ ("#itid"). Change (function (e) {....});}); - If element dynamic If you are adding the form then you need to use Event Delegation: $ (document) .on ("change", "#itemid", function (e) {.. ..});

php - Creating a Yii webapp without command line? -

After opening the file, the tutorial had always asked me to enter the text in the command line: - < Pre> yiic webapp test01 Does not there any such command line? Edit: I wonder why this is going away from this topic OK, here is something for refence. In chapter 2 the book "(by Jeffrey Vineet)" has begun: Getting started. Page 23 In order to create a new application, we are going to use a small powerhouse of the device which is called Unique which is packed with the structure. It is a command-line tool that can use one so that a new UI application jumps quickly. It is not mandatory to use the tool, but it saves a lot of time and guarantees that the proper folder and file structure is in place. It says "it is not mandatory to use the tool", which means that there is no way to create a yii webapp without yiic (which I have as command line Mentioned). Thus my question again: 'Yii' command line 'tool, yik? You can use some

java - AJAX Call not Getting to Spring MVC Controller -

I am trying to make a simple AJAX call in my spring MVC project but I'm in trouble. I am requesting my AJAX by sending a string type argument and I want to get an ArrayList back type. I have read many tutorials at the moment and do not understand what is wrong with my AJAX / controller configuration. I am using ResponseBody annotation while trying to return to see my essential results. In this controller I am not returning the update object to an update mode, but it will not make any difference because the page does not need to be refreshed because I am using AJAX. Below is my AJAX call and controller code. I really appreciate it if someone can point out to me what I'm doing wrong. function getdays () {var month selected / $ ("# monthselect option: selected") text (); Warning (monthSelected); $ .ajax ({url: '$ {pagecontonte.request.contextpath} / ajaxdays', data: month selected, success: work (data) {$ ('select # days') .html (data); alert );}})

import - Accessing a Python global variable across files -

php - Match until second occurrence -

मुझे यह स्ट्रिंग है: & lt; h3 & gt; टेस्ट & lt; / h3 & gt; & lt ; तालिका & gt; & lt; / तालिका & gt; & lt; तालिका & gt; & lt; / तालिका & gt; & lt; तालिका & gt; & lt; / तालिका & gt; मेरा अपेक्षित परिणाम: & lt; h3 & gt; टेस्ट & lt; / h3 & gt; & lt; तालिका & gt; & lt; / table & gt; & lt; तालिका & gt; & lt; / तालिका & gt; मैंने कोशिश की है: & lt; h3 & gt; टेस्ट & lt; \ / h3 & gt;।? (\ / Table & gt;) < / Pre> लेकिन यह आलसी अभिव्यक्ति है, इसलिए परिणाम होगा: & lt; h3 & gt; टेस्ट & lt; / h3 & gt; & lt; तालिका & gt; & lt; / table & gt; अगर मैं गलत नहीं हूँ, तो मुझे इस कार्य के लिए HTML डोम पार्सर्स का उपयोग करने की आवश्यकता है, लेकिन इस स्थिति में regex का उपयोग करने के बारे में उत्सुक है। "& lt; h3 & gt; टेस्ट & lt; / h3 & gt;

android - Get location of other people in Google Maps -

I am developing an Android app that allows people to call numbers through their legal Tracks with consent. For some reason, I can not find any related topics in Google or I can not build the right words. Google Maps and others have already been setup I just need some basic infos to approximate LatLng s and those people. Where do I start? Or a recommended link? If you are tracking many people with their consent, then I'm assuming that your app If this is the case for every user running on their personal device, then use the Android Geolocation API to get the device's lat long and publish the backend on the cloud from time to time (many backend Every minute or so to avoid writing) You can use a key / value storage to store the conic, where the key is the user identifier, and this value is the last latitude / long (I can also suggest that the last update to identify the previous update To store a timestamp). You can again get backend query / membership (A) to

CheckBox Event in wxPython not working -

I'm sorry if this is very simple, but I'm trying to force an event in a checkbox in a menubar Am wxPython For some reason, this will not work! I have tried various methods to print a statement, but when I check the box, nothing happens, is it not properly binding? This is just a simple app that I wrote to display this problem ... import wx square frame (wx.frame): def __init __ (self, guardian, id , Title): wx.frame .__ init __ (self, guardian, id, title) panel = wx.Panel (self) menu bar = wx.MenuBar () menu = wx.Menu () self.checkbox = menu.AppendCheckItem ( -1, "Check Me") Menubara (. Menu, 'and check box') self Setmenubar (menubar) self Check the bond (wx.EVT_CHECKBOX, self, check, self check box) def (auto, e): print itself Checkboxes. Check is () app = wx.App () test = frame (none, -1, "test") test.Show () app.MainLoop () I have understood it from the Bind event wx.EVT_CHECKBOX to wx.EVT_MENU .

Lauching vbscript from HTML file -

Good day, This may be a simple question, but there is someone to start Also help really appreciated I have a VBSscript that will launch a website from IE, which will disable the address bar. It works fine when I execute a .vbs file. I have a question, can this script be inserted into an HMTL file and the same action can be taken? When I click on an HTML file, the IE is being detected with a special website whose address bar is disabled. This is my vbscript code: set oIE1 = WScript.CreateObject ("InternetExplorer.Application") oIE1.Navigate "http://www.yahoo.com "OIE1.Visible = 1 oIE1.AddressBar = 0 oIE1.StatusBar = 0 oIE1.ToolBar = 0 oIE1.MenuBar = 0 How do I insert it inside an html file? Thanks a lot! Regards, Jvarman Just ... keep it in an HTML page As such, you are going to receive security alerts, since client-side scripts are not allowed (by default) to instantiate COM / ActiveX objects like you are trying to do. & lt; Html

jquery - display date in jqgrid with spring mvc -

I am using Spring MVC with the jquery grid. I have a date field in my line, in Jason I get a date as "Release Date": 1406399400000 But in the table "NaN / NaN / NaN "shows in my sister class I keep it as a Java date format. The grid configuration column model is as follows. ColModel: [{Name: 'name', label: 'product name', width: 300}, {name: 'releaseDate', label: release date ', format:' date ', Format options: {newformat:' m / d / y '}, width: 300}], I am using jqgrid 4.6. You can use the custom formatter for example which calls the formatter: " Date code with srcformat: "u" property in formatoptions . Format (value, options) (if the value of type === "number" and & quot; 100 billion billion) {return $ .fn.fmatter.call (this, "date", value / 1000, the option); } Other {return "& amp; nbsp;"; }}, Width: 300} In the case of string input value, you

c# - How to remove special characters in ASP.NET Web Service -

I have created a web service system in the espanet and receiving feedback in XML. There are too many special characters in response. How to deal with these special characters, because I am getting such errors: "CRLF characters are not valid in the specified value" What method should I use? Is this a HTTPP suitable? If so, is there a sample? My code: I'm using Regex.Replace , but I'm getting an error: string link = "http : //xxx.xx.x "; HttpWebRequest Request = (HttpWebRequest) WebRequest.Create (link); Request.Connection = Regex.Replace (newstr.m12345 (str, name, pwd, id), "[^ \" a-zA-Z0-9 _?> Lt;> + = ./: -] ", "";); String connection = request.connection; return connection; OK, I got the answer XDocument . with the help of using string link = "http: //xxx.xx.x"; HttpWebRequest request = (HttpWebRequest) WebRequest .Create (link); XDocument Doc = XDocument.Parse (newstr.m12345 (str,

java - Including Custom entries in Manifest.mf -

I am looking to use OSGI and I use the Netbeans platform to create Java code. I need to make some extra in the manifest.mf file which I understand when a special project is created by netbains. Apart from this, I am using Maven as a build system I would like to include some specific OSG entries but I am not sure how this can be done in Netbeans. Do I have to manually change pom.xml or is it 'GUI-fashion' through the project properties dialog? I think you are using it because this owesi bundle to be developed with Maven The most common method is; I will ignore anything with Netbeans because it is not relevant. You can create arbbery entries in the generated Manifest by adding them in the XML format in the POM under the Plugin / Configuration / Instructions section. For example, to add a header with the value foo to My-Header , I will do this: & lt; Plugin & gt; ... & lt; Configuration & gt; & Lt; Instructions & gt; ... & lt; My H

objective c - iOS - blur and buggy retina graphics on older devices running iOS7 -

I'm developing an app for iPad and I have no problem at all when I Tried a single app on iPad 2 , the images were blurry and some of them were not displayed properly, half-visible half-visible was not visible. According to knowing my iOS7 only the app does not require non-retina graphics, so I am using retinal graphics only, Strong> asset catalog , but the result was. It looks okay by using image@2x.png in xib but does not display the image in xib and when I click the image If I use the page then it is displayed in XIT, but there is only one problem when running on the device. What do I have to do to show pictures in the picture and be fine on the device? Fisrt You must provide non-retina graphics in the asset catalog. You should understand that large images on older devices provide large memory and performance effects. You should also pay attention to the weird measure, because if some geometric frames are calculated in the decimal point like 23.5 1.5

python - Replacing a letter with a word -

I'm thinking that to write a function that uses a word with a word without using any function functions Changes. For example, eyeForI ("William") returns "Weyleleyeam" which changes i with eyes. I know how to do this with a built-in function which I have written something like this before (though in this case it changes a word with a different word): < / P> def stringChange ("no", "should not be"), ("no", "no"), (old), in new (("can not", "no "), (" Will not "," will not be "),): s = s.replace (old, new) if"! " S: s = s.upper () Returns S But I do not know how to write it without using any built functions. I know that I have to use for the loop. Here you try and separate for something rather than loop, generator, dictionary in it Contains the default argument for get , and join . You can repeat through a string, which means that you do no

asp.net mvc - How to allow user to enter email in QueryString in MVC4? -

उपयोगकर्ता www.abc.com/Email/abc@abc.com HTTP त्रुटि 404.0 - नहीं मिला जो संसाधन आप ढूंढ रहे हैं उसे हटा दिया गया है सबसे संभावित कारण: निर्दिष्ट निर्देशिका या फ़ाइल वेब सर्वर पर मौजूद नहीं है। URL में एक टाइपोग्राफ़िकल त्रुटि होती है। एक कस्टम फ़िल्टर या मॉड्यूल, जैसे URLScan, फ़ाइल तक पहुंच को प्रतिबंधित करता है। चीजें जो आप कोशिश कर सकते हैं: वेब सर्वर पर सामग्री। ब्राउज़र यूआरएल की समीक्षा करें। लॉग इन असफल अनुरोध जांचें और देखें कि कौन सी मॉड्यूल सेटस्टैटस को बुला रहा है अधिक जानकारी के लिए यहां क्लिक करें। कृपया यहां अधिक पढ़ें। आपको चाहिए एन्कोड @ से '% 40' और इसे अपने एमवीसी एक्शन में @ पर वापस डीकोड कर दें। डिकोड करने के लिए आप encodeurIComponent का उपयोग कर सकते हैं यूआरएलडीकोड बैकड पर

html form submits prematurely on validation subroutine using jquery dialog box -

I am using the jquery dialog box to display the message while the form is complete. Eventually, the last dialog box starts working in the last brief, but the "X" does not appear, the box automatically dismisses it, and the form is deposited before the time. The sample of an incomplete dialogue box is here: (The form must be submitted before the "X" image is displayed.) I I am using jquery-1.10.1. I think this may be a jquery problem when I change the jquery dialog box with a simple "alert", it works. Here is javascript: function Walatta () {Warning ("Watch closely; dialog box pops up, dismiss automatically, and submit form" ) $ ("& Lt; div title = 'Basic dialog onclick' & gt; Create simple b4 submit & lt; / div & gt;). Return Here's the html: & lt; Form NAME = "mainform" METHOD = "POST" ACTION = "http: //www.bbhq .com / dummy.htm" onSubmit = "return Wal

actionscript 3 - Include all class files in Flash -

Image
मेरे पास वर्तमान में इन सभी फाइलें हैं: समस्या यह है कि, किसी भी एक्शनक्रिप्ट फाइल को ~ shell.fla में शामिल नहीं किया जा रहा है। मैं [मुझे लगता है] सभी फाइलों को अलग से शामिल कर सकता है, लेकिन एक टन है। यह प्रत्येक दिन अलग-अलग फ़ाइल को शामिल करने के लिए मुझे लेगा उस मामले के साथ, ~ shell.fla में उन चार फ़ोल्डर्स को शामिल करने के लिए कोई शॉर्टकट है? फ़ोल्डरों में फाइलें मुख्य रूप से कक्षा फ़ाइलों से मिलती हैं मुझे लगता है कि इन्हें पैकेज कहा जाता है। एक फ़ोल्डर 'कॉम' के भीतर सभी वर्गों को आयात करने के लिए उदाहरण: आयात कॉम। *;

arrays - error while executing sort and search C functions -

I have defined two functions search and sort which are used Another program when I try to run the program, I get an error unexpected input What does the error mean? I do not know what is the problem with my code # "helpers.h" # Include / ** * value is true if value is in the array of values, and is false * / Bool search (int value, int value [], int n) {values ​​[n] = n; Return to {if (value [n] == value and & amp; price> gt; 0) for 0 (int i = 0; i & lt; n; i ++); And return 1; } Return 0; } / ** * Sorts an array of values ​​* / zero sort (int value [], int n) {int min, swap; For (int i = 1; i <(n-1); i ++) {min = i; For (int j = i + 1; j; l; n; j ++) {if (value [j] This is the main program in which I will call the above two functions #include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; # Included "helpers.h" / // maximum volume grass const int MAX = 65536; Int main (int argc, string argv []) {// Ensure proper

Value of a String to e.KeyCode in C# -

तो im सी # विंडोज फॉर्म आवेदन दृश्य स्टूडियो में, मैं एक ध्वनिबोर्ड प्रोग्राम बना रहा हूँ जो कि "हॉटकीज़" से संबंधित ध्वनि चलाता है उपयोगकर्ता द्वारा निर्धारित मुझे पता चलने में समस्या हो रही है कि उपयोगकर्ता को हॉटकीज़ सेट करने के लिए प्रोग्राम कैसे प्राप्त किया जाए। यह अस्पष्ट लग सकता है, तो मैं आपको दिखाता हूं। ठीक है, यह वह कोड है जिसे आरंभ से चलाने के लिए सेट किया गया है "जब आप डिजाइन मेनू में फ़ॉर्म को डबल क्लिक करते हैं तो आप क्या संपादित करते हैं" यदि (ई। केकोड == कुंजी। डी) {// प्रोग्राम ध्वनि बजाता है} इसलिए मुझे पता है कि जब मैं अपने कीबोर्ड पर "डी" दबाता हूं , ध्वनि नाटकों खैर, जब मैं एक ऐसे चरित्र में टाइप करता हूं जो मैंने एक टेक्स्ट बॉक्स में लिखा है, तो कहीं मैं खेलना चाहता हूं। जैसे कि मैं अपना प्रोग्राम "सेट हॉटकी" पाठ बॉक्स में "टी" डालता हूं, फिर टी दबाएं और ध्वनि नाटकों को दबाएं। इसलिए मुझे यह कार्यक्रम ऐसा कुछ करना है यदि (e.keycode == कुंजी। (Textbox1.Text)) // textbox1 मेरा सेट हॉटकी बॉक्स है {

php - How can I run only one test from a suite? -

I have this test class, and I just run one test from it, for example "aboutpage" < / P> But now I want to run only one exam from the file. & lt ;? Php use \ AcceptanceTester; Class VisitorsCast {Public Function _before () {} Public Function _after () {} About Public Celebration Page (Approval Time $ I) {$ I- & gt; WantTo ('check about page'); } Public Function Contact Page (Approval Time $ I) {$ I- & gt; Wish ('check contact page'); }} You only add a colon and function name, such as: < / Code> or a smaller version: CodeEp Run acceptance VisitorCest: codecup run test / acceptable / VisitorCest.php: myTestName MyTestName (Note the place between the name of the name and the filename.)

android - FragmentManager and SupportFragmentManager both used -

I did not want to use the 'support' stuff, I only have API level 14 (4.0) so I SupportFragmentManager not used. Everything went well, but then I was using the drawer layout which is in the assistant library. Then the problem started: to use it, your activity is FragmentActivity . You must use the getSupportFragmentManager . So I use that one for the drawer. But I use getFragmentManager to manage the slice adjustment. I have a addToBackStack () in substitution, but when I press 'back', the activity stops when I do this in another activity which is Fragment activity does not increase , so it works as expected (piece is pop). Now I OnBackpressed () <+ / code> and make a pop if there is a piece Edit: I was completely switcher of one Support, but I'll put a question here because I'm still curious

sql server - sql case statement then insert into table -

I process looks like the code store: Use nisa1415; The process to change dep.AddLessons (@LessonsTable nvarchar (50), @LesDepId integer, @TeId integer, @GradeId varchar (10), @Activated integer, @GroupId integer, starting as @TaskTable nvarchar (50)) select @ LessonsTable = case @LessonsTable when 'dep.les_Biology' so dep.les_Biology (LesDepId, TeId, GradeId, active, group, TaskTable) values ​​(@ LesDepId, @ TeId, @ GradeId, @ active, @ Group @ TaskTable) finally return Insert in This gives me an error: 'Insert' to the wrong syntax is a problem that I could not find? process AddLessons changes (@LessonsTable nvarchar (50), @LesDepId integer, @TeId integer, @GradeId varchar (10), @Activated integer, @GroupId integer, @TaskTable nvarchar (50)) as if @LessonsTable = 'dep.les_Biology' dep.les_Biology (LesDepId, TeId, GradeId, active, group, TaskTable) values ​​(@ LesDepId, @ TeId, @ GradeId, start putting Active @ @ GroupI D @ Tasktebl) end back end

mysql - Update query SQL to update various fields of table? -

यह मेरी मेज है: आईडी वितरण_मॉड पुराना_निर्धारण_मोड 123 ईमेल एसएमएस 126 एसएमएस एसएमएस 13 9 ईमेल sms = 100 email = 200 facebook मैं अपने टेबल फ़ील्ड मानों को इन मानों के साथ अद्यतन करना चाहता हूं: sms = 100 email = 200 facebook = 300 ऐसा है कि: आईडी वितरण_मोड पुराना_ डिलीवरी_मोड 123 200 100 126 100 100 13 9 200 300 147 300 200 198 100 100 210 100 200 मैं इसे एक एकल क्वेरी में करना चाहता हूं। मैं इसे कैसे कर सकता / सकती हूं? < Div class = "post-text" itemprop = "text"> अद्यतन करें your_TABLE_NAME SET delivery_mode = केस जब delivery_mode = 'sms' तब '100' WHEN वितरण_मॉड = 'ईमेल' तब 'delivery_mode =' facebook 'THEN' 300 'WHEN डिलीवरी _ मोड पर डिलीवरी_मैड END, old_delivery_mode = मामला जब old_delivery_mode =' sms 'तब' 100 'WHEN old_delivery_mode =' email 'तब' 200 'WHEN old_delivery_mode = 'फ़ेसबुक' THEN '300' WHEN पुरानी _ डिलीवरी_मोड THEN पुर

c++ - how do i store and get a queue of structure? -

How can I store and obtain the value of the structure in a row where I have 2 values? I want to quote some of these values. | 4, 2. | 3, 5. Where a variable can be from 4,2 and 3,5 such as primaryQ.push (a, b); My structure: struct primarytemp {double process; Double secondary; }; Here's how I declared my main: int main () {queue & lt; Primarytemp & gt; PrimaryQ; Primary Q.push (4, 2); } You just type a primarytemp object, type Without modifications: Qi < Primarytemp & gt; Q; Q.push (Primetime {4., 2.}); // Existing C ++ standard (C ++ 11) priorityEmpep P = {3., 5} is required; Q.push (p); // PreC + 11 11 works As mentioned by other people, you can add a constructor for primitiv , though This means that it is no longer this altogether, it can not be the priority or the case altogether. primarytemp {}: process (), secondary () {} primarytemp (double process, double secondary): process (process), secondary (secondary) {} dua

sublimetext - Sublime Text: common "folder_exclude_patterns" for all folder paths in a project -

How can we set the common "folder_exclude_patterns" for all folder paths in a project? For example, in the following project configuration, folder_exclude_patterns for each folder path must be repeated. Can we get it in a common place in the configuration instead of specifying it under each of the path settings? class = "lang-json prettyprint-override" : "Path / per / folder / 2", "folder_example_pattern": ["node_modules", "target", ".sass-cache"]} {{follow_symlinks}: true, "path": ["node_module" The "path_to_symlinks": true, "path": "/ path / to / folder / 3", "folder_exclude_patterns": ["node_modules", "target", "target", ".sass-cache" ToggleExclude the plugin () to the problem verb Resolves.

java - I found a net connection error while using localhost in jdbc -

I have written this program to connect to my computer which is on the same computer but every time I have a pure connection Error found. Com.mysql.jdbc.CommunicationsException: communication link failure due to the built-in exception: import java.sql *; Public class demo {public static zero main (string [] args) {try {class.forName ("com.mysql.jdbc.Driver"); Connection Connection = DriverManager.getConnection ("jdbc: mysql: //127.0.0.1: 3306 / db", "user name", "pwd"); Statement stmt = connection.createStatement (); String str = "show tab"; Result result result = stmt.executeQuery (str); While (resultSet.next ()) {System.out.println (resultSet.getString (1)); }} Hold (exception e) {e.printStackTrace (); }}} My stacktrace is: - com.mysql.jdbc.CommunicationsException: communication link failure due to the underlying exception: ** BEGIN nested exception ** java.net.ConnectException Message: Connection refused: Connect STACKTRA

matlab - how to solve something associated with memory and speed of my computer? -

First of all, I have a special task that works at the cost of every possible combination of category, I already A program that my purpose is to do this code: clc one = clear the input ('please, select your array:') b = a (:). 'C' for length (b) d = 1: c if (d & lt; c) e {d} = nchoosek (b, d); End (m, 2)], 'post' (e), e, 'uniform output', 0); Uu = cell2mat (tt ([1: d-1])) suu = size (u) u (:, (suu (2)) + 1) = = sum (uu) ' But during the implementation of this program, I had to face a major problem: e {d} = nchoosek (b, d) The number of possible options and the number of selected options and ultimately failed to continue as a result of boundaries: When b = nchoosek (n, k) Is larger than, nchoosek shows a warning that the result can not be accurate In case of the case, the result is only 15 digits for double-precise input or 8 digits for a single-precise input. C = nosacec (v, k) Is only practical for circumstances where th

activity lifecycle - Android: What is a good place to release used resources that is not onDestroy? -

I'm looking for a place to put my clean up code (like issuing file handles, shutting down services do). Here's the scenario: I have an app with many activities and there is a service running in the background. This service reaches many sensors and files, in this way, if the app has been aborted to stop the battery drain from the user, then it has to be stopped. However, the app is in the background and / or the service must be turned on when the screen is off. I'm looking for a place to stop the service in code OnDestroy () My activities are not a good idea because Android can call it (even if my app is running) or can not call it anytime Is there a good place to release resources used by an app when the user deliberately terminates it?

asp.net - Button click not working inside update panel -

When I use the button in the update panel, it does not fire click event, but works out of the update panel is. Here is the code & lt; Asp: UpdatePanel id = "updatePanel2" runat = "server" UpdateMode = "Conditional" ChildrenAsTriggers = "false" & gt; & Lt; ContentTemplate & gt; & Lt; Asp: button id = "btnBlock" class = "button" text = "blockcalls" runat = "server" onclick = "btnBlock_Click" enabled = "true" width = "100px" /> & Lt; / ContentTemplate & gt; & Lt; Trigger & gt; & Lt; Asp: AsyncPostBackTrigger ControlID = "btnBlock" /> & Lt; / Trigger & gt; & Lt; / ASP: UpdatePanel & gt; Code for the button protected void btnBlock_Click (Object Sender, EventArgs e) {CtiWS.CtiWS CtiWS1 = New CtiWS.CtiWS (); Response.Write ("& lt; scripts> warning (" '+ convert.ToString (session

javascript - emberJS mixin super override -

इस सवाल का पहले से ही एक उत्तर है: < / P> 2 जवाब 1 जवाब मैं एक मिक्सिन को ओवरराइड कैसे कर सकता हूं, लेकिन अभी भी पुरानी मिक्सिन कार्यक्षमता रखता हूं। मेरे पास एक मिक्सिन है जो मॉडल से पहले , और एक मार्ग है: App.PlayRoute = Ember.Route.extend ("इससे पहलेमोडेलमिक्सिन", {मोडेल से पहले: {// यहां मोडेल कार्यक्षमता से पहले मुझे मिक्सिन करना है साथ ही मेरा अपना हुक।}} उदाहरण के ऊपर इससे पहले ModelMixin ओवरराइड किया जाता है और अब और काम नहीं करता, क्योंकि मैंने beforeMo परिभाषित किया है डेल दोबारा। क्या यह संभव है?

TextView size and scrolling issue (Android) -

I only have a TextView in the ScrollView that can have different text. Text size is always different The problem is Whether or not it can be fully placed on the TextView screen on different screens. I want to put vertical text on the screen. If the text is small, then it works fine but if the length of the text can be higher than the screen, then it loses the beginning of the text and there is also the strange spaces after the text. How can I fix this? The textual attribute of gravity just focuses horizontal text, but layout_gravity is the strange thing that I described above if I have layout_gravity < / Code>, all the text looks good, but this scrollview = ( & lt; ScrollView is on top of Android: layout_width = "match_parent" android: Android: layout_alignParentTop = "True" Android: layout_margin = "15dp"> TextView Android: id = "@ + id / textview" Android: layout_width = "Left_Heat =" 0 DP "Andro E: And

android - build.gradle minsdk system when compile library -

मेरे पास minSdkVersion 11 targetSdkVersion 19 है, जब मैं कुछ पुस्तकालय संकलित करता हूं और पुस्तकालय में minSdkVersion 14 है। प्रोजेक्ट त्रुटि: कार्य निष्पादित करने के लिए असफल: 'app: processDebugManifest'। मैनिफेस्ट विलय विफल: उपयोग- sdk: minSdkVersion 11 संस्करण 14 से कम नहीं किया जा सकता पुस्तकालय में घोषित Com.me ****: *********** इस तरह से। लेकिन मेरा कोड लेआउट- v14 में काम कर रहा है यह कोई समस्या नहीं है, मैं इसके लिए क्या कर सकता हूं? क्या कोई सेटअप अलग तरह से है minSdk या चाल या कुछ और?

django - Gunicorn Environment Variable Setting -

I am currently having difficulty crossing the environmental variable in Gonicorn for my own project. I'm on the latest version 19.1 I have a wsgi.py file like this: import import from sys django.core.wsgi get_wsgi_application BASE_DIR = os.path.dirname (os.path.abspath (__ file__ )) PROJECT_DIR = Os.path.abspath (os.path.join (BASE_DIR, '..')) sys.path.append (PROJECT_DIR) os.environ.setdefault ("DJANGO_SETTINGS_MODULE", "Apps Settings") Def App (Environment, ['SERVER_ID'] OS environment ['SERVER_ENV'] os.environ ['SERVER_ID'] = Environment ['SERVER_ID'] Return _pakication (environment, start_progress) / Pre> When I run the Gnocorn from the command line: SERVER_ENV = test SERVER_ID = test guanacore - b 127.0.0.1:8080 - Terror-logfile - - Access-Logfile - app.wsgi: application And then I pass a request for the Ganoikorn which I keep: / P> 2014-08-01 08:39:17 [21462] [Error] Error traceback handling t

zip - 7zip update archive command creates undesirable tmp files -

I have an .exe that adds updates and adds 7zip operation Update operation creates .tmp files that The files are not deleted after compression. In addition, their names are * .zip.tmp1, * .zip.tmp2 and such ... I make these .tmp files or zip actions after these files How can I stop deletion?

perl - ActiveState PerlApp fails to compile the RPC::XML::Client module -

None prettyprint-override "> Object method can not be found" RPC :: XML :: Client :: new: Unable to obtain RPC :: XML :: Parser object "(maybe you can use" simple_request " Unable to load RPC :: XML :: Client :: new: RPC :: XML :: Parser object, forgot to load "?) and code: Use the hard # / usr / bin / perl; Use RPC :: XML; Use RPC :: XML :: Client; $ VNEURL = "https: //" "$ ConfIPHost" / "API /"; $ VNESession = RPC :: XML :: Client-> New ("$ VNEURL", UserAgent => [SSL_opets => {verification_hostname => 0, SSL_verify_mode = & gt; "SSL_VERIFY_NONE"}]); $ VNEAuthCookie = $ VNesession-> Simple_Lesson ('Login', 2, 0, $ ConfIPUser, $ ConfIPPass) or die ("Failed to log in IP360."); In the documentation, the author appears to be: requires RPC :: XML; RPC :: XML :: Client is required; Instead of 'use', will explain why i

c# - When to use SQL view over DTO -

Hello Firstly, I just want to say that iam is not yet a programmer. I started learning less than a year was doing. I was thinking a little bit and went a little bit but I did not get any concrete answers. I recently learned using SQL visuals. It is quiet and it helps me to accomplish my work. If I have an old, poorly designed database, then ideas and DTO perform miracles in my world. Mostly because this is the only way that I know to work with data that are not dependent on each other but it still is? If I make a scene with data, with which I want to work, the unit framework makes it one unit. It looks like watching and the DTO goes a little in hand, though it is two totally different things and then for my question. When should I use the scene on DTO and vice versa? (I have full knowledge that this can be a stupid question because I do not have anyone to ask anyone!) Sebastian, Good for you to choose business! Regarding your question, there is a false similarity in

wordpress previous_post_link not excluding category -

Using the previous_paste_link and trying to exclude a custom classification This is the command line < / P> previous_post_link ('% link', "", wrong, $ area-> term_id, 'region'); P>

Lotus notes script agent.run Progress -

Lotus note 6.5.6 when I have an agent that uses agent.Run or click agent.RunOnServer . So I need to know the position of the progas of any secondary agent. I try to put some print ("file processing" + cstr (n) + "%") code of any sub-agent, but lotus notes I can not see anything in the progress bar Is there any way or quality that allows me to show the progress status of any "sub agent" which I am the main agent? thanks for print () agent Does not work agent.Run and not for agents beginning with agent.RunOnServer . The documentation says for both: The user can not directly contact an agent, the user goes into the output domino log. You can establish a communication between your main agent and a sub-agent with the help of a memory-document sub-agent can write the current status in the document regularly. And with the help of the main agent Notimier Class, print 'print' can print them. As an alternative, you can use a

node.js - 'nodejs web.js' works, 'foreman start' doesn't -

I am developing a website that I want to deploy on local people / cute / AOS < P> Local people and AOS, when 'Node's Web JS 'port calls to 3000 works, While giving 'foreman start' this ports give feedback to 3000, but the browser does not show the site. Note: '/ Public' Dyare was replaced with 'assets'. web.js var http = require ("http"), // path path path // utilities ("(" ("(Fs"), extension = {".html": "text / html", ".css": "text / css", ".js" to access the file system "Image / jpeg", ".tf": "font / truetype": "image / png", ".gif": "image / gif": "image / gp", ".jpg" , ".jpg", ".otf": "font / opentype", ".woff": "application / x-font-woff"}; Http.createServer (function (req, res) {// URL in one file Look for the name

Alter default parameters of a function in a decorator in Python -

I have a decorator to change the string argument passed in the function: def decorator ( Fn): Def Cover (* Args): replacement = list () for arg in arg: new_item = arg + "!!!" Restriction .append (new_item) args = tuple (replacement) print fn (* args) return cover I have a generic parameter that gives me the decorator : def f1 (arg1 = "hello world"): return arg1 to my surprise Decorator (F) 1) () # Returning a default Hello World using the default argument I did some research, and found out that I also learned that the default values ​​parameters are stored in the .func_defaults property. + fn.func_defaults: The default parameter value of the question function passes in f1 wrapper by * args and changes to expected form ?

c# - Reading XML using XPathDocument using NetworkStream -

यह अनुप्रयोग लटकाए: XPathDocument xPathDocument = नया XPathDocument (networkStream); मुझे लगता है कि इस XPathDocument की वजह से अभी भी डेटा के लिए प्रतीक्षा कर रहा है, लेकिन यह को रोकने के लिए कैसे है? पूरे एक्सएमएल भेजने के बाद सर्वर ने कनेक्शन बंद नहीं किया था (भविष्य में संचार के लिए शेष शेष कनेक्शन) XPathDocument अभी भी डेटा की प्रतीक्षा करता है सर्वर किसी अन्य डेटा को यह निर्धारित करने के लिए प्रदान नहीं करता है कि एक्सएमएल स्थानांतरण पूरा हो गया है या नहीं। हालांकि यह जांचना संभव है कि संपूर्ण XML रूट टैग समाप्त हो रहा है। XPathDocument रूट टैग समाप्त होने के लिए नहीं देखता है, इसलिए यह समाधान थोड़ा मुश्किल है, लेकिन काम करता है। मैं स्ट्रीम पढ़ रहा हूँ XmlReader का उपयोग कर और XmlWriter द्वारा एक्सएमएल पुन: उत्पन्न करता है जो स्ट्रिंगवर्टर में लिखता है। StringWriter के अंत स्ट्रिंग आउटपुट को StringReader के लिए suppiled है, जो XmlReader द्वारा पढ़ा जाता है। और वित्त, XPathDocument इस XmlReader से डेटा पढ़ता है। यहां उदाहरण कोड है: XmlReader xmlReader = XmlReade

zend framework2 - PHP add function to array without executing -

My project is working with the automatic code generator and the Zend Framework for file / class / method reflection IM using 2 need to add the elements in the array went back to me: public function getServiceConfig () {return array ( 'factories' = & gt; array (' album \ models \ AlbumTable '= & gt; function (get $ sm $ {$ TableGateway = $ sm- & gt; (' albumtable gateway '); $ table = new album tab ($ tablegateway); return $ Alika;} 'Albmteblgetve =' => function ($ sm) {$ dbAdapter = $ sm - & gt; Get ( 'Zend \ Db \ Adapter \ Adapter'); $ resultSetPrototype = new ResultSet (); $ resultSetPrototype- & gt; Setareobjektprototaip (new album ()); new Teblget ( 'Album', $ dbAdapter, null, $ result prototype);},),);} I 'factories' Get the array but can not add new element (work) (I need to add new element to factories like "objectTableGateway '=> function ($ sm) {...}" body = I write var_ex