Posts

Showing posts from May, 2013

string - Split when character changes in Python -

Then I have this string. / Code> so that I can replace 6 = M or 666 = O or 9 = W just like the phone's dial pad. 6 # 666 # 665533999 -> 6, 666, 66, 55, 33, 999 so I used to remove # split ('#') > And it does not understand what to do next. I have tried the methods of brute force which solves it to some extent, but is it easy or more elegant solution? Use: & gt; & Gt; & Gt; C = "6 # 666 # 665533999"> gt; & Gt; & Gt; ("6", '666', '66', '55', '33', '999 '] ["". Then there is a dictionary which MAP for a character in the dial pad. cmap = {'77': 'Q' '9999': 'z') #and further ...

Setting Loading Message duration in Jquery Mobile -

I get jQuery mobile $ The user using the mobile.loading () method, I am also using a function: function show_screen_msg (msg) {$ .mobile.loading (' Show ', (text: msg, text, visual: truth, text: true}); } Show_screen_msg ('OK'); For example, when the user updates my profile on the database, I use it; I want to set the time the message is displayed on the screen. Can someone help me? Thank you You can set this function as defined by Omar. But generally we use the functionality of this loading to keep the users waiting for all back end network delays and operations. I think that you are running at the local level so you are not seeing these delays, so specifying a clear timeout function is probably not the best thing you want. For example, if you use AJAX requests to update the database to update, get the feedback back and hide it from loading the success. $ Ajax ({type: "POST", url: "some.php", data: {name: "John", locati...

c# - Microdata & ASP.NET -

I am currently adding microde to an existing C # ASP.NET MVC3 project. Stack overflow here, I got an answer for a question called "" "Kuchi Jerimba. He provides a very good visual studio solution to connect HTML5 5DMD in an application using metadata providers, which I am able to integrate and use in my solution. My question is, does anyone know that something like this exists in the form of a structure or NuGet package? I have seen in NewGate and see only two such packages which are for webapp projects. Thanks, Philip "try MXTires Microdata .NET" NuGet package If you use defined sections there, then call them tojson-ld by calling the TOGEASION method. For example: var offer = new offer () {name = "helper for your car.", Availability = item availability. InStock,}; offer.ToJason (); The result should be like this: & lt; Script type = "application / ld + json" & gt; {"Availability": "http: /schem...

serversocket - Building a chat server using Amazon EC2 -

I am working on creating chat servers using simple sockets. I was thinking that this is a basic chat server It is possible to make use of the Dragon Socket Server Library and an Amazon ec2 example. Also, if you have any better recommendations please let me know You use Amazon EC 2 server can facilitate communication from server to server. Depending on how you open the socket, you may need to configure your EC2 instances to listen to incoming connections on some ports; To allow inbound connections, see more details about how to modify your server's security settings. As far as alternative recommendations are there, I have a real-time network like PubNub relay data between your chat client and server. Using real-time networks means that you can spend less time thinking about low-level socket issues such as Concurrency and creating your application. In the case of PubNub, your server will be allowed to subscribe to chat channels, while it can work better for any web-b...

c# - Adding a circular button to a Windows Form -

I have created a round button in a windows form. The button is fine. The only problem is that I want a different color for the background, so I'm setting up Bangalore in GoldenRoad. However, it only creates a "goldenrod" cube around the circular button ... how do I make it, so that only the button becomes colored? Public Mainstream () {Initial Group (); MyButtonObject start = new myButtonObject (); EventHandler My Handler = New Event Handler (Startcall); Start.Click + = myHandler; Start.Location = New system. Drawing Points (5, 5); Start.Size = New System Drawing. Size (101, 101); Start.BackColor = System.Drawing.Color.Goldenrod; This.Controls.Add (start); `} Zero start_Click (Object Sender, System.EventArgs e) {MessageBox.Show (" Start "); } Public category myButtonObject: UserControl {// Draw new button. Secure Override Zero OnPaint (PaintEventArgs E) {Graphics Graphics = E. Graphics; Pen myPen = new pen (color black); // Draw a button as a circle graph...

php - What is 'module_number' as argument to zend_register_list_destructors_ex -

I am writing a php extension and need to register a resource. I have read how to do this and read all the examples. module_number Zend_register_list_destructors_ex (NULL, NULL, DESCRIPTOR_NAME, module_number); There is no document given to me that what is 'module_emember' I tried to use that call in my call in the function and I got the following error: The last argument of the function call is considered or the' module_member ' Or are using all other examples? Thanks in advance. zend_register_list_destructors_ex should should be called inside a PHP_MINIT function. Your Extension If you see the macro definition for PHP_MINIT, its extension int zm_startup _ # # module (int Type, int module_number TSRMLS_DC) with the # # module is the string name of your module module_number is a integer engine Has been passed in the startup function The number of that module is the ID that PHP remains internally to recognize the extension when it is...

c# - How to call different JQuery functions from a dropdownlist? -

How do you tie each item in a dropdown list to a different JQuery function? For example, I have a dropdown with different report names, I want to select drop down to trigger a new report to display every time. I already sent it to & lt; A href = "#" Id = "btnReport1"> Report 1 which is called $ ("# btnReport1"). Bind ("click", Function () {...} I want to call the same function above each separate report item in the dropdown list. 5 Or I will need to call either. Is there a way to embed a link, am I using "Change" in some way on "Click"? I am using Razor and MVC .Net I can do something like @ html. Dropdown list (...) with a selectList object and code is inserted in the controller file if needed. But I prefer to handle HTML though . As you are trying to bind with the select dropdown, this is the best way to accomplish this. On Change () Handler (for details). From there, you will decide that the...

uisegmentedcontrol - Change color of outer border for SegmentedControl in Objective-C -

I have a segmented control object, and I want to change the color of the outer border while preserving the line between the two options. I am I currently have the code: self.segmentedControl.tintColor = [UIColor whiteColor]; // Set the range and text to white [self.segmentedControl setTitleTextAttributes: @ {NSForegroundColorAttributeName: [UIColor darkGrayColor]} forState: UIControlStateNormal]; // Set the Segment text in dark gray However, this code also sets the line between the white option. Is there any way to change the color of the outer border, or should I just put two buttons next to each other? UISegmentedControl does not have an option to do this as you have said. You need to implement your own custom section controller using UIViews, UIButtons, or UILabels, etc.

mysql - Ruby on Rails - Keep getting a error when trying to run "rake db:migrate" -

I'm new to learning Ruby on Rails and when I run "Rake DB: Migrate" I get the command line The following error is: rack abortion! Syntax error: & gt; / User / user / name / site / sample_com / db / mgrtip 40423221836_alter_users.rb: 15: syntax & gt; Error, unexpected ':', expected ')' ... dmin_users "," email ",: string: default =>" ",: null = & gt; false) ... ^ Tasks: Top = & gt; db: Migrate (see full traces by working with --trace) ** Here is my code: Class AlterUsers & lt; ActiveRecord :: migration def rename_table ("user", "admin_users") add_column ("admin_users" Change_column ("admin_users", "email",: string ,: border => 100) rename_column ("admin_users", "username" ,: string ,: border => after 25, => "email" ("admin_users", "user no "Add_index" ("admin_users", "...

ios - Is there an easy way to use decimals in calculation with SpriteKit? -

I'm new to Kit Kit and programming a program as a program to learn this. My goal here is to get my phantom to go to the screen at random speed. This phantom is produced regularly, and it can possibly be done with maximum speed, to make the game more difficult. Should increase over time. To do this, I am using the score, which is an integer based on time, affects the minimum duration of the movement of the phantom. The way I am trying to do this, as seen in the code below, still only produces an integer value. I would love to have more granularity than just integers. int rando = (arc4random ()% 150) + 50; Int denom = _scores + 50; Float Actual Duration = Rand / Dino + 1; NSLog (@ "% F", actual component); SKAction * actionMove = [SKAction moveTo: CGPointMake (-_blimp.size.width / 2, actualY) Duration: Real Component]; I started using floating variables in response to Nielsbot's comments, and changed the structure of my code to show my changes, but I still...

python - After partition was created using IOCTL_DISK_SET_DRIVE_LAYOUT, how do I create new volume in this newly created partition? -

After I can create a new partition, format and use it using Dragon ctypes to assign a new drive letter , Am trying to My initial coding attempt was to use this SO page:. You can see the definition of class DeviceIoControl I successfully started the disk using IOCTL_DISK_CREATE_DISK, and fixed size To create a new partition using IOCTL_DISK_SET_DRIVE_LAYOUT, below is the result in disk management // i.stack.imgur.com/iM8Jo.png "alt =" successfully created "partition> .. but Again, how can I make new amounts in the newly created partition of the disk? Try to use the format method of but when in my case, that drive letter is not yet assigned Win32_Volume only to return the letter attached to all existing N current drives. Any advice? "itemprop =" text "> short story short (this is actually a long story!), Turn out, I mistake Choose one wrong from Before that I use PARTITION_EXTENDED 0x05, after experimenting with any other value: P...

c++ - Matrix transposing cache optimization -

इस सवाल का पहले से ही एक उत्तर है: 8 जवाब आप मैट्रिक्स traspotion का प्रयोग कैसे करेंगे के लिए इस कोड को अनुकूलित करने के लिए के लिए (int i = 0; i & lt; SIZE; i ++) {for (int j = 0; j & lt; SIZE; j ++) { dest [i] [j] = src [j] [i]; }} आपको यह ठीक ढंग से करने के लिए मशीन आर्किटेक्चर के बारे में जानना होगा। लेकिन मूल रूप से आप आम तौर पर एन -1 थ्रेड्स के बीच काम को विभाजित करना चाहते हैं (एन उपलब्ध सूत्रों की संख्या है और मुख्य प्रबंधक थ्रेड के लिए एक दूर ले) जहां मेमोरी के ब्लॉकों को पढ़ने / लिखने का उपयोग प्रत्येक थ्रेड के लिए संरेखित कैश-लाइन आकारों में तोड़ दिया जाता है, ताकि थ्रेड्स स्मृति-स्मृति पर सामान्य-स्मृति हिट पर नहीं लड़ते।

objective c - Multipeer Connectivity iOS 7 m4a Audio Streaming -

I am using this tutorial, and do a great job for MP3, but with M4A something No, no one knows the best way? To play audio from NSInputStream (MCSession didReceiveStream). Try converting the file to an MP3 and stream it. You can use something like, you can help. Multipeer connectivity is a terrific achievement, enjoy using it! :) Good luck!

php - Get attribute name with simple HTML DOM? -

I am trying to attribute value in the data-date , Inside the & lt; Ul & gt; Tags Sample Code: & lt; Ul class = "media-list" & gt; & Lt; Li class = "media-item" data-date = "2014-04-24 07:30:29" & gt; Tess & lt; / li & gt; & Lt; Li class = "media-item" data-date = "2014-04-25 08:30:29" & gt; Tess & lt; / li & gt; & Lt; Li class = "media-item" data-date = "2014-04-26 09:30:29" & gt; Tess & lt; / li & gt; & Lt; / Ul & gt; I have to get those values ​​in the list, the desired output is below: (2014-04-24 07:30:29, 2014 - 04-25 08:30:29, 2014-04-26 09:30:29) The following code will work perfectly to get the data-date value of each Lee. & lt ;? Includes php ('inc / simple_html_dom.php'); $ HTML = str_get_html ('& lt; ul class = "media-list" & gt; li class = "media item" date of data...

php - You have an error in your SQL syntax; -

I am trying to update a movie table and I am getting this error: You have an error in your SQL syntax; (' name , release , runtime , to use the correct syntax for manual related to your MySQL server version Check , description , value ) value ('World War' on line 1 Here's my code: Values ​​('$ name', '' '' $ '', '$ runtime', '$', '' release '', 'runtime', 'rating', `description`,` value`) $ Fid = $ row [']', '$', '$ value' where movie_id = '$ fidd') or die (mysql_error ()); 'Movie_id'] $$$ _ = _ = $ _ = _ ($ _ POST ['name']); $ release = ($ _POST ['release']); $ runtime = ($ _POST ['runtime'] ); $ Release = $ line ['release']; $ rating = $ line ['rating']; $ runtime = $ line ['runtime']; $ des = $ line ['description']; $ value = $ Line ['price']; You are confusing and sy...

C# Convert Hexadecimal to string -

I think I have a little problem because I am confusing my vocabulary on it. Let me wrap a string in front of a vertical tab (variable) 11 or (four) 0x0b and one (variable) 28 or (variable) 0x1c end. I do not understand the part of my illusion that what is the difference between 11 and 0x0b, I believe that there is an ascii and a hex, but I'm not positive so the compulsory form I need to do string response = (four) 0x0b + "message" + (variable) 0x1c; It does not seem to work though. The part of my illusion I do not understand that the difference between 11 and 0x0b What is this. There is no difference between the two representing the same mathematical number eleven, it has the base base ( 0x0B for base 16 and 11 for base 10). C # provides an escape sequence for the vertical tab - \ v , so that you 'v' to (char) 0x0b You can write in place of . There is no escape sequence for 0x1C , but you can use a hexadecimal escape sequence to ex...

python - Ipython notebook align Latex equations in Ipython.Display module -

Image
मैं आईप्याथॉन नोटबुक का प्रयोग कर रहा हूं ताकि लेटेक्स समीकरण निम्न मॉड्यूल के साथ लिख सके IPython से एक सरल उदाहरण कोड ऐसा दिख सकता है: डिस्प्ले (मठ ('a = \\ frac {1}} आयात प्रदर्शन, मठ, लेटेक्स 2} ')) प्रदर्शन (गणित (' बी = \\ frac {1} {3} ')) प्रदर्शित करें (गणित (' c = \\ frac {1} {4} ')) जो उत्पादन होगा: a = 1/2 b = 1/3 c = 1/4 एक सुंदर प्रिंट प्रारूप में क्या ऐसा कोई तरीका है जिस तरह से मैं इसे कॉलम में संरेखित कर सकता हूं: a = 1/2 b = 1/3 c = 1/4 ? मुझे पता है कि मार्कअप HTML उपयोग की अनुमति देता है, लेकिन यह मार्कअप एक कोड-आधारित सेल के लिए इनपुट में दर्ज किया गया है। कोई भी मदद / सलाह बहुत सराहना की जाती है! मुझे यकीन नहीं है कि आप लाटेक्स के साथ कितने परिचित हैं, लेकिन नोटबुक आपको \ start {align} जैसी चीज़ों का उपयोग करने की अनुमति देती है, जिससे आपको & amp; प्रतीकों के साथ उन्हें अलग करके कॉलम में चीजों को व्यवस्थित करने की अनुमति मिलती है उदाहरण के लिए, यह काम करता है यदि आप उसे किसी मार्कडाउन सेल में दर्ज करत...

nginx - PHP and Modules API Mismatch on CentOS -

I've been using Centmin to help manage my web server for a while I recently To start updating your existing production server, a developer server has started. For the moment I have issues with PHP 5.4.27 and its module trying to work. Currently there are only two modules which are throwing errors on php-fpm restart, there are memcache and memacatch. Server NGX and PHP-FPM is running Start php-fpm [24-Apr-2014 11:31:02] Notice: PHP Message: PHP Warning : PHP startup: memcache: module API = 20090626 Compiled with PHP module unable to initialize module module Compiled with PHP module API = 20100525 These options need to match in the unknown Line 0 [24-Apr-2014 11:31: 02] Notice: PHP Message: PHP Warning: PHP Startup: Memcache: Modules API = 20062626 Compiled with PHP module I need to match these options, compiled with PHP module API = 20100525, unable to initialize the dual I have tried to upgrade, uninstall and install the module. Have tried to use yum. What can I do to s...

python - Seaborn FacetGrid col_wrap (wide to long) plotting issue -

Image
मैं सीरोर्न के फ़ैकग्रीग और col_wrap का उपयोग करके प्रत्येक पंक्ति (विस्तृत तालिका में) को साजिश करने की कोशिश कर रहा हूं। / P> सबसे पहले मैं चौड़ाई को लंबे समय से बदलता हूं: - स्टैक () विस्तृत श्रृंखला को एक श्रृंखला में, s । - उपयोग करें get_level_values ​​ - डेटाफ्रेम में श्रृंखला जोड़ना FacetGrid केवल पहली साजिश का प्लॉट करता है? dt1 = pd.DataFrame ({'s1': [0,1,2,3,4], 's2': [4,2,3,6,7], ' S3 ': [6,7,3,4,7]}) डीईएफएफटीटी (डेटा): #toy मॉडल dataframe # dt1.index.names = [' ind '] dt = data.stack () dt.index.names = ['आई', 'एस'] इंडस्ट्रीज़ = पीडीएसरीज (डीटी। इंडेक्स.एस्ट_लेवल_मूल्य (0)। मूल्य) उप = पीडी। सीरीज (डीटी। इंडेक्स.एस्ट_लेवल_मूल्य (1)। मूल्य) डीटीटी = पीडी.डाटाफ्रेम ( इंडेक्स, कॉलम = ['इंड']) डीटीटी ['सब'] = सब डीटीटी ['इंड'] = इंडेटी डीटीटी ['डीटी'] = डीटी। मूल्य # डीटीएरेइंडएक्स (कॉलम = 'वी') प्रिंट (' डीटी ', डीटीटीडीएसक्वाइर) जी = स्नैक्स.फैसेटग्रिड (डी...

Meaning of square brackets in Alloy grammar spec -

On the mixed web site, I confuse myself with the intersection bracket. In a production like the following, things look clear. Specification :: = [module] open * paragraph * I think class brackets indicate an option and that star clenclones are clusters, Therefore, only the quoted rule means that the highest one module statement, zero or more open section and zero or more para in a specification. I understand this (although I'm slowly coming to use the INBF notation of Worth, wherever possible, so my notes have been sent to it by [module] {open} {paragraph} ). In the following production, however, brackets are confusing me. cmdDecl :: = [name ":"] ["run" | "Check"] [name | Block] scope If the keyword run and check were optional in the order, and accordingly to run for the name of the payment, The name of the claim should be investigated, or the unknown block should be run or checked. But it seems that it seems that this r...

php - Magento: custom folder and file permission issue -

I have inserted a custom folder inside my maggeta root folder that I want to get out of. In this way: I want to load "accessme.php", but what happens is that magmato. It starts searching for it in the site and displays a 404 error page The root cause is that How do I allow it to show? Allow file / folder. custom_php folder and accessme.php rights 775 file (meaning: execute and read all; execute, read and write to owner and group ).

swing - Java JList GUI formatting -

I have trouble formatting a GUI to develop a program. I need four buttons with a jellist over it. . My JLIT continues to appear in addition to all my buttons instead of above them. Can anyone tell me in the right direction to solve my problem? Import java.awt.BorderLayout; Import java.awt.GridLayout; Import javax.swing.JButton; Import javax.swing.JFrame; Import javax.swing.JList; Import javax.swing.JPanel; Import javax.swing.JScrollPane; Public Class Test extends JPN {Private Static Finals Long Serial Weirsian UID = 1 L; Private Jellist Jistle; Public static zero main (string [] Args) {Jeffrey Box Option = New Gefram ("Calculator"); boxOptions.setSize (0,0); BoxOptions.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); boxOptions.setResizable (wrong); BoxOps.Setletout (new border layout ()); BoxOptions.add (new test (), border layout .a); BoxOptions.pack (); boxOptions.setLocationRelativeTo (zero); boxOptions.setVisible (true); } Public Test () {Set Layout (New Grid Layo...

grails - Geb click executed before input is completed -

I am running a simple Geb test like this: class index page page {// static content = {signInButton {$ ("div", 0, category: "container-liquid") on {// static url = "http: // localhost: 8080 / sampleGrailsApp" static = {title == "sampleGrailsApp"} . (To: true, wait: MyPage) appears ("button", 0)} modalFooterSignInButton {$ ("footer", 0, category: "modal-footer"). Username = this} modalFooterPasswordInput {$ ("form") password = this} sign-in {user} appears ("input", 0, class: "btn-. Primary")} modalFooterUsernameInput {$ ("form".) Name, Password - & gt; signInButton.click () waitFor {modalFooterSignInButton.present} modalFooterUsernameInput Username modalFooterPasswordInput password modalFooterSignInButton.click ()}}} In your test, this is called a page like this: def "sign in" (given): "User index is on page" when on indexPage: Sign-in "u...

java - JBoss 4.2.3: LDAP Initial Context loading slow -

I am using Jebs 4.2.3 and I call this code to connect to the LDAP server and the initial I'm trying to references: hashtable The initial reference creation is taking 12 seconds which is not acceptable. However, if I run the same program as a standalone Java program in the same system, then it is implemented in 1 second. How can I analyze the reason for this delay within the JBoss server? How can I debug this problem? Please help Obviously, the criminal was in the lower part of the code, which was the reason for the delay: Environment Input ("com.sun.jndi.ldap.connect.timeout", "1500"); Even the debug log has confirmed that an attempt was being made to set the connection timeout, then the delay was taking place. Obviously, it seems from the following link, that the connection time does not work out when the Ldap connection is done with SSL. The problem was solved by removing this line of code.

How to multiply only not null values in rdlc report expression -

How to multiply two values ​​when RDLC report does not tap into expression I use this = SUM (field! Quantity value * field! Unique value. Value) it has been changed, but the value is also zero If value is zero = even ((IIF (field! Quantity value is nothing, 0, field! Quantity value)) * (IIF (field! Unique origin) Other. Money is nothing, 0, Fields! Exclusive purse. Thanks in advance for Vail))) Help. you for example you can modify your expression like this : = yoga (IIF (field! Quantity value is nothing, CDCE (0), CDBL (field! Volume value)) * IIF (Fields! CDBL (0), CDE (Fields! Exclusive Pars. Value))) This is a 'compressed' version: = Sum ( IIf (do not have anything (field! Quantity. Uly * Field! Unique value. Value), Seedibiel (field! Quantity. Price * Field! Unique value. Value), Seedibiel (0))

ios - How XCode knows about name of function at compile time? -

I have written simple code to practice selector in the objective code, which is working fine Is NSMutableArray * array = [NSMutableArray arrayWithObjects: @ "A", @ "b", zero]; NSLog (array before joining @ @% @); SEL message = @Selector (addObject :); // I will change this line if ([AR gives feedback: Troubleshooting: message]) {[ARAC displayer: with message Object: @ "c"];} NSLog (@ "% @ after adding", array); But as soon as I change the selector to line, > SEL message = @selector (addobject :); // just rename the selector's name undeclared selector 'A Now, the question is, how does XCode compile the name of the name about the time is correct or does not always generate the list of the selector internally, whatever I made. Codex> NSMutableArray All Xcode knows that someone Not a class, in system code or in your program, which declares a selector named addobject , you can prove it by creating a custom class...

NoMethodError: undefined method ` validate' (custom validate) RAILS 3 -

मेरी item.rb # एन्कोडिंग: utf-8 class मद & lt; ActiveRecord :: बेस attr_accessible: asin,: डोमेन,: formatted_price,: user_id मान्य: डबल_डेट्स निजी डीएफ़ डबल_डेट्स यदि आइटम। जहां (: user_id = & gt; self.user_id,: asin = & gt; स्व .asin,: domain = & gt; self.domain) .where ("DATE ​​(created_at) =?", Date.today) .length == 1 त्रुटियाँ.एड (: created_at, "कोई डबल तिथियां नहीं ") अंत की समाप्ति त्रुटि संदेश: स्क्रिप्ट / रेल से: 6:` & lt; main & gt; 'irb (मुख्य): 028: 0 & gt; मद.नईम विधि विधि: # & lt; वर्ग: 0x007fb054ce7690 & gt; के लिए अनिवार्य विधि 'मान्य' से .rvm / gems / ruby-1.9.3-p327 / रत्न / activerecord-3.2.13 / lib / active_record / dynamic_matchers.rb: 55: `method_missing 'में ... इसका जवाब देने के बाद, एक वास्तविक उत्तर पोस्ट करें: `मान्य 'अजीब लग रहा था, इससे पहले एक विशेष चरित्र v हटाया जाना चाहिए।

python 2.7 - Tkinter callback in a class -

I understand the concept callback button in the function and process. How can this code be implemented in class? I have a problem about the callback button in the tanker, to get value from the class. I can not use the callback method Erode program = Callback not defined. Tycanetter import * class program: def __init __ (self): self.root = Tk) self.root.title ("sample") self.display = entry (self.root) Self.display.grid (line = 1, column = 0, column = 5) button (self.root, text = "Proces" (width = 5, foreground = "blue", command = callback) .Grid (line = 4 , Column = 0) def callback (self): print hello program = programmable () menopause () What you need to do is use it: instead of command = self.callback command = callback

java - How to implement equals and hashcode for enum classes -

मेरे पास एक इंटरफ़ेस नाम प्रकार है सार्वजनिक इंटरफेस प्रकार {public string getName (); } दो enum वर्ग इस इंटरफ़ेस का विस्तार कर रहे हैं जैसे सार्वजनिक enum अल्फाटाइप लागू होते हैं प्रकार अल्फा ("अल्फा"), सामान्य ("सामान्य") निजी स्ट्रिंग का नाम; निजी अल्फाटाइप (स्ट्रिंग नेम) {this.name = name; } @ ओवरराइड सार्वजनिक स्ट्रिंग getName () {वापसी का नाम; }} सार्वजनिक एन्यूम बीटाटाइप लागू होते हैं प्रकार {बीटा ("बीटा"), आम ("सामान्य") निजी स्ट्रिंग नाम; निजी बीटा टाइप (स्ट्रिंग नेम) {this.name = name; } @ ओवरराइड सार्वजनिक स्ट्रिंग getName () {वापसी का नाम; }} आवश्यकता का एक नक्शा होता है जो कि मानचित्र और लेफ्टिनेंट; प्रकार, ऑब्जेक्ट & gt; नक्शा; बराबर और हैशोड को लागू करने के तरीके, जैसे नक्शा कुंजी आम एन्यूम मानों के लिए भी अद्वितीय हैं? वर्ग java.lang.Enum दोनों बराबर () और हैशोड () के रूप में घोषित करें अंतिम , इस प्रकार आपको कंपाइलर त्रुटियों को ओवरराइड करने की कोशिश करनी होगी। यह कहा जा रहा है कि, जैसा कि आप...

how to reverse proxy via nginx a specific url? -

I have a server running http: // localhost: 8080 , me A specific URL is required This server has to be proxied by NGN For example, I can only http: // localhost: 8080 / test / (. *) to Http: // localhost / test / (. *) . I http: // localhost / . I created it in some way and it worked. Thanks anyway for your comments :) server {80 says; # ... other stuff upstream backend 1 {server 127.0.0.1:8080; } Location / test / {proxy_pass_header server; Proxy_set_header host $ http_host; Proxy_redirect closed; Proxy_set_header X-real-IP $ remote_adder; Proxy_set_Header x-schema $ scheme; Proxy_pass http: // backend1 / test /; }}

How to efficiently filter a list in c# with linq that contains certain attributes -

I am busy implementing an API controller which gives a list of devices, here My current assistant is the method: private list & lt; Device & gt; GetUsersDevices (string username) {int userId = -1; & Lt; Device & gt; My tools; If (Int32.TryParse (User.Identity.Name, outside the User ID)) {myDevices = db.Devices.Where ((x => x.EndUserId == userId & x.Deleted == incorrect)). Order BeyDescending (x = & gt; x.LastComms) .Oolist (); Return to My Devices; } Return tap; } Now it's all good, but now I need to add a rule that it only returns some devices (one end is analogous to the customer) So I want to create a list of allowed device types for the end customer like the psuedo code given below: list endclient1 = device type 1, device type 2 etc. list endclient2 = device type 2, device type 5 etc. But then I want to filter the list of devices to remove all unsupported devices. Now I understand that I can still continue to add. Where is the se...

ruby on rails - Formatting Rspec to remove extra spaces -

Image
I have such a big monitor when I run tests on Rupees through spring, there are many empty spaces / lines. Something like this: how to do Am I removing extra lines? I would also like to remove the "random" line with seed. I do not know how to run tests with the spring, but grep You can filter the output of any command. Open the terminal and execute this command: your_spring_command_to_run_tests | Grep -v -e '^ $' -e 'random' By doing this you empty rows and rows random in .

Php CURL to work with cookies and session -

फ़ंक्शन get_data ($ url, $ proxy = null) {$ agents = array ('मोज़िला / 5.0 (Macintosh ; इंटेल मैक ओएस एक्स 10.7; आर वी: 7.0.1) गीको / 20100101 फ़ायरफ़ॉक्स / 7.0.1 ',' मोज़िला / 5.0 (एक्स 11; यू; लिनक्स i686; एन-यूएस; आर.वी.: 1.9.1.9) गीको / 20100508 सीमोन्की / 2.0.4 ',' मोज़िला / 5.0 (विंडोज; यू; एमएसआईई 7.0; विंडोज एनटी 6.0; एन-यूएस) ',' मोज़िला / 5.0 (मैकिंटोश; यू; इंटेल मैक ओएस एक्स 10_6_7; डी-डीके) एप्पल वेबकैट / 533.21। 1 (केएचटीएमएल, गीको जैसी) संस्करण 5.0.5 सफारी / 533.21.1 '); $ हैडर [0] = "स्वीकार करें: पाठ / एक्सएमएल, एप्लिकेशन / एक्सएमएल, एप्लिकेशन / एक्सएचटीएमएल + एक्सएमएल,"; $ हैडर [0]। = "Text / html; q = 0.9, पाठ / सादा; q = 0.8, छवि / png, * / *; q = 0.5"; $ हैडर [] = "कैश-नियंत्रण: अधिकतम-आयु = 0"; $ हैडर [] = "कनेक्शन: रख-जिंदा"; $ हैडर [] = "रखें- ज़िंदा: 300"; $ हैडर [] = "स्वीकार करें-वर्णसेट: आईएसओ -8859-1, यूटीएफ -8; क्यू = 0.7, *; क्यू = 0.7"; $ हैडर [] = "स्वीक...

security - Serving file:// files to users -

Currently, I am creating a local search engine for the network drive used in our company. A search engine is created at the top of Solar and Hinges, I have created that indexer which lists the network above the network which works on the network and configures all the directories which are configurable Files are given in. However this is not really relevant. The current problem with ours is that the web interface that connects to the solar and saves the search results local file: // files that have a full or file with Samba path There are links to but the services of file: // are not allowed by browsers like Google Chrome. Chrome gives error: Local resource loading permission Is not: file: ///name/to/file.pdf which is clear and does not That, although I have to work around the issue and want to serve our users 'local' files. Or open an explorer window with at least given path. I was wondering if this is possible or if there is an alternative available? The s...

api - Symfony2 REST bundle : Filter Parameter -

How do I get the resource based on the filter parameter: Example in the form: ... / API / book? Author = X If a perfect example I would be happy! Depending on the , you can use annotations and follow, Use FOS \ RestBundle \ Controller \ FOSRestController; // ... use FOS \ RestBundle \ Request \ ParamFetcher; Use FOS \ RestBundle \ Controller \ Annotations \ QueryParam; Class bookcountor extends FOSRestController {/ ** * * @Query Ultimate (name = "author", description = "author of the book") * / public function getBookAction (Paramaffetra $ Parameters) {$ author = $ paramFetcher-> 'Authors '); // can again be used to filter author // books ...} Requirements, To enable the param fetcher listener by adding param_fetcher_listener: true to the configuration of bundles in your app / config / config.yml file.

Marker in Eclipse editor not showing message -

Image
I am creating custom text editor plugin for a domain specific language in Eclipse. I can detect errors in the format of editorial content and use the Eclipse marker to indicate the user to point out the errors. I have the following code in the plugin: Public static zero opensMarkerForResource (int linenumber, string message) throws coreException { IRSource Resources = getFile (); CreateMarkerForResource (resource, linenumber, message); } Public static zero creates the MarkerFor Resource (IRSource Resource, Ant LineNumber, String Message) CoreException {Hashmop & lt; String, Object & gt; Map = new hashmop & lt; String, Object & gt; (); Marker utility.SetelLinumber (map, linum); Marker Utility. Settlements (Map, Message); MarkerUplit.Credit Marker (Resources, Maps, IMMarkars, PROBLEM); IMarker [] Marker = Resources. Fill Marks (Empty, Truth, for IRSOSER: (Imarker: Marker) {System.out.println ("Marker Content" + Marker Utilize.jet Message (Marker) H...

objective c - Checking if NSArray contains block -

Is it safe to check the existence of special blocks within the NSArray? Suppose we have this code: int (^ blockA) (int) = ^ (int x) {return x; }; Int (^ blockb) (int) = ^ (int x) {returns x; }; NSArray * array = [NSArray arrayWithObjects: [Block A copy], [Block B copy], zero]; If ([array included object: block A]) {NSLOG (@ "IDX:% D", [array index of object: block]); } If ((include the array: Block B)) {NSLOG (@ "IDX:% D", [array index OF object: blockb]); } The output I get is: idx: 0 idx: 1 So it appears Working, but I'm not sure why, especially because the array is copies of the original blocks whose execution is same. Is there any internal identifier in each block or what? This work will be appreciated, detail about this. Block A and [Block will not happen on a per] usually object, so [array contains objects: Block] would not be likely to return For example, you have to write block A = [block A copy] before , you must add it to the arra...

ubuntu - Linux: How to find out which (sub) dependency of my library needs a specific library? -

शीर्षक जटिल लग सकता है। मैंने एक टेम्प्लेट स्क्रिप्ट के अंदर एक पुस्तकालय लोड किया है। अब मुझे इसे Ubuntu 12.04 पर स्थानांतरित करना होगा Tclsh निम्न त्रुटि देता है: फ़ाइल लोड नहीं कर सका "/apollo/applications/Linux-पोर्ट/i586/lib/libapmntwraptcl.so": ** लिब्जेस -3.4.2.so * *: साझा ऑब्जेक्ट फ़ाइल नहीं खोल सकता: "load $ :: env (ACCLIB) / libapmntwraptcl [info sharedlibextension]" निष्पादित करते समय ऐसी कोई फ़ाइल या निर्देशिका नहीं है संस्करण 3.4.2 Ubuntu 12.04 के तहत। इसलिए मुझे यह जानना होगा कि मेरे लाइब्रेरी की कौन-सी उप-निर्भरता प्रसिद्ध लिब्जेस -3.4.2 की आवश्यकता है, ताकि मैं इसे पुनर्निर्माण कर सकूं या वैकल्पिक खोज सकूं। अग्रिम में बहुत धन्यवाद। संपादित करें: आपके उपयोगी उत्तर के लिए धन्यवाद मैंने पहले ही एलडीडी-वी या -आर किया था मेरे पास 200+ निर्भरताएं हैं जब मैं एलडीडी -आर करता हूं सबसे खराब है, परिणाम सूची में मुझे libgeos-3.3.8.so = & gt; /usr/lib/libgeos-3.3.8.so (0xb3ea9000) (मेरे पास संस्करण है), लेकिन जब मैं निष्पादित करता हूं...

Three.js Import Blender scene including animations -

I have a blender view in which there is a bunch of objects, some of these objects have a bone animation, but not the majority. I have three scenes on this scene with the animation on the right object. I am trying to import in JS. Here's a breakdown of the problem I'm experiencing: Three. Bone animation in Js only three. Work on using Skinny Mesh. All objects, due to the animation data, it is difficult (if not impossible) to determine that the animation is related to which object, in this case three scan masons as the three Makes loading impossible. Even if it is possible to determine the object related to the animation, three. The stenoler will not make them in the skin only, as a result, by removing those objects, those sequences will be removed and they will be made again manually with the skin trap. We have tried to do manually by exporting animated messes to Blender so that bone animation data is only on those objects, but there is a problem with the positioni...

Convert all the elements in a file into a array in haskell -

I have a file that has a set of 200,000 words and I want to read the program data and store it in array. And make a new array with all 200,000 words. I import the code system.IO main = do handle and lt; - Openfile is written as "words.txt" but giving error as type error on line 5 "ReadModa content & lt; - hGetContentsCon & lt; - Rows content putStrLn (show con) hClose handle and the text file is a form ABRIDGMENT ABRIDGMENTS ABRIIN ABRIN ABRINS ABRIS and so on What is the amendment def readFile (): allwords = [] for the word in open ("Words.txt"): allwords.append (word.strip ()) return all words can be readFile "words.txt" & gt; & Gt; = Return type :: IO [string] or you can write getWordsFromFile :: string - & gt; IO [string] getWordsFromFile file = read file file & gt; = = Return and use as word = "word.txt" getStrLn $ "file is included" ++ (Lengt...

xml - using saxon in Altova -

I am using the Altova XML for XML conversion for XML changes. But now I need to use a suction processor, I have downloaded and installed the suction. After the manual in the Altova website, I have followed the same steps. But here I am getting an error below. XSLT 2.0 debugging error: An error occurred while trying to start the debugger! (An error occurred while loading the XML file) Please tell me how I can fix it and make a change. Thanks

grails - formatting numbers as currencies -

I used the g: formatNumber tag to format a number as currency & lt; G: formatNumber number = "$ {it.price}" type = "currency" currency CODE = "$ {it.currency}" /> This prints a formatted number such as GBP6.87 Is there a way that I can customize Can I do this? Specifically, I would like to be a place between currency names and zodiac sign, i.e. GBP 6.87 You can specify your own format string which you want. & lt; G: formatNumber number = "$ {myNumber}" format = "your format is here" /> See and

sql server - Iterate sql data with cursors -

तो, मेरे पास "बॉम" नामक एक एसक्यूएल टेबल है। पेरेंटपेर्टआईडी ChildPartId कल्पना कीजिए कि मेरे पास टेबल से भरा डेटा है (जैसे उप-स्तर की अज्ञात मात्रा): | पेरेंटपेर्टआईडी | CHILDPARTID | + --------------- + -------------- + | एनके-एफएस-डीआर -62 डीआर | 2001020060 | | 2001020060 | 2002014018 | | 2002014018 | 120011 | | एनके-पीएच-डीआर -3 एमएच | 2001916023 | असल में मैं "एनके-एफएस-डीआर -62DR" का चयन करना चाहता हूं जो कि उसके नीचे सभी बाल भागों का चयन करेगी, ऐसा लग रहा होगा | पेरेंटपेर्टआईडी | CHILDPARTID | + --------------- + -------------- + | एनके-एफएस-डीआर -62 डीआर | 2001020060 | | 2001020060 | 2002014018 | | 2002014018 | 120011 | बोम अज्ञात स्तरों की गहराई से गहरा जा सकता है। अतः, मैं कर्सर के कुछ रूप को शाब्दिक सभी सबलेवल । मेरे पास वर्तमान में एक कर्सर है लेकिन मैं डेटा को पुनरावृत्त करने का एक तरीका नहीं सोच सकता। यहां मेरा वर्तमान कोड है (केवल स्तर 1 गहरा जाता है): बनाओ टेबल #tmpBillOfMaterial (ParentPartId VARCHAR (18), ChildPartId...

Update multiple rows with averages using mysql -

I'm very close to answering other answers to the answer, but just struggling to get off on the line I am I have a client table structure that can not be changed, it has several tables, but the two of which I am interested in are (simplified): Table 1: ID1 (PK), ID2 (PK)), ID3 (PK), AV Girperant (currently blank) Example: ID 1, ID 2, id3, avgpcant a, b, c, cord, e, table 2: id 1 (pk), id 2 (pk), id 3 (pk), id 4 (pk), percent For example A: A, B, C, D, 88, A, B, C, E, 80 A, F, A, B, C, D, G, D, 92 select ID1, id2, id3, average (percent) ) From Table2 Group ID1, ID2, ID3 What I need to do is to update Table 1 to fill AVGPresentcent so that it looks like this: ID1, ID2, ID3, AVGPRC T - A, B, C, 84 E, F, G, 92 I can do this for oddly without line and I table 2 From the average (percent) I can use php and then loop updates through AVGP in the table 1 through 26,000 records, but is there a way to update all the agg-peers in the same tablet? You can use UPDATE...

sql - MySQL select row with NOT LIKE -

This looks like my desk: SELECT table2.status, table1.title Table 1 from right to table 2 on table 2 Table 1.id = table2.id Title of position ended User expired user B active user B. Ended by user C and I want to get titles from users who are not active, I tried: Select table2.status, table 1 right from the table 1 Join the table on table 2. Table 1.id = table2.id WHERE table2.status 'ACTIVE' does not like The user ended an X The problem is that the status of user b is active and finished and I want a table that shows no active status in the table. : Title of the position EXPIRED USER An EXPIRED user Here is a statement that gives you one line per non-active user: Invoices are here to get all the rows, if the user creates a group and a type of flag, if an active status exists for the user, if so, then the user has the HAVING section from the list Remove in Then we decide what position to show. Again, we use the collected flag to find out if our...

javascript - Foundation Joyride throwing error for unknown reason in Firefox -

So I'm using the Foundation to create a website, all are good and love using the foundation , But the 28.0 Windows machine in Firefox I'm getting an error from the jury, which is related to the joeride. I'm not using johairide anywhere in the site, so I do not really understand why this error is happening, and it seems only in FF. I have attached the error to a code block, you will see "Gotham" there, Gotham is custom font which I am using, but it is not referenced anywhere in any HTML, just in the CSS So I do not know where it's coming from. Error: syntax error, unrecognized expression: [data- "Gotham" - joardide] jquery .... min.js (line2) ... function (b) {return db ( A, B). Height & gt; }}): FB (function (A) {return function ... Cheers, Luke. I am using the following code Was: * {font-family: "Gotham";} This code is removing the problem. Do not ask me how, or why I do not know why, I think all of me It se...

php - file_put_content create file if not exist? -

$ html = file_get_contents ('http://www.test.com); $ file = '/Applications/MAMP/htdocs/test.html'; file_put_contents ($ फ़ाइल, $ एचटीएमएल); क्या file_put_content file.txt फ़ाइल बनाते समय फाइल मौजूद नहीं है? हां। के अनुसार: अगर फ़ाइल का नाम मौजूद नहीं है, तो फ़ाइल बनाई गई है।

http live streaming - HLS playback performance and stability on Chromecast -

I'm having problems with HLS playback at least using v0.3.0 media player library which is currently running (v0.5.0). I know that the player's library is in beta, so I am thinking that if I look, I see others. Actually, it appears in such a way that after some time, the Chromecast device becomes unresponsive. The debugger closes any output, closes it and attempts to reuse it in an expired error. Occasionally, after some time, the device crashes just the homescreen (no brainfreeze). I tried to see the profile and timeline before this, and I did not see any unusual spikes; I had seen some errors in the log (but they can be unrelated to it), say something like that : An attempt has been made to use an object which is no longer, or is no longer usable what I am doing only The "unusual" thing is that I have every video timeupdate EV I broadcast the situation to print, however, no reason why the normal playback. Hopefully you have already decided, for p...

Redis alternative for C# -

I started my project in SQL Server (ORM Mapper) and Arendi and now Radis in the early days. Now I am exploring a way to get a simplified version of Redis using C # .NET 4.0 classes. I want to copy: Storage system (such as dump at every x seconds on y key changes) Embeddable (this is the most important) Sets Simple full text search (do not use Lucene) The reason is that I now (production ready) Via stack client) I'm using Linux server and development for Windows and a simple C # option I was thinking about it. So maybe someone has already done some work on this subject and has liked to share it. RavenDB good .NET Support .NET Client API - & gt; or An embedded, and scalable NoSQL database for the .NET platform with code-first data model generation.

Dagger - android.app.IntentService with @Inject -

Is the object exposed to the Android.APIentent service by a dagger possible? If so, how can I do this? I have to do something like that. Public Class SomeService Android .app.IntentService {@Inject Synchronizer Synchronizer; Some public services (string names) {super (name); } @ Override Protected Zero to Intend Intent {synchronizer.doSynch (); } } from the view of the dagger point, Intent Service is no different from any other category. The injection can look like that (I'm assuming that your application has an example of object graph and it is detected inject ). Of course, do not forget the class in the class of an injection sections in your module definition. "lang-java prettyprint-override"> Public Class SomeService provides Android.app.IntentService {@Inject Synchronizer Synchronizer; Some public services (string names) {super (name); } @ Override Public Wide On Crack () {Super. Connet (); ((Your App) getApplication ()). Inject (this); } ...

actionscript 3 - refer to variables when creating XML nodes in as3(air) -

Trying to reference a vaiable in my XML object var newElements: XML = new XML (); NewElements = & lt; Data & gt; & Lt; / Data & gt; Var myNode = "cell0"; NewElements.myNode.image = node_image [0]; Everything is fine: newElements.cell0.image = node_image [0]; How do I change myNode as a new node (cell0)? Please try the following syntax: Var myNode = "cell 0"; New Elements [Minor] Dimension = node_is [0];

mysql - Create table in database with php framework Laravel 4 -

I'm new to Laravel 4 I have developed a php web application with Laravel 4 I have the following question: It is possible to create tables in the database without running the terminal to run the following commands: php artisan migration: create_users_table create and php artisan migrate Migration to divide your database into different changes Very convenient way, so you can - or easily migrate to the other - current DB scheme of your team. When using Artisan Migrate: Refresh - Bead , you can also sew the database with default data, which creates an air to reset your DB content. This is also useful for very unit tests. Of course you can make your code through the DB :: statement ('table table_name') but I recommend you go to migrate Route for Artisan Migrate: Instead of creating them all, you can also create a file to create your initial table.

Handling errors in Outlook Rule -

I have an approach rule that triggers a script when it's triggered. It works 99% of the time, but sometimes the "this operation fails" message appears and then the rule automatically turns out and is shown in red color. I'm not sure whether this is due to any problem VBA code or something else, but any advice would be appreciated. Please tell me that this is a wrong place to add this question, but I can not find any reason that can be understood elsewhere. If we can not find any solution, this rule is again enabled, or to send notification emails when this error occurs - because some process is running on this "stand-alone" PC, And the whole time is not monitored. C: \ Users \ tenba1 \ Document \ QlikView \ Account Recons \ Queue \ Recon_Acct_ "& Amp; DT & amp; ".txt" Filepath2 = "C: \ Users \ TB1 \ Documents \ QlikView \ Account Records \ Queued \ Recon_SenderEmail_" & amp; DT & amp; amp;...

twitter bootstrap 3 - How to align images in responsive design -

I am trying to align images in responsive design. It would be easy to make a fixed width, but it is not responsive. ul {text-line: center; Padding: 0; Margin: 0; } Li (Float: left; * / & lt; - Remove! Display: Inline; List style: none; } Li: First child {float: left; } Li: last child {float: right; }

ios - UILongPressGestureRecognizer action depending on press duration -

I need to take different actions based on the press duration of the UILongPressGestureRecognizer Now I am thinking of two different ways of achieving it. A) Add identifiers to two different gestures, with minimum pressure reduction of G1 with G1 and G2 with minimum perduction, and by any means UIGestureRecognizerDelegate Cancel G1 if G2 is successful. b) Add a single signal identifier and apply custom management and state management to choose the right work. Which is the preferred method and why? UILongPressGestureRecognizer You can measure time between code> UIGestureRecognizerStateEnded EDIT: To handle this condition, you can use a NSTimer You can. if (gest Ure.state == UIGestureRecognizerStateBegan) {self.timer = [NSTimer scheduled timer with time interval: 1.0f target: self selector: @selector (forOneSec :) userInfo: zero repeats : No]; [Self. Tiger fire]; } If not touched, your long press method will be called after 1 second. If the user st...

How to display currency symbols in select list in cakephp with mysql database -

I have currency codes and symbols in the table CURRENCIES (ID, currency) value ('1', 'EUR (one pound)'), ('2', 'USD ($)') etc. But the euro and pound symbols drop down list. What can be the reason for this and how do I go about fixing it? back encoding whenever no eski characters are displayed correctly (Or at all) the problem is encoding. Make sure that your app is using the same encoding (UTF8), unless it is the reason): Database table definitions Database data In your application

c# - Google Speech API v2 result is blank -

I want to use the Google Speech API in my current project. How do I use the API As described on Github, you have to send a post web circle to the server and get the result as Jason. I found some source code used for V1 API The request is not difficult to set up: WebRequest request = WebRequest.Create (Constants.GoogleRequestString); request. Method = "post"; Request.ContentType = "audio / x-flac; rate =" + sampleRate; Request.ContentLength = bytes.Length; In my example where the constants are GoogleRequestString is equal https://www.google.com/speech-api/v2/recognize?output = Jason & amp; Lang = en-us & amp; key = AIzaSyCnl6MRydhw_5fLXIdASxkLJzcJh5iX0M4 I downloaded the .flac files from the github link and wrote a little program in C # which is loading the bytes of the flac file, it is slightly modified method Send with GoogleRequest (byte [] bytes, int sampling) I open the stream as shown in the method, and all the bytes to th...

html - Prevent second button click using jQuery -

I have a button on my page. I do not want to do any operation if the user clicks on the button for the second time. I have the following code but it is not working. (Can anyone help ??) $ ("# myButton"). Click (function () {var count = 0; count ++; warning ("button"); if (calculation> 1) $ ('#mybutton') .prop ('disabled', true);}) ; & Lt; Button type = "button" id = "mybutton" & gt; Me & lt; / Button & gt; Click You can use it in jquery $ ("# myButton"). A ("click", function () { will attach a handler to an event for this element which will be executed on most.

html - Is a way I can render CSS/Javascript bundles without using ASP.NET MVC? -

There is only one thing that uses my code, which requires ASP.NET MVC: & lt; & Lt; & Lt; HTML is here & gt; & Gt; & Gt; & Lt; Body & gt; & Lt; & Lt; & Lt; Some HTML here & gt; & Gt; & Gt; @ Scripts Renderers ("~ / / bundle / jquery") @ scripts. Renderers ("~ / bundle / text view") @ scripts Renderers ("~ / / bundle / angular") @ scripts Render ("~ / Bundle / AngularPad") & Lt; / Body & gt; & Lt; / Html & gt; My bundle config.ace There is a sample from bundles here. (New Style Bundle ("~ / bundles / css"). ("~ / Content / css / * .css")); The ability to render CSS in debug or release is really good, but I want to fully use MVC and transfer only the usage and index.html page and ASP.NET Web API. Is there any way to get the same functionality with rendering bundles without using a controller? You can do two things: You already These bundl...

AngularJs: select binding and http request -

I am starting with angular JS and I have a problem with http request and binding selection. I have a selection menu that is filled in such a way: $ http.get ("test"). Success (work (results) (results for (prior. {Services.push (e)})}}; I use the service variable in HTML like this (I Select2 for the selection menu): "service" select ng-model = "RequestCtrl.service" multiple UI-selection2 data-placeholder = "service Without cache ... "class =" default-select "& gt; option ng-repeat =" requestCtrl.services in service "value =" {{service}} "> {{service}} & lt ; / Option & gt; & lt; / select & gt; All work is fine for now. Save the service variable in the variable and I restore it to page loading. But, in this step, I have a problem. This variable is loaded locally but it does not appear in selection It is empty, if I do not load the selection option from the HTT service, then...

Pipe console outputs from a specific function into a file - python -

I have a function that I can not edit and prints the results on the console. Is it possible to call that function without changing the internal code of the function, but without changing the internal code of the function in the console output file? For example, I have: def somefunc (X): Print "Hello World", X ** X Def Pipe Out (Function, OutputName) Open As with ('outfilename', 'W') burst: # output output pipe in any way ... I could not use the logger Because I could not edit somefunc () . I have tried @aviVini to solve the problem but I can not believe that files were empty except for the first output file and it also overwrites that file repeatedly. Def redirect_output (file_name): DEF decorator (function): def shell (* args): open (file_name, 'w') as f: original_steadout = sys.stdout sys.stdout = F func (* args) sys.stdout = root_stout Return Cover Cover Return To Decorator def somefunc (x): print x * xx = [1,2,3,4] for x: outputfil...