Posts

Showing posts from February, 2014

javascript - Marker setDraggable for Leaflet? -

Any suggestions about changing the dragibility of a marker with any other event? For example, I have: marker = (L. marker ([0,0], {pullable: true})); Then I can do things like this later: marker.setikon (Maikon) .setLatLng (mylatlng) .addTo (map); How will I change the dragable to false? I have many markers and I need to toggle dragability for different markers, so I do not even want to freeze the entire map. Thanks The answer is in the documentation: marker.dragging.enable (); Marker.dragging.disable ();

bash - Replace all bullets with spaces -

How do I change tablets with spaces (octal value: 225, hexadecimal value: 95)? The following commands: resonance 'a ?? Test '| | Tr '\ 225' '' echo '' 'test' | Awk '{gsub (/ \ 225 /, ""); Print $ 0} 'echo' '' test '| Sed 's / \ o225 / / g' echo '? Test '| | LANG = '' sed 's / \ o225 / / g' echo '? Test '| Sed's / \ x95 / / g ' The above command does not work. Let's see why your current attempts are failing: $ Echo 'â ?? Test '| Hexdump-c00000000 e280 a2 74 65 73 74 a. ... exam. | 00000008 These pills are actually three bytes - e280 a2 , none even 0x95 . A correct CAD expression works fine: echo '¢ ?? Test '| Sed -e's / â? ¢ / / g ' ... or (Bash-extended syntax is not available in / bin / sh ) ... resonance 'a ?? Test '| Sed -e $ s @ \ xe2 \ x80 \ xa2 @ @g ' ... or (using bash-builtin re...

Make a Chrome Extension Private -

Image
I have a Chrome extension, but there is no Google business account, that I want to keep private and with only a few people want to share . As of early 2014, Google no longer allows extensions that are not in chrome store (outside developer mode). Since developer mode is not really an option (some of these users are technically not very literate), developer mode is not really an option for me. Is there still a personal Chrome store or extension in this case? When publishing an extension you can choose to make it private and select a Google Group whose members You want access. Anyone who is a member of Google Groups can view and install the extension when it is signed in to the web store.

angularjs - Refactor similar controllers in different modules -

My application depends on many fingers module, but each module has to deal with the same data. The module is used in various places on my page. I have created a set of controllers, who are basically responsible for handing over data to the $ scope variable. I think there are a lot of "code odor" and I have bad feelings with all duplicate codes. But I do not know how to stop it now. Features Documentation and Infomatitier My $ routeProvider . What is a better way to deal with such cases? Controller 1 Angular Modules ('MyApp.selectorDocumentations'). Controller ( 'selector documents' CTRL', function ($ radius, FacetService, properties, documentation) {$ scope.documentationsData = documentations.data; $ scope.documentations = documentations.data.hitlist.content; $ scope.currentPage = documentations. data Khitlistkpejknanbr; $ Scopktotlpges = Dokyumenttionskdetakhitlistkpejktotlkpejej; $ Scopkhitlistcontent = Dokyumenttionskdetakhitlistkkan...

c# - Html encoding with TextBoxFor MVC 4 -

जब भी मैं & lt; कोण कोष्ठक & gt; (साथ ही कुछ अन्य HTML सिंटैमी चीजें) मेरे TextBoxFor में एक अपवाद फेंक दिया गया है @ Html.TextBoxFor (model = & gt; model.tags, new {@ क्लास = "फॉर्म-कंट्रोल", प्लेसहोल्डर = "टैग्स (कॉमा से अलग किए गए)"}) एक संभावित खतरनाक अनुरोध। ग्राहक का मूल्य (टैग = "" )। मुझे समझ में आता है कि असुरक्षा को रोकने के लिए और HTML एन्कोडिंग / डिकोडिंग मेरी समस्या का हल है, लेकिन मुझे यकीन नहीं है कि इसे कैसे लागू किया जाए। मैंने कुछ स्थानों में पढ़ा है, जो कि TextBoxFor डिफ़ॉल्ट रूप से HTML एन्कोडिंग करता है, लेकिन अगर यह सच है तो मुझे यह समस्या क्यों है? इस चेतावनी को रोकने के लिए आपको अपने दृश्य-मॉडल की टैग की संपत्ति पर [AllowHtml ()] विशेषता को रखना होगा।

how to find out exact path of file using python? -

How to find the correct path of the file in Python. It's very basic but I'm new to Python If my file name is file.txt path = "D: \\ utilities \\ folder \\ dragon \\ Model \\ file .txt How to get the exact path by giving only the filename? abspath (path) in particular "text" os.path , which: back one The normalized full path name is the version of path .

ruby - Generate hex numbers based on percentage -

I see a way to generate gradual hexadecimal color based on ruby ​​with a percentage. 0% = # 6da94a 50% = # decc30 100% = # ce2d4a Then programmatic hexadecimal values ​​are generated between those people. So I have something like percent_to_hex (10) and that the hexadecimal value exceeds 10% with gradient gradient between 0% (green) and 50% (yellow) Will go In fact, Trailston's answer is a minor mistake. (x + percent * 100 * (y - x)). Goal should be converted to : (X + percent / 100.0 * (Y - x)). Goal In addition to i.to_s (16) will be a problem if you have 0 255), as you can get the result like "ff0ff" I recommend using "% 02x"% i instead. This is an absolute example: def percent_ to_hex (percent, start, stop)) color = [start, stop]. C. C.scan (/../). Map {| S | S.to_i (16)} end color_ int = colors.transpose.map do | X, y | (X + percent / 100.0 * (Y - X)). Round end colors_int.map {| I | "% 02x"% i} End ("...

jquery - Bootstrap tags input with type ahead freeInput -

I want to use the bootstrap tag input jquery plugin with typeahead values It works very well that I look at type-head values ​​like I'm typing but I want to make it so that users can not input their values. Since the documentation I tried free input: wrong variable but it is still allowing for any entry tags: $ ('# topics'). Tag input ({typahhead: {source: ['one', 'two', 'three'], free input: wrong}}); What is doing anything wrong? This code is not working because you have some errors in your code: 1) Strong> source function 2) Send 'typedheads' with typing 'typehead' and send as the ultimate for free input input tag var substringMatcher = function (strs) ) {Return function findMatches (q, cb) {var match, substrRegex; // An array that matches the substring matches = []; // regex is used to determine that a string contains substring `q` substrRegex = new RegExp (q, 'i'); // repeated through the pool string a...

javascript - if statement that always executes -

I am working on a web application which is using a template (smart admin 1.3) and one of the code Come on the strange block. if (! Null) {$ ('nav ul'). Jarvismenu ({accordion: true, speed: $. Menuu_speed, close sign: '& lt; em class = "fa fa-expand -o" & gt; & lt; / em & gt; open, sign in: '& Lt; em class = "fa fi-pump-o"> gt; & lt; / em & gt;'}); } And {warnings ("error - menu anchor does not exist"); } Is there a situation where e-block is not executed? Is this a weird Javascript conference? It is not the conference that the community will accept @ as well as an idea of ​​how to develop someone in such a way.

objective c - How to show in-memory NSImage as Retina (@2x)? -

Image
I am showing dynamic-loaded images like under the image in NSMenuItem s. I am loading and resizing as the image: [menuItem setImage: [self process image: [[NSImage alloc] url] ]]; [Add MenuEystem: MenuEmix]; The process image function changes 88x88 px size. The image is displayed on 24x24 px (shown below) because it does not look like a retina pictures but if I put it at 48x48px it is not shown as small as 24x24, so NSMenuItem does not actually resizing. However I have to show these images in 48x48 in the same points of view. Showing this as @ 2x I can not find a way to use the [NSMenuItem setImage:] method or save the file of NSImage without the 48x48 file and the file Name ending @ 2x . If I use 48x48 image in the setImage: method, then the height of the NSMINIT is only twice as large and it actually indicates 48 digits * 48 digits. Any ideas how can I get memory images in NSMenuItem without a file? Just it should be enough to [image set size: ...

vb.net - Visual Basic - Display button will not calculate raise percentage -

I am trying to increase one percent by using new pay in the old pay and visual basics ... I I'm stuck in the way. Any ideas where I am going wrong 'name: salary project project' Objectives: Performance enhancement 'PRECENTAGE' programmer:? & Lt; Sarah Jimenez & gt; On & lt; 7/24/2014 & gt; Option guessing strict closure option of Public Class frmMain private property txtNewSalary as clear object personal property object as txtOldSalary as private sub btnisplay_Click (this object, e EventArgs as) btndisplay.Click 'performance increase PRECENTAGE 'declared designated constant and variable dim intOldSalary handles as double dim intent of double dim intrusion as single-diamond insert difference as double as double end Calculated and the difference Silri Difafrens = Intvens Silri - Intolld increases Introij calculate Solri percentage Exercise = Int Silri difference * Intollsd Solri 'set gather percent' message or display, while incr...

html5 - JavaScript fillStyle usable with stroke()? -

In JavaScript, it is possible to use any type of stroke in fillStyle () ? Here is my code: var text = document.getElementById ("text"); Var first = text.getContext ("2D"); First.font = "100px SimLLHP"; first. Stroke style = "blue"; First.strokeText ("T1", 100,100); Var final = text.getContext ("2D"); Last.font = "100px SimLLHP"; last. Stroke style = "blue"; last. Stroke Text ("T2", 110,180) No, it is not. To attract the HTML5 canvas, both have their own assets and methods for stroke and throughout . For the stroke setting, such as the outline or lines and fill for the solid size therefore the fillStyle is only for filling, and for the stroke Stroke Style There is no reason to mix them. So if you want to fill the text, then we just use fillStyle with filltext . var final = text.getContext ("2d"); Last.font = "100px SimLLHP"; Last.fillStyle = ...

How do I write a no-op or dummy class in Python? -

मान लें कि मेरे पास ऐसा कोड है: foo = fooFactory.create () विभिन्न कारणों से, fooFactory.create () Foo का एक उदाहरण बनाने में विफल हो सकता है अगर ऐसा होता है, तो मुझे fooFactory.create () चाहिए एक डमी / नो-ऑप ऑब्जेक्ट वापस करने के लिए यह ऑब्जेक्ट पूरी तरह से निष्क्रिय होना चाहिए - कोई भी बात नहीं है कि इसका उपयोग कैसे किया जाता है, इसे कुछ भी नहीं करना चाहिए या कोई अपवाद फेंकना चाहिए। मैंने निम्न विकल्पों पर विचार किया है। सबसे पहले, एक बनाएँ, नकली । इसका उल्टा यह है कि यह आसान है और मुझे वही देता है जो मैं चाहता हूं। नकारात्मक पक्ष यह है कि उत्पादन कोड में नकली इस्तेमाल करने के लिए अजीब लगता है इससे भी महत्वपूर्ण बात यह है कि मॉक लाइब्रेरी पर मेरा कोई नियंत्रण नहीं है और इसलिए उसका व्यवहार कुछ बिंदु पर बदल सकता है और मेरा आवेदन तोड़ सकता है। दूसरा, डमी नोपफू कोड> / डमीफू वर्ग। मैं तब तरीकों को मैन्युअल रूप से कार्यान्वित करता हूं जिनसे इसे समर्थन की आवश्यकता होती है, और बस विधि निकायों में pass डालते हैं इसके बावजूद मुझे पता है कि यह कभी भी मेरा आव...

javascript - How to insert External html code to Div with jquery -

यहाँ मेरा HTML कोड है, index.html & lt; body & gt; & Lt; div id = "कंटेनर" & gt; & Lt; div id = "header" & gt; & Lt; div class = "menu_div" & gt; & Lt; ul आईडी = "मेनू-बार" & gt; & Lt; div id = "menu_div" & gt; & Lt; li & gt; & lt; a href = "#" आईडी = "# होम" & gt; होम & lt; / a & gt; & lt; / li & gt; & Lt; li & gt; & lt; a href = "#" आईडी = "# पुरुष" & gt; पुरुष & lt; / a & gt; & lt; / li & gt; & Lt; li & gt; & lt; a href = "#" आईडी = "# महिला" & gt; महिलाएं & lt; / a & gt; & lt; / li & gt; & Lt; li & gt; & lt; a href = "#" आईडी = "# सौंदर्य प्रसाधन" & gt; प्रसाधन सामग्री & lt; / a & gt; & lt; / li & gt; & Lt; li & gt; & lt; a href = "#" आईडी = "# साम...

Android - What does the message: "Not a DRM File, opening Normally" from the LogCat mean? -

I am quite new to Android and I have been working with images for the past few days After that assign different elements (for testing only), one button (with setBackground) or an ImageView. In each instance no DRM file will appear on the logcat. I am trying to figure out what it means, but without any luck. If someone can put some light on this topic then I really appreciate it. PS: This is my first post in this forum, so I apologize in advance while building this question. thanks for understanding! UPDATE: To add just a few results, I got the test yesterday, apparently by creating the deluxe from images in internal memory, these types of messages appear and Android is unable to decode images. Although those pictures are transferred to external storage, they can be converted into a wardrobe and can work without problems, hoping that such a place Does anyone in this system and can also help. The DRM is for digital rights management. This is usually a special key used by t...

primitive types - Does C# have int8 and uint8? -

मेरे चार प्रश्न हैं: क्या सी # है int8 यदि हां, तो मैं स्ट्रिंग को int8 में कैसे रूपांतरित कर सकता / सकती हूं? क्या C # है uint8 यदि मैं स्ट्रिंग को uint8 में परिवर्तित कर सकता / सकती हूं? sbyte कॉल sbyte.Parse या sbyte.TryParse हाँ, इसे बाइट कॉल byte.Parse या बाइट। ट्राईपर्स

python - numpy irregularly strided array -

स्मृति में numpy array संरचना का हवाला देते हुए: NumPy में कई एल्गोरिदम, मनमाने ढंग से काम करते हैं ट्रिडेड एरेज़ हालांकि, कुछ एल्गोरिदम को एक-सेगमेंट सरणियों की आवश्यकता होती है। एक अनियमित रूप से सीधा सरणी क्या है? क्या यह एक है numpy.array ([[1], [1,2]]) ? यदि ऐसा नहीं है, तो कृपया एक का उदाहरण दें। उदाहरण के लिए: & gt; & gt; & gt; Np & gt; & gt; & gt; A = np.arange (10) & gt; & gt; & gt; एक सरणी ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) & gt; & gt; & gt; बी = एक [:: 2]> gt; & gt; & gt; बी सरणी ([0, 2, 4, 6, 8]) a एक सेगमेंट सरणी है, जिसमें सभी डेटा बारीकी से प्रत्येक के बगल में पैक किए जाते हैं एक अन्य संगत मेमोरी ब्लॉक में दूसरी तरफ b उस एक ही मेमोरी में एक दृश्य है, जो कि एक स्ट्रिंग के साथ होता है जो तत्व के दो गुणा है, अजीब integers के स्मृति स्थानों पर लंघन। एक होने के नाते उन कार्यों को एक सिंगल-सेगमेंट अरैम की आवश्यकता होती है, यदि आप np.sort (b) करते हैं, तो वास्तव में वास्तव में वास्तविक छँटा...

objective c - Parse ios8 User Push Notification Actions -

I have registered the Information Act properly and have confirmed with a call for [[UIApplication shared application] currentUserNotificationSettings] . I am using pars to collect and send push like this: NSString * pushmessage = [NSString stringWithFormat: @ "% @ bus directly Asked:% @ ", [[Pfusor CurrentUser] user name], [self. Question objectwork: @ "text"]]; NSDictionary * Data = [Objects and Keywords with NSDictionary Dictionary: Pushmail, @ "Alert", @ "Question Notification", @ "Category", Zero]; PFPush * push = [[PFPush alloc] init]; [Push setAQ: pushkaya]; [Push set data: data]; [Send Send Inboundground]; The information reaches the device, but there are no custom actions available that are registered for the category. At this time I feel like the parse payload can not properly explain the range? Has anyone given him the chance to work with parse? EDIT: This is the response received from the current response, giv...

What converts Assembly language to machine code -

I'm new to programming and I started with the C ++ language, as far as I know that C ++ Language is changed into assembly language C ++ compiler (formerly: Visual Studio), but I tried to convert the assembly language to machine code to understand and execute the computer but I could not find any answer. So the question is, where and how the assembly language turns into machine code? Any kind of compiler integrated into the OS? Thanks in advance. Some compilers (like GNU) change the code in the assembly code into C / C ++ code. A tool called "codlar" converts assembly code into machine code, and a device called "linker" adds several machine-code files into a single executable (.exe file under Windows) file. Most of these compilers allow you to write the resulting codec code in a file so that you can view or modify the assembler code. The assembler and linker are part of a series of tools, which means that they are usually distributed with the compil...

c - Debugging GTK Event callbacks -

I am trying to debug the gtk code for the first time and in fact, I debug the callback function for gdb and when it hits the breakpoints, the entire desktop environment is freezing (I'm going to do Gnome-Shell I'm running under) It looks like I got some idea which was not working: La effort GDB was assigned to. Command to breakpoint: (gdb) breaks on_key_press_callback (gdb) commands & gt; Back trace & gt; Next & gt; Next & gt; Next & gt; Continue & gt; But I do not know why, only the back trace command is executed, and then it becomes freeze. The second attempt to debug using gdbserver and gdb using tty1 (no article to freeze )) I did not have anything to look for after next and step breakpoint but could not code ( list code, inspect the stack, ect ..) Any good tips to be able to debug in such situations? Thanks The same server that you are using to debug, for example For, if inferior (GDB terminology for the pr...

swing - Highlighting certain rows in a jtable in java -

इस सवाल का पहले से ही एक उत्तर है: मेरा कोड पोस्ट करना आप अवधारणाओं को समझ सकते हैं और अपने प्रोजेक्ट में आवेदन कर सकते हैं। यह एक एकल स्तंभ के लिए काम करेगा और संपूर्ण पंक्ति को हाइलाइट नहीं करेगा import javax.swing। *; आयात javax.swing.table। *; Import java.awt। *; क्लास MyTableCellRender डिफ़ॉल्टताबलेलेंडरर {सार्वजनिक MyTableCellRender () {setOpaque (true); } सार्वजनिक घटक getTableCellRendererComponent (JTable तालिका, ऑब्जेक्ट मान, बूलीयन है चुने गए, बूलियन हैफॉक्स, इंट पंक्ति, इंक स्तंभ) {स्ट्रिंग संख्या = (स्ट्रिंग) मान; इंट वोल = इंटीजर.परसेइंन्ट (संख्या); अगर (वैल & gt; 5) {if (val & gt; = 5000) {setForeground (Color.black); setBackground (Color.red); } अन्य {setForeground (Color.black); setBackground (Color.yellow); }} Else {setBackground (Color.white); setForeground (Color.black); } SetText (मान! = शून्य? Value.toString (): ""); इस वापसी; }}

Android Studio not showing SDK Manager Option in the Tools Menu -

SDK manager option is not shown when I select Tool Options in Android Studio. In addition, when I search the SDK manager to use the search option, this SDK Manager shows the option, but when I click on it, nothing happens. So, what should I do to establish new packages from SDK Manager? / P> I have solved it like this: window & gt; Customize perspective ... (You will see that Android and AVD managers are disabled) Command group availability & gt; Android and AVD managers & gt; Tool bar visibility & gt; Android and AVD managers & gt; Check

ant - Selenium Browser not visible in hudson -

I am running my script using Hunt through Hudson, here the script is implemented and the results are coming, But the browser is not appearing while performing the execution What can the script help? If you are using Windows, open services - & gt; Hudson - & gt; See which user launched Hudson - & gt; Login Hudson Machine You will see everything using that user

ajax - jquery .html load external file through object data is not working -

) Html (& lt; Object Data = "https://system.netsuite.com/pages/customerlogin.jsp?country=US" />); This object is working instead of data, when I try to do my own external file url (loading)? that is: $ ("# loadExtPage01"). Html (& lt; Object data = "http: // gmovdevk2pocapp: 81 / runtime / runtime / form / marketing service service ticket editing farm? FormID = 1 and serviceticate_c = 21 and serviceticateID = 7 & ServiceTypeId = 2" / & Gt;); Any ideas / solutions? Just need to wrap it in the code in the string :) $ ("# LoadExtPage01") Html ("& lt; Object Data = 'https: //system.netsuite.com/pages/customerlogin.jsp? Country = Americas' / & gt;"); The method requires a string, what you were doing was actually invalid because you are not writing javascript html: D if you need it So you can add some fallbacks to Html ("& lt; Object data = 'url' & gt;...

xmlserializer - WCF Service With Restricted/Special Characters in Response -

मेरे पास एक WCF सेवा है जो & amp;, & lt ;, & gt; के साथ एक स्ट्रिंग प्रतिक्रिया देता है। उदाहरण के लिए। & lt; प्रतिक्रिया & gt; & amp; amp; & lt; / प्रतिक्रिया & gt; असल में, मैं '& amp; लेकिन यह किसी कारण के लिए एन्कोडेड है। इसके बजाय, मैं डीकोड किए गए रीस्पॉप को भेजना चाहता हूं। P> एक्सएमएल सीरियलआईज़र को अच्छी तरह से बनाई गई XML दस्तावेज़ बनाने के लिए विशेष वर्णों को एन्कोड करना होगा। के अनुसार, एम्परसेंड वर्ण चाहिए दस्तावेज़ में कहीं भी उसके शाब्दिक रूप में प्रकट नहीं होगा, इसलिए एन्कोडिंग। उपभोक्ता आवेदन इस बारे में पहले से ही अवगत होना चाहिए, और amp; amp; डीकोड पता होगा; वापस ऐपरसेंड हालांकि, अगर आप सोप यूआई जैसे एक्सएमएल-आधारित सॉफ़्टवेयर पर आपकी प्रतिक्रिया देख रहे हैं, तो आप प्रतीक को अपने एन्कोडेड फॉर्म में देखेंगे।

ios - How to post the username and password securly from device to url -

In my application Hi, I have login option with username and password. I url and password through my url in my php script Passing and urinating from the url and navigating to the next scene. I want to know that my code by sending the data safely to my URL in the device. NSString * url = [NSString stringWithFormat: @myril? Username =% @ and password =% @ ", usern.text, pass.text]; NSData * dataURL = [NSData dataWithContentsOfURL: [NSURL URLWithString: url]]; NSLog (@" response% @ ", strResult); In my above code I am sending the data directly to my URL, please pass it safely with the post method. This is a small tutorial for telling you how to use the POST method

java - How do you deal when the implementation for an interface method is the same for some classes? -

Assume that I have defined the interface ISOE interface with foo and bar methods. e.g. Public Interface ISOM Interface {Public Weed FU (); Public zero times (); } Assuming that I have class A and B., for them it is understandable to implement the interface. But this also does not make sense for a different implementation for foo () . Achieve A or B from A to be Wired / Strange, is there a standard coding practice? I think I can make some utility classes to implement foo () and call it as a representative, but I was wondering if this Structure can be handled differently Update: I stumbled upon this to give my full understanding of the question: And I was trying to understand this Is this facility less than conventional OO concepts because we have them in Java Whether you use it or not Your edit suggests that your real question is: "What is the Pearl in Java Is roles equal? ​​" Because Java 8 introduced the default methods in the interface, the inter...

c# - Event when list has changed -

I have an event, when items change in my list and when this event is removed, then I I call a method for this list, when there are 5 new items in the list, my method is called 5 times, but already the new element is used but I only have to handle the last event. How can I solve it? MyObject.ListItemsChanged + = RefreshElementsInUI; Then in method: Private zero refreshElementsInUI (Object Sender, EventArgs E) {var listItems = getElementsForCommunication (Communications); ClearElementsInUi (); Forrestavage (various elements in the list) IdealementTomicol (element); } List transmitted incidents are removed 5 times if I have 5 new items in my communication but I only need the previous event because I do the same thing about 5 times Hope this will help you It appears that You have implemented IBINLLIL or are using the binding list. I recommend that I leave and define it. Batch mode is not built in any event driven NET archive (binding list, obscure collection), but it...

Basic SQL Syntax Select [number] -

I am working in a formatted search with SAP business and running in some syntax I have not come already This is probably very basic but can someone please shed some light on this? Ignore $ [System Objects]. DECLARE @ guardian nVarChar (15) SET @parent = (SELECT T0.FNum OACT T0 WHERE T0.ACode = $ [DLN1.ACode]) The entire query does not currently work, Leck And my question is, what happens usually "select 21" or "choose 41" or "select 51" or XXX number? Does anyone provide me an example that will help me understand? thanks select [VALUE] will return only one value Oracle: double Select from SQL Server 'Hello' choose 'hello' So what are your codes seems to be setting / displaying a value, and nothing An example of another method that you can use, many items in a selectively: It works in both SQL Server and Oracle, dual key Vshykta not.

android - ArrayIndexOutOfBoundsException on displaying data from arraylist -

I am using a piece of code to display the image and text on the footer of my app. The image and text should change after every 30 seconds. The code works fine, but it randomly gives an exception and my app suddenly crashes after a few minutes. Please help me on this, if I work for the same work, then I will be grateful. Exception: 07-24 17:14: 32.812: E / AndroidRuntime (4196): java.lang.ArrayIndexOutOfBoundsException: length = 2; Index = 2 07-24 17: 14: 32.812: E / Android Random (4196): at java.util.ArrayList.get (ArrayList.java:306) 07-24 17: 14: 32.812: E / Androidrentaim (41 9 6): 14: 32.812: e / AndroidRuntime (4196): on android.os.Handler.handleCallback (Handler.java:615 com.ht.mpnews.FragmentTabActivity $ Task $ 1.run (FragmentTabActivity.java: 491) on 07-24 17) 07-24 17: 14: 32.812: E / Android Random (4196): Android.OS. Hendlr Dispatch Message (Handlrkjawaः 92) 07-24 17: 14: 32.812: E / Androidrentaim (41 9 6): Android on .os.Looper.loop (Looper.java:137) 07-24 17: 1...

php - Symfony2 on Heroku (official buildpack) - how to dump assets? -

मुझे हेरोको (आधिकारिक पीएचपी बिल्डपैक) पर सिम्फोनी एसेट्स के साथ एक समस्या है। मेरा कोड सिमफॉनी 2.5 पर आधारित है, जिसमें नए 3.0 फ़ोल्डर संरचना है, और यह एक स्थानीय जेएस और सीएसएस फ़ाइल (बाकी सीडीएन के माध्यम से लोड की जाती है) का उपयोग कर रहा है। उन फ़ाइलों को ठीक तरह से लोड किया गया है जैसा कि यहां बताया गया है:। देव वातावरण पर सबकुछ ठीक है, लेकिन जब मैं एंव को ठेलना चाहता हूं तो मुझे आस्तिगत करना होगा: सिम्फनी डंप को मेरी संपत्ति फ़ाइलों को वेब / सीएसएस में डंप करने के लिए मजबूर करना | जे एस फ़ोल्डर्स मैंने अपनी स्थानीय मशीन पर परीक्षण किया (प्रॉड को एंविंग करना) और सब कुछ ठीक है। समस्या हैलोोकू, और इसके अल्पकालिक फाइल सिस्टम के साथ: जब मैं आस्तिगत चलाने की कोशिश करता हूं: - बाद में कम्पोज़र द्वारा डंप - एएनवी = प्रॉड, फिर सफलताओं के साथ समाप्त करें, लेकिन हर अनुरोध समाप्त हो जाता है के साथ: AH01071: गोटो त्रुटि 'PHP संदेश: PHP घातक त्रुटि: अनचाहे अपवाद संदेश' फाइल "/ tmp / build_012d99e7-a14a-4626-afec-3ded3d4baeec / app के साथ 'अमान्य विज्ञापन अपवाद'...

asp.net mvc - Populating a ViewModel from a database model -

I have a ViewModel that inherits a database model. How to populate ViewModel from a database I can not work out "ViewModel" public class CustomerView Customer Viewing New LookUpData ReadOnly as inherited in the property OwnerList list (SelectListItem's) received return look.OwnersList (True) end of termination property termination property termination class "controller" edit function (alternative id = nothing as integer) ActionResult Moderate model is in the form of New CustomerView Model = (from c db.Customers in c.Id = Id andalso c.OrganisationId = s.Or GanisationId). FirstOrDefault then the model is nothing then return the redirectToAction ("list") or else see the return (model) end if the end function I get the wrong cast exception. Any help would be greatly appreciated. Your Linux query is returning (I think) the customer of the object As a list that you want to project in your visual model object, select a : Modal = ...

android - Tabs with Listview in fragments -

I'm starting in Android. There was a need for what I have been discussing here: Now, I am using that project here What do I need, list view One piece is to be added .. Another piece appears on the list when a particular item is clicked. But I have a problem facing this. For example, I get an error using the setListAdapter (adapter) function. Plz help public class AppTabAFirstFragment basefragration {private button mGotoButton; // Private string [] Characters = {"Shots", "SDS", "SDSS", "SDSD"}; @ Override Public View Crate View (LayoutInflator Inflator, View Group Container, Bundle Saved InstantState) {View View = inflater.inflate (R.layout.app_tab_a_first_screen, Container, Incorrect); MGotoButton = (button) view.findViewById (R.id.id_next_tab_a_button); MGotoButton.setOnClickListener (listener); // Arrayadapter & lt; String & gt; Adapter = new array adapter & lt; String & gt; (Inflator.Get Context ()), R. Late Ap...

php - Symfony2 notIn doesn't work -

I'm trying to do with a section that does not use a query_builder. But this does not work and I have this error message: C: \ wamp \ www \ projet \ src \ intranet in a non-member member function expr () UserBundle \ unit \ UserRepository.php Line 301 This is the method: Public function employesSansCongesAllouesEn ($ Annee) {$ denies = $ this- & gt; CreateQueryBuilder ('U') // rà © Cupa © RER Les Emplo © © que ont da © ja des Kanga © Daniel Dosha - & gt; Selection ('u.id') - & gt; (Join '\ Intranet \ CalendrierBundle \ Unit \ UserCongeByYear', 'UC', "with", "uc.user = u.id") // Stirring UserCongeByYear - & gt; AndWhere ('u.enabled = 1') - & gt; AndWhere ('UC. Ani =: Anne') // Status D NAC E - & gt; GetDQL (); $ QB = $ this- & gt; CreateQueryBuilder ('Users') // rà © Cupa © RER Les Emplia © chi n'ont step repeat de kanga © pour l'anna © e choisie - & gt; An...

IntelliJ IDE (IDEA, PhpStorm, WebStorm): Shortcut for focusing Filter field in e.g. Change Log tool window -

Image
There is a shortcut to focus the filter box in the tool window, especially the change log? See which field I'm talking about to find the attached field I searched the net and key map, but nothing like this was found. I have confirmed on Jetbrains that unfortunately it is not possible yet:

listbox - Get Type from a list element c# -

I have a C # list box, which is full of elements of class "human", every element belongs to a class Which was derived from human like "Old", "Young" I want to know whether the selected element is old in the list box thanks in advance You can use it: var query = myListBox.Items.Cast & lt; Human & gt; (). Select (H = & gt; new {ISLld = H is old, isang = h is young, human = H}); Edit : "I want to know whether the selected element is in the list box old" You do not need LINQ query again: human human = (human) myListBox.SelectedItem; Bool isOld = Human is old;

httpclient - Facing issue while implementing connection pooling with solr -

I say this requirement is where I want to limit the number of concurrent calls to Solr that 50 I apply I am trying to connect to the HTTP client pooling which is then used in the Solt object HttpSolrServer. Please find the code below ` HttpClient httpclient = new DefaultHttpClient (); httpclient.getParams () setParameter (HttpClientUtil.PROP_MAX_CONNECTIONS_PER_HOST, 50). Httpclient.getParams () SetParameter (HttpClientUtil.PROP_MAX_CONNECTIONS, 50); HttpSolrServer httpSolrServer = New HttpSolrServer ("solr url", httpclient); SolrQuery solrQuery = new SolrQuery ("*: *"); For (int i = 0; i & LT; 100000000, i ++) {long numFound = httpSolrServer.query (solrQuery) .getResults () .getNumFound (); Println (numFound); } ` I was hoping to make only 50 connections for solar from my application and then maybe there is some slow experience until the old relation was released. Even though there is a new connection at every regular interval there are connections...

php - Is there a way to know from which website an URL is being calling? -

I have a URL and I tell it from many web sites is a way to find out which website URL is called I went? Use $ _ SERVER ["HTTP_REFERER"] , but you Do not trust it for security purposes because it can be easily changed.

Developing SAPUI5 applications with WebStorm -

Looking at the given SAPUI5 code on Hana, I saw that the webstorm and even some SAP developers of Ruby Manny Was used by. I have also heard that different developers on web sites use webstores for codes checked in ABAP stores. Both HAANA and ABAP repositories through technically proprietary SAP distributed plugins through the SAP distributed plugins, the default method of syncing the SAPU5 5 code with Hana and ABAP repo Eclipse or Eclipse based Hana studio Is using I searched and did not have any plug-in or how you can not use it easily and in the Hannah or Abeap repo and use Eclase or Orion. For Hana, you can like Github at some other ABEAP stack / UI5 / UI5_REPOSITORY_LOAD in the middle. Manually uploaded, I've heard the options for both of them, where developers have reverse engineer listening to traffic using e-lips or de-compiling plugins. My question is how are you using other webstreams to develop SAPUI5 applications within a team, and how do you sync your code w...

c# - Binding not working on GroupBox.HeaderTemplate -

Image
I created a custom header for my group box like the following group: I also want to set a binding set on the background of this header, so I The following code is written: & Lt; / Border & gt; & Lt; / DataTemplate & gt; & Lt; /GroupBox.HeaderTemplate> & Lt; / GroupBox & gt; After the execution, I have the backend of the groupbox correctly, but not the header! Is able to explain why he is not working? You can use that way; & lt; Groupbox width = "130" height = "80" borderbrash = "black" margin = "5" grid. Roll = "0" background = "{binding H collar}" & gt; & Lt; GroupBox.Header & gt; & Lt; Border border border = "black" bordertyx = "1" corner radius = "3" horizontal align = "statch" width = "70" margin = "- 2,0, -3, -1" height = "20" background = "{ Binding path = h collar} ...

javascript - OS X WebKit WebView don't show JS Popups -

I've just started to develop with xCode because I need a Vebvi container for the website is still working Does, but I can not logout on the website because in a popup window (in a web browser) is asking whether I was sure to log out. I think this is made with javascript. The web view setting contains a checkbox labeled "Allow popup", but after clicking, there is no popup in my app. I searched for two hours and found nothing related to my problem. This was a confirmation () Javascript function. I've had to work with it: - (minus) Avedndifinif launch: (NSNotification *) A {[webView setUIDelegate: self]; // & lt; ------- This is an important part !!! [[Webview Preferences] SetJavaScript disabled: Yes]; [[Webview Preferences] SetJavaScriptTapApenWindowsAutomatically: Yes]; [[Vebvive Frim] Loderkwast [Ansuarar request with url: [Ansdbluar URLWithString: homeURL string]]]; } and - (bool) Webview: (WebView *) This runJavaScriptConfirmPanelWithMess...

objective c - How to tell when a UILabel will be truncated an/or its line break position will change -

Image
itemprop = "text"> I have a multi-line UILabel ( numberOfLines = 0) . Its width can change on runtime, and sometimes it leads to spraying and / or re-rapping. In some instances, this is the best thing: Example 1: Decrease in width Separate line leads to break points Example 2: Decrease width decrease Leads Example 3: The cut in width leads to both punching and a different line break position Example 4 : There is no effect on cutting or breaking position in width This change in formatting is quite confusing So, I intend to mask it behind some animation (possibly a fade / fade out). However, the first hurdle when I need to do this. Whenever the label is re-shaped I still do not want to apply on the animation - only when it will change the transition or line break situation. How can I test it? Examples 1, 2, and 3 should be yes for example, but none for example. Note: Changing the shape will never change the number of rows in ...

asp.net mvc 4 - PDF generation in mvc4 with itextsharp -

I am working on PDF generation, this is it It is also working fine on the local environment after publishing. We have our own server on other sites but the same code does not work on the server, instead the PDF is generated, instead it returns an error: 'No page in the document is.' Initially I thought there is no data in this document, but it works without documentation or without data locally. The code was applied to a web request to me, is there a problem? Try {var myHttpWebRequest = (HttpWebRequest) WebRequest.Create (strPdfData + "? ObjpatId =" + patID); Var response = myHttpWebRequest.GetResponse (); MyHttpWebRequest.Timeout = 900000; Var Stream = Response GETResponsestream (); Streamer sr = new streamrider (stream); Content = sr.ReadToEnd (); Make a method in the controller: [HttpPAGT] Public JasonResult GetFile () {var json = New webclient (). Download file (string address, string filename); // This code is just for converting the file in...

c# - Take screen shot of behind the window -

I am preparing a WPF application that has Arrow glass effect and works in Windows 8 (where we use it Can not pick actual Aero using Windows> DwmExtendFrameIntoClientArea .) - To do this I need to take a snapshot of this area without my application without my application (and then blurred effects on that image apply the)! I am using Graphics.CopyFromScreen , but it includes the screen with my application. I can not reduce the window, since this image is being rebuilt in every 100 messages. How can I get this functionality? (I am using .NET 4.0) you win32 api rout

homebrew - Can I use brew to install Node.js? -

I have already trusted my MacOS, but I noticed that some people do not use it for node.js Suggest. Can I still use decoction, because it is easy? What are the disadvantages of setting up through any decoction? I npm which automatically installs nodes. Js. There was no problem with it for at least one year.

java - How to make Intellij automatically parse custom beans? -

I am working on Java / camel application. I have configured camel through XML files, which & lt; CamelContext id = "CamelContext" xmlns = "http://camel.apache.org/schema/spring" & gt; & Lt; Proxy ID = "some processor" service interface = "some. Processor" service URL = "direct: process message" /> & Lt; / CamelContext & gt; Intelle always gives me a warning that custom bean is not yet taught. I do not want to agree on that which I do for every edit in Camel contact. E.g. (Proxy ID changed): & lt; CamelContext id = "CamelContext" xmlns = "http://camel.apache.org/schema/spring" & gt; & Lt; Proxy ID = "Some processor 1" service interface = "some. Processor" service URL = "direct: process message" /> & Lt; / CamelContext & gt; (BTW, if I change the editing, the bean is parsed again.) Is there any way to automatically parse custo...

javascript - Jquery rename content insite a tag and confirm it -

The user should be able to change the name and then confirm the change. I'm not able to store it with this code when I confirm, as it does before, what am I missing? There is no better way to keep it together (which I'm sure there is one)? Please check the demo where you type the change element JS: $ ('. Replace'). $ ('Confirm'). $ ('Texturea') $ ('texturea') $ ('confirm.') $ ('Confirm.' '), $ Function () {$ (' replace '). ChangeElementType ("h2");}; if ($ ('text: visible')) {$ (document) .keepers (function (e) {if (e.which == 13) {Warning ('You enter CSS ('opacity', '1');}}}}}}}; "$ string" I think your code is correct but you need to use the value that you are entering when it will be binding on confirmation of something like this (bring it, and after that Before doing "conversion" in an H2 tag, it must be used to update Teddera. $ ...

database - Grails org.hibernate.StaleObjectStateException for simultaneous requests -

I have an app with the controller performing an update of the controller, making an update with the areas of the database. When the action is done at one time, it works fine. But when I do two actions together, I was updated by org.hibernate.StaleObjectStateException error another transaction (or unsaved value mapping or Was removed)) I need the controller to be able to handle the action together, for example by queuing the request and doing sequentially what is it somehow possible? Or how do I care for some of this? ( synchronized want to help here? Is this correct the way?) is database memory / file , As I have done a little work with it. It is not necessary to run a full scale database. Edit: Calling 'hierarchy' is as follows: This entry point is the controller. game controller def doTurn () {stringoverflow def c = player.creterkitia () def player = c.get {eq "login", login lock true from strings login = params.login // } // Deaf Player =...

how to get mongodb's loaded configuration file path -

I have to programmatically obtain the path of the configuration file, which is loading the mongodb. Is it possible to get it by running a command or something? You can run a command in the Mongo shell but on admin the database that you Command line options will be used to start a Mongoode or Mongoose: db.runCommand {{getCmdLineOpts: 1}) {"argv": ["/ Usr / bin / mongod", "--config", "/etc/mongodb.conf"], "pars": {"config": "/etc/mongodb.conf", "net": {"" "" "" "" "" "" "," Port ":" port ": 27017}," storage ": {" dbPath ":" / var / lib / mongodb "}," systemlog ": {" destination ":" file "," logAppend ": true," path ":" /var/log/mongodb/mongodb.log "}}," OK ": 1}

ios - Extra call to setMarkedText:selectedRange in iOS7? -

I have implemented UITextInput in my app, so I use multi-stage key input (Japanese, Chinese keyboard ) For my custom text view, I see in iOS7, when you have some text that is marked, and you tap one of the tips above the keyboard to change it, that it is SetMarkedText: selectedRange is called twice: once the place changes, the pan at the top of the keyboard Text marked with the selected string from L (as you were expecting), and once the empty string is sent as a parameter in IOS6, it is called only once. My questions are, is there any reason to do this? And how should I adjust my setMarkedText: selectedRange to this account (listed below): - (zero) setMarkedText: (NSString *) marked text Selected range: (NSRange) SelectedRange {NSRC selectedNesense = self.textView.selectedTextRange; TeXchange = self.textView.markedTextRange marked as NSRange; If (markedtextranz.place! = NSNotFound) {if marked (marked!) Text = @ ""; [Self. Replace the text of the label: String ...

c# - Difference between PreviewMouseLeftButtonDown and MouseLeftButtonDown WPF -

इस सवाल का पहले से ही एक उत्तर है: 4 जवाब जबकि WPF सीखने (मैं हूँ इस के लिए नया), मैंने एक साधारण विंडो बनाई है और उपयोगकर्ता नाम दर्ज करने के लिए एक टेक्स्ट बॉक्स डाल दिया है। मैं इस पाठ बॉक्स में शुरू में कुछ टेक्स्ट वैल्यू डालता हूं (उपयोगकर्ता नाम)। मैं चाहूंगा कि यह पाठ गायब हो जाए जैसे ही माउस लेफ्टबटटनडाउन निकाल दिया जाए। नीचे मेरी XAML और सी # कोड है - & lt; पाठ बॉक्स का नाम = "usernameTextBox" पृष्ठभूमि = "पारदर्शी" PreviewMouseLeftButtonDown = "usernameTextBox_PreviewMouseLeftButtonDown" HorizontalAlignment = "बाएँ" ऊंचाई = "23" मार्जिन = "10,103 , 0,0 "टेक्स्टवॅपिंग =" लपेटें "वर्टिकलएलिनेमेंट =" शीर्ष "चौड़ाई =" 166 "पाठ =" उपयोगकर्ता नाम "/ & gt; सी # कोड निजी शून्य usernameTextBox_MouseLeftButtonDown (वस्तु प्रेषक, MouseButtonEventArgs ई) {if (usernameTextBox.Text.ToLower () == "उपयोगकर्ता नाम") usernameTextBox । पाठ = ""; ...

symfony - Symfony2 layout composition or inheritance -

I can not understand some principles about layout structure in sf2 I have this app / namespace / my bundle / resource / view / bay.html template: {% extends ':: base.html.twig'% } {% Block title%} main title {% block subtitle {% Endblock%} {% endblock%} {% block head%} & lt; H1 & gt; Pleasurectite & lt; / H1> {% Endblock%} {% block entity%} {% endblock%} {% block sidebar%} {% Endblock%} I head.html.twig to change head block How to make Currently I have this app / bundle / resource / view / head The template is: {% expanded 'AppNamespaceMyBundle :: layout.html.twig'%} {% block head -%} & lt; H1 & gt; Main title & lt; / H1> {% Endblock%} Then I load a page with this index.html.twig: {% extends' AppNamespaceMyBundle: : Layout.html '%} {% Block Subtitle%} | Categories {% endblock%} {% Block Body -%} & lt; H1 & gt; Categories list & lt; / H1> & Lt; Table class = "record_list" & gt; ...

python - How to Prevent Tkinter from waiting for any action -

I need something about the tanker module. Down is an example code that is issuing me Import cost constants from imported imported tanken * tk = Tkinter.Tk () frame = ttnator.fr (vaccine, relief = rides, limit = 2) frame .pack (fill = both, expansion = 1) label = ticcentor Label (frames, text = "hello, user-puts a look at your data") Label.pack (fill = X, extension = 1) tk.mainloop () This one There is a small piece inside the program, where I have to check some data and as a result, we create excel shells per hour. For the purpose of information, I am displaying this data using Tinkiner (new to Controller). After displaying the data, the program has to sleep for one hour and then starts from the beginning (collecting information, typing on the screen on the same accelerate and displaying). Now the point is that after creating a widget interpreter, waiting for further input, this is the default behavior, but I should not do this. Is there any way that Tuckner's m...

php - How to set INCLUDE_PATH variable to PHPUnit libraries under Composer directory for Behat -

I have some tests under the directory of the features. But when I try to run Behat I the following error: $ ls behat.yml features $ PHP Warning Behat: load into the unknown on the modules 'memcache' first line 0 PHP Warning: (PHPUnit / Autoload.php): Such a file on Line 24 or $ HOME / Vertical / UMS / API / Trunk / Test / Functional / Features / Bootstrap / FeatureContext.php Directory: Stream failed to open PHP Fatal error: require_once (): Failed required to open 'PHPUnit / Autoload.php' (include_path = ':. / Usr / share / pear: / usr / share / php') $ HOME / workspace / UMS / since API /test/functional/features/bootstrap/FeatureContext.php on / line trunk / 24 / to use PHPUnit now peer Is not available to install, if I use it at the end then my PHPUnit libraries are installed under $ sudo / -name PHPUnit /HOME/.com Posser / vendor / Phpunit / Phpunit / Phpunit /hom/kkanpojr/vender/phpunit/phpunit-mock -objekts / Phpunit /tmp/zendfrmevork-lkllk0/...

javascript - After Initial Load Child_Added no longer returns full data -

I have a site where a user can order by selecting items in a menu It is set up so that you press the "position order" button on the menu page Then the ordered order appears on the order page. On the orders.html page to load first, it shows all the data ok but whatever the added child does not load the rest of the data added, or it displays does not do. If I refresh all the loaded orders page I may feel somewhat simpler, but I think where I found the fault. Edit: Orders.html code from webpage. var base = new firebase ('https://takeaway.firebaseio.com/'); ('Hair' added '', 'function' (snapshot), function (snapshot) {var orderdata = snapshot.val (); var contactname = orderdata.scope name; var contact number = orderdata contact number; var orderotal = orderdata Quotes; var command = "& lt; div class = 'openorder' gt; & lt; span class = 'name' & gt;" + contact name + " }); Order = o...