Most voted questions
150,413 questions
Sort by count of
-
7
votes6
answers5869
viewsHow to know the number of a week in each month
I am working on ASP MVC4, and would like to know the number of weeks in a given month to generate a list of dates. For example, the user inserts a week, and in that week of each month I will…
-
7
votes2
answers326
viewsHow does the jQuery stack (stack) work?
When I learned to use the method .end jQuery, I realized that it was a powerful tool that ensures a lot of expressiveness to the code (and I’ve already seen how to integrate it to my plugins).…
-
7
votes4
answers1804
viewsShould I check dates with Datetime or regex?
I have seen two different ways to check whether a date is valid. In a "modern" way, with DateTime: $date="2014-02-04"; $dt = DateTime::createFromFormat("Y-m-d", $date); return $dt !== false…
-
7
votes3
answers3924
viewsHow to know the week of a given month?
I am working on ASP.NET MVC 4, and I intend to know what is the week of a given month. For example, the user wants to set a frequency of occurrences, and as such says: The occurrence will happen…
-
7
votes3
answers1774
viewsUpdate generating duplicate key error
I have a web application on . net 4.5.1 with MVC and Entity framework. Error occurs in a basic CRUD. I recover the object that will be the model sent to the view with the following code: Professor…
-
7
votes2
answers5072
viewsHow to force <option> elements to appear below <select> in IE?
In Internet Explorer, when I click on <select> the list appears on top of it instead of underneath it. I tried this code: select{ width:50px; height:50px; float:left; position:relative; }…
-
7
votes1
answer3034
viewsHow to email in C?
I searched several sites and google, but there’s always something with PHP or HTML. How to send an email using only C?
-
7
votes4
answers59952
viewsCopy files via SSH between two remote servers
How to copy files from Servier1 to servor2 via SSH with only one command line, and I am not logged in to any of them? I’m on a third machine. And I have the credentials of both.
-
7
votes6
answers14692
viewsHow to create a Git server on the internal network?
You can create a Git local server? I would not like to be dependent on the internet.
-
7
votes4
answers1099
viewsWhen to implement header functions?
I usually divide the program into small modules, each with its own header and implementation. In general, the abstraction level used allows the implementation to be completely changed without…
-
7
votes1
answer3924
viewsHow do I start a skype call from a browser action?
I need to add an "online support" button to my page but instead of creating an online chat I would like to use Skype. What is the best way to implement this?
-
7
votes3
answers6510
viewsHow to access a server via SSH without using password?
I have to connect a Linux server via SSH, using Putty as a client, many times a day and every time I need to put user and password. I have seen a person performing connection without using user and…
-
7
votes2
answers2415
viewsStored Procedure in Entity Framework without edmx template
I have a project that uses the Entity Framework without a model edmx, we register the entities manually create a class and insert it into the context. Someone uses this format and knows how to…
-
7
votes2
answers4107
viewsDictionary Search
I have the following Dictionary: public static Dictionary<string, string> ObterCodigo() { return new Dictionary<string, string> { {"18", "Teste"}, {"19", "Teste"}, {"02", "AAA"}, {"03",…
-
7
votes1
answer377
viewsHow to put an HTML code on a label in Laravel?
When I try to do that: {{ Form::label("nomecampo", "Descrição<em>*</em>", array("class" => "entrada")) }} The tag enters inside the tag but is not interpreted correctly. See:…
-
7
votes2
answers638
viewsHow to do an action after three dynamic elements are filled with jQuery/javascript?
I have three select that are created after the user clicks on a button, ie are dynamic: <select id="cbExercicio"><option value="0"></option></select> <select…
-
7
votes1
answer792
viewsHow to export an HTML/C#(Razor) page that contains SVG elements to PDF?
I am currently working with Highcharts, a javascript library that generates graphics. It has an export component, but only exports the chart itself, still need to assemble the PDF layout. For the…
-
7
votes1
answer360
viewsProblem with types in function parameter
When executing the following code: function foo(string $text) { echo $text; } foo('bar'); I get the following error: PHP Catchable fatal error: Argument 1 passed to foo() must be an instance of…
-
7
votes1
answer135
viewsHow to insert style into a Zend_form_element_select element?
How can I insert a style in one element option using Zend_form? I’m using Zend Framework 1.
-
7
votes1
answer98
viewsUse ":last-Child:after" in Internet Explorer 8
I have a graph where some elements are generated via CSS, namely the trace below the quantity scale: CSS Used: #results .chart-scale li{ font-size:16px; line-height:18px; padding-top:38px;…
-
7
votes1
answer390
viewsHow to create a loop to send an event in socket.io?
I have an architectural problem. I have a code using socket. in nodejs: socket.on('images',function (aData){ ... socket.sockets.emit('show', JSON.stringify({imagens : json})) }); I’m trying to…
-
7
votes1
answer247
viewsVirtualhost in separate file - Apache compiled
Due there is a lot of VirtualHosts I have, the file on /etc/apche247/conf/extra/httdp-vhost.conf is extensive and disorganized. I know a few ways to create the VirtualHost dynamic, but automatic…
apacheasked 10 years, 9 months ago Patrick Maciel 2,281 -
7
votes4
answers4319
viewsString concatenation in SQL
I perform a query in a table in my Mysql database that returns the following fields to me: usuarioId nome sobrenome idade sexo escolaridade modeloNome hora Follow the sql below: SELECT…
-
7
votes1
answer1242
viewsControl module version with Maven
I have a multi-module Java project with Maven. Currently, I control the version of each module manually, editing the element <version> pom.xml for each module that undergoes updates. I believe…
-
7
votes2
answers245
viewsInfinite loop when walking recursively through DOM nodes
I have a div with contenteditable=true in my document and I intend to do Highlight in certain parts of the text while the user type (add spans). For this I first need to extract the text typed by…
-
7
votes1
answer370
viewsResponsive Nav-bar at the Foundation?
I am maintaining a site that was done with Foundation, and I really have no knowledge of this framework, because I only work with Bootsrap. I’ve searched the Foundation documentation but I can’t…
-
7
votes2
answers4331
viewsHow to release a protected sub-directory with . htaccess?
I have a .htaccess in my test environment developed in Cakephp and . htaccess has authentication so that no one can access it. Now I need to release a site directory, actually a Cakephp plugin, I…
-
7
votes1
answer492
viewsHow do Visual Studio recognize the 'use Strict' directive?
Apparently Visual Studio does not recognize the directive 'use strict', because I typed the code below that assigns value to a variable that has not been declared (something prohibited in Strict…
javascript visual-studio-2013 intellisense use-strict ecmascript-5asked 10 years, 9 months ago Zignd 6,741 -
7
votes2
answers1431
viewsAfter all Phonegap (Apache Cordova) actually compiles the applications in PURE native code?
Does Phonegap (Apache Cordova) actually compile applications in PURE native code or does it act as a layer between a browser and the phone’s S.O. code? Which of the two options below is the most…
-
7
votes1
answer716
viewsWhat are the right practices to handle events in PHP?
I created some classes and an interface to manipulate events for a small MVC application. My intention is to implement the Observer standard, but I do not know if it agrees, since I still confuse…
-
7
votes1
answer1780
viewsHow do I know if at least one element of a list is contained in another list?
I have two lists: var lista01 = new List<int> { 1, 2, 3, 4, 5 }; var lista02 = new List<int> { 7, 7, 7, 7, 7 }; I need to check if at least one element of list 1 exists on list 2, then…
-
7
votes4
answers379
viewsWhat types of retain Cycles can be generated with ARC?
I know that with ARC there can be Leaks in iOS. What are the most frequent Leaks types and how they can be avoided?
-
7
votes1
answer239
viewsWhat is the Runloop?
I’d like to know what Runloop is in iOS and how it and the corresponding thread interact. It would also be interesting to understand how these two concepts interact with the autorelease pool.…
-
7
votes2
answers2862
viewsHow do I turn my computer off, restart, sleep programmatically?
I would like to add these options in a program, after finishing a task the computer would be shut down/restart/put on Sleep. How can I do that?
-
7
votes2
answers531
viewsHow to avoid conflict between jQuery and Mootools
Good practices to avoid conflicts between jQuery and Mootools libraries? This example makes the mistake Uncaught TypeError: Object [object Object] has no method 'fade' //codigo Mootools…
-
7
votes2
answers340
viewsASP.NET pages continue to run after page changes?
The method Response.Redirect has a parameter in one of its overloads called endResponse that when true indicates that the current page must be completed after redirecting. Does this mean that when I…
-
7
votes1
answer3109
viewsabntex2 compilation error
I’m running abntex2 to compose a graduation work. I follow the canonical model distributed by abntex2 here with some modifications to produce my work. The main modification is the separation of the…
-
7
votes2
answers2551
viewsProblem with @extends in view on Laravel.
I have a problem with @extends('layouts.template'). Only my view that is as index that does not show the page, instead shows me only this @extends('layouts.template') on the page. What could be?…
-
7
votes4
answers1385
viewsHow to replace {vars} in a string?
I have a string string str = "Bem vindo {Usuario}. Agora são: {Horas}"; I want to replace {Usuario} by a name and {Horas} by the current time, how can I do this?…
-
7
votes4
answers12949
viewsReturn Array with name of all files in directory
I need my HTML5 page to return a Array with all existing file names and extensions in a directory within my site. I can do this in other server-side languages, but I would like to do it in JS. there…
-
7
votes2
answers428
viewsHow to open a Unicode file inside a zip?
I tried to with zipfile.ZipFile("5.csv.zip", "r") as zfile: for name in zfile.namelist(): with zfile.open(name, 'rU') as readFile: line = readFile.readline() print(line) split = line.split('\t') but…
-
7
votes2
answers461
viewsWriting conventions for ASP.NET controls
When you drag a control from Toolbox to a Web Form Visual Studio automatically adds an ID to this control consisting of its type with uppercase first letter and a number. This is the same pattern…
-
7
votes2
answers321
viewsWhich tool to use to generate releases in Java?
I am developing my first project in Java, the application is an API using several libraries, among them: Jetty, Hibernate, Httpclient, Jasperreport... In this project I use the Maven framework, I…
-
7
votes1
answer860
viewsSSIS loading entire XML before you start writing to SQL Server
I need to load a single large XML file (40GB+) into an SQL Server 2012 table using SSIS. I’m having problems because SSIS seems to be trying to load the entire XML file into memory before loading…
-
7
votes2
answers821
viewsIn Python, how to get the default temporary directory?
I am making a program that uses a temporary file to save a serialized object (pickled). At the moment, the program is generating in the /tmp, but this path is specific to Unix/Linux; wanted to take…
-
7
votes2
answers744
viewsHow to create a Grouped List in Laravel 4 from an entity with self-relationship
I’m trying to create a select box com \Form::select() (grouped list) in Laravel 4 and I have the following entity: Items id = id do item nome = nome do item pai = fk dessa mesma entidade I already…
-
7
votes1
answer112
viewsHow to use SBT 0.12 and 0.13 at the same time?
I have the SBT 0.12 installed on my computer, with several plugins but I have seen several projects that are already using the SBT 0.13. How can I have you both on my machine at the same time,…
sbtasked 10 years, 10 months ago Daniel C. Sobral 2,050 -
7
votes1
answer253
viewsDifference between Yield and Yield* operators in Ecmascript 6.0 "Harmony"?
I’m studying the use of generators in Ecmascript 6.0 "Harmony". I have already managed to understand its basic functioning, like the statement through the syntax function* () { ... } and value…
-
7
votes2
answers401
viewsIn Magento how to add class in list depending on the attributes to be displayed?
I have a foreach that brings me all the children of an X attribute, and I need to add a specific class to the list <ul> to be able to format by CSS according to the Y attribute. However, I am…
-
7
votes1
answer971
viewsController and service annotations
In Spring 3 there are class annotations @Component, @Service, @Controller and @Repository. I know that the @Component is the only one that can be used in all cases (Controller, Service and…