2018-10-22         Ula

Authentication failing on production server

On my development machine I can login fine, but once on production, authentication fails for the base user created in the migration. I can reset my password and upon doing so I am auto logged in, but when I logout and try to login again using the newly entered password, once again it tells my I have a bad email and/or password. Any ideas to why this would be?=== Updateclass User < ActiveRecord::Base # default devise modules devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable ... end I have the same problem on m...

 ruby-on-rails                     1 answers                     80 view
 2018-10-22         Ula

How to rename any component in a flow developed using Oracle Integration Cloud Service (ICS)?

I've developed a simple flow in Oracle Integration Cloud Service (ICS) release 13. But there is no option to rename or delete any components that are being added to the flow.below is the screenshot In the above flow trying to rename the 'AccountCreateEvent' but didn't find any option for that. Short AnswerIf you are using Integration Cloud Service or Oracle Integration Cloud there is no functionality in the web interface that lets you change the name of an adapter inside an integration. Those names are merely for documentation purposes and do not provide any functional v...

 oracle                     1 answers                     66 view
 2018-10-22         Ula

Plotting the frequency associated with bigrams

I have frequency of each bigrams of a dataset.I need to sort it by descending order and visualise the top n bigrams.This is my frequency associated with each bigrams{('best', 'price'): 95, ('price', 'range'): 190, ('range', 'got'): 5, ('got', 'diwali'): 2, ('diwali', 'sale'): 2, ('sale', 'simply'): 1, ('simply', 'amazed'): 1, ('amazed', 'performance'): 1, ('performance', 'camera'): 30, ('camera', 'clarity'): 35, ('clarity', 'device'): 1, ('device', 'speed'): 1, ('speed', 'looks'): 1, ('looks', 'display'): 1, ('display', 'everything'): 2, ('everything', 'nice'): 5, ('nice', ...

 python-3.x                     1 answers                     46 view
 2018-10-22         Ula

How to copy a directory in a Makefile?

I have a directory images/ that I want to copy to build/images/ from within a Makefile. The directory might contain multiple levels of subdirectories. What would be the most elegant way to do that? I want:avoid a full directory copy on each make run (i.e. no cp -r)guaranteed consistency (i.e. if a file changed in images/ it should be automatically updated in build/images/)avoid to specify a rule for each image and each subdirectory in the Makefilesolve the issue within make, so no rsync or cp -u if possibleI am using GNU make, so GNU specific stuff is allowed. Well, I'd ...

 directory                     1 answers                     73 view
 2018-10-22         Ula

Evernote - OAuth access token - Python

I am going through Evernote OAuth documentation. Was not able to get the temp token. It was resolved after receiving help here. Now, struck at the last step of this flow while receiving Access token. Could you someone let me know what could be the potential issue here?Its following the similar below to the first one to retrieve the access token. Not sure if there is anything I miss.import timeimport base64import randomimport uuidimport urllibimport collectionsimport urllib.parseimport hmacimport hashlibimport binasciiimport requestsdef escape(s): return urllib.parse.quot...

 python                     1 answers                     67 view
 2018-10-22         Ula

Python: Remove duplicates for a specific item from list

I have a list of item, where I want to remove the occurrence of any duplicates for one item, but keep any duplicates for the rest.I.e. I start with the following listmylist = [4, 1, 2, 6, 1, 0, 9, 8, 0, 9]I want to remove any duplicates of 0 but keep the duplicates of 1 and 9.My current solution is the following:mylist = [i for i in mylist if i != 0]mylist.add(0)Is there a nice way of keeping one occurrence of 0 besides the following?for i in mylist: if mylist.count(0) > 1: mylist.remove(0)The second approach takes more than double the time for this example.Cla...

 python                     9 answers                     80 view
 2018-10-22         Ula

How could I get offset of a field in flatbuffers binary file?

I am using a library, and the library requires me to provide the offset of the desired data in the file, so it can use mmap to read the data (I can't edit the code of this library but only provide the offset). So I want to use flatbuffers to serialize my whole data because there isn't any packing and unpacking in flatbuffers, (I think) which means that it is easy to get the offset of the desired part in the binary file.But I don't know how to get the offset. I have tried loading the binary file and calculate the offset of the pointer of the desired field, for example, the a...

 mmap                     1 answers                     21 view
 2018-10-22         Ula

SQL Query with accents from Foreign Languages

I have a simple column filled with words, many from foreign languages, I need to query based on the "English" letters, ie E, e, é, è, etc should be returned for query of "E"so école should be returned as a result which exists in the database when I query for "E"I can't really find a way to Google this, so help would be greatly appreciated.I'm using MSSQL 2005. Change your collation to be accent-insensitive. [XXX]choose a collation which is insensitive to accented charactersexamplecreate table bla(Col nvarchar(30))insert bla values (N'E')insert bla values (N'e')insert ...

 sql-server-2005                     2 answers                     46 view
 2018-10-22         Ula

How to split data from one column to another columns in same table?

I have an column name phone1 which contain phone#0345123456,0321456780345221123,0324433320347886543,0388755320345776767I have to seperate Phone# after "," in another column name phone 2for example 0345123456 in phone1 032145678 in phone2 from sample data it seems to me you need below select SUBSTRING_INDEX(phone#, ",", -1) as phone1, SUBSTRING_INDEX(phone#, ",", 1) as phone2 from table1 where phone# like '%,%' union all select phone# as phone1, '' as phone2 fraon table1 where phone# not like '%,%' [XXX]using substring_index you ca...

 mysql                     3 answers                     46 view
 2018-10-22         Ula

Is there any way to flush output from PL/SQL in Oracle?

I have an SQL script that is called from within a shell script and takes a long time to run. It currently contains dbms_output.put_line statements at various points. The output from these print statements appear in the log files, but only once the script has completed.Is there any way to ensure that the output appears in the log file as the script is running? Not really. The way DBMS_OUTPUT works is this: Your PL/SQL block executes on the database server with no interaction with the client. So when you call PUT_LINE, it is just putting that text into a buffer in memor...

 sql                     5 answers                     11 view
 2018-10-22         Ula

Hints of Visual Studio Does Not Show the "Dispose" method of SqlDataReader

Hints of Visual Studio do not show the Dispose method of SqlDataReader.This screenshot is captured from my Visual Studio. You can see Dispose method is missing.But I find Dispose method in this Microsoft documentation.SqlDataReader ClassPlease help. Many thanks. Dispose has [EditorBrowsable(EditorBrowsableState.Never)] defined on the method. Thus, Visual Studio "hides" it from you (even though it will compile just fine). [XXX]

 c#                     1 answers                     23 view
 2018-10-22         Ula

Can't open IntelliJ in terminal, Ubuntu Linux 16.04

I've successfully installed IntelliJ IDEA (community edition) and Java (Version 10.0.2) on my Ubuntu Linux 16.04. However, I want to be able to open files on the terminal (similar to being able to use 'code .' to open files in VS Code).I did some research, and it says you need to open IntelliJ, go to "tools", and there will be an option that says "create command-line Launcher". However, when I go there, that option isn't present. The really strange thing is that if I go to settings -> menus and toolbars -> main menu -> tools, the "command-line launcher" function IS prese...

 ubuntu                     2 answers                     102 view
 2018-10-22         Ula

PayPal TLS Test URL - PHP curl SSL protocol error

I'm trying to test against a new PayPal test endpoint: https://tlstest.paypal.com.See the very bottom of this page: TLS 1.2 and HTTP/1.1 Upgrade Microsite (Verify your...).I'm using PHP (5.3.28) and curl (7.30.0 - OpenSSL/0.9.8y - libssh2/1.4.2) on Windows Server 2008 R2 and IIS 7.5:$ch = curl_init();curl_setopt($ch, CURLOPT_URL, 'https://tlstest.paypal.com');curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_FAILONERROR, true);curl_setopt($ch, CURLOPT_SSLVERSION, 6); // CURL_SSLVERSION_TLSv1_2$result = curl_exec($ch);echo 'result = '.$result.'<br>...

 php                     1 answers                     89 view
 2018-10-22         Ula

Azure does not read web.config settings

I have to deploy my (old school) application to Azure using the Web deployment tools/Azure Web Accelerator. I'm not an Azure pro and I havn't set up the whole Azure Publishing enviroment.Still i can publish my application with Visualstudio to Azure. Never the less when I try System.Configuration.ConfigurationManager.AppSettings["setting"] I get an empty value.Local on the webapplication I get a value.So I know that 'RoleEnvironment.IsAvailable' is true and localy isn't still that's the only lead I have. Any help is welcome Thanks guys but I've fixed it. It's quite simple af...

 azure                     1 answers                     27 view
 2018-10-22         Ula

The process could not connect to Subscriber 'xxxxxx'

i have configured transnational push replication from SQL Server 2014 to Azure SQL Databasepublisher DB is also configured for mirroring.i get The process could not connect to Subscriber 'xxxxxx'when i see in replication monitor in tab "distributor to subscriber"i have used windows user credential everywhere other then for connecting to azure sql database.note: same setup from new server to same azure db. it works so may be some issue with my production server... i am not sure what?i got opened all ports listed here TCP: 21,80,139, 445UDP: 137, 138and also 1433 i am able to...

 sql-server                     1 answers                     10 view
 2018-10-22         Ula

Regex match string which does not fully consist of angular expressions

I've the pleasure to find all strings in our projects which are not angularjs expressions because we're going multi language (so every string which is not fully between curly braces).What I wanna do is build a regex which matches all strings, which have no angular expressions (or part of the string is no angular expression).The var names describe which should match (yes) and which shouldn't (nope).var yes = "test";var nope = "{{xyz}}";var yes = "test {{xyz}}";var nope = "{{::xyz}}";var nope = "{{xyz}} {{abc}}"; //as whitespace is okayTried a lot of different stuff using neg...

 javascript                     2 answers                     24 view

Page 1 of 144  |  Show More Pages:  Top Prev Next Last