2018-10-22         Dinah

Requiring authentication file from lib with cucumber

I am trying out Cucumber for the first time and I've come accross an issue. I am try to use RyanB's nifty authentication generator, but it seems I can't use the helper methods when running my Cucumber features.Part of my feature giving me problems:when I am on the new book page # features/step_definitions/web_steps.rb:18 undefined local variable or method `current_user' for #<Cucumber::Rails::World:0x13a3b2a> (NameError) ./features/support/paths.rb:15:in `path_to' ./features/step_definitions/web_steps.rb:19:in `/^(?:|I...

 ruby-on-rails                     3 answers                     1 view
 2018-10-22         Dinah

Prestashop unit price decimal configuration

I've a problem with my prestashop v1.7.2I want to set the unit selling price with 4 decimals. In prestashop I can set this configuration but all my price are affected. I just want the unit selling price... I try to modify my product controllers to change number format but prestashop has the last word.Any ideas ? Thank's ! You need change it from /translations/cldr/.Edit the file main--xx-XX--numbers, where xx-XX is the language you want to change, this mean, if you have more than one language, you need do this change for each one.Locate a code like this "accounting":"\u...

 prestashop                     1 answers                     6 view
 2018-10-22         Dinah

use of YAML blocks in rails i18n locale files

So I'd like to be able to add a longer block of text to a YAML locale file in Rails.However, the YAML parser gives syntax errors for blocks that appear to be fine! I've read through the Ruby YAML cookbook and it seems like these examples below should all work, but they don't.config/locales/tx.ymlThis one works fine:tx: states: show: state_population: "2009 est. pop.: 24,782,302 (cit. <a href=\"http://quickfacts.census.gov/qfd/states/48000.html\">Census.gov</a>" state_pop_per_upper_chamber_member: "Each senator serves a four-year term and represents...

 ruby-on-rails                     1 answers                     58 view
 2018-10-22         Dinah

Return emoji name instead of emoji

I have this: '1⃣' (without the single quotes) in Python 3, which is :one:. Is there a way I could get the emoji (like the one above) and print the corresponding emoji (in this case :one:) name instead? I'm getting the emoji from a discord.py reaction object. In your case, that emoji is a two-character string. You can get the number by getting the first character of the string:char = '1⃣'print(char[0]) # 1With another emoji that isn't just two characters, you can use the unicodedata module:import unicodedatachar = '❤'name = unicodedata.name(char)print(name) # HEAVY BLACK...

 python-3.x                     1 answers                     10 view
 2018-10-22         Dinah

How can the Object class be a super class of subclasses?

Fact 1: Java does not support multiple inheritance.Fact 2: Object is a superclass of all other classesIf I have a class Parent and a class Child which is inheriting the class Parent:class Parent {}class Child extends Parent {}In this case, how will the class Child inherit the Object class, if Java does not support multiple inheritance?How is the relationship between these three defined?Option 1:Option 2: It's Option 2. If you define a superclass, that will be the immediate superclass of your class. If you don't define one, Object will be the immediate superclass.class ...

 java                     10 answers                     83 view
 2018-10-22         Dinah

Realtime sync between Oracle db(source) and Mongodb(destination)

Is it possible to have a real time sync between a heavy Oracle database and mongodb? Has any one tried this?I saw a site - Keep MongoDB and Oracle in syncHere they have mentioned having triggers on the oracle tables, my doubt is that will this slow the applications already running on the Oracle database. Will this replication cause the applications to slow down or bring down the oracle database's performance? The right solution would involve Change Data Capture from Oracle. This does not require triggers on oracle and thus won't effect performance. There are several tool...

 mongodb                     1 answers                     53 view
 2018-10-22         Dinah

django-grappelli and rare lot of errors

I'm using Django-grappelli in my project, but Django is send me a lot of errors to my email about some files that Django didn't found...but I don't know from where is calling this files...some time files .aspx (??)Here is a image with the error list in my inboxalt text http://img94.imageshack.us/img94/1514/djangograppellierrors.jpgHere is a error detail:Traceback (most recent call last): File "/home/*******/django/lib/python2.5/django/core/handlers/base.py", line 92, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/home/*******/dja...

 django                     1 answers                     83 view
 2018-10-22         Dinah

com.google.android.c2dm.intent.RECEIVE android 9 (sdk 28) doesn't work

I'm having issues with the new Android-SDK 28 from Google. (Android Pie)I'm trying to send a c2dm cloud message (push notification), everything works fine on API level lower or equal to 27 (tested with real phones and simulator), but on API level 28, it fails - the onReceive is not called on a subclass of BroadcastReceiver that handles the broadcast.I've been reading everything I could find on this issue, but to no avail, any useful hints are welcome.EDIT2: uploaded example project: https://ufile.io/qb3uuYou need to edit the SENDER_ID in GCMIntentService with your key. As f...

 android                     1 answers                     24 view
 2018-10-22         Dinah

Pygame Window Freezes after starting game_loop()

