Posts

Showing posts from June, 2015

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

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

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 < / Em> 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); < / Pre>

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.

How to add border to code blocks in generated beamer pdf from Markdown using Pandoc -

I have found out how to write a line number, `` {.c.NumberLines} int x = 1; Int y = x; `` But wonder how to add limits in code blocks. The "easy" way to do this is to default.beamer template Modify and pass the - listings variable in pandoc during pdf creation. View information for frames in listing documents:

c# - English mail displays Chinese characters in some email clients -

I have an application to send an English and / or check email, which is correct in some EME clients (Outlook 2010) Is displayed but displays in the second I am setting a message for a bunch of Chinese characters. Body encoding = systemtext.nncoding.unicode , but it seems I should do something else ... but it seems that I do not know :) Would any help really be appreciated? According to , try using UTF 8 encoding this way: messages. Body encoding = systemtext Encoding.utf8;

java - Deserialiazing list of elements with @Text annotation in Simple -

I have two squares, packages and ModelRefObj . The package has two sets of ModelRefObj I am using simple framework to parse my instances of XML, so I have made some JunkyT Test I ModelRefObj XML I am able to parse, but when trying to pars a package, the following exception is being made : org. Simpleframework.xml.core.ValueRequiredException: empty value for empty (empty =, data = false, = essential truth) for @ org.simpleframework.xml.Text 'value' on field 'personal' java.lang.String cz.semanta.coc.domain . Org.simpleframework.xml.core.Composite at cognos.ModelRefObj.value in on line 1 at cz.semanta.coc.domain.cognos.ModelRefObj org.simpleframework.xml.core.Composite.readInstance (Composite.java )80) .readText (Composite.javaache67) org.simpleframework.xml.core.Composite.access at $ 200 org.simpleframework.xml.core.Composite at $ Builder.read (Composite.java59) (Composite.java:1381 ) ... Here's the XML that I'm trying to parse: & lt; Pac

java - I have javax.crypto.BadPaddingException: RSA Cryptography -

