Othmane

1

votes
2

answer
159

views

How to split a poem in python

I am trying to split a text which contains slashes that split words into syllables as well. For example text = 'Hi! I do/n'/t know how ma/ny sy/lla/bu/s a/re the/re i/n thi/s te/x/te, who kno/w.' result = re.split('; |/| |. |, ', text) The problem is that I don't get the correct number of syllables...
Othmane
1

votes
1

answer
3k

views

Show more/less text in a table automatically according to text length

I have a table with two columns, the second one sometimes contains big text so I want to show only the first 100 characters and put a show more link to display the remaining text. You can see here what Table I am working on http://jsfiddle.net/j11mj21x/. For that I am using a code provided in this l...
Othmane
1

votes
5

answer
7.7k

views

Running my own version of WordCount.java in Hadoop-2.6.0

I am trying to create my own version of wordcount and execute it. For that, I am trying to create the wordcount.jar by executing the following command (as described here http://cs.smith.edu/dftwiki/index.php/Hadoop_Tutorial_1_--_Running_WordCount for previous releases than Hadoop-2.*): javac -classp...
Othmane
1

votes
1

answer
4.1k

views

SQL Node not connected in a mysql cluster

I am trying to deploy a mysql cluster (4 machines) with 1 node manager, 1 sql node, and 2 data nodes. I am following these tutorials which are complimentary (first part, second part, third part, fourth part) from the official mysql website. However I have a problem with the SQL Node which is always...
Othmane
1

votes
1

answer
332

views

Error while installing pygraphviz on OS X with Anaconda

I am trying to install pygraphviz in OS X 10.9.5. I am using Python 2.7.12 with Anaconda 2.1.0. I already have graphviz installed. Here is the error I get when running pip install pygraphviz #include 'graphviz/cgraph.h' ^ compilation terminated. error: command 'gcc' failed with exit status 1 ---...
Othmane Safsafi
1

votes
1

answer
81

views

display data from datatable to inputText in primefaces

i m having a difficult time trying to figure out how to display data from datatable to an input text when row selected here is my jsf page code : i know that there is a litle detail missing in my code but i don't know where . can you please help me ?? and thank you ! Facelet Title
Othmane Ramzi
1

votes
3

answer
9.3k

views

load a cshtml file (razor) in the iframe

I have in my Layout page (Menu + Iframe) and i want to load a cshtml files (view pages) in the iframe after the click in the menu. the goal is not to load the entire Layout page I tried this way: FILES @Html.ActionLink('USERS','getUsers') Deconnexion but it loads th...
Othmane ByMe
1

votes
1

answer
265

views

A bootstrap table not as expected

I am using Bootstrap to draw a simple two-columns table exactly as the one in the Bootstrap page: http://getbootstrap.com/css/#tables. For that I am using a javascript to render it as you can see here: $(\'#rep\').empty() $(\'#rep\').append('TitleDescription') //for (var i = 0; i < ratings.length; i...
Othmane
1

votes
1

answer
111

views

Working with array and Dictionaries after loading them from Disk using np.load and np.save

I have several huge arrays, and I am using np.save and np.load to save each array or dictionary in a single file and then I reload them, in order not to compute them another time as follows. save(join(dir, 'ListTitles.npy'), self.ListTitles) self.ListTitles = load(join(dir,'ListTitles.npy')) The pro...
Othmane
1

votes
1

answer
392

views

how to transfer flowfiles one by one using a custom processor in NIFI

I'm programming a custom processor in Nifi v 1.3 The processor executes an SQL query read from the resultset and transforms every row to json document and stores it into an ArrayList, finally it transfers every 1000 document (fetchSize param) to a flowfile, this work for me, but it sends all flowFil...
Othmane MKADMI
4

votes
2

answer
39

views

Please what does mean this : if (a && b == c){};?

Please what does mean this : if (a && b == c){};? i did not understand the logic of the condition statement
Othmane Naamani
1

votes
1

answer
67

views

why MSE on test set is very low and doesn't seem to evolve (not increasing after increasing epochs)

I am working on a problem of predicting stock values using LSTMs. My work is based on the following project . I use a data set (time series of stock prices) of total length 12075 that I split into train and test set (almost 10%). It is the same used in the link project. train_data.shape (11000,) te...
Othmane
1

votes
1

answer
107

views

Working with array and Dictionnaries after loading them from Disk using np.load and np.save

I have several huge arrays, and I am using np.save and np.load to save each array or dictionnary in a single file and then I reload them, in order not to compute them another time as follows. save(join(dir, 'ListTitles.npy'), self.ListTitles) self.ListTitles = load(join(dir,'ListTitles.npy')) The pr...
Othmane
3

votes
0

answer
93

views

Javascript comparison does not work in Microsoft Edge

I created a calendar only with JavaScript; I need to compare dates of events stored in with dates retrieved from database, it works very well with Chrome and Firefox, but not with Edge. var td = document.querySelector('td'); var date = new Date('2017-06-22'); td.dataset.date = date.toLocaleDateSt...
Zakaria Othmane
19

votes
2

answer
6.8k

views

resolve a java.util.ArrayList$SubList notSerializable Exception

I am using SubList function on an object of type List. The problem is that I am using RMI and because the java.util.ArrayList$SubList is implemented by a non-serializable class I got the Exception described above when I try to pass the resulting object to a remote function taking as an argument a Li...
Othmane
5

votes
4

answer
6.1k

views

Trying to make a contact form example with symfony2

Here I'm trying to fill in a contact form then send it. However when I fill in the form and click on send I have this exception : UndefinedMethodException: Attempted to call method 'bindRequest' on class 'Symfony\Component\Form\Form' in /symfony/src/tuto/WelcomeBundle/Form/Handler/ContactHandler.php...
Othmane
2

votes
1

answer
778

views

Ionic (cordova) : Gradle: more than one library with package name 'com.google.android.gms'

I encountered an error when I execute Ionic run android,here is the error Error: more than one library with package name 'com.google.android.gms' You can temporarily disable this error with android.enforceUniquePackageName=fal se However, this is temporary and will be enforced in 1.0` Here are the p...
Sefiani Othmane
4

votes
2

answer
4.5k

views

Page reloads on hide/show button click using jQuery

I'm using jQuery to show/hide a div by clicking on the show/hide buttons. However, my code doesn't work because every time it returns to the way it was before when I click on my buttons. I'm almost sure that this is due to a page reload, because every time I click on a button it reloads the page. Do...
Othmane
1

votes
4

answer
59

views

Extract strings only from a line in php

I am using explode to extract only strings from a whole line. However using this: $array = explode(' ', $line); It splits the line by only one space, not by words. For example if $line is $line='word1 word2 word3' then I also have spaces among the entries in the array (it contains: 'word1', 'wo...
Othmane
2

votes
1

answer
89

views

can't get a pointer on my button in a dialogfragment

I am trying to build a simple DialogFragment which contains a textview and two buttons (send and cancel). I want to disable the button when the textview is first empty, but the positiveButton variable in my code is always null and I get the following exception: java.lang.NullPointerException: Attem...
Othmane
1

votes
4

answer
137

views

Java - Back to inheritance of static methods

I have read many posts and articles and now understood that static methods can not be inherited. To explain my issue, you can look at the following pieces of code: The main class: public class DataTable { public String id; public String date; public String reserve() throws SQLException { ...... Stri...
Othmane Bekkari
2

votes
1

answer
80

views

Relationship between 3 Models in Laravel

I'm trying to make a relation between 3 Models in Laravel 5.6 Here are my tables departments id name subjects id name teachers id name teach id_teacher id_department id_subject The relationship between all tables is many to many. Teacher can teach many subjects in many department department belongs...
1

votes
3

answer
2.2k

views

How to generate random numbers in C++ without using time as a seed

My program is supposed to generate random number with a fixed maximum of 9999. These numbers are used to create objects. Now the problem is when using time as a seed, if I create two objects one after the other both will be created with the same number (as the time hasn't changed in the process). Ho...
Othmane Qadiri
3

votes
4

answer
82

views

Split according to “:” in multiple lines

I have a set of files composed as follows: Product: Name Description: description of product I want to extract only the name and the description's content without the 'Product:' and 'Description:'. For this I do: div = re.split('Product:\s+|Description:\s+', contentOfFile) The problem is that I get...
Othmane
2

votes
1

answer
612

views

Ionic : first loading of my android application is abnormally slow

the first loading of my android application is abnormally slow, if someone has already encountered this problem, I already try removing all plugins and reinstall them, and remove the android platform and create it again, the loading time does not changed, here are the messages that the application s...
Sefiani Othmane
0

votes
1

answer
477

views

Docker + Laravel + Composer

I have made a docker compose file with three services web( nginx service) app(php-laravel-folder-service) database(mysal-service) for every service i create a dockerfile web.dockerfile app.dockerfile database.dockerfile. The problem is: in the app.dockerfile i want to install composer and execute th...
Zenzamy Othmane