[Solved] How to improve performance of this query [closed]

Few ideas below Remove as many left joins as possible. Use inner joins where-ever possible. Remove sub-query to get ISerialNumber. Get this later in wrapper query. Create indexes on columns in the WHERE clause if not already existing. Do not use this way of date comparison. Imagine this conversion for every row in your result … Read more

[Solved] What is the equivalent code of SQL query in C# with linq to datatable?

I used this Code and it Worked for me. DataRow row = dt.AsEnumerable().FirstOrDefault (r => (DateTime)r[“date”] == timeToCompare.Date & r.Field<string>(“plannum”) == “0995” & tp >= r.Field<TimeSpan>(“MorningStart”) & tp < r.Field<TimeSpan>(“MorningEnd”)); And then using this to get values : sh_starttime = row[“MorningStart”].ToString(); solved What is the equivalent code of SQL query in C# with linq to … Read more

[Solved] How does this code works in c++? [closed]

If the two strings are equal, there is no “uncommon subsequence”. If they are not equal, neither one is a subsequence of the other, but each one is a subsequence of itself, so each one is an “uncommon subsequence”. The longer of the two is the longest “uncommon subsequence”, and its length is the correct … Read more

[Solved] Explain Output in For loop C program [closed]

the condition here is implicit. C considers as true every integer not null. the ++i syntax is applied before the condition is evaluated Therefore the program run as follows: start: i=5 first loop condition (++i) => i=6 second loop iteration operation (i-=3) => i=3 condition (++i) => i=4 i is evaluated to true third loop … Read more

[Solved] Convert month and year columns to a date column with additional string concatination

Assuming your are using date and MSSQL2012+: SELECT UPPER( FORMAT(CONVERT(datetime, ‘2017-02-01′,121),’MMM’)) + ‘-‘ +RIGHT(CAST( YEAR( CONVERT(datetime, ‘2017-02-01’,121)) AS VARCHAR(4)),2) M_DELIVERY , ‘DELIVERY FOR ‘ +UPPER( FORMAT(CONVERT(datetime, ‘2017-02-01′,121),’MMM’))+’ ‘+ CAST( YEAR( CONVERT(datetime, ‘2017-02-01’,121)) AS VARCHAR(4)) AS Description Other way(using numbers and not date): (you can change months name abbrev.) SELECT SUBSTRING(‘GENFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC’,1+(MONTH_NUMB-1)*3,3)+’-‘+ RIGHT(YEAR_NUMB,2) AS M_DELIVERY , ‘DELIVERY … Read more

[Solved] Suppress NPE Warning for getSupportActionBar() when called inside Fragments [duplicate]

Because you don’t put checks for NullPointerException ((AppCompatActivity) getActivity()).getSupportActionBar() gives actionbar object but you are calling directly by ((AppCompatActivity) getActivity()).getSupportActionBar().setDisplayHomeAsUpEnabled(false) that is why system gives warning for NullPointerException. if((getActivity()) != null) { ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar(); if(actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(false); } } Put above code. Your warning will remove. 1 solved Suppress NPE … Read more

[Solved] Generating a list of Strings in Obj C [closed]

I cannot possibly imagine how yielding the string image5image4image3image2image1.jpg in string3 in your “answer” to your own question could be construed as useful or a solution (I pasted your code into an Xcode Foundation tool project w/NUMIMAGES set to 5). It seems that Objective C jumps thru hoops to make seemingly simple tasks extremely difficult. … Read more

[Solved] How to install Laravel 5.4?

There are multiple ways to install Laravel. One of the simplest ways would be to install through composer with the command: composer create-project –prefer-dist laravel/laravel MyAppName. All of the documentation for installing laravel 5.4 can be found here: https://laravel.com/docs/5.4/installation The new features are covered on laracasts and on the docs. Here is a link to … Read more

[Solved] How to ‘encrypt’ a file

If your goal is just to exchange the letters in a string with others that you specify, then the solution is the following: decrypted = ‘abcdefghijklmnopqrstuvwxyz’ #normal alphabet encrypted = ‘MNBVCXZLKJHGFDSAPOIUYTREWQ’ #your “crypted” alphabet #Encription text=”cryptme” #the string to be crypted encrypted_text=”” for letter in text: encrypted_text += encrypted[decrypted.find(letter)] print encrypted_text #will print BOWAUFC #Decription … Read more

[Solved] Recovering Python modules

You have to go to the settings in there and if there is no way of finding them then you can go onto the python website and reinstall them from there 🙂 solved Recovering Python modules