Most voted questions
150,413 questions
Sort by count of
-
4
votes1
answer142
viewsModifications to model and relational database
The requirements for the development of a system in general change over time. Several approaches to software development such as agile methods and Domain-Driven Design even encourage an iterative…
-
4
votes2
answers505
viewsCalling protected variable inside static method
<?php class Foo{ protected $calc; function __construct(){ $this->calc = 2; } public static function getCalc(){ return $this->calc * 5; } } Foo::getCalc(); When I spin, he gives me that…
-
4
votes2
answers2915
viewsHow to consume this JSON with Javascript?
How do I consume that URL using Javascript? https://client-demo-accounts-2.bootstrap.fyre.co/bs3/v3.1/client-demo-accounts-2.fyre.co/379221/MjAxNjAxMjcxMjQyOmRlc2lnbmVyLWFwcC0xNDUzODQwMjgxODk0/init…
-
4
votes1
answer13184
viewsassignment list index out of range
Part of my Python program is: dt=1 maxt=3600*2 t=range(0,maxt,dt) r=len(t) Tsup_i=20 for i in range(1,r): Tsup[0]=Tsup_i P[i]=((I_dc)**2) * R20 * (1 + a * (Tsup[i] - (20+K))) And the error is…
-
4
votes2
answers236
viewsDo Regex.Split on what is not between "..."
Which regular expression I use to get the comma character that is not inside the fields "...", example: line1, "line2", "hello,world", 215, X + Y ^ ^ ^ ^ I want to get only the nominees, I’m using…
-
4
votes1
answer1086
viewsJSON return from Google API
I make a request to a Google API (API Web Service), in which returns me a JSON (Matrix)... My problem is when trying to extract data that are Arrays within Arrays... As the data from the "Photos"…
-
4
votes1
answer2107
viewsQuestions with the Connectionfactory and DAO class
I want to make a crud simple I am basing myself on some ready classes. My doubt follows: public class ConnectionFactory { private String url = "jdbc:postgresql://localhost:5432/aluno"; private…
-
4
votes2
answers176
viewsHow, by clicking on the notification, delete the notification and do not open the application?
I need to send a notification but would like when the user clicks on the notification it is deleted and does not open the application The part of generating the notification that is already working…
-
4
votes1
answer1002
viewsUpdate Many to Many Entity Framework c#
I am having difficulty updating a record with entityframework, I will inform the whole structure below. In short, I have a register of artists, where these artists are related to categories.…
-
4
votes1
answer30
viewsUsing KEY element
In my model, I use a view that is built on the basis of certain joins of tables, which have no auto incrementable ID element. My model requires that I assign a TAG Key, however, as I have no single…
-
4
votes3
answers1203
viewsHow to update the table (bootstrap-table) via JS after registering?
After registering (within a modal), the table should be updated automatically. But I’m not getting it. NOTE: Languages I am using is PHP and JS. In jsfiddle, there’s a small demo, in the JS tab is…
-
4
votes1
answer155
viewsSchedule linux task (Cron)
How to open a file and shut down your computer with crontab? Follow my attempt: 30 07 * * * killall qbittorrent (funcionando) 50 07 * * * shutdown -r 1 "Desligando desktop" (não funciona) 30 12 * *…
-
4
votes3
answers210
viewsFunction contrary to TRIM
How to insert characters in a field varchar in Mysql? For example, in the update with Trim vc you can remove certain characters from a field varchar... but and add ? Example: update tabela set campo…
-
4
votes2
answers180
viewsVery large integer does not work
My code is like this: #include <stdio.h> int main() { unsigned long int L, N; scanf("%lu%lu", &L, &N); printf("%lu\n", (L-(N-1))*(L-(N-1)) + (N-1)); return 0; } When the test case has…
-
4
votes1
answer1370
viewsDoubt in class diagram
I am developing my class diagram of a project and got the following question: How do I indicate that only ADM can register a contributor? Do I have to put that in the Class Diagram right now? Thank…
-
4
votes3
answers1099
viewsHow to divide the elements of a matrix by the average of its column
I need to divide the elements of a matrix by the respective average of its column, as I can do this, there is some function to perform this simple operation? Considering the matrix: > A <-…
-
4
votes1
answer748
viewsSqlite with Javascript does not work
I am knowing the Sqlite now, to try to deploy in a mobile application, I made this test based on some web codes but I can not return a recording of the data successfully, until it selects but…
-
4
votes3
answers703
viewsPrevent Bootstrap Oil
I am using Bootstrap on my site and I am making a bar with navbar. The menu consists of a Brand, 3 "li" items, a search bar and a link. How could I do so when using on smaller screens or even when…
-
4
votes1
answer169
viewsNumberlist with Visualg
Problem with this algorithm in visualg The code is making infinite loop "Numberlist" // Função : // Autor : // Data : 09/02/2016 // Seção de Declarações var a1,b1,c1:inteiro inicio // Seção de…
-
4
votes1
answer2041
viewsHow to set cookies and set expiration time?
I am with a div where I search only logged in users, in it I am displaying users but each update is inserted new records, gave me the tip to use cookise more never worked with it. the following code…
-
4
votes1
answer214
viewsCreate add-in that associates number to an image
I need to create a supplement (add-in) that associates a number to an image. Example: =getImageQualidade(1) 'e nessa célula ficava a imagem. I already know how to create/implement a basic…
-
4
votes1
answer1735
viewsProblem retrieving Datasource in Wildfly: javax.naming.Namenotfoundexception
I am trying to establish a connection using Datasource, and is returning the following error: Feb 08, 2016 8:15:03 PM org.xnio.Xnio <clinit> INFO: XNIO version 3.2.2.Final Feb 08, 2016 8:15:03…
-
4
votes2
answers424
viewsMutiplos projects in MVC and Webapi
I’m looking for if there are any project models that involve multiple MVC and Webapi projects. In the solution I’m thinking about designing (if possible) a content management solution for multiple…
-
4
votes1
answer210
viewsHow to create a simulator using SESSION
Hello, I am trying to create a simulator using SESSION, but as I am a beginner and very lay still, I am asking for the help of friends. Next I created the page where the user can change the logo,…
-
4
votes2
answers1010
views -
4
votes1
answer91
viewsHow to create an endless process?
Simple question, how do I make my application process to be "unstoppable" by the system? I want when a user tries to close the application to appear the message "Access denied", and when it forces…
-
4
votes1
answer923
viewsIdentify connection type 3g, 4g and/or Wifi
Good morning! I need to check the type of connection that the device is for example 2g, 3g, 4g or Wifi. Because after checking the type of connection I need to limit the device to perform some…
android-studioasked 8 years, 9 months ago dnsfirmino 401 -
4
votes1
answer603
viewsStart application only if a url is working (Online)
I’m starting to try to learn a little in "Marra", and I wanted to know if there is any code to check if a specific URL is online, if it is the application has to start normally, if not, the…
-
4
votes1
answer310
viewsAbstract class and C#properties?
Hello, everyone! Next, I created an abstract class called Tables, where classes of basic tables of the system will inherit from this abstract class. As Neighborhood, City, States, category, etc..…
-
4
votes1
answer233
viewsRange.Paste Runtime error when pasting web data
Hello. I am extracting some data from an html table of an ERP that due to limitations lead me to it. Anyway, the problem consists of, when copying the table and trying to glue it with range.Paste or…
-
4
votes1
answer398
viewsSaving data with hasMany relationship
I’m trying to do an update and three tables related to Laravel, the past data comes from a single view, and the relationships have been made, should be the update action of my controller that is not…
laravelasked 8 years, 9 months ago Bruno Santos 103 -
4
votes1
answer1338
viewsHow to Make Automatic URL in Paypal
I have a page with a form that, after submitted, sends the data to paypal, after the customer make the payment wanted it to be redirected to the return url I send along with this form, however,…
apiasked 8 years, 9 months ago Laranja Mecânica 499 -
4
votes1
answer166
viewsDoes Timthumb have security exploit issues?
I’ve heard programmers say they don’t use Timthumb ("A small php script for cutting, zooming and resizing web images (jpg, png, gif). Perfect for use in blogs and other applications") for security…
phpasked 8 years, 9 months ago Miguel Batista 2,812 -
4
votes2
answers293
viewsChange System Logo
I am creating in a system that I am developing for our client, a function where it allows the same to upload the logo and cut the same, then when it saves I am trying to load the image that was…
-
4
votes1
answer978
viewsPass a view JSON to the route
I’m trying to send a JSON of view for a route, but I’m not getting it. Unfortunately I know little about JSON, ajax, GET and POST. In the view, the json: var json = { "numeroMesa": numeroMesa,…
-
4
votes2
answers435
viewsPHP logout with Codeigniter
I am having a problem in logout of my system, it until it is logging out correctly and destroying the sessions, but if the user clicks the back button of the browser it goes back to the previous…
-
4
votes1
answer1984
viewsHow to drag a div on my page?
How can I implement a drag and drop in div without that element messing with other elements of my page and getting over them? I also needed him to stay where he was before if I push Esc.…
-
4
votes1
answer1307
viewsRename all files in a folder to random names
I need a command to rename all the files in a folder to a random name, which keep the same file extension and preferably with numbers, what I got so far was this: forfiles /P c:\teste\ /c "cmd /c…
-
4
votes1
answer1002
viewsConnect to SQL Server on remote server
I need to connect to an SQL Server service on a remote server via Sqlconnection, C#. Initially, it was not possible to find the server, but I solved this by modifying the hosts file of system32,…
-
4
votes1
answer1484
viewsUpdate a Jtable that is in a Jframe from a Jdialog
What I’m doing is a little longer, so I’m going to shorten the problem with a more objective example: I have a registration form and created a modal Jdialog with the fields I want to search. When I…
-
4
votes1
answer853
viewsCreating doc or docx file
I was wondering if there is any lib able to create a doc or docx file directly from an android app. I’ve tried using apache poi, but it doesn’t work. I’m using android studio. I’ve tried several…
-
4
votes2
answers22129
viewsGet current date in mysql
Colleagues. I have a table that stores the registration dates with DATETIME(), but I need to check if the registration date is equal to the current date, so I did it as below, but it doesn’t work:…
-
4
votes1
answer121
viewsHow to create an Event on a Webservice
I have a Webservice that has a method that records a new entry record and updates the list that contains those entries. Now I need the customer to sign up for a Webservice event so that whenever a…
-
4
votes1
answer1058
viewsAccent problem while consuming Webservice on Windows Server
Correction I have an accentuation problem when consuming Webservice on Windows Server. I have apache-Tomcat-7.0.63 installed on windows server 2008, and as SGB, Postgres 9.4 and with Java 8. The…
-
4
votes2
answers14581
viewsPHP CURL issues error "Unable to get local Issuer Certificate"
I am trying to get data from an API using the CURL extension of PHP but it is not working. The same code on another server is working. Here it works: But it doesn’t work here anymore: The code is:…
-
4
votes3
answers5185
viewsHow do I know in JAVA that the Resultset result is empty?
I’m running it through the database, and I have a problem SQL return an empty value. It is actually possible for this to happen and therefore I need to keep ready for it. Which method to identify…
javaasked 8 years, 9 months ago Renan Rodrigues 3,709 -
4
votes1
answer1203
viewsSend . txt file from one pc to another using http service
I need to send a file from one PC to another over the network, only using requests http, so I don’t have to lower the level of socket, that takes work. Someone enables me to clear up with some API…
-
4
votes2
answers108
viewsCast in sockets
Guys wanted to understand what the reason of doing these cast below is just by aesthetics? What does it really affect in the code? struct iphdr *ip; char *buffer ip = (struct iphdr*) packet; icmp =…
-
4
votes2
answers3630
viewsHow to center a Textview?
How to center horizontal text on TextView that is to center on the top and bottom line. <TextView android:id="@+id/txt" android:layout_width="match_parent" android:layout_height="match_parent"…
-
4
votes1
answer192
viewsUppercase Roman numerals with ucwords() or ucfirst()
While typing this question I modified some things, which made me able to solve the problem. That’s why I’m creating this "share the knowledge" in case someone has the same problem. Suppose the…