This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Request.QueryString["mkt"] //Parameter : mkt | Value: it-it | |
Request.QueryString["lang"] //Parameter : lang | Value: it-it | |
Requer.QueryString["q"] //Parameter: q | Value: prova |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Controllo che l'oggetto di sessione esista e lo visualizzo | |
if(Session["ultimaVisita"] !=null){ | |
Label1.Text=((DateTime)Session["lastVisit"]).ToString(); | |
}else{ | |
Label1.Text="Nessun valore in session"; | |
} | |
//Setto il valore per la sessione successiva | |
Session["ultimaVisita"]=DateTime.Now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$host = 'localhost:27017'; //Server | |
$dbname = 'myMongoDb'; //Db name | |
$colname = "emp"; //Collection Name | |
$EMP = array( | |
array("empno"=> 7369, "ename" => "SMITH", "job" => "CLERK", | |
"mgr" => 7902,"hiredate" => "17-DEC-80", "sal" => 800, | |
"deptno" => 20), | |
array("empno" => 7499, "ename" => "ALLEN", "job" => "SALESMAN", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$host = 'localhost:27017'; | |
$dbname = 'myMongoDb'; | |
$colname = "emp"; | |
try { | |
//Istanzio la connessione all host | |
$conn= new MongoClient($host); | |
//Seleziono il database tramite il $dbname | |
$db=$conn->selectDB($dbname); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Prendo tutti i record con i valore del field sal greater than($gt) del valore 2900 | |
$cursor=$coll->find(array("sal"=>array('$gt'=>2900))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// wurflSetup.php file | |
error_reporting ( E_ALL ); | |
define ( "WURFL_DIR" , dirname ( __FILE__ ) . '/wurfl/WURFL/' ); | |
define ( "RESOURCES_DIR" , dirname ( __FILE__ ) . "/wurfl/examples/resources/" ); | |
require_once WURFL_DIR . 'Application.php'; | |
function getWurflManager() { | |
$config_file = RESOURCES_DIR . 'wurfl-config.xml'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting ( E_ALL ); | |
require_once 'wurflSetup.php'; | |
$wurflManager = getWurflManager (); | |
//SIMULO IPHONE 4 | |
$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7" | |
$device = $wurflManager->getDeviceForHttpRequest ( $_SERVER); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL); | |
require_once('wurflSetup.php'); | |
$wurflManager= getWurflManager(); | |
//SIMULO IPHONE 4 | |
$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7"; | |
$device= $wurflManager->getDeviceForHttpRequest($_SERVER); | |
$capability_groups= $wurflManager->getListOfGroups(); | |
asort($capability_groups); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model string[] | |
@{ | |
ViewBag.Title = "Index"; | |
Layout="~/Views/Common/_Layout.cshtml"; | |
} | |
This is the list of the fruit name: | |
@section Header{ | |
<div class="view">@foreach (string str in new[] { "Home", "List", "Edit" }) { @Html.ActionLink(str, str, null, new { sytle = "margin: 5px" }); }"</div> |