How to instantiate a navigation controller from another view controller?
◷
تاریخ انتشار: 1395/4/3 | ساعت: 20:02
Vote count: 0 My goal is whenever i click a button on a first view controller, then it will navigate to another controller which is a navigation controller, but firstViewController and secondViewController has no co ection or anything. Picture I used this code @IBAction func buttonTapped(sender: UIB...
pandas combine pivot table with DataFrame
◷
تاریخ انتشار: 1395/4/3 | ساعت: 20:02
Vote count: 0 I want to group my data set and enrich it with a formatted representation of the aggregated information. This is my data set: h = ['A', 'B', 'C'] d = [["a", "x", 1], ["a", "y", 2], ["b", "y", 4]] rows = pd.DataFrame(d, columns=h) A B C 0 a x 1 1 a y 2 2 b y 4 I create a pivot table to ...
How to use Crop Image code from github in my code
◷
تاریخ انتشار: 1395/4/3 | ساعت: 18:18
Vote count: 0 Hi iam newbie to android and i always being confused that how can i use code from github into my app .most of the time i notices that some of the task in our app are beautifully designed by some one in github for example now days iam developing app which need to crop image after select...
GUI programming in Clojure/Clojurescript - want to 'zoom in' and add detail
◷
تاریخ انتشار: 1395/4/3 | ساعت: 18:18
Vote count: 0 I'm designing a GUI and want to find a library on the JVM or for javascript that I can use with Clojure or Clojurescript. The problem: I need to display 'zoomable' directed acyclic graphs (DAGs). A picture is worth 1000 words, so here is what the interface ought to look like, and how t...
How to generate control flow path of a javascript?
◷
تاریخ انتشار: 1395/4/3 | ساعت: 18:18
Vote count: 0 Basically I want to trace the path for function call and assignment. I am thinking of using Antlr to generate the control flow path. Consider the following snippet: 1. function abc(myVar) { 2. console.out(myVar); 3. } 4. 5. x = getAttributes(); 6. abc(x); If I start from getAttributes(...
Why is block's margin-top:percentage relative to the nearest block container's width
◷
تاریخ انتشار: 1395/4/3 | ساعت: 17:18
Vote count: 0 I noticed that margin-top: 5% and margin-bottom: %5 is refer to its containing block' width. But why not heigth? Margin / percentage The percentage is calculated with respect to the width of the generated box's containing block. Note that this is true for 'margin-top' and 'margin-botto...
Java application to control wemo light bulb
◷
تاریخ انتشار: 1395/4/3 | ساعت: 17:18
Vote count: 0 I want to develop a web application in java to control the wemo light bulbs from my PC, but I only found some procedure to develop web application only in MAC OS. Is it possible to do that in linux? Also, without involving an android phone ? asked 38 secs agoKaynat Quayyum Let's block ...
Spark: unable to connect to cassandra
◷
تاریخ انتشار: 1395/4/3 | ساعت: 17:18
Vote count: 0 Recently I have upgraded cassandra from v3.0.2 to 3.0.6. The previous version worked fine with Spark (python scripts). Since the upgrade I can't run the scripts that worked before and don't how to fix it. Below is the code that ran without problems before: import os import sys from os....
mysql - do not return row when value in NULL
◷
تاریخ انتشار: 1395/4/3 | ساعت: 15:33
Vote count: 0 When trying to select everything except when question_type!= 'A'; The row do not retu data when question_type us NULL. select * from table where question_type!= 'A'; asked 10 secs agouser3351236 Let's block ads! (Why?)
encryption key for 3DES
◷
تاریخ انتشار: 1395/4/3 | ساعت: 15:33
Vote count: 0 can we assume that same encryption key is used to encrypt data if encrypted data are same? For example, plain text is 'This is sample'. First time we use 3DES algorithm and encryption key to encrypt it. Encrypted data became 'MNBVCXZ'. Second time again, we use 3DES algorithm and encry...
NSString and NSArray reference count and memory manage
◷
تاریخ انتشار: 1395/4/3 | ساعت: 15:33
Vote count: 0 Today I have done an interesting experiment about reference count and memory organizing,but I get some confused.First,let's see the string code: - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event { NSString *str1 = [NSString stringWithString:@"string1"]; // pri...
Could not load NIB in bundle from within cocoapods framework
◷
تاریخ انتشار: 1395/4/3 | ساعت: 13:38
Vote count: 0 This is my directory structure: And this is how I load nib from within BSSelectableView: let nib = UINib(nibName: "BSSelectableTableViewCell", bundle: nil) tableView.registerNib(nib, forCellReuseIdentifier: BSSelectableTableViewCellIdentifier) and error is following: 2016-06-23 08:21:2...
Loading javascript file in different endpoint
◷
تاریخ انتشار: 1395/4/3 | ساعت: 13:38
Vote count: 0 I'm writing a large javascript app and it's a single page application. I'm using node.js with jade. And I have question about loading javascript files for the front end. Like you have these pages : - profile - dashboard - setting I should load profile.js when the user only come to the ...
C#: RestClient: RestRequest fails for lower case header
◷
تاریخ انتشار: 1395/4/3 | ساعت: 13:38
Vote count: 0 I have the code below in c#, which uses RestClient. The issue is that the headers should not be case-sensitive but looks like they are. var client = new RestClient(sMA_URL); var request = new RestRequest(Method.GET); request.AddHeader("cache-control", "no-cache"); //Without the line be...
How to write a R code for determining a value is above a line or below a line?
◷
تاریخ انتشار: 1395/4/3 | ساعت: 11:20
Vote count: 0 I want to write a R code as follows: Give a function say y = xb + c where b and c are constants. I want to determine a horizontal interval say (alpha, beta) lies above the function, below the function or intersect the function. (See uploaded plot) I find myself ca ot figure out how to ...
MongoDB: text search on nested view
◷
تاریخ انتشار: 1395/4/3 | ساعت: 11:20
Vote count: 0 I have a document in MongoDB 3.2 with the following structure: "_id" : ObjectId("5759815b94db5928bea3c3a5"), "source" : "pons1", "libraries" : [ { "archive" : “deko1”, "last_access" : ISODate("2016-06-09T14:45:04.644+0000"), "books" : [ { "title": "American Gods", "author": "Neil Gaima...
Yii2 - I have a form that I want to use in various actions, but i dont want to intiazlie this forn to each action
◷
تاریخ انتشار: 1395/4/3 | ساعت: 11:20
Vote count: 0 Yii2- I have a form that I want to use in various actions, but i don't want to initialize this form to each action. For example: To use Login form in a Modal. asked 28 secs agoJim Clarke Let's block ads! (Why?)
crack some program use c#
◷
تاریخ انتشار: 1395/4/3 | ساعت: 10:09
Vote count: -2 Today i found crack for WTFAST Program i decode and got source code File.WriteAllBytes(this.TextBox1.Text + "\\zozts.bat", Resources.WSMedz); string path = Environment.ExpandEnvironmentVariables("%WinDir%") + "\System32\drivers\etc\hosts"; File.GetAttributes(path); File.SetAttributes(...
How to deserialize JSON and map it to an string object
◷
تاریخ انتشار: 1395/4/3 | ساعت: 10:09
Vote count: 0 I'm new to JSON deserialization and scratching my head looking for a solution. I have searched numerous solutions online but none of them serves my purpose. I have this example JSON data that I get from a webserver: [943533322,"2016-06-23 02:34:38",{"defaultCSH":[{"defaultCSH1":1},{"de...
FileNotFoundException open failed: ENOENT (No such file or directory)
◷
تاریخ انتشار: 1395/4/3 | ساعت: 10:09
Vote count: 0 I have a file called "and.doc" that has big number of records each one has this shape expression : defenition ; so i am trying to (read the file with sca er ,,, use " ; " as a delimeter ,,,, find a way to split expression from defenition and somehow add them to my Sqlite Database (if s...