Meteor: add extra data to user on social sign up
◷
تاریخ انتشار: 1395/2/2 | ساعت: 5:16
Vote count: 0 In Meteor, I'd like to add a referrer field to new user signups. I can do this for users that register with a password, by passing in extra options to be used with Accounts.onCreateUser(function (options, user). But this doesn't seem to work with social login. Any ideas how I can get t...
Inserting info from a file into a struct
◷
تاریخ انتشار: 1395/2/2 | ساعت: 5:16
Vote count: 0 I want to extract data from a file and store them into the myWorld but my for loop doesn't work, the program doesn't loop one time once it gets to the for loop. I'm not sure what the problem is. This is my code so far. #include <iostream> #include <fstream> #include <string> #include <...
Connecting gevent-socketio to Server
◷
تاریخ انتشار: 1395/2/2 | ساعت: 5:16
Vote count: 0 https://github.com/abourget/gevent-socketio/blob/master/examples/simple_chat/chat.py def __call__(self, environ, start_response): path = environ['PATH_INFO'].strip('/') if not path: start_response('200 OK', [('Content-Type', 'text/html')]) retu ['<h1>Welcome. ' 'Try the <a href="/chat....
Reordering pandas dataframe based on multiple column and sum of one column
◷
تاریخ انتشار: 1395/2/2 | ساعت: 4:05
Vote count: 0 I have the foll. dataframe: Country_FAO type mean_area 0 Afghanistan car 2029000.0 1 Afghanistan car 112000.0 2 Algeria bus 827000.0 3 Algeria bus 2351.0 4 Australia car 6475695.0 5 Australia car 12141000.0 6 Australia bus 293806.0 I would like to reorder this dataframe on the basis of...
Why does Round produce a different result than Application.Round
◷
تاریخ انتشار: 1395/2/2 | ساعت: 4:05
Vote count: 0 I am finding that the VBA Round function retu s the wrong result. I found a working alte ative which is to use the Application.Round instead. Why doesn't the VBA Round function work as expected? Sub roundingResults() Range("A1") = 123456.705 Debug.Print "Approach #1 " & Round(Range("A1...
OpenCV with CUDA compilation selecting arch for GTX980
◷
تاریخ انتشار: 1395/2/2 | ساعت: 4:05
Vote count: 0 I have a GTX 980 Gpu and want to compile OpenCV with Cuda. For that reason, I have installed Cuda Toolkit 7.5. In the configuration of CMake, NVIDIA GPU arch is 20 21 30 35and PTX archs is 30. When I compile OpenCV.sln, I get this two errors: 3126 error : Could not open file for write ...
using xsd.exe to generate c# files from multiple xsd scheme, with the standar UBL 2.0
◷
تاریخ انتشار: 1395/2/2 | ساعت: 2:32
Vote count: 0 using xsd.exe to generate c# files with the standar UBL 2.0, getting error and wa ings I have the files This is the command i'm ru ing: E:Invoicemaindoc>xsd.exe /c UBL-Invoice-2.0.xsd UBL-CommonAggregat eComponents-2.0.xsd UBL-CommonBasicComponents-2.0.xsd UnqualifiedDataTypeSchemaModu...
Unexpected PaxHeader inside gzip file created using gulp-gzip
◷
تاریخ انتشار: 1395/2/2 | ساعت: 2:32
Vote count: 0 I am using a gulp task to gzip my source files and set into a dist folder. I am able to successfully generate xyz.tar.gz file, but when I try to see the files in it using a 7zip on windows 7, I see a lot of files named "PaxHeader" each of different size. Tried searching on inte et, but...
How to create a new Native Application for Azure AD through the Graph API
◷
تاریخ انتشار: 1395/2/2 | ساعت: 2:32
Vote count: 0 Is there any way (using either PowerShell cmdlets or the Graph API) to create a Native Application for Azure Active Directory ? I'm looking for a way to automate creation of environments for my application asked 2 mins agoAlex Marshall Let's block ads! (Why?)
How to use regular expression in python to get integer value from a String with metacharacters
◷
تاریخ انتشار: 1395/2/2 | ساعت: 1:15
Vote count: 0 I have used beautiful soup to scrap data from a live web page.I have a variable price which is in "$" and i want to extract only the integer part of it.So i have used regular expression as follows : price = soup.find('span',{"class":"price"}) prices =re.search(r'[d{1,}]+', price.text.s...
Crawling slows down drastically towards the end
◷
تاریخ انتشار: 1395/2/2 | ساعت: 1:15
Vote count: 0 I've got a set of 25,000+ urls that I need to scrape. I'm consistently seeing that after about 22,000 urls the crawl rate drops drastically. Take a look at these log lines to get some perspective: 2016-04-18 00:14:06 [scrapy] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at ...
PhantomJS for loop hangs during second loop
◷
تاریخ انتشار: 1395/2/2 | ساعت: 1:15
Vote count: 0 I'm trying to iterate a collection of img tags on phantomjs, but it always hangs during the second loop console.log("length is: " + imgs.length); for (var i = 0; i < imgs.length; i++){ console.log("Position: " + i + " Code: " + imgs[i].outerHTML); } phantom.exit(); }; I've tried changi...
React: adding props to an existing component
◷
تاریخ انتشار: 1395/2/2 | ساعت: 0:12
Vote count: 1 I'm trying to figure out how to clone an existing element with additional props. For reference: this.mainContent = <Hello message="Hello world!" /> I attempted to do something like React.createElement(this.mainContent, Object.assign({}, this.mainContent.props, { anotherMessage: "nice t...
android 5.0 ask for security warning while open.camera
◷
تاریخ انتشار: 1395/2/2 | ساعت: 0:12
Vote count: 0 Please see this attachment. Why I see this on my screen, I am using all permissions <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STA...
Multiple row layouts in CursorAdapter based on next item
◷
تاریخ انتشار: 1395/2/2 | ساعت: 0:12
Vote count: 0 I need to display a sort of visitor logs in a RecyclerView and the data to display comes from a SQLiteDatabase DESC-ordered by DateTime (column enter_time, UNIX value). I have already implemented a simple CursorAdapter and I'm able to display data in the RecyclerView. Next step is to m...
Moment.js Timezone - CONSIDER a date/time to be in a different timezone when outputting
◷
تاریخ انتشار: 1395/2/1 | ساعت: 23:08
Vote count: 0 I know this seems like a straight forward question - but although Moment.js and moment timezone are very powerful tools for getting/setting and formatting dates.. I'm having an issue snapping my application to a single timezone. What I want, is for a user to choose from a date/time pic...
how to fetch all many-to-many relations in minimum count of queries with jpa?
◷
تاریخ انتشار: 1395/2/1 | ساعت: 23:08
Vote count: 0 i mean without any n+1 queries. 3 - it's normal i have an entites: @Entity @Table(name = "tags") public class Tag { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id") private Long id; @Column(name = "title") private String title; } @Entity @Table(name = "stations"...
Define contra and co-variance for a generic object
◷
تاریخ انتشار: 1395/2/1 | ساعت: 23:08
Vote count: 0 In Java, co-variance for a generic can be defined as <? extends Clazz> and contra-variance can be defined as <? super Clazz>, but is it possible to define both of these traits at once? Take this case for example: interface Foo{} interface Fizz extends Foo{} interface Buzz extends Foo{}...
Three JS boxGeometry, render warning: Render count or primcount is 0
◷
تاریخ انتشار: 1395/2/1 | ساعت: 21:17
Vote count: 0 I'm trying to pass data from a html-form to three parameters representing the x, y and z dimension of the boxGeometry. It works fine when I set the parameter values manually, but not when the parameters are set by the values entered in the form. HTML <form> <input type="text" name="val...
Springboot, hibernate4 and hsql accessing schema incorrectly?
◷
تاریخ انتشار: 1395/2/1 | ساعت: 21:17
Vote count: 0 I'm trying to use springboot, hsql and hibe ate together to persist and retrieve some fairly boring data. The issue I'm ru ing into is that hibe ate seems unable to reference my tables correctly, throwing the following exception: ERROR [main] (SpringApplication.java:826) - Application ...