Posts

Showing posts from May, 2011

java - value to the next thousand instead of nearest thousand -

But I have no idea how to do this. I tried Math.round , but it is for the goal. Please guide me, any help would be appreciated. Expected output that I am looking for: Example 1) If this location is less than 999 then it should be directly 1000 How can I code the mathematical formula for this? You can use Math.ceil for this. // An instant code example: int val = 1400; Val = monastery CEL (VAL / 1000) * 1000;

Python Key Error:1 -

मुझे इस कोड के साथ एक प्रमुख त्रुटि मिलती है आइटम = {'coke': ' 1.50 ',' मर्स ':' 1.00 ',' फंता ':' 1.40 ',' वास्पा ':' 1.50 ',' आकाशगंगा ':' 2.00 ',} def list_items (): एक्स में सीमा के लिए (0, लेन ( आइटम ()): प्रिंट ("आइटम:", आइटम [x]) यहां त्रुटि लॉग है पंक्ति 12, list_items प्रिंट में (" आइटम: "आइटम [x]) कुंजीईअर: 0 मुझे लगता है कि आप भ्रमित हैं सूचियों के साथ सूची अपने आइटम dict की चाबियाँ 'कोक', 'मर्स', 'फंता', आदि हैं और इसी तरह आप इसे कैसे प्राप्त करते हैं जैसे आइटम [कोक '] । आइटम को पुनरावृति करने के लिए, ऐसा कुछ अधिक सामान्य है: > gt; & gt; & gt; Def list_items (): ... के लिए k, आइटम में वी .इटम (): ... प्रिंट ("{}: {}"। प्रारूप (k, v)) ... & gt; & gt; & gt; List_items () कोक: 1.50 मर्स: 1.00 आकाशगंगा: 2.00 वाइस्पपा: 1.50 कल्पना: 1.40

xls - xsd rules with elements with same name but not same attributes -

मेरे पास एक एक्सएमएल फ़ाइल है जैसे & lt;? Xml संस्करण = "1.0 "एन्कोडिंग =" यूटीएफ -8 "? & Gt; & LT; सूची & gt; & Lt; some_element कोड = "एए" & gt; कुछ पाठ & lt; / some_element & gt; & Lt; same_name_tag style = "header1" & gt; कुछ पाठ & lt; / same_name_tag & gt; & Lt; same_name_tag style = "header2" & gt; कुछ पाठ & lt; / same_name_tag & gt; & Lt; same_name_tag style = "header3" & gt; कुछ पाठ & lt; / same_name_tag & gt; & LT; sometimes_here_can_be_tag / & gt; & Lt; same_name_tag style = "body1" & gt; & Lt; नया नंबर = "1" / & gt; & Lt; नया नंबर = "2" / & gt; & Lt; / same_name_tag & gt; & Lt; same_name_tag style = "body2" & gt; & Lt; नया नंबर = "1" / & gt; & Lt; नया नंबर = "2" / & gt; & Lt; / same_name_tag & gt; ...

c# - For Android this is a simple script which i want to modify for touch devices? -

Text after " This is a simple script for double jump, but I also touch it to respond to Want Personal LlatformerCharacter2D Characters; Private Bowl Jump; Zero awake () {character = GetComponent & lt; LlatformerCharacter2D & gt; (); } Zero Update () {if (Input.GetButtonDown ("Jump")) jump = true; } Without fixed updates () {character.Move (1, false, jump); Jumping = false; } Create an object with the collider and tag it as tag (it Your jump button) and see if it has touched zero update () {if (Input.GetMouseButtonDown (0)} {Ray Re: Camera.main.ScreenPointToRay (Input.mousePosition) ; Reit Hit Hit; If (Physics. Recast (ray, out hit)) {if (hit.collider.tag == "Jump") jump = true; }}}

javascript - How can I get rendered text of any HTML in ExtJS? -

एक एचटीएमएल है जो टेक्स्टवेयरफील्ड में बचा है; "पूर्व वर्ग =" ब्रश: एसकेएल "> gt; & lt; span शैली =" रंग: # 999; "& gt; SELECT & lt; / span & gt; एटीएम.TBL_SKR_LISTENER.MSG_ID, एटीएम.TBL_SKR_LISTENER.MSG & lt; span शैली = "रंग: # 999;" & gt; FROM & lt; / span & gt; एटीएम.TBL_SKR_LISTENER & lt; / pre & gt; " मुझे यह प्राप्त करना है; SELECT ATM.TBL_SKR_LISTENER.MSG_ID, एटीएम.TBL_SKR_LISTENER.MSG से एटीएम.TBL_SKR_LISTENER मैं ExtJS का उपयोग करने के साथ इस HTML कोड के मूल्य को कैसे प्राप्त कर सकता हूं? धन्यवाद यह सरल नहीं है, बस div बनाएँ और इस div को textarea मान में सेट करें, फिर टेक्स्ट कंटेंट या डिवेल के भीतर टेक्स्ट प्राप्त करें। अधिक जानकारी के लिए इस बेला को देखें:

Youtube Data API V3 - No Video url -

I am using YouTube Data API version 3, to get the top YouTube video, I like the rest of the API "", "ID:": "" "YouTube video", "Video ID": "123123 Assassine 12"}, "Snippet": {"Published:": "Date", "Channel ID" : "GdaekQquk 123123", "Title": "Merry Totals," and {"Url": "...... jpg", "width": 120, "height": 90}, "medium": {"default": {"default" Url ":" ...... jpg "," width ": 320," height ": 180}," high ": {" url ":" ...... jpg "," width ": 480 , "Height": 360}}, "Live Broadcast Content": "None"} But this data does not include the YouTube video URL, how can I get it API ? You may have a video URL like this: You have results : "YouTube": "YouTube...

javascript - can an EXTERNAL iframe be included into google chrome extension -

मैं इस लेख का संदर्भ देता हूं: & lt; html & gt ; & Lt; शीर्ष & gt; & Lt; शैली प्रकार = "टेक्स्ट / सीएसएस" & gt; शरीर {चौड़ाई: 200; ऊंचाई: 300;} & lt; / style & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; iframe src = "http://m.bing.com" width = "100%" ऊंचाई = "100%" फ्रेमबॉर्डर = "0" & ​​gt; & Lt; / iframe & gt; & Lt; / body & gt; & Lt; / html & gt; इस एक्सटेंशन का स्रोत कोड है: हो सकता है कि यह कुछ भी नहीं दे। मेरा प्रश्न यह है: एक बाह्य आइफ्रेम Google क्रोम एक्सटेंशन में शामिल किया जा सकता है? हाँ, आप iframe एक पॉपअप के अंदर । यह थोड़ी भारी है और मैं इसे करने की अनुशंसा नहीं करता, लेकिन आप कर सकते हैं। आपके द्वारा लिंक से जुड़ी विस्तार की समस्या यह है कि manifest.json फ़ाइल खराब होती है: "manifest_version" पैरामीटर अनुपस्थित है, और इसे 2 पर सेट किया जाना चाहिए। डिफ़ॉल्ट पॉपअप > manifest.json...

java - Does Hibernate automatically restart transactions upon deadlocking? -

A lot has been written about this topic: ... many more I have received the last approved response specifically: If you are using inodb or any line-level transaction RDBMS, it is possible that any write transaction can cause a standoff, even in completely normal circumstances. Large tables, large writes, and long-term transaction blocks will likely increase the chance of deadlock. In your situation, maybe it's a combination of them. This will mean that we can never stop them, but only to deal with them. is it true? I wonder if you can ever stop Deathlong with 1000 people on the website who call for DB operations. Going to the topic does not yield any interesting results only one I found (): Public RestartTransactionAdviser Method Interceptor Apply {Private Static Logger Log = Logger GetLogger (RestartTransactionAdviser.class); Public invocation call (method investment charge) throws throwsable returns (returning, 1); } Private Object Resta...

c# - WCF service - Getting Runtime error in basicHttpBinding configuration transport clientCredentialType to Basic -

Image
I have created a web service and I'm basic use HttpBinding but the thing is that when I set type client credentials I use the service, but if I'm set to root / windows then I'm getting an error like "runtime error" IIS basic authentication is used. I need security for basic Httpbinding, how to solve this problem. The web in the code. Config: & lt; Services & gt; & Lt; Service name = "healthcare service" transaction support = "behavioral service 1" & gt; & Lt; Endpoint address = "" contract = "iHealthCareService" binding = "basic HttpBinding" binding = "basic HttpBinding1" /> & Lt; Endpoint Address = "Max" contract = "IMATAdataXchange" Binding = "MaxHttpending" /> & Lt; / Services & gt; & Lt; / Services & gt; & Lt; Binding & gt; & Lt; BasicHttpBinding & gt; & Lt; Bond name = "original HttpBinding...

Java Asynchronous process runner with inputstream reader using Futuretask -

I'm trying to run an asynchronous process and get its inputstream (if any) This is my code: command line command call = new command call (commands); Executable Service Executor = Exporter. Eneaselinglingthread exeter (); Future & lt; Integer & gt; Task = executor submit (commandCall); and this process is run task public class command line enforceable & lt; Integer & gt; {Private byte [] output; Private Ent Rated = -1; Private string [] command = null; Process process = null; Public commandcall (string [] commands) exception {this.commands = commands; This.output = null; } Public Zero Blast () {try {if (process! = Null) process.destroy (); } Hold (exception e) {}} public byte [] getByteArray () {return output; } Public int getRetval () {return retval; } @ Override Public Integer Call () throws exceptions {try {process = new ProcessBuilder (commands) .start (); // Here I have to read process input and it must be stored on it. Output // It should be a no...

substitution - Sourcing .profile from another script in ksh -

My .profile file has a RESLOC variable, which changes periodically. So I wrote a script, just take the input from the user on the new name. cat tst.sh echo "Enter the location of the result where you would like your results go away." RLL Pearl-PI.BK-E "/ ([\ s] +) RESLOC = \ / result \ / ([\ S] +) / $ 1 RESLOC = \ / result \ / $ {RESL} / g" / reading For the / user / .profile cd / user /user/.profile "$ RESLOC" echo The last echo statement gives the output as a given value to the user. But when I have executed the script in the terminal, it displays the old value. Enter the result of $ / SP Enter the name of the place where you want your results to go. When the execution ends, when trying to display the RESLOC $ RESLOC / user / release11 / pre> .profile file with update 12 has given. But it is not found properly. help please. When you run tst.sh, a new shell process is generated and when it runs in your environment Ends bac...

Properties from file for java application in eclipse -

Image
I want to run a Java class in the eclipse with vm arguments. Is there any way, I can tell the properties file from which this argument can be raised. i don but if you have a Java class in Eclipse with VM arguments , You can set those Vim arguments under the Logic tab (in the VM logic text box) in the runtime configuration of your project.

Unable to start an activity from fragment -

I have an image view in one piece. Click on the image I want to start an activity. Below is showing my code empty indicator exception. The public static class extends the DemoObjectFragment fragment {// public static final string ARG_OBJECT = "object"; Reference con = getActivity (); @ Override Public ViewCreative (LayoutInflator Inflator, View Group Container, Bundle Saved InstantState) {See Routview = Inflator.In Flat (R. Late FragmentCollection_Object, Container, False); Bundle args = milligruments (); ImageView shadow_img = (ImageView) rootView.findViewById (R.id.shadow_img); ImageView img = (ImageView) rootView.findViewById (R.id.img); Img.setOnClickListener (New OnClickListener) {@Override Public Zero onClick (see v) {// TODO Auto generated method Stub Intent = new intent (getActivity, Article.class); getActivity () startActivity ;}}); Shadow_img.setImageResource (R.drawable.featured_shadow); New ImageLoadTask (args.getString ("img_url"), (ImageView) ro...

asp.net mvc - kendo grid custom command not displaying -

I am creating a condo grid and I need a custom command which can be used by two of my MVC controller method Could cross Now the code for my grid is: @ (html.codeo) grid & lt; iPlan.Syspro.Beekman.Portal.Agents.Models.SalesOrderDetailViewModel & gt; () .name ("Details"). Html Properties (New {@style = "width: 80vw"}). Column (column => {columns.Bound (c = & gt; c.Agent). With (100); column Bound (C => C.SalesOrder) .Withth (150); column. Bound (C => C line) with (60); column. Bound (C => C. Stockcode) Vithth (150); Bound column (C => c.SerialNumber) .Withth (150); Column. Bound (C => C Dynamic Description) .Withth (150); Col. Bound (C) = & Gt; C Stock code description). Withth (150) column. Bound (C => C. Order QT). Withth (150); Col. Bound (C => C.Onbacker). With (150); Col. Bound (C => C. Quity available) Width (150); Column Bound (C => c.ShippedQuantity). With (150); Column Bound (C => C. Salspris). Vithh (15...

statistics - r last observation carried forward unless no further observations -

I have a data set that takes measurement of serial temperature for many patients. Datasets are small and have many NA values, however, patients may have died before the end of the experiment and hence the death was recorded from the end of the period of measurement period. What I want to do, is through my data-frame rows (individual patients), which is not taking the previous observation forward, nor have any other comments been recorded. A small example would be dataframe: df To work with the zoo and apply with it: df2 & lt; -apply (df, 1, na.locf) Although it creates a matrix and does not have dataframe, and by the end of the experiment, a patient exceeds the temperature for the patient, which I do not have to do. Patients 2 & amp; 3 should still end in H5 with N5. transitions, na.fill 0 to fill the trailing NAS and Use na.locf to fill the remaining NAS and return. Finally, replace zero with zero: Library (zoo) df0 & lt; - T (N.F. Fill (T (DF),...

c# - ASP.NET: Remove specific item in Dropdownlist -

Image
I'm doing a code for time and timeouts, so I've done manual coding. Here is my example: Its HH: MM Value time is 00 - 23 then for 00 is from 00 - 59 Scenario: My start time will be 8:00 [8-hour, 00-minute], it will also have an autopost, so for the time of the end it will not display 00-07, it will only show numbers 8 to 23. Here is my code: int _intDiff = _tmrStart - _tmrEnd; For (int x = 0; x & lt; = _intDiff; x ++) {dropdown list 3.image. Remove (dropdown list 3.tim [x]); } It works but its wrong output is displayed .. Here is an example: As you can see there, the program is only 0,02,04,06 , Also removes the number 08 How can I do that the 00 -07 will be removed in the drop-down list? If after this you remove the first element first, which is 00. In the second stage, the second element is removed, which is not 02, because 01 has reached the first element. You need to iterate backwards so that the elements can be removed before the la...

html - Best way to translate an element off-screen? -

I'm using CSS3 conversions for a while but the one thing that's a bit messy is related to percentages The element that you are moving, rather than the original element, makes sense but it brings about some situations which I do not know is the best way to solve. For example, if we were imagining an element positioned on the screen, how would you go about transitioning that element off-screen? The element's dimension can be as small as 200x200 pixels, which means that you can not use percentages without calculating anything. The options given by me have been put in my head: 1) Place the element inside the screen-size container, then translate the container to 100%. 2) Translate the element into your GPU layer, with translate-change, or translation 3D, then apply the appropriate left / right properties. 3) Use getBoundingClientRect to determine where the element is in relation to the viewport, calculate the distance in pixels, which will need to be applied to le...

calendar - DAY_OF_WEEK always returns 7 in Java GregorianCalendar -

So I want to do something with the Java Gregorian calendar, which seems as hard as me, from the month and date to the day of the week want to meet. But it will not do this, I know that people often get the wrong answer because they do not know that the number is going to be numbered 0, while DAY_OF_WEEK is being counted as 1 (and more). But it is DAY_OF_WEEK always my problem is my problem, always, 7 returns, no matter what I set the date when I Gregorian calendar converts the string, then appears as DAY_OF_WEEK Is it, even though I have set the year, month and month of the month Where such a code is happening: Gregorian calendar The date; Public overview (date, month, day, month, hour, minute, second); (Real old, brick month, Deofmonth Int, Int hour, intestine minutes, Int sec) {The date = new Gregoriyn calendar theDate.setFirstDayOfWeek (GregorianCalendar.SUNDAY); System.out.println ("DAY_OF_WEEK =" + theDate.DAY_OF_WEEK); Println (theDate.toString ()); } calls ...

java - inject style attribute based on parameter from Action in select item on JSP -

I am trying to find out the solution for hours, but still failed: ( Here's the simple Devel on my JSP: I Like style: But this style list is dependent on the object size which is coming from the Straps action, so it results to JSP action success I was just trying to smthg like trial injection value: & lt ; Div class = "message" style = "& lt; s: property value =" county style "/>> Hello user! and I tried: & lt; div class =" message "style =" & lt; S: property value = "divst yale" /> "& gt; hello user! and: 1" & gt; Display: None; & Lt; / S: if & gt; "/ & gt;" & gt; Hello USER! & Lt; / Div & gt; But it also was not working: ( Can someone give advice on how to inject them In the & lt; s: set / & gt; snippet, you get strats tags to nest There is an error, which is an error. In your final snippet, ther...

scope of vector element in c++ stl -

इस सवाल का पहले से ही एक उत्तर है: 20 उत्तरों std :: vector & lt; int * & gt; v; {Int a = 5000; Int * aa = & amp; a; vv.push_back (आ); अदालत के & lt; & lt; "\ n" & lt; & lt; * (V [0]); } Cout & lt; & lt; "\ n" & lt; & lt; * (वी [0]); आउटपुट: 5000 5000 मेरा संदेह है कि यदि एक वेक्टर को सूचक डालें, वेक्टर पता होना चाहिए और इसे स्थानीय ब्लॉक के बाहर से निकालना चाहिए, क्योंकि इसे गेटम प्रिंट नहीं करना चाहिए क्योंकि "ए" का स्थानीय क्षेत्र है यहां पर उस सूचक के थकने का स्थानीय क्षेत्र अभी भी गुंजाइश के बाहर से सुलभ है। खूब मदद धन्यवाद वेक्टर सूचक की एक प्रति पकड़ लेता है, यह इसका उपयोग करने के लिए पूरी तरह से मान्य है। समस्या उस पते के साथ जहां पॉइंटर पॉइंट्स : आप आउट-ऑफ-स्कोप स्टैक मेमोरी तक पहुंच रहे हैं जो पुनर्नवीनीकरण (यानी उपयोग किया गया ) हो सकता था। आपके पास इस पहुंच पर कोई गारंटी नहीं है और इस तरह इन्हें लागू करना है।

javascript - How can I change the radius of a particular circle when clicking on a button? -

I have already asked a question that when I click on the circle, to change the scope of a circle, I know this Help & lt; G id = "bubble-nodes" & gt; & Lt; Rect id = "bubble-background" & gt; & Lt; / Rect & gt; & Lt; A class = "class =" bubble-node "> gt; & gt; Circle & gt; & lt; / a & gt; .... & lt; / g > Now, when I click on a button, I am asking, how can I change the radius of a particular circle. button type = " Button "onclick =" resizeparticular circle ('circle_12') "> I & lt; / button & gt; & gt; g id =" bubble-nodes "& gt; & lt; rect id =" bubble-background " & Gt; & lt; / rect & gt; & lt; a class = "class =" bubble-node "& gt; & Lt; Circle r = "65" id = "circle_12" & gt; & Lt; / Circle & gt; & Lt; / A & gt; .... & lt; / G> ...

forms - Error while trying to use the "reply-to" in google apps script -

I am using Google Apps Script to get a specific form response in a particular e-mail, / P> What am I trying to do that uses a Google form to open a support ticket, so people need to fill in certain fields such as title, description and e-mail, And when they submit the form, it will automatically open a ticket, but e-mail us The owner of the form will be from the form, and it was a problem because we want the person who opened the ticket to receive an email update, so what I am trying to do is: I asked a field In the email form, put in the form, and I am trying to put that e-mail in the answer ... And apparently I have the right way to catch that e-mail But the answer is not shown to the email that Gon filled the box, it appears an error: [Ljava.lang.Object; @ 34dfe075 Can anyone help me? This is my script: Start the function () {var triggers = ScriptApp.getProjec tTriggers (); (Trigger in var i) {ScriptApp.deleteTrigger (trigger [i]); } ScriptApp.newTrigger ("...

protocols - Java and Oscilloscope -

I need to access data associated Ossiloscop (Tektronix DO4034B) from your LAN to the oscilloscope for I work a Web-GUI I doubt how to develop a software in Java so that I can accomplish these tasks in my program, access the Oscilloscope in the network. Thank you. If Oscilloscope publishes Java API, then it will be easy. Download the API and use it according to the instructions. If the Oscillocap publishes a non-Java API, then it is a matter of binding Java language to published API. If the oscilloscope does not publish an API, then you have to make an alternative. Understand how to set up a service on the Oscilloscope, which is connected to the internal API, and present the one you want. Use a Java Web Client, the HP client in Apache comes into the brain, and takes the Java drive to a program driven headless Web browser. Unless it is there I have some override reason to integrate it with a larger environment.

Parsing JSON request body with Spring MVC -

I am using the Spring 4.1 framework to develop webservices. When I return a Java object as a response, it automatically gets converted to JSON and given to the customer, so I think the JSON parser is in orbit and it is configured correctly. However, it fails to convert the request body from JSON to Java object and the customer is getting an HTMT response of 400. Here is how the webservice looks: public class details {public details () {} int code; Int area; } @RequestMapping (value = "/ api / update / {phoneNumber}", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) Public ResponseEntity & lt; String & gt; How it looks like: Method: Post content-type: application / json; Charset = utf-8 body: {"code": 0, "field": 12} If I gather the requested body as a string and parse it manually So it works, so it becomes valid JSON, but for some reason it does not automatically parse, I have no clue about how to fix it. ...

c# - WPF Text Trimming -

I am using WPF's TextBlock to run text animation I translateTransform Doing so by setting the .x to -which Wide to realwid . Everything is fine, but there is one small problem: Text in TextBlock.Text has been trimmed to fit the initial size window. & lt; TextBlock x: name = "txtRunning" TextWrapping = "Novop" Vertical Element = "Center" TextTerming = "Word Elephase" Text = "Very Long Text Here ..." & gt; I tried to set: TextTrimming = "WordEllipsis" but it was trimmed from three points (...). I would like to know how I can change these three points with full text (no missing texts). I am interrupting the size of my TextBlock with my original container . It should be wrapped in a canvas and let it move forward from the right edge of the window and you should give the scrolling banner effect. This should only be necessary changes; You will still apply animated transforms directly to ...

ruby - Loading Firefox profile settings from a JSON file to use in Cucumber testing -

I am trying to create a JSON config file with the settings of my Firefox profile and loads when we open the browser To fire our cucumber tests, randomly we have different configurations for different browsers. I do not understand how to install it so that Firefox will use the settings. Currently what I have: JSON {"profile [\ browser.download.folderList \"] ": 2," Profile [\ "browser. "Profiles" ["browser.download.dir \"]: "@@ export_download_directory", "application / zip, text / HTML, app / vnd.ms- approach, message / RFC 822, app / vnd.sealed.eml, text / plain, application / vnd.ms- excel, text / csv, text / comma separated - and I must include it in code anyway: / P> browserprofile = JSON.parse (IO.read ('config / firefox.json')) Profile = Selenium :: WebDriver :: Firefox :: Profile.New Driver = Selenium :: WebDriver.: Firefox, Profile : Profile Browser = Water :: Browser.NewEUU (Driver) ...

Why can I import a Python module from command line, but not from script? -

Image
I have installed Python, which comes with it. I can use pdf2txt.py because the following comes from the command line: pdf2txt.py -o converted.html some-pdf.pdf Pdf2txt The Py file is located here: $ pdf2txt.py /usr/local/bin/pdf2txt.py I also import it from interactive Python command line, but to my surprise, I can not import it into a program that I am writing: Does anyone know this Defense is why it is, and more importantly, I can do to solve it? Any suggestion will be appreciated! Most likely because you have interpreted the interpreter from the same directory in pdf2txt.py, Put in the search path. Is your Pyro code file located in a different directory?

php - dynamic dropdown displays nothing -

I am trying to enable the movie by the title or actors (for example, if they forget the name of the movie But he remembered that actor / actress in that movie, he can find the movie by typing the name of the actor). I used jQuery AutoComplete to get the name of the movie or actor's name. The auto complete parts work fine (i.e., when the user chooses a movie by the title and starts writing the title, then the auto-complete suggestion works, the name of the actor Problems: When the user name of the actor is complete, it works fine, besides a dynamic dropdown menu will appear, but the problem is that it is Dropdown does not display anything : Does anyone help me figure out what's the problem with this code? Thanks, " " "; / Option & Lt; option value = "Bye actors"> Bye actor & Lt; Script type = "text / javascript" src = "http://code.jquery.com/jquery-1.9.1.min.js" & gt; & Lt; / Script & gt; ...

c++ - Why doesn't std::vector::resize() deallocate the memory when you want to reduce the size of the vector? -

I do not understand why I use std :: vector :: swap () Why wants to reduce the size of any vector and delete the vector memory on it at the same time all the other unused Allocate to memory? Reducing the capability of a vector New storage Copying existing elements Removing old storage None of these are free. Actually he has the cost of shrinking vector, and it is not clear whether the users should give it by default.

cmd - Access postgreSQL through the command line -

I'm trying to access postgresql through the command line. However, whenever I have time to enter my password, I get the following error: Fatal: The user fails the password authentication for RMHata. I am pretty sure that the password authentication has failed, that user is postgrave for my database, and RMHata is not I found that the only solution was using Rana in the command line, but I did not know how to work To run Thanks very much for any advice I have been using Windows 7, and PostgreSQL 9.3 Unix There is a command line for the environment -us option "-" You may be able to choose the user to connect with the -h option, then you will be able to connect it to the TCPIP protocol. Will come It can be useless for Windows

python - Inserting values to nested dictionaries -

I have some nested direct Pyrenees and I need some help to get my code working perfectly. First Code: data = {} def insertIntoDataStruct (country, state, job, count, dict): if the word in the country: word [country] [state] = {Job: counting} alif not in country: word [country] = {state: {job: counting}} not alif state [country]: word [country] = {state: {job: count}} no alif job [Word] [state]: [country] [state] [job] = counting rest: word [country] [state] [job] + = countIndetatstruct ("US", "Texas", 1234, 1, data) insertIntoDataStruct ("(" US "," TX ", 12345, 1, Day InsertIntoDataStruct ("US", "MI", 1234, 1, data) insertIntoDataStruct ("IN", "M") insertIntoDataStruct ("IN", "Kerala", 1234, 1, data) , 1234, 1, data) Print Data Currently printing this: {'US': {'MI': { 1234: 1}, 'TX': {12345: 1}}, 'IN': {'M': {1234: 1}, 'Kera...

android - Making FrameLayout transparent -

I want my activity should show a bigger dialogue, which is transparent, around a quarter and the Middle The part is solid where I can keep the idea. I would have put a frame layout inside the second using the frame layout, but I am unable to make a transparent first. My XML file: - & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; FrameLayout xmlns: android = "http://schemas.android.com/apk/res/android" Android: layout_width = "match_parent" Android: layout_height = "match_parent" android: background = "# 00000000" & gt; & Lt; Android: layout_marginLeft = "75dp" Android: layout_marginRight = "75dp" Android: layout_marginTop = "50dp" & gt; FrameLayout Android: layout_width = "wrap_content" android: layout_height = "wrap_content" & Lt; RelativeLayout Android: layout_width = "match_parent" Android: layout_height = "ma...

autocomplete - Where are these spaces coming from? -

I can not see here ... The user is trying to create a simple script to get input, only regular With the tab autocomplete for the defined list of phrases (Az, AZ, 0-9 and -) limited to characters ... this works, little ... #! / Usr / local / scripts / packages {{channel stdin}} {exec / bin / stty raw -echo & lt; @ $ Channel} proc disableRaw {channel stdin}} {exec / bin / stty -raw echo & lt; @ $ Channel} proc complete {partial} {sets global full index [lsearch $ completes "$ {partial} *"] If {$ index! = -1} {return [lindex $ integer index]} and {return $ partial}} enable set c [read studine] Scan $ c% c ascii set word "" while {$ ascii! = 10} {switch $ ascii {9 {# tab puts the word [full $ word] - -Ninwayline "\ n $ word"} 127 {puts a # backspace -nline $ c set word [string category $ word 0 [Expressing [string longitude word] - 2]]} default {switch -regcode "$ c" {"[a-zA-Z0-9 \ -]" {puts -none $ c set word "$ word $ ...

ios - Understanding Core Videos CVPixelBufferPool and CVOpenGLESTextureCache semantics -

I am restructuring my iOS OpenGL-based rendering pipeline. My pipeline includes several rendering steps, so I need a lot of intermediate texture from rendering and reading them. They are of different types of textures (unsigned bytes and half float) and can be a different number of channels. To save the memory and allocation effort, the recycled made using the previous steps in the pipeline is now necessary in my previous implementation, I did it on my own. In my new implementation, I want to use the API provided by the Core Video Framework; Especially since they provide faster access to the CPU than textured memory. I think that allows me to make OpenGL textures that can be made directly or use anybody. However, I tell you how they actually work and how they play together, they do not get any documentation. Here I want to know: To get a texture, I need to always provide a pixel buffer with CVOpenGLESTextureCache . If I need to make memory available anyway and it is not a...

python - How do I get the keys associated with the minimum value in a dict? -

So, I'm working on a bioinformatics course set up the problem right now, and got stuck on an algorithm. My problem is that I do not seem to understand a way to do the last job ( SkewMin ), because it is only to return those terms where Slant is at least. And yes, I know that indexing starts at 0, but I'll add 1 minimumValues ​​ to adjust every value, then go with it :) # Examples: # Index: 1 2 3 4 5 6 7 8 9 10 11 12 13 # Genome = & gt; A T T C GGGCGGCC # SCU (Genome) = & gt; 0 0 0 -1 -1 0 -1 -2 -1 -1 -1 -2 MinSkew (genome) = & gt; 9 13 Here is the real code (I have removed the code for scu , as I have completely described above, and I have to work The code is not allowed online, which is why I am not mentioning the course name): # MinSkew uses Squaw, where at the minimum to scout the posts #EX: Slant ("ACGTGCC") returns index 0 1 2 3 4 5 6 7 #and with MinSkew 0 -1 0 0 1 0 -1 # ("ACGTGC") Index of scoring nucletides 1 in th...

.net - How can I run a job on demand in Control-M -

We would like to run a job on demand control-M from external application without the use of a scheduler Or is the API that Control-M provides it on a net application to complete it? There is also a Java API and a web service API as part of "business process integration" more See more information.

excel - I defined all of my variables as variants, but I'm still getting Compile error: ByRef argument type mismatch -

'The part that is bolded is highlighting the debugger - I do not know why it is not working . I tried to be lat_origin , long_origin , dest_lat and dest_long as function variant in the function, but Then this is what I have to say when I use the "slow" statement, imitating if I do not include a blurred statement in the function, then it says that my variable is not defined and light on "radians" Which is a standard Excel function that is inserted. option defines the function ("United") as the LATLONDISTANCE (lat_origin single, long_origin single, as in the form of dest_lat singles, dest_long singles) as a worksheet. Activate ActiveSheet.Cells (2, 10) .Selected version dim long_origin version dim dim_lat version dim as lat_origin dim destlong as elements as 'I do not want to include these' dim statement, but if I do not, "is not defined Andean" LATLONDISTANCE is highlighted in the formula, saying that it LATLONDISTANCE = 0...

javascript - For-of loop in node --harmony doesn't work with arrays -

When I start node v0.11.14 REPL with the option of - good faith and loop Try, I get: & gt; (Var i [3, 4, 5]) console.log (i); TypeError: Undefined is not a function is the same for the set but it works fine with the generator: & gt; Function * Counter () {var n = 3; While (N & lt; 7) {yield n ++; }} & Gt; Var c = new counter (); & Gt; For (var i's c) console.log (i); Although its first example is: for (["one", "two", "three"] words) {Warning (word); } and include the same example. I have failed in Google for "in node" should I actually work in node or am I forgetting something? for and iterated objects were applied separately in v8 I went. It seems that in v8 the node is bundled with 0.11.14, you can use it only with the generator. You can check the obj [Symbol.iterator] property to see if the object is iterable, it should be a function. Construction with v8 in my node 3.29.93 Everything wor...

database - More than one maximum value in SQL -

I have to write a question that searches for the maximum value and if there are more items with the same maximum value then Those two will come back. For example, if I have in my database item price coffee 2.50 tea 2.50 cola 1.50 This will give coffee and tea as an answer . This is usually solved using a window function: Select item, by value (select item, price, dense_rank () value (depending on price) to rnk from the_table) where rnk = 1; You have not specified your DBMS, so the above standard (ANSI) is SQL.

asp.net - Is there some way I can track why my VS2013 ASP Web API application might be stopping? -

I am running a WebAPI application on a development machine. I start the application with VS 2013 in debug mode, and then I run an e-2A test my apps access and as soon as it goes from one screen to another, the application reaches the database. When I run the test, it works to end approximately 25% of the time. The second time, it is hanging at different places. This application is running as a web role on the Windows Azure dev environment on my PC. I have tried to look at the database and there is no blocking and there is no problem in it. Am no way that I look at what can happen when I output due to receive more information about my application to close abruptly am, I see: Microsoft .WindowsAzure.ServiceRuntime Verbose: 500: Determine the position status of Microsoft's introduction role. WindowsAzure.ServiceRuntime Verbose: 502: Role instances status Czech managed Ready Microsoft.WindowsAzure.ServiceRuntime Verbose: 500: Microsoft examined the situation of the role of i...

cordova - jQuery Mobile - Maintain scroll position on device orientation change? -

I am using jQuery-mobile to display a list of data. The list can be quite long, say ~ 3000 pix. The problem I see on my Samsung GS5 , when I rotate the phone, the list view loses its scroll position and is located at the top I tried to do the following but could not get it working: // This list is meant to rotate the device when viewing the list $ (window) ('Scrollstop', function () (if ($ .mobile.activePage.attr ('id') == 'page viewed') {self.currentScroll = $ (window) .scrollTop ();}} ); $ (Window) .on ("orientation", function (event) {if ($ .mobile.activePage.attr ('id') == 'page seen') {console.log ('Scroll Pos : '+ Self.currentScroll); $ (window) .scrollTop (self.currentScroll); // also tried to use jQM silent scrolling method here. No luck.}}); Logically, this should work, it captures the scroll position on the fly, A. When you rotate the device, then it should be taken back to the place where it was. But fo...

sql server - SqlConnection.OpenAsync() hangs when there are no active connections -

जब मैं इसे चलाता हूँ: का उपयोग कर (SqlConnection कनेक्शन = नया SqlConnection (connectionString)) {कनेक्शन का इंतजार करें। ओपनएसिंक (); } यह कनेक्शन पर लटका हुआ है। ओपनएसिंक () लाइन यदि मैं एसक्यूएल सर्वर मैनेजमेंट स्टूडियो में देखता हूं कि डेटाबेस के लिए कितने कनेक्शंस सक्रिय हैं, तो केवल एक ही है: संभव है कि यह कोड उपयोग करता है इसलिए, मुझे यकीन नहीं है कि मैं एप पूल से कनेक्शन से बाहर चल रहा हूं। मैं क्या कर रहा हूँ गलत? समस्या कनेक्शन पर नहीं थी सब। समस्या यह थी कि मैंने अपने धागे पर एक गतिरोध के साथ पैर में खुद को गोली मार दी। मैं connection.OpenAsync () को एक सिंक्रोनस कॉल रेखांकित करने की विधि को कॉल करने का प्रयास कर रहा था: कार्य कार्य = MyAsyncMethod (); task.Wait (); कॉल करने से task.Wait () मैं थ्रेड को अवरुद्ध कर रहा था जब कनेक्शन का इंतजार करता है। ओपनएसिंक () देता है, बाकी विधि उसी धागा पर चलना चाहती है जो मैं अभी अवरुद्ध करता हूं, इसलिए कार्य समाप्त नहीं होता है और task.Wait () रिटर्न कभी नहीं समाधान: क्योंकि मेरे async पद्धति में मु...

excel - Source file having a column in general format, after saving to csv, it appears like 3.81007E+11 -

The source file containing the column in normal format after saving in CSV, it looks like 3.81007E + 11 Also, when Loading in SQL Server 2012, it stays in the form of 3.81007E + 11 , which damages the integrity of the data source sample 000000000381006794505 000000003810067945099 Any suggestions? Open in Excel, format the columns as numbers (without decimals) and in the form of CSV Save.

android - missing ActionBar in material design -

I want to develop an Android app with Android Studio and new physical design and it looks great on Android 5.0 , But when I test my 4.4.2 app on the phone, the application of the actionbars is missing. Here is my address: Android: allowBackup = "true" android: allowBackup = "true" android: icon = "@ drawable / Aisi_lancr" android: label = "@String / app_name" Android: Theme = "@ Style / Myself" & gt; & Lt; Activity Android: name = ". Main Activity" Android: label = "@ string / app_name" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt; Category android: name = "android.intent.category.LAUNCHER" /> & Lt; / Intent-Filter & gt; & Lt; / Activity & gt; & Lt; / Application & gt; Styles Xml & lt; Resources & gt; & Lt ;! - Base app theme - & gt; & Lt; Style name = ...

batch file - IF/ELSE logic in WinSCP script -

I have a simple script to do some maintenance tasks on Remote Unix SFTP host, but all these operations only if Files are present on a Windows server. Here I have an example of a simple code to use, and wondered if WinSCP "if exists" supports Windows commands: option batch always Confirm option open sftp: //user@ftp.server Com -hostkey = "xxxxxx" - privatekey = \\ delete location, rename file.txt file1.txt file0.txt file.txt etc ... exit all will be good If I can do the above: if present (\\ windows server \ filename.txt .....) is To mention that WinSCP.com @Ian comments as suggested in have been suggested for you, in the WinSCP script, logic do not require. Just use if in the wrapper batch file such as: Close @echo if present \\ windows_server \ filename.txt winscp.com / script = script Txt If you were actually required to use the logic in the WinSCP code, see the WinSCP article. Read more: WinSCP article

How to search on github to get exact matches (like what quotes do for Google) -

I "system How to do the same thing for Jithub? I can not work it You can not do this Official Hithem: Due to the complexity of the search code, there are some restrictions on how to do searches: Only considered the default branch. In most cases, this will be the master branch. Only files smaller than 384 KB are discoverable. You should always include at least one search term when searching for source code. For example, search for language: go is not valid, while amazing language: have to go. Mostly, search results can show two pieces from the same file, but there may be more results within the file You can use the same as part of your search query The following wildcard characters can not be used :. , ::; / \ '' '= * !! # $ And amp; + ^ | ~ & Lt;> () {} [] Search will ignore these symbols only. UPD: Workaround If you need to search in a repository, you can clone it locally and find the string grep -r "system for >

java - Why the stack is not pushing? -

सार्वजनिक वर्ग आरपीआई {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {स्कैनर इनपुट = नया स्कैनर (सिस्टम। में); स्ट्रिंग rpie = input.nextLine (); स्ट्रिंगटोकानेजर स्ट्रिंग = नया स्ट्रिंगटोकनाइज़र (आरपीआई); ढेर & LT; स्ट्रिंग & gt; स्टैक = नया स्टैक & lt; स्ट्रिंग & gt; (); जबकि (string.hasMoreTokens ()) {स्ट्रिंग tkn = string.nextToken (); If (tkn.equals ("+") || tkn.equals ("-") || tkn.equals ("*") || tkn.equals ("/") {stack.push (tkn); }} System.out.println (स्टैक); }} जब यह +, -, * या /? पढ़ता है तो स्टैक स्ट्रिंग धक्का नहीं करता है, यह एक खाली ढेर का उत्पादन करता है। यह करता है टोकनेइज़र को आपके इनपुट को अलग करने के लिए रिक्त स्थान की आवश्यकता है तो ऐसा कुछ: 1 + 2 स्टैक पर + धक्का देगा। रिक्त स्थान पर ध्यान दें!

html - Add a left only border on hover CSS -

I show an element on the left edge when it is hovering over it. Currently I have set to use a top border as a divider and correct, bottom and left boundaries are set to 0. .post.reply {font-family: 'Arial', without - Serif! Important; Font size: 8pt! Important; Background: #fafafa! Important; Color: # 1 A1A1A! Important; Width: 100%! Important; Border below: 0! Important; Border-top: 3! Important; Border-left: 0! Important; Border-right: 0! Important; Border color: #CECECE! Important; } and this is the hover .post.reply: hover {box-shadow: # 444 0 px! Important; Border-left: 4px! Important; } Other things work right in the hover section, but refuses to show the limit. I'm pretty sure that's because it's set above 0, but hover But should not it be different? Any help appreciated. This should be your overall CSS and it will work perfectly: .post.reply {font-family: 'Ariel', without-serif! Important; Font size: 8pt! Important; Background...

c++ - error with placement new for array in MSVC 2012? -

जब मैं निम्नलिखित कर रहा हूं: T * ptr2 = new (ptr1) टी (); 6]; मैं डीबग, पीटीआर 2> पीटीआर 1 (3 बाइट्स द्वारा बंद) में एमएसवीसी 2012 के तहत प्राप्त करता हूं हालांकि "नया" फाइल में कोड है: इनलाइन शून्य * __ सीआरटीडीसीएल ऑपरेटर नया [] (आकार_टी, शून्य * _Where) _THROW0 () {// नियुक्ति के साथ सरणी के साथ _Where वापसी (_Where); } मैं मान रहा हूँ कि कुछ डीबग जानकारी जोड़ दी जाती है लेकिन मैं इसका अर्थ नहीं समझ सकता प्रारंभिक ptr1 malloc के माध्यम से प्राप्त किया जाता है, इसलिए मुझे लगता है कि यह किसी भी संभव प्रकार से गठबंधन होना चाहिए, इसलिए मुझे नहीं लगता कि संरेखण एक मुद्दा है। क्या मैं कुछ कर रहा हूं जो यहाँ काम नहीं कर रहा है? क्यों ptr2! = Ptr1 होगा? धन्यवाद! मुझे नहीं लगता कि सी ++ प्लेसमेंट नई वस्तु की शुरुआत करने के लिए कड़ाई से आवश्यक है क्लाइंट कोड बफर की शुरुआत में देख सकता है जिसे आप नए पास कर चुके हैं। इसे केवल इसके अंदर कहीं जगह रखने की आवश्यकता है। यह पूरी तरह से कम्पाइलर के लिए अंतरिक्ष के साथ कुछ करना है करने के लिए ...

copy - Python copying a folder many times -

I am writing a code that asks the user to enter an input to copy a folder. The number of times the user wants to get the code then start copying the folder and rename it like a series like this: How often do you want to copy the "moh" folder? Are you 5 Create 5 copies of the folder named (1, 2, 3, 4, 5) progs = int (raw_input ("Progs Number: ")) FullPath = currentDirectory + str (name) if os.path.isdir (fullPath): # Name of the directory is valid and does not already exist. ,) # This code should be copied to the process, but I do not know how this process has been repeated by user input and rename the folder: os.mkdir (fullpath) when you do something If so, the way to do this is usually a loop on the range (n): in the range for the coop: Now, that is a number from i 0-4, and you enter the path in the string value of full path in i + 1 Want a name, is not it? Therefore, translate dragon into English: pathname = os.path.join (full p...

asp.net - Security and SQL injection in Sql Server with ASP membership -

I am implementing ASP MVV with membership. SQL injection brute force attack How can I stop / lock the IP based on user's IP I have the answer to the first question. You will have to store some useful data in "session [data]" and it will not be sent from the customer side. Public Action Index () {try (if (WebSecurity.IsAuthenticated) {String Contract ID_string = Sessions ["Contract ID"]. Toasting (); Without using it, do not use some string input value from the client without checking. Use the best method in control [http post ] [Validantiophorgetin] Public ActionStrust _SaveMail (email_optsmail) These views @ (Ajax. Beniform ("_makemail", " Nominate ", Model, New Ajax Option {UpdateTargetId =" Email_Options ", Onfileur =" Alert ('Err)', Onsut = "Removed Arrays ('#form_' + ViewBag.Contract_part +" ')'}, html Content: New {Id = "form_" + ViewBag.Contrac...

java - How do I use a Scanner only once then get rid of it? -

I have a program in Java, in which I have to get user input, however, I need to get user input Once, after that, I no longer need a scanner. Do the following: int userInput = new scanner (System.in) .nextInt (); A resource leak warns me, saying that & lt; Assigned close pricing & gt; Never goes off . Is there another way, I can only use one scanner once and get rid of it so that there is no resource leak? There may be something similar to using the statement of C #. Using the equivalent of using one, do not use it, It will close System.in and you do not want it. Ignore the warning for this particular case, let the garbage collector claim the scanner and leave the standard input.

java - How Do I Set An Icon For JLabel -

I want to set an icon for a JLLL, someone can give me the syntax example I have tried this: jlab icon = new jlab (); Image Icon chromo = createImageIcon ("res / icon.png"); Panel.add (icon); Icon.setIcon (sun); After that, I tried that the label was not visible at all on the panel. jlab icon = new jlab (); Image Icon chromo = createImageIcon ("res / icon.png"); Icon.setIcon (sun); Panel.add (icon); And do not forget to check your layout .... if its full you need to add boundaries icon.setBounds (startX, StartY, width, height);

java - Callbacks and listeners ; MouseListener -

I am trying to write a project with listeners, I work my buttons where they change color, now I need my mouse listers to print the text of what I'm doing to the mouse, for example: "The mouse has entered the yellow area, the mouse has got out of the yellow area, the mouse is in the yellow area / Clicked, etc. " I have applied them but nothing is working to print the text. Here is my code: Import java.awt.event.ActionEvent; Import java.awt.event.ActionListener; Import java.awt.event.MouseEvent; Import java.awt.event.MouseListener; Import javax.swing.JButton; Import javax.swing.JFrame; Import javax.swing.JPanel; Import java.awt.GridLayout; Import java.awt.color; Import java.awt.Graphics; Import java.awt.Graphics2D; Import java.awt.geom.Line2D; Import java.awt.geom.Point2D; Import javax.swing.JComponent; Public square swingb {// frame properties personal constant final distance FRAME_WIDTH = 400; Personal fixed final distance FRAME_HEIGHT = 400; Public Stable Zero Mai...

c++ - Qt Signal connected Slots only triggering on breaklines or a "Release" build -

There are specific objects within my application that are tied together with signals and slots. It seems that lately these slots are not reliable when they are tied to signals which are emitted. When I create my project in "release" mode, these objects connect properly and actually work fine, but I noticed that if I create in "debug" mode, then the slots do not As long as I did not let them go with the breakpoint. In addition, if I run the execution of my code in step with the debugger or set a breakpoint within one of these slots, those slots are called. The method in which I am adding these "fixed" objects: Wind window :: Dynamic Connect (Units * Sender Name, Constest Name and Constellation, Organizations * ReceiverNames, Constest Strings and SlotName) {QMetaMethod Sign = SendName-> Meta object () - & gt; Method (SenderName-> Meta Object () -> Indexing (QMetaObject :: Generalized Signature (qPrintable (signalName))); QMetaMethod s...

c++ - how to get text from a window with specific HWND? -

I'm new to Win32 programming and have not worked with CPP for a long time. What I want to do is get the windows HWND spy ++, and get the text of this window. The problem is that I do not know how to create an HW object, can someone give me some ideas? Thanks a lot! If you have a numeric value of HWND, you can put it on the right type. Start with the correct size integer, e.g.: uintptr_t numeric_hwnd = 0x987654; Hwnd hwd = reintep_cast & lt; Hwnd & gt; (Numeric_hwand);

c++ - Embed Ruby in C and exntend -

I have a requirement where I need to embed the Ruby code in C ++ (I can get it) and should expand some functionality. The program fails when I need to call my extension module. I have pasted one of the code below: main.cpp #include & lt; Ruby.h & gt; Fixed VALUE total (VALUE rb_self, VALUE rb_param1, VALUE rb_param2) {Double Val 1 = NUM2DBL (rb_param1); Double Val 2 = NUM2 dBL (Rb_prem 2); Return rb_float_new (val1 + val2); } Zero Init_myMod () {myMod = rb_define_module ("myMod"); Rb_define_module_function (myMod, "Yoga", Yoga, 2); } Int main () {... Init Ruby method ... rb_require ("myRubyfile"); Init_myMod (); // This is where I need to increase my Ruby Extension. Rb_funcall (rb_mKernel, rb_intern ("helloworld"), 0, faucet); ....) myRubyfile.rb is required "myMod" def helloworld () "Hello World" says #puts "Sum Of .. "+ MyMod.sum (4, 5) End The problem is that if I use the" myMod "...

aptana - trying to start AptanaStudio3 but keep geting an error: Java exit code 13 -

Image
There are actually other solutions related to this but they do not seam to solve this problem, Know less complicated way to fix it? Is your VM logic correct? Do you point to a valid 32-bit jdk?

angularjs - The most Angular-y way of pre-loading data into $scope -

The part of my application is a complete AJAX and some traditional posts are reloaded. Receiving data in $ scope is a trivial task using $ http , but what happens when data is available for the template during page load (General MVC The way in which everyone knows the fact after using AJAX? Consider the following part of the code: ng-repeat = "address Address "& gt; {{address.address1}} {{address.city}}, {{address.state}} {{address.zip}} I generate 100 dynamic in $ scope.addresses without using AJAX How to go about loading the address? "post-text" itemprop = "text"> For your "inline" controller, The easiest way to use the input will be: @Model SampleViewModel ... & lt; div ng-controller = "SampleCtrl" ng-init = "adresses =@Model.AdressesList" Another approach is displayed: & lt; script> function SampleCtrl ($ scope) {$ scope.adresses = @ Html.Raw (Jason. Encode (model)); ...} &...