Hey Its Max I am having a problem, my game_loop() runs for about half a second then freezes, it doesn't say not responding or anything just is completely unresponsive to all buttons, anyone know what i have done wrong? I am defining game_intro() and saying that if I click enter [RETURN] start game_loop() and intro=False.ANY HELP IS MUCH APPRECIATED :)def game_loop():global bot_x1global bot_x2global bot_y1global bot_y2global xglobal y global runningpygame.display.update()clock.tick(60)pygame.display.update()if running: pygame.display.update() pygame.display.update() ...

 python                     1 answers                     87 view
 2018-10-22         Dinah

bigquery for time series data

I have a table like this. The row includes a timestamp and count as measurement of a value at that time. Row timestamp count1 2018-08-20 04:01:39.108497 312 2018-08-20 04:01:45.109497 453 2018-08-20 04:01:49.109497 444 2018-08-20 04:02:39.102497 335 2018-08-20 04:02:45.101497 416 2018-08-20 04:02:49.103497 227 2018-08-20 04:03:39.102497 238 2018-08-20 04:03:45.102497 429 2018-08-20 04:03:49.103497 41I would like to aggregate this into this as a minute level aggregation as avg(count)Row timestamp count1 2018-08-20 04:01:00 402 2018-08-20 04:02:00 323 2018-08-20 04:03:00 35P...

 sql                     2 answers                     66 view
 2018-10-22         Dinah

Finding differences in queries using two criteria

I'm trying to find a way to find a way to compare two queries that use a combine sent of criteria. In this case we have Prefixes (Two letter code like DA) and Pack number 1234567. In the query I've created a field that combines these two things so it appears 1234567DA this is done with each of the queries from the separate tables they are pulled from. The idea is that if this is in one table and not the other it would show up as "False". I tried to use an Unmatched query but that doesn't seem to work. What I have currently is as follows: SELECT [1LagoTest].Prefix, [1...

 sql                     3 answers                     10 view
 2018-10-22         Dinah

SQL Server iterating through time series data

I am using SQL Server and wondering if it is possible to iterate through time series data until specific condition is met and based on that label my data in other table?For example, let's say I have a table like this:Id Date Some_kind_of_event+--+----------+------------------1 |2018-01-01|dsdf...1 |2018-01-06|sdfs...1 |2018-01-29|fsdfs...2 |2018-05-10|sdfs...2 |2018-05-11|fgdf...2 |2018-05-12|asda...3 |2018-02-15|sgsd...3 |2018-02-16|rgw...3 |2018-02-17|sgs...3 |2018-02-28|sgs...What I want to get, is to calculate for each key the difference between two adj...

 sql                     3 answers                     29 view
 2018-10-22         Dinah

I got some problem on Iot hub and corporate network's proxy

I tried to connect to IOT Hub with Asp.net core but I could not to get devices from IOT hub. When i tried to connect internet directly I can get devices from IOT hub. So i think the reason might be corporate network's proxy. Could you please consider again and let me know if you know anything. Thank you You can add proxy setting explicitly to the application. For Registry Manager try the following code:using System.Net;// s_proxyServerAddress= ...// s_connectionString = ...HttpTransportSettings customTransportSettings = new HttpTransportSettings();customTransportSetting...

 asp.net-core                     1 answers                     32 view
 2018-10-22         Dinah

Strange 403 error on trying to get metadata for Office 365 groups

We're trying to get Office 365 group metadata, by doing http request : https://graph.microsoft.com/v1.0/groups/?$select=description,displayName,groupTypes,mail,mailEnabled,mailNickname,onPremisesLastSyncDateTime,onPremisesSecurityIdentifier,onPremisesSyncEnabled,proxyAddresses,securityEnabled,visibility,allowExternalSenders,autoSubscribeNewMembers,isSubscribedByMail,unseenCountwhile on some customer accounts it's working fine, on another we're getting :ERROR 403 - ErrorAccessDenied ,message:Unified groups aren't supportedwhere user credentials that used to call belongs to t...

 office365                     1 answers                     55 view
 2018-10-22         Dinah

File and folder permissions after changing sqlserver service account

I read this article and concluded that the file system permissions needs to be manually set when I change the service account for my SQL server instance. So I changed the service account for my SQL server instance to a brand new local account via SQL Server Configuration Manager and got surprised that the SQL server service can start, even though I haven't set any file or folder permissions for the new account yet. So the service now runs as the local user, but that user does not have access to the default SQL data folder when I check from Windows. I can also read and write...

 sql-server                     2 answers                     30 view
 2018-10-22         Dinah

Why does the uploadprogress for Alamofire never reach a completion of 1.0 during upload?

I am able to successfully upload files using alamofire. However, I am trying to track the progress of the upload. What I am finding is that, although the upload is successful, as I can see my files successfully uploaded on to the server, the progress tracker never reaches 1.0. It tends to end between 8.00 - (under 1.0) but never reaching 1. This presents problems as I need to handle the completion of the file upload. Alamofire.upload( multipartFormData: { multipartFormData in for(key, value) in sendParamters{ multipartFormData.append((va...

 ios                     1 answers                     75 view

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