i came here asking about the animation because who i am not interested in pusuing this current implementation if i can't make it smooth. but okay here we go.. i dont understand why you are saying using classes or a prototypal chains would acheive a protected variable? even the first google result says that even if you make properties of an object they will always still be accessible from the console? am i not reading that right? — John Murphy42 secs ago
@200_success If we're talking in general, a client-server model can nullify a lot of hacking usually but there's always something that the client has to have access to that hacks can abuse. The best defense is either to put so many little roadblocks in place that it isn't worth the effort to hack or to design a game where hacking gives you little advantage
Negative.. syntax errors aside, this would be how to write it
select rownum from @holdingTable
where foo not in (select bar from @holdingTable)
and bar not in (select foo from @holdingTable)
group by rownum
having count(rownum) = 2
Here's the problem. If you host all the logic on the server and make the client basically just render junk and report key-presses you need interpolation. Give the client any more responsibility and it's hackable.
@quartata I don't think the client should be responsible for any logic besides that which is related to displaying to the user, and getting input from the user
This is a bit off topic for SO. You might be better off asking the question in code review. Having said that : the amount of saving is small. I would be asking what would the performance benefits be by including the framework overhead. — jeff1 min ago
I'm new to Java and is trying to solve the beginners problem of finding out the number of vowels in a string. The code below works. However, I was just wondering if there is any alternatives to any of the steps that can improve efficiency as well as simplicity. Any help would be greatly appreciat...
Compile with: gcc -std=gnu11 -o "portknock" "portknock.c" -lpcap
I did this as a learning experience, and it actually ended up being something useful. I made a port-knocking spawned reverse TTY with it, and it could easily be made into a port knocking firewall daemon.
#include <stdio.h>
#include <
@Lumberjack Yes, go for codereview. Your question is good, codereview shall give you the hints. Just keep trying, questioning, working through tutorials and trying your own experiments and you will master it. — Jan Vlcinsky47 secs ago
I am trying to figure out a more efficient way of converting money into change. The code below is what i have written so far. It works perfectly but i know the code can be improved. Is there a more efficient way of writing this code? Thank you!
public class Problem2 {
public static int quarte...
I should visit more often, is licensing still the main theme? I have an OSS project, I could probably contribute things... but I don't know what to ask.
I am trying to figure out a more efficient way of converting money into change. The code below is what i have written so far. It works perfectly but i know the code can be improved. Is there a more efficient way of writing this code? Thank you!
public class Problem2 {
public static int quarte...
What do you think about this file system manipulation helper? There is an utility class Folder which I can use to define directory structure of my app:
static class Folders
{
public static Folder Bin =>
new Folder(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
...
Quick poll.. would something like this (my code, wrote it to solve a specific purpose) be closed as example code? I feel it is more of "practice code" but others may disagree and say it's example code...
This is my first try with Java. AWS Client is an open source GUI application to monitor and ssh into EC2s, and probably will expand to more services.
Can I get code review for this application?
https://github.com/gadelkareem/aws-client
I was not familiar with code review. That is good to know for these type of questions. Thanks. A moderator can "remove" my question if necessary. — Lumberjack23 secs ago
The D programming language is an object-oriented, imperative, multi-paradigm system programming language created by Walter Bright of Digital Mars and released in 2001. Bright was joined in the design and development effort in 2006 by Andrei Alexandrescu. Though it originated as a re-engineering of C++, D is a distinct language, having redesigned some core C++ features while also taking inspiration from other languages, notably Java, Python, Ruby, C#, and Eiffel.
D's design goals attempt to combine the performance and safety of compiled languages with the expressive power of modern dynamic languages...
I could personally try and create more content in a Q&A format but CodeReview.SE does not seem like a site that lends well to people answering their own questions?
Funny you mention create more content - that was exactly my CommunityBuilding.SE answer to How do I start an active userbase for...
@Quill I was just reminded of the existence of that post... I thought it could use a bump.. thinking again it was a stupid edit that I shouldn't have made
I have some MATLAB code that computes the curvature of a 2d image. It computes it iteratively using forward and backward differences. Could you offer some tips for how I can optimize this code?
%This assumes the image, Io, is a double in [0,255]
function [K] = IterativeCurvature(Io,epsilon)
% p...
Let's start with your HTML
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
type is optional. By default, browsers execute scripts as JS. The only time I see type being used is when you want to tell the browser it is not a scr...
We've run a couple of large-scale swag-yielding events around these parts lately. So far we haven't had a good way of keeping track of each one's status, short of long comment chains on the individual contest posts (or random other meta posts). This question will serve to aggregate all of that in...
I am trying to make a really really simple C# code for hangman but I just can't figure it out this is one of the first projects we have in my computer science class and I don't even know where to start.
Update: This survey is now closed. Stay tuned for release of the full results.
The annual developer survey is now open:
https://www.surveymonkey.com/r/so-2016
It should take about 10 minutes to complete. We know you have bugs to squash and things to build and taking surveys isn't in your j...
753 pennies.
Doesn't look like it, huh? The median guess was 423.
56,032 people took the survey (wow). 42,035 respondents made a penny guess. 54 of you guessed correct. 37 correct guessers will be getting swag in the mail (they included a user link with their survey responses). 118 more of yo...
This was asked in the SQL Helpline room:
I have a sql query concern. Could you help me?
It goes like this. I have a table with the Records
A B
A C
B A
B C
C A
C B
How do I get only the records that there aren't duplicated in both columns
A B
A C
B C
While it seemed simple at first, it was...
I'm doing an assignment to find the space complexity of a couple different sorts in c++. I'm having trouble finding the space complexity of a Radix sort. I used why the time complexity is O(nk) for the elements of the array and k being the most digits of the values in the elements. I just found t...
I haven't spoken Japanese in a while. I get into conversations every now and again, but I can never escape that weird feeling of conversing with someone in their first language with your second
maybe I'll use ANTLR to make a psuedo code compiler
By HD I mean hard drive.
I am a self-taught programmer and would like anyone to point out anything that is not the standard or professional way to do things. Any help/advice is greatly appreciated.
I would love to post a lot of my code or perhaps make a youtube video explaining certain portions...
Though, the code that I made works perfectly fine. I'm wondering whether there is a better and less chunkier way of doing this.
$(document).ready(function () {
var item1 = "active";
var item2 = "unactive";
var item3 = "unactive";
var item4 = "unact...
I have code which looks something like this (with comments indicating the irrelevant parts which I've snipped for brevity):
# Returns (bad, total, skipped)
sub checkCode {
my $code = shift;
return (0, 0, 1) if skipCode($code);
# Stuff
return (0, 1, 0) unless $irrelevantCondition...
Sonar/FxCop are telling us that we shouldn't use void async methods. That's ok.
This is the current implementation:
private async void InitMethod(ServiceControl serviceControl)
{
if (serviceControl != null)
{
await Task.Factory.StartNew(() => serviceControl.Execute());
}
}
...
well this is my code:
fct 1 a b = a+b
fct 3 a b = a+b
fct 8 a b = a+b
fct x a b = a-b `for the rest : 2,4,5,6,7,9..16`
My question is, is there a way to combine the 3 first lines, as they do the same thing, something like "case x of" ? but with multiple values. Any help will be appreciated
During a code review I have seen the following line within a controller:
@return_path = params['return-to'] || request.path
This is the first time I see (in rails) a parameter name with a dash instead of with an underscore.
I have looked for style guides but all I found is not talking about...
I am trying to find the xor of binary number given in list a and (key = 1) k1 given in the program below. I tried the below code but it gives xor value of list as ['01100001', '01100001', '01100001'] ideally I am looking for ['01100001', '01100001'] or 01100001 01100001. Any hints will be appre...
I have built real-time markdown editor in order to learn AngularJS by practice. I think what I'm trying to do can be done a better way. Any suggestions appreciated. Here's my code:
var myApp = angular.module('myApp',[]);
myApp.factory('Data',function ($window) {
return {message: $window.loc...
I am using PHP in order to create a custom wrapper for including files, for this I have written this class:
<?php
class Refrences
{
#region properties
private $_basePath;
private $_lastIncl;
private $_lastRequ;
#endregion
#region public members
public function __cons...
lol just saw the discussion about CR not usefully. Maybe not for him, but if you don't find CR usefully you have also an attitude that your code is the best one in the world.
so next time, just ignore those users and point them out that he doesn't need to be here as he doesn't find it usefull
I have wrote a windows service that I am currently not that happy about as I am facing design issues (First windows service).
The aim of this service is to monitor CPU usage and send an alert when it reaches a threshold (coming from the DB).
So the user has set a threshold of > 60% CPU usage fo...
Hi I'm currently implementing smartrecruiters api. It's working but it's so slow.
Here's my code snippet:
function getContext()
{
$opts = array(
'http'=>array(
'method'=>"GET",
'header'=>"X-SmartToken: xxxxxxxx"
)
);
return $context = stream_...
@DanPantry I find refactoring fun(as long it's no whole week). you see your old code and if you can do it better you know you are better then your old self ;)