Equipo\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search\AllowCortana
Si no existe “Windows Search” hay que crearlo.
AllowCortana es un DWORD con valor 0
Equipo\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search\AllowCortana
Si no existe “Windows Search” hay que crearlo.
AllowCortana es un DWORD con valor 0
$cvt 1680 1050 # 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz Modeline "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync
$ xrandr --newmode "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync $ xrandr --output VGA1 --mode "1680x1050_60.00" $ xrandr --output VGA1 --mode "1680x1050_60.00"
windump -D 1.\Device\NPF_{C6ACD745-CF9B-4366-AAAF-DCFCD2108F11} (Microsoft) 2.\Device\NPF_{44EE031D-814E-4657-B0E8-7276996469F6} (TAP-Windows Adapter V9) 3.\Device\NPF_{290F16FC-3584-4FB5-A172-DAA2272A3491} (Intel(R) Ethernet Connection I219-V) 4.\Device\NPF_{D33776EB-C80E-44AE-B3E2-0EC0EA7D938E} (Microsoft)
windump -nn -v -i \Device\NPF_{290F16FC-3584-4FB5-A172-DAA2272A3491} -s 1500 -c 1 "ether[20:2] == 0x2000" windump: listening on \Device\NPF_{290F16FC-3584-4FB5-A172-DAA2272A3491} 12:30:11.644124 CDPv2, ttl: 180s, checksum: 692 (unverified), length 385 Device-ID (0x01), length: 15 bytes: 'nombredemiequipo.loquesea.com' Version String (0x05), length: 182 bytes: Cisco IOS Software, C3560 Software (C3560-IPBASE-M), Version 12.2(35)SE5, RELEASE SOFTWARE (fc1) Copyright (c) 1986-2007 by Cisco Systems, Inc. Compiled Thu 19-Jul-07 18:15 by nachen Platform (0x06), length: 20 bytes: 'cisco WS-C3560G-48PS' Address (0x02), length: 13 bytes: IPv4 (1) 1.1.1.1 Port-ID (0x03), length: 18 bytes: 'GigabitEthernet0/2' Capability (0x04), length: 4 bytes: (0x00000029): Router, L2 Switch, IGMP snooping Protocol-Hello option (0x08), length: 32 bytes: VTP Management Domain (0x09), length: 4 bytes: 'test' Native VLAN ID (0x0a), length: 2 bytes: 12 Duplex (0x0b), length: 1 byte: full ATA-186 VoIP VLAN request (0x0e), length: 3 bytes: app 1, vlan 22 AVVID trust bitmap (0x12), length: 1 byte: 0x00 AVVID untrusted ports CoS (0x13), length: 1 byte: 0x00 Management Addresses (0x16), length: 13 bytes: IPv4 (1) 2.2.2.2 unknown field type (0x1a), length: 12 bytes: 0x0000: 0000 0001 0000 0000 ffff ffff 1 packets captured 689 packets received by filter 0 packets dropped by kernel
wget -qO - https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-zesty-prod zesty main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-get update sudo apt-get install dotnet-sdk-2.0.0
dotnet new console -o miholamundo
fran$ ls miholamundo.csproj obj Program.cs
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>netcoreapp2.0</TargetFramework> </PropertyGroup> </Project>
using System; namespace miholamundo { class Program { static void Main(string[] args) { Console.WriteLine("Hello World!"); } } }
fran$ dotnet run Hello World!
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt-get update
sudo apt-get install code
"ConnectionStrings": {
"DefaultConnection": "server=localhost;port=3306;database=test1;user=test1;password=test1"
}
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace test1.Models { public class Dato { private string _dato; public int id { get; set; } public string dato { get { return _dato; } set { if (value.Length < 45) _dato = value.Substring(0, 45); else _dato = value; } } } }
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
User profile is available. Using 'C:\Users\francisco.counago\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
Added DbContext : '\Data\test1Context.cs'
info: Microsoft.EntityFrameworkCore.Infrastructure[100403]
Entity Framework Core 2.0.0-rtm-26452 initialized 'test1Context' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: None
Added Controller : '\Controllers\DatoController.cs'.
Added View : \Views\Dato\Create.cshtml
Added View : \Views\Dato\Edit.cshtml
Added View : \Views\Dato\Details.cshtml
Added View : \Views\Dato\Delete.cshtml
Added View : \Views\Dato\Index.cshtml
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
namespace test1.Models
{
public class test1Context : DbContext
{
public test1Context (DbContextOptions options)
: base(options)
{
}
public DbSet Dato { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace test1.Models
{
public class test1Context
{
public test1Context (string pConexion)
{
}
}
}
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
services.AddDbContext(options =>
options.UseSqlServer(Configuration.GetConnectionString("test1Context")));
}
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
services.Add(new ServiceDescriptor(typeof(test1Context), new test1Context(Configuration.GetConnectionString("DefaultConnection"))));
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using test1.Models;
namespace test1.Controllers
{
public class DatoController : Controller
{
private readonly test1Context _context;
public DatoController(test1Context context)
{
_context = context;
}
// GET: Dato
public async Task Index()
{
return View(await _context.Dato.ToListAsync());
}
// GET: Dato/Details/5
public async Task Details(int? id)
{
if (id == null)
{
return NotFound();
}
var dato = await _context.Dato
.SingleOrDefaultAsync(m => m.id == id);
if (dato == null)
{
return NotFound();
}
return View(dato);
}
// GET: Dato/Create
public IActionResult Create()
{
return View();
}
// POST: Dato/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task Create([Bind("id,dato")] Dato dato)
{
if (ModelState.IsValid)
{
_context.Add(dato);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
return View(dato);
}
// GET: Dato/Edit/5
public async Task Edit(int? id)
{
if (id == null)
{
return NotFound();
}
var dato = await _context.Dato.SingleOrDefaultAsync(m => m.id == id);
if (dato == null)
{
return NotFound();
}
return View(dato);
}
// POST: Dato/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task Edit(int id, [Bind("id,dato")] Dato dato)
{
if (id != dato.id)
{
return NotFound();
}
if (ModelState.IsValid)
{
try
{
_context.Update(dato);
await _context.SaveChangesAsync();
}
catch (DbUpdateConcurrencyException)
{
if (!DatoExists(dato.id))
{
return NotFound();
}
else
{
throw;
}
}
return RedirectToAction(nameof(Index));
}
return View(dato);
}
// GET: Dato/Delete/5
public async Task Delete(int? id)
{
if (id == null)
{
return NotFound();
}
var dato = await _context.Dato
.SingleOrDefaultAsync(m =>; m.id == id);
if (dato == null)
{
return NotFound();
}
return View(dato);
}
// POST: Dato/Delete/5
[HttpPost, ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task DeleteConfirmed(int id)
{
var dato = await _context.Dato.SingleOrDefaultAsync(m => m.id == id);
_context.Dato.Remove(dato);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
private bool DatoExists(int id)
{
return _context.Dato.Any(e => e.id == id);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using test1.Models;
namespace test1.Controllers
{
public class DatoController : Controller
{
private readonly test1Context _context;
public DatoController(test1Context context)
{
_context = context;
}
// GET: Dato
public IActionResult Index()
{
return View(_context.Listado());
}
//// GET: Dato/Details/5
public IActionResult Details(uint? id)
{
if (id == null)
{
return NotFound();
}
Dato datoAux = _context.dame(id.Value);
if (datoAux == null)
{
return NotFound();
}
return View(datoAux);
}
// GET: Dato/Create
public IActionResult Create()
{
return View();
}
// POST: Dato/Create
[HttpPost]
public IActionResult Create(String dato)
{
if(dato==null)
{
return RedirectToAction(nameof(Create));
}
String strDato = dato;
if(_context.Add(strDato))
{
return RedirectToAction(nameof(Index));
}
return View(new Dato { dato = strDato });
}
//// GET: Dato/Edit/5
public IActionResult Edit(uint? id)
{
if (id == null)
{
return NotFound();
}
Dato datoAux = _context.dame(id.Value);
if (datoAux == null)
{
return NotFound();
}
return View(datoAux);
}
//// POST: Dato/Edit/5
[HttpPost]
public IActionResult Edit(uint? id, string dato)
{
if (id ==null)
{
return NotFound();
}
uint uiId = id.Value;
if (dato == null)
{
return RedirectToAction(nameof(Edit), new { id =uiId });
}
String strDato = dato;
if (_context.Update(uiId,strDato))
{
return RedirectToAction(nameof(Index));
}
return View(new Dato { dato = strDato, id=uiId });
}
//// GET: Dato/Delete/5
public IActionResult Delete(uint? id)
{
if (id == null)
{
return NotFound();
}
Dato datoAux = _context.dame(id.Value);
if (datoAux == null)
{
return NotFound();
}
return View(datoAux);
}
//// POST: Dato/Delete/5
[HttpPost, ActionName("Delete")]
public IActionResult DeleteConfirmed(uint? id)
{
if (id == null)
{
return NotFound();
}
uint uiId = id.Value;
if (_context.Delete(uiId))
{
return RedirectToAction(nameof(Index));
}
return RedirectToAction(nameof(Delete),new { id = uiId });
}
}
}
y añadir a nuestro contexto las funciones necesarias, quedando de esta forma
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using MySql.Data.MySqlClient;
namespace test1.Models
{
public class test1Context
{
private string strCnnString;
public test1Context (string pstrConexion)
{
strCnnString = pstrConexion;
}
private List hazConsulta(string pstrConsulta)
{
List lstDato = new List();
using (MySqlConnection cnn = new MySqlConnection(strCnnString))
{
cnn.Open();
using (MySqlDataReader drAux = (new MySqlCommand(pstrConsulta, cnn).ExecuteReader()))
{
while (drAux.Read())
{
lstDato.Add(new Dato()
{
id = drAux.GetUInt32("id"),
dato = drAux.GetString("dato")
});
}
}
}
return lstDato;
}
private int ejecutaSQL(string pstrConsulta)
{
int iFilas = 0;
using (MySqlConnection cnn = new MySqlConnection(strCnnString))
{
cnn.Open();
iFilas = (new MySqlCommand(pstrConsulta, cnn).ExecuteNonQuery());
}
return iFilas;
}
public bool Add(string pDato)
{
if (pDato==null || pDato.Trim().Length < 1)
return false;
try
{
return (ejecutaSQL($"insert into dato (dato) values (\"{pDato}\")") > 0) ? true : false;
}catch
{
return false;
}
}
public bool Update(uint puiId,string pDato)
{
if (pDato == null || pDato.Trim().Length < 1)
return false;
try
{
return (ejecutaSQL($"update dato set dato= \"{pDato}\" where id={puiId}") > 0) ? true : false;
}
catch
{
return false;
}
}
public bool Delete(uint puiId)
{
try
{
return (ejecutaSQL($"delete from dato where id={puiId}") > 0) ? true : false;
}
catch
{
return false;
}
}
public List Listado()
{
return hazConsulta("select * from dato");
}
public Dato dame(uint puiId)
{
try
{
return hazConsulta($"select * from dato where id={puiId}")[0];
}
catch
{
return null;
}
}
}
}
if(!require(installr)) {
install.packages("installr"); require(installr)}
updateR()
Para más información podemos ver el post original en inglés: Updating R from R (on Windows) – using the {installr} packageAdd this to registry REG ADD HKLM\SYSTEM\CurrentControlSet\Services\PolicyAgent /v AssumeUDPEncapsulationContextOnSendRule /t REG_DWORD /d...