« first day (252 days earlier)      last day (3758 days later) » 

1:17 AM
0
Q: Automated Finals Calculator [Javascript/Jquery]

horace heI've been coding for a while, but this is the first actual project I've made. I generally do contest programming, and as you might imagine, good code practices are not exactly the top priority. I'd appreciate any pointers, whether overall design of the program, or variable naming, or things that ...

 
1:51 AM
@Jamal For the most recent question asked, shouldn't it also be tagged with ? I ask because of the description on the Grails site.
 
0
Q: Grails overloaded controller workaround

oxym0r0nI had an overloaded method, but Grails doesn't allow overloaded methods in controller actions. The overloaded method looked like this: def punch(User user, User source) { user.userVersion++ punch(user, source, null, null) } def punch(User user, User source, String latitude, String ...

 
That one ^^^
 
2:07 AM
@syb0rg: Probably so. If you're unsure, you can ask the OP.
 
@Jamal I commented on his question to ask.
 
2:47 AM
0
Q: Activity using multiple layouts

CatharsisGreetings code review people So I have been slowly getting more and more "at home" with android development and I would like some guidance. I have made an app that uses a ListActivity, that attaches to an SQLite DB. I'm using the onListItemClick function to fire up a "single record view" where I...

 
3:02 AM
@syb0rg this guy also has a robot half:
2
CoD in action.. another robot dude:
2
 
lol
love it
 
3:23 AM
0
Q: Java: Smallest prime factor of a large number (using BigInteger)

SamI'm working on a project euler problem and am trying to get the smallest prime factor of a BigInteger and my current code is: private static BigInteger smallestPrimeFactor( BigInteger n ){ for( BigInteger i = new BigInteger("2"); n.compareTo(i) >= 0 ; i = i.add(BigInteger.ONE) ){ whi...

 
 
2 hours later…
4:59 AM
Hey, @boztalay!
 
Huh .... You've earned the "Sportsmanship" badge. See your profile.
3
First on CR ;-)
 
Not exactly...
 
Mods don't count
 
I wasn't even the first.
2
 
They;re assumed to be sportsmanly.
Baahhh .. never mind, I was looking at the page where you click on it on my profile.
 
5:03 AM
Besides, the only time a mod doesn't "count" is with the flag badges. Mods cannot earn them because they can be gamed.
 
Way to empty my sails.
 
I was just being a good sport by being honest. ;-)
 
Huh, you don't have 100 answers, yet ... oh,, never mind.
 
I'd consider Sportsmanship a good badge at this time, considering it's vote-related.
 
5:25 AM
@Jamal what's up?
 
Just saying Hi.
 
Hey!
 
This room is usually quiet at this time.
 
Well, I'm around
Pretending I'm working on a little iOS pull to refresh control thing but really just goofing around
 
I'm just checking things on CR and SO.
 
5:30 AM
Same
I'm starting to get into writing answers on CR
5
 
That's good. I answer whenever I can, but I mostly have to make sure things are going well.
 
Yeah, I noticed you do a lot of editing of new posts to make sure they're up to snuff
Definitely helpful
 
0
Q: How to write this code efficiently and concisely?

user2809564In our company we have a machine hostname as - dbx111.dc1.host.com dbx112.dc2.host.com dcx113.dc3.host.com Here dc1, dc2, dc3 are our datacenter. Now I need to find in which datacenter my current machine is in. I will be running below code in some machine as shown above.. And below code wil...

 
Right. I'm also trying to tone down on edits overall, as requested by a trusted community member. But I want others to edit where it's best.
 
I hear you, it's a weird balance. I think it's good to make sure the questions are up to some sort of standard. At the very least, code listings ought to have proper basic formatting, like indentation
 
5:37 AM
I do tend to only fix indentation when the user has used tabs instead of spaces, which messes things up. If it's a lot of code, I usually wouldn't bother. I'm not sure if it can be done automatically.
 
Hm... seems like it could be, but a lot of code listings in questions aren't complete listings, and there are so many different languages they could be in
I was thinking about writing up a question for the refresh control I mentioned, but I'm not sure what the best way to go about it is
 
You mean in terms of the question itself, or how it'll fit the site's scope?
 
The question itself. It's only two files, a header and implementation, but it doesn't feel necessary or helpful to put the entire listing on there
The code is on Github, so maybe I could just list the parts I'm wary of, and provide a link for reference?
 
Just put the code that should be part of the review. Off-site code can still be looked at, but it shouldn't be included in a review.
 
That makes sense. I would just put a link in there if any context is needed for the code I list in the question
 
5:45 AM
Correct.
 
 
1 hour later…
7:01 AM
0
Q: help on assignment 2(question 1) of stanford's programming methodology

user3025998Here is basically the link to the assignment material: http://see.stanford.edu/materials/icspmcs106a/13-assignment-2-simple-java.pdf I've completed the program but I have a few questions. Firstly, I'm confused with the part where it says "The numbers in parentheses show the values for this diag...

 
 
1 hour later…
8:16 AM
0
Q: Efficient way of having Synchronous and Asynchronous method in an application?

user2809564I am working on a project in which I am supposed to make synchronous and asynchronous behavior of my client program. So I created an interface (IClient) which has two methods, one is getUserSync which is for synchronous behavior and other is getUserAsync which is for asynchronous behavior. Now c...

 
 
3 hours later…
11:02 AM
0
Q: Centroid of a polygon in Clojure

Domenico De FeliceI am studying clojure and functional programming. I wrote this function to compute the centroid of a polygon specified as a vector of points, e.g. [[10 20] [0 11] [50 30]]). Here you can read how to compute the centroid of a polygon. Can you give me hints and suggestions on how to improve this ...

 
 
1 hour later…
12:05 PM
0
Q: Is this the correct structure for a Webhook?

UliI would like to build Webhook, so users can receive data from a messaging app. I never created a webhook before and I would like to get feedback on my attempt. PHP: $url = 'https://www.example.com/user-webhook-request.php'; $handshakeKey = "1234abcd"; $data = array('title' => 'Hello', 'messag...

 
12:35 PM
0
Q: feedback on logic of dynamically generated controls based on data from dictionary

sanI have attempted the GUI controls creation in a prompt based on data from dictionary. what I want to know is it the best way of implementation ? import sys from PyQt4 import QtCore, QtGui class MessageBox(QtGui.QDialog): """docstring for MessageBox""" def __init__(self, data=None, pare...

 
1:00 PM
0
Q: code optimization for branch predictor. Is it necessary now?

user1844933Just I would like to share some part of code written in PHP several years before, working perfectly. I am new for my company, my senior programmers wrote extra few lines to optimize branch prediction. My question whether is it necessary to follow these code? Is it useful for performance? We are ...

 
 
4 hours later…
4:38 PM
-1
Q: Opensource to reduce incidence of work-related musculoskeletal disorders of the hand and wrist

JeanPhiI am about to publish an open source program aimed to reduce incidence of work-related musculoskeletal disorders of the hand and wrist. The principle is quite simple: The program can track work time to make sure it is being run all day long on a computer and on top of this physiotherapy exercises...

 
5:10 PM
0
Q: Use connection pool for LDAP server

Peter PenzovI created this simple example which I want to use to authenticate users with username and password. This is the configuration of the LDAP server: version: 1 # Entry 1: dc=unixmen,dc=com dn: dc=unixmen,dc=com dc: unixmen o: unixmen objectclass: top objectclass: dcObject objectclass: organization...

 
 
1 hour later…
6:26 PM
0
Q: Rotate image via javascript using CSS

RikardI'm doing a clock in javascript and I am not sure this way is the best way to rotate the pointers. Is this ok, or is there a better way? // browser vendors var browsers = [ 'webkit', 'Moz', 'ms', 'O', '']; // function to move the pointers function moveMe(el, unit) { ...

 
7:23 PM
0
Q: Refactoring elisp code that generates files

AbizernI wrote a simple emacs module that generates standard templates that I use for my blog's static site generator. (defun hakyll-site-location () "Return the location of the Hakyll files." "~/Sites/hblog/") (defun hakyll-new-post (title tags) "Create a new Hakyll post for today with TITLE an...

 
8:08 PM
0
Q: Javascript redirect from php

XeliI've got a colleague which used the following function in a lot of his projects function jgo($url) { ?> <script type="text/javascript"> top.location.href = "<?php echo $url;?>"; </script> <?php die(); } Now this feels wrong to me, going through so many layers of so...

 
 
3 hours later…
10:39 PM
I'm Jamaling the Raspberry Pi site :P
3
 
11:00 PM
0
Q: Code to design complete graph. Looking for recommendations on code architecture

JavaDeveloperI have tried to design the class called complete graph, needless to say disadvantages are very visible, but alternatives are not free from handicaps too. dependent inputs have led to verification headaches. In this code we rely on 2 inputs set of nodes and edge map. This creates the need to ad...

 
11:46 PM
0
Q: Fibonacci sequence in C

Brandon WamboldtI'm very new to C, so pointing out better ways of doing things, errors, bad practices, etc would be optimal at this stage. Thanks! https://github.com/brandonwamboldt/projects/blob/master/fibonacci/fib.c #include <stdio.h> #include <stdlib.h> int *calculateFibonacciSequence(int n, int start) { ...

 

« first day (252 days earlier)      last day (3758 days later) »