Displaying parsed input in real time?
◷
تاریخ انتشار: 1395/3/31 | ساعت: 10:21
Vote count: 0 I'm writing a program in NetBeans that allows the user to choose some computing equipment, hours to rent that equipment, and some other options. The program takes that input and calculates a price for the rental, which it displays in a text pane. At the moment, I've just got the text p...
Core Animation profiling: When an app is idle, should it be 0fps of 60fps?
◷
تاریخ انتشار: 1395/3/31 | ساعت: 8:07
Vote count: 1 I've been trying to optimize scrolling of my UICollectionView, and the Core Animation profiler has me puzzled... When the app is idle (no scrolling or interaction in anyway) I'm averaging around 59-60fps, but occasionally it will drop down to 7 or 12 fps: Is this expected behavior? Bec...
Python exception "can't multiply sequence by non-int of type 'float'
◷
تاریخ انتشار: 1395/3/31 | ساعت: 8:07
Vote count: 0 My 12 year old is lea ing python scripting. He is writing a very simple code to calculate the discount on a article. Following is the code and it throws the exception on the 3rd line in the code. The exception is: Traceback (most recent call last): File "C:/Users/basam/AppData/Local/Pr...
Adding Parameters to Twitter API Using PHP
◷
تاریخ انتشار: 1395/3/31 | ساعت: 8:07
Vote count: 0 I created my Twitter App using PHP, but I don't know how to add parameters in Twitter API, my code: $twitter_url = 'https://api.twitter.com/1.1/users/show.json'; // do not change it! $data = array('oauth_consumer_key' => $consumer_key, 'oauth_nonce' => time(), 'oauth_signature_method' ...
Migrating from SQLAlchemy core to ORM
◷
تاریخ انتشار: 1395/3/31 | ساعت: 6:47
Vote count: 0 Currently we only use SQLAlchemy core, so all the tables are defined using Table. Now, we would like to incrementally port the existing Tables to ORM and have new Tables use ORM from scratch. As an example, say we currently have Users = Table( 'users', # Table name metadata, Column('id...
Custom keyboard mimic the default IOS "globe" button
◷
تاریخ انتشار: 1395/3/31 | ساعت: 6:47
Vote count: 0 In IOS keyboards there is a globe button that if held will show a pop-up list of keyboards that the user can switch too. However in the KeyboardViewController class, the only method I see to make a keyboard switch button is the self.advanceToNextInputMode() The problem with this is tha...
MySQL left join with default values
◷
تاریخ انتشار: 1395/3/31 | ساعت: 6:47
Vote count: 0 I have a couple of tables, one with source data which I'll call SourceData and another which defines overridden values for a given user if they exist called OverriddenSourceData. The basic table format looks something this like: SourceData | source_id | payload | | 1 | 'some json' | | ...
Batch - findstr special characters
◷
تاریخ انتشار: 1395/3/31 | ساعت: 4:19
Vote count: 0 I try to find and move all files with the character "{" (without the quotes) for example filename{{xyz}}.txt My Code: @echo OFF setlocal enableextensions disabledelayedexpansion set "source=C:UsersOLD*.txt" set "target=C:UsersNEW" set "searchString=}" set "found=" for /f "delims=" %%a ...
Facebook sdk using c#.net (OAuth Exception - #1)
◷
تاریخ انتشار: 1395/3/31 | ساعت: 4:19
Vote count: 0 I am developing an app in .net framework using c# which integrate Facebook. I have following requirements for my app User can login to Facebook account User can view Friends list, Messages & Notifications. I successfully completed my 1 requirement. There is problem with 2 requirement w...
Python puts tabs in where none should be
◷
تاریخ انتشار: 1395/3/31 | ساعت: 4:19
Vote count: 0 Need help formatting my Python web scrape . For whatever reason when I get the info I need it seems that the words have been tabbed out of place and not sure how to fix it. Any help is appreciated Thanks import requests from bs4 import BeautifulSoup r = requests.get("http://www.canadia...
Appending data to a text file in Android
◷
تاریخ انتشار: 1395/3/31 | ساعت: 3:18
Vote count: 0 I am trying to add data to a text file in android using the code below but it only overwrites the data with one line of data. private void copyImageToMemory(File outFile , Float number) { try { BufferedOutputStream fos = new BufferedOutputStream( new FileOutputStream(outFile)); PrintWr...
Nested ng-app issue
◷
تاریخ انتشار: 1395/3/31 | ساعت: 3:18
Vote count: 0 I am trying to utilize ng-app with in another ng-app. Separately both ng-app's are perform their function but as they come inside each other it creates an error. for example <body ng-app> <div ng-app="MyApp" ng-controller="MyCtrl"> ----- </div> <div ng-controller="ctrl"> ........ </div...
sqlite or Sequlize seems to have broken my app
◷
تاریخ انتشار: 1395/3/31 | ساعت: 3:18
Vote count: 0 I have a node js app that doesn't work since I installed packages sqlight or sequlize. This is my index.js file: var express = require('express'), app = express(); app.get('/', (req, res) =>{ res.send('hello world'); }); I put runjs index.js in my terminal, response: Starting: index.js...
New MEAN stack form field works in Postman but not saved when form submitted
◷
تاریخ انتشار: 1395/3/31 | ساعت: 2:17
Vote count: 0 I have recently added two new fields to a form on a project I am working on and when I post/put a 'project', every field is uploaded except for the new ones, however, when I use Postman to post/put, those fields are sent and saved like all the others. When I console.log what is getting...
I am getting this error message every time I try to use git push command.
◷
تاریخ انتشار: 1395/3/31 | ساعت: 2:17
Vote count: -1 enter image description here I created a new repository in github and when i try to push using the old repository i get this error message. asked 2 mins agoSai Aravind Let's block ads! (Why?)
WooCommerce woocommerce_new_order_item hook
◷
تاریخ انتشار: 1395/3/31 | ساعت: 2:17
Vote count: 0 I am using the woocommerce_new_order_item hook in my functions.php file. The code I have is: add_action( 'woocommerce_new_order_item', 'wc_order_item_added', 1, 1 ); function wc_order_item_added($item_id, $item, $order_id) { global $mysqli; //$order = new WC_Order( $item_id ); $sql = $...
Converting opencv c++ interface to c
◷
تاریخ انتشار: 1395/3/31 | ساعت: 1:10
Vote count: 0 I am trying to convert C++ Opencv Interface code to C Opencv Interface code because my last project which i did years ago of face detection coded in C interface, for normal testing and algorithm checking i am trying to add this code snippet in it. I have done with detecting face, now i...
React componentDidMount not being called
◷
تاریخ انتشار: 1395/3/31 | ساعت: 1:10
Vote count: 0 So below is a component that I built: import React from 'react'; import ReactDOM from 'react-dom'; class DisplayBlogs extends React.Component { constructor(props) { super(props); this.state = { error: null, data: null } } componentDidMount() { console.log('WTF'); var self = this; var u...
Golang net/smtp send email over tls
◷
تاریخ انتشار: 1395/3/31 | ساعت: 1:10
Vote count: 0 The wiki example shows an example of sending mail on port 25, but Google SMTP Server requires tls over port 465. Can someone show an example using tls? asked 30 secs agouser5800226 Let's block ads! (Why?)
MySQL to JSON, how to get the right format?
◷
تاریخ انتشار: 1395/3/31 | ساعت: 0:04
Vote count: 0 So, I'm using a PHP-script to output MySQL to JSON, but I'm having trouble figuring out how to output the right JSON-format. Here's the PHP-script: $sql_query = "SELECT * FROM DiseaseData"; $res_sql = mysql_query($sql_query) or die(mysql_error()); $arr = array(); if(mysql_num_rows($res...