FAQ Database Discussion Community


Get random expression generator

javascript,node.js,expression,connect
I have a function that creates random integers but I am trying to refactor it to create random addition expressions instead. It's currently only still generating single integers. Then the consumer needs to log the sum of the random expressions that the producers are making. It's a work off of...

ActiveMQ http connection refused

java,http,activemq,connect
I am trying to connect my java client application to ActiveMQ over http, but keep getting an error: Failed to perform GET on: http://localhost:8080 as response was: Connection refused: connect This connections works why I connect with: tcp://localhost:61616 activemq.xml <broker> ... <transportConnectors> <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/> <transportConnector name="http" uri="http://0.0.0.0:8080"/> </transportConnectors>...

How to config `middleware` in connect server

angularjs,node.js,connect,stylus
I am using connect server with serve-static for my angular app. according to the stylus doc they ask to use the middleware (https://learnboost.github.io/stylus/docs/middleware.html) to utalize the .styl file. i tried but not working. In the connect server doc https://github.com/senchalabs/connect#readme shows some way which i am not understand. here is my...

HTTP CONNECT method with Android

android,http,proxy,httpclient,connect
I want to extend an existing Android app which sets up a http connection to a remote device which it sends commands to and receives values from. The feature consists of a tunneled connection via a custom proxy server that has been set up. I have the http header format...

Prerelease builds missing on iTunes Connect

build,itunes,store,connect
Although I can upload successfully new versions of my app to iTunes Connect, I can't see them nor the previous ones under the "Prerelease" section in the app's page. Instead, I get a message saying "Upload your builds with Xcode 5.1.1 or later, or with Application Loader 3.0 or later"....

Java SQLite3 Connection Failing

java,database,sqlite3,connect
I am having some trouble connecting my java script to my SQLite3 database. I have my directory holding my script as followed C:/PROG/JavaPROG/programs/java_database Inside this directory I have 3 files Query.java, Query.class and the database query.db My java code looks as followed import java.sql.*; public class Query3 { public static...

Java Socket fast reconnect

java,performance,sockets,connect,reset
I am facing a little problem with sockets. This method takes about 100ms or even more, depends on the server. socket.connect(dest); Then I am communicating through DataInput/Output streams to a sofisticated software, so there is query phase, handshake phase, login request phase etc. Is there any way I can "reset"...

grunt connect exits instead of serving local files

javascript,node.js,gruntjs,server,connect
I've got a following Gruntfile.js which includes only two tasks: the first one parses/generates files and the second one, grunt-contrib-connect, starts web server: module.exports = function(grunt) { grunt.initConfig({ aglio: { docs: { files: { 'index.html': 'api.md', }, options: { theme: "slate" } } }, connect: { server: { options: {...

Python connect 4 check win function

python,connect
I am writing a connect 4 game in which you can choose the size of the board. The game works flawlessly for most board sizes but gives me problems when the board is taller then it is wide. I keep getting index out of range errors and im not sure...

PHP MYSQL query is not passing the array into my variable

php,mysql,database,function,connect
Here is my query and it's coming up with $results as NULL when I do a var_dump: function connect($loginName) { $password = (isset($_SESSION['password'])); $loginName = (isset($_SESSION['loginName'])); global $db; $query = "SELECT email, level, password FROM members WHERE email = '$loginName'"; $result = $db->query($query); $results = $result->fetch(PDO::FETCH_ASSOC); return $results; } Any...

How I can check if it something available in socket? [duplicate]

c,sockets,connect,eof,read-write
This question already has an answer here: How to check amount of data available for a socket in C and Linux 6 answers I write a simple application that provide connection between two computers in C. I have a problem with simultaneously reading and writing in socket. I am...

showing error massage for dont connect the internet in webclient in c#

exception,download,webclient,connect
my code for download-file is: private void Completed(object sender, AsyncCompletedEventArgs e) { MessageBox.Show("Download completed!"); } //----------- Download complete Stopwatch sw = new Stopwatch(); private void ProgressChanged(object sender, DownloadProgressChangedEventArgs e) {// Calculate download speed and output it to labelSpeed. lblspeed.Text = string.Format("{0} kb/s", (e.BytesReceived / 1024d / sw.Elapsed.TotalSeconds).ToString("0.00")); // Update the...

Grunt start Node Server and then open browser

javascript,node.js,gruntjs,connect
I have grunt task that starts the server: module.exports = function(grunt){ grunt.registerMultiTask('connect', 'Run a simple Node Server', function(){ var options = this.options(); // Tell Grunt this task is asynchronous. var done = this.async(); var server = connect(); server.use(function(request, response, nxt){ ... }); server.listen(port); }); }; Now I want to use...

Error trying to connect to MySQL database in PHP

php,mysql,database,connect
I'm trying to make a small-scale project using PHP and databases because I've been absent for long. The below code gives me the error message "Failed to find or connect with database." from the mysql_select_db line. I can't, for the life of me, figure out what is wrong, as this...

Using an OpenID Connect server to authenticate between two applications [closed]

java,oauth,openid,connect
Okay, sorry if I don't convey the question properly, but here's what I'm trying to do Background: Spring REST application that displays privacy-sensitive data. ApplicationX that wants to retrieve said data. OPENID Connect server. ApplicationX uses the OpenID Connect server to authenticate and get a token. Question How can I...

Symfony2 - HWIOAuthBundle How to get the information that I set on paths

php,facebook,symfony2,connect,hwioauthbundle
I am implementing this Bundle in my project, but it provides the information fields Nickname, Username, realname, Email ... I also need the Firstname, Lastname and Birthday field How do I add or override these methods? My Settings: config.yml hwi_oauth: firewall_name: secure_area connect: confirmation: false resource_owners: facebook: type: facebook client_id:...

Global name 'bluetooth' is not defined

python,data,bluetooth,connect
I am working with the bitalino board and I wanted to print the data with python but when I run the proper code, it shows me the message Global name 'bluetooth' is not defined According to my pc the board is connected via bluetooth. I don't know what the problem...

Do HTTPS Reverse Proxies without CONNECT exist?

https,connect,reverse-proxy
Is it possible to have an HTTPS Reverse Proxy without issuing CONNECT message? Do those kind of proxies exist?

Function.apply in connect's source code [duplicate]

javascript,node.js,connect
This question already has an answer here: Does it make sense to use .apply( ) and pass the same instance as context? 2 answers Reading connect's source code, I came across the following lines. I want to know why it's using Function.apply. app.listen = function(){ var server = http.createServer(this);...

PHP - Calling a function in another class

php,function,pdo,connect
I have a class which is called connection.php which has all the stuff related to connecting to my database, it also has the following function: function connect() { $pdo = new PDO('mysql:host='.$host.';dbname='.$db.'', $user, $pw); } When I try and call this function in another class in the example below: require('connection.php');...

c++ socket connect not working when not using ip

c++,sockets,dns,connect
I am trying to connect to my Java server with my C++ client through a dns. So when I type the dns name instead of my localip, It won't connect. Code: NOT WORK sockaddr_in addr; addr.sin_family = AF_INET; addr.sin_addr.s_addr = inet_addr("blalblalb.no-ip.com"); addr.sin_port = htons(4444); But when I type the ip-address...

stylus - middleware not compiling the `styl` file

node.js,connect,stylus
I integrated the stylus with middleware. but there is no compile function called at all.. 1) How to make compile method to work 2) How to update 'tcp.css' each time i update 'tcp.styl` file modified here is my code : var connect = require('connect'), serveStatic = require('serve-static'), stylus = require('stylus');...

Connecting your application to a database in another PC through the internet

c#,database,connect
I am new to the idea of connecting my application to an online database and by online, I mean a database from another PC that I need to access by using the internet. I am not new to accessing a local database, in fact, I made a class that stores...

I received the last message on MQTTkit ios

ios,connect,mqtt
When I connected me to MQTT server with the MQTTKit for IOS (https://github.com/jmesnil/MQTTKit), I received the last message published but I don't want it How can I do ?...

How to link two Java applications [closed]

java,object,hyperlink,connect
I'm new to Java and I completely have no idea how to do this. I have two separate Java applications and I want to sent a double value from the first application to the second application in order to use it in a calculation method then send the result back...

connecting signals and slots with different relations

c++,qt,connect,signals-slots
First of all I'd say I'm a noob to GUI programming. I use Qt 5.4. I came up with this code while watching voidRealms videos. connect(ui->horizontalSlider,SIGNAL(sliderMoved(int)),ui->progressBar,SLOT(setValue(int))); Obviously this connects slider movement with progressbar fill. This actually works like progressbarfill <- slidermovement. How can I make into a different relation? Like...

Object function createServer() has no method 'bodyparser'

node.js,connect,body-parser
I am new to nodeJS. I am trying to use different middlewares with connect middleware. this is my code: var connect = require('connect'); var bodyParser = require('body-parser'); var cookieParser = require('cookie-parser'); var app = connect() .use(connect.bodyParser()) .use(connect.cookieParser('tobi is a cool ferret')) .use(function(req, res){ console.log(req.cookies); console.log(req.signedCookies); res.end('hello\n'); }).listen(3000); I have installed...