Vote count: 0 i have a stream code val source = Source.actorRef[Msg[T]](1000, OverflowStrategy.dropHead) val flow=source.map(println(_)).to(Sink.onComplete{case _=>println("complete")}).run() after i run the code, i found from the logfile,the akka had create two actors: akka://xxxx/flow-0-0-unknown-operation#-969158424] akka://xxxx/flow-0-1-actorRefSource#-1265269541] what is this "unknown-operation" actor? can i rename it? i am a little confuse,becuase once i change the code as: val flow=source.map(println(_)).to(Sink.onComplete{case _=>receiver.stop()}) .named("iwantName").run() and the log output as: akka://xxx/flow-0-0-unknown-operation#1904555295] akka://xxx/flow-0-1-iwantName-actorRefS...
ادامه مطلبVote count: 0 Consider the following code public class myClass{ myClass instanceOfNotYetDefinedClass; ... //etc code } I don't understand how the compiler manages to understand that: I'm telling it to create a class, and then it says: "OK! Let me see what this myClass class has. Oh, its a myClass, let me see whats this has..." etc. It may be a pretty noobish question, but I really don't understand how this could be handled. asked 2 mins agoYoTengoUnLCD Let's block ads! بخوانید...
ادامه مطلبVote count: 0 right now im using Processing IDE to some image processing and im using Visual Studios 2013 to do some speech analysis and the idea is that when a image gets process it will send a string to visual studios and when visual studios hears a specific word it will send a string to Processing. The biggest problem i face is the fact that Processing dont like to share serial, i mean i can't have processing open while Arduino's serial monitor open to read what's being sent from Processing and the same thing will happen if i have Processing serial ruing in a sketch and then i open visual studios and if i say something the program is made to transmit a string and when that sending starts ...
ادامه مطلبVote count: 0 I'm using Flow Router and Blaze Renderer for a simple website (think blog / brochureware). I'm using FlowRouter.path() to create links on my menu elements. The url changes as expected when these links are clicked and the action() method on the route is fired. However the templates don't seem to be refreshed and the template helpers aren't fired. The route in my /lib/route.js file is const about = FlowRouter.group({ prefix: '/about' }); about.route('/:pageSlug/:subSectionSlug', { action: (params) => { console.log('action() fired :' + params.pageSlug + ' :' + params.subSectionSlug); BlazeLayout.render( 'applicationLayout', { main: 'basicPage', }); }, name: 'pageSubsection', }); T...
ادامه مطلبVote count: 0 I am indexing PDF documents in elasticsearch without using the official plugin, I am using a PHP library to parse PDF content into plain text. This PHP library allows me to get the document content by pages so I would like my search page would retrieve some highlight similar to: [Page 1] ... Highlighted text from the search ... [Page 4] ... Highlighted text from page 4 that match with the search ... The mapping they gave to me is like this, I just converted text from string to array: properties: { highlight:{ text: [ "Page1Content...", "Page2Content...", "Page3Content...", ...], other_fields: {} }, other_fields: {} } But I caot find a way to get the array indexes when getting t...
ادامه مطلبVote count: 0 I'm developing an application that requires some initial configuration when first deploying(initial params, server adress,...etc). This application is written in a different language than python, but I'm using python because it's the language that's the most commonly pre-installed on linux machines. I'm thinking of installing the prerequisites at the top of the script like so: import os os.system("python setup.py install ") from import But then I'm installing a package on a computer that belongs to a user, only to use it just once. Should I just uninstall it when my script ends? How do I go about this? asked 1 min agoJelle Criel Let's block ads! بخوانید...
ادامه مطلبVote count: 0 from bs4 import BeautifulSoup import urllib2 # Imported libraries for future use. response = urllib2.urlopen('http://www.nytimes.com').read() soup = BeautifulSoup(response,"lxml") host = [] #created empty list to append future words extracted from data set. for story_heading in soup.find_all(class_="story-heading"): story_title = story_heading.text.replace("n", " ").strip() new_story_title = story_title.encode('utf-8') parts = new_story_title.split()[0] i=['a','A','an','An','the','The','from','From','to','To','when','When','what','What','on','On','for','For'] if parts not in i: host.append(parts) else: pass #now i have to calculate the number of repeated words in the file and c...
ادامه مطلبVote count: 0 I am facing a problem in jQuery Datatable, is that I have a dropdown and a datatable with pagination enabled. If I checked few rows from 1st and 2nd page So the Total number of Rows selected should be binded on Datatable. Is it possible or some other alteative concept is there? View All Layer View selected Layers $(".user-select").change(function () { var arrSelLayr = []; }) So what can we do to resolve this problem. It should bind say 5 rows from 2 pages of jquery datatable. asked 49 secs agoPuneet_2696717 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 First i am so sorry about my bad english . I waa ask how to make this script , i want to put the percents ? I mean every image to have their percent like um a image1 to have 5% to show up image 2 to have 10% to show up and like that? function randomImg1() { myImages1 = new Array(); myImages1[0] = "images/1.gif"; myImages1[1] = "images/2.gif"; myImages1[2] = "images/1.gif"; myImages1[3] = "images/2.gif"; myImages1[4] = "images/1.gif"; myImages1[5] = "images/2.gif"; myImages1[6] = "images/1.gif"; myImages1[7] = "images/2.gif"; myImages1[8] = "images/1.gif"; myImages1[9] = "images/2.gif"; myImages1[10] = "images/1.gif"; myImages1[11] = "images/2.gif"; myImages1[12] = "images/1.gif...
ادامه مطلبVote count: 0 can someone explain the patte at todo optional tab in intellij for example :if i type "todo" then i want the "todo" tag should be like this : //todo this is your code here what should I do? asked 5 mins ago小斌斌来也 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 SQLite only has a few data types: NULL, INTEGER, REAL, TEXT, BLOB Meanwhile, the JDBC has: -7 BIT, -6 TINYINT, -5 BIGINT, -4 LONGVARBINARY, -3 VARBINARY, -2 BINARY, -1 LONGVARCHAR, 0 NULL, 1 CHAR, 2 NUMERIC, 3 DECIMAL, 4 INTEGER, 5 SMALLINT, 6 FLOAT, 7 REAL, 8 DOUBLE, 12 VARCHAR, 91 DATE, 92 TIME, 93 TIMESTAMP, 1111 OTHER. (possibly more) I can't find any documentation anywhere for the SQLite-specific JDBC driver, and I need to know how the driver maps the types. Obviously null is null,integer is integer (probably),real is real (probably),but what do text and blob map to? asked 2 mins agoEric the Red Let's block ads! بخوانید...
ادامه مطلبVote count: 0 In order to convert std::wstring to char* UTF8 I use following code: std::wstring my_wide_string = L"my_sqlite_db.db"; std::wstring_convert myconv; myconv.to_bytes( my_wide_string.c_str() ); Now, I need to do a back conversion, i.e. char* UTF8 to std::wstring. What is the proper way to switch the converter? Thank you. asked 59 secs agoIgor Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have this assignment where I'm supposed to use a custom array list. I am quite confused about lists and generics. In the template for our code we're given "private myObj[] objects;", which is from the class myObj.java which only contains attribute of type T called "data". "private myObj[] objects;" looks a lot like an array to me. I thought generics didn't get along with arrays. I tried casting to be able to create enough "space" for 10 elements of type T(generic), but I couldn't do this without compiler errors which only go away when I comment out the casting of an array of type myObj of size 10 as "myObj[]". Help me please. My TA's have not answered my questions. asked 1 mi...
ادامه مطلبVote count: 0 I'm trying to create a cesar cipher in Javascript and having trouble figuring out how to do the shift. It may be that my approach is complicating it, but I'm trying to understand how to set a max value for adding numbers, but have the addition continue starting from the minimum number. Here is the code I have: $(document).ready(function(){ var alpha = []; var encoded = []; alpha = { '1': 'a', '2': 'b', '3': 'c', '4': 'd', '5': 'e', '6': 'f', '7': 'g', '8': 'h', '9': 'i', '10': 'j', '11': 'k', '12': 'l', '13': 'm', '14': 'n', '15': 'o', '16': 'p', '17': 'q', '18': 'r', '19': 's', '20': 't', '21': 'u', '22': 'v', '23': 'w', '24': 'x', '25': 'y', '26': 'z' }; $('#cipher_form').sub...
ادامه مطلبVote count: 0 Context: Bower is cool. It is downloading the configured things with all their dependencies to my wwwroot/lib folder. However it is required to have those files also be the part of the Visual Studio solution for multiple reasons, just to name some: intellisense, Resharper, publish. Question: How to include the downloaded files to the VS solution automatically? (Note, this must be automated, as the upgrades/updates can contain new/removed files, so if I had to check this after every time when bower looks for updates than I am in big trouble...) Related Question: Bower downloads many things related to a dependency (I mean src, less, etc). This is cool, but obviously a big impact ...
ادامه مطلبVote count: 0 I just started using docker. I create an image using docker file. How can I create new image from that existing image? asked 48 secs agoAaron Shen Let's block ads! بخوانید...
ادامه مطلبVote count: -4 I have programmed before in Python and I love it. Recently, I have taken an interest into web design and programming, and so have leat HTML and feel semi-confident with CSS. However, I understand that to create dynamic websites, other languages are required. Would it be better to lea PHP or Java? Are there alteatives? I'm really interested in how social networking platforms work and would like to explore it for my EPQ (extended project qualification) for my A-Levels as well as taking CS. I'm willing to work hard and lea, but so far, all the Java tutorials or books have not been very helpful (that, and I dislike the language a bit). So, I guess in summary, if there was a route ...
ادامه مطلبVote count: 0 Hi I am getting this message in log every time when execute query. But query is executing in background thread only and Table has not more 500 rows and also I always apply limit 100. Please don't simply give some link and say this question already answered. I have read lots of answers in SO regarding this. But still it did not solved my issue. can anybody give me proper reason or solution to my problem? Choreographer: Skipped 98 frames! The application may be doing too much work on its main thread. Following is my ruable class and I am calling it like new Thread(new MessageLoaderThread(limit)).start(); private class MessageLoaderThread implements Ruable { int limit; ArrayList r...
ادامه مطلبVote count: 0 I'm sorry for my English. I know how to retrieve a specific value from a database but I'm unsure of doing this. I have two elements Name(primary key) and rate in my table. If the user enters the name then the output should dislpay the name with its rate. Finding the presence of name can be made using SELECT STATEMENT but how to do this. Thanks for your time asked 1 min agouser105127 Let's block ads! بخوانید...
ادامه مطلبVote count: -2 For eg if I have old_list = [1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 8, 8, 9, 9, 9] and I want to remove elements with more than (x = 2) 2 instances and make it look like this new_list = [1, 3, 4, 5, 7, 8] asked 1 min agoDisObs Let's block ads! بخوانید...
ادامه مطلب