Found nil for optional value?
Vote count: 0 I just can not figure this out : print(module) print(Globals.sharedInstance.dataModuleName) let kind:NSString = module[Globals.sharedInstance.dataModuleName] as! NSString Will print this, and then crash for strange reason : ( //dic print { meta = no; module = IN; subject = LT; variable...
Angular 2 - Ahead-of-time compilation how to
Vote count: 0 I'm trying to bootstrap my Angular 2 RC5 application following this guide https://angular.io/docs/ts/latest/guide/ngmodule.html Below is my code import { AppModuleNgFactory } from './app.module.ngfactory'; import {platformBrowser} from "@angular/platform-browser"; platformBrowser().boo...
Woocommerce excluding current product from related products
Vote count: 0 I'm trying to exclude the current product by using the code below, but instead of excluding, it retrieves all the default posts and not products. Probably it's not working at all. <?php global $post; $terms = get_the_terms( $post->ID, 'product_cat' ); foreach ($terms as $term ) { $prod...
How to send notification with FCM XMPP
Vote count: 0 i need to send notification using fcm in android with xmpp. i tried to lot but not found any examples. Can anyone help me to finish this. i need to send a notification to particular device id using fcm without firebase. i need example asked 1 min agoEdgar prabhu Let's block ads! (Why?)
How to use Expanding Collection library
Vote count: 0 Hello all I'm trying to use Expanding Collections library for the development of my app, but I'm having a hard time following the instructions on how to set it up. I have installed the library via Pod, but I'm confused on how to link up the .xib file with the BasePageCollectionCell. Wo...
Where should i write my Flask application log?
Vote count: 0 I am using Flask application and default python logging lib for log When i am trying to log to /var/log/flask_app.log. Its give me permission error as i am not ru ing my flask with root. Which is right location to place logs for my application ? Can we place application log to /var/log...
php include is not working as expected
Vote count: 0 I am trying to put an include into my php page but I keep getting an error. This works fine: <?php session_start(); $_SESSION['LAST_ACTIVITY'] = time(); etc etc But if I put this into an include: <?php session_start(); $include ('sessiontimer.php'); etc etc with sessiontimer.php being:...
Listing Chrome users from outside Chrome
Vote count: 0 Chrom(ium) supports the creation of multiple users. These users end up having Profile folders created. For example, /User Data/Default, /User Data/Profile 1. How do I programmatically obtain the list of Chrome users as well as their respective profile directories. At first I thought it...
Default export in Python 3
Vote count: 0 In a project I'm working on, I'm separating a lot of bigger files into smaller pieces so they're easier to work with. One specific example is creating class based views from function based views in Django: # app/views/LoginView.py class LoginView(View): ... # urls.py from app.views imp...
MySQL Select all records
Vote count: 0 I have to tables: user and userimages. Right now, I'm using the following query: SELECT * FROM users u INNER JOIN userimages ui ON u.id=ui.userid; Yes. It retrieved the records if the userid and id is equal. What I really want to do is to select all records from table users even if its...
MySQL Error! Help mysqli_connect 2800/1045
Vote count: -1 We seem to be getting an error on my website when trying to load it up. Here is the error: Wa ing: mysqli_co ect(): (28000/1045): Access denied for user 'admin'@'localhost' (using password: YES) in /home/u616069576/public_html/inc/database.php on line 9 Failed to co ect to MySQL: Acce...
Subquery as a column : Nested Subquery
Vote count: 0 I have two tables 'Student' and 'Team'. i want to display count of student according to Team Name, Team_id from team is primary key. i tried like this (SELECT(SELECT team,count(*) as team FROM student GROUP BY team) AS total,(SELECT team_name from team WHERE team_id IN (SELECT team FRO...
Android - Running next if on second button click
Vote count: 0 as subject says I'm looking for a way to run first if on first click on the button and run next if on click on the button Here is what i tried final Button button = (Button) findViewById(R.id.welcomeButton); final TextView textView = (TextView) findViewById(R.id.welcomeText); button.se...
swap the values of 4 variables with jquery or javascript
Vote count: 0 Originally I was using the following to swap the values of 2 variables at random when the page loaded: var value1 = 260; var value2 = 325; var chosenValue = Math.random() < 0.5 ? value1 : value2; if (value1 == chosenValue) { var val = value1; } else { var val = value2; } if (value1 == ...
Google Excution API not accepting long json
Vote count: 0 I'm sending data to Google Execution API - I've got function in scripts to get parameter in json and put it in new Google Sheet. With small data it is working without a problem but I have big data to export - For example JSON that is sent in problematic export has 580k lines when forma...
how to set Date Time PHP? I ambegginer
Vote count: 0 I have only this field of php statment, and the output of this field is: August 11 2016 but how can I make this only 11 08 2016 ? <?php the_time(get_option( 'date_format' )); ?> asked 47 secs agoIamnderon Let's block ads! (Why?)
Schema Exception Hibernate One to Many
Vote count: 0 I am trying to do a simple One To Many relationship using Hibe ate. Idea is that one Order can have many Order items. I am not sure why am I getting this exception. I am fairly new to Hibe ate object relationships. Could you please point out if there is any configuration problem with t...