Posts

php - Function not working -

this question has answer here: reference: variable scope, variables accessible , “undefined variable” errors? 3 answers the following function not working , cannot see why. function nuevocontacto($_post) { try { include('func/usarbases.php'); $mensaje="insert `t_contactos`(`id_c`, `nombre`, `telefono`, `telefono2`, `corto`, `celular1`, `celular2`, `email`, `puesto`, `id_a`) values (null,'$_post[nombre]','$_post[tel1]','$_post[tel2]','$_post[corto]','$_post[cel1]','$_post[cel2]','$_post[email]','$_post[puesto]','$_post[id_a]')"; $hacerconsulta = $base->prepare($mensaje); $hacerconsulta->execute(); } catch( pdoexception $e) { echo "<p>error connection: " .$e->getmessage()."</p>"; } ...

c - understanding the protocol family argument of socket() and result list of getaddrinfo() -

i had started network programming days ago there confusion need clear. have not studied networking or tcp/ip protocol before. socket function argument: the protocol family argument socket function denote set of protocols or protocol suite used communication. is above interpretation correct? if yes, means pf/af_inet , pf/af_inet6 2 different protocol suites. right? reason creating 2 different protocol suites , not 1 tcp/ip protocol suite 2 address families? if not, protocol family denote function argument? edit : don't have enough reputation answer own question editing from unix network programming vol. 1, 3rd edition - section 4.2 socket function, sub-section - af_xxx verseus pf_xxx the " af_ " prefix stands "address family" , " pf_ " prefix stands "protocol family". historically, intent single protocol family might support multiple address families , pf_ value used create socket , af_ value used in socket addre...

angular - Angular2 RC1No Directive annotation found on PropDecoratorFactory with @Input -

i'm trying pass input parameters component i'm getting exception: browser_adapter.ts:78 exception: error: uncaught (in promise): no directive annotation found on propdecoratorfactory i tried solutions described here , didn't solve issue me: here code: import {component, provide, input} '@angular/core'; import {bootstrap} '@angular/platform-browser-dynamic'; import {http, http_providers} '@angular/http'; import {routeconfig, router_directives, router, router_providers} '@angular/router-deprecated' @component({ selector: 'sub', template : `<p>input: {{someinput}}</p>`, directives: [input] }) export class subcomponent { @input() someinput: number; } @component({ selector: 'home', template : `<p>home</p><sub [someinput]="someinput"></sub>`, directives: [subcomponent] }) export class homecomponent { someinput: number = 123; } @component({ selector: ...

compilation - Problems installing Python 3 with --enable-shared -

problem i'm trying install python 3 --enable-shared option. installation "succeeds" resulting python not runnable. trying run python after installation gives following error: $ /opt/python3/bin/python3.5 /opt/python3/bin/python3.5: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: no such file or directory background the os debian (squeeze), , has previous installation of python 2.6, necessary retain because other code relies on it, , apache 2.2. i'm trying set django run on apache, meaning i'm trying install mod_wsgi (or mod_wsgi-express), requires shared libraries. have tried install mod_wsgi without using --enable-shared in python installation, , have gotten... well, same thing, time mod_wsgi installer (and pip install mod_wsgi , tried): /opt/python3/bin/python3.5: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: no such file or directory . trace starting inst...

c# - Serialize and Deserialize Json and Json Array in Unity -

i have list of items send php file unity using www . www.text looks [{"playerid":"1","playerloc":"powai"},{"playerid":"2","playerloc":"andheri"},{"playerid":"3","playerloc":"churchgate"}] trim [] string. when try parse using boomlagoon.json , first object retrieved. found out have deserialize() list , have imported minijson. but confused how deserialize() list. want loop through every json object , retrieve data. how can in unity using c#? the class using public class player { public string playerid { get; set; } public string playerloc { get; set; } public string playernick { get; set; } } after trimming [] able parse json using minijson. returning first keyvaluepair . idictionary<string,object> s = json.deserialize(servicedata) idictionary<string,object>; foreach (keyvaluepair<string, object> kvp in s) { debug.log...

Visual Studio 2015 crashing -

recently installed vs 2015 on windows 8.1 system. keeps crashing , asks me restart/debug. if keep ide open , leave idle, crashes after time. these logs found in event viewer , couldn't figure out anything. faulting application name: devenv.exe, version: 14.0.25123.0, time stamp: 0x56f22f32 faulting module name: crystaldecisions.crystalreports_unloaded, version: 9.1.9800.0, time stamp: 0x3d802612 exception code: 0xc0000005 fault offset: 0x0001fe34 faulting process id: 0xf04 faulting application start time: 0x01d1c362423c7d96 faulting application path: c:\program files (x86)\microsoft visual studio 14.0\common7\ide\devenv.exe faulting module path: crystaldecisions.crystalreports report id: 1381257e-2f56-11e6-8282-648099c4e3f6 faulting package full name: faulting package-relative application id: faulting application name: standardcollector.service.exe, version: 14.0.25123.0, time stamp: 0x56f2261c faulting module name: ntdll.dll, version: 6.3.9600.1...

Android read data from php file -

i have application read data php file. try search in google how read data php , replace in textview when try make code nothing show in application. my php code: <?php $serverip = "127.0.0.1"; // server ip public $portzone = "27780"; // zoneserver port $portlogin = "10007"; // zoneserver port $file = file ("e:\server\zoneserver\systemsave\serverdisplay.ini"); foreach($file $line) { if(strspn($line, "[") != 1) parse_str($line); } $response["online"] = array(); $product["total online"] = $usernum; $product["acc online"] = $a_num; $product["bcc online"] = $b_num; $product["ccc online"] = $c_num; // push single product final response array array_push($response["online"], $product); // success $response["success"] = 1; echo json_encode($response); ?> my code android toolbar toolbar; textview onlineplayer; // progress dialog private progressdia...