« first day (1316 days earlier)      last day (2719 days later) » 
00:00 - 21:0021:00 - 00:00

12:00 AM
RELOAD! There are 3197 unanswered questions (92.0063% answered)
 
@JeroenVannevel Excessive overhead, not simple for end users to deal with, compatibility nightmare for local DBs.
 
12:20 AM
0
Q: HTML scraping and using jQuery

plaintiveskiesI wrote a Chrome extension that lists upcoming concerts for the next seven days, this month, and next month. I had trouble with the sevenDays() method, especially transitioning from dates like Dec. 31st to Jan. 1st, hence the really fugly if-statements. I would really appreciate any feedback! ...

 
@EBrown overhead between db and file parsing will be negligible for a project this size
end-users don't have to deal with anything db-related at all
 
12:41 AM
My U is being somewhat like the girl with a curl in the middle of her forehead.
When it is slow, it is very, very slow, and when anything happens at all, there is an avalanche.
I only need to get 9/100 points to get an A in my final exam.
And I only need to get about 150/200 points to get an A in another class.
And only 70/150 for the final paper in my final class, which is the only one that my work isn't completely submitted.
 
0
Q: Is the Number Less than:

SeanJMy question is: and can it be reviewed by format standards, and can it be optimized? #include <iostream> #include <stdio.h> using namespace std; int add(); int main() { add(); // this 'add();' does not need a int. } int add() { int x = 0; int y = 0; int c; std::cin >> x;...

 
1:04 AM
Hey, @RubberDuck!
How's it going?
 
1:17 AM
@JeroenVannevel Did you actually read any of that or just grab two words and respond?
Because if you just think critically for a moment, you'd realize that using a DB installed locally on the end users system is not a good idea.
 
Hi again, @RubberDuck.
 
@Hosch250 hey! It's going pretty good man.
You?
 
Nice.
Going good here too.
 
Aren't you graduating soon?
 
Classes end May 1st, 2017.
 
1:21 AM
Nice!
 
I expect official graduation won't be until a couple weeks later, or so.
It usually takes a week for them to enter their grades, and I don't know what they do when someone graduates.
 
Still. That's awesome.
 
Yeah. Finally almost over.
 
Been learning anything fun lately (not school, code)?
 
Been scared to open my IDE until just the past few days.
School is so mind-numbingly boring and busy that I'd never get it finished if I opened my IDE :/
4
 
1:23 AM
@Mast if you think you're Doing It Wrong™, you probably are. Pay attention to that little voice.
Fair enough buddy. I get it.
 
Just about 140 points until I can protect questions again.
Let's see if I can't get it in the next two days.
 
I'm having the same trouble. I might have written a small library today because... reasons.
Yeah... I need to step up my game for Winterbash. I have some Qs stacked up needing reviewed...
 
Seems funny when beta sites have full privileges at 5k, and I have 5k more to go to get delete privs.
I'd had 4k delete privs for probably over a year before we got graduated :/
 
My two cents:
0
A: Can you have an answer without any code in the question?

Simon ForsbergI was the one declining the flag. My definition of "not an answer" might not match what others have. My definition is that if it is an attempt at answering the question, it is an answer. I find it unreasonable to treat an off-topic question with "Hey, this question is off-topic, let's remove all...

 
Dude, this is the weirdest blog, but so thoroughly satisfying... stilldrinking.org/mister-munjoy-and-the-year-of-moral-ambiguity
@DanPantry would like that ^ I think.
 
1:28 AM
@SimonForsberg If we banned answers without code in them then @200_success would have far less rep.
 
> My definition is that if it is an attempt at answering the question, it is an answer.
Right on man. Agreed.
 
0
Q: Voting app in javascript using Ramda

jxl118Just learning Functional programming in javascript using Ramda. I took this tutorial https://teropa.info/blog/2015/09/10/full-stack-redux-tutorial.html and implemented the server core.js component using Ramda. The idea is that we'll have a collection of things to vote from: Movies, songs, ...

 
I wrote my teacher an essay on using "Source Control, such as Git" instead of "Change Control" in one of my final (ungraded) tests.
"Change Control" is where files are stored in different locations to prevent programmers from editing them at the same time, etc...
I wonder what in the world she thinks. I bet you I either get full marks or straight fail on that question.
Sad thing is I won't know, because I can't review her grade.
Or maybe she's been busy looking up how to use Git ;)
 
