I have made a simple tic tac toe game but i think I have not followed a few conventions and I hope if you could help me improve it by suggesting some fixes.
package practice;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class TicTacToe extends JFrame implements Acti...
A short time ago, I discovered the LinuxFromScratch project. After getting a system up and working (after much struggling), I realized that if I wanted to continue using LFS, some sort of package management would be quite nice. Of course I could have installed Pacman, apt-get, rpm, etc. like any ...
In this question related to rolling multiple dices, the OP pretty prints for a single case where number of dices is less than or equal to 6. This led to me finding this code golf on "Draw dice result in ASCII", but still only 6 sides.
I wanted to extend this to at least 20 sides, and possibly so...
Perhaps this is better for CodeReview instead of SO. Also, it would greatly help to learn how to avoid .Select. Use the Macro Recorder to do some easy, medium, and "hard" things in Excel and review the code to see how it works. — BruceWayne51 secs ago
@LokiAstari you didn't "fail" - the command looks pretty simple.. it's just me, I've never bashed or pythoned or ssh'd.. you got me curious though, and I'm probably going to try and find a bash thing to download that's not hosted on sourceforge over the weekend :)
I decided to use the Mods as my test subjects (but only the ones with publicly available github keys). Basically I used the script to encrypt a message using your github key and wanted to verify you could decrypt it. The Messages is encoded in base64 and wrapped in a function to decode it. That way it can be pasted directly into e-mail or a slack channel and the recipiant code de-code by just cutting and pasting into a terminal.
Your message was:
# Execute the following command to decrypt the file
@LokiAstari Why do you want to do this in the first place? Which keys do you want to swap? The public keys are already public, and the private keys shouldn't leave your computer...
I don't want to swap. I want an easy way to find people's public key. So I encrypt messages to them (github provides you public key). Only they can decode the message on the other end as only they have the private version of the key.
I defnately don't want people sending their private keys anywhere.
I want to congratulate you for not going the using namespace std route. It's a mistake many beginners make because they don't know any better and you went for safety instead of laziness.
You say you're not sure which of your includes you actually need. These are the ones necessary to run:
#incl...
@holroy Now I could have set up a machine. Put his public key on that machine and placed the secret on that machine so he could then log in and retrieve the secret. But that seemed a lot of work (maybe OK if we did it once). But its not a highly repeatable or easy to automate.s
So I wanted an easy (secure) way of distributing secret information. Where all I need is your public key to start the processes (If my colleague is in a different time zone and our work hours don't overlap getting the public key the first time is a pain (then I have to manage the public keys)). Just seemed simpler to use a set of publicly available "Public Keys" to generate a private message.
The following snippet is a brute-force algorithm for computing a graph radius in time \$\Theta(V^2 + VE)\$ and space \$\Theta(V)\$ simply by doing \$|V|\$ breadth-first searches over each node in the graph. The graph radius is a minimum graph eccentricity of any node of the graph, where eccentric...
@LokiAstari If you have my public key, you could use that to send me secret messages over the open internet. That is the main point of encryption. And to verify it's from you could sign it using your public key... If he doesn't have access to your public key, then you might have a little handshaking to be done, but I still can't the reasoning behind your script. But I leave you to it...
@holroy The point was to show that you can use github as the source of public keys (you don't need to manage the keys yourself). I don't need to have your public key, I can get it from github and encrypt the message without having to ask you for your public key (which can waste upto a day getting the public key). The rest of the script is just using the public key and standard openssl commands to do the encryption de-cryption.
@holroy The other point of the script was rather than the recipient having to remember how to decode the message (or doing a 30 minuite google on how to use openssl). Was just to provide it as a script that he can cut and paste to get the message.
@holroy None of this is special or unique. I just wanted to make the processes as trivial as possible (I just strung the already available tools together).
@LokiAstari Good for you, if it serves your purpose. If I received a message with script to execute, I would normally not touch it. And similarily I think that if someone has a public key, they also know how to handle encrypted message. And who is to say that they actually run either bash, python or Linux for that sake? But your mileage may vary...
I'm building cross-platform application (every mobile/desktop OS + web in ASP.NET). I'm using Xamarin, so I can do everything in C#. But before I start working on UIs, I want to build soild, flexible Core/Domain project that will be shared in all Client apps.
I read a lot about DI and IoC conta...
The point of the script was it is so trivial you can see what is in it. It is a `base64` and an `openssl` command strung together (you don't need python on the receiving end). Yes this is limited to people with slight technoligal skills.
@Hosch250 Lucky you... Dealing with text files under various operating system required too much knowledge on various variants of line endings... Like Mac used to only use \r... So that meant you had to write your shell scripts to handle all kind of line endings... Not nice...
@Hosch250 Haven't you programmed in Linux (including Debian, FreeBSD, NetBSD, and so on), Solaris, SGI, DolphinOS, HPUX, IBM AIX, and various other operating systems?! Surprise...
@Mast @Hosch250 I have Linux on a specific SSD and I have windows on my HDD. The only reason I ever switch to windows is if I want to play games, so I don't have to mes around with this partition malarky
@Hosch250 Sorry for digressing, but when you say "duel-boot" you reminded me of a story of a friend of mine who installed "MS Dos 3.3", "MS DOS 6.22", "Windows 95", "Windows 3.11", "OS/2" (and possible a few more) on a computer. This took quite a while, but when finished he had left a little space, so he decided he wanted to install "Dr. Dos" on the last partition. But that installer was dumber than the others, so it assumed it had the hard disc for it self, and repartioned everything...
Five years ago it seemed that many were using a Code Review tool independent of the Version Control.
It appears that now GitHub, Visual Studio Online, Perforce all have some kind of code review capability built-in.
What's the case for using the traditional Code Review rather than the built-in fe...
my name is Paweł Ludwiczak, i'm Senior Product Designer at StackOverflow. and I'm form Poznań, Poland. i think that's all about me :D if you have any questions feel free to ask them. anyway, i wanted to talk to you guys about your site's design. i know you've been waiting for this looooooong time.. what we are going to prepare is some site skin, logo (whole branding) and some swag
@roast_soul: It might get the job done, but unless there's a compelling reason to use serialization then it seems pretty unnecessary. (It's conceptually analogous to converting a number to a string just to copy it to another variable which then gets parsed back to a number.) Either way, if your code works as expected then this question is off-topic for Stack Overflow. You might try the Code Review SE site instead. — David47 secs ago
have you thought about your branding? how it supposed to look like? what it supposed to tell to other people and your community as well? have you had a night dreams with some site's skin vision? or logo?
@Jamal i'm already working on that stuff. i will post on meta pitch of new design, gather some feedback, redo (if needed) and after we have something cool you like, i'm gonna work on coding it
@TopinFrassi basically i would like to do it asap. so i want to finish designs in coming hours/days. then present it on meta. after i got feedback, i'm gonna iterate on design and code. it shouldn't take longer than 1-2 weeks (I HOPE!)
I think a minimal design would work well: something like Stack Overflow but with different colours and logo. I consider us as sister sites that complement each other.
2
I'd also request to keep the whitespace relatively compact.
on the other hand, i'd love to add some touch of love. something that would make this site stand out from others a little. we have plenty sites looking similar to stackoverflow.com - let's try something slightly more original
@200_success i need to clarify something. there are things that are consistent across whole network ( s.tk/sites ) - we can't change those at the moment. probably, window width is one of those things
@Zak lol, the rubber duck is cool :D i mean it's awesome for your community and for people who are pros in your community. but i can bet that there's bunch of users who don't know what's going on with rubber duck. some part of me is a developer. not back-end, but frontend. i used to do some php and shits like that AND before I googled 'rubber duck' couple days ago, i did not know what is it :) and I think i am "power user". so i'm scared that some other people wouldn't know that too.
there's also a little confusion between a rubber duck for self-review and a duck used as a honey pot for unnecessary change requests in reviews by non-coders
Well, IMO the rubberduck brings some kind of warmth to the community. Plus people would figure it out quickly (I think). You know, it's a symbol for us. Maybe not the one we need right now, but the one we deserve
logo has to be simple & symbolic. it's going to be not only in your header or t-shirts, but also on smaller areas.. what i mean is that it should be recognizable in smaller sizes, like favicon.
@Ludwik you must have stumbled upon our (@RubberDuck's & I, and @Hosch250 and @Vogel612 and @mjolka and a bunch of other regulars contributing to) little pet project then - rubberduck
as I said - it has to be symbolic. for example, if i'm going to look at s.tk/sites and i will see 'rubber duck' icon, i'd probably think about some bathing site (whatever it could be :D)
Ooh... That was big... But the concept of some code and an eye reviewing it, kind of reads code review to me. Unfortunatly, this is possibly copyrighted...
ok, i'm going to show you what i had in mind regarding your logo. let me give you context first. as @Hosch250 said - magnifying glass is about searching. and searching is not everything that this community is about, right? but magnifying glass is about searching only if it's without context. if we add it some context, like some metaphor of code, then we would think about magnifying glass in different way probably, right?
I have these two arrays.
array = [10849,10850,10851]
checker = { 10849: [10850], 10850: [10849] }
'array' is an just array.
Hash named by 'checker' means relations of elements, for example, 10849: [10850] means 10849 and 10850 can't stay together in array. so, 10850: [10849] also means 10850 an...
before I upload my proposal, let me give feedback to @holroy upload - it's cool, because it's damn simple and symbolic. there are some things that are not quite clear for me.. like what the hell it actually shows :D but generally this is very cool!
ok. drumroll please. very first proposal for logo. i have very strong feeling about it. i described story behind this logo above actually, so i'm not gonna repeat myself. i just hope you not gonna kill my enthusiasm about this logo :D:D:D
i know it's very small thing for you for now (after that 1 year of waiting). but i wanted to know your taste first, find out what are your thoughts, ideas, etc.
@Ludwik Do you think it would look good if the glass was "splitted" as it's shown in the meta post we have? As it's almost spells CR? Buuttt, it's great
@Ludwik Hmm... Kind of like it, but could it be combined with a slightly longer stem, and possibly the broken circle symbolising the CR from the meta post?
@Hosch250 the stem, as a part of magnifying glass shouldn't play main role here. it should be secondary. but sure, we can try version with longer stem as well, why not
regarding the stem... i also had a little bit more modern version of magnifying glass. less symbolic than the "classic" one but still gives some context. let me upload that version too
@Ludwik It looks like the zoom option on one of the phone I had (can't remember which one) which is good for this, but like everyone said it looks like a lot of other things :P
i actually like it! it's not too obvious that it represents "CR" but I think it doesn't have to. i supposed to be symbolic, metaphor. and i think it is.
http://www.commitstrip.com/en/2015/11/20/when-i-expain-to-the-customer-that-their-sdk-is-broken/ CommitStrip When I expain to the customer that their SDK is broken CommitStrip 1448045447