Failed to query in sqlite by using column names
◷
تاریخ انتشار: 1395/4/14 | ساعت: 8:33
Vote count: 0 This is an extended question from Assigning column names in a txt file in python I have the following code. I extracted data from a xml file and saved it into a txt file. Then I imported it in sqlite3. Here, I can see the whole database. However, while I query, I can only use programID...
Django-Guardian - Restrict group access to class
◷
تاریخ انتشار: 1395/4/14 | ساعت: 8:33
Vote count: 0 I have followed the user guide from the django-guardian docs to set up django-guardian. This has given me the possibility to control whether a group can view a specific class or not. This is the example from the django-guardian docs with an added field (customer): class Task(models.Mod...
Scala Map -> Reduce vs. FoldRight
◷
تاریخ انتشار: 1395/4/14 | ساعت: 7:09
Vote count: 0 I timed the the following two, and it appears that both of them take the same amount of time. Is there any benefit of using over the other? (1 to 24).foldRight(List[Int]())((i, l) => l ::: generateList(signs, i)) vs. (1 to 24).map(i => generateList(signs, i)).reduce(_ ::: _) asked 1 mi...
C++ Header and Main errors
◷
تاریخ انتشار: 1395/4/14 | ساعت: 7:09
Vote count: 0 This is my first time trying to integrate a header into my C++ homework. We haven't covered it in class yet, I'm just being ambitious. I'm working with Clion. If it isn't obvious, my goal is to spell out two functions in the header, 1 to convert from Celsius to Fahrenheit, the other is...
C# Runtime Compilation error: Type 'Double' and 'Math' could not be found/does not exist in current context
◷
تاریخ انتشار: 1395/4/14 | ساعت: 7:09
Vote count: 0 I have added "System.dll" to the compiler parameter referenced assemblies.I also noticed that adding to "Using System" to the codeToCompile OR using "System.Math" or "System.Double" works fine.Not sure what's wrong. private void onLoadPlugin(object sender, EventArgs e) { string codeToC...
How to guarantee that equals() and hashCode() are in sync?
◷
تاریخ انتشار: 1395/4/14 | ساعت: 4:43
Vote count: 0 We are writing a class which requires very complicated logic to compute equals() and hashCode(). Something along lines with: @Getters @Setters @FieldDefaults(level=AccessLevel.PRIVATE) public class Exte alData { TypeEnum type; String data; List<Exte alData> children; } We do not constr...
A more effective way to structure database for pivots
◷
تاریخ انتشار: 1395/4/14 | ساعت: 4:43
Vote count: 0 To describe the question as good as possible, I'll detail the actual scenario: The site will allow users to add IP's for monitoring them against RBL's. In doing so, I've been pondering different approaches to structuring the database in a ma er that is as optimal as possible in terms o...
CDI 2.0: Observing multiple events
◷
تاریخ انتشار: 1395/4/14 | ساعت: 4:43
Vote count: 1 I have two classes that fire two events (code comes from a junit test with private i er classes): private static class EventEmitter1 { @Inject private Event<EventData1> event; } private static class EventEmitter2 { @Inject private Event<EventData2> event; } In my test EventData classes...
Is the httpruntime element in web.config special?
◷
تاریخ انتشار: 1395/4/14 | ساعت: 3:29
Vote count: 0 In an existing web application, the web.config file contains an <httpRuntime> element referencing a custom class in the "requestValidationType" attribute. To use the same site bindings, I created a child application with a web.config overriding the <httpRuntime> element with an overrid...
Clearing form input in Meteor
◷
تاریخ انتشار: 1395/4/14 | ساعت: 3:29
Vote count: 0 I have tried multiple options that I have found on SO and elsewhere for clearing form inputs, all listed below in the code, but nothing seems to work. Is there anything specific about this form that would determine which one I should use? <template name="CompanyAdd"> <div> <form class=...
Waterfall classification in R
◷
تاریخ انتشار: 1395/4/14 | ساعت: 3:29
Vote count: 0 I'm trying to classify some data using SVM in R. The data set: D1 | D2 | D3 | word1 | word2 |... 1 | 2 | 3 | 0 | 1 | 3 | 2 | 1 | 1 | 0 | D1, D2, D3 take values from 0 to 9 and each word takes a 0/1 value. First I want to build a classificator that predicts D1 based on word1, word2, etc...
CSS: nav element jumping to a new line
◷
تاریخ انتشار: 1395/4/14 | ساعت: 2:25
Vote count: 0 I'm trying to build a website, where part of my code, contains a quote segment, and the idea is that I want some social links on the right side of it. Unfortunately, my social links jumps to a line below my quote segment, instead of being on the same line, and I'm not sure why. Heres m...
Modify Prim's Algorithm to find maximum cost
◷
تاریخ انتشار: 1395/4/14 | ساعت: 2:25
Vote count: 0 I am trying to implement Prim's algorithm but instead of finding the minimum cost path I need to find the maximum cost path. There is a good implementation of the algorithm which I currently like in: http://www.geeksforgeeks.org/greedy-algorithms-set-5-prims-mst-for-adjacency-list-repr...
setPosition does not update on iphone safari browser
◷
تاریخ انتشار: 1395/4/14 | ساعت: 2:25
Vote count: 0 I have a html page that uses Firebase to get updated geolocation data. that data is then used to update a marker in a google map. The map works fine (map renders, and markers move accordingly) in the chrome browser on a laptop, but when I visit the same link on my iphone safari browser...
Facebook like share in android EditText
◷
تاریخ انتشار: 1395/4/14 | ساعت: 1:23
Vote count: 0 Good day.I want to create an share field like facebook.In the facebook if you insert an link it will automatically get the lets say 'short preview' of your link with an title and image.I dont think that facebook got in touch with whole wordls website databses so it gather them from dat...
Python "AttributeError: 'NotImplementedType' object has no attribute" when dividing
◷
تاریخ انتشار: 1395/4/14 | ساعت: 1:23
Vote count: 0 I've tried to thoroughly research this question before asking it. I'm trying to plot the ratio of two lists that are contained in a dictionary. line_ids = ['blah1','blah2','blah3','blah4'] elines = {} for i in range(0,len(line_ids)): data = [] with open('../output/'+line_ids[i]+'.csv',...
Importing Java Date Class
◷
تاریخ انتشار: 1395/4/14 | ساعت: 1:23
Vote count: -1 I have the most basic problem. Try to get the system date. My code is this; import java.util.Date; Date sysdate = new Date(); System.out.println(sysdate); It gives me the error: Syntax error on token "import", assert expected And also I have found this on web; import java.util.Date; p...
Pebble to connect to BT device
◷
تاریخ انتشار: 1395/4/13 | ساعت: 23:55
Vote count: 0 I am new to Pebble development, but is it possible for the Pebble to co ect to other "non-phone" devices, e.g a heart rate monitor? I would like to access characteristics and attributes manually. asked 1 min agosoren.bendtsen Let's block ads! (Why?)
Changes in bootstrap.css not showing if website was preloaded
◷
تاریخ انتشار: 1395/4/13 | ساعت: 23:55
Vote count: 0 I was working on a wordpress theme I tried changing a bootstrap.css file Just a small change from dislpay:none to display block The website display the changes when i load the website in new phones or laptops where the website was not opened previously But if i try to open the website ...
Back-end/database for android application
◷
تاریخ انتشار: 1395/4/13 | ساعت: 23:55
Vote count: -1 I'm relatively new to app development. I want to build a back-end for my application where I can upload files (images/mp3's etc.) then display it in my app once uploaded. Can someone please tell me where to start, what should I know, just general knowledge will be appreciated. Noob qu...