1:44 AM
git. is. good.
^ That statement is the only relevant statement when discussing Git. :P
 
Anyone want to play the ultimate tic tac toe?
 
2:00 AM
0
Q: New to Swing in Java and wondering where my TextArea vanished to

pr0grammeurI'm brand spanking new to Swing in Java as I am more familiar with JavaFX. However, my professor wants me to use Swing for an assignment. I'm a bit stupefied at the moment, because for some reason, despite dedicating a Panel to it, my textArea is missing. Would anyone happen to know why? Thanks...

 
2:10 AM
Less than 2k away from 10k votes cast.
 
@EBrown it's about banning answers on questions without any code in them.
 
Even rolfl doesn't have 10k votes yet.
 
@Hosch250 you've just got to remember that your professors have been out of the game a long time, if they were ever in it...
 
@RubberDuck I'm not a programmers major, so they were probably never in it.
 
I swear that we need a "software engineering" tract. Teach folks XP and the like.
 
2:14 AM
@Hosch250 I could be up for a match tomorrow. TTGTB
 
See you later.
Remember to peg away at the One Vote Short list, y'all.
Time for a restart; see you later.
 
2:41 AM
@SimonForsberg Aren't those off-topic anyway?
 
 
1 hour later…
3:52 AM
0
Q: calling a function every 40 second inside a while loop

Naveen KumarI have return the code to invoke a function for every 40 second in side a loop. I have a doubt in the following condition, if ((time_left <= 0 || time_left > interval)) only checking (time_left <= 0) is fine ? i referred some websites and the have added check for time_left > interval also. May...

 
4:24 AM
0
Q: Parsing my JSON-like format in C

DragonDePlatinoFor the past few weeks, I've been using the wonderful cJSON to add content to my game. But recently, I got tired of JSON's verbosity so I decided to roll my own format called SON (Simple Object Notation). I plan on using this format in all of my future game projects. rogue anim timer...

 
5:10 AM
If that code is yours and it is working, then this question looks like a nice fit to Code Reviewiled 44 secs ago
 
@skiwi You'll be interested to know that I just tested if/else if vs if || and if | on my system, and if || performed the best in all scenarios, even though it should have "more" branches than if |. Even with an if (i % 3 == 0 || true) it performed significantly better than if (i % 3 | true).
I just thought that was interesting.
    Method |          Mean |     StdDev |
---------- |-------------- |----------- |
 Baseline1 | 2,168.5326 us |  5.4148 us |
   OrElse1 | 1,962.0552 us |  6.3317 us |
       Or1 | 2,713.5698 us | 11.8226 us |
 Baseline2 | 1,448.4140 us | 18.5050 us |
   OrElse2 |   286.2099 us |  1.0460 us |
       Or2 | 1,568.5193 us | 14.9637 us |
 
@EBrown Compilers.
 
The _1 methods are checking for i % 3 == 0 or i % 5 == 0, the _2 methods are checking for i % 3 == 0 or true.
 
IIRC, they can compile || into | where appropriate.
 
If that was the case then they would perform the same.
 
