Posts

c# - How to check if all values in an array are equal -

इस सवाल का पहले से ही एक उत्तर है: 9 जवाब निम्नलिखित जांच अगर सभी मान स्ट्रिंग अर्रे में मामले की अनदेखी के बराबर हैं स्ट्रिंग [] स्ट्रिंगअरेरे = नया स्ट्रिंग [] {"xxx", "xXx", "xxx"}; बूल वैल्यूएरे एक्वलल = फॉल्स; के लिए (इंट आई = 0; आई & lt; स्ट्रिंग एरेरे। लैंगटी; आई ++) {अगर (आई & gt; = 1) {वैल्यूसएरेक्वॉल = स्ट्रिंग एरेरे [0] .Equals (स्ट्रिंगअरेरे [आई], स्ट्रिंग कॉमपरसन। इन्विरिएन्ट कल्चर इग्नेर सीज़); यदि (! मानएंअरेक्वॉल) {ब्रेक; }}} मैं यह कैसे LINQ का उपयोग कर लिख सकता हूं? यदि आप जानना चाहते हैं कि सभी बराबर हैं तो कुशल और पठनीय है: स्ट्रिंग प्रथम Item = StringArray [0]; Bool allEqual = StringArray.Skip (1)। सभी (एस = & gt; स्ट्रिंग। एक्लॉल्स (प्रथम इटैम, एस, स्ट्रिंग कॉमपारन। इन्वैलरियंट चाइल्ड इग्नोर केस)); सभी ब्रेक भी पहली रिटर्न पर देता है जो false देता है। ध्यान दें कि मैंने शून्य ऑब्जेक्ट्स पर रिक्त-संदर्भ अपवादों को रोकने के लिए स्थिर का उपयोग किया है। वैसे, आपका लूप गलत है क्योंकि आप 2 ...

sql - (foreign keys) Dependencies -

I want to remove a database from it to get rid of the data and run a query to remove one of the annoying things. I want to have to remove the dependency on the next basis. What information? Is there anything in SCEMA that will come in handy? For this kind of thing? If not, then someone should advise in a simple way to find out how long they are waiting for 8 minutes. You can select 'View Dependency' if you right click on the table in Management Studio It will show you all the tables, views and other items that depend on this table and this table depends on this table

javascript - Should resource scripts in an AngularJS app be relative or absolute? -

I am creating an AngularJS single page-javascript app, so index.html looks like this: > pre & lt; & Lt; Top & gt; & Lt; Base href = "/" /> ... & lt; / Head & gt; & Lt; Body id = "ng-app" ng-app = "myangularApp" & gt; & Lt; Div class = "holder" & gt; // templates from app.js are presented here & lt; / Div & gt; & Lt; Script src = "bower_components / angular / angular.js" & gt; & Lt; / Script & gt; & Lt; Script src = "bower_components / angular-route / angular-route.js" & gt; & Lt; / Script & gt; & Lt; Script src = "bower_components / angular-resource / angular-resource.js" & gt; & Lt; / Script & gt; & Lt; Script src = "script / ap js" & gt; & Lt; / Script & gt; & Lt; / Body & gt; & Lt; / Html & gt; I run this app in HTML5 MOD and are having trouble with fallback for l...

sharing data between two popups at Android -

I have a popup on my app that is close to another without closing The thing itself is that I want to put some data on another popup , turn it off, and load the data on the first one. This is my code: popup.setOnDismissListener (New OnDismissListener) {public void onDismiss () {TextView tv = (TextView) findViewById (R.id.tv_pagocontarjeta); tv.setText (( (TextView) layout.Fund Veebid (RID.Calci_TV). GetText ());}}); But that does not work, I get NullPointerException on the line: tv.setText (((TextView) layout.findViewById (R.id.calc_tv). GetText ()); . What can I do? Thanks instead TextView tv = (TextView) findViewById (R .id.tv_pagocontarjeta); Usage TextView tv = (TextView) layout.findViewById (R.id.tv_pagocontarjeta);

java - How to get small part of a command output -

After this post I want to get a Linux installation date. process p = runtime.gettime (). Exec ("rpm -qi basesystem"); Can you tell me how I can execute the command and capture only the installation date as shown in the post. I have to get the full output and filter the content and the final result using Java should be something like this: Thursday 28 November 2013 06:01: 06 PM EST Read the input stream and parse it: process proc = Runtime.getRuntime (). Exec ("rpm -qi basesystem"); InputStream stdin = proc.getInputStream (); InputStreamReader isr = New InputStreamReader (stdin); Buffed reader br = new buffed reader (ISR); String line = null; Date Date = Zero while ((line = br.readline ())! = Null) {// Check each line for the date you need // set date // break; }

ios - Difference between AdMob and DFP networks? -

I am trying to display interstitial ads along with bankers on my iOS application. But now I have confusion over ad network. How can AdMob differ from DFP and who is better for advertising, can someone help? Thanks in advance. AdMob is an advertising network, you earn money by displaying advertisements from the network as a publisher You can. Advertising companies will be paid without direct contact with advertising companies. DFP is an ad server provided as a cloud solution. You can set an example yourself but it is empty. There are no ads in it You will need to go out, get advertisements from advertisers, book campaigns in ad server and display ads in your app. You will be in direct contact with the advertising companies and will charge them directly. For simple monetization, go from AdMob. If you have a very popular app and the market you are in, you might want to set up a sales team that receives premium ad campaigns, then you can use DFP to manage your premium campaign...

java - How do I make JDK 7 default jave to be used on Mac OSX 10.9+? -

By default, if you install Oracle JDK, it will not be used as the default Java environment. Turn on all system simulations / systems / libraries / framwork / JavaWamas / frameworks / versions / current ZKK with / usr / bin / java *. How can I change them, is there any script that can change default javascript? check you application - & gt; Utilities - & gt; Java to switch to default JDK.