I have a problem with RSA cryptography when the message is too long. MySiffer: public static byte [] encrypt (byte [] datatype, publication of public) {try {system.out.println ( "Encrypt"); Cipher cipher = cipher Get Instances ("RSA / ECB / PKCS 1 Padding"); Cipher It (cipher NCRYPMOEEE, PubK); Byte [] encrypted = new byte [datatycript.lumb]]; System.out.println ("imagebight length:" + dataeticcript length); Byte [] TIP = new byte [53]; Byte [] temp2 = Faucet; Int x, y, z = 0; Int repeats = datatypecript.label/53; System.out.println ("Change:" + Repeats); {System.out.println ("change number:" + z) for (z = 0; z Main: public static void main (String petition []) {MsgAtoB_1 msg = new message Attobi_l ( New BigInteger (String.valueOf (System.currentTimeMillis ()), "Login"); Byte [] tab = MySerializer.serialize (msg); KeyPair key = Keys.generateKeyPair (); Byte [] crypt = MyCipher.encrypt (tab, key.getPublic ())

java ee - Tomcat not Executing load-on-startup in Fedora -

I have a servicelet that is load-on-startup 1 (/ load-on-startup) in web.xml , Because I want to start some stuff while starting the badge to preserve the request time. In MyEclipse 2014 supporters, when I start Tomcat 8.0.3, it actually starts that servicelet in Fedora 17 x 64 (from DigitalOcean.com) when I use Tomcat: "Service Tomcat Start" this bus Does the original badge start and does not really start that the servlet is run to handle my specialty a special order? What do I earn to enter in Fida, so that it actually starts my web.xml, while this Tomcat starts? Thanks I posted the app locally in my AMD and then I have copied / pasted the content of Tomcat / WebApp / Root / * using WinSCP on the server in DigitalOcean

ios - Error message when launching my app -

Edit: I found the solution, here's the answer: Thanks! I'm using Xcode 5.1.1 on Simulator 7.0. When I launch my application, an error occurs to me that the crash my app I unrecognized selector example sent to 0xadcce00 2014-04-28: - 2014- 04-28 15: 06: 45.144 OpenSeriesMercedesFrance [UITableViewWrapperView cellForRowAtIndexPath:] [7817 70B] error message 15: 06: 45.146 OpenSeriesMercedesFrance [7817: 70B] *** neither came exception 'NSInvalidArgumentException', due to the end because the app: '- [UITableViewWrapperView cellForRowAtIndexPath:]: Unrecognized selector instance sent to 0xadcce00' *** Throw first one L'stack: (0 CoreFoundation 0x03a085e4 __exceptionPreprocess 180 1 libobjc.A.dylib 0x02fbe8b6 objc_exception_throw + 44 2 CoreFoundation 0x03aa5903 - [NSObject (NSObject) doesNotRecognizeSelector:] 275 3 CoreFoundation 0x039f890b ___forwarding___ + 1019 4 CoreFoundation 0x039f84ee _CF_forwarding_prep_0 + 14 5 OpenSeriesMercedesFrance 0x0

SSRS report design doesn't continue with CRM reporting and ASP.net report viewer -

I am working on the Microsoft Dynamics CRM report and preparing my report in SSRs vs. 2010 and importing into CRM reporting I am doing it and then seeing them through the asp. .net Report Viewer vs. 2012 I have used several text box controls in front of the big text box in the background, which shows that the dynamic text depends on the user. In fact my report has two layers, i and all two layers have a text box with dynamic values. But when I look at reports from the CRM or report viewer, they both do not support my design. It shows the front layer text boxes at the bottom of the page after the large background text box. But when I save the PDF from the Report Viewer, it is a perfect design. !!!! CRM and ASP.N. What can I do to report my SSRs report in Report Viewer? Any comments will be valuable. Methi /////////////////////////////////// ///////////// What can I do to set the byte array of reports for the audience report byte [] report byte = singleton & lt;

in CSS, how can I make a table expand to fill a container div? -

I want to "create" spaces on the screen by creating several container DIVs, then fill the contents in each DIVs. In one case, I would have to fill with a table. In the interior of the table there are JPEGs, I do not want to use fixed pixel size anywhere, so that the content can shrink well in different size browsers. After repeated tests and errors, and reading something on the Internet, I came to know that the whole chain container-DP ---> Tables-> TDI-> TR-> TD-> Img well in size I have to make sure that each of these elements has the following qualities: "height: 100%; width: 100; condition: relative" (IMG status can be completed by itself). It works fine with only 1 row table, but if I have many lines, then it seems that the height of the line is calculated positively from your parents, which Someone, because if I have 2 rows, then each row is still as high as T but I manually divide the height of TR by 2, but it is not exactly fit in the

sql - Deleting using inner join -

I want to delete some data from a table. I want to delete the data that is not included in internal join My query is up to now: Delete * How do you say that which is included in the deleted internal Ho? * From dbo Clappy Sea Inner Inner Debu Coke P. c.cakeid = p.cakeid where cact & gt; 1 Thanks in advance for all and any support provided :)! You can use LEFT OUTER JOIN : Remove from DBA c.Cloudpie c LEFT OUTER add dbo.cake p ON c.cakeid = p.cakeid where P is cakeid faucet and c cakeid & gt; 1: easy and less error prone (on empty columns) by using <1> or not existing : .Cloudpie c Where not (select 1 to dbo.cake p WHERE p.cakeid = c.cakeid) and c.cakeid & gt; 1 Reading worth:

perl - Unpacking ArrayRef into X separate arguments -

Looking at a seraph that contains other surrefraces, is it possible to combine nested serfact together using zip function? For example, it has been given: My $ matrix = [[qw (1 2 3 4)], [qw (5 6 7 8)] , [Qw (9 10 11 12)], [Q (13 14 15 16)], [QW (17 18-20)],]; I would like to zip each line together so that I can move. Expected output: [[qw (1913)], [qw (2 6 10 14 18)], [qw (3 7 11 15 9)], [qw ( 4 8 12 16 20)],]; My initial efforts were as follows: # I expected that the function will open @zip matrix @ logic; #Error: There is not enough logic for the list: MoreUtils :: Mesh Spiral. On page 17 # I thought this piece would be enough to open them @ $ matrix [1..scalar @ $ matrix-1]; # Error: 1 Arg Type for list: MoreUtils :: Aries should be array array (not piece of array) I'm sure this is a way of doing it properly, I Just seeing it, any help will be appreciated. zip function is very annoying because it uses or something like crazy . You must do an amper

python - How to convert a decimal number into fraction? -

I was wondering how to convert a decimal to its lowest form in Python in its lowest form. Example: 0.25 - & gt; 1/4 0.5 - & gt; 1/2 1.25 - & gt; 5/4 3 - & gt; 3/1 You have two options: < Li> Use: & gt; & Gt; & Gt; P> Use it: & gt; & Gt; & Gt; Fractions from Fractions & gt; & Gt; & Gt; Fraction (0.25) fraction (1, 4) is very helpful in the latter str () conversion: & gt; & Gt; & Gt; Str (fraction (0.25)) '1/4'> gt; & Gt; & Gt; Print fractions (0.25) 1/4 Because floating point variants may be incomplete, you can eliminate 'weird' fractions; Limit everything to 'smooth' part to a certain extent: & gt; & Gt; & Gt; Fraction (0.185) degree (3332663724254167, 1801439850 9 481984)> gt; & Gt; & Gt; Fraction (0.185) .limit_denominator () fraction (37, 200) If you are using Python 2.6, then fraction () to pass so far Do

Provide site search information to Universal Analytics from Google Tag Manager -

Image
On our site, on which we have recently started using Google Tag Manager for all our tracking needs. Previously, we had Google Analytics (now upgraded to Universal Analytics) site search enabled; we did not have _ga.push -statents with search parameters sent to Google Analytics , The terms used by us were the search string and which were the number of similar products, such as in an event: _gaq.push (['_ trackPageview', ' / Search? Q = [SEARCH STRING] and cat = [number of results] ']); Google Analytics has achieved these standards and used them in site search. Now we have a GTM set up. I think we should really be able to leave this stage, events from many GTMs and other Google Analytics things are already integrated in the GTM already. From GTM, we have the search string in our data layer as well as the number of results and more information used for site search Google Analytics. The question is: how should send information to Google Analytics and h

c# - Virtual Method Throw new NotImplementedException(); -

I got class A, one inherited B and the second class C that is from B. I want to define some methods in my class, but do not implement it, if I declare it as a table, then I have to apply it in my heritage class, and give me this I do not want to apply that method to my class as an example Is this process correct? public class A {public virtual string getValue (new {NotImplementedException ()}; } ....} second class public class B: A {...} Third class public class C: B {public override string getValue () {... // Return to a string} or I want interface Use? You can mark the method as an abstract and you can also create a binary form, so only To implement C getValue You can definitely use an interface instead, it depends on what you're actually doing. {New NotSupportedException (); }

c# - String.Format is not working properly -

I have code below: Private string Do2Decimal (string value) {return string format} Here I am passing the string value as 16.32222 . What do I know, the above code should be formatted for my value 16.32. But it is showing output value as 16.32222 . What's wrong with me here? Update: I have values ​​in string format: "16.32222" Sorry, forgot to mention first. Because you pass it a string value . The formatting will work for floating point numbers / decimals. Just parse the number on the decimal / double type depending on your requirement: string.format ("{0: 0 ##}", decimal. Purse (value)); You can also use the (or TryParse) family method for secure parsing. You can also modify your method to get decimal / double type parameters And then apply formatting. It will express a better intention, IMO if your string has . does not support your culture as well. As the NumberDecimalSeparator in the form of CultureInfo.InvariantCulture as

python - xlrd cannot read xlsx file downloaded from email attachment -

This is a very strange issue. I have a large excel file (the topic I can not discuss because it's sensitive data I have a .xlsx and a valid Excel file. I When I download it from my email and save it to my desktop and try to open the workbook using Excel, XLRR puts a fear of error and not me Ikhata wrong happened. When I open a file using my file browser, save it (to not make any changes), it works entirely with xlrd what Has anyone encountered this issue before? I tried to get the OpenGL functionbook function close to no effect in different flags and I tried googling for error. I have not got anything yet Please help! The error is as follows: Traceback (most recent call last): File "./varify/samples/resources.py", line 354, post workbook = xlrd.open_workbook (file_contents = fileString) file "/home/vagrant/varify-env/lib/python2.7/site-packages/xlrd/__init__.py", line 416, in open_workbook ragged_rows = ragged_rows, the file "/ hom

Issue exporting crystal reports crosstab to excel? -

Image
I have a crosstab in which there is a time zone, it shows well formatted on crystals, but when I axle it To export, it shows from 12:00 in all areas. Does anyone know how to solve this? I am using CR 14.1.1.1036 and Excel 2013. See sample below You can format cells, this can hide field data in 12:00 AM.

knockout.js - How to set knockout variable from array element -

I have to face some finger with it: Perhaps the difference is that you myVal The values ​​of are set in the first object before the array is actually populated. To see if you have console.log (self.myArray () [0]) First, self.myVal is set up, you should see what is happening. Since you are setting it to O. Nly once it is not subscribed to change in array I If you wanted to do this then you would calculate. self.myVal = ko.computed (function () {return self.myArray () [0];}); will now be counted whenever anything will be added or removed from myArray

content management system - Adding a new aspect with a User property -

Is it possible to add an asset inside a new aspect that will keep users from Alfreso users? It will be used to input the user who is responsible / author of a defined aspect document. The problem is that you have defined the same area twice. First is the D: text property and another is the union . In your model you have defined & lt; Property Name = "txm: Vacation Process" & gt; & Lt; Title & gt; Not at Pranam & lt; / Title & gt; & Lt; Type & gt; D: text & lt; / Type & gt; & Lt; / Property & gt; And according to your definition: & lt; Associations & gt; & Lt; Union name = "txm: vacation spell" & gt; & Lt; Title & gt; Notification & lt; / Title & gt; & Lt; Source & gt; & Lt; Mandatory & gt; False & lt; / Mandatory & gt; & Lt; Many & gt; False & lt; / Many & gt; & Lt; / Source & gt; & Lt; Goal & gt; & Lt; Cl

javascript - Assign attributes to values in array js/jquery -

In my script, a function uses values ​​in my teststim array. var teststim and I want to attribute these values ​​to, so that the attributes "A", B ("A", "A", "B", "C" ] "birthday", ... I need to find a way to access these features. I thought about something like this: {Content: "n"}, {content: "b", attribute: "birthday"}, {content: "c", specialty: "Whatever"} may be closer than I am thinking But I'm not able to access the 'attribute' values ​​according to the content values. What am I missing? You need an array of objects: var teststim = [{content: "a", attribute: "name"}, {content: "b", attribute: {Var obj = teststim [i] for "birthday"}, {content: "c", attribute: "whatever"}]; (var i = 0; i & lt; teststim.length; i ++); If (obj.content == 'C') {Warning (obj.attribute); /

caching - How does Rails generate the view cache key? -

I was always wondering how the rail generates cache and, in particular, does: users.concat (@products) / Pre> method is: increases the # key + argument Which can be used for the #cache store, optionally accepts a namespace, and all the keys are scanned within that namespace. Or. # # If the + key + argument is provided then there is an array, or responds to + to_a +, then # each element will be converted into an array / key and # will be added together in singles for example: ## expand_cache_key ([: foo,: bar]) # = & gt; "Foo / bar" # expand_cache_key ([: foo,: bar], "namespace") # = & gt; "Namespace / Foo / Bar" # # + + + key + logic can also respond to + cache_key + or + to_param +. Def extension_cache_key (key, namespace = zero) expanded_cache_key = namespace? "# {Namesphere} /": "" If Prefix = INV ["RailSecCIIDID"]] || ENV ["RAILS_APP_VERSION"] expanded_cache_key & lt; & Lt; &

javascript - Uncaught TypeError: Cannot read property 'match' of undefined -

I check that some fields are matches or are not empty, but I get this error with this piece of jQuery. Untitled Type Error: Undefined property 'match' can not be read Can anyone tell me what I am doing wrong here? if (width.match (/ ^ \ d + $ /) & height. Match (/ ^ \ d + $ /) & amp; amp; amp; type Length & gt; 0 & amp; This is the full code: if ($ ("#config")) {$ ('input, selection') .on ('change', Function () {var width = $ ("# config-steps #width") .val (); var height = $ ("# config-steps #height") .val (); var type = $ ("# config -steps #type ") .val (); var color = $ (" # config-steps # selected-color ") .val (); if (width.match (/ ^ \ D + $ /) & height Match (/ ^ \ D + $ /) & amp; amp; amp; amp; amp; amp; amp; amp; Color; lamps & gt; {$ ("#checkout - Message") Change the show (); // visible value $ ("#change-value"). Html (calculate_price (). ToF

javascript - Should I run all my sequelize migrations at server startup? -

I am a little confused about how migration is executed in sequels. This documentation has been explained in detail that Pending This means that sequels track what the migration is going on in the database and some continuous storage in hand Not in? If this is the case, does it mean that I should load all the migration to the migration folder on app startup and try to run them? If not, what is the best practice to keep track of migration should be running on current server? You are saying that the pending migration refers to it has not yet been executed on the database . If that app is not yet deployed, you do not need to run a migration to update your database. You can update your model instead to reflect your desired changes. If your app is deployed, then the database already exists and you want to update it, then when you can create a database at the local level for updates, but only display it Are there. When you run the migration command, it will run each new

multithreading - java threads common questions -

I have a few questions about the Java thread: If I have a class Is the number of threads that when a thread is exited (1) from the command line to exit, does it exit the entire app including thread or other threads? 2. How can I inform one thread to all other threads which are being run from the same class to stop? 3. To use it to synchronize, to make it to be part of the code, its source in the code, can only create one thread? 4. If I run a thread in Java through Run (), then I call any method from within the run (), it is still running as a thread or it is not allowed? If I have a class that runs multiple threads, when one thread is out (1) Command Line Exit the entire application including this thread or other threads? Calling thread to system.ext (1) and All other threads This is the most cruel way to eliminate a Java program That is, completely shutting down JVM, and seldom should be used in all. How can I make a thread to notify all other threads

How to generate a graphml file in Java. Gephi, JGraph, Prefuse, etc -

Image
Help! I am looking to create a Java application that a graph .graphml .ygf .gml .tgf I need to be able to open the file in the graph editor to be enabled. So far, I have found these solutions: Prof: Graffalam I can not use it to export, export to yEd, Java based, perfect : I will be spending more than $ 2000 to use :( this same I need it PRO: Free, export to graphalam, Java based! Why not use it Can: When I generate graphs in YEd Screenshots : If you try to open the file, then graphfam is broken : it is linear - "Https://i.stack.imgur.com/mvk8b.png" alt = "Enter image details here"> If I want this to work, then it's true The graph I tried to generate was generated using the project < Enabled to create a graph, Java based, free Why can not I use it: How to export graphfalm to the generated article? I could not figure it out Pro: Free, graph generation, Java based I can not us

How do I reduce the amount of SQL created by entity Framework? -

After the I write the LINQ piece Private IQueryable & LT for the following EE ... VRTSystem & gt; GetObjectSetWithIncludes () {return GetObjectSet () .clude (s => s.Site.Address.GeographicalLocation.ParentLocation.ParentLocation) .include (s => gt; s.Dhr.Select (d = & gt; d.DhrParts .Select (DP = & gt; dp.PhysicalPart.PartDefinition))) .Include (s = & gt; s.Room.RoomType) .Include (s = & gt; s.ProductConfiguration.ProductConfigurations_PriceBook.Select (pcpb = & Gt; pcpb.PriceBook)). .Include (s = & gt; s.ProductConfigurationTemplate) .Include (s = & gt; s.Customer.GeographicalLocation.ParentLocation.ParentLocation) .Include (s = & gt; (s.ProductConfiguration.Quote_ProductConfigurations s = & gt) include Do s.Customer .CustomerType) .Include (s = & gt; s.HospitalGroupCustomer.GeographicalLocation.ParentLocation.ParentLocation) .Include (s = & gt; s.HospitalGroupCustomer.CustomerType) .Include (s = & gt; s.ServiceCover

android - How to create a keypad lock to an app? -

I'm searching for a program but it's nothing but the keypad lock program. I have a program for which I have to set a keypad lock in the form of security, so that you can help me. How to lock program keypad? If you want to hide the soft keypad (touch keyboard that you use to screen There are some options to try. Option 1: You can hide soft keyboards, if you are talking about this, about it. First you need to get a view within your current window, or create one view v = findViewById (R.id.view_id); // or something like EditText mEditText = (EditText) findViewById (R.id.view_id); Or if you do not have any views in the window, create a new view see V = new view (this); Using that view, you can initialize an input methodman, get a window token through your view, and then force your keyboard to hide. Call on your Inuprophythm Manager for Input-method manager imm = (Input Methodmanager) getSystemService (Event.INPUT_METHOD_SERVICE); Imm.hideSoftInputFromW

java - abstract method in class -

A class automatically becomes an intangible square when its method is declared intangible. I talk about this in some blogs. Can someone explain me when we use only one abstract method then the entire class system becomes. Because it can not be directly straightforward, it is a compiler error, if you want to class Do not mark as abstract .

hadoop - YARN: How to run MapReduce jobs with lot of mappers comparing to cluster size -

I have 1-node headop test setup with MapReduce job which starts 96 mapers and 6 reducers. Before migrating from the yarn, this job was stable but with normal yarn, it started to hang 100% with the majority of mappers in the 'pending' state. The job is actually 6 Sub-Job (16 Mapper +1 rediscover each). This configuration shows the production process sequence. All of them are under a single job control, are there any such configurations that need to be examined, or are relatively big jobs compared to the nodes and cluster sizes of such small cases? The worst case for developers I can reduce the job with a group of sub-jobs, but I do not want to do this because there is no reason to do this on production and I must have the exam and production sequence same. When I migrated to the YARN scheduler then it was changed to farsiibular and it is currently the only option as I run Claudera and Chloeida, strongly recommends that unbiased scheduler Therefore switching to the FIFO

python 2.7 - Why psycopg2 placeholders acts differently on different Linux machines? -

मेरे पास एक कोड स्निपेट है: हैशड = हैशिलिब.शा 1 (कुछ_value) .hexdigest , "" cursor.execute (डालने, [टुकड़ों में बांटा, () "(dimensions_hash_id, dimensions_string) dimensions_hash में डालने का चयन एक्स% s% s जहां मौजूद नहीं है (dimensions_hash कहां dimensions_hash_id = एक्स% s से 1 का चयन करें)" = "" सम्मिलित some_value, टुकड़ों में बांटा]) dimensions_hash_id है बीआईटी (160) टाइप Ubuntu (14.04, पायथन 2.7.6, psycopg पर (2.5 .2), पोस्टग्रेज़ (9.3)) यह अपेक्षा के अनुरूप काम करता है प्लेसहोल्डर को उद्धृत स्ट्रिंग में विस्तारित किया जाता है, एक्स '' शब्दशः इस स्ट्रिंग को हेक्साडेसिमल मान के रूप में व्यवहार करने की अनुमति देता है जो पोस्टग्रेस बीआईटी (160) फ़ील्ड में फिट हो सकते हैं। हालांकि, CentOS (6.5, Python 2.7.6) स्रोतों से निर्माण प्रकार "XE" लाइन मौजूद नहीं है:, psycopg (2.5.2), postgres (9.3)) psycopg ई से पहले उद्धृत स्ट्रिंग जो यह स्ट्रिंग बच गए है और मैं ट्रैस बैक ProgrammingError हो रही है इसका मतलब है कहते हैं 3:

.net - adding Powershell Modules into Runspace asp.net -

Hi nobody can say that I am getting wrong in my code I have the following errors Invoking on Windows PowerShell snap-in 'Microsoft.Exchange.Management.PowerShell.Admin' is not installed on this machine. The word 'mailbox report' is not recognized by the name of a CMDlet, function, script file or operative program. Check the spelling of the name, or if the path is included, verify that the path is correct and try again In my server there are the following modules and PSsnapin's Path Module pstcheck = C: \ Windows \ System32 \ WindowsPowerShell \ v1.0 \ Module \ Mailbox PSTCheck Path Module exsession = C: \ Windows \ System32 \ WindowsPowerShell \ v1.0 \ Module \ NewExchangeSession Go-PSSnapin - Registered Name: Microsoft.Exchange.Management.Power.Shell.E2010 PSVersion: 1.0 Description: Administrator task for Exchange Server name: Microsoft.Exchange.Management.Power.Shell.Set Up PSVersion: 1.0 Description: Setup function for Exchange server name: Mic

ssl - Phantom won't open a url that is accessible (but will open it with fiddler running) -

I have a very simple phantom script that opens up a lot of URLs and dumps the console (actually No, but I 've reduced this problem down): page.open op.url, (position) - & gt; Console.log "opened # {op.url}" console.log page. Evaluation - & gt; Document.all [0] .outerHTML phantom.exit () When the URL https://latestcommit-negotiate-demo.owex.com phantomjs just hanged And the page. Open never invites callback. The site is definitely present and I can hit my login page differently from any dozen, but not with the phantom! What's ominous is that I want to see what's going on on the wire - so I open it and ... it starts to work. Unless the Fiddler opens, my script works great second, I close it, it is hung on page.open . This phantom is 1.9.7 and I call it - ignore-ssl -rrser = true flag. "Certain Things SSL"? What is the reason I am on the limit of my knowledge? The solution was that our server was not https through sslv2,

jsf - p:fileUpload not working after rendered by p:ajax -

मैं उलझन में पड़ रहा हूँ क्यों घटक p: fileUpload कॉल नहीं करता FileUploadListener घटक को p: ajax द्वारा दिखाया गया है। अगर मैं इसे पैनल ग्रिड से बाहर रखता हूं या उन्हें हटा देता हूं, तो ठीक काम करता है। क्या काम नहीं कर रहा है: & lt; div वर्ग = "शुद्ध नियंत्रण समूह" & gt; & Lt; label = "mostraNoIndex" & gt; स्लाइड शो & lt; / label & gt; & Lt; p: चयन बियोलीन चेक्सबॉक्स = "# {destaqueCadastrarBean.d.apareceNoSlide}" & gt; & Lt; p: अजाक्स इवेंट = "परिवर्तन" अपडेट = "अपलोड" & gt; & lt; / p: AJAX & gt; & Lt; / p: selectBooleanCheckbox & gt; & Lt; / div & gt; & Lt; h: पैनल ग्रिड id = "अपलोड करें" & gt; & Lt; h: पैनल ग्रिड = "# {destaqueCadastrarBean.d.apareceNoSlide}" & gt; & Lt; div वर्ग = "शुद्ध नियंत्रण समूह" & gt; & Lt; label = "mostraNoIndex" के लिए & gt; Imagem & lt; / label & g

javascript - Form that is HMTL5 Won't Validate -

The form will be valid, but after that it will be skipped and just goes straight to the end result. It seems that your problem is that You are handling gt; & Lt; Form & gt; Instead of handling the onsubmit event for instead of the onclick button event. In step 4 of the algorithm, it has been stated that submit from the submit () method is not set to the flag, and there is no valid state of the submitter element, then the interrupts agree to the interruptions The form ... This notifies me that when you are explicitly calling form.submit () function, you can use the HTML processor Telling you have done all the requirements and submitting the form Should not (Unfortunately, I was not able to post a good simple blog posting through explanations or examples.) You need to remove the button's onclick handlers and allow the form to be submitted in general. , Which will trigger verification You can add the formaction html5 attribute to your button to

signal processing - Fitting a curve in MATLAB using lsqcurvefit -

I am trying to fit the data with MATLAB using the lsqcurvefit function, but I have some difficulty MATLAB me Message. Local minimum possible Lsqcurvefit was closed because the size of the current step is lower than the selected value of the step size tolerance. & Lt; Stop Criteria Details & gt; Optimization stopped because the current stage model, 5.578610e-021, is less than the option. TLX = 1.000000e-020 Customization Metric Option Value (Step) = 5.58e-021 TolX = 1e-020 (Selected) I tried to change TolX and TolFun but only one thing The program that has changed has taken the age to complete now. The function I am trying to fit is: function P = dIdV (delta, e, t)% delta EV% e gamma eV% In T = 0.00001; % Four curve arr = zero (size (E)); A = -E (Length (E)) * 10: E (Length (E)) / 750: E (Length (E)) * 10; For I = 1: Length (E) arr (i) = trapz (A, (fermidirac (-i (i) + a, t) - fermidirac (a tt)) scdos (-i (i) + a , Delta, gamma)); End% derived b = zero (size (e));

arrays - Dynamically format columns on Workbook.OpenText using FieldInfo in VBA -

I am writing a program in VBA to open open a text file To continue, I want to open text on format cells (issue: long string string is being converted into numbers and is sorted). Through research through I have learned that it can be done using the FieldInfo for the argument. Opentext . All current examples working on the Internet are stable and require the programmer to enter FieldInfo: = Array (Array (1,2), Array (2,2) ..... Here's the closest I got in Array (n, 2) . but this does not work either. It gives me a 1004 error This is my version: dim colInfo (from 1 1000,1 to 2) I = 1 to 1000 colInfo (i, 1) = i colInfo (i, 2) = 2 next I I can not find any vba document if array not variable dim I can make y as x (), so i can solve this problem. I will be greatly appreciated! Array function only gives one version - this is a quick way of initial time, so you can simply create one of them and pass it as your logic. For: variant v1 = array (1, 2, 3) rea

Modifying an XML in Java -

I have an XML document that has zero values ​​in its value tag (something like the following) < Pre> and lieutenant; NS2: Attribute Name = "Store" Named Format = "Kalash: Oasis: Name: TC: SAM: 2.0: Attiname-Format: Yuri" & gt; & Lt; Ns2: AttributeValue / & gt; & Lt; / Ns2: Properties & gt; Now, I have to write the Java code to modify the values ​​given below. & lt; Ns2: attribute name = "store" nameFormat = "vase: oasis: name: tc: SAML: 2.0: attrname format: uri" & gt; & Lt; Ns2: AttributeValue & gt; ABCDEF & lt; / Ns2: AttributeValue & gt; & Lt; / Ns2: Properties & gt; I am using the DOM parser to parse the XML. I am able to delete the "tap tag" but not able to add new values. I'm not sure that we have a direct way to change or add values. Using the code to remove the child ("") node aNode = nodelist.itim (i); element = (allment) annotated; ehel

css - Sub-menu not visible on mouseover -

I was requested to use lit. theme from MDNend, also visible in the sub menu on the dark skin Do not let menuing (but the light theme does this) on the menu. How would I go about deciding this? I had noticed that a person suggests on any other question related to the sub-menu that it is the relative position (status: relative) on its own project super- this The theme is no longer supported by the developer, but is still being sold. Demo: Thank you for your help. In skin-dark CSS / * main BG * / Body, container {background: # 000; Status: Relative; / * Z-index: 1; * /} remove z-index

ios - Registering Custom Collection View Cell in UIView -

I have the same code from its answer. I am trying to implement a custom view cell and it is doing this and works as long as it inserts the cell and tries to allocate the properties of my custom view cell (because it is now Also sees the cell as UICollectionViewCell instead of custom vivekel). - [UICollectionViewCell imageView]: unrecognized selector sent to instance 0x1658c540 / code> I UIViewController Instead, calling the collection view in a UIView, there is no class method for viewDidLoad. I tried to implement the register in a method which I know is called for the first time. How do I manage to register a Custom Cell Class? And for that matter, how do I create a method that walks once in the beginning of a viewDidload method? I know that more code is necessary; I will update the question EDIT_1: On the exit, I was declaring it in the old code. However, @Vyat I had the necessary argument, although it seems that NSLog does not participate for that method. Any

vb.net - I am trying to make a history for a text to speech program and the program is getting an error with the code I'm using -

Image
OK, I should start this code to use it: Private sub-button 1_Click (sender, object ARGS as object) handles button 1. Click Dummy Sipi SAPI = CreateObject ("SAPI.spvoice") SAPI.Speak (RichTextBox1.Text) My.Settings.History.Add (RichTextBox1.TextStoString) End Sub Then I submitted the application. But then I click on the button 1 I get this: It works just fine without the code for history, maybe there is a better way to do this, please help. This is because saving your settings wrong See examples given below ... Change and save settings My.Settings.History = RichTextBox1.Text My.Settings.Save ()

ruby - Chef recipe compile error trying to create a jdbc connection pool -

I'm getting a strange compilation error, which I did not understand. I have seen other examples and I have not found anything wrong in my code, but it will not compile. Here is the dark red color code: glassfish_jdbc_connection_pool 'WebRConnectionPool' domain_name 'staged' password_file password_file Safe false datasourceclassname 'com.mysql.jdbc.jdbc2.optional. MysqlConnectionPoolDataSource 'contains restype' javax.sql.ConnectionPoolDataSource 'isconnectvalidatereq true validationmethod' table 'validationtable' DATABASECHANGELOG 'Ping true description' Webarc connection pool 'property {"user" => "User"} true end echo Here is an error: c: \ devenv \ src \ chef-repo> Uploading knife cookbook is uploading glassfish glassfish [0.5.28] Fatal: Fatal :: C: /devenv/src/chef-repo/.chef/../ Cooking Books / glassfish / recipes / create_domai n.rb Cookbook file recipes / create_domain.rb is a dar

mysql - SQL query, AVG and COUNT on multiple tables -

Image
I need a query, the query I've used for some reason is the way I want it Does not have all the tables included in the query. Here's the query Which I want: Show a list of books with the number of their average rating and its recommendations The result should be: I have already tried: SELECT book.isbn , [Average rating] as AVG (ratings.rating), [number of recommended] in the form of COUNT (recommend.isbn) INNER from the book Include in book.isbn = recommend.isbn Get ratings on the INNER book I Isbn = Rates.isbn GROUP BY book.isbn But this did not work, AVG rating works great Does not, but # of recommendations, it is not the struggle with the rating table. Here's the result: and for # recommendations: SELECT book.isbn, COUNT (recommend.isbn) AS [Number of recommended] questions Join INNER from a book.isbn = recommend.isbn group by book.isbn Here is the result: So I want a query tie two scenes in one view Well, you can combine t

Qt Write to UDP Socket on Linux Machine and Windows Read from Socket with Python -

=========== Update: =========== < / P> Now I am using Broadcast IP 10.6.0.3 and a higher port, 5789. I can see the traffic in Windows Network Monitor, but still can not find Python to read it. === ======================================== ==== I have a Linux machine on which a hello message is writing a UDP socket using the IP address 10.6.0.2 Qt and QuadSpocket socket. I also have a Windows machine that I want to read the 'Hello' message through Python. With my QT code, I can see that the data is being written, however, the Python program on Windows always sits on "Waiting for data" windows machine can actually ping 10.6.0.2. What am i doing wrong Test Sequence: UDP Broadcast Client; // Bind Socket Sleep (10); // During this time, the startup Python Program client. WriteData (); // Hello message type Qt output: To start the UDP socket fixed IP address: "10.6.0.2" successfully bound: QHostAddress (" 10.6.0.2 ") Port: 5678 N

itertools - Permutations in alphabetical order -

I want to get a list of every schedule from AAAA to ZZZZ, and I want to make the list alphabetically I am how can I do this? You can solve it like this: alphabet = [Xrange (commodity ('A'), Ord ('Z') + 1) [CRR (Item)) for the item creates alphabet from capital A to capital Z. perms = itertools.product (alphabet, repeat = 4) creates a generator that will convert all 4-character permutations to 'AAAA ' to ' ZZZZ ' result = sorted (for code in' '. Code> Sort the results (note that product returns a 4-character alphabet, so we need to combine it with the described code as join .

sql - What's the code in turning an ID into an autonumber data type? -

I am using a Visual Studio 2010 and Microsoft SQL Server 2005. I want my text box to make an auto number data type Equip_No I have already followed these steps Set the property: Identification specification = yes (identity) = yes identification increase = 1 identification seed = 1 < / Code> Please help me any kind of gratitude. Thanks! I do not think you can convert an existing column to identity in Sqlserver-2005. / P> You can however add a column with identification and then manipulate values ​​and change the seeds add autoincremental columns ALTER TABLE yourtable ADD newid INT identification (1,1) It is possible to change your values ​​in your ID column, however you would like SET IDENTITY_INSERT Manipulate your hands here, example: Set up your host New ID = Cleaning SET IDENTITY_INSERT yourtable off BCC Investigators ( 'YourTable', RESEED, & lt; at least one value from the maximum value & gt;) ;; replace the old

Batch for loop cannot set variables -

To work through each row in the file named estrat name. Then I grab the line and divide it on semicolon and print the text before semicolon and after semicolon. My file looks something like this ... Username: Password username2: password2 username3: My current code This is: setlocal ENABLEDELAYEDEXPANSION file = alts.txt for / f "tokens = *" %% (% file%) in% (set str = %% set user " Name =% str :: = "^ and REM #% set" pass =% str: *: =% "Echo username =% username% pass =% pass%) stop If someone will be sufficient enough to show me my error and in fact the error Will appreciate it a lot to fix. @echo off setlocal ENABLEDELAYEDEXPANSION set for file = alts.txt / f "tokens = 1,2 delims = "%%" (% file%) in (set "$ user = %% A" set "$ pass = %% B" echo username =! $ User! Pass =! $ Pass!) Stop % Username% Be careful using . This is the system variable you can test by typing echo% username% in CMD p

java - ArrayList output to JTable -

Yes, I'm gone, yes I've read, yes, I'm still trapped I have an ArrayList of objects in class, I am returning an ArrayList of objects in class A, by calling a method from A. B. (in the same return type :) in CLassB, I do all the processing and storing objects. Features in an array of class types of objects class B: classb object = new class (B); ArrayList & LT; ClassB & gt; ArrayOfObjects = New ArrayLight & lt; & Gt; (); Int count = 0; While (calculation and lieutenant; 10) /// Many things are going on here but the general concept is this; Object.attribute1 = "object.attribute2 =" read something in the object, read something in the "object.attribute2 =" object. Object 3 = "Read something in the object". Object object = 4 "Array objects in some data read." ); Count ++; } Category: Array list & lt; Class B & gt; ArrayOfObjects = ClassBObject.method (); String [] column = {"column 1", &qu

sql server - Trying to understand erratic behavior of DB Connection used by Dapper -

How Dapper handles DB connections, and why DB connection is not being handled properly, I need some help in understanding better. I I have coded around various possible cases in my code, I'm checking to see if the _connection is zero, and accordingly it is making a new connection accordingly. On the request of the requests, I think that the connection is sometimes open, and the second time I think the connection string is missing in the object (it is useless, but not set it on tap) I handle these cases accordingly But I would like to understand why these are different states in the connection, and it has not been settled even if the customer has explicitly used the user to wrap the code code C is implementing the statement whether it is in dealing with ADO.net connections, is Dapar a side effect or is there a problem with my code? Connection Management Code Public Class DatabaseContorts: IDBS Consort {Private Reddone String _ Concert String; Private DB connection connec

Getting the current user object asp.net MVC 5 -

I am confused about user authentication in ASP.NET MVC5 ... I am referring to this article: And this question: ... and know exactly where the code is in my identity identity code here < / P> namespace attempt CS_INSTRUCTION. Models {public class ApplicationUser: IdentityUser {public string first name {get; Set; }} Public Sector MyUserStore: IUserStore & lt; ApplicationUser & gt; {} Public Square ApplicationDbContext & lt; ApplicationUser & gt; : IdentityDbContext & lt; ApplicationUser & gt; {Public ApplicationDbContext (): Base ("DefaultConnection") {}}} And in the controller I am trying to get UserObject with this: Var User Manager = New User Manager & lt; ApplicationUser & gt; (New MyUserStore & lt; ApplicationUser & gt; (New ApplicationDbContext ())); Var user = userManager.FindById (User.Identity.GetUserId ()); This gives me the most compilation errors in the form of effort_4. Models MyUserStore & l