5:21 AM
What language is this?
 
        [Benchmark]
        public int Baseline1()
        {
            var result = 0;

            for (var i = 0; i < _iterations; i++)
            {
                if (i % 3 == 0)
                {
                    result++;
                }
                else if (i % 5 == 0)
                {
                    result++;
                }
            }

            return result;
        }

        [Benchmark]
        public int OrElse1()
        {
            var result = 0;

            for (var i = 0; i < _iterations; i++)
@Hosch250 C#, see above for code.
 
If it is a .NET language, check the IL.
See if it does compile any different.
 
They do, as expected.
The Or1 method has a few extra calls than the OrElse1 method.
 
What about between | and ||?
 
THat's what I said.
 
5:27 AM
Oh.
I was thinking if/else.
BTW, this answer is a sort of conglomeration of the other answers: codereview.stackexchange.com/a/149438/34073
What do we do about these now?
 
@Hosch250 It's OP posted the improved code, it's fine.
 
OK.
 
5:43 AM
And && vs & performs just like I thought it would. && is faster by ~35% at best, and ~0.01%` at worst.
 
6:42 AM
monking
 
monking
 
Thanks whomever approved that tag wiki edit. :)
 
Santa perhaps?
 
Perhaps.
 
whoever it was, might be thanking you for the nice edits somewhere ;-)
(I'm sure you know where to see who did it, this is public info)
 
6:48 AM
I do I do. ;)
I also got +4 rep from that @janos. ;)
 
@EBrown how? I thought we don't get +2 for edits after 2000 rep...
 
Tag Wiki edits are different.
Because I can't just edit them.
It's 20k for Tag Wiki edits.
I can review them, but I can't auto-approve them.
 
some rules are hard to find
 
Yep. :P
 
0
Q: I beginner in c# and I want to know how professional programmers will write program like this

Abdelrhman FawzyThis program calculates wood length and area of glass required for the window I beginner in c# and I want to know how professional programmers will write program like this double width, height, woodLength, glassArea; const double MAX_WIDTH = 5.0; const double MIN_WIDTH...

 
6:55 AM
@CaptainObvious Bad title, not sure about the question.
 
the other day I was looking for the calculation of the tag score, to know how accepts answers factor in. I couldn't find it. I found some meta posts that suggest that accepts don't count, only upvotes
 
They don't count.
(I checked against mine manually.)
 
I thought so. It would be nice if this was easier to find, in general, the calculation of all things related to reputation, tags, badges, including frequently asked corner cases
 
They probably hide it for a reason.
 
It's not hidden though, just obscure
 
7:04 AM
Yeah.
Currently micro-optimizing and I love doing it.
Went from 14.9ms per run down to 14.53ms per run.
 
such a small difference, are you sure it's a real improvement?
 
0
Q: Finding the Area and sides of a traingle using angles --- on button click page goes blank/resets

Jamiscousing the link in bottom.my problem is, when you enter a value for "AngleA" and a value for "Base" and click "Find Height" the code goes blank in this Ide. But even if you were to use google or Microsoft edge. the code will run but immediately reset making the user unable to see the answer. copy...

0
Q: Dividing up a large class into tasks - passing `this` when creating helper classes

mseifertFor classes that expose an interface to the outer world, I observe that callbacks are used as a standard interface. For classes that face inward, I want to know if it is acceptable and standard coding to use a combination of callbacks but also a reference of the parent object passed to its child...

 
@janos OP wanted all the speed.
It's image-processing code so it's probably necessary.
 
I'm not questioning the need, I'm questioning the measurement
usually there's a bigger margin of error than this tiny difference
 
I mean I've run it 5 times now (and it's a loop of 100 tests) and it's been the same so far.
 
7:09 AM
it's not easy to benchmark accurately
 
No but as I have said before, if the results are 100% consistent, then it's probably a good result.
 
the results can be consistently wrong too
 
@janos Last time some kept saying that to me I proved them entirely wrong by using a "proper" benchmark tool and getting the exact same assertions as my original benchmarking code. ;)
 
Maybe that will be true again, maybe not ;-) Such small difference is dubious in my experience. I would not trust a home-made benchmark tool for this.
 
7:26 AM
I mean, I'm not saying it's a significant improvement, but it's looking like my version is faster always.
I don't know how to use BenchmarkDotNet with a parameter.
Or maybe I do.
Hah, figured it out.
No I didn't.
 
0
Q: Limitation in my Factorial Function

Anish Krishna VallapuramI am really sorry if my question is really silly. I just started learning Python by myself. As I finished learning while loop, I suddenly got this idea to use while loop to make factorial function and I successfully did it. But there is a catch, this code can only find factorial until 20. from 21...

 
Gah this is useless.
BenchmarkDotNet has no support for passing a parameter or something.
TTGTB
 
7:50 AM
good night @EBrown!
 
I'll be back in like 6 hours...lol
 
good night
 
#NoLife
 
6 hrs sleep is too much @EBrown
I sleep everynight for 3hrs.
:(
 
@BhargavRao Usually I do ~1-2 hours a night, but on the weekend I splurge and get to "almost normal human" levels.
I'll probably be up at 7 or 8, then work outside for a bit getting things around, then drive to Toledo shortly afterwards.
 
7:52 AM
Wow, That's like e programmer.
Gunnite \o
 
And it's 3am right now.
 
Ah, Then tis early enough for a game :P
When I was in college I could go out for walks at 4am in the night chat.stackoverflow.com/transcript/6?m=27061859#27061859 .... Now can't
 
This kid looks very successful, promoting a healthy lifestyle, which makes a lot of sense. See the "why you can trust me" section of his profile: https://www.codementor.io/johnnyb
Looks to me a great example to follow
 
provide full code and ask here: codereview.stackexchange.com — Mohammad Yusuf Ghazi 38 secs ago
 
The codementor guys mail everyone on Stack Overflow once they reach 15k rep.
Even I got one.
 
8:36 AM
This review might be interesting for you. It's both a library call, as well as a "overpowered" function as ringo said. — Zeta 8 secs ago
 
8:50 AM
0
Q: How to search for a 1 image up to picturebox and find it in my sql

Nguyễn Văn QuốcThis is my program code for comparing if 2 images are the same. It basically uses the open dialog and opens 1 image at a time and puts it in 1 picture box. And find it in my sql and show to datagridview I heard that GetPixel() method may be slow. Is there a more efficient and faster way to compa...

 
 
1 hour later…
10:16 AM
@EBrown Short-circuiting obviously improves the speed. And for if else vs if I don't think there's any difference in the emitted machine code.
Oh, just seeing the code now. The second one has one branch and more calculations, the former one two branches with less calculations but it takes way longer because of that. Also branch prediction won't be helping in both cases
Now I am curious why the if else version is not optimised to a single branch...
 
This would probably be a better fit on Code Review, but you will need to post some code if you want to get help. Just saying it ran too long does not give us any context to help you. We would need to see code to be able to make suggestions on what could be improved. — pstrjds 7 secs ago
 
I think for the Hearthstone simulator I'll start with Java + Lua so I get some familiar code down, after that I'll probably rewrite to C++ and reuse the exact same Lua code for the cards. And I figured I need a GUI to see what my simulator is actually doing.
 
10:34 AM
@EBrown the question, yes. But that doesn't change my opinion about the answer.
 
@Hosch250 I'd escalate if you get a fail though
 
@skiwi Haven't you already started writing a HS Simulator?
 
10:51 AM
@SimonForsberg It was a horrible attempt, I don't think I can save it without rewriting everything
It also doesn't implement the advanced rulebook but my own version of how I thought the game worked
 
11:37 AM
0
Q: Conversion 12h clock to 24h clock

siimsoniI started picking up Rust on my free time, and I'm curious about what style errors do I make and where should I improve as a programmer. The problem is from HackerRank and very simple: there is a fixed-format input of time in 12 hour format ( 07:05:45PM), and the objective is to convert it to 24...

0
Q: Generating permutations without duplicates

denisI've made 2 different programs which find all the permutations of an input string (without duplicates). I'm looking for performance and code style review, I have a lot of conversions happening which is probably reducing the performance by a lot when a long length string is entered. The two progr...

 
11:56 AM
DNA.c:7:9: error: expected identifier or ‘(’ before ‘)’ token
 uint8_t()[] countACGT(char *input)
I'm doing something stupid again, aren't I...
Also, Monking!
I keep forgetting to properly greet you wonderful people before barging in here.
I guess I must feel at home.
DNA.c:7:9: error: ‘countACGT’ declared as function returning an array
 uint8_t countACGT(char *input)[]
I remember why I haven't used C in a while.
Oh, right, ANSI decided it's illegal to return arrays directly from a function.
It used to be legal...
 
12:17 PM
@Mast What are those () doing there?
 
I was trying to trick the compiler.
Didn't work.
Now I'm going to wrap the type up in a typedef to trick it.
Mwuahaha. It worked. Kind of.
Now it's meeping about problems I just created instead of the original problem.
It's C. Sometimes to get things done you need to poke a hole in the language.
Of-course, it all used to work, but I decided to split it up nicely in functions.
Bad idea.
Now I need arcane types.
 
 
12:35 PM
typedef struct {
    uint8_t arr[4];
} uint8_t_arr;

uint8_t_arr countACGT(char *input)
{
    uint16_t len = strlen(input);
    char nucleotide;
    uint8_t_arr *count = malloc(sizeof(uint8_t_arr));
Now, how difficult can it be to modify the values of *count...
 
0
Q: Custom PTZ camera controll from Appindicator

AleksandarMy task is to create custom script co control PTZ (pan-tilt-zoom) cameras. We have an application for video surveillance but problem is that some functions are missing, like speed zoom out. Also, some cameras loses focus etc. My idea is to create appindicator to control cameras from there. Below...

 
12:53 PM
Veni Vidi Fracti
 
1:06 PM
0
Q: LINQ query with an OfType call takes too long

GregoryHouseMDMy entity structure looks something like this: public class Object1 { public Object1() { ListObject2 = new HashSet<Object2>(); } [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public Guid Id { get; set; } public virtual ICollection<Object2> ListObject2 { ...

0
Q: best fix for flaw in the ByteChannel I/O example

Patrick ParkerAs discussed here, the official Java 8 tutorial by Sun contains a flawed approach to ByteChannel I/O, with at least two obvious mistakes. Please review my proposed fix: public static void echoChars(Path file) { // Defaults to READ try (SeekableByteChannel sbc = Files.newByteChannel(file)...

 
 
1 hour later…
2:10 PM
Naruto answer; accepted non-selfie answer with 0 score: POJO-like class in Python
 
That's more a question for codereview.stackexchange.comSehnsucht 20 secs ago
 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Find differences and missing elements from multiple arrays
 
0
Q: Java Hangman game

user432089023489I found a basic hangman java program for learning purposes online. Here is the code: What is your opinion? What could be done better etc. Thank you! /********************************************************************************* * (Game: hangman) Write a hangman game that randomly generates a...

 
2:49 PM
0
Q: Stuck in conditional operator ( '(...) ? : ' ) in C

Mukul KumarI can't figure out what's wrong here but my compiler seems to give error. f(char s[]) { for(i=0;s[i];i++) { (s[i]>64&&s[i]<91) ?s[i]+=32 :(s[i]>96&&s[i]<123) ?s[i] :(s[i]==45) ?s[i] ...

0
Q: Counting nucleobases in a nucleotide

MastThis question is part of a series solving the Rosalind challenges. For the previous question in this series, see Calculating protein mass ruby. The repository with all my up-to-date solutions so far can be found here. I started the Rosalind challenges roughly a year ago in Ruby. Now I got curi...

 
@CaptainObvious what's with that meta passage atop the question, @Mast, Shouldn't they go to the comments?
 
@BhargavRao Comments are third-class citizens, they can be removed at any time.
Perhaps it should've been at the bottom instead of at the top, but I've done it like this a couple of times now without remarks and I've seen it done by others as well without problem.
 
Yes. But meta data usually doesn't belong in a post (in normal SE model). Is it allowed on CR?
 
Thing is, it's kind of a follow-up question.
And we consider it good practice to link-back.
 
@Mast Hmm, weird then. SO is soo different from CR.
Even thought they both are under SE
 
2:55 PM
I remember one of the moderators (whether he was CM or SO mod I don't remember) being against the creation of CR because it wouldn't fit the Q&A style.
He's partly right.
 
PPCG is a disaster as a Q&A. (because it's not)
 
PPCG is another site where Q&A is done wrong in a right manner.
 
Or is it done right in the wrong manner?
 
Semantics.
 
Ugh, typos
 
3:01 PM
Anyway, I figured out how to pester my compiler into submission @skiwi
 
0
Q: Mad Libs from Automate The Boring Stuff

doublemcthe task is: Mad Libs Create a Mad Libs program that reads in text files and lets the user add their own text anywhere the word ADJECTIVE, NOUN, ADVERB, or VERB appears in the text file. For example, a text file may look like this: The ADJECTIVE panda walked to the NOUN and then...

-2
Q: Code improvement - Linked List

easy651SO i wanted to implement this interface: package util; public interface StringList { /* * appends the specified value to the end of this list * @param value the value to be appended */ public void add(String value); /** * inserts the specified value at the specified position...

 
@Mast How?
 
Unfortunately the result was so ugly I had to re-write it before posting, but it turns out it wasn't too difficult.
 
@skiwi fixed :D
 
@BhargavRao Thanks :p
 
3:04 PM
Being a mod is so fun :D
 
Hmm I hope the VirtualBox installer will detect it's already installed and just upgrade, else I have a whole load of configuration to do
 
@skiwi C doesn't allow you to return arrays from a function for some reason since ANSI C. So just typedef the array and you're no longer returning one.
typedef struct uint8_t_arr {
    uint8_t arr[4];
} uint8_t_arr;

uint8_t_arr countACGT(char *input)
{
 
You know you're returning a struct now, right?
 
C doesn't care.
Structs are OK, arrays are not.
 
Right...
Hmm rip my internet, VirtualBox will do something to my network connections
Hmm it appears that everything has survived
Hmmm, on the newer CPU's I guess I don't need to install Linux anyway and via a VM I should still be able to access the GPU natively
 
3:08 PM
I have no clue why they want it like this either. I'm not a language lawyer.
 
I believe any CPU with VT-d support can passthrough direct I/O
 
@skiwi I don't like working in a VM if I need to access hardware, too much risk of things getting needlessly complicated or going wrong.
 
Todo: Buy new PC with Intel i7-7xxx series and GTX 1170 or GTX 1080 Ti
 
lol
Pricetag?
 
@Mast €Expensive
 
3:13 PM
0
Q: Program not functioning properly

BennyI am working on a program that if: yes is selected on radio button 1, Radio button 2 enables. If radio button 1 is no, radio button 2, 3 disables and clears. If radio button 2 is yes radio button 3 enables. If radio button 2 is no radio button 3 disables. The problem is when I select yes on ...

 
My budget used to be around €1350, upping it to €1800 provides some... interesting options ;)
 
You can get a complete tower with those options for less than 1800?
 
With a GTX 1070 right now you should be able to
 
Not a 1080 Ti, I'd guess.
GTX
 
3:30 PM
There is probably not much you can do. Parallelization comes to mind. You might have better luck at Code Review. — Nico Schertler 32 secs ago
 
3:44 PM
0
Q: combining .each methods

GoMega54I'm using the $.each function in jQuery to assign and change classes and IDs on various DOM elements on click. I was wondering if there is a way to combine these into a single function rather than having three separate functions. var stored = $.each; var myFunction = function() { $(this)....

 
Aaaand I'm out of ammo.
 
4:07 PM
0
Q: Host file manager

Curtis MattoonThis is my first go at a Go program that's not a variation of "Hello {$name}". It's about twice as long as my previous Python implementation, and perhaps an order of magnitude messier. The goal is to read in /etc/hosts and combine the various entries I've made over time: 127.0.0.1 host1.test 12...

 
@Hosch250 are you still interested in the ASCII Collab Club? Since winter break is starting soon for most people (already here for me).
 
4:23 PM
@PhiNotPi Yes, but sorry.
I've got my plate full with other projects right now.
 
okay
 
Checkers app in C#/F#, literature class, website...
I just have one assignment to turn in, and it'll be here for me too.
Well, I might as well come be a cheerleader, anyway.
 
Monking
 
Monking
 
You're welcome to help out as much/little as you want, I just figured I should extend the invitation.
 
4:27 PM
Monking
@PhiNotPi Feel free to drop by more often.
 
Got the room handy?
 

 The ASCII Collab Club

Users collaborating on ASCII art games and stuff. See pinned m...
 
4:52 PM
I think this belongs in the Code Review community. — StardustGogeta 22 secs ago
 
5:09 PM
0
Q: Assigning atomic number based on atomic symbol

IdempotenceI currently have the following code: unsigned int symToZ(const std::string & sym){ unsigned int atomicNum; if(sym == "H"){atomicNum = 1;} else if(sym == "He"){atomicNum = 2;} else if(sym == "Li"){atomicNum = 3;} else if(sym == "Be"){atomicNum = 4;} else if(sym == "B"){ato...

0
Q: Loads an array into a dataframe, randomly extracts samples from each class and performs cross validation

AizzaacI want to plot a learning curve. So from an array of 12 rows, 5 columns and 3 classes; 2 rows (samples) are removed randomly from each class. Then these removed samples are cross validated. The array is converted into a dataframe to remove the rows and then it is converted back into an array to...

 
5:44 PM
0
Q: How to write this modal with less codes?

Heath AleksandrIm very new to website development. I would like to know if there is a much better,preferably with less codes,to write this modal? Here is the full website assets if you need to look at how the website looks like. Just open ART.html https://www.dropbox.com/s/tv9q6lrwybcdftz/03.rar?dl=0 If I did...

 
You would need to show us the code you have already, and then it would be better to ask on Code Review instead. — Andrew Morton 11 secs ago
 
0
Q: Seconed project c++ operator overloading

benzPlease check the code to see if there anything I can improve . Everyting is working as expected #ifndef Matrix_h #define Matrix_h using namespace std; class Matrix { private: int rows; int cols; int **Mat; public: Matrix (const int &rows,const int &cols); Matrix(const Matrix &...

 
6:10 PM
Naruto answer; accepted non-selfie answer with 0 score: Executing a query with or without bound variables
 
@CaptainObvious You didn't listen.
 
0
Q: Simple Bash Parallel Tool (env_parallel dies on big env)

vivriThis is a simple tool to parallelize execution of multiple tasks in Bash, since env_parallel can't handle the environment size (or something of the sort - dies for mysterious reasons.) I'd love to hear your critique. # # Simple parallel executor. Takes a list of commands and executes each in it...

 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Validating Card Number in Delphi
 
6:58 PM
0
Q: Vowel/consonant counter in Golang

ZygimantasFor learning GoLang I decided to write a vowel/consonant counter. I really need tips/ideas on how I can improve my code. package main import ( "os" "bufio" "fmt" ) func isVowel(x string) bool { vowels := [5]string{"a", "e", "i", "o", "u",} vowelLookupTable := make(map[strin...

0
Q: My median maintenance algorithm doesn't work...(Java)

ds998This is a task from a Coursera course Graph Search, Shortest Paths, and Data Structures by Stanford University.The task is to implement a median maintenance algorithm for this particular stream https://d3c33hcgiwev3.cloudfront.net/_6ec67df2804ff4b58ab21c12edcb21f8_Median.txt?Expires=1481500800&Si...

 
I just felt my phone buzzing in my pocket, while I was holding it in my hand
@Mast Long shot, but you know your electronics stuff, do you remember those AA batteries where you could push to see how much charge they have left? I think it's fake, but I don't know
 
@skiwi Duracell had them, right?
They aren't fake, but they aren't very precise either.
It's a simple concept though.
 
@Mast I think so yeah
Now I know it's Duracell I can actually find stuff, cool :)
 
A full non-rechargeable AA battery has roughly 1.5-1.6 Volt.
An empty non-rechareable AA battery has much lower, usually 1.2 or so.
So you can find out 'how full' it is by checking the voltage.
The light bar it had on the side was a basic resistive circuit.
The more voltage left, the higher the bar filled.
 
Ah okay, that makes sense actually
 
7:12 PM
It ain't rocket science :-)
 
Mobile phones use a similar mechanism to predict the max mAh capacity left as well I suppose?
 
No, that's way more sophisticated.
 
Maybe they also have a feedback loop that triggers when a battery reaches 0% to calibrate the 0%-100% range again
 
Mobile phones probably have Smart Batteries.
Those have a databus to communicate between battery, charger and device.
SMBus I think.
It's basically simplified I2C.
 
If this is working code, the question belongs on codereview.stackexchange.comjaco0646 36 secs ago
 
7:14 PM
But exchanging a chemical property for a digital one is always going to be difficult I suppose
 
Laptops definitely have them.
I'm not sure about mobile phones, although you can probably see it by checking how many connectors they have.
 
Anyway, just curious as my dad's phone sometimes shuts down at 15% so I suppose the actual charge has depleted at that point, but the phone is not recognizing that
I know for a fact that the battery has definitely degraded since purchase
 
There's such a thing as a minimum safe charge.
With modern batteries, it's not safe to short them.
Shorting them will drain them too fast too far.
The too fast usually won't happen in normal use, but the too far part could be.
All batteries degrade. There's a reason why they only give you a couple of months of warranty on it.
They simply don't last long.
 
Hm okay so say if there was an app or root access thingie around to override some stuff, then it wouldn't be a very good idea ;)
 
@skiwi Phones and laptops should be secured on the hardware level.
Software is irrelevant.
 
7:17 PM
Usually a new battery fixed things up, but I had an older Galaxy S3 phone that at some point just ate through battery life even with a new battery
 
Some batteries have an undervoltage protection.
If the voltage is too low (battery too depleted), they disconnect either the voltage or ground rail.
Effectively 'removing' the battery.
Again a pretty neat, pretty simple system.
No software required :-)
 
all those systems should KISS
 
I designed a PCB with such an undervoltage protection recently. Otherwise the battery would blow up.
 
Did you eh, test that in practice?
 
They all get tested before they can be used in public.
Rules and all.
Well, every design gets tested. Not every unit of-course.
 
7:22 PM
So you're blowing up batteries for a living?
 
Well, at that job I usually just designed the stuff and didn't blow up much. Next Monday I'll start as test engineer.
More blowing-up involved.
Including some high-voltage tests, those are going to be fun.
Never done those before, got to get my NEN3840 before they let me do that I guess.
 
Interesting
> The program 'root' is currently not installed. You can install it by typing:
sudo apt-get install root-system-bin
Wat
Oh...
I need to use sudo instead of root, facepalm
 
Is that like saying the kernel isn't installed?
 
No, it's saying I'm an idiot
 
K.
 
7:29 PM
This is why I like Linux, if a command doesn't work you just prepend root to it and all of a sudden it works :D
 
@skiwi That's a bad habit.
 
@Mast That's also why I'm not a professional Linux user
I don't know, it was complaining it had no access to create a directory in the /mnt folder
 
0
Q: Multi-client server program

MoeCan anyone tell me the basics of the multi-client server game, I can write it only for one client although I've searched to many websites but still the logic is so confusing specially the multithreading server. any help would be appreciated

 
Hmm I wonder if I should change my idea of having a dual-monitor setup to a dual-pc setup at some point, running Linux and Windows side to side could be useful too
Actually it would need two keyboards and mouses, nvm
 
7:44 PM
@skiwi No, you don't.
Just SSH from one into the other.
Make one your 'main' machine, probably your Windows. Log-in the other machine.
With X server or something similar you can get the GUI applications from the Linux box shown like they were on your Windows box.
I've had a multiple workstation setup at one of my jobs, awesome experience. Multi-monitor, multi-desktop, multi-workstation. Took a couple of days to set-up as I wanted it and to get used to.
 
Hmm right I have done similar things with having VM applications show up as regular in Windows
 
At any moment I was logged in at 3 devices, not counting my 'actual' workstation.
 
Why not run on a single PC instead though? Would need to have Wiindows and Linux both running at the same time though
 
Shared resources, space, logistics, multiple OS, plenty of reasons.
Only one of the workstations was connected to a specific piece of hardware for example.
So to talk with that hardware, you had to log-in that specific workstation.
Now everyone could talk to that hardware from his own desk.
All systems ran Linux except one, which was a Windows server. If you really wanted to write .doc and .docx documents using Word, that was the place to go.
Unfortunately, I had to for my documentation.
 
Hm okay
 
7:50 PM
Another workstation wasn't really a workstation but almost a supercomputer. Used for simulation and such.
That's 3 already.
We had another one for debugging specific things, so 4.
Don't knock it till you tried.
 
Amazon Video won't play on Edge, but it says Edge is supported :/
 
Just use Firefox
 
That's what I'm going to suggest.
 
8:32 PM
posted on December 10, 2016 by CommitStrip

If you’re near Paris next week and you love APIs and Automation, meet the CommitStrip team at APIDays Paris next 13-14th of December, the famous conference about APIs. Register with COMMITSTRIP code and get a 30% discount. More on apidays.io!

 
Hmm, I suppose regex won't let me grab all digits and replace them by X times that value?
 
If you want to improve working code, better ask at SE Code Review. — πάντα ῥεῖ 9 secs ago
 
Holy crap this card game is almost 2 GB
 
guess that explains why Witcher was so frigging huge
 
@Phrancis That's pretty big
 
8:46 PM
well at the time it was ...
100GB for games nowadays seems to not be a problem anymore ...
 
@Vogel612 Yeah Witcher III was gigantic, loved the game but not the downloads lol
 
Hmpf, how do I easily replace all integers in a long string by the X times the number the integers represent
 
I think it's easy to do with Python
Otherwise, "easily" may be misworded
 
I tried reading all words (split by spaces), but then I realized they can occur inside words too
 
Read all chars looking for numerals, when you find one take it out, multiply it by X, put it back in
 
8:51 PM
I'll probably end up doing something like that, I thought it should be simpler though
Just need to be sure that if there's multiple consecutive digits I read them as one number
 
Did something similar to that recently
Reading run length encoded files
 
Didn't you post a question about that very recently?
Ugh this is way better solved with regex, but I don't think it's possible
 
Well, 21 answers and 1 score for silver badge.
 
00:00 - 21:0021:00 - 00:00

« first day (1316 days earlier)      last day (2719 days later) »