daniele daniele

1

votes
1

answer
38

views

Duplicate a single character in a file

I am trying to duplicate a single character in input file. The problem is that my character is '\' and the C compiler reads it as escape character and gives me error. Any help is much appreciated! thanks! int main () { char a; FILE* f1; f1=fopen('C:\\Users\\myusr\\Desktop\\test.txt', 'r+'); do { a=...
Daniele Foti
1

votes
1

answer
1.7k

views

Firebase Cloud Messaging: how to send data message to all users? [duplicate]

This question already has an answer here: How do you send a Firebase Notification to all devices via CURL? 6 answers I would like to send data messages to all users. Is it possible to do it programmatically, without using the Firebase Notifications Console? The problem with the Console is that the...
Daniele B
1

votes
2

answer
206

views

Android Build Error: Attribute Signature requires InnerClasses attribute. Check -keepattributes directive

I'm facing this error when trying to build the app in release mode. Error: Attribute Signature requires InnerClasses attribute. Check -keepattributes directive My proguard-rules.pro line looks like this: -keepattributes Signature what InnerClasses is the compiler referring to? What am I omitting?
Daniele
1

votes
0

answer
36

views

Vectorize quintuple for loop in numpy, with non-trivial indexing

I have a series of nested for loops, used to populate a rank-3 array as follows: S = ... # Some number N = ... # Some other number an_array = np.zeros((S, N * N, N * N)) for s in range(S): for i in range(N): for a in range(N): for j in range(N): for b in range(N): an_array[s, i * N + a, j * N + b]...
Daniele Grattarola
1

votes
2

answer
223

views

MongoDb connector 5 on Mule4 error after first connection

i'm moving a flow on the new Mule runtime 4, but i have a problem with the mongodb connector, version 5. After the first connection which works great, from the second on it throws the error: ERROR 2018-01-15 10:37:53,319 [[MuleRuntime].io.02: [Payments].PaymentsFlow.BLOCKING @6f02d89b] org.mule.run...
Daniele Cervi
1

votes
0

answer
36

views

Google api - Different result get from api/browser

If I open this URL in browser https://maps.googleapis.com/maps/api/place/textsearch/json?query=STUDIO+DAL+BON+SRL+ASOLO+FRAZ.+CASELLA®ion=IT&key=api_key I can see one result for query. If I try to get same thing from code (with the same URL), I obtain ZERO RESULT...why? WebClient wsClient = new W...
Daniele Z.
1

votes
0

answer
161

views

DHCP server causes slow docker-compose operations

[Updated as I have found what is causing the problem; now I need to know why.] When I use a custom DHCP server on my network (a Raspberry Pi running Pi-hole) Docker projects on my system take up to two minutes to start. With networking on my computer turned off, or using the DHCP server on my cable...
Daniele Procida
1

votes
0

answer
290

views

Vectorize Conway's Game of Life in pure numpy?

I'm wondering if there is a way to implement Conway's game of life without resorting to for loops, if statements and other control structures typical of programming. It should be pretty easy to vectorize for loops, but how would you convert the checks on the neighborhood to a matrix operation? The...
Daniele Grattarola
1

votes
0

answer
196

views

Logstash create elasticsearch document with array as property and put new element to array

I have a document with some children inside, something like: parent : { 'id' : 1, 'name' : 'test', 'children' : [ { 'idchild' : 1, 'name' : 'c1'}, {...} ] } I want to add the children to the already existent parents. I have a logstash file to read all the parents. It's write the document in elastics...
Daniele Licitra
1

votes
0

answer
339

views

Thymeleaf + AngularJS - Spring Boot Application

reading many articles about Spring boot Application, use of Thymeleaf (Server side presentation) and Angular 1 (Client side) i have found different opinions. My question is: Can I 'mix' use of Thymeleaf and Angular? Not if it is possible, becauase it is, i want know if is correct and I can have adva...
Daniele Buratti
1

votes
0

answer
64

views

JSF don't populate Managed Bean

i've got a xhtml that before was a jsp. Before, when it was jsp, the page insert the data inside the bean. Now the page recognize only one field The method of the bean and the annotation @ManagedBean(name = 'utente') @RequestScoped public class UtenteBean implements Serializable { WebServiceAttache...
Daniele Cosentino
1

votes
1

answer
83

views

HTML parsing Android Jsoup

