I am looking for the best way to advertise an on-line plateform.
Facebook, twitter, linkedIn, these are common ways to get known but does somebody knows another one?
@Vogel612 it's defined and makes perfect sense when you consider how type conversions work. The objects get converted to strings under sensible rules, and the strings get converted to numbers under sensible rules. So what if a nonsense expression like {} + {} gives (what appears to be) a nonsense result?
While setting up my gulpfile.js I replaced gulp.watch with gulp-watch (the plugin!).
When I do gulp, the task runs fine. However editing files doesn't regenerate the files. What is going wrong?
command line output:
$ gulp
[09:24:28] Using gulpfile c:\Users\User\_dev\github\project\gulpfile.js
...
@kleinfreund granted there are some very nice dynamically typed languages that simply don't allow silly conversions like that, but I've never seen this kind of thing matter in real-world cases
@Morwenn at its core it's basically a glorified assert that decomposes the expression you pass it and gives a readout of the expected value and whatever value it got
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [stimulator].[GetLastMessages2]
@serviceId bigint,
@stimulatorId int,
@from datetime,
@to datetime,
@atLeast int = null,
@lessThan int = null,
@lastHourLessThan int = null,
@hourFactor int = 24,
...
I am trying to grasp the concept of delegates and protocols in swift. So I have implemented my own PlayableMedia protocol with two concrete classes BlueRayMedia and DVDMedia like so:
protocol PlayableMedia {
func play()
func stop()
}
class BlueRayMedia:PlayableMedia {
func play() {...
I'm iterating through two lists to find matching objects. The objects have two string properties, Id1 and Id2 below. If Id1 is not null, empty or whitespace I want to use it to find a matching object in the other list. Otherwise I want to make use of Id2.
If both Id1 and Id2 are set to null by t...
Some time ago, this question was posed, asking for help in optimizing a Sudoku solver implemented in C++.
I decided to reimplement the code using C++11, but without guessing. That is, this Sudoku solver does not make guesses or backtracks, but instead only solves based on valid logical infere...
I'm using Google Guava 17.0 library. I have a class named AroundBust containing only two properties id of type Integer and size of type BigDecimal.
This class is instantiated based on the data stored in an XML file. A java.util.List is populated by a list of objects of this class.
This list is...
To review my use of multiprocessing, I don't think it is at all necessary to understand the algorithm, but it's the scrypt key-derivation function.
This uses hashlib.pbkdf2_hmac which was added in Python 3.4. To run it using earlier versions, you can paste in pbkdf2_hmac from here.
I've split t...
Please suggest improvements to the below code.
This program is to return a number one at a time from a given input list of numbers, with a frequency proportional to probability/fraction associated with each number.
I know it could be made a generator function. But if I have to do it inside a cl...
The pattern in itself is very nice, but unfortunately this does not solve the problem. You would have to be able to pass an Initializer<WITH<int>, WITH<AT_LEAST_ONE_OF<Long, String, String>> The main problem is, that there is one of three minimum required, but more are possible — Vogel61217 secs ago
A couple of years ago I had a "Rocks'n'Diamonds Files Archive", written in PHP (ugh). That Archive is no longer active, so I'm working on a new version of it, in Java.
There are hundred thousands of levels for Rocks'n'Diamonds, but there's no centralized repository for them. So that's what I'm trying to accomplish.
@chillworld you have to use their number from chat
@chillworld you have to use the CodeReview User ID
we lost a bunch of commands. one of the things that I want to do with the code is make it so that it will actually create the commands in Javascript code or whatever so that when I reload the code it reloads our commands, and I can delete the bad ones or whatever
I have implemented producer consumer problem:
Follwing below resources:
http://docs.oracle.com/cd/E18752_01/html/816-5137/sync-11157.html
http://www.csee.wvu.edu/~jdm/classes/cs550/notes/tech/mutex/pc-sem.html
I have used mutex_t and sem_t.
Reason for using mutex_t instead of binary semaphore b...
@DaggNabbit Well, technically it's for Rocks'n'Diamonds, which is a clone of multiple games, including Boulderdash, Supaplex and Emerald Mine. Plus it has a whole bunch of own elements, and also using "Custom Elements" so you can make pretty much anything with it. (I actually made a Minesweeper game in it)
@DaggNabbit I believe most levels are open-licensed. They might be someone's intellectual property, but it's still allowed to distribute the levels.
A couple of things to think about while writing your query....
Variable Naming
ALTER PROCEDURE [stimulator].[GetLastMessages2]
@serviceId bigint,
@stimulatorId int,
@from datetime,
@to datetime,
@atLeast int = null,
@lessThan int = null,
@lastHourLessThan int = null,...
I am refactoring a legacy application. I DO NOT have the ability to change the Permissions, CustomerReport or the ListItems classes. They are in external dll's that are given to me. I realize that the ref usage is dumb and it makes NO SENSE. I am going to work with my peers to follow better pract...
@Malachi Yeah. I'm trying to get to that one. You pretty well covered the code issues. I'll see if I can't spot some performance pick-ups when I have a chance.
@DaggNabbit Catch is nice to use, but its internal code is ugly, bordering on horrific. Don't get me wrong: there are good reasons for the ugliness--it's not just ugly because he doesn't know what he's doing, or anything like that. The internals are still extremely ugly though.
Malachi gave a good answer, but I'm trying to tackle the performance aspect, there is something that proc is doing that is very expensive somewhere I'm sure
I'm betting that Stuff() function is pretty expensive, but I'm not sure how else I'd go about it. He also has absolutely no indexes beyond the primary keys.
Oh I think I get it now. Boy this is ugly. He is self LEFT JOIN the same table 4 times with aggregate functions each time. This proc is crying for a temp table
I feel it should be possible to pass a table name via a variable to an SQL query without the security issues and the regex hacks function getEverything($table) { $query = "SELECT * FROM $table"; $results = $this->get_results( $query ); return $results; }
Now i have to make several thousand of these for each table :/
I am refactoring a legacy application. I DO NOT have the ability to change the Permissions, CustomerReport or the ListItems classes. They are in external dll's that are given to me. I realize that the ref usage is dumb and it makes NO SENSE. I am going to work with my peers to follow better pract...
What tools and technologies are used to build the Stack Exchange Network?
See also: Which tools and technologies are used to build Data Explorer?
Return to FAQ index
First of all sorry for the huge wall of text and the relative clutter of it - i sincerely hope somebody will find the time to read through it and give some advice, it will be much appreciated :)
So - I'm writing an utility audio plugin that specializes in "fullscreen" (the window is freely resiz...
Hey Robert. I see you were careful with the _Permissions edit, but unfortunately you were beaten to the post by snwobody's answer. It would have been an acceptable edit otherwise. Also, you should visit us in the chat room: The 2nd Monitor — rolfl ♦16 secs ago
I have written a small container class which groups a 3D position, a normal vector and a texture coordinate into one object. It uses the glm library for the actual data types (vec2 and vec3). This class is named Vertex. Here is the source:
Vertex.h
#ifndef CPP3D_VERTEX_H
#define CPP3D_VERTEX_H
...
I have put together a naive implementation of a VB6/VBA parser, and I'd like to see if the CR community sees the same things as I see can be improved with this code, before I start refactoring.
I've never written a parser, so this naive implementation is naive in all senses: I wanted to push it ...
I wanted to make a dynamic select statement from this year to 10 years. This gets the job done, but i feel like its a little…much?
form_dropdown('year', array_combine(range(date('Y'), date('Y')+10), range(date('Y'), date('Y')+10)), set_value('year'));
Specifically, is there a better way to cr...
@JohnP I never wrote a parser, so I thought I'd approach it as naively as possible and then refactor, and let the design emerge. Hopefully that'll work ;)
Hey I wrote this late last night, I would like to hear some thoughts if this would be a good way to find interesting candidates for rags-to-riches feel welcome to fork from it and play around too
Some quick stats on the past 30 days, the New York data center only (chat runs from Oregon, and we sync databases there...so there's additional bandwidth and such for that).
HTTP Traffic only:
20,335,940,765,006 bytes sent (18.5 TB)
2,839,549,699 total hits to our load balancers
8,314,044,406 ...
June is about to end. Summer's here (well, if you're in the northern hemisphere, that is.. otherwise, ... yay, winter!), and with it, vacations. We need a new community-challenge.
Let's play. I mean, let's find a game to play.
The game...
Has to revolve around reviewing code, or posting code ...
@200_success I can see your point, but it's not really my point
I think the whole company should switch over, but I'm not sure when or if ever I am going to express that, in my opinion git is way more powerful, especially with a good GUI behind it, could even integrate it with some form of continious integration
I wrote the following code for parsing the inputs of type:
./a.out "0.0|10|-0.3|US,JA,PA,CH|0.25,0.25,0.25,0.25|IND,CH,CAN,GER|-1.0" "|" ","
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define COUNT 10
typedef struct UserInput
{
char ***str;
float num[4];
int mcv_num;
...
it's a terminology distinction, sure, and you can, in your head, call one repository on a machine the 'master', if you want, but there is no technical reason why that instance of the repository is the master, or not.
it is things 'outside' of the git concept that make one node/instance/server/system a 'central' one, and if you want to call that central one the 'server', then go ahead.
@Simon - if you have a computer, you have a git server.
if you want someon to run, maintain, and create a convenient access mechanism for the server on which you store your git repository, then Github, and similar, are nice.
including issue tracking, code commentry, etc.
But, the code comments, issue tracking, etc, are not git (even though they (may) use git in the background).
> Next is the Git protocol. This is a special daemon that comes packaged with Git; it listens on a dedicated port (9418) that provides a service similar to the SSH protocol, but with absolutely no authentication. In order for a repository to be served over the Git protocol, you must create the git-daemon-export-ok file — the daemon won’t serve a repository without that file in it — but other than that there is no security. Either the Git repository is available for everyone to clone or it isn’t.
> This means that there is generally no pushing over this protocol. You can enable push access; but given the lack of authentication, if you turn on push access, anyone on the internet who finds your project’s URL could push to your project. Suffice it to say that this is rare.