Javascript callback functions with Google Maps
Vote count: 0 I don't "get" callback functions very well. I am trying to build a section of my web page which shows the nearest stores for a customer's address. There are fields on the page that will have the logged in customer's address. When the user goes to the page, I want my code to grab their ...
Calling variables in another module python
Vote count: 0 I'm trying to call a variables I created in one function inside another module in Python, however, Python can't find them. Heres some example code: class1: def method1 var1 = [] var2 = [] #Do something with var1 and var2 print var1 print var2 retu var1,var2 sample = class1() sample.met...
postgres text search - numhword matching and order
Vote count: 0 The postgres documentation here explains the numhword parser as one that matches Hyphenated word, letters and digits. The example they give for this is postgres-beta1 and this matches nicely. However, somethnig such as postgres-9-beta1 does not match, and i can't seem to find a default...
Access elements on Angular site
Vote count: 0 I am looking to fill an array with <a> elements on an AngularJS site. Here is my array code: $ProgramGuides = $ProgramGuidesPage.ParsedHtml.getElementById("content") | foreach { $_.getElementsByTagName("ul").item(0) | foreach { $_.getElementsByTagName("li") | foreach { $_.getElementsBy...
PHP intval vs floor
Vote count: 0 Is there any difference between floor() and intval()? Though both retu s the same results, is there any issue with regard to performance? Which of the two is faster? Which is the right php function to use if I just want to retu the whole value only of a decimal? The goal here is to dis...
How to sign someone into Google through HTTP
Vote count: 0 I've been messing with Google OAuth2 and API's but it doesn't seem to achieve what I'm trying to do. I have a google form that I want to access but requires the user to login to their account before being able to access it. I thought the GoogleDriveAPI would work perfectly except for t...
PHP: Parse error
Vote count: -1 I have this code <?php session_start(); require('../autoload.php'); if(empty($_POST['use ame']) || empty($_POST['email']) || empty($_POST['password'])){ die(json_encode(array( 'error' => true, 'message' => 'Some fields are missing...' ))); } die(json_encode($class->register(array( 'us...
Array as a cashflow FinanceJS NPV
Vote count: 0 I am currently using http://financejs.org/#NPV for a proyect I am working at. The way I should enter the data is the following so that the computation is correct finance.NPV(10, -500000, 200000, 300000, 200000); The last numbers in bold are the cashflows. I am trying to use an array fo...
Node.js - Read File, Sort File, Write File
Vote count: 0 Question: How do i sort an already existing list and print it sorted? For example if the list is unsorted (contains name, city, height) and i want to sort it by height. I hope u'll understand what i mean :( i hope this will help. var fs = require('fs'); var chalk = require('chalk'); va...
Resetting a form via settings variable
Vote count: 0 In my form, I got a class named Cform which is subclassed to ConstanceForm Cform(ConstanceForm) In my views.py class ResetCView(FormView): template_name = 'c.htm.jinja' form_class = Cform model = CModel def form_valid(self.form): form.cleaned['C_CODE'] = settings.C_CODE form.save() ret...
md5 all files in a directory tree
Vote count: 0 I have a a directory with a structure like so: . ├── Test.txt ├── Test1 │ ├── Test1.txt │ ├── Test1_copy.txt │ └── Test1a │ ├── Test1a.txt │ └── Test1a_copy.txt └── Test2 ├── Test2.txt ├── Test2_copy.txt └── Test2a ├── Test2a.txt └── Test2a_copy.txt I would like to create a bash script...
Dojo calendar adding color
Vote count: 0 My question is about the dojo calendar. is there a any method or function to add color dynamically to data without using the css class . Thanks asked 3 mins agoosiris23 Let's block ads! (Why?)
Problems with Skewness code
Vote count: 0 I am trying to create a Content Based Image Retrieval system. I have implemented the skewness algorithm below. I am measuring the performance of my system with precision and recall. But I have been told my precision and recall results look strange and that my code could be incorrect. I...
1. WEIGHING IN A HARDER WAY
Vote count: -3 WEIGHING IN A HARDER WAY You've got 27 coins, each of them is 10g, except for 1. The 1 different coin is 9g or 11g (heavier, or lighter by 1g). You should use balance scale that compares what's in the two pans. You can get the answer by just comparing groups of coins. What is the mini...
setInterval only running on 4 of my 5 elements
Vote count: 0 I have to make some table-cells blink based on their values, and apparently IE8 is still a thing, so I'm working on the fix for that.. Here's my function for adding the blink-effect: function blinkForIE(element) { setInterval(function () { if (element.hasClass('IEBlink')) { element.rem...
Spring MVC persistence error
Vote count: 0 This is my DAO class: import ninja.majewski.data.Cat; import javax.persistence.Entity; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.sql.DataSource; import javax.transaction.Transactional; import java.util.ArrayList; @Repository publi...
EasyPHP Projects and DataBase in Dropbox
Vote count: 0 I am trying to set all my EasyPHP in Dropbox, to be able to work in 2 PCs, in the laptop and in my new one. The first is Win 7 and the second one is Win 10. I was working in Dropbox for several years in dropbox, but only in one computer. But Win 10 doesn't like my configuration: MySQL ...