im kinda new to android, im trying to use jsoup to parse a html page to gather some info from a page. i would like to insert a url via pop-up (altertbox) usinga method called loadwebsite: private void loadWebsite(){ AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle('Inser...
Daniele Asta
1

votes
3

answer
38

views

Jsoup Html parsing query

im a newb with Jsoup, i would like parse this code: (27 apr 2018 19:17:55 CEST) in order to get : 27 apr 2018 19:17:55 CEST any tips?
Daniele Asta
1

votes
2

answer
375

views

Spark update cached dataset

I have a sorted dataset, which is updated (filtered) inside a cycle according on the value of the head of the dataset. If I cache the dataset every n (e.g., 50) cycles, I have good performance. However, after a certain amount of cycles, the cache it seems to not work, since the program slows down (I...
Daniele Foroni
1

votes
1

answer
40

views

How to improve groupby/apply efficiency

I have a pandas DataFrame with years as index, one column with stock ID, a second column with returns. The DataFrame has ~200k rows. I want to add 3 additional columns, with the cumulative returns of each stock in the next 5, 10 and 20 years respectively. To this purpose, I am grouping by the ID col...
Daniele
1

votes
0

answer
55

views

Open a xls file with SAX approach in .Net and adding several rows (about 100K)

I need your support. I need to open a .xls file with c# adding about 100k of rows. I tried several approach, but all approaches run me into memory error, except for OpenXML with SAX Approach. This one works for me. My problem is I'm able to create excel with 100K rows from the scratch (and it works...
daniele
1

votes
2

answer
96

views

Error with GPS location on my device

I'm trying to get my device location and add a marker on a Google Map. If I start my application on the virtual device it shows me in the log an unusual location in the USA (but I live in Italy) but not the Map and the marker and when I start my application on my physical device it doesn't found the...
Daniele Giongo
1

votes
0

answer
177

views

*ngComponentOutlet - use the injector of the dynamically generated component instance

I have two components: WorldComponent and ContinentComponent. They are arranged in the main template like this: Then, there is a WorldService provided at the WorldComponent's level, responsible to count the number of continents in a world. The WorldComponent uses its instance of WorldService to prin...
Daniele Repici
0

votes
1

answer
50

views

get 404 when trying to access files directly [duplicate]

This question is an exact duplicate of: HTML page with images using .net WebApi 2 answers I have a WebApi project with a folder called 'images'. I want to access the images directly but I keep getting 404 with message 'No type was found that matches the controller named 'images'.' I did the same th...
Daniele Lewis
1

votes
0

answer
149

views

Sharded mongodb cluster use only one shard

I'm trying to create a sharded mongodb cluster, I have 3 VM to use and I was trying to get the following setup: VM1) Node.js Application + mongos instance VM2) CSRS PRIMARY + Shard VM3) CSRS SECONDARY + Shard I'm not interested in replication but I need sharding because I will have to query over la...
1

votes
1

answer
651

views

PhoneGap Build - Could not get unknown property 'GMS_VERSION' for object of type org.gradle

From one day to another my build is now failing and these are the logs I have got from phonegap build: Total time: 2.61 secs Subproject Path: CordovaLib 'plugman-151 install --platform android --project /project --plugin cordova-plugin-splashscreen --nohooks=.': Fetching plugin 'cordova-plugin-splas...
Daniele
1

votes
0

answer
28

views

Notification not shown when generating request code

I am facing an issue when creating notifications. I am using the AlarmManager to schedule repeating notifications. val requestCode = generateRequestCode(model) val notificationIntent = Intent(context, ReminderBroadcastReceiver::class.java) val pendingIntent = PendingIntent.getBroadcast(context, requ...
Daniele
1

votes
1

answer
166

views

Gradle - configure the output file name of the profile report

When running a Gradle build with the --profile option enabled, the profile report is written to the build/reports/profile folder, and the main HTML file name is profile-$YY-$MM-$DD-$TIME. I would like to change the main HTML file name to simply index.html, so that publishing on Jenkins is easier. H...
Daniele
1

votes
1

answer
21

views

html - Image into text box without the possibility to delete it

I would like to put an image at the beginning of a textbox that enables the user to input a location. The image is called fa-map-marker.png. Here is an image of the textbox: The user should be able to delete the entire string Birmingham, for example, but not to remove or override the image. I had to...
Daniele
1

votes
0

answer
29

views

Spring WebFlow. Pass value from button

Is it possible in Spring WebFlow to pass the value of a button to the flow...? Something like this: and then try to get it into the flow like this: and use it in anothor JSP page? Thanks to everyone could help me. // Daniele.
Daniele Comandini
1

votes
0

answer
50

views

Characters not encoded properly in a Website on plesk

I have already searched on stackoverflow for this issue and i have implemented all the solutions that i have read. I am developing a Spanish Website, all the Spanish chars like for example á and ñ are displayed like � if i upload the website in a server with Plesk and Mysql 5.7 . On localhost an...
Daniele
1

votes
1

answer
41

views

Adsense shows a blank ads despite the size of the banner is fixed

I have a problem with the banners of Adsense. I have a page containing 3 banners with the fixed size 336 x 280. On this page, i see one or more blank ads in a random way. I explain better: Sometimes I can see only one banner working and the other two are blank, sometimes two banners are working and...
Daniele
1

votes
0

answer
405

views

The browser download application/x-httpd-php instead of show the index page

I have recently uploaded a website very similar to the others hosted in the same server, but for this website when i try to access at the homepage with firefox the browser downloads the file application/x-httpd-php instead of show the index page. I have searched on this website for a solution, and i...
Daniele
1

votes
1

answer
113

views

Custom editable field in Woocommerce admin edit order pages into each item

I have a field 'file_url' defined by code for every order item. But i must have to insert also this meta field editable in the backend order page. I can have also another input field into each order item line, i just need an input field to save this data for each order item line.
Daniele Zerosi
1

votes
2

answer
500

views

Modules registration in Prism 7.1

In Prism 7.1, the IModule interface has changed from version 6.3, and now exposes the two methods RegisterTypes (IContainerRegistry containerRegistry) and OnInitialized (IContainerProvider containerProvider). I ask forgiveness, but I cannot understand how I have to register the Views implemented in...
Daniele Prevato
1

votes
0

answer
59

views

MULE 4 IntelliJ resolving xsd schemas

I am trying to use IntelliJ as IDE instead of Anypoint Studio because it runs very bad on windows. I've downloaded the plugin, but I'm having troubles setting up the xsd references of the connectors, it keeps complaining that it cannot find the xsd. The mule xsd are pointing to a location over the i...
Daniele Cervi
1

votes
1

answer
65

views

htaccess - The custom 404 error page is not working properly

EDIT: This question has been solved. Please see my answer. I have the file .htaccess that contains only the following line (I have added a custom 404 error page) ErrorDocument 404 404.php This is the code of the page 404.php: The problem is that if i type in my browser for example the url http://127...
Daniele
1

votes
1

answer
171

views

How can I mock complex (url) API with Retrofit

I need to do something as this website describes: https://blog.davidmedenjak.com/android/2016/11/22/mocking-api-calls.html1 I need to mock my API on certain flavour using some json file, implementing my own OkHttp Interceptor. I'm able todo this with simple url, but how can I do this if the url is m...
Daniele
1

votes
0

answer
60

views

Save calculated records on non-calculated datasource

First of all, really sorry for my english, I'll try to be as clear as possible. From the client I set query parameters of a datasource in a calculated model and reload the datasource. The query script call a server script that create new records for the calculted datasource. At the end I have data c...
Daniele Zappala'
1

votes
0

answer
178

views

Nginx dead but pid file exists

Periodically on my server with Centos 7 and Plesk Nginx stop to work. # service nginx status nginx dead but pid file exists On the Plesk guide there is written that the cause is a Misconfiguration in webserver's config. https://support.plesk.com/hc/en-us/articles/213926725-Websites-do-not-respond-on...
Daniele
1

votes
0

answer
38

views

Can I store the string result of that function and concat it to another string?

I'm reading an array from db and i want to format that to provide a table like text for my telegram bot. I try to use the sprintf php funtion to format the text, but when i try to put the result into a string the result is that any string was putted in the string. This is my array: // This is my com...
Daniele Tentoni
1

votes
1

answer
38

views

Gson.fromJson(json, Custom.class) empty string

i'm developing a small web application. That's my problem: This is executed when a user try to add a new record in my Datatable @RequestMapping(value='/saveJokerRule', method= RequestMethod.POST, consumes= 'application/json', produces = 'application/json') @ResponseBody public String saveJokerRule(@...
Daniele
1

votes
0

answer
48

views

What happen after BackgroundService end his assigned task?

Following the docs i implemented a library that allow to my web apis to create and run tasks in background. Basically, what i do is to create a QueuedHostedService (which inherit from BackgroundService) which contain a task to complete and add it to a queue. Then this queue get progressively emptied...
Daniele Sartori
1

votes
1

answer
28

views

Format of the initialization string does not conform to specification starting at index 0, without any typo in connectionString

I carefully read all the answers given to similar questions about this argument, but I did not find a solution fit for my problem. In brief: I have a C# solution using MySQL and Prism; my app.config has the following EntityFramework section: The file Connections.config contains the following code: I...
Daniele Prevato
1

votes
2

answer
34

views

How to detect if user input have one word only in Watson Assistant?

I am using the IBM Watson Conversation Assistant Chatbot. I am having troubles finding in the documentation how to detect if the user input consists of a single word. It's fine for simplicity and for my goal to use the presence of spaces as surrogate (no spaces means only word). I tried using SpEL....
Daniele D.

View additional