Calculate all possible routes between nodes where all nodes are touched only once?
◷
تاریخ انتشار: 1395/3/17 | ساعت: 20:33
Vote count: 0 I'm trying to develop a Travelling Salesman-type program (in Java) and am trying to figure out the logic for a certain part, a brute-force approach for calculating the most efficient route between a set of nodes (Cities) where each node is touched only once. I've defined a City class w...
Maven inheritance and evaluation of properties
◷
تاریخ انتشار: 1395/3/17 | ساعت: 20:33
Vote count: 0 Since system scope is said to be deprecated and dangereous, we use a local repository. The repository is in the parent folder and used by most of the submodules. Now including the repo gets messy. Providing the url is sort of a hack. We tried ${project.parent.basedir}/repo in the submo...
Is there a simpler way to chain promises from MongoDB results?
◷
تاریخ انتشار: 1395/3/17 | ساعت: 17:51
Vote count: 0 This function retu s all collections in a MongoDB database, with the number of documents in each collection (bluebird promises). function listMongoCollections(db) { var promises = [] db.listCollections().toArray().then((docs) => { docs.forEach((doc) => { promises.push( new Promise((res...
Play for Scala: function doesn't return
◷
تاریخ انتشار: 1395/3/17 | ساعت: 17:51
Vote count: 0 This most likely is a newbie question. Note that there's an if 1!=2 that doesn't work as the function prints "continues". What's wrong with the retu ? def doSomething () = { val json: JsValue = JsObject(Seq( "ret" -> JsString("1"), "msg" -> JsString("Some Msg") )) if (1 != 2) Ok(json))...
Pivotal Cloud Foundry - Spring Cloud Services
◷
تاریخ انتشار: 1395/3/17 | ساعت: 17:51
Vote count: 0 I am trying to push the company app into Pivotal Cloud Foundry. The app should be bind with service registry. I didn't do any changes in application.yml file. I had have service-registry service in my Pivotal apps manager console. After I pushed my company app into PCF and binded with ...
how to show sqlsrv value in datetime picker in php
◷
تاریخ انتشار: 1395/3/17 | ساعت: 15:37
Vote count: 0 Hi i am currently developing a PHP websites where i want to show my date in to datetime picker.It is noted that i am using sql server 2014 express and datatype is Datetime.The following code from my project... <script> $(document).ready(function(){ var date_input=$('input[name="from_da...
Change the read time out of the update center connections
◷
تاریخ انتشار: 1395/3/17 | ساعت: 15:37
Vote count: 0 we use sonarqube behind a proxy. The proxy has a antivirus software which scans every download and blocks until it has sca ed completly. Now if i try to update some big plugins, i get a read time out exception. How can i change the read time out value of the update center downloader? T...
RealmSwift show errors after update 1.0
◷
تاریخ انتشار: 1395/3/17 | ساعت: 15:37
Vote count: 0 I've updated my existing project to Realm 1.0 and then I clean and build the project. Then RealmSwift show lots of errors. Is this some kind of Bug in Realm or what's the reason ? asked 56 secs agoChathuranga Silva Let's block ads! (Why?)
system design behind ranking websites
◷
تاریخ انتشار: 1395/3/17 | ساعت: 13:37
Vote count: 0 I want to understand how those ranking sites work, like hacke ews, reddit, etc. No matter how the ranking algorithm looks like, the elapsed time is necessary. So, do they scan the whole database to calculate the ranking for each item every second? that sounds terrible, there must be be...
Will spark 1.5.1 version support rdd pipe function
◷
تاریخ انتشار: 1395/3/17 | ساعت: 13:37
Vote count: 0 Will spark 1.5.1 version support rdd pipe function if so please specify the package asked 52 secs agoSai Prakash Let's block ads! (Why?)
On focus ionic input does't slide up with virtual keyboard.
◷
تاریخ انتشار: 1395/3/17 | ساعت: 13:37
Vote count: 0 chat.html <ion-view view-title="{{vm.headetTilte}}" hide-back-button="true" class="purple-back watermark-addComp comment"> <ion-nav-buttons side="left"> <button class="button button-icon button-clear ion-android-arrow-back sidebar-ion-navicon" ng-click="vm.goBack()"></button> </ion-nav...
R: fill down multiple columns
◷
تاریخ انتشار: 1395/3/17 | ساعت: 10:17
Vote count: 0 I'm using fill() from the tidyr package. fill(df, colname1, colname2, colname3) works fine, until I found a dataset with 32 variables. How should I fill down all columns without typing each name? I've tried: fill(df,colnames(df)), fill(df,1:32), fill(df,colname1:colname32). All gives t...
perl password hash failing with bad base64 encoding
◷
تاریخ انتشار: 1395/3/17 | ساعت: 10:17
Vote count: 0 I am using the script from the web to generate password hash, before i implement it on my website, i am testing it. The only diff is the lib i am using to generate the random string. i looked up the web to find details about the error. I do not find anything helpful to resolve. error: ...
Could not resolve matching constructor.Ambiguity issue with Spring dependency injection
◷
تاریخ انتشار: 1395/3/17 | ساعت: 10:17
Vote count: 0 I am getting the error "Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities)" while executing my spring program. I am new to Spring core and trying to lea the framework. Below is the code: Student.java package ...
json schema: Can we use "items" within an "object"
◷
تاریخ انتشار: 1395/3/17 | ساعت: 8:42
Vote count: 0 The keyword "items" seems to be associated with "array" in most json schema examples I ve seen. However I tried using it with an object using this useful tool: http://www.jsonschemavalidator.net/ (JSON Schema Draft 4) and it works. I can t find any documentation stating that this is le...
Simplest way to save array into raster file in Python
◷
تاریخ انتشار: 1395/3/17 | ساعت: 8:42
Vote count: 0 With one 2-d array in the shape of (100, 100), I want to save it into raster file in .tiff format. I can use gdal package to read tiff files which are already exist. But I still can't find a simple way to transform the 2-d array into tiff file. Using plt.imsave("xx.tif",array) or def a...
Primefaces set header for parent component
◷
تاریخ انتشار: 1395/3/17 | ساعت: 8:42
Vote count: 0 I am using PrimeFaces 5.1 with JSF in my college project.I try dataTable inside another dataTable.Now I want inside dataTable header to set parent component header. <p:dataTable value=#{stud.studDetails} var="details"> <p:column> <h:ouputText value={details.name}/> </p:column> <p:colum...
Possible to make incremental checkpoints CRIU
◷
تاریخ انتشار: 1395/3/17 | ساعت: 7:37
Vote count: 0 I was wondering if anyone knows if it's possible to make incremental checkpoints with CRIU. Also, I am interested in taking snapshots without killing the process. My goal is to achieve fast, (almost) live migration procedure from a host to another. It seems that with CRIU is impossible...
How to position elements to avoid overlap
◷
تاریخ انتشار: 1395/3/17 | ساعت: 7:37
Vote count: 0 I have four elements. 1) A div with id header_wrapper, containing a post title, when it was submitted, and by whom 2) A div with id content_wrapper, containing the post content, and a reply form 3) A header with id replies_header, containing the number of replies the post has received ...
How to match Strings in rust
◷
تاریخ انتشار: 1395/3/17 | ساعت: 7:37
Vote count: -1 I need to match Strings in using Rust lang but I tried and i can't see my code for (key, value) in obj.iter() { let valueType = match Some(value.to_string()) { Some(ref x) if x == "some_value" => string_gen(), _ => "test".to_string() }; println!("{}", value); println!("{}", valueType)...