« first day (1565 days earlier)      last day (2464 days later) » 

12:00 AM
RELOAD! There are 4257 unanswered questions (90.8550% answered)
I'm voting to close this question as off-topic because improvement of working code belongs in CodeReview.StackExchange.com — Prune 22 secs ago
 
12:15 AM
If anyone here has any insight:
0
Q: Is it possible for a web application to be *too* fast?

EBrownNote, I've seen: How fast is too fast?, and What to do when loading is TOO fast? so I want to clarify the non-duplicity: I'm not asking about the animations, but more or less about the application in general. There are no animations for this apart from the uncontrollable browser reactions, so the...

 
12:39 AM
0
Q: My game work fine in desktop version but in microcontroller doesnt work

zepolarI have a question. I'm working with STK500 device to implement C4Connect game using minimax Algorithm. I build my project with C++ for desktop and work fine, but now that I have transferred my code to my STK500 device doesn't work fine. I suppose that is for the data that it must process. I'm u...

 
1:08 AM
0
Q: Automation of buying and selling shares

Vivek KumarI've the requirement as below. I've attempted to come up with a solution and have provided my C# code here.Could you please let me know if it looks ok or is there something I'm missing here please? Thanks for your help in advance. ***************************************************Requirement***...

 
2:00 AM
@EBrown Nope. That happens occasionally, and I never think it is a problem.
 
2:22 AM
0
Q: Sudoku solver iterating too much

dattaI need help reducing the number of iterations my current implementation takes to solve the puzzle. I've got a pre-built class I am attempting to implement, albeit I think my backtracking needs improvement. If supplied a grid like so: 4 0 0 6 0 5 2 0 3 0 0 0 0 4 9 0 7 5 0 0 0 1 0 7 6 0 0 ...

 
2:37 AM
0
Q: Need help condensing the code below

Tadpoleneed help condensing teh code below to 18 lines or less. def play_game(): # def the plag game function which is the main control of the game level = get_level() quiz = game_data[level]['quiz'] print quiz answers_list = game_data[level]['answers'] blanks_index = 0 answer...

 
3:06 AM
0
Q: begginer error handling with c-string input using get() and getline()

Anonymous3.1415Second post on this site, just learned the basics of c-strings and how to read line oriented input. I noticed that fail bits are set for each function however not every problem sends a fail bit so I thought this would be a good exercise to try and target two user input errors: 1.) The user enters...

 
3:52 AM
0
Q: Error in python 3 tkinter gui calculator code

Kawin Mfrom tkinter import* def iCalc(source, side): storeObj = Frame(source, borderwidth = 4, bd = 4, bg="powder blue") storeObj.pack(side=side, expand=YES, fill=BOTH) return storeObj def button(source, side, text, command=None): storeObj = Button(source, text = text, command = comman...

 
4:21 AM
Monking
 
5:14 AM
0
Q: Building abstract syntax tree for markargs

IncomputableRoadmap I'm trying to follow usual compiler design: Lexical analysis (1, 2) Syntactical analysis <---- you're here Semantic analysis User input Code generation + execution Background I think I understood the first golden rule of newbie in compiler creation: When in doubt, create giganti...

 
6:03 AM
I didn't give you a downvote, but I can only guess the downvotes are due to this not being a code review site. — Sedrick Jefferson 42 secs ago
Not the downvoter, but this is probably a better fit for Code Review. Also, you should include some explanation of what your code is doing and how. — shmosel 29 secs ago
 
6:14 AM
0
Q: GroupBy(params string[] fields)

Dmitry NoginLinq to Object GroupBy extension method allows grouping by projection: IEnumerable<Product> products = … var groups = products.GroupBy(p => new { p.Price, p.Category }); Here is the solution to specify field names at runtime in a way like this: IEnumerable<IGrouping<Product, Product>> groups ...

 
6:28 AM
1
Q: Determine if two arrays are a rotated version of each other

AKhFollowing algorithm has time complexity O(N) and space complexity O(1). Any suggestions to improve this algorithm or any alternate approach suggestions? public static boolean isRotatedVersion(int[] a, int[] b){ //Check length of arrays if(a.length != b.length) re...

 
This belongs more to CodeReview rather than StackOverflow — derape 40 secs ago
 
6:57 AM
Monking
 
7:26 AM
1
Q: Automatic Email Script/Program for fictional e-store C#

JsonDorkThis is a fictional email sending program for a e-store I've done for practice purposes. EmailSenderProgram is a program sending emails to customers. Currently it sends two types of email: "welcome" and "please come back" email. It's supposed to run daily and write a debug log each day if it work...

 
Kaz
7:57 AM
Monking @all
 
8:17 AM
Monking
 
8:30 AM
0
Q: Random YouTube Video player

DesultoryI just finished making this quick and dirty random YouTube video player for fun and learning. Before I get started, by "random" I mean selecting a video from a list of videos using PHP RNG, not truly random and not random as in "any video from YouTube". It also uses the YouTube API to get infor...

 
8:45 AM
This question would be more appropriate asked on codereview.stackexchange.comDuncan 57 secs ago
 
9:16 AM
Monking
 
0
Q: Remove file and folders sharing down to the tree

vatavaleI have a program solution for situation described at https://webapps.stackexchange.com/q/108660/86039 This code removes editors and viewers from all files and folders from desired folder in Google Drive down to the tree. It's works fine for me. However, I believe it could be used by big commun...

 
9:33 AM
0
Q: constexpr Endian conversion in c++14

NickThis is my take for constexpr big / little endian conversions. #include <cstdio> #include <cstdint> namespace myendian_impl_{ template<typename UINT> UINT byteswap(UINT const a); template<> constexpr uint16_t byteswap(uint16_t const a){ constexpr uint8_t b[] = { ...

 
9:47 AM
-1
Q: Error in python 3.6 tkinter gui calculator code

Kawin Mfrom tkinter import* def iCalc(source, side): storeObj = Frame(source, borderwidth = 4, bd = 4, bg="powder blue") storeObj.pack(side=side, expand=YES, fill=BOTH) return storeObj def button(source, side, text, command=None): storeObj = Button(source, text = text, command = comman...

 
@CaptainObvious borken, but I failed my VTC
 
@Vogel612 You failed a VTC?
 
Asking the same off-topc question twice doesn't make it on-topic. Duplicate here: codereview.stackexchange.com/questions/173123/…Heslacher 14 secs ago
@Vogel612 and @Mast ^^
I remembered vtc the same question
 
could you please provide related screen shot about Code Review Id, in addition, please check if it could retrieve related content by using ITeamExplorerPage.PageContent msdn.microsoft.com/en-us/library/…Cole Wu - MSFT 36 secs ago
 
10:03 AM
@Heslacher Ugh.
Thanks.
 
0
Q: String Calculator kata in JavaScript using TDD

Aaron RodriguesI'm looking for some advice in TDD for my implementation of the String Calculator kata described by Roy Osherov. Any advice regarding refactoring, structuring and polishing of the code is welcome. Still a novice at JS, so please go easy on me. I have implemented the first 5 rules excluding the d...

 
10:48 AM
0
Q: C# Image Resize Method

RiddellGood Day everyone! Okay so I am writing an image resizing tool that needs to be able to handle at least 5000 images generated in four different sizes. Large (870x1140) Medium (580x720) Small (386x506) Thumbnail (80x80) I'm currently iterating 3000 images and generating the four sizes in aro...

 
11:03 AM
Monking
 
11:30 AM
About the repository you linked, Stack Overflow is not meant for debugging your code. If you have a specific question about this code, you should post it separately. You can also check the Code Review siteBoaz just now
 
11:40 AM
1
Q: C++, how best to structure and implement logic?

killingtime1For our first project in my C++ course this semester we had to do a simple calculator program. My background is mostly in Functional languages, what's the best way to do generic programming/functional style in C++, is this a good idea? Thanks! We're doing C++14 standard in this course, but C++1...

 
12:23 PM
This seems like a question that might be better answered on the Code Review exchange site. — freginold 14 secs ago
 
0
Q: Transaction in spring boot

Prakash PandeyI am using spring boot in my application. @EnableAutoConfiguration @SpringBootApplication public class PushMysqlTestApplication implements CommandLineRunner { private static Logger LOGGER = LoggerFactory.getLogger(RunQuery.class); @Autowired JdbcTemplate jdbcTemplate; public st...

0
Q: how to read Project Setting in asp.net mvc

work questionI have a Table that I store All setting in that , it is like below : public class Setting:IEntity { public string Key { get; set; } public string Value { get; set; } } and I have a service like this to update and read Setting Table : public class SettingService : ISettingService {...

 
1:02 PM
0
Q: It it acceptable to ask questions that have arisen from another answer

user3755946It it acceptable to ask questions that have arisen from another answer. I just feel like sometimes you ask design question and you get a good answer but that answer leads to a new design in your head which then you have so many more questions on each which can lead to other answer with more que...

 
1:20 PM
i dont see the option to migrate the question to codereview site. i looked at meta.stackexchange.com/questions/85017/…shorif2000 32 secs ago
 
0
Q: returning data from JavaScript object

shorif2000After reading this article I have decided to use JavaScript objects. I would like to know if I am writing this piece of code the best way possible. I have placed the following file after jQuery include: var CommsMatrix = (function() { // declare private variables and/or functions var s...

 
Monking!!! :)
 
1:56 PM
Greetings, Programs.
 
-2
Q: I needed an autoloader but I can't understand it

SaqlainI copied and pasted this code from Stackoverflow. I was in need of an auto loader. It is working but I can't understand how it is working. Please any one can help me? function autoload($className) { //list comma separated directory name $directory = array('core/', 'controllers/', 'models/'); //...

 
@CaptainObvious Too bad.
 
The question is currently too much of a mess to consider migrating to Code Review. You need to collapse the "Update" into a single question about fully working code. If you want to ask on Code Review, you may do so by re-posting over there. Be sure to read their help before doing so. — Cody Gray ♦ 7 secs ago
I'm voting to close this question as off-topic because questions asking to review working code should go to codereview.stackexchange.com — GhostCat 32 secs ago
 
2:17 PM
0
Q: FIZZ BUZZ some Fibonocci numbers

SaggingRufusI was teaching a some new people in office some COBOL so I threw together this exercise where they had to write a program that would generate the first 10 numbers of a Fibonacci suite and then test them against the rules of FIZZ BUZZ. I was hoping to get an honest review of this code to see how...

 
2:35 PM
possible answer invalidation by Jake on question by Jake: codereview.stackexchange.com/posts/173107/revisions
 
2:47 PM
In the course of about 2 hours I successfully wrote and tested a DLL which can read a file's data and map it to the most appropriate file type (PDF, DOC, XLS, PPT, DOCX, XLSX, and PPTX)...including the peculiarities of different types of headers, the lack of a header, trailers, etc.
 
0
Q: React Calculator

StaggMy company is going to make a big leap soon, and since we are currently still running on AngularJS 1.3.X we decided to make the switch to react for a myriad of reasons besides the obvious. Being the lead developer I decided to start messing around a bit. After my first bit of research and hello ...

 
@EBrown Writing a PDF isn't hard, reading it however...
But that sounds like a nifty little library you built.
 
@Mast It's not really reading the PDF itself, just testing whether the document is a valid PDF or not.
For example, the first two records in the array are the following:
New FileType With {.Name = "PDF", .Extension = "pdf", .Markings = {New OffsetMarking With {.Bytes = {&H25, &H50, &H44, &H46}}}},
New FileType With {.Name = "DOC", .Extension = "doc", .Markings = {New OffsetMarking With {.Bytes = {&HD0, &HCF, &H11, &HE0, &HA1, &HB1, &H1A, &HE1}}, New OffsetMarking With {.Offset = &H200, .Bytes = {&HEC, &HA5, &HC1, &H0}}}},
Which is VB.NET, but basically for PDF it checks that the first four bytes are 0x25504446, for DOC it checks that the first 8 bytes are 0xD0CF11E0A1B11AE1 and at 0x200 (512) the first four bytes are 0xECA5C1H0.
Once you get into DOCX it actually reads the ZIP file:
New FileType With {.Name = "DOCX", .Extension = "docx", .Markings = {New OffsetMarking With {.Bytes = {&H50, &H4B, &H3, &H4, &H14, &H0, &H6, &H0}}, New ZipMarking With {.SubMarkings = {New ByteMarking With {.Bytes = GetBytes("word/_rels/document.xml.rels")}}}, New TrailerMarking With {.Offset = 18, .Bytes = {&H50, &H4B, &H5, &H6}}}},
Which basically says "The first 8 bytes must be 0x504B030414000600, the ZIP file must contain the string word/_rels/document.xml.rels, and the last 22 bytes should be 0x504B0506 then any 18 bytes."
If you need an OffsetMarking (which requires the bytes start at the specified offset) with wildcard bytes, then you specify a null/Nothing in those positions and those bytes are ignored.
And this only came about because a service provider just altered their API to send us documents without valid extensions, so I wanted to come up with a good way to tell what document they sent us.
So far it's worked flawlessly on all the tests I've given it.
 
0
Q: An iterator wrapper that on dereferencing, returns the value of a member (function)

rubenvbI wrote a simple iterator wrapper that can be used in e.g. std::find and std::copy and iterator pair constructors to search on and extract members from structs contained in an iterable range. It can probably be made to work with member functions accepting (copyable) arguments, but simple argument...

0
Q: Converting vector of bytes to base64 string and back

ancstatic const unsigned char from_base64[] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255...

 
3:31 PM
0
Q: Sequesnce of handling data, response, error in network requests?

HoneyI was reading here and have a question about clear code. Would it be correct to say the error means either timeout or no internet connection, and any other kind of error (server error or client error), would be handled through 400 or 500 status codes? As a result the clearest approach would b...

 
4:03 PM
0
Q: How do I pick a random value from my array? And show it with print? Python

Hani01This is the very beginning for my code I'm making for the card game Black Jack, import random player_limit = 8 value = ['ACE', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'KING', 'QUEEN', 'JACK'] suits = ['Clubs', 'Diamonds', 'Hearts', 'Spades'] def draw_card(): random.choice (value) ...

 
4:20 PM
possible answer invalidation by Dan on question by Dan: codereview.stackexchange.com/posts/172996/revisions
 
4:33 PM
1
Q: DB2 statement to update a header file if no corresponding record exists

MordernRPGSoldierI have written below SQL in an RPGLE program. Intent is to update the header file (TC400F) if no corresponding records exist in detail file (TC401F). Are there better ways of doing this? Exec SQL UPDATE TC400F SET T40STS = '05', T4...

 
@EBrown Neat.
 
5:05 PM
0
Q: All permutations of a String

aruneswaraWhy does the following code not successfully output all permutations of the inputted string? My input: abc Output: abc abcb abac abaca abcab acbaba Code: // POS.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; #include <

 
6:05 PM
possible answer invalidation by fire_water on question by fire_water: codereview.stackexchange.com/posts/172739/revisions
Have you run this through a compiler? Are you getting errors? If not, then try that first before asking questions on SO. If you want someone to tell you how good your code is, try Code Review. — jmoon 30 secs ago
I'm voting to close this question as off-topic because there is no functional problem with the code; improvement of working code belongs in CodeReview.StackExchange.com — Prune 38 secs ago
what's my error? <= Usually you have an error you want to share with us, I think it's odd that we should have to guess the error in your code? If you are looking for a code review then you should post on the code review se. — Igor 40 secs ago
 
0
Q: Error handling techniques for nested methods that can throw exceptions

JohnI have 2 different approaches I'm using to handle error state or Exceptions from within nested functions. Take the following sudo-code for example: public void Func1() { try { Func2(); ... continued logic if no exception was encountered } catch { log(exception); return; } } public vo...

0
Q: Simple C# homework exercise

J. DoeSo, I'm a beginner in C#, and for homework I had to do this exercise (english is a bit broken). I'm required to submit it to the automated judge system which gives me points based on the numbers of tests passed, however for some reason I only get 94/100 points and just can't figure out why, I've ...

 
possible answer invalidation by AKh on question by AKh: codereview.stackexchange.com/posts/173129/revisions
 
6:50 PM
-1
Q: Writing c++ programs

KagoWrite a c++ program that accept employee name and salary earned and print the status of the employee,, A.if the salary is below 2000,print "not bad" B.if salary is above 2001 and below 5000, print"good" C. If salary is above5001 and below 10000, print"congratulations great,great" D. If the salary...

 
7:42 PM
I think this belongs on Code Review. — Fred Larson 51 secs ago
 
@Duga Rolled back
 
8:09 PM
1
Q: A Simple Cluster Generator v0.3

MillerThis is a code revision of a previous post and works well. The purpose of this code is to produce a universe of points, randomly generated around predetermined centroids, provided from the user as either a vector of vectors or from a file. The final product is a file of sample points produced ar...

 
8:23 PM
Might I suggest CodeReviewStackExchange? This question seem more suited there as optimization fall in their category. — Miket25 just now
 
8:41 PM
0
Q: Python Connect 4 (basic/beginner)

MitaI'm working on a connect 4 program in python 3.6.0 and I'm having trouble figuring out to make the code check for winners horizontally, I haven't even started working on finding the vertical or diagonal wins. I'm confused on why my code isn't working, there's no error messages, so it must be a lo...

0
Q: REST-API 3rd party resource model class

Timon de GrootI'm working on an integration for Magento 2 with a 3rd party. This class will fetch the articledata resource. This resource contains multiple items, with a maximum of 750 per call. The class is designed to be used like do load() while next(). If there are more items than the current 750, there w...

1
Q: 6 out of 49 Lottery

Dexter ThornIn Germany we a have lottery with the following rules: You have to guess 6 numbers. The numbers shall be less than 50 and greater then 0. A number occurs only one time in a game. So you can not guess the same number multiple times in one game. If you had guessed 6 numbers right you won the game....

 
9:15 PM
0
Q: operator () overloading in C++

Accidental GeniusI wrote a Matrix class to practice operator overloading in C++. The deal is I wanted my matrix class to have a contiguous memory. So my matrix class called Matrix.h looks like this class Matrix { private: int m,n; double* data = new double[m*n]; public: Matrix(int rows = 1, int c...

0
Q: writing clean modular code in javascript es6 and avoiding code duplication

LatheesanThis is my module TweetResolver (tweet-resolver.js) : import Tweet from '../../models/Tweet'; import { requireAuth } from '../../services/auth'; export default { getTweet: async (_, { _id }, { user }) => { try { await requireAuth(user); return Tweet.findById(...

 
9:29 PM
You can ask for code reviews on codereview.stackexchange.com. — Timon de Groot just now
 
9:54 PM
DVLR
 
0
Q: Peer review a code review?

IcepickleI recently made a for me, somewhat extensive code review and going through all the details I am unsure if I didn't loose myself a bit to much in reviewing. Can we ask in someway to peer review a code review? Or can I ask a new question which points to the answer I have given on the said question...

 
possible answer invalidation by Dexter Thorn on question by Dexter Thorn: codereview.stackexchange.com/posts/173189/revisions
 
@Duga aaand 200 was faster than duga. ..
 
Sorry, this question isn't really "on topic" for Stack Overflow. You could implement a solution and post it to Code ReviewMichael 44 secs ago
 
10:16 PM
I feel like since this isn't a problem it should be on codereview.stackexchange.com instead. — Taplar 23 secs ago
 
10:52 PM
-3
Q: How can I convert string to ordinal value?

Liu BeiI have a list of 200 string values which contains 3 unique values,'Hospital', 'School', 'Disco'. I want to convert these 3 unique strings to unique numbers,1,2,3. How can i do the conversion?

 
11:28 PM
0
Q: Generate every possible time gaps in order of closest to mid-day

JakeThis is a follow up question to my last question So I have a simple question, I hope. My code runs totally fine in every aspect but when I want to get the best possible schedules. To do this I am iterating over condensed periods of time as you can see in the code. The problem I have is that when...

0
Q: python calculate average spacing per direction

kilojoulesI am interested in finding the average spacing between objects on a directional basis. I did my best to minimally implement this in python and to conform to pep8. The code is longer than I was expecting and the answer looks a little off to me. I expected the average spacing in the 0 and 90 degree...

 
11:43 PM
-2
Q: trying to iterate through the delete button in the list of objects

SalmanI am trying to click on the delete button over and over again. I have a delete button. but it is using indexing. each delete button has a different index. so, I am using selenium with c sharp. using contains text value. and then trying to iterate over it to delete each item. any help is ap...

 

« first day (1565 days earlier)      last day (2464 days later) »