Displaying parsed input in real time?
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...
Adding Parameters to Twitter API Using PHP
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
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
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
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
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)
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
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
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
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
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...
WooCommerce woocommerce_new_order_item hook
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
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
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
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?
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...