Loop what continue function on end.
dimanche 14 août 2016
What does "data abstraction" exactly mean?
Set fullscreen mode in iOS programmatically
How to set an iOS app for iPad to fullscreen programmatically?
What does #line mean?
Cannot import Snapkit into KeyboardViewController
I cant import SnapKit to KeyboardViewController (UIInputViewController) class, it says no such module SnapKit.
Take a CFG and a string S as input and generate the right most derivation for string s
I tried but couldn't built the logic behind it can anyone please help me!
How to change Done Button Title on SFSafariviewController
What is time and size complexity Nsarray vs Nsmutablearray and nsdictionary vs nsmutabledictionary
how can we judge object action performance over Nsarray vs Nsmutablearray and nsdictionary vs nsmutabledictionary
In the development of an app, why a developer should use React Native instead of Java (for Android) and Objective-C (for iOs)?
Are there situations where the use of Java-ObectC are a better choice compared to React Native and viceversa?
How the country code with the ip address?
Will the app gets rejected for “Unbalanced calls to begin/end appearance transitions for <ViewController>"
Here is the error I got when I run my Application Unbalanced calls to begin/end appearance transitions for
If virtual table is created in compile time, then why do we call this as a run time polymorphism?
As virtual table is created in compile time, then why do we call this as run time polymorphism in c++?
Modifying UISearchBar Cancel button font text color and style
Is there any way to change the text font and color of the UISearchBar Cancel button without subclassing the searchbar?
Windows8 & windows10 compatible
01.I built my application in windows8 will it works fine in windows10? 02.For windows10 visualstudio2013 is compatible or visualstudio2015 vis must?
passing label's text to a particular tableviewcell using delegate (Objective-C)
How can i pass the label's text which is in the DetailViewController to a particular tableViewCell(SourceViewController) by implementing delegate method.
How can I implement Apple Push Notification Service on iOS Application?
Is there any sample project showing how to integrate APNS
on IPhone
, and how to get deviceToken?
Listview with checkbox and Adapter in iOS
same exsist in Android the listview with checkbox and Adapter class, in iOS there is same?
Thanks in advance everybody!
change padding between UIDatePicker and internal date scroller
Is it possible to set the left and right padding between the UIDatePicker and the internal spinning dates that appear inside it?
how to get the detail of last call using callkit in IOS
is it possible to access native call by using callkit.
I want the get name of last dialed/received number programmatically.
Unsigned Long to Long in C++
How would one dispose of any Game Kit objects that were created using the previous local player
My app only uses one view controller, So when I use the authenticate bool it becomes invalid. How can I reset it programatically?
samedi 13 août 2016
Real-time location tracking swift
c++: Is it possible to #include inside a function body?
I want to include a header file only if a certain function body is called?
Is this possible or recommended in C++?
Can I programmatically scroll to a desired row in UIPickerView?
By default the first row is highlighted after initializing the UIPickerView. How do i highlight a particular row or scroll to particular row programmatically?
How can I append frames to a video in C++?
Is there any way to add frames to the end of a video without overwriting the entire video file? Any C++ library is okay.
How to get key event on on lockscreen ios swift
I want to get the Key events when someone try to unlock iphone, like keyup keydown event when they type their password for passcode ,
how the below structure is store in stack and heap?
iPhone system font
What is the name of the default system font on the iPhone?
I would like to retrieve this for customizing a UIView
.
Listview with checkbox in iOS [on hold]
for iOS there is this? https://youtu.be/sk9fRXu53Qs
Thanks everybody
How to know popover is visible in swift
Can you please explain this piece of code? [closed]
#include <stdio.h>
#include CONST15
#define CONST2 CONST2*CONST1
#define CONST3 CONST2+CONST2
int main(int argc,char**argv)
{
printf("%n",CONST3);
}
Upload image from iOS?
I'm confused with uploading an image from iPhone, I don't know if I choose to to use base64encoding
or multi-part
data.
When will add-in support roll out to other Office clients such as Android and iOS?
I haven't been able to find a roadmap of sorts and it seems fairly straightforward to implement if they are all essentially just iframes with websites inside.
iOS Swift UITextfield adjust fontsize width
How to adjust UITextfield font size when it is hold long character? I tried adjustsFontSizeToFitWidth. it is not working. any help will be appricated.thanks in advance
How to determine elements count in boost.preprocessor tuple`s?
How to determine elements count in boost.preprocessor tuple`s ?
Make image fit inside button in iOS
I want to fit the image inside the UIButton
using storyboard but not able to do so. Can somebody tell me how to do that.
Qt - Esc should not close the dialog
How to make Esc key to minimize a dialog? By default it closes. Should I process KeyEvent
or there is a better way?
Will there be new XCode releases for new iOS 10 betas?
I got an XCode beta that supports compiling to iOS 10 Beta 1.
If Beta 2/public beta will be released, will there be a new XCode beta release?
How to create a button programmatically?
How do I programmatically create graphical elements (like a UIButton
) in Swift? I tried to create and add button into a view, but wasn't able to.
How to use background thread in swift?
Hey there anyone know how to use threading in swift
dispatchOnMainThread:^{
NSLog(@"Block Executed On %s", dispatch_queue_get_label(dispatch_get_current_queue()));
}];
Dropbox Core API for iOS - override [DBSession linkFromController:]
is there any possibility to do the auth process always from the specified viewcontroller and not via the mobile app (if it's installed)?
Thanks and regards, Tom
How to call CDialog::DoModal() with modified DLGTEMPLATEEX
Jenkins Continuous integration for iOS. Can I run pod install each time when my build job executes
I want to make sure the build job which is executed by Jenkins, has the latest pod libraries. I could not find any CocoaPods specific build step in jenkins.
QTableWidge item automatically selected
I work with a QTableWidget created by a QstyledItemDelegate I want to know how to have once my program runs the first item automatically selected.
How do I do a Fade/No transition between view controllers
Is it possible to do a fade in and fade out transition between View Controllers in Storyboard. Or without transition.
If it's possible, what's the code for it?
Converting NSString to NSDate (and back again)
How would I convert an NSString
like "01/02/10" (meaning 1st February 2010) into an NSDate
? And how could I turn the NSDate
back into a string?
vendredi 12 août 2016
Specifying constraints on Xcode
I would like to know whether there is any way to specify constraints explicitly for a particular device(iPhone 6,iPad Air etc..) on Xcode interface builder.
How to display two UIViewControllers in one screen using swift?
I want to display two UIViewControllers in one screen with a segment in top to switch between the 2 controllers. But both view controllers should not be in memory.
Alamofire is not compatible with swift 2.1.1 and Xcode 7.2.1
Currently i'm using Alamofire-3.4.1 with swift 2.1.1 and Xcode 7.2.1 version. It showing error i.e 'No such module Alamofire'. Is it compatibility issue or other? My OS X Yosemite version is 10.10.5.
Does anyone knows how to configure Netbeans C++ compiler for OpenMP?
I am trying to run a simple parallel c++ code on Netbeans. just including omp.h does not work. any experiences? should I configure Netbeans somehow? I am using Cygwin compiler.
Getting an tapped row data in to next view controller using accessorybuttontappedforrowwithindexpath
Am new to ios development, so I have little knowledge about this. My question is, in UITableView
selected row data, is edit and update using accessoryButtonTappedForRowWithIndexPath:
valid?
Swift - Table View
How to load data in table view end of all codes? For example, all functions will finish then the table view will load. Please let me know if you have any suggestion.
How to get location periodically and send location to server in background ios9
i want to get location every 15 minute and send location to server. in the server i compared locations and response to client as notification (almost like push notification but in my server).
what is the difference between const_iterator and iterator?
What is difference between these two regarding implementation inside STL. what is the difference regarding performance? I guess when it is read only, we prefer const_iterator. right?
Thank you.
constexpr literal initialization with a constexpr
simple example here:
static constexpr const char literal1[] = "abcde";
static constexpr const char literal2[] = literal1;
compilation error. How to make it work and why it doesn't?
How to limit map bounds in mapbox MGLMapView?
What function will NULL all of the file data(empty the file) in objective c?
I want to empty the file before I store any data to it. Can anyone please tell me what function will empty the file in Xcode(Objective C) Thank you all in advance.
__int64 on a 32-Bit machine?
I just tried something in MSVC 2010 on my 32-bit machine here and found out that I can use __int64 in my programs - which actually work!
- How is that possible?
Navigation Controller buggs
i am adding view controller 1st and 2nd Then i am going to one view to another view controller then 1st view controller title sho on second view controller back button. how to fix
how to access react native view from native method of objective c?
i want to apply flip effect from native ITRFlipper library on react native view, I have tried but could not access the view from react native to native method Please help ! thanks in advance
How to get the text color of textfield in objective c?
I need to get the text color of text field to check the condition and perform some functionality.But I am not able to get any proper method for it?Kindly Help me out.
How do I add a custom action to the text selection edit menu in iOS?
I need to add a custom action to the edit menu that pops up when a user selects some text in a UITextView in iOS. How do I do this? (Swift code is preferred).
Is there a penalty in iTunes Connect for cancelling multiple app releases?
I manage several apps that have been approved, but not released. I'd like to upload new binaries and submit those apps for review. Will I be penalized by app review for cancelling multiple releases?
What should I do to convert a encrypted NSData to NSDictionary?
NSData *jsonDataEncrypted = [jsonStringEncrypted dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *jsonDicEncrypted = [NSJSONSerialization JSONObjectWithData:jsonDataEncrypted options:kNilOptions error:nil];
The code above is'n work. The
jsonDicEncrypted
is null.
Xcode 7.3 intellisense not working at all
Is it just mine or is it really a bug? After the update the intellisense seems to be not working at all especially with class declarations. Has anyone filed a bug report for this??
Removing all copies of the SKSpriteNode
In loop I have this line and I need to remove all copies. How would I be able to do this in Swift in SpriteKit?
obstacles = obstaclesImage.copy() as! SKSpriteNode
Why iOS distinct frames and bounds
in iOS controls we have frames and bounds. Frames coordination system is relative to its parent and bounds coordination system is relative to itself. But why iOS distinct coordination system to this two version?
binary object file changing in each build
Throttling Search with UISearchController
I have an Xamarin.iOS app which does some search on a long list that takes some time.I would like to introduce some throttling instead of searching for every single key stroke . Any idea ?
jeudi 11 août 2016
How to draw a route between two locations using MapKit in Swift?
How can I draw a route between user's current location to a specific location using MapKit in Swift?
I searched a lot, but didn't find any helpful Swift-specific links or tutorials.
How to sample play video from Wowza server
I want to play recorded videos from Wowza server in my App. When I clicked on selected index of UITableview the name written in the cell stores in a variable and play the specific video.
There's a way to access the document folder in iphone/ipad (real device, no simulator)?
there's a way to access a real device (iphone/ipad) document folder? I realized an app that store some data in that folder and i wanted to check if all is going in the right way.
How to display location of ALL users in swift app [on hold]
I'm using xcode to make an app and I can figure out how to display the location of a current user. What I want, however, is to display the location of each user using my app.
Passing data from UITableView to the destination ViewController using Segue(Objective-C)
i'm trying to pass the data of the tableviewcell to the destination ViewController where i have a label and i want to set that data to label's text using segue when i select the particular cell.
why does the derived class inherit the private members of the base class?
How to tell if a C++ symbol is #defined in XCode
I'm used to Visual C++ which makes it very clear in an #ifdef
block if the block is going to be compiled or not.
Does XCode (3) do this too, I couldn't see how?
In Swift, how can I create a custom initializer for ViewControllers?
How to use class which defined below?
class A{
public:
B b;
};
class B{
public:
A a;
};
I can't write in A class "B b" because class B defined below. Is any way to make it work?
thanks
What is the difference between IDispatch and IUnkown in COM?
I have read and saw example for COM, but I couldn't clearly get Interface when to use. [In Short, When to use IDispatch and IUnkown in COM.]
In Swift for iOS, is there a pre-defined function that is activated upon the user typing a symbol?
In Swift, there are classes with pre-defined functions such as viewDidLoad or touchesBegan. Is there one I could use for when the software keyboard is pressed? (just in case it matters, I'm using Xcode.)
Thank you.
How to create unique strings every time in iOS?
How can I create a sequence of characters, that would be random globally.
Actually I want to create some names, every time, and I don't want them to be same again and again.
Thanks
Is there a way to get object that is being tracked?
I tend to do something when the runloop mode becomes UITrackingRunloopMode. But I just want the code to be executed when some point meets. i.e the scrollView object being dragged belongs to a given custom class I made.
How to create an iOS app add-on?
Is it possible to create an API inside an iOS app to let 3rd party developers create app add-on that are downloadable for users inside the app?
I could not find any ressources for this topic online.
How to convert integer to double implicitly?
int a{5},b{2},c{9};
double d = (double)a / (double)b + (double)c;
Or I can use static_cast
. Either way is verbose, especially when the formula is long. Is there a better solution?
adjusting image intensity using slider in iOS
I need to adjust the intensity of an image in my application using a slider, I need a guiding code for that if any one knows
@IBAction func onSlider(sender: UISlider) {
let int = Slider.value
}
Video calling API in iOS SDK?
Is there some APIs to establish video calling between iPhones using my own app? I know such projects as iDoubs, but I am searching for another examples. Or just examples of catching the stream from the camera in a realtime
QMap but without sorting by key
I need structure like QMap but without sorting on keys, so if I insert item there first I can count that this item will be before all others. And insert pair before or after specified element. Does Qt have such?
Where is CvAdaptiveSkinDetector class in OpenCV lastetst build?
I've downloaded lastest release of opencv and opencv-contrib and built it using cmake, but I'm not able to find where CvAdaptiveSkinDetector class is. OpenCV docs say that it should be in contrib.hpp, but there is no such header file
What does type cast of DWORD on LPVOID return?
I'm sometimes confused when type casting in C++, what exactly do these return?
LPVOID lpFunction;
DWORD dw = (DWORD)lpFunction; // What does it take from LPVOID?
More of a general explanation would be appreciated. Thanks
QCustomPlot - scale every graph separetly
Compare IP's using Boost aiso
We have two ip addresses.
http://localhost/
http://127.0.0.1/
( both returns same host )
How to check for that using boost asio?
Change value within a NSMutableArray
NSMutableArray *array = [[NSMutableArray alloc] init];
[array addObject:@"1"];
NSString *test = array[0];
test = @"2";
NSLog(@"%@", array[0]); //Output is 1
array[0] = @"2";
NSLog(@"%@", array[0]); //Output is 2
Whats going on ? Why in first case output is 1 ? Doesn't NSMutableArrat keeps links to an objects ?
mercredi 10 août 2016
Scrolling gets lagged while implementing mutual scrolling for two scrollviews
I have implemented mutual scrolling for two Scrollviews
present inside my screen. But the problem is after the first scrollview's scrolling gets completed only then seccond scrollview will start the scrolling. How to solve this issue. Please help
xcode 7.3.1, linker command failed
Already asked a question about this but I still have the issue and need more help. What does this mean?(null): File not found: /Users/josephcatley/Library/Developer/Xcode/DerivedData/Catley_Lakeman_Securities_-bgmbarzibqvxrrcfnrptvxmzywgr/Build/Products/Debug-iphonesimulator/CLS.app/CLS
Simple NSLayoutContraint usage in Swift?
I'm looking for a simple Swift solution for a child view to programmatically fill a super view using NSLayoutContraint. It should be easy to understand. I feel like most of the answers on here currently are more complex than needed.
dispatch_after - GCD in swift?
How to get table Section cell when selecting button?
Add static parameter to #selector in Swift
Is it possible to pass an int variable via a selector, e.g. #selector(run(1)) or #selector(run(2))
More context if necessary:
let button = UIBarButtonItem(title: "Run",
style: UIBarButtonItemStyle.Plain,
target: self,
action: #selector(run(1)))
how to make windows global proxy?
I dont want to use VPN to do this.
I want to use c++,c#,python……to tell windows apps to goto local proxy.
like "privoxy + pac", so I want to know how privoxy works?
How to add variable value in Qt QMessageBox?
Swift: Get all subviews of a specific type and add to an array
How to get activation key of installed softwares(windows) in c++
how can i edit a table view section header ios swift
Skype - voice notification [on hold]
How can I make such a program which will use 'say' command in os x to spell a name of a person who appeared in Skype?
It could be implemented in python or c++.
Thank you.
How to launch url on ios device from command line
I can launch url on android device using adb as adb shell am start -d http://..
How can I run it on ios device from command line?
Or is there any other way run url on ios device from mac?
Program between cntrl+c and cntrl+v(prefered C++)
I need help making a program that can read my copied text(CTRL+c), decode it and return text to my keyboard, so i could paste it(CTRL+v). I have basics only of C++, but I am open for other languages.
ICarousel view not reloading properly
I am using a carousel view in my project but when i change the contents of array at runtime and reload carousel the view are in jagged form not in linear for.
can anybody help me with this. Thank you.
ios:I got a old project,when I login,there comes a issue
The error is:
ERROR:Error Domain=isNOTValidJSONObject Code=0 "xxx" UserInfo={NSLocalizedDescription=xxx}
I have motified the App Transport Security Security Setting -> Allow Arbitrary Loads == YES
Does this issue somebody meet?
iPhone UIButton - image position
convert point cloud to 2d height map
how to convert point cloud to 2d height map ? I have a kinect and I can get point cloud and depth image. I would like to convert the point cloud to 2D Height map, but I don't know how I should do it.
UIProgressview value under 0.1 not working
I am not sure (as I couldn't find anything) if this is the way progress views work but when I have a value under 0.1, let's say 0.05, the progress view always shows up to 0.1 then anything above 0.1 works fine.
Is this normal?
Under what conditions do modern c++ compilers not perform rvo?
For performance reasons I'm interested in making sure that RVO is being performed on the return values of functions. What would prevent this optimization from being performed by a modern C++ compiler (such as gcc, clang, and msvc 2015) which I should worry about?
Can't import a python file on iOS using the app pythonista
I tried importing without the .py file extension ex: import something. That doesen't work. I also tried turning it into a package by creating a init.py but it still doesn't want to import. Oh and by the way I'm using Python 3.5 .
Is "int i = j = 0;" a valid C++ expression or statement?
(1) In fact, this statement fails compilation, but why is that?
(2) Does it mean, j=0 is an expression, and the value of this expression is assigned to "i"?
(3) How does C++ standard say this statement should be tokenized into sub-statements? Thanks.
Turbo c++ colour codes
I have been using turbo c++ from quite long time, I have noticed that there are by default 16 colours(0-15) but I know that there is a way to make your own custom background and text colours, does anybody know how to do it...?
Realm support for Swift 3.0
I was wondering whether it is already possible to use Realm with the beta of Swift 3.0.
Although I see a RealmSwift-swift3.0 directory in in the Realm repo, I do not succeed to use it correctly. How should I install it from source?
mardi 9 août 2016
How to erase element from std::vector<> by index?
I have a std::vector, and I want to delete the n'th element. How do I do that?
std::vector<int> vec;
vec.push_back(6);
vec.push_back(-17);
vec.push_back(12);
vec.erase(???);
Please help!
std::vector versus std::array in C++
What are the difference between a std::vector
and an std::array
in C++? When should one be preferred over another? What are the pros and cons of each? All my textbook does is list how they are the same.
Firebase Admin Create User Programatically?
Is it possible for one Firebase user (setup as an admin in my own database) to create another user account?
I need to create an user management app that allows the admin to create and delete user accounts for the primary app.
Swift 3 Call phone action don't work
Hello I've button action for call number , but when I used it don't call and nothing shows.
My codes under below.
@IBAction func callPhone(sender: AnyObject) {
UIApplication.shared().canOpenURL((NSURL(string: "tel://1234567890")! as URL))
}
Thank You !
When to use endl?
Code:1
int main()
{
int a;
cout << "Hello world!" <<endl;
}
Code:2
int main()
{
int a;
cout << "Hello world!";
}
Does code:2 send h,e,l,l,o..... each separately ?
How to keep only duplicates on a STL vector<string>?
Given an STL vector, output only duplicates:
INPUT {"A","A","B","B","C","D","E","F"};
OUTPUT {"A","B"}
I'm really a novice in stl so don't know where to start. Can someone point me in the right direction?
Swift: Default Storyboard background Image for all ViewControllers
Is there a way to set (preferably in storyboard IB) an image, which, will serve as the background image for al ViewController views in the whole storyboard. I don't want to have to add a background image in every view or replicate that in code.
Collection View Multiple horizontal Section Header
I am trying to create a CollectionView
header having horizontal header section but the problem is the section that is being created is vertical and I want everything to be dynamic.
And for this purpose i am using viewForSupplementaryElementOfKind
.
Gettext PO file format
I have some localization going on in the PO format.
Is it possible to get the contents of this file within your C++ application? Instead of calling gettext("id here")
I want to read the complete file within C++ (on linux and windows)
C++ Check for first time keypress
Is there a way to check for the first time a key is pressed rather than just if it is pressed or not. This way it will return true once when you press the key but not anymore until your let go and press it again.
UIRefreshControl endRefreshing is not smooth
When my data has finished loading and my tableView has been reloaded, I call endRefreshing on my refresh control, it then 'jumps' from its loading state and disappears - how can I implement a smooth animation that slides the refresh control away when it is complete?
iOS FrameWorks--->>UITabBarItem.h Can not see The Private Properties~~~
Why can't i see private properties now? Don't know what happens; can someone explain please?
getting error: appium & commnad not found on MAC
I have configured appium and node using following steps:
brew install node
brew link node
npm install -g appium@1.4.11
npm install wd
Now when i provide "appium &", it says command not found. Please help me in starting the appium server.
How to truncate fraction using NSNumberFormatter
How can I format decimal values with next rules
0.123 => 0.12
10.1234 => 10.12
100.12345 => 100.1
1000.12345 => 1,000
C style printf
allows to do this using something 4.2%f
plus somehow thousands separator but I don't get how to reflect it in Cocoa.
Change background when pushing inside UI navigation Controller
I have a UInaviguationController in my App. My question is how to make the backgroundView when pushing a viewController the view of the current scene. The default is black screen. I would like to achieve something similar to presenting Modally over the current Context inside a UINaviguationController.
AutoLayout for UICollectionView Header in iOS
I have created a UICollectionView header using viewForSupplementaryElementOfKind
and i provided auto-layout constraints for UICollectionView
using storyboard but that layout constraint is not working on CollectionView
Header.
So, my question is how to provide auto-layout constraints to the header.
stl priority queue is giving confusing result
i am attaching the ideone link for my code:
with less functor makes sense, the output is in correct order.But with greater functor, the output should be opposite of the less order, which is not happening, any pointer as to what i am doing wrong?
UITableView listen user scroll not its delegate
Set an image as a background for a DrawingArea
I'm doing a platformer game using gtkmm and cairo, and i can't find a way to set an image as a background, so i don't have to redraw it on every draw event. I'm managing images as pixbufs. Is it actually possible, or am i thinking it wrong?
AWS Cognito User Pools iOS Explicit Sign In vs. Delegate
Transform MGLAnnotationView Subview
I'm trying to apply a transform in order to rotate a view that I've added as a MGLAnnotationView
's subview. It worked well for MKAnnotationView
but it doesn't for the new annotation view class.
What should be the correct approach for this?
EKCalendar on my ipad application
Actually i want access the Native Calendar on my application,Referred so many links but still could not done that process,and the events are shown on my calendar and setting the time and date based alert the user also,any solution for me much appreciated,Thank you.
How to automatically zoom buttons and everything in Qt on qWidget.showFullScreen()?
I want to resize everything when i show it in full screen automatically keeping aspect ratio. How can i do it. i use PyQt4 but if you know of C++ then also please tell me.
Hope the code will be not more than 2-3 lines. Thanks
lundi 8 août 2016
Libraries for building email Client Setup
I want to Develop an email application in iphone, which retrive all the email avilable in inbox, but when i tried to use Mailcore it is not working..
help me to get some kind of libraries by using i can download the emails and store it.
How do I decompress an NSString I have that was compressed with glib
I have an NSString (e.g. eNoLycgsVgChvILSEoWS1IoSPQBFZgb4
) that I get from a web server that is just a normal string compressed using glib
. How do I decompress this in Objective-C? I've found some libraries but they only accept full files, not a simple string.
dispatch_async and block in iOS
What this piece of code mean?
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
TMBaseParser *parser=[[TMBaseParser alloc] init];
parser.delegate=self;
NSString *post =nil;
NSData *postData = [post dataUsingEncoding:NSUTF8StringEncoding];
[parser parseForServiceType:TMServiceCategories postdata:postData];
});
please explain it briefly.Thanks
Trying to work in core data
I am developing an app in which user can login or register using core data. already developed it but how to manage if users upload images and user can only see the images uploaded by them. I don't know how to manage it using core data. Please help. TIA. :)
how can i use the same UIViewController on storyboard while replacing old one
I am programming a game. It is a word game. Game page is always the same with different content. when i use instantiateViewControllerWithIdentifier("SB"), new page is added to the queue.but That way memory used goes high.
how can i replace old page with new one ?
Blank page when printing HTML table using UIPrintInteractionController
I am printing HTML table using UIPrintInteractionController. The contents of the table are half an A4 size paper, but there always a blank page that gets printed. I have checked there are no contents after the table. Can someone suggests why this could be happening. Thanks
Thanks
How can I run my app compiled in Xcode 7.3.1 on the iOS 10 Simulator
So, because of all the naming changes my current project doesn't run on Xcode 8 beta and has lots of compilation errors that I cannot easily get rid of.
Is there a way to at least run a compiled version that was made in XCode 7.3.1 on the iOS10 Simulator?
how to play recorded audio on another view in objective C
I am working on an app of Voice recording. I have 2 View Controllers. One is for recording audio and second is to play that recorded audio. I am using AVAudioRecorder and AVAudioPlayer. I don't know to play that recorded audio on second View Controller. Any help would be appreciated. Thanks :)
"Type 'task.Type' has no subscript members" error in Swift [closed]
This code gives me an error; Type 'task.Type' has no subscript members
This is my code:
struct task {
var name = "Un-Named"
var desc = "Un-Described"
}
class TaskManager: NSObject {
var tasks = task[]()
func addTask(name: String, desc: String){
tasks.append(task(name: name, desc: desc))
}
}
How to listen if any desktop icon is moved by mouse (to use it as trigger event)
as already mentioned in the title I want to listen if any desktop icon/symbol is moved by the user to use it as a trigger event.
Does someone know how to realize it in C# or any other language?
Thanks in advance.
Felix
What is the maximum amount of time a Real-Time Match lasts in Game Center?
I was reading through the documentation to see what the limits were for how long a match can last when you start a Real-Time Multiplayer match via Game Center.
Is there a time limit that matches can't exceed? Also is there a data limit that matches can't exceed?
c++ alternative member definition
In C++ you can define members the following way:
struct test {
using memberType = int(int);
/*virtual*/ memberType member;
};
int test::member(int x) { return x; }
With C++14 is there any way to define the member inside the class definition, for instance with a lambda ?
How to render a whole UITableView as an UIImage in iOS?
I have simple UITableView
with some data. The table's height is greater than the screen size. Now I need to catch screenshot of this table (a whole table). I know that cells after the content are dequeued, but maybe there is a way how to capture this. isn't it?
iOS: Watch Kit paired device unavailable for development
I can't run my Apple Watch application in XCode. My phone+watch is listed as a "Unavailable Device" and says "paired device unavailable for development". When I try to launch the app it says the same thing.
How can I resolve this?
I'm using XCode 7.1, iOS 9.0, WatchOS 2.0.1.
React Native run function at a certain time
I am building an alarm-like application using React Native. What I need is for some function to run at certain time of the day, even if it is in the background. I can't seem to find any useful packages or a way to do this. Any help is appreciated. Thank you.
How to convert DCMTK-dcm-image to OpenCV-Mat-image (language-c++) [on hold]
I am using DCMTK to read DICOM image, now I want to convert the dcm image into Mat image to use OpenCV functions. Here is the code to read .dcm image into a DicomImage variable.
DicomImage DCM_image("D:\headOneSlices512\Slice77.dcm");
DCM_image.setMinMaxWindow(); //DCM image
Copy constexpr array into class
Suppose I have a class:
class MyClass{
char array[12];
public:
MyClass(const char* arr) {
for (int x = 0; x < 12; x++){
array[x] = arr[x];
}
}
};
Is it possible to make the MyClass
constructor constexpr
. The tricky part is initializing the new array....
Swift Converting Epoch Time to Local Time
How do I convert epochTime to current local time? Essentially, in below codes, how do I get 1 and 2 to produce the same time?
var epochTime = (NSDate().timeIntervalSince1970)
//1. Convert epochTime to NSDate(). Shows "2016-06-14 22:47:23 +0000n"
print(NSDate(timeIntervalSince1970: epochTime))
//2. local time using NSDate(). Shows "Jun 14, 2016, 6:47 PM"
NSDate()
RestKit - Access QueryParameters in completionBlock
26 to post a Object with the getObject method and map the response. I need to access the query parameters I used in the request when the download in complete.
Is there a way to access queryparameters or the request address from the completion block of a restKit completion bloch
can std::ostream be used like a byte buffer
Can std::ostream be used like a byte buffer. Can it help me to append bytes (from a socket for example) and retrieve them correctly ? can we fix an initial size to this buffer and will it grow automatically ?
if this is possible, I need a simple example please.
Check new item created in background IOS
I have a IOS Objective c app that I need to preform a action once a new object is created in Parse. Is there some way I can wake the app by making it query by the user who created the object? If any one could help that would be great!
How can I add a website link to my C++ program with using SDL library?
I am making a game with C++ with help of SDL library. I have an idea to take advertisements to my game with a different way. I want to add a button somewhere on the screen and make it link to a website. Is this possible in C++ and SDL library?
Is the AppID Prefix Sensitive Information?
I am needing to place the AppID Prefix string into my application source code to enable a Keychain Access Group. My project is hosted on GitHub. Is this AppID Prefix value sensitive, private information that should not be committed to source control or is it ok to share it with the world?
'for' loop vs Qt's 'foreach' in C++
How to add constraint to custom table view cell xib file?
To implement expanding custom table view cell, I used custom xib file with UITableViewCell.
But I cannot find constraint panel in that xib file.
In order to fit to variable device size, I have to set trailing constrain. Is it impossible to set constraint in custom xib file?
dimanche 7 août 2016
remove specific data from the FirebaseTableViewDataSource to display on a UItableView (iOS)
I'm using a FirebaseTableViewDataSource to pull data from the firebase database to display into a UItableview.
But before displaying the data I need to loop through the datasource objects to remove some specific objects.
Does anyone know how to do this in iOS?
Thanks a lot
C++ How to use notify tag with mciSendString to know when audio is done playing
I've found many examples in other languages but not really any in C++. I want the program to be realize when the song is over and move on to the next one but without using the wait command since I want the user to continue doing stuff while the song is playing.
QUrl lost mail link string
Property Has a Previous Declaration
I tried adding XMPP framework into my ios project and I couldn't get it working. Turns out I added it incorrectly, So I tried removing it and now without XMPP I am getting these errors: Thanks in Advance!
Screen freeze while loading UIWebview
I am Loading HTML String in UIWebView
,text content get loaded in a sec but there is lot of images in HTML
String, cause of this image my UIWebView
get freeze, after loaded all images my screen get free to use.
Any Suggestion on this?
Could not load NIB in bundle from within cocoapods framework during development
OpenCV Cross Platform
I am building a computer vision system using OpenCV's source code, which we wish to use for cross-platform programming without compiling the libraries into executables. We are using the CLion IDE and wish to only use the OpenCV cpp and h files for the programming of our system, then compile it all when finished.
Game Center authentication doesn't work in iOS 8
I am trying to implement Game Center in my game. I've tried it on the iOS 8 GM. I'm not able to get the authentication to work on device, but it works fine in the simulator. I'm using the code provided in Apple's documentation.
Do other people have the same issue? Any advice?
iOS 10 beta: Not able to install enterprise distribution build from site/url
We are not able to install app from url in iOS 10.0 Beta. It is giving popup "Would you like to install app "xyz"?" Once, we click Install it does nothing. We are using enterprise distribution.
Device: iPad Mini
Version: 10.0 (14A5261v)
Request you to help
Thanks,
Audio-based live video glitch [on hold]
I've been searching the web for algorithms or informations on how to distort a video using sound input, but couldn't find anything. Where could i find some theory or examples about this subject ?
I'm planning on using openFrameworks for this project, but the documentation doesn't need to be openFrameworks or C++ oriented.
How can I stream only the sound of a video from YouTube?
I would like to stream only sound from youtube. I need this for IOS but others can be ok. I have searched on stackoverflow but I couldn't find. Because I don't want to use another software, I want to directly stream only sound of youtube video by code. Also It should work on background.
How to define a pointer pointing to a constexpr variable?
In C++ Primer 5th, it says that
constexpr imposes a top-level const on the objects it defines.
So how I can I declare a pointer with a constexpr specifier imposing a low-level const, i.e. a pointer pointing to a constexpr object?
Is there a working Fisher Vector encoding (FV) sample purely implemented with OpenCV 3?
Fisher Vector encoding (FV), an image representation obtained by pooling local image features, is implemented in VLFeat library.
http://www.vlfeat.org/api/fisher-fundamentals.html
Is there a working Fisher Vector encoding (FV) sample purely implemented with OpenCV 3?
Is there way to recover after EXC_BAD_ACCESS KERN_INVALID_ADDRESS crash?
Unable to upload Development APNs certificate
I'm unable to upload the Dev APNs Certificate for cloud messaging, all I get is the error:
There was an unknown error while processing the request. Try again.
I've tried on different accounts and on different projects. Earlier today it seemed to be working fine.
Any ideas?
OpenCv C++ input samples must be floating-point matrix ERROR
While implementing k-nearest neighbour in OpenCV C++, I am using this code:
regionOfInterest = smallt[i](rec);
resize(regionOfInterest, img12, Size(16,16));
img12.convertTo(img12, CV_32FC1);
cout << knearest.find_nearest(img12,5);
I am getting an error
input sample must be a floating point matrix.
Benefits of using Weak variable instead of strong
Can anyone provide me link or information about :
why weak
variable is beneficial as compared to strong variable?
and IBOutlets
in ARC
, that should be weak
or strong
? Why delegate is also defined as weak property?
Thanks in advance.
Correclty get a NSString retrieved from other class
For some my code is always crashing when I simply want to print a String ("fechaReport") which I get from ADClusterableAnnotation. The error printed is:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ADClusterableAnnotation fechaReport]
View Matrix from Quaternion
I'm currently building my own quaternion camera. As far as I know, you only need one quaternion to fully specify the camera's orientation (correct me if I'm wrong). So, how would I go about creating the view matrix? I'm using C++ as a programming language by the way.
Any help would be appreciated.
Find address and add marker on Maps SDK
I have an application using google maps sdk. I am new using Google Maps. I have two UITextFields and I want to add a marker when I finish typing. When I finish both, I want to show the route between the two markers. So how do I get to search the address and add a marker?
iOS Admod loadRequest memory
xcode7.1
, iOS9.1
, Admob version 7.5.2
Admob loadrequest
memory leak
bannerView = GADBannerView(frame: rectBanner)
bannerView.adUnitID = "xxxxxxxxxxxxxxxxxx"
bannerView.rootViewController = self
request = GADRequest()
bannerView.loadRequest(request)
coverBanner.addSubview(bannerView)
iso-swift Table view got hidden below slide out menu
Can somebody please explain, how this C++ code works?
I'm learning c++, but I just can't get my head around this. I can't just memorize it either, without knowing how it works.
const std::string currentDateTime() {
time_t now = time(0);
struct tm tstruct;
char buf[80];
tstruct = *localtime(&now);
strftime(buf, sizeof(buf), "%Y-%m-%d.%X", &tstruct);
return buf;
}
Firebase crash reporting causing crashes on iOS 10
I noticed that since iOS 10 release I have couple of crashes refers to firebase library system monitoring.
Crashed: com.google.system-monitoring
SIGABRT ABORT 0x0000000186c58ff0
-[FCRSystemMetadata sampleMemoryStats] + 4300660144
I already updated to the latest version of firebase on my app, but is there any way I can fix this?
samedi 6 août 2016
Set Default directory path in fstream in c++
Can I set a default directory path to fstream in c++? If I say,
fstream fPointer("file1.txt",ios::in);
It should locate the file from, /home/[user]/[path]/file1.txt
It should automatically locate the directory ( /home/[user]/[path]/ ) Whenever I use fstream or ofstream.
Load a Image from SFML
So I have been using CLion and linked SFML using CMake inside CLion. I tried loading an image and it didn't work sadly. I get an error that says this, "Failed to load image "images/tiles.png". Reason: Unable to open file." I ALSO KNOW FOR A FACT THAT THE PATH IS SET PROPERLY. Please help.
how to show alert view if check box is not checked using obj c
I'm new in Obj-C & iOS development. I need to show an alert pop up if checkbox is not checked when I click on the Next button that goes to the next view controller. So if check box is checked then only it should goes to next View controller otherwise show alert pop up. Please help.
how do I use fastlane tool to submit to iTunes connect a b2b ios app?
I soon need to submit a ios app for review into the apple business to business (b2b) program.
I would like to use the fastlane tool to simplify the process.
can anyone share an example fastlane config file showing how to deliver it to b2b (and not the public appstore)?
WatchKit API for Force Touch / Digital Crown?
I'm very excited about the new user interaction possibilities introduced by the Apple Watch, among them, Force Touch and Digital Crown.
However, I couldn't find mentions of them in the WatchKit API. Are there any ways to receive events from Force Touch / Digital Crown? Is it possible to have custom handlers for the events?
iOS URL Scheme Threema
I'm working on a contact launcher for iOS and i want to integrate the Messenger "Threema" in this. The URL "threema://compose?text=" starts Threema. It is possible to specify the target ID to open the chat directly, but how do I get this ID of the threema contact dynamically.
Has anyone an idea?
Connection between BITCODE_ENABLE and dylib framework?
I have seen many reference Link for find out connection between the BITCODE_ENABLE and .dylib framework, But i can not get positive result. Please anyone help me what is the exact connection between both and also mention use of BITCODE_ENABLE Clearly.
Thanks in Advance
adjusting intensity of image filter using slider in iOS [on hold]
I need to apply a filter on image that filter boosts the value of red colour in the image. it boosts it by multiplying the red value of each pixel in a factor. I need to control the amplification factor using slide bar
@IBAction func onSlider(sender: UISlider) {
let int = Slider.value
}
Visual Studio 2015: 'getversion.cmd' is not recognized as an internal or external command, operable program or batch file
This happens when I compile. I am on Windows 10.
Some more error text:
1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V140Microsoft.CppCommon.targets(123,5): error MSB3073: The command "getversion.cmd
1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V140Microsoft.CppCommon.targets(123,5): error MSB3073: :VCEnd" exited with code 9009.
Create singleton using swift language [duplicate]
This question already has an answer here:
- How to Create Singleton Object in swift 3 answers
Is this the best approach to create singleton using swift ?
class SingletonClass {
static let sharedInstance = SingletonClass()
private init() {
}
}
detecting the pallet in forklift
I'm using a kinect and having depth map and Ir image of a fork lift.
I would like to detect the pallet of the forklift. providing having the point cloud of the forklift and having the ir image. What algorithmic steps are needed to detect only the pallet which is should be the rectangular shape.
Changed .h file in C++ does not need to be compiled again?
I have the following question. After a successful compilation, if I compile it again after I only change some content in one of the .h files, the computer says:
make: Nothing to be done for `all'.
Can I force the compiler to compile again even if I have only modified the .h files?
Function pointer to a function that returns pointer
This is my c code giving error, please let me know what is wrong about it
int *doubleNum(int *a, int *b)
{
int c = (*a) + (*b);
return &c;
}
int main()
{
int a = 2, b = 2;
int (*p)(int*, int*);
p = &doubleNum;
int *c = (*p)(&a, &b);
cout << (*c);
return 0;
}
How can you create an accessoryInputView in a Storyboard design?
I am trying to create an accessoryInputView to augment the keyboard with some app-specific keys.
I am using a Storyboard based design approach to keep the the UI separated from the application logic.
I cannot seem to understand how to create the new view and associated it with the textView. Is it possible?
Beautify NSLog of NSArray & NSDictionary
I'm dealing with deeply nested NSArray's and NSDictionary's and it's very time consuming to say the least. [data objectatindex:0] valueForKey:@"blah"] etc etc
Does anyone know of a nice iOS category to recursively log the structure, highlight the type and show the values?
Might be asking a bit much but you never know :)
iOS 10: orientation change has no effect
When I rotate my device, the usual methods that were getting called just fine in my apps in iOS 9 are no longer being called:
- traitCollectionDidChange
- viewWillTransitionToSize
- willRotateToInterfaceOrientation
- shouldAutorotateToInterfaceOrientation
- preferredInterfaceOrientationForPresentation
Is there some change that is required to make rotation work again?
Puzzled...
Segmented Control Container View and UITableViews
I have a View controller with a segmented control in the navigation bar with 3 sections. All three sections will show the exact same kind of cells but the data will change. Is it more efficient to have 3 containers and hide/show them to match what data should be on screen, or should reload the table with different data?
How to print the #define statement?
How can I get cerr
to print 5 < 6
as opposed to statement_
? I have access to Boost and Qt.
using namespace std;
#define some_func( statement_ )
if( ! statement_ )
{
throw runtime_error( "statement_" );
}
int main()
{
try
{
some_func( 5 < 6 );
}
catch(std::exception& e)
{
cerr << e.what();
}
}
How to centre a label on an image in iOS?
I want to centre a label inside an image that I have created in Xcode. But I can’t seem to find a way to do it. It will be just like a jumbotron, on the upper part of the app. And it will write something inside of it perfectly centred. Is there a way to this?
How do I safely pass objects, especially STL objects, to and from a DLL?
How do I pass class objects, especially STL objects, to and from a C++ DLL? My app has to interact with 3rd-party plugins in the form of DLLs, and I can't control what compiler these plugins are built with. I'm aware that there's no guaranteed ABI for STL objects, and I'm concerned about causing instability in my app.
How to manually import the pop animation library
My project did not use cocoapod, manual import is always wrong.
dyld: Library not loaded: @rpath/pop.framework/pop
Referenced from: /Users/wajiu/Library/Developer/CoreSimulator/Devices/0491E958-0495-435C-8CC3-F42252FBCDD3/data/Containers/Bundle/Application/ED44737E-AD08-4D89-937C-8A14AED0CE09/wajiuApp.app/wajiuApp
Reason: image not found
How to create a web-view for iOS/Android?
I am in the process of creating an interactive pie-chart that works on Android and iOS.
I have the pie chart in the [following link]
1 which works on browser.
Please help me to create a web-view for it that works on both platforms properly.
Youtube ads in iOS App
Ok so I am looking to embed a webpage into my iOS app that will show the latest uploads from my youtube channel. However these videos are monetised and will therefore sometimes show ads. Does anyone have any experience with apple's policy on this? I do believe that even iframe videos can have ads on - is this correct?
My application runs very slow when installed from the App Store
vendredi 5 août 2016
Swift - Trim String in Array
I have a String
Array
where I have need to trim the Spaces in each string..
Please let me know for any simple way without looping them in for loop.
Ex: ["Apple ", "Bike ", " Cat", " Dog "]
I have an Array
like this. I want all these spaces to be trimmed.
Change effect on UIVisualEffectView
is there a way to change the Effect on a UIVisualEffectView? In my App I create a UIVisualEffectView in Storyboards and then I want to change it toLight or Dark on usersettings...
I only see a "initWithEffect" and the "effect" property is readonly :(
So, any Idea on how to solve this?
Thanks, Urkman
Returning true or false in c++
When I run a method of type bool in c++ with a return statement like so:
bool method() {
return true;
}
there is no output at the console. To get output, I have to do:
bool method() {
cout << "true";
return true;
}
Is this the right approach?
Unable to understand that why previous view open without any button action perform?
i have two view in my app there are one button in first view so when i click on this button then second view open
My problem is on second view when i horizontally swipe or scroll then why first view open without logout process or back button action perform?
please some one help me
Count elements in union of two sets using stl
I have two sets and I want to know how many elements there are at least in one set. It is a function set_union
in <algorithm>
which writes the union in another set, but I want only the number. Can I find it using stl without saving elements?
FMDB check if empty method and move forward separation
In FMDB the next
function (as in if a!.next {}
) does both checking if there is another row and also moving forward if there is another row, can we do these things separately, like only check if there is another row?
I have read the documentation but there seems no such direct method.
What is an inline variable and what is it useful for?
At the 2016 Oulu ISO C++ Standards meeting, a proposal called Inline Variables was voted into C++17 by the standards committee.
In layman's terms, what is an inline variable and what is it useful for? How should it be declared, defined and used?
Received error "Value of type ... has no member 'frame'"
PLEASE help me with this ive tried like 50 different things on this one.
this is for a view controller for multiple pages, im pretty new to this so please if you answer try to answer as if you're teaching some one new
simulate xcode without development account
We have an app in Xcode from our old developers. We are in the registration process for an apple developer account, but on internet I read it can take a couple of weeks before it gets approved.
Is there a way I can simulate the app (like with TestFlight) without sending the actual code to potential new developers?
Two GoogleService-Info.plist files in the same project
Recently I installed google SignIn SDK with a GoogleService-info.plist
file to enable my app login with google accounts. But now I'm going to add the FCM(Firebase) to enable the notifications and I need to add another GoogleService-info.plist
but the project can't have two files with the same name.
How can I solve this?
How do I see what a file looks like after preprocessing?
How can I check the results of preprocessing? For example, say I have the following code:
#define CONCATENATE(X, Y) X ## Y
#define STRING_1 First
#define STRING_2 Second
#define STRING_3 CONCATENATE(STRING_1, STRING_2)
Is there a way to make sure STRING_3
will be expanded to FirstSecond
later in the program?
Swift assigning a check mark to an item in an array and storing in NSdefaults
So i have code like so
var item1Checked = true
var item2Checked = false
var array = ["item 1","item 2"]
and I want the app to store wether or not they have been check marked or not in NSUserDefaults. The array is already set up to be stored in the NSUserDefaults How would I accomplish this?
UISplitViewController with drop shadow possible?
Using a UISplitViewController
, I am trying to achieve an effect like this:
Is this possible while using a UISplitViewController
? I am not seeing any way to have a detail view cast a shadow on the rootView
...
Using the Watson Speech to Text service in an iOS app with Bluemix
We are creating an iOS application on Bluemix and we are trying to link the Speech to Text service. We've bound the service to the application, but now we don't know how to utilize the service within our app.
How do we use the Speech to Text API in our iOS app with our back end hosted on Bluemix?
About iOS storyboard ,i can't Specify a imageview as the parent view for a imageview
I'm trying to add an imageview as an imageview childview,but i can't do it.
first i add a imageview A,than i add a new imageview B, i want A become the parent view of B, but i can't do it Please look at attached screenshot.
Swift: How to play video and audio from different files?
I try to play two instances of AVPlayer, one for several audio files and the other for the video. When the video loads, the music stops. When I desactivate the video, the music play correctly.
How is it possible to play video file and audio files together, at the same time with Swift (2.x) on iOS ?
Thanks,
HealthKit - Does Source Queries return an App when user Did Not Allowed access or turned all Categories Off?
I will check if our Users have certain App installed.
If they do:
I want to know if they have allowed Access to HealthKit (if possible to know allowed categories)
So, what does a Source Query returns if an App has been allowed or denied access? What if the app is not installed?
How to project IR image on a 2D plane using OpenCV and PCL
Push notifications not received
I am implementing push notifications in my app, everything seems fine but the push notifications doesn't received at my device.
I got the response when fire a notification from the URL as above;
"Connected to APNS Message successfully delivered".
But after that there is no notification at my device. Please suggest me how to resolve this.
Is for (auto& a : a) grammatically right?
For example, I defined an multidimensional array
array<array<array<int, 3>, 4>, 5> a;
And I loop it
for (auto& a : a)
for (auto& a : a)
for (auto& a : a)
a = 1;
Is that right in grammar? I tested in VS2015. No compilation errors.
Are Firebase queries a scalable
In my app to check for if an email (and username) is taken when signing up I use queries like this...
let emailRef = Firebase(url: "https://photocliq5622144.firebaseio.com/users")
emailRef.queryOrderedByChild("email").queryEqualToValue(email.text!.lowercaseString).observeEventType(.Value, withBlock: { email in
Would this work well with hundreds or even thousands of users (is this scalable)?
iOS Launch Screen Cuts into Splash Animation
I have a splash animation that is being cut into for the first ~0.4 seconds by the launch screen. I do not want to remove the launch screen. I was wondering if I could set the splash animation to play only after the launch screen closes. I would rather not hardcode a delay of 0.4 seconds if possible, as it feels like a hack.
I can't connect button to @IBAction
I'm stuck after attempt to connect button to IBAction
. Could you help, please? It doesn't show me any possibility to connect:
here goes the function of my @IBAction
Crosshatch in IOS using CoreGraphics?
How would one crosshatch (apply a set of parallel lines at 45 degrees) across the fill of a shape in IOS using core graphics? Sample code?
(I'm specially interested in use with an MKPolygon in MKMapKit, however for the moment just trying to see if it's possible in a UIView using drawRect?. So fill the background of a UIView with crosshatch'ing)
jeudi 4 août 2016
Streaming vs Downloading for short videos on iOS
I have a bunch of videos that I need to play in an iOS app and I'm trying to decide which format to use.
All the videos are about 10-15s long - will HLS streaming be faster / less data intensive, or is there a bottom duration threshold where downloading the whole video as an MP4 would actually be faster?
How to convert a website to iOS app
I have developed a website, and now I would like to transform this website to an iOS application.
There is a tool in Android which is called "Website 2 APK Builder" which does what I want. I don't know if there is something similar in iOS.
If not, how could I do this, without using any framework if possible?
How can adjust search bar size of UISearchDisplayController
I am using UISearchDisplayController using nib file.But in that when I am going to search at that time search bar frame's size automatically resize as view's size.I have made changes with its contentStretch ,frame ,and also try to made other changes but could not fix it's size.So if you have any suggestion for it so please tell me. Thanks
SMS or Email for Firebase App Invite iOS?
When creating an App invite, will the dialog box give the user the choice of SMS or Email invite for a friend? I want the SMS, if so is there any additional set up or security needed to access the contact list and get a SMS message number? Any additional info on advanced options for new Firebase App Invite would be welcome.
Qt Creator on Mac, vertical selection possible (without mouse)?
How to do vertical selection to edit multiple lines at the same time?
I tried Shift+alt (https://bugreports.qt.io/browse/QTCREATORBUG-7773) but do not seems to work here.
In Windows I used to do that with Alt+Shift on Qt Creator and Ctrl+Alt on Sublime 2.
Qt Creator on Mac, vertical selection possible (without a mouse)?
How to do vertical selection to edit multiple lines at the same time?
I tried Shift+alt (https://bugreports.qt.io/browse/QTCREATORBUG-7773) but do not seems to work here.
In Windows I used to do that with Alt+Shift on Qt Creator and Ctrl+Alt on Sublime 2.
Qt Creator on Mac, vertical selection possible?
How to do vertical selection to edit multiple lines at the same time?
I tried Shift+alt (https://bugreports.qt.io/browse/QTCREATORBUG-7773) but do not seems to work here.
In Windows I used to do that with Alt+Shift on Qt Creator and Ctrl+Alt on Sublime 2.
change view from view will appear
I am checking if the user is logged in and if it is I want to go straight to the main menu (skipping login screen) right now i have this in the login viwillAppear
if currentUser != nil {
self.performSegueWithIdentifier("login_success", sender: self)
}
It does go into the if statement but it does not change views. thanks
GCDWebServer how to add custom parameter to the request(GET/POST)
[_webServer addHandlerForMethod:@"GET" path:@"/111" requestClass:[GCDWebServerRequest class] asyncProcessBlock:^(GCDWebServerRequest *request, GCDWebServerCompletionBlock completionBlock) {
GCDWebServerDataResponse *response = [GCDWebServerDataResponse responseWithJSONObject:@{
@"123":@"123"
}];
completionBlock(response);
}];
I am an iOS developer with ObjC, found GCDWebServer very useful.but I want to simulate for setting my custom request(like json dictionary @{@"name":@"jim",@"age":@"20"}) ? I do not know how, can some one help me ,thx! (support GET/POST)
FIRApp configure fails w/ "Configure Durable Deep Link fails"
Just started w/ Firebase and the first call of the first app fails -- yeah! [FIRApp configure] throws an exception: "Configure Durable Deep Link fails". There's a GoogleService-info.plist but affect no entry for deep links. Tried toggling a few of the IS_* fields but no luck. Is this something to be setup on the Dashboard? Are the Pod/Frameworks in github somewhere?
Digits in float and double variable
Why is the number of digits stored by both float as well as double variable same, isn't double supposed to store more digits than float
#include <iostream>
using namespace std;
int main(){
double a = 3.141528579238;
float b = 3.141528579238;
cout << a << " " << b;
return 0;
}
I'm getting this as my output
3.14153 3.14153
UITextField having bottom border only in Objective-C
I am creating UITextField
programatically and i am trying to create a textField
that has only bottom border as given in the figure. Please help this problem in objective-c programatically ?
How does guaranteed copy elision work?
At the 2016 Oulu ISO C++ Standards meeting, a proposal called Guaranteed Copy Elision was voted into C++17 by the standards committee.
How exactly does it work? Does it cover some cases where copy elision was already permitted, or are code changes needed to guarantee copy elision?
which way do i use for loading image from photo library?
C++ reference value working like a macro? [on hold]
I'm wondering about C++ reference value working mechanism.
For this code, I think that it should be return error at position 1 but it return the error at position 2. It seems referencing variable works like a macro. Is it right??
void function()
{
foo* a = NULL;
int& b = a->member(); /// position 1
cout<<b<<endl; /// position 2
}
DTMF tone detection during incoming oncall in iOS
How to include a C++ lib? Codelite
I searched a lot on the internet but couldn't find a solution to my problem. I am trying to include C++ libraries such as libcurl and boost.
Instead I found how to do that on Eclipse and tried to do similar things but it didn't work or at least I couldn't make it. Can you guys show me a tutorial or a video?
Setting CXXFLAGS for Xcode project
ALL,
I'm trying to compile my program on OSX using Xcode 5.1.1. I did find where to set C++11 kind, but now I need to set "-std=libc++". Otherwise I'm getting compilation errors.
Could someone please help?
Thank you.
[EDIT]
The error received is
type_traits: file not found
[/EDIT]
Get pointer to constant from a method as pointer to pointer
How to download Swift Playground ipad app?
I see so many articles of people who have tried Swift Playground app on iPad for development, that Apple announced in WWDC. But I am not able to find an ipa/ download option from the developer.apple.com. The public version is coming out in July, but I am not sure if a registered developer(with a developer account) can get access to it right now.
Calculating the movement anlge of iOS device
I am building the iOS app to get the pano image from camera. I need the sensor to know the movement of the device(from top to bottom, right to left), so I have got some info such as roll, pitch and yaw using CMDeviceMotion.
But I am not sure how I can know the movement angle (right to left and top to bottom).
For each in c++ and assigning values to std::vector
How can I assign values to elements of std::vector
using "for each" instruction?
I tried to do something like this:
std::vector<int> A(5);
for each(auto& a in A)
a = 4;
But then I get the following error:
error C3892 : 'a' : you cannot assign to a variable that is const
Calling custom objects whose names contain numbers in Objective-c
I have declared custom objects in Objective-c project:
Student* student1 = [[Student alloc]init];
Student* student2 = [[Student alloc]init];
Student* student3 = [[Student alloc]init];
Student* student4 = [[Student alloc]init];
Student* student5 = [[Student alloc]init];
Student* student6 = [[Student alloc]init];
How can I call them in cycle
for (int i=1; i<=6; i++)
{
} ?
Can i uses Passbook/Wallet for Event Invitation?
mercredi 3 août 2016
Centered axis using ShinobiCharts (iOS)
I followed the Quick Start tutorial about Shinobicharts, and I'm wondering how to get a centered graph like this one cos graph
I succeded to center the x axis using this :
chart.xAxis.axisPositionValue = @0;
How can I center the y axis as well? Thanks in advance!
UIPageViewController scrolling issue with UITableView
Nested Expandable UITableView from Plist in ios
C++ How do we differentiate postfix and prefix operator-overloaded functions? [duplicate]
This question already has an answer here:
How do we explicitly implement a postfix unary operator overloading function?
eg. 'obj++' Vs '++obj' ?
Both are unary operators, right?
C++ STL: Why does std::pair expose member variables?
From http://www.cplusplus.com/reference/utility/pair/ we know std::pair has two member variables, first
and second
.
As far as I know, it will be better if encapsulating two member variables above and giving a getFirst();
and getSecond();
, so why does STL design like that?
How to auto resize label font size in iPhone 6 plus?
The fonts I see on iPhone 6 Plus seems too small. Fonts throughout the app differ in sizes. So the font size is not same in all screen. And I know that by putting condition to identify device and setting font size is not a good practice. I am not using autolayout. Everything I create is using programming. So what is the best way to auto size fonts?
C++ sorting in lexicographically order
here is my code :
sort(S1.begin(), S1.begin()+4);
for ( int i = 0; i < S1.capacity(); i++ )
cout << S1[i]<<endl;
I am getting this : a aa aab ab b a aa aac ac c
but I should be getting this: "a", "aa", "aab", "aac", "ab", "ac", "b", "c"
what am I doing wrong ?
CMake target_include_directories and target_compile_definitions alternative
CMake 2.8.11 introduces target_include_directories
and target_compile_definitions
. However some of the devices I am working one has 2.8.9. And I don't want to compile and build latest CMake there. So what is the alternative that I can use conditionally for those devices ?
How to check whether this cmake have target_include_directories
or not from inside the CMakeLists.txt ?
performing an operation if user doesn't give input in c++ [duplicate]
This question already has an answer here:
Is there any way in which I could perform a particular operation if user doesn't give input within a certain time interval in c++?
how to change ISO 8601 time to RFC 2822 date time format in objective c
I want to change ISO 8601 time 2016-06-13T04:48:10.834Z
into RFC 2822 time result will be Mon, 13 Jun 2016 10:18:10 +05:30
.
How we can convert it, I searched many times but did't get proper result.I am giving a online link which is giving result as I want.
http://coderstoolbox.net/unixtimestamp/
Thanks
Beacons: Android / Iphone Bluetooth range
we try to develop a ios and andorid app with beacons. it only uses the entry and exit event.
now our problem is that the android gets the enter event at ~7meter and the iphone ~1.5meter.
the beacon settings are TX Power -23dbm, Measured Power -80.
is there a way to adjust the android or iphone to get the same range?
how to unit test uploading happens when the app is running in the background
I want to write a unit test function, which aims at testing uploading happens when the app is running in the background. It is generally like this:
func checkBackgroundUploading() {
set the UIState to be background
write a record and upload it to database in this UIState
}
I know how to do the second step, but how to set the UIState to be background?
How to use one IBAction for multiple buttons in Swift?
I have multiple buttons each one with the ability to switch the language of the app. Instead of having to create multiple IBActions for each button is there a way to have them all connected to one IBAction and change the language based on the button pressed? I'm thinking a switch statement would be good to use in this situation but not exactly sure how to set it up.
How can i change Navigation Title color, Character spacing & Font style from Storyboard for iOS?
I am able to change character spacing, title color & font style programmatically. Here is the sample code
let titleLabel = UILabel()
let colour = UIColor.redColor()
let attributes: [NSString : AnyObject] = [NSFontAttributeName: UIFont.systemFontOfSize(12), NSForegroundColorAttributeName: colour, NSKernAttributeName : 5.0]
titleLabel.attributedText = NSAttributedString(string: "My String", attributes: attributes)
titleLabel.sizeToFit()
self.navigationItem.titleView = titleLabel
but i want to change these three from storyboard. Is there any possible way?
Why server request response time in iOS more than Android?
I am working on iOS app development. I noticed that when request to server from iPhone it's take more time compare to Android device request-response time. For both, I use same rest API with same server but response times are difference(minimum 2-5 second late response in iPhone device comparing to Android device).
In iOS I use AFNetworking, in android AsyncHTTPClient library and server side PHP used.
iOS App Store - how does localized language settings work?
Is it possible to make an mobile (iOS) application connect to secured network?
So I was wondering if it is possible to make the application setup a connectin to a (secured) network? I know this is possible on android but preferably I would like to make a hybrid application or if necessary android/iOS native apps.
So the application knows the required information about my wifi, is it possible to make a button that makes my device connect to this network?
Running my c++ code in Code::Blocks gives me a blank window [duplicate]
This question already has an answer here:
I read that disabling Avast does the trick then I've tried it and it does but how do I fix this without having to disable Avast? Please help me. Sorry I sound so dumb. Thanks.
The operation between viewWillAppear and viewDidAppear?
I change the navigationBar's height in the method viewWillAppear
In first time, it works and the bar‘s height isn't changed. But when I push again, the bar's height change to 44
if I change the bar's height in viewWillAppear
and viewDidAppear
, it works and isn't changed
So, Is not a system between these two methods to do what action?
Unable to hide view in SecondViewController class by calling function in FirstViewController Class
Function call in FirstViewController is -
@IBAction func redViewAct(sender :UIButton) {
let nextview = self.storyboard?.instantiateViewControllerWithIdentifier("ViewController1") as! ViewController1
self.navigationController?.pushViewController(nextview, animated: true)
let f1 = ViewController1()
f1.view1Show()
}
Method in second class -
@IBOutlet weak var redView: UIView!
@IBOutlet weak var blackview: UIView!
override func viewDidLoad() {
super.viewDidLoad()
}
func view1Show() {
redView.hidden = false
blackview.hidden = true
}
'reload' vs 'reloadFromOrigin' in WKWebView
What's the difference between reload
and reloadFromOrigin
in WKWebView? Apple's documentation says that reloadFromOrigin
:
Reloads the current page, performing end-to-end revalidation using cache-validating conditionals if possible.
But I am not sure what that really means.
Remove object from [UIImageView]
I want to know if there is a way to delete an "object" (UIImage) from a [UIImageView]. I have connected 36 UIImages (@IBOutlets) to 1 [UIImageView] and would like to delete the fifth one, something like this;
@IBOutlet var ImageViews: [UIImageView]!
ImageViews.removeAtIndex(ImageViews[5])
But the only code I found directly to a UIImageView was .removeFirst()
which I don't know how to use.
How to save a resultSet in 2 tables with relationships and show it in table view with headers
Guys I need to save my json in sql db and show it in table view with headers. For example, own app 'Contacts' in iPhone. This is have a list of contacts sorted by symbol in header.
I have this json:
I use FMDB in swift 2. Anybody help.
How to apply design guide for iPhone 6?
I asked a designer for an app though I'm new to iOS. He gave me the design guide only for iPhone 6.
How to apply the design guide for other devices like iPhone 4S which has lower resolution and different ratio.
How would I apply the design guide? I'm currently using auto-layout but I do not understand auto-layout totally.
Are there any references for this issue?
mardi 2 août 2016
read 64 and 32 bits registry key at the same time from a 32 application
I have a 32bits application that must read resigtry information about an other application whitch might be a 64bits or a 32bits application. The problem is that I have to check in the both regisry 64 and 32. Is there any other possibility to do that rathter than call 2 times the function "RegOpenKeyEx" 1 time using the mask "KEY_WOW64_32K" and then if failed to open use the the mask "KEY_WOW64_64K" ?
Recursive method Objective-C
I'm checking is first letter of string is 0, if it is remove it and call again method to check is there is still 0. I've debugged this and it seems like when it accomplish number without 0, it goes backwards. Code:
-(NSString *)deleteZerosOnFirst:(NSString *)card
{
NSString *firstLetter = [card substringToIndex:1];
if ([firstLetter isEqualToString:@"0"]) {
card = [card substringFromIndex:1];
[self deleteZerosOnFirst:card];
NSLog(@"CARD: %@", card);
return card;
}
else {
NSLog(@"CARD: %@", card);
return card;
}
}
How to add actions to UIAlertController and get result of actions (Swift)
I want to set up four action buttons on my UIAlertController
with a title for each and I want to return the title of the button that is pressed. In short, here is my plan:
Create a new alert controller
for i in ["hearts", "spades", "diamonds", "hearts"] {
add action button to alert
set title of button to i
}
return currentTitle() of action button that was clicked
How to add UICollectionView in UICollectionView (programmatically)
Watching a youtube, I'm studying. I want to change parts. ImageView want to use instead UICollectionView. So I want to scroll the image horizontally. I would like to know how to add UICollectionView. How can I ...?
code: https://github.com/purelyswift/facebook_feed_dynamic_cell_content
Resizing image results in low resolution
So I am trying to use a specific PNG image for my map annotation. The original image is 761 x 761 and the resized annotation image that shows up in my app is all blurry and low-resolution-looking. Any idea why that is?
chargerAnnotationImage = UIImage(named: "ChargerGreen")!
let size = CGSize(width: 25, height: 25)
UIGraphicsBeginImageContext(size)
chargerAnnotationImage.drawInRect(CGRectMake(0, 0, size.width, size.height))
let resizedImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
return resizedImage
Thank you!
This action could not be completed. Try Again (-22421)
I am trying to upload an Apple TV App to the App Store for testing purposes, but I got the issue This Action could not be completed. Try Again (-22421)
as in the below image.
So what can I do?
NSFetchedResultsControllerDelegate methods don't get called
I have this in my viewWillAppear method
[RPCoreData
getFetchedControllerForCategoryDiscoverDelegate:self completion:^(NSFetchedResultsController *controller) {
self.fetchedResultController = controller;
self.fetchedResultController.delegate = self;
}];
and this in my CoreData.m
+ (void)
getFetchedControllerForCategoryDiscoverDelegate:(id<NSFetchedResultsControllerDelegate>)delegate
completion:(void (^)(NSFetchedResultsController *controller))
completion {
[MagicalRecord saveWithBlock:^(NSManagedObjectContext *localContext) {
NSFetchedResultsController *controller = [ItemData MR_fetchAllGroupedBy:@"category.id"
withPredicate:nil
sortedBy:@"category.id"
ascending:NO
delegate:delegate
inContext:localContext];
completion(controller);
}];
}
How to use QVector as a member of class
My class below
class MyWidget : public QWidget
{
Q_OBJECT
public:
...
QVector<double> time; //1
QVector<double> other; //2
....
}
but I get error when compile. The program has unexpectedly finished
and myprogram.exe crashed
. I compile successfully when I delete line 1,2 in code above.
Are there something wrong with my code? How could I use QVector as a member of class?
Which Boost features overlap with C++11?
I put my C++ skills on the shelf several years ago and it seems now, when I need them again, the landscape has changed.
We have got C++11 now, and my understanding is that it overlaps many Boost features.
Is there some summary where those overlaps lie, which Boost libraries going to become legacy, recommendation of which C++11 features to use instead of boost ones and which better not?
Does SpriteKit support dense tessellation of a sprite / texture / shape so it can be warped freely?
For example if you have an image of a trampoline, and a character jumping on it. Then you want to animate how the trampoline bends down in the center.
To do this I would have to take a bitmap and apply it to a densely tessellated OpenGL ES mesh. Then apply texture to it. Then deform the mesh.
Does SpriteKit support this or can it only display textures as-is?
UILabel doesn't show up in my application
First image shows what's on my storyboard, second image shows what's on my simulator. Label won't show up. I try to add missing constrains and all that, still doesn't work. Besides the label, I only have a map view , nothing else.
Want to see if any value in one vector matches the value in another vector
I am writing code for a game called Bulls & Cows. I have already solved seeing if the value of one vector (if they are in the same index) are identical. However, I am not sure how to write a for loop that will move through two vectors and see if any value in one matches the value of any other index in the other vector. I would appreciate any help. Thank you!
add Strings to a var pickerDataSource : [String] = [String]()
I integrated a UIPickerView in my view and I want to add Strings dynamically.
here is my var declaration
var pickerDataSource : [String] = [String]()
how do I add String in a for statement ? such as
for anItem in json as! [Dictionary<String, AnyObject>] {
let nom = anItem["nom"] as! String
let prenom = anItem["prenom"] as! String
//add new String to pickerDataSource
}
Prevent xml bomb XercesDOMParser - C++
I am using XercesDOMParser to read an xml file in linux (c++), I want to prevent xml bomb (Billion laughs) so I set these properties:
parser->setDoNamespaces(true)
parser->setDisableDefaultEntityResolution(true)
parser->setEntityResolver(NULL)
parser->setSkipDTDValidation(true)
However, it doesn't help and bomb still remain. Do you know how to prevent it (I have to use xerces with DOM only)
10x!
Find SECOND shortest path in directred graph
I need a way to find second shortest path in directed graph, on top of that second shortest path cannot include the shortest path entirely. I am aware of dijkstra algoritm, but I am unable to figure out a simple way on how to change that algorithm to give me a second shortest path in a reasonable amount of time. Algorithm, sudo-code or c++ example, one of the three will be greatly appreciated.
How do print the following pattern in C/C++?
(For n=4)
1
2*3
4*5*6
7*8*9*10
7*8*9*10
4*5*6
2*3
1
Printing the above half triangle is quite easy but I couldn't figure out how to print the lower triangle.
This is how I printed the above half triangle.
int num = 1;
for (int i = 1; i <= n; i++)
{
for (int j = 1; j <= i; j++)
{
cout << num;
if (i != j)
{
cout << "*";
}
num++;
}
cout << endl;
}
How to tile a Sprite Node's Texture?
Using SpriteKit, how would I tile a SKTexture that repeats itself horizontally to fill the width of the SKSpriteNode? This is what I have so far - only stretches the texture.
var header = SKSpriteNode()
let headerTexture = SKTexture(imageNamed: "inGameHeader-1.png")
header = SKSpriteNode(texture: headerTexture)
header.position = CGPoint(x: 0, y: CGRectGetMaxY(self.frame)-39)
header.size.width = CGRectGetWidth(self.frame)
header.size.height = 150
header.anchorPoint = CGPoint(x: 0,y: 1)
addChild(header)
Incompatible library version: libopencv_highgui.2.4.dylib requires version 13.0.0 or later, but libjpeg.8.dylib provides version 9.0.0
Im trying to run the runtest of caffe to complete the instalattion, but I get the following message:
dyld: Library not loaded: /usr/local/opt/jpeg/lib/libjpeg.8.dylib Referenced from: /usr/local/opt/opencv/lib/libopencv_highgui.2.4.dylib Reason: Incompatible library version: libopencv_highgui.2.4.dylib requires version 13.0.0 or later, but libjpeg.8.dylib provides version 9.0.0 make: * **[runtest] Trace/BPT trap: 5****
Can anybody help me?
Thanks!
PLP feature extraction from a signal
I am wondering if anyone knows how to calculate the PLP(Perpetual Linear Prediction) features of an audio input. I am looking for two things:
there is severe lack of good documentation that may explain what and how exactly these features are calculated. So I'd appreciate if anyone can point me towards a documentation maybe?
Any c++ code snippet that shows the implementation maybe?
iOS: How to talk to Apple's SD card reader?
I want to get a list of the files on the SD card that is in the Apple SD card reader. I can usually create an EASession, although that is not reliably happening, but I also have no info about the protocol, called com.apple.accessory.updater.app.20.
Can anyone here fill me in about the Apple SD card reader i.e. part #A1595? How do I talk to it?
Why is decltype(a, b) is evaluated to a reference?
According to this answer, ref
should be an int
.
But for some reason it evaluated to int&
, both in gcc and MSVC2015, while decltype(b)
is correctly evaluated to just int
. Why so?
int a = 1, b = 2;
decltype(a, b) ref; // ref is int&
decltype(b) var; // var is int
C++: Remove == or any other operator for specific types
If I have a class called classA that has a typecast overload of classB and classC, how can I disable the == operator for classA being typed as classC?
class classA{
operator classB();
operator classC();
//Remove this comparison possibility:
operator ==(classC firstObject,classC secondObject)
}
Follow over from this question:
Ambiguous overload when using many typecasts operator overloads
lundi 1 août 2016
How can I change different UINavigationBar Style in a UINavigationController?
VS2015 CE - Cannot Find Link.exe
I am trying to compile some open source software (Rust language) that requires Visual Studio 2015 with C++ support. My PATH variable must include the location of link.exe.
I presently have Visual Studio 2015 Community Edition installed, and both of the C++ Redistributables (x86 and x64). I cannot locate link.exe in any of the directories.
Where can I find link.exe? Does it live somewhere else? Is my installation damaged?
Installing libpqxx
I'm trying to install libpqxx to visual studio 2013. I have postgreSQL installed and working, but when I attempt to install libpqxx by running "nmake /f win32/vc-libpq.mak ALL" from the visual studio command line I get two errors. First I get bad_alloc, then it tells me "fatal error U1077" and gives the path to the visual C++ compiler.
Does anyone have any idea what could be done to fix this?
Effects11 unresolved "D3DX11CreateEffectFromMemory"
I'm getting the following error while trying to compile: error LNK2001: symbole externe non résolu D3DX11CreateEffectFromMemory A:Force_MemoryPoolsRenderer.obj Pools
I have compiled the library from the SDK, added both Inc and the folder where Effects11.lib got compiled to VC++ Directories, included both d3dx11effect.h & Effects11.lib to my file and I still get that error. How can I fix this?
Do primitive types have also constructors in C++?
I have read in Dr. Bjarne Stroustrup Book "The C++ Programming Language" 3rd edition that built in types have also constructors in C++ in section 10.4.2.
But then the following link says that POD types can't have constructors:
http://www.parashift.com/c++-faq-lite/pod-types.html
Which is true? Do primitive types have also constructors in C++?
After 24 hours Firebase stops working but if I update pods it starts working again
I am working on Firebase and I have one query. I have login through Firebase and have fired insert, update, delete queries.
Here is my code:
[self.data observeEventType:FIRDataEventTypeChildAdded withBlock:^(FIRDataSnapshot * _Nonnull snapshot) {
NSArray *array = snapshot.value;
NSLog(@"%@",array);
}];
This block works perfectly but after every 24 hours it stops calling. However, if I update pod then again it starts working.
Cordova Detect if user is leaving app or starting call (iOS)
I recently discovered Cordova, and started building an app that i've been thinking of. I need to figure out if i, through Cordova, can detect if the user is leaving the app (not locking the phone), or e.g. picking up a phone call, is there an event for this that i can bind to? I've searched through the most npm-library packages and did a lot of research but can't really find a good answer.
Is there analogy of boost compute function in Thrust?
I wonder if there is an analog to boost compute Function (http://www.boost.org/doc/libs/1_61_0/libs/compute/doc/html/boost_compute/advanced_topics.html#boost_compute.advanced_topics.custom_functions ) that turns into kernel and can be created as embedded inline code that turns into a kernel?
OpenCV .xml file copying for object detection
I'm new to Visual Studio, I want to run the OpenCV object detection code, this site says:
Remember to copy the files haarcascade_frontalface_alt.xml and haarcascade_eye_tree_eyeglasses.xml in your current directory. They are located in opencv/data/haarcascades
Can someone explain me how to do that?
not sure whats causing these errors
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
I'm not sure what I changed or how to fix these errors:
Cannot find interface declaration for 'ViewController'; View controller cannot use 'super because it is not a root class
Replacing #define
I want to replace a
#define INTERVAL_MASK(b) (1 << (b))
with a inline function.
int INTERVAL_MASK(int b)
{
return (1 << b);
}
But I have a switch case
, which uses the preprocessor directive in the case
statements. How to go about converting this? Replacing the switch
with if
is the only option?
Opengl GLM 4000 errors
If I try including:
#include <glmglm.hpp>
it gives me 4000 errors in the error list, like this one:
Severity Code Description Project File Line Suppression State
Error (active) declaration is incompatible with "int __cdecl abs(int _Number)" (declared at line 284 of "c:Program Files (x86)Windows Kits10Include10.0.10240.0ucrtstdlib.h") Opengl2 c:Program Files (x86)Microsoft Visual Studio 14.0VCincludecmath 17
UIView alpha 0 but still receive touch events?
I am trying to hide a uiview but still have it receive touch events. I am setting the alpha to 0 like so:
mainView.alpha = 0.0
also I've tried setting this to true but it doesn't do anything
mainView.userInteractionEnabled = true
Trouble is it no longer receives touch events when I do this. How can I enable it to receive touch events but be effectively hidden?