Programación

Preguntas y respuestas para programadores profesionales y entusiastas.

21
¿Cómo uso LINQ Contiene (cadena []) en lugar de Contiene (cadena)?
Tengo una gran pregunta. Tengo una consulta de linq para ponerlo simplemente se ve así: from xx in table where xx.uid.ToString().Contains(string[]) select xx Los valores de la string[]matriz serían números como (1,45,20,10, etc ...) el valor predeterminado para .Containses .Contains(string). Lo necesito para hacer esto en su lugar: .Contains(string[])... EDITAR: …
103 c#  linq  string  contains 





12
¿Cómo puedo hacer que un cuadro combinado de WPF tenga el ancho de su elemento más ancho en XAML?
Sé cómo hacerlo en código, pero ¿se puede hacer en XAML? Window1.xaml: <Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <Grid> <ComboBox Name="ComboBox1" HorizontalAlignment="Left" VerticalAlignment="Top"> <ComboBoxItem>ComboBoxItem1</ComboBoxItem> <ComboBoxItem>ComboBoxItem2</ComboBoxItem> </ComboBox> </Grid> </Window> Window1.xaml.cs: using System.Windows; using System.Windows.Controls; namespace WpfApplication1 { public partial class Window1 : Window { public Window1() { InitializeComponent(); double width …
103 c#  wpf  combobox 







17
Cómo mostrar múltiples notificaciones en Android
Recibo solo una notificación y si llega otra notificación, reemplaza la anterior y aquí está mi código private static void generateNotification(Context context, String message, String key) { int icon = R.drawable.ic_launcher; long when = System.currentTimeMillis(); NotificationManager notificationManager = (NotificationManager) context .getSystemService(Context.NOTIFICATION_SERVICE); Notification notification = new Notification(icon, message, when); String title …

2
Colocación de la captura ANTES y DESPUÉS
Me cuesta entender la diferencia entre poner .catchANTES y DESPUÉS en una promesa anidada. Alternativa 1: test1Async(10).then((res) => { return test2Async(22) .then((res) => { return test3Async(100); }).catch((err) => { throw "ERROR AFTER THEN"; }); }).then((res) => { console.log(res); }).catch((err) => { console.log(err); }); Alternativa 2: test1Async(10).then((res) => { return test2Async(22) …

4
Cómo analizar XML a marco de datos R
Intenté analizar el marco de datos XML a R, este enlace me ayudó mucho: cómo crear un marco de datos R a partir de un archivo xml Pero aún así no pude resolver mi problema: Aquí está mi código: data <- xmlParse("http://forecast.weather.gov/MapClick.php?lat=29.803&lon=-82.411&FcstType=digitalDWML") xmlToDataFrame(nodes=getNodeSet(data1,"//data"))[c("location","time-layout")] step1 <- xmlToDataFrame(nodes=getNodeSet(data1,"//location/point"))[c("latitude","longitude")] step2 <- xmlToDataFrame(nodes=getNodeSet(data1,"//time-layout/start-valid-time")) step3 …
103 xml  r 

Al usar nuestro sitio, usted reconoce que ha leído y comprende nuestra Política de Cookies y Política de Privacidad.
Licensed under cc by-sa 3.0 with attribution required.