Rails 4 - routes and paths
-
تاریخ: 1395/5/12 ساعت: 7:17
Vote count: 0 I am trying to lea how to use routes and paths in Rails 4. I have a model called organisation requests. I have routes in by routes.rb as follows: resources :organisation_requests do #, only: [ :index, :new, :create ] member do put "requested" => "organisation_requests#requested", as: :...
Passing SQLContext between classes
-
تاریخ: 1395/5/12 ساعت: 6:14
Vote count: 0 I have a main class in a file which creates a sqlContext object. However, I have numerous classes which utilize sqlContext, yet I can't find a good way to pass it between classes. The main issue is that I need to call import sqlContext.implicits._, and I ca ot put this import statement...
How to forward ports in twisted
-
تاریخ: 1395/5/12 ساعت: 6:14
Vote count: 0 I made an https web app using twisted on port 9000, and to deploy it, I want to forward ports 443 and 80 to port 9000. How should I do ? I don't want to run it with sudo on port 443 directly, because it will not access environment variables asked 25 secs agoMostafa Let's block ads! (Wh...
can't start the Windows Form Program
-
تاریخ: 1395/5/12 ساعت: 6:14
Vote count: 0 Imports mysql.data.MySqlClient Public Class Form1 Private conexion As New MySqlCo ection("Server=10.0.0.12;Database=servicioinventariopiramide;Uid=pabloponce;Pwd=guatemala;") Dim DAFacturas As New MySqlDataAdapter("call sp_FacturasConsultar()", conexion) Dim DSFacturas As New DataSet()...
openoffice calc - newline causes duplicate value in cells (pandas/openpyxl)
-
تاریخ: 1395/5/12 ساعت: 5:11
Vote count: 0 Does anyone know how to workaround a problem of OpenOffice Calc not handling new lines in cells correct? I have a python script that is dynamically generating an excel workbook using openpyxl via pandas. The script works fine but when I view cells in OpenOffice that contain newlines al...
What is the correct JSDoc syntax for a local variable?
-
تاریخ: 1395/5/12 ساعت: 5:11
Vote count: 0 For a function like this... function example() { var X = 100; ... var Y = 'abc'; ... retu Z; } I need to explain the purpose of some of the local variables. Adding a description like this... function example() { /** * @description - Need to explain the purpose of X here. */ var X = 100...
Threshold value for Cluster after document similarity
-
تاریخ: 1395/5/12 ساعت: 5:11
Vote count: 0 I have N documents. I have found out cosine similarity between all documents. T = (N*(N-1)/2) Because docSim between a document with itself is 1. Now, I have one query and I want to find out all documents which are similar to it. I don't want to rank it but cluster it based on threshol...
Creating stripe customer and using it later
-
تاریخ: 1395/5/12 ساعت: 4:10
Vote count: 0 I am using the parse cloud code and I need to create a stripe customer and add a credit card to it and save it some how. How would I save the customer to that parse user? stripe.customers.create({ email: 'foo-customer@example.com', card: 12345 }).then(function(customer) { retu stripe.c...
How to change the background color for google chart API, what am i doing wrong
-
تاریخ: 1395/5/12 ساعت: 4:10
Vote count: 0 here's is my code, what's wrong with it as far the chart background color goes ... i know everything else works, but i ca ot change the background color whatsoever.and i keep looking at the documentation and i keep coming to the same conclusion... Nothing. the code itself retrieves all...
Multiple UWP 10 projects within single solution with dependency of one in other not working
-
تاریخ: 1395/5/12 ساعت: 4:10
Vote count: 0 While trying to add dependency of one UWP application in other both having App.xaml wil not work. It gives the following error Conflicting values for resource 'Files/App.xbf' Processing Resources failed with error: Duplicate Entry. There are no resource files present. Is it possible to...
IQueryable Unit Test
-
تاریخ: 1395/5/12 ساعت: 2:54
Vote count: 0 I have a web api and I am exposing a endpoint like so: api/Holiday?name={name} This is the controller get method for the web api: public IQueryable<Holiday> GetHolidayByName(string name) { retu db.Holiday.Where(n => string.Equals(n.Name, name)); } How can I write a unit test for this t...
Paper-Dialog-Scrollable on mobile allows for scroll underneath it
-
تاریخ: 1395/5/12 ساعت: 2:54
Vote count: 0 I have a paper-dialog-scrollable setup to open when a paper-button is clicked from a list of paper-buttons when trying to scroll through the content in the paper-dialog-scrollable on mobile it tends to give me the ability to scroll through the list unde eath it. Occasionally the paper-...
Javascript regex test weirdness
-
تاریخ: 1395/5/12 ساعت: 2:54
Vote count: 0 Can anyone explain this (using node version 4.2.4 repl)? var n; //undefined /^[a-z0-9]+$/.test(n); // true! /^[a-f0-9]+$/.test(n); // false asked 16 secs agoVictor Grey Let's block ads! (Why?)
Real-time image processing - speed requirement
-
تاریخ: 1395/5/12 ساعت: 1:45
Vote count: 0 I'm analyzing a research work wherein it's a traffic violation detection system. I'm trying to find the gaps in it and I found out that for 1 photo their system takes approx. 11 seconds of processing, 5 photos per minute. I've concluded that "Their performance is too slow therefore the...
How to use two Li in html with different properties?
-
تاریخ: 1395/5/12 ساعت: 1:45
Vote count: 0 I am using li for two different purposes in the same page. One for navbar and the other for images. The problem is that in the navbar i have a drop down so when i hover over the drop down half of the portion of the drop down hides under the images. The properties of both the navbar and...
Exporting class using ES6 syntax fails in Facebook Flow
-
تاریخ: 1395/5/12 ساعت: 1:45
Vote count: 0 I want to add Flow type a otations to a class containing a function defined in ES6 style, below is analyzed correctly: /* @flow */ class Product { items: Array<string>; addItem = (item:string) => { this.items.push(item) }; } If I add export default to export the Product class, I get: c...
Deprecation Warning when using nested elements pattern from Documentation
-
تاریخ: 1395/5/12 ساعت: 0:26
Vote count: 0 Following the example on the wiki for finding nested elements (https://github.com/cheezy/page-object/wiki/Nested-Elements), I was able to find items in a modal. The problem is, i need to select them by index number, is there a way to do with this without using the deprecated functional...
FedEx api standalone implementation
-
تاریخ: 1395/5/12 ساعت: 0:26
Vote count: 0 How to run the FedEx api stand alone as for a test. Please be newbie friendly. I ca ot find a tutorial online about this. I got the key and password what is the next step considering if i am using java. I downloaded the Rate api but i don't know what to do with it. asked 1 min agomahar...
Run JUnit testclass synchronously based on spring profiles
-
تاریخ: 1395/5/12 ساعت: 0:26
Vote count: 0 Junit 4.12 and i have following test classes, class A{ set all the profiles based on available properties } @IfProfileValue(name = "spring.profiles.active", values = {"dev"}) class B{ //Test method and autowired properties } Currently Class B getting run before class A so IfProfileValu...
Click and draw (hold the click down)
-
تاریخ: 1395/5/11 ساعت: 23:11
Vote count: 0 I have a "section" with some "div" inside, and i need to multiselect them. I try some script, but no one work. With my script, i can click, that start the selection, but if i release the mouse, the hover effect stay here. How can i start hover on mousedown and stop it on mouseup ? My c...