All Questions

2
answers

Is it really necessary to create a 3rd auxiliary table in N-N relationships?

In several places I see that when you have a N - N relationship (if memory does not crash) it is recommended to create a 3rd helper table and then later it will be transformed into a 1 - 1 relationship ( also if memory does not fai...
asked on 17.07.2017 / 16:44
3
answers

How to crop an image to the center when uploading the same

In the project here I want to display the images in a square-sized dynamic div where its maximum size is 240 x 240. Assuming a user uploads an image with a rectangular dimension (eg 500 x 280), that same div becomes "disfigured" since its hei...
asked on 31.08.2014 / 03:42
2
answers

What's the difference between Simple Factory, Factory Method, Abstract Factory?

What are the main differences between these design patterns? In which situation can one pattern be better than the other?     
asked on 08.10.2016 / 05:33
3
answers

With CSS to cut a text? Type a cut text effect or broken font?

I was wanting to create a text to use as <h2> in the site, I wanted the form of text to be maintained I do not want an image, because I want to keep the text semantic and accessible. Is there any way to get this result with CSS...
asked on 10.10.2018 / 20:50
1
answer

What is it that allows a method to be intercepted in C #?

Intercepting a method is a technique that can be used to execute a code snippet before executing a master action. That is, in a very simplified way this would also be an example of interception: public void A(){ Console.Writeline("Estou a...
asked on 08.02.2017 / 19:55
7
answers

Understanding the JSON file

I have code similar to this in JSFiddle . On my WAMP server at home I tried to work with JSON (JSFiddle does not contain the JSON file to test). In a question I asked about how to insert data into a database with jQuery answered me that...
asked on 30.01.2014 / 19:14
2
answers

What is the function of the function in jQuery and what is the correct way or time to use it?

Whenever I go to work with jQuery I simply create: $(function() { }); Because it was the first form I learned, at first I thought it was an "int main ()" pattern in C, but then I came across other shapes like: $( document ).ready(functio...
asked on 16.10.2017 / 20:45
4
answers

Is it possible to do client-server communication in real time via HTTP?

TCP sockets I can put a server application in listening and make clients connect and wait for requests on both the server and the client, having the possibility of the server sending information for ALL clients connected without any request f...
asked on 12.03.2014 / 19:56
3
answers

Can a program in C know which OS it is compiling?

I'm developing a multi-platform API in C and need to know if there is any way to know which OS is being compiled. For example, it could be a precompilation directive #ifdef LINUX #include<linuxlib.h> #elif OSX #include<osxlib.h>...
asked on 16.02.2014 / 01:13
2
answers

#pragma once or #ifndef?

I know there are two ways to prevent a header file from being duplicated in C \ C ++: #ifndef FOO_H_INCLUDED #define FOO_H_INCLUDED class Foo { // código }; #endif E #pragma once class Foo { // código }; Being the first I...
asked on 17.03.2014 / 20:22