« first day (1262 days earlier)      last day (2759 days later) » 

12:00 AM
RELOAD! There are 2875 unanswered questions (92.5148% answered)
 
12:49 AM
I ended up using children: React.PropTypes.any.isRequired since the type of children can be multiple types
 
1:36 AM
0
Q: Box stacking problem (rotation allowed but each box can be used only once)

hwchungI am trying to solve the "Stacking boxes" problem. I know how to solve the most common version in which box can be rotated and each box can be used multiple times. This particular variation that I am having trouble is with one constraint that each box can be used only once. I found this proble...

 
1:50 AM
0
Q: Fastest way to read large file

CherlexIn order to process a lot of large log files, I want to find the fastest way to read file.I've tried several ways as follows. 1.OOM try { List<String> lines = Files.readAllLines(file.toPath()); int linesCount = lines.size(); for (int index = 1; index < linesCount; index+...

 
 
2:20 AM
@OldProgrammer This question would not be on-topic for Code Review, since it is seeking advice on how the code works. CR is for code that already works as intended and is understood, but which you would like to improve. — BJ Myers 25 secs ago
Are there still someone who doesn't know git or github? I surely know that and already uses to my version control. But this is not the version control issue. What I ask is to make source code partial private within the company. PR and Code review does not related with this problem. — casamia 27 secs ago
 
2:47 AM
0
Q: Mersenne Primes Generator in C#

ParadoxI've made a program in C# that generates Mersenne numbers starting from the current largest known Mersenne prime. It then calculates the modulo between those numbers and smaller ones starting from 3 in order to figure out if it is divisible. I've used some math tricks to make the process pretty f...

 
 
1 hour later…
4:15 AM
possible answer invalidation by SM Riad on question by SM Riad: codereview.stackexchange.com/posts/144278/revisions
 
4:26 AM
@Duga got it
 
0
Q: Using a react component to send ajax POST request to a Rails backend

Ka MokThe follow is a component for a form which uses React JS to render an HTML form. It sends a POST request asynchronously. I need some eyes to tell me if this is the best practice. hunter.js.jsx var HunterForm = React.createClass ({ submit: function() { $.ajax({ type: "POST", ur...

 
4:56 AM
0
Q: Put Buisness logic in to external class rather than controller or model in MVC ,is this way is right

Susantha7i make External class hierarchy in Codeigniter for my app. as shown below. Class Hierarchy those classes are located in libraries folder. whole project file structure is shown below. Codeigniter folder structure Project | +-- controllers | | | +-- App.php | +-- models | | ...

0
Q: A function that tests whether all items in a list are the same

mishaThe program consists of two functions: the helper predicate function singleton-list? that checks whether a given list contains only one item and the function that does the actual job all-same?. Please, take a look at the code: ;; Predicate function: singleton-list? ;; ---------------------------...

 
5:19 AM
0
Q: Recursive Function to Build a Map

MattI need some advice on the following recursive function. The idea of the function is that it will build a map that contains a key (path) and the data corresponding to that path. This is why I keep passing the map back as it's being built. The problem seems to be that it gets to the point wher...

0
Q: NFS cache and Kernel upgrade

user1071840I want to confirm that NFS client cache on a Linux machine will be cleared on upgrading the kernel.

 
5:36 AM
0
Q: Function that tests whether all items in a list are the same

mishaThe program consists of two functions: the helper predicate function singleton-list? that checks whether a given list contains only one item and the function that does the actual job all-same?. ;; Predicate function: singleton-list? ;; ----------------------------------- ;; The singleton-list? p...

 
6:02 AM
Zombie Rate skyrockets.
Users > 150 rep and Users > 200 rep went down?
 
6:22 AM
@EBrown Strange?
 
@Phrancis Unexpected, more like.
 
Could be someone's account was deleted or something like that, I guess
 
It is Sunday, which is trash day on SE.
 
6:37 AM
0
Q: Find the shortest whole repetitive substring (part 2)

Lin MaThis is a continued improvement from discussion here (Find the shortest whole repetitive substring), since code has changed a lot dues to improvement, I post it here. Major smart ideas are from arvindpdmn. Major algorithm ideas, since we need to find wholly repetitive sub-strings, we only bui...

0
Q: Checking the balanced parenthesis as asked in interview

CodeYogiInput: Input contains one string 𝑆 which consists of big and small latin letters, digits, punctuation marks and brackets from the set []{}(). Constraint: Constraints. The length of 𝑆 is at least 1 and at most 10^5 Output: If the code in 𝑆 uses brackets correctly, output “Succ...

 
6:59 AM
TTGTB
 
@FranzGleichmann this would not fare well on Code Review as it is essentially example code, which is off-topic there. See the on-topic page there for reference. — Phrancis just now
 
7:19 AM
0
Q: (follow up) StringRef v.2 - read only std::string like class similar to boost::string_ref and std::string_view

NickIdea behind the class is same as C++17 std::string_view, boost::string_ref or llvm::SrtingRef. StringRef is immutable and not-owning. I did not implemented substring() yet, because I will not need it. Example usage: std::string name = "xxxx"; void store(const StringRef &s); void something(c...

0
Q: Should I merge two functions into one or should I leave them as they are?

Yu ZhangI have the following functions in JavaScript: function SelectFirstVisiblePublicationAndHideIt ( PageObj ) { var hideButtonXpath = "//img[@title='To hide this item in your profile, mark it as invisible']"; var hideButtonArray; var numberOfHideButton; var publicationTitle; aqU...

 
7:49 AM
0
Q: Solving a game in C++

DairI wrote a game solver similar (but with reduced features) to an application called GamesmanClassic but in C++. The general idea is that (roughly speaking) board games can be represented with the four following functions: initial_position -> Starting board position generate_moves(pos) -> Gener...

 
8:00 AM
Tumbleweed candidate; zero score, no answers, no comments, and low views: libconfini (shared library)
 
0
Q: Removing certain items from list

Zs VI have to co-operate with third party APIs from where I get a list and I have to remove certain elements before passing it toward. I have a working solution but I am opened for every suggestion to make it better or more reliable (assuming the third party API maybe will change a bit in the future)...

 
8:20 AM
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Silly redis implementation
 
Kaz
8:57 AM
Monking @all
 
0
Q: Project Euler #10 in C++ : It is taking too much time. (245 seconds )

Gaurish GangwarI'm creating a list of primes and keep checking any new number for divisibility with only prime numbers. I thought it should take less time but it is going over 4 minutes. How should I approach such a problem? #include<iostream> #include<list> #define X 2000000 using namespace std; list<long ...

 
Downvote for stupid tite. No apparent question being asked. Possibly you are looking for the codereview site? — EJP 18 secs ago
I'm voting to close this question as off-topic because it belongs on codereview, if anywhere. — EJP 44 secs ago
 
@Phrancis I wouldn't say it's a bad thing. You can enforce that you have an array of ReactElement or a single ReactElement and make sure that the children aren't optional
Buuuut note that strictly speaking children will always be ReactElement, so you should only really use one of the following
PropTypes.arrayOf(PropTypes.element).isRequired // requires an array of children
PropTypes.element.isRequired // requires exactly one child
PropTypes.element // requires zero or one children
You can, of course, write your own assertions too if you really wanted
Also make sure you use the React.Children helper utilities for interacting with child objects
this.props.children can be either a single object or an array, so React.Children makes it easier
 
10:07 AM
Questions about review are probably better posted here codereview.stackexchange.com4386427 57 secs ago
 
0
Q: Python : is there a way to write different conditions without copying several times the same lines

Annabelleit maybe a fool question, but I'm a stuck with it. I need to write a code that looks like this : def foo(file, condition2 = True): if condition1 and condition2 : # do lots of instructions elif condition1 : # do the same lots of instructions (but different output) Is th...

 
10:24 AM
Monking
 
For working code you should turn to codereview.stackexchange.com — GhostCat 12 secs ago
 
 
1 hour later…
11:50 AM
Shouldn't this go to code review? — Jakub Jankowski just now
 
12:03 PM
Stack Overflow is not for code reviews. — meagar ♦ 44 secs ago
 
0
Q: Code review - Set ENV variables properly

LykosI'd like some feedback, if possible. I 've followed the steps from this video from railscasts for setting ENV variables. This is my configuration # config/database.yml default: &default adapter: mysql2 encoding: utf8 pool: 5 username: <%= ENV['DATABASE_USERNAME'] %> password: <%= ENV[...

 
12:25 PM
Is your code not working or are you asking for a Code Review? — Jehof 50 secs ago
I would suggest asking this question on the Code Review stack exchange: codereview.stackexchange.com this is where you can ask people how to best optimise your code :) — Alfie Goodacre 20 secs ago
 
12:48 PM
@LokiAstari I started with Scala 4-5 years ago. Things have changed since then. Though for a good year or more I was writing advanced Java as I gradually learned real Scala.
Greetings, Programs.
 
2
Q: Merge sort C# Implimentation

DaImToIts been years (10+) since I have worked with sorting algorithms directly. So I have been trying to go over them again to refresh my memory. The thing is my ideas of how to do it doesn't seam to match the way I have the tutorials doing it. Does it matter? Assuming that my code is working I wou...

0
Q: Is it ok to pass errors in errors?

borisdiakurI want to pass errors in errors in order to know exactly the chain of causes, but without augmenting or even reading any stack until this becomes really necessary. And this is how I would achieve this: class RError extends Error { constructor(options = {}) { super(); this.nam...

0
Q: Make an airline reservation system using array and scanner class

ATHARVA KULKARNIThe details are: 1.store flight number using numbers(max 4),flight name,origin-destination and fare.(menu) 2.10 flights in total 3.user will only input the flight number to display all flight details 4.after that number of passenger travelling 5.final bill amount 6.It will again display the menu...

 
1:18 PM
@CaptainObvious Yo dawg.
Bloody spell checker changes the edit dialog to have white text. On a white background.
 
monking
 
lol, I just got another Yearling badge on CR
I have 4 of those things!
 
Nice!
I got my second one recently, I think.
 
Only got 2 here
Next one is in May
 
dang it @Jamal killing all my rep....deleting closed questions, what is up with that?
4
 
1:29 PM
---E
 
1:43 PM
monking!
@Malachi protip: make your rep with on-topic questions?
 
1:59 PM
@Mat'sMug the one question I answered 3 months before it was closed
but dully noted
 
2:10 PM
1
Q: Take a search term and return a list of location from an API

James TudsburyI've just refactored some code for a search box which takes a user search term, hits an API, returns a list of possible locations, and processes the users chosen result by sending them to a map page with their chosen result populated in the URL. I'm trying to improve my JS skills from just gettin...

0
Q: Code for calculating the books dispatched

Kuntal MajumderRecently I came across this, here is an excerpt from it, This is another problem about Indraneel's library. His library has one long shelf. His books are numbered and he identifies the books by their number. Each book has a distinct number. He has lost many books, since many of his f...

 
2:21 PM
0
Q: Formatting tsql xml

pricejtHow can I format the below xml so the first ExtensionAttribitue is my rows and the second extensionattribute is my columns and the third is my value. <IntegrationOutputData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ExtensionAttribute N...

 
2:35 PM
0
Q: Functional method for storing a query string as a simple key-value object

BrianI'm working on an isomorphic javascript module (query-hash) to handle query strings and base64 tokens. It's essentially a simple key-value object with methods for taking in data and giving it back in the format you ask for. function queryToObject(queryString) { return queryString.split('&') ...

 
2:47 PM
0
Q: Generic Implementation of A Linked List in C#

NateYesterday I posted my Generic List and received great feedback from it. I have taken the feedback to heart. Today I'm posting my take on the linked list in c#. LinkedList.cs using System; using System.Collections; using System.Linq; namespace GenericDataStructures { /// <summary> /// T...

 
3:14 PM
-1
Q: Can someone plzz explain the serch ,insert and display function in this code

user120463 %{ struct SymbolTable { char Lexeme[200]; char Token[20]; }symb[300]; int flag=0; %} Comment "/*"(.|\n)*"*/" HFile "#include<"[a-zA-Z]+"."[a-zA-z]">" Identifier [_a-zA-Z][a-zA-Z0-9_]* Keyword"int"|"float"|"char"|"return"|"auto"|"break"|"case"|"const"|"conti...

0
Q: How to update specific value in my csv file using python

Muhammad Izzuddin IsaI have some problem while doing my project. Currently i would like to update my csv file details. In my csv file there is matric id row, type row, weight row, points row, time row. my problem is, if the same user use my program, the details of the user will not total up. in this case i would lik...

 
3:33 PM
0
Q: Optimize my Manhattan Distance + Linear Conflicts function

JaldharI have written yet another n-puzzle solver. I used the A* algorithm to search with the Manhattan Distance heuristic. It worked very well for the 9-puzzle (3x3) but was unusable for most instances of the 15-puzzle (4x4.) In fact I would exhaust all RAM before I got anywhere near the result. So...

 
You might be interested in knowing that there's a Stack Exchange site dedicated to questions like this: Code Review. I'd suggest you include as much context as possible (e.g. the declarations for the involved variables, and perhaps the whole body of the procedure instead of just a thrice-nested loop, include AmplCo and AmplCr and whatever else is involved) and describe what your code is doing and why. Then make the title succinctly describe the purpose of the code and you have a great CR post. — Mat's Mug 2 mins ago
 
3:46 PM
@Duga that comment is well formed.
 
3:57 PM
0
Q: Stride Shuffling of Sequential STL Containers (except std::array)

VemuloI wanted to create containers from other container instances by changing the order of elements in a stridden pattern such as following: [1, 2, 3, 4, 5, 6, 7, 8] with factor of 2 as stride turns into: [1, 3, 2, 4, 5, 7, 6, 8] I try to keep it as generically as possible I can. If I have reinve...

 
4:09 PM
0
Q: Ruby How to get object attributes?

ELECON88I created an objects with two attributes, i need send that object as method attribute from another method and accede his attributes for search "type" of "torta" in method "order", ¿how can i do it? This is my code: $tortas = { "milanesa" => 5, "hawaiana" => 10, "cubana" => 15 } class Torta...

 
4:22 PM
0
Q: I have created my first app in react called as API Mashup

sahilThe app is functioning but I am not sure if I have done it properly. The code is present in my github repository. The demo can be viewed here. Please let me know where can I improve the code? app.js require('./map'); import React from 'react'; import ReactDOM from 'react-dom'; import Containe...

 
@CaptainObvious @Phrancis
 
@CaptainObvious great! what does it do?
 
@Mat'sMug No one knows, JavaScript's behavior is undefined.
5
 
@user2296177 Looks about right.
 
4:49 PM
@user2296177 should I be concerned I have that exact pentagram engraved on the floor in the shed out back? :P (Quite accurate though)
 
@ThomasWard Yes. Very bad.
 
@ThomasWard Are you worshiping Satan daily?
 
He's doing alchemy you plebs.
 
@skiwi JS secretly stands for "Just Satan", not "JavaScript."
 
4:51 PM
@skiwi more like using it to sacrifice certain evil computers. Less so summoning, more so bringing true evil to evil computers
and it's weird, that pentagram was in the shed when I started renting...
so someone must have left it here. :P
 
Wtf are all these emails
Spam spam spam spam
 
@ThomasWard and now you do its bidding
 
@user2296177 Oh, quite the opposite.
It does MY bidding!
 
0
Q: Java interface and abstract class example

Alexiz HernandezI am trying to fully understand interfaces and abstract classes in Java and from what I understood, I created a sample console application. Is there an error in the design or is this basically what interfaces and abstract classes are? Animals.java (interface): interface Animals { void call...

 
Think about it... did you use to sacrifice computers to a pentagram before? You've been tricked.
 
4:54 PM
@user2296177 If they're Windows they usually burn themselves out in my experience, so I just let them die on their own.
3
 
Actually I used to sacrifice computers via a .50cal, and the computer was put into a pentagram and then had sage burned around it
 
Speaking of which: there's a 15 minute delay between when I click "hibernate" on my Desktop and when the PC actually finishes hibernating.
 
I have evil ways about computers :P
 
#GreatJobMicrosoft
 
possible answer invalidation by McGee.WIll on question by McGee.WIll: codereview.stackexchange.com/posts/144244/revisions
 
4:55 PM
ANYWAYS, I discovered an evil thing about my computer - Android Emulator's burning it up
 
@EBrown You'd be great friends with an old teacher I had.
 
can't do android coding no more :|
 
@user2296177 How do you know I am not that old teacher?
 
@EBrown Ooooh, that's a heavy burn!
 
in VBA Rubberducking, yesterday, by Mat's Mug
Public Property Get Foo()  Foo = "WTF!"  End Function  Yep, compiles and runs. I think this is my new favorite #VBA bug.
 
4:56 PM
Isn't the whole VBA language a bug?
5
 
@user2296177 I should probably be concerned that the prior occupants summoned Lucifer upon the earth or something, though. (I have fun with computers and destroying them... melting them is fun too)
 
@Mat'sMug Not a bug, actually.
It's intended.
 
uh, don't think so
Public Sub Foo()
    Exit Property 'compile error
End Function ' compile error
 
@ThomasWard Don't worry about it! You're safe.
 
No, Microsoft created it, not a bug.
 
4:58 PM
oh you mean like this:
in VBA Lounge on Stack Overflow Chat, 1 hour ago, by Mat's Mug
it's my new favorite VBA bug undocumented feature
 
Yeah
 
@skiwi a hack, rather
quite literally
 
max(lst) - min(lst) == len(lst) - 1 is way faster and space efficient than creating a set just to test the same exact thing. Also, this Q&A is probably best suited for Code Review. — Jim Fasarakis-Hilliard 28 secs ago
 
general question for the Python coders/reviewers, does it make sense to use protected properties/variables within a class, with setters/getters, rather than just directly manipulating a property/variable? Ultimately just curious which way is the better approach, I've seen/used both depending on the use case.
 
@ThomasWard Regardless of language, protected should be treated as public in terms of property manipulation.
 
5:08 PM
@EBrown Why?
 
@user2296177 Because how else can you force the contract on consumers? I could extend your class and abuse the snot out of it.
 
Oh, I suppose that's very true. I was hoping you wouldn't do that though.
 
Never assume the developer will be a good guy.
3
 
@EBrown You must have one sick computer.
Time to take it to the doctor.
 
given I'm the developer in this case, I'm more or less trying to figure what's the best method/approach... :P
 
5:10 PM
My time-to-hibernate is a lot closer to 15 ms than 15 min.
 
@ThomasWard Getters/setters.
 
@Hosch250 time to hibernate for me is about 45-50 seconds, but I have a lot of crap running that needs to dump to swap :P
@EBrown that's what I thought, I've been trying to use them more and more heh. Thanks. :)
 
@ThomasWard Make sure the variable itself is private.
 
0
Q: Referencing a cell into ActiveCell.Formula

Darren Ignatius LeeI'm trying to implement a trading signal column in my spreadsheet to determine whether or not to buy a stock. The trading strategy in question is a simple moving average, and I have already created a user defined function for it. A portion of my code is as shown below: 'Trade Signal Worksheets(...

 
Seems more suitable on codereview.stackexchange.com. — kennytm just now
At this point, you need to see if Code Review is a better fit for your question. — the Tin Man 11 secs ago
 
5:34 PM
@ThomasWard How did the sacrifice go?
3
 
@EBrown Where possible, yes. Python doesn't have a private restriction declaration, though.
@EBrown you mean the sacrifice of the evil computer over there? points at the corner to the withered husk of a computer in the corner
 
@ThomasWard Pack it with Thermite and send it on it's way.
 
possible answer invalidation by qaiser on question by qaiser: codereview.stackexchange.com/posts/144388/revisions
 
possible answer invalidation by 200_success on question by Lykos: codereview.stackexchange.com/posts/144435/revisions
possible answer invalidation by Zs V on question by Zs V: codereview.stackexchange.com/posts/144420/revisions
 
5:50 PM
1
Q: Trying to build a bare metal stack on the stack

AdHominemI'm trying to implement a stack data structure, but not on the heap but using the stack. Also not using any Node or Element struct but raw ints. Is this feasible? This is my code (with debug printfs) and the output is below. It doesn't seem to work atm. My general idea was: Get some stack addre...

 
@EBrown Already done.
The End of that system has come.
 
I'm rusty on my Java and don't have a compiler ATM, does the syntax in my answer look correct?
0
A: Animals, inheritance and interfaces

xDaevaxOverall, it seems like your implementation is fine and accurately represents the relationships between the different classes and interface. You could improve on your design however if you would consider some style guides. Explicitness The default modifier for your classes / interfaces will mak...

 
@xDaevax I'm pretty sure the I prefix for interfaces is a .net thing.
inherited from COM actually
 
Oh.. What kind of barbarians...?
 
IKR
lol
 
5:56 PM
1
Q: Trying to build a bare metal stack on the stack

AdHominemI'm trying to implement a stack data structure, but not on the heap but using the stack. Also not using any Node or Element struct but raw ints. Is this feasible? This is my code (with debug printfs) and the output is below. It doesn't seem to work atm. My general idea was: Get some stack addre...

This question seems to be broken.
But I'm not sure if it should be closed.
Stack create_stack() {
    Stack stack;
    int bottom = 5;    //This could be any value. I just need an address!
    stack.top = stack.bottom = &bottom;
    printf("Created a new stack with stack.top: %p value = %d, stack.bottom: %p value = %d\n", stack.top, *stack.top, stack.bottom, *stack.bottom);
    return stack;
}
He's taking the address of a local variable.
 
Though, maybe the "I" is gaining traction:
 
He admits himself that the code is not working: " It doesn't seem to work atm. "
 
When I run across an Impl suffix, it makes me want to find the nearest living thing and kill it.
 
@user2296177 VTC - Broken Code
 
6:00 PM
Jess Pardue on October 17, 2016
Welcome to The Stack Overflow Podcast #91, recorded Tuesday, October 11 at Stack Overflow headquarters in NYC. Today's episode is brought to you by Sukkot, also known as the Feast of Tabernacles. (חג סוכות שמח) Sukkot is the Jewish holiday where you have to eat and sleep in a temporary hut that you build in your backyard. "Oooh" - David Fullerton
 
@StackExchange bwahahaha
 
lol
@DanLyons Yep. Seems like having an "I" prefix on one file name is much better than an "Impl" suffix on multiple file names. Additionally, what happens if you have multiple implementations?
 
I use the I prefix because it's convention, but it gets awkward when the thing you're interfacing has a name starting with I
 
I like the I prefix. I don't know how Java'ers tell interfaces from normal classes without peeking at the definition.
@DanLyons I have 36 or so IInspection implementations, have no problem with it
 
It does read strangely when it happens, but it seems fairly rare
 
6:06 PM
if it were missing, I'd read Inspection as the name of a base abstract class
 
there was one system I had to communicate with where the vendor decided to copy Apple and prefix it with a lower-case i, so our interfaces were all IIThing
 
oh come on
 
lol
 
In a few revisions of the interfaces, it was even worse: IiThing
 
0
Q: Plotting from a Pandas dataframe

AizzaacI want to improve my code. Is it possible to get the plot without repeating the same instructions multiple lines? The data comes from a Pandas' dataframe. But I am only plottin the last column (Total Acc.) e=df['Total Acc'].round(4)*100 #The repetitions start: row_awa = e.loc['...

0
Q: Javascript Wikipedia search using JQuery autocomplete

Cameron 2531Good afternoon, I was hoping I could get comments, suggestions and input on this project. The goal is to query the Wikipedia API with a search, and present the user the autocomplete options based on an API call that shows possible Wikipedia pages when entering the search using the jQuery autoco...

0
Q: A Twitter bot that fetches Forecast.io data and tweets out the current weather with text and emojis

Tony GaetaThis is my first attempt at creating a ruby script. I set up a Cron job to run this script every hour. Requesting constructive critiques and suggestions for making this better. Sidenote: I've hard coded the location to my hometown. I don't plan on changing it to another location. #!/usr/bin/env...

 
6:25 PM
@BobStein-VisiBone Code reviews should not be about syntax, they should be about substance. If somebody is putting code up for review that has syntax errors (and thus won't run either at all or in certain situations) then something is seriously wrong. It's not hard to run lint before you commit. — Charles Addis just now
Agreed @CharlesAddis, code reviews should come after automated methods, e.g. lint, syntax highlighting, etc. However some white-space-missing bugs may not be caught that way. Avail yourself of all reasonable advantages in guarding against bugs, I suggest. — BobStein-VisiBone 24 secs ago
 
Monking
Looks like a lot of React.js code uses Ajax for querying, is that something I should look into?
 
7:15 PM
0
Q: Chrome extension -- replace words on a page from a large dictionary

skexThis works, but is very very slow. Any recommendations on better, less trivial ways of accomplishing this would be appreciated. With a smaller dictionary it's fine, but the dictionary is about 80 different mappings. I also hardly ever work with JS so any input would be great. Obviously I have no...

 
@Phrancis errr?
AJAX is just the colloquial name for fetching data from the server asynchronously
 
Strange, I supposed I assumed it was YAJSL
So AJAX seems to be used a lot in code I've seen to fetch data from various sources (http, json, etc.) it's actually vanilla JS?
The syntax I usually see is like $.ajax(...) which reminds me of jQuery
 
That syntax is JQuery
But that's just one implementation of Ajax
At the base, Ajax calls can be made through the window object in JS
window.XMLHttpRequest = new XMLHttpRequest(); is the base call (albeit with some cross-platform magic that needs to happen).
MDN has a decent starter on this here: developer.mozilla.org/en-US/docs/AJAX/Getting_Started
The JQuery syntax you used above just wraps this functionality
 
7:33 PM
-1
Q: Simple but (hopefully) safe C nodes for data structures

AdHominemI'm trying to be as defensive as possible, will this leak memory? It runs perfectly I'm just concerned about coding style and best practices. Especially regarding the allocation I'm not 100% convinced of my solution. Is it okay to allocate memory for the next component inside the constructor? /...

0
Q: Project Euler #45 in Haskell

Kevin W.I've got a solution for Project Euler's problem 45 that runs in under a second (so performance isn't an issue), but I can't help but feel that I'm doing it in an ugly way; I feel like I'm missing some sort of builtin like zipWith3. Here's my current code: tris = scanl (+) 1 [2..] pents = scanl...

 
7:54 PM
If this is a working script you should post it on codereview.stackexchange.com instead of SO — I0_ol 37 secs ago
 
8:16 PM
0
Q: Reverse the order of a list in Racket

Pedro DelfinoI am using the SICP book. There is an exercise in which you need to create a function that will receive a list as an argument and return a list with the same elements in a reverse order. I know there are more efficient solutions than the one I am going to present. However, I really learn by anal...

0
Q: Waiting for all task to complete while catching exceptions early

RatatwiskerI'm working on simulating a number of processing elements (nodes) which do some work in parallel and communicate by exchanging messages. The message exchange is not in the scope of this post, but it restricts the modelling of the parallel tasks because they are not completely independent and thus...

0
Q: Find valid triples for a sorted list of integers (part 2)

Lin MaHave some ideas to improve code from this discussion (Find valid triples for a sorted list of integers), and post new code in a new post. The new idea is, trying to remember where low bound searched last time, and when doing the search, only search from the lower bound where last search is satis...

 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Solving a digitwise addition equation in Scala
 
8:50 PM
 
Hmm, my VBA comment got starred a little bit too much
 
9:06 PM
0
A: Let's Plan The Second Iteration Of The Stack Exchange Quality Project!

200_successOn some sites, there are simple heuristics to detect problematic questions. By detecting a few problematic keywords, we can easily alert posters to potential problems before the question is even submitted. For example, Code Review has been requesting these automatic alerts for over half a year:...

 
9:25 PM
possible answer invalidation by Jamal on question by Pavan: codereview.stackexchange.com/posts/40944/revisions
 
9:39 PM
0
A: Let's Plan The Second Iteration Of The Stack Exchange Quality Project!

Hosch250Hide deleted posts by default. This has two implications, that I can see: First, if hichris123's suggestion is implemented, it will prevent spam from even being effective against most users. Second, it is annoying to read a bunch of really good content, then to be slapped in the face by trash, ...

 
"is it the right way" - have you tested it? Does it work? If this is working code that you think could be improved, see Code Review. If not, please give a Minimal, Complete, and Verifiable example to clarify the problem. — jonrsharpe 7 secs ago
 
12
Q: How to find positive things in a code review?

RobMMurdockAfter some serious quality problems in the last year, my company has recently introduced code reviews. Another developer and I where chosen to review all changes made to the systems, before they are merged into the trunk. This has lead to some tensions within our team. Especially some of the old...

^ Also worth thinking about as a Meta.CR question.
 
10:34 PM
0
Q: How can I optimize my code to make it faster when used with a large arrays

Dave AdlerI am looking for a way to optimize this code so that it runs faster. I am trying to calculate the total items used, if for every x items used, you get one additional item to use. This is the code I currently have. I get the correct result, but with a large amount of items, it is taking too lon...

 
10:45 PM
possible answer invalidation by skex on question by skex: codereview.stackexchange.com/posts/144485/revisions
 
0
Q: Find all possible sumation numbers to a specified sum

denisThis is a problem that I had in mind for a loong time and today I decided to give it a go, the basic idea is you enter a number/sum and the program outputs all the possible ways this sum can be formed let's say we have 3 as input the output will be (1, 1, 1),(1, 1, 2) I don't think that the code ...

 

« first day (1262 days earlier)      last day (2759 days later) »