Programação

Q & A para programadores profissionais e entusiastas

9
HTTP POST retorna erro: 417 "Expectation Failed".
Quando tento postar em um URL, resulta na seguinte exceção: O servidor remoto retornou um erro: (417) Expectation Failed. Aqui está um código de exemplo: var client = new WebClient(); var postData = new NameValueCollection(); postData.Add("postParamName", "postParamValue"); byte[] responseBytes = client.UploadValues("http://...", postData); string response = Encoding.UTF8.GetString(responseBytes); // (417) Expectation Failed. …
212 c#  .net  http  http-post  webclient 





7
Glyphicons maiores
Como faço para gerar Glyphicons maiores no twitter bootstrap 3.0 (não no 2.3.x). Este código tornará meus glifos grandes: <button type="button" class="btn btn-default btn-lg"> <span class="glyphicon glyphicon-th-list"> </span> </button> Como posso obter esse tamanho sem usar a classe btn-lg usando apenas uma extensão? Isso fornece um pequeno glifo: <span class="glyphicon …



26
Detectando qual UIButton foi pressionado em um UITableView
Eu tenho um UITableViewcom 5 UITableViewCells. Cada célula contém um UIButtonque é configurado da seguinte maneira: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSString *identifier = @"identifier"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; if (cell == nil) { cell = [[UITableView alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier]; [cell autorelelase]; UIButton *button = [[UIButton alloc] …



22
O std :: vector é muito mais lento que as matrizes simples?
Eu sempre pensei que é a sabedoria geral que std::vectoré "implementada como uma matriz", blá blá blá. Hoje desci e testei, e parece não ser assim: Aqui estão alguns resultados dos testes: UseArray completed in 2.619 seconds UseVector completed in 9.284 seconds UseVectorPushBack completed in 14.669 seconds The whole thing …
212 c++  arrays  performance  stl  vector 


16
Como estilizar dt e dd para que eles fiquem na mesma linha?
Usando CSS, como posso estilizar o seguinte: <dl> <dt>Mercury</dt> <dd>Mercury (0.4 AU from the Sun) is the closest planet to the Sun and the smallest planet.</dd> <dt>Venus</dt> <dd>Venus (0.7 AU) is close in size to Earth, (0.815 Earth masses) and like Earth, has a thick silicate mantle around an iron …
212 html  css 


Ao utilizar nosso site, você reconhece que leu e compreendeu nossa Política de Cookies e nossa Política de Privacidade.
Licensed under cc by-sa 3.0 with attribution required.