Most voted questions
150,413 questions
Sort by count of
-
4
votes1
answer2424
viewsrunning split() to form a list within another list
have the following list: [['a:/, b:/, w:/, g:/, f:/, d:/Downloads/Torrent/End, x:/files.2t, y:/files.1t'], ['d:/Dropbox/project/rato_bat'], ['data']] however I would like it to be a list within…
-
4
votes2
answers842
viewsUsing Array.Foreach to modify the collection
I want to remove spaces from the beginning and end of the string (Trim) in all positions of array, but none of the ways below worked. What am I doing wrong? var optionArray = new string[] { "in the…
-
4
votes2
answers1362
viewsPHP Current business days/ Missing days
I would like to know about if you have a specific function or how to do about the current working days for example today is day 26 or is 18 current working day of the month and so on and as change…
-
4
votes1
answer127
viewsIs it possible to develop pro Safari extensions using Windows or Linux?
I remember that there used to be a Safari for Windows, which no longer receives updates, however even with it was necessary to have an Apple developer license, at the time it was free to develop pro…
-
4
votes2
answers3574
viewsAbstract Python class, how to choose implementation
I’m learning python and trying to make a program where I have an abstract class and two subclasses that implement such. I need to make another class that will choose which implinking to use…
-
4
votes1
answer192
viewsParallel Processing Routine C#
I would like to start a data processing method whenever I receive a String with START content through the Transceiver event.Receivelineeventhandler(); but this method will have a processing time as…
-
4
votes2
answers123
viewsProblem creating user class (Identityuser) relationship using Identityframework
When I create any relationship with my user class: namespace Modelo.Cadastro { public class Usuario : IdentityUser { [StringLength(250, ErrorMessage = "O nome de usuário deve conter no mínimo 3…
c# asp.net-mvc entity-framework asp.net-identityasked 8 years, 3 months ago Luiz Henrique da Fonseca 41 -
4
votes2
answers4795
viewsHow to subtract hours from a javascript date?
I have a variable that receives the current date and I need to subtract hours from that date. var data = new Date(); Like subtraction of hours of that date?…
javascriptasked 8 years, 3 months ago DiChrist 4,567 -
4
votes2
answers617
viewsHow to identify a number (in full) in a sentence
I need a script to identify a number in a sentence. Ex: "Two Weeks ago" -> number = 2 It can even be by substitution even. So: if str contain two, replace("two", 2) Is there a module that can do…
-
4
votes1
answer90
viewsPass lambda expression on command line
I created a program to calculate the defined integral of a function, but I want to be able to run it through the terminal. #include <iostream> #include <functional> #include…
-
4
votes1
answer1855
viewsSubmit form to a php script and open a modal as soon as it is submitted
I have a form that already validates the fields, but I wanted when clicking the send button to send the data to the file recebe.php and already opened a modal that I created. Follow the code on my…
-
4
votes2
answers882
viewsWhat is the importance of using java interfaces or c#?
I know how to implement and use interfaces, but I can’t understand what the real reason for them is in c# or java, since once you extend your class to an interface you need to implement all the…
-
4
votes1
answer500
viewsIs it OK to use SQL Server or Mysql with PHP?
I’m putting together a medium project and I’m going to model the bank, then create the tables, the views, as procedures beyond the bank itself of course. I would create everything with Mysql, but by…
-
4
votes1
answer68
viewsHow do Telegram and facebook messenger clean up notifications on devices?
When you receive a notification by Telegram or Facebook Messenger on multiple devices, if you read the message on one of them in the other notification is removed. How does this happen? PS: this…
-
4
votes1
answer1504
viewserror: initializer element is not Constant
I’m trying to declare this buffer overall and when compiling it presents the following error error: initializer element is not Constant char *ls_buffer_PPouAUT = malloc(5120*sizeof(char)); How can I…
-
4
votes3
answers881
viewsReceive variable in php and call Ajax function by passing this variable
I will explain this my post better, I think I have not been clear on the issue. Today, I have a page where I search for a certain term and the result is presented to me then a search AJAX Live…
-
4
votes2
answers503
viewsHow to hide a string in C, so that it is not readable in compiled code?
I have a string Hello World, but I don’t want to keep it as Hello World in C, I would like to keep it as some value in Base64, aes or binary, or similar, so that it is not readable in the code. How…
-
4
votes1
answer897
viewsSelect to show all tables that have fields with specific data type
I have a database that I need to change all the columns that are in FLOAT AND DOUBLE to DECIMAL, are about 150 tables and I spend a lot of time looking one by one, there is some command that shows…
mysqlasked 8 years, 3 months ago Mauricio Ferraz 2,074 -
4
votes1
answer3624
viewsCheck for Jquery internet connection
Does anyone know a good function or a good way to check if there is an internet connection before making an ajax request?
-
4
votes0
answers85
viewsInstall patch pro R
As documented here, R’s iconv function does not work satisfactorily. Fortunately, a patch has been developed that solves the problem (apparently). My question is basic: how do I install the patch?…
-
4
votes1
answer1665
viewsHow to get the HOST IP through the PYTHON domain?
In PHP, to get the ip of a given domain, I usually use the function gethostbyname. PHP example: gethostbyname('www.google.com'); //201.17.165.210 And in Python? How can I do this?…
-
4
votes3
answers1458
viewsJavascript - Line break in file . txt
How to identify a line break in a txt using javascript ? Example: Essa é a linha 1 Essa é a linha 2 Essa é a linha 3 The file has these 3 lines and I want to put them in an array separated by the…
-
4
votes1
answer448
viewsFile in JSON format
And oh guys all beauty? I’m having a rather silly question, but I couldn’t find an answer. I’ve been going through some websites and I saw that instead of them calling a request $.AJAX on the server…
-
4
votes1
answer186
viewsDynamically include properties of a $.ajax function
Is there any way to edit the $.ajax function so it includes the "date" property when it receives a value, and remove when it does not receive? that is, dynamically? Example: When the date variable…
-
4
votes1
answer111
viewsSum values in vector and return the value in true condition
I have a doubt in a script where I am doing a quiz, in my last quiz I put 3 response options: A, B and C. Where if the answer is A sum 3 points for option X, 2 points for option Y and 1 point for…
-
4
votes1
answer119
viewsError: in Builder cannot be Applied
I’m developing a simple calculator. I am checking if one of the fields is null open a Alertdialog, however I am with the error in Builder cannot be Applied, no this do Alertdialog.Builder. Can…
-
4
votes1
answer328
viewsApp restarts when it changes orientation (rotated)?
I made this in my app: onCreate: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ... instances: @Override protected void onSaveInstanceState(Bundle…
-
4
votes1
answer2870
viewsBetter PHP-FPM configuration for 4gb ram?
I need help setting up my PHP-FPM I have EC2 on Amazon C4.large 3.75 GB RAM 2 CORE On my server I only have PHP-fpm,NGINX and an ftp server connected, Mysql is on a RDS. My current php-fpm…
-
4
votes2
answers680
viewsDisable css and image caching in the browser
Recently, I developed a project that had some drastic changes in its design, mainly by the side of css and images. In this, accessing it on some machines, I verified that to visualize its new design…
-
4
votes1
answer1153
viewsGet information from a div in C#
Well, I have a code that reads the page but I need the following: <a href="/t848p15-teste">2</a> The idea of the code is to look for a tag <a> that has this 2 and return the link.…
-
4
votes1
answer415
viewsStatic public variables in C#
How can I organize my code? When programming there are variables that I am leaving in the same code at the top as: namespace myData.MySql { public partial class teste { public static string…
-
4
votes2
answers178
viewsHow to define a method that receives a lamppost expression?
I have a class similar to this one and I wanted the code she executed to be passed as a blank expression. class T { public: double execute(); }; For example: T t; int a = 0, b = 1;…
-
4
votes2
answers1008
viewsRedeem code from an executable program?
I created a program to present in high school, but due to problems on my hard drive, I lost his code and only have the executable that I created to present it. Unfortunately, I also need the code…
-
4
votes2
answers1714
viewsHow to create a number generator from a Home number and a Final number?
I don’t know if it does in php or javascript, I’ve read tutorials but I couldn’t get anywhere... I would like to create a system so that I put an initial number and an end and in this range would…
-
4
votes1
answer1580
viewsHow to Set Up Multiple Web API Get
I need to provide in my web api three forms of query: First Get with all "Getall" records, the second GET by id and a third GET with ribbon options, sent by client, e.g.: Name contains the letter…
-
4
votes1
answer532
viewsIn C#, how to use the pluralize method in Portuguese?
in a C# application I’m looking to pluralize some words in English. But apparently there is no native support for en-BR. var pluralizador =…
-
4
votes1
answer130
viewsDetached Exception in associative table
I am finding the following problem when making a certain registration: Exception in thread "main" javax.persistence.PersistenceException: org.hibernate.PersistentObjectException: detached entity…
-
4
votes2
answers322
viewsSearch simple data Sqlite
I want to return only two simple data in TextView using SQLite. I have a common "Products" table and another temporary table "Information" I use SUM() to add the column of the first table. Dbhelper:…
-
4
votes2
answers592
viewsVirtual hosts configuration in Vagrant Homestead/Laravel
I’m starting to Laravel and would like to organize my development environment using some "hosts" for my projects. I created the first Larable and after suffering a little with its installation, it…
-
4
votes1
answer142
viewsPHP functions adapted to Mysql
When trying to optimize some darlings not to depend on PHP to do something that could come ready from the database, I was trying to adapt the two routines below in the form of functions mysql:…
-
4
votes2
answers1854
viewsHow to receive data using Firebase
I made a small test app using Firebase. Everything works great when I leave the rules for anyone to have access to the database ".read":"true", ".write":"true" But when I added permissions in the…
-
4
votes1
answer733
viewsLexical Analyzer using LEX
I am using the LEX generator to do a lexical analysis of a simple C++ code. The following code is from the generator: %{ #include<stdio.h> %} extern FILE *yyin; %% "<" {printf("(Identifier,…
-
4
votes2
answers216
viewsView Model should have related classes?
I have three entities: Manager, PersonalData and Address. A Manager has a PersonalData and a PersonalData has a Address. My doubt lies in the time to create the Viewmodels, I would have to have…
-
4
votes1
answer928
viewsIs it possible to restart the Nodejs server when a modification occurs automatically?
Every time I try to make some modification in my file app.js I have to close and start the server for the modifications to take effect, would there be any way to automatically restart after a…
-
4
votes1
answer206
viewsComparing Columns in SQL Server
Good afternoon! I wonder if you can help me. I am with the following case, we have a client who is with the version of our system VERY outdated, with this is missing several columns in the SQL…
-
4
votes1
answer5678
viewsReturn higher value of a specific SQL record
I need my SQL to return the longest date, but not the longest date among all records, and yes, the longest date of a specific id. I’ve tried using the MAX(), but it returns the highest value of all…
-
4
votes1
answer299
viewsHow to take a column in the database, perform a calculation and send it to the grid
I want to perform a calculation using the value of the VAL_VIDA_UTIL field of my BD and then save the result since calculation in a new variable VAL_DEPRECIACAO and pass to my fieldName, but I’m not…
c# sql-server webforms ado.net devexpress-asp.net-ajaxasked 8 years, 3 months ago Fernanda Ferreira 197 -
4
votes2
answers498
viewsBlocked installation when debugging app by Android Studio
When trying to debug or install an application I am developing, the following message appears on the device where the APK is being installed. Blocked installation. This app contains code created…
-
4
votes1
answer4462
viewsChange port or something on IIS Express. Is there a way?
How can I change a port or something in Visual Studio 2013’s IIS Express.
-
4
votes4
answers1313
viewsHow to organize alphabetically a select obtained through a JSON?
I rode a select through the JSON below, the only problem is that it follows the order of the key, how to arrange it alphabetically? { "12": "Acre", "27": "Alagoas", "16": "Amapá", "13": "Amazonas",…