« first day (506 days earlier)      last day (3497 days later) » 

12:08 AM
ah, got it
 
Gross pointe blank?
 
a bug that is found is a bug that's half fixed right?
 
I've heard that said.... yes.
I am beat. Sore, and getting old.
 
eh, fixed
 
Mind you, I think even most kids these days would feel the same.
 
12:10 AM
I do ;)
 
Ah, one of those quick-fix ones?
2 days of dry-walling.... only a little bit of blood, and I treated myself with a new toy on the way home.
Hello Gear Fit
 
CleanExit:
    Set Run = result
    Exit Function

CleanFail:
    Set result = TestResult.Create(Inconclusive, "Test raised an error: " & Err.Description)
    Resume CleanExit
 
0
Q: Validating constant assignments in C at compile time

vectoriousThis is a way to check constant variable assignments for meeting conditions, e.g. exceeding limits at compile time. That is, anything the compiler can optimize to be constant. The Program should emit a warning, if any depending constraint isn't met, but if the warning can be optimized out because...

 
whenever an error occurred, I'd output an inconclusive result, regardless of other assertions made during the test
I think this fixes it
CleanExit:
    Set Run = EvaluateResults
    Exit Function

CleanFail:
    this.AssertResults.Add TestResult.Create(Inconclusive, "Test raised an error: " & Err.Description)
    Resume CleanExit
so I still throw in the inconclusive/"an error occurred" result, but I don't let it supersede previous assertions
 
blah blah blah, bleat, blah, bob blob top?
 
12:13 AM
yeah, that
I can't even paint without killing my back, shoulders and knees
can't picture dry-walling
 
8" sections, in a buddy's basement.
8" ceilings...
 
not even yours?!
 
nope... but... what goes around...
and I still owe him... ;-)
 
my sympathies for whatever else he's got in store for you!
 
There's 4 of us, my brother, this friend,my brother's father-in-law, and myself. Between us, we have it all in terms of tools, and skills, and experience.
(there used to be a 5th who went to australia :(
Anyway, we have electrical, framing, flooring, finishing, painting, mechanical, even gas covered.
(gas requires inspection though).
 
12:17 AM
that's ..practical!
 
I have worked on.... 3 kitchens, 2 basements, 5 bathrooms, wired in 4 home networks, painted who knows how many rooms, built entertainment centers, hung garage doors, installed hot-tubs, landscaped, trimmed, and more..... repalced windows, doors, hot water tanks, installed water softeners, built 2 decks, installed central air in a house (ducting retrofit - bled lots, hate duct-work).
I have built 4 book cases, 2 bedside tables, 2 work benches, 3 sets of 'industrial' shelves. Oh, and I rebuilt the back of my car.
 
I've assembled every "assembly-required" piece of furniture I own...
oh and I made an electrical connector for my dishwasher, had an electrician friend verify it - and he approved my work :)
@RubberDuck undeleted, and edited now
 
0
Q: Convert number into words

Mo MoallimI am trying to implement a program which can convert number into words. My code can convert numbers between( 0 - 999 ). it used recursive function call and simple arithmetic operations. Can you please review it and give me your feedback. I used three different vectors to store words such as "Six...

 
1:16 AM
0
Q: Account Controller needs to change the users current account after verifying that the user has access

SteveI have a #change_account action in the accounts controller that verifies if the user has access to the requested account prior to changing the current_account which happens via setting the session[:account]. I am trying to find the best way/place to check that the user has access to the account. ...

 
1:33 AM
0
Q: How to execute a task at a particular time in the morning using ScheduledExecutorService?

WebbyI have a task which I need to run every 6 AM in the morning. I have my below code which does the job and it is using ScheduledExecutorService. ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); Date date = new Date(); Calendar calendar = Calendar.getInstance(); calendar.se...

 
2:21 AM
0
Q: Configure AspNet.Identity to allow for either username OR email address on login

aaronmallenI am wondering if there is a more efficient route to take here. Using AspNet.Identity I would like to allow the user to sign in to the same text box using either their UserName or Email. I went ahead and addressed this issue in the AccountController Login ActionResult. I run the check before c...

 
context:
9
A: Approximation to the number of seconds in a year?

Kyle KanosIt's a unit conversion: $$ 1\,{\rm yr}=\frac{365\,{\rm days}}{\rm year}\times\frac{24\,{\rm hrs}}{1\,{\rm day}}\times\frac{3600\,{\rm sec}}{1\,{\rm hour}}=3.1556926\times10^7\,{\rm sec} $$ Since $3.1557$ is (somewhat) close to $\pi\sim3.1416$, we use the approximation you cite. Technically, the ...

 
Yeah, I am starting to get tired of reviewing the same beginner code. I hope that once I finish with this semester, my knowledge will be expanded to allow for slightly more advanced reviews.
 
hi!
 
HI!
 
pretty quiet dead tonight
 
2:34 AM
It's Sunday. :-/ Work/school tomorrow. This weekend went by so quickly.
 
yeah, they fly
summer's officially over :(
not sure I saw it pass
 
At least I can look forward to in half an hour. My second JAVA assignment is due on Wednesday, and my MPI program will be assigned on Thursday.
 
big week?
 
Yup. I also have a chemistry test on Friday and a three-hour chemistry lab on Tuesday.
 
@Jamal Are you doing a chemistry minor or something?
 
2:42 AM
No, it's part of required natural sciences. I'm a math minor.
 
huh, surprised they make you take that in senior year
 
It's actually a freshman class (general chemistry I), but hardly any freshmen actually take it.
 
US universities work very differently :)
 
All mods checking in?
 
hi
 
2:55 AM
@Mat, would you believe there's no way to run a sub from a VBIDE add-in? I'm seriously bummed.
Wait... Maybe I can write an agnostic add-in... Maybe.
 
3:13 AM
> You've earned the "java" tag badge.
 
Why are Simon's and Jeroen's messages pinned?
 
I have no idea.
 
Unpinned.
 
 
1 hour later…
4:34 AM
0
Q: C++/C++11 one-to-many multiplicity pattern

figmentumI'm looking for a good pattern or template for representing one-to-many relationships between objects. The following C++11 code demonstrates a possible way to achieving this pattern: https://github.com/codecurve/parentChildCpp (I think it could be made into a reusable template). I think these a...

 
 
1 hour later…
5:51 AM
morning @all
 
1
Q: Reviewing code that is used to workaround a bug in third party tools/code etc

James KhouryAs developers we sometimes come across bug in third part code / tools / stuff we can't change and so we write a hack/workaround or some other dirty piece of code. Is the "hack" reviewable? It matches everything in the FAQ (as I understand it) but its about working around broken code and often ho...

 
Monking @chillworld
 
0
Q: How to merge two pdf files in a single pdf?

Arshad HussainI have two different pdf namely "diff-1.pdf" and "diff-2.pdf" and a "single pdf" namely "common.pdf". Now, I want to merge the content of "common.pdf" to "diff-1.pdf" and generate a new file named "first.pdf". Again I want to merge the content of "common.pdf" to "diff-2.pdf" and generate a new fi...

 
6:18 AM
@Vogel612 how are you?
 
@chillworld given that I have school this week I am fine..
slightly tired..
and slightly bored...
ermagherd lesson 4 realz now.
 
6:32 AM
Monking
 
6:53 AM
@Vogel612 I'm also following back school :(
everything I have to learn from home (or work)
just doing the exams
 
I think I crashed my whole Ubuntu VM
 
monking @skiwi lucky it's a vm
 
Well... I might be able to still reboot it
 
you should have a clean copy of it no?
 
It lives again
 
6:56 AM
gratz
 
Segfaults damned to hell
 
 
1 hour later…
8:15 AM
hmmm... something's fishy...
		while (true) {
			output.println(System.lineSeparator()
					+ "Chose the kind of Values you will be using to specify the shape:");
			for (ValueKind kind : ValueKind.values()) {
				output.println(String.format("[%i] %s", kind.ordinal(), kind));
			}
			int userInput = scanner.nextInt();
			if (userInput >= 0 && userInput < ValueKind.values().length) {
				return ValueKind.values()[userInput];
			}
		}
 
0
Q: Converting numeric (month/day/year) date inputs to regular format (month day, year)

zipsesI'd really appreciate some general formatting/style tips, as well as any ways I could improve this code in general that I wrote for an assignment (title) that's due at the end of the week. The code passes every test input given (leap years and such), so the logic is all set. import java.util.*;...

 
@Vogel612 A while true is fishy on its own
But I guess it's correct there ;)
I don't see the fishy thing right now thouhg
 
it feels so darn fishy..
and btw, I found out that I can do: output.format(...); instead of output.println(String.format(...));
Arrays.stream(ValueKind.values()).forEach(kind -> {
    output.format("[%i] %s", kind.ordinal(), kind);
});
that's.. shorter.
 
Better
I didn't get deadline extension for the C assignment :( Guess I really gotta finish it today ;)
 
0
Q: dirty xml to json parser in python

outforawhileI have that xml to json function based on ElementTree: It looks dirty simple but until now it does what it's supposed to do: give a json description of the document's ElementTree. import xml.etree.ElementTree as ET def dirtyParser(node): '''dirty xml parser parses tag, attributes, text,...

 
8:29 AM
monking
 
ermagherd cannot cast from Double[] to double[]
what the crap?
 
what language is that? I've never seen a Double before
 
@Christoph
just plain old java..
crappy manual unboxing....
@Christoph hmm.. this looks slightly borken to me...
Arrays.stream(data.split(":"))
    .filter(x -> x != null && x != "" && !x.matches("[\\s]"))
    .forEachOrdered(x -> shapeData.add(Double.parseDouble(x)));
 
9:06 AM
wow the first version of this actually works..
deafening silence
 
9:28 AM
0
Q: Could this code be improved?

JoeSmartI have written my first python script that will go into live use at my workplace. I am relatively new to python and I think this script is pretty good but I would like your input. It runs very fast, as far as I can tell (~0.01seconds). It is also my first time writing a script that takes argume...

0
Q: which method of class declaration is efficient

vigneshWhich among the two declaration is efficient 1 public class Timeliness { private string _StudentId; private int _ActualDaysAvailable; private int _DaysTakenToComplete; [DataMember] public string StudentId { get{ return _StudentId; ...

 
@Vogel612 I was afk, sorry. And I really have no Java experience
 
@Christoph don't you dare worry about that ;)
Monking @Morwenn
 
@Vogel612 Monking :)
I love how you talk about "plain old Java" and then post some Java8 code x)
 
hmm...
yea that was the change moving along from plain old java to plain new java.
 
By the way, I wrote some Java code for the first time in months today.
 
9:37 AM
@Morwenn fancy showing?
 
I don't think I truly understand what you mean by "fancy showing" :/
 
I think he means the code you wrote today
 
â–² that.
--> you could put it up for a review ;)
 
Oh.
Nope, I was already reviewing code actually.
Those were parts of a big project I didn't write. And I felt like there were some things to improve.
IO exception handling with try-with-resources for example.
 
aaah the joy of java 7+
that java8 stuff is just some training for myself..
and in my company project we are doing a jee 6 webapp :(
 
9:42 AM
I also learnt that Java had a Path class today. Is it good pratice to use it?
 
Or is the lack of operator+ annoying?
 
> WARNING: This interface is only intended to be implemented by those developing custom file system implementations.
But that aside, you should program against higher interfaces and not against implementations..
and from the docs it seems the interface is threadsafe, and not deprecated, so I don't see what would speak against it.
 
Also, some slides said "use Path to represent paths instead of String".
I've never separated declaration and definition for template classes, but that might indeed increase readability. However, as I started to add doxygen-ready comments for the proxy classes, things escalated. I'll need to find a good balance here. — Christoph Sep 17 at 12:24
@Christoph Doxygen comments can be great. But when you have const and non-const accessors and start documenting obvious functions, the documentation quickly becomes horrible x)
 
@Morwenn I know, I try to not document obvious things unless I want to include a reference to some other class
single-line reference-only comments don't clutter the code as much as a full block with brief/param/return
 
9:56 AM
I tried to use Sphinx to document a C++ project. It's nice, but since the documentation isn't automatically generated, you have to remember to keep it up-to-date :/
 
what I'm having difficulties with is the whole typedefing around containers and interators because I don't have a mental model of what they are used for. For example, when I define a value_type for a Container, is that the type a Container::operator[]has to return? Or is the returned type required to be converible to value_type?
 
0
Q: Improved manipulation of a 2D array for a game map

CandlejackI have a 2D array (or rather, an array of arrays) representing tile maps in game. The 'world' map array holds smaller arrays representing individual map parts which I am calling 'rooms': var worldMap = [ [room1, room2], [room3, room4] ]; I have some code which takes note of the 'curren...

 
Please kill, me now, C
 
@Christoph Haha. value_type and friends are obvious. Except when they're not.
 
if (worker_result_message.x_colors == NULL)
{
    perror("pointer is null");
}
printf("x_colors pointer %d\n", *worker_result_message.x_colors);
Type of worker_result_message.x_colors is int*
How can it give a segment fault?! When it's not null
 
10:02 AM
@Morwenn that's very helpful insight! Except when it's not.
 
I was trying to write a custom transform_iterator class (because Boost doesn't seem to perform Empty Base Class Optimization with functors), and I have no idea whether operator* should return a value_type or a reference.
Sometimes func(operator*()) can return a reference, sometimes not, it totally depends on func. I don't understand how to design such a class.
 
o hai
 
Hmm, can you pass a pointer in C from one process to another process?
 
@skiwi sounds like a bad idea :)
 
@skiwi That's probably feasable, but sounds totally unsafe.
 
10:04 AM
@skiwi at which time, and what @QuentinPradet said
 
10:23 AM
 
@skiwi I don't think you can (on modern OSes, each process has a separate address space), but I think you can have both processes share memory via mmap.
 
@Morwenn still missing many things, but promising: khan.github.io/KaTeX
 
Yeah, I got my way around it... thanks for the hints
 
"Is it safe to pass a pointer from a client to a distant server?" -> of course.
@QuentinPradet Looks promising, indeed.
 
10:38 AM
0
Q: Turning complex string into simple array

SkarvenSome time ago I wrote a series of functions for turning a string of user information from multiple users an array containing the information needed: Name, username and location. The raw userinfo string (userinfo_raw) looks like this: 1074;#Fring,, Gustavo (US - New Mexico),#i:0ǵ.t|adfs|gfring,#g...

 
I am almost surprised that tumbleweed badges are still awarded here.
 
noooo
they're making me do this
try
{
}
catch
{
}
finally
{
}
and I hate it
 
Why would they make you do this? ç__ç
 
because clearly it's more readable than
try {
} catch {
} finally {
}
so I think I'll be using a lot more ternary's now
 
10:54 AM
#define e_handling(a, b, c) try { a } catch { b } finally { c } seems reasonable.
 
if (first)
{
    query.append("?");
}
else
{
    query.append("&");
}
so much lines for something so... small
String toAppend = first ? "?" : "&";
query.append(toAppend);
I would prefer doing THAT to stretching my if statements like that
 
Wow, the double interrogation mark seems quite misleading.
Haha, I always stretch my if statements like that x)
Except when it's against the project's guidelines.
 
... I wish they'd compensate me by giving me a monitor that's taller
so I can still fit the same amount of code on screen
right now it fits about 30 lines
 
Ask to be paid to the line.
 
@Morwenn really bad idea, most of the things I have to do is "find out how API X works"
 
11:00 AM
Whatever. I have to shower and shave. See you later :p
 
Yes, you do.
Monking all!
 
My code examples are even stretching the chat
 
@QuentinPradet o, hai!
Meh, got to commute... back in 40 mins
 
11:24 AM
@Pimgd See "Wadler's law of language design" informatik.uni-kiel.de/~curry/listarchive/0017.html ie. you have other things to worry about, and you'll get used to it
 
0
Q: Encryption with many algorithms using crypto++

SADOK.netI'm quite new to c++ and the world of cryptography. Since for the last few days I have been working on this code to develop a class that allow me to crypt a block of byte with many algorithme. One block will be divided into three equal blocks and every block will be crypted and decrypted by one...

0
Q: How can I remove particular characters and save file in PHP?

PrakashHi I have a file called "install.txt". That file contains yellow, green, red and I want to remove "green," and save install.txt file. $data = file_get_contents(install.txt"); $data = str_replace("green,", "", $data); file_put_contents("install.txt", $data); But this is not working. How to so...

 
@QuentinPradet b-b-b-but it's ugly looking now
 
that's subjective :) - the only "issue" would be less content on your screen. I don't know about you, but I rarely need more than 20 contiguous lines (ie. ~ a function). However, I often split screens to show different parts of a same file
 
My main offense to it is that I tend to split functions in blocks of < 3 cyclomatic complexity... so my functions are tiny and I need to see more to get the full picture if I wanna understand it in full details.
I'm considering rotating my screen so that it's 1050x1680
but that would make side-by-side stuff pretty hard
 
< 3 is very small, do the functions provide a meaningful abstraction?
but yeah, ask for more screen estate
 
11:45 AM
0
Q: C library that converts integers to string and vice versa

pacoalphonsoI've created this little library to help ease myself (and for others, hopefully) with the pain of having to convert integers to string and vice-versa. It's written in C, and for maximum portability I decided to try and stick to C89 (no booleans yet by that time I believe). I'd like to ask you to ...

 
11:56 AM
Greetings, Programs.
 
@Donald.McLean hi
 
@Christoph How are things in your little corner of reality?
 
reality has a corner?
 
@Donald.McLean pain. I was bouldering yesterday after a break of 6 months
 
slow commute today.... 50 minutes.
 
12:00 PM
@Christoph Ouch. I think I'll stick to biking.
 
Ouch, I think I will stick to hiking.
 
yeah and now we're all sitting in front of a keyboard
 
@Christoph Getting paid to write the Scala.
 
12:15 PM
Second monking
 
Zombie down!
 
So my pc crashed and I had a VM running...
 
@skiwi There's a good "Yo dawg" joke here. If only I were more awake.
 
Please, still be working
 
@Donald.McLean Zombie without a post here is just a Zom:
1
A: Basic XML template

Donald.McLeanI'm not that familiar with Play, but overall I can't say that there's anything here I actively dislike. The purpose, layout, variable names and all are quite reasonable and easy to follow. Over all, I would say "Good job". A couple of comments outside of that: It seems strange that you would h...

 
12:22 PM
I don't want to be trolling for votes.
 
Well, OK then ;-)
@Donald ... did you see this, in the question:
> I'm about to replace the proposed templating system, using the powerful XML processing of the Scala library
 
@rolfl I overlooked that. Answer revised.
 
I need someone to help me shoot myself in the foot (from below, through the other leg's knee, C++ templates)
 
From below, to your foot, through your knee? You're asking for quite alot
Good monday morning everyone
 
that's what templates are for, aren't they?
 
12:30 PM
I don't know C++, but it seems painful
 
and good morning @TopinFrassi
 
@Christoph Some great stuff can be accomplished in C++ templates, but it's almost as "write only" as APL. We used it on a project and found that there were times where we had to guess/trial and error the correct syntax.
 
the problem I have is that I need something that is essentially an std::array, so I'd like my class to inherit from it. That's not possible because std::array doesn't define any constructors.
 
What annoys me most in C is that I need to manually check for errors at every each and single call
 
This:

`typedef std::array<typename Frontend::color_t, Size> F_array_t;`

with `uint8_t` typedef'ed as `Frontend::color_t`, gives me
‘unsigned char’ is not a class, struct, or union type|
 
12:58 PM
@Christoph Unfortunately I'm no help. I haven't written any C++ during this century.
 
@Donald.McLean Nice statement ;)
 
@Donald.McLean chances are I'll get rid of the bug anyway by changing something seemingly unrelated
4
 
@Christoph Y u get rid of featurez?
 
@RubberDuck uhmm....
 
No? Too early on a Monday for a bad joke??
 
1:04 PM
I am groot.
@RubberDuck bad jokes are perfectly fine, I just didn't understand that one
try again?
 
Bug = Feature
 
ah, that one! well it's not even a bug (yet) because my code doesn't compile
 
LOL. It's okay, rest assured, there will be a bug once it does.
4
 
OK I'll come back when I got that bug to compile
2
 
I'm a Necromancer! Thanks you, Santa.
4
 
1:12 PM
Ah...now let's see if it works, and why not.
 
Hey @Mat'sMug, I think you have some potential memory leaks buddy. I'll try to get around to writing a review today.
 
I thought I had found a pattern... I was wrong
 
I once thought I made a mistake.... I was wrong.
 
If a message queue can have max 64 messages, then my program correctly handles 128 messages... If it's 32 messages max, it handles 96 max, if it has 16 messages max, it handles 80 max
 
@rolfl So, you made a mistake thinking you made a mistake?
 
1:19 PM
0
Q: printf-like formatting for std::ostream ~ (not exactly) boost::format

firdacout << format( "%? %?!\n" // Hello world! "%1% %3% :)\n" // Hello again :) "%%05X: %05X\n" // %05X: 01234 "%%g: %g\n" // %g: 3.14159 "%%.3f: %5$.3f\n" // %.3f: 3.142 , "Hello", "world", "again" , 0x1234, 3.14159265f); The above shows the usage ...

 
24 gives 88... the number is consistent between runs
It probably doesn't help that I change a message queue from being non-blocking to being blocking during execution
 
but it seems you always get 64 additional messages that were handled correctly?
 
Good point @Christoph, I was thinking so much about multiplications... it's indeed just +64
 
yay! I've spotted something in someone else's code!!! MONDAY IS TEH BEST DAY EVER!!!
2
 
My logic may also be wrong, but I've got these requirements:
I have a request queue, and a worker queue: I need to keep the request queue as filled as possible, and the worked queue as empty as possible
So the workers need to process requests as soon as possible (trivial)
The trick is that the parent process cannot be multithreaded
And I'm unsure how to solve the issue
 
1:26 PM
a message goes to the request queue, and from there to the worker queue?
 
Because I need to send (and receive) more messages than the max size of the queue
 
The same thread handles the queueing as well as the running of the requests?
 
Monking
 
@Malaching
 
I'm bad at explaining... I'll try to explain it more carefully
 
1:27 PM
bought a Chainsaw!
 
There's two message queues:
- mq_farmer_requests
- mq_worker_results
The job of the farmer is to send X requests into mq_farmer_requests and keep it as full as possible, and to display the messages of mq_worker_results on the screen and keep that queue as low as possible
 
Urgh... MQ Series... yup.
 
The job of the worker is to process all requests immediatly from mq_farmer_requests and put the result into mq_worker_results
 
OK, so the worker thread can sit and wait on the request queue, and immediately process requests in order and submit results.
No problem.
The farmer thread is more complicated, because it has to manage two queues at the same time.
 
So I set up the queues as:
- mq_farmer_requests blocking
- mq_worker_results non-blocking

Then the parent executes:
1) Send requests to mq_farmer_requests, after every send it will attempt to read and process messages from mq_worker_results
2) Set mq_worker_results to blocking
3) Loop while doing: Wait for receive message, display it
@rolfl Yes, that's tricky without multithreading
 
1:31 PM
It has to monitor the result queue and print stuff if there is anything, and it has to monitor the request queue and submit stuff if there is space.
 
@rolfl Correct
And the messages needed to be sent are always more than the max size of the queue
 
for you JavaScript people out there, I changed an answer of mine that has been negative codereview.stackexchange.com/a/52109/18427
 
OK, it's actually quite easy ;-) @skiwi
You can make the assumption that in order for the 'worker' to add a result, it has to remove a request.
 
Happy Monkday!
 
I cannot first send all requests to mq_farmer_results in a blocking fashion, because then the workers might wait until there is space in the mq_worker_results queue and a deadlock may occur
Though maybe... As long as mq_max_size >= NROF_WORKERS, no deadlock can occur...
@rolfl Explain?
 
1:34 PM
I assume you can do a blocking wait on each queue?
(i.e. 'take' an item and it will block unless there is an item to take?
If so.... you can:
 
@rolfl Yes
 
while (true) {
    while (requestQueue is not full) {
        add Request
    }
    result res = resultQueue.take();
    processResult();
}
The assumption is that you will add things to the request queue.... you will keep adding until you flood it (all the workers are busy... and you have them queued up).
 
@RubberDuck a memory leak? you're freakin' me out.. what do you mean?
 
@rolfl Then the fun comes in... How do I check if the message queue is full? :)
 
thanks for the edits @Simon
 
1:37 PM
@skiwi That 'must be' a functionality of the queue, right?
 
@Mat'sMug Circular references. this.OwnerInstance
 
@rolfl That's what I hoped, yes
 
...
 
Which is fine. You can do that, but you have to be careful to dispose of the objects.
 
@skiwi But it is not?
 
1:38 PM
for you Javascript people again.... here is a question that I answered with a simple "looks good" can anyone prove me wrong? codereview.stackexchange.com/q/35609/18427
 
2
Q: Check Unix Message Queue if empty or not

Aman SinghalCan some one tell me how to check if there is any message in message queue. the message queue is implemented in C in linux based operating system. I just want to check if there is any message in the message queue at a particular time.

Found this here actually @rolfl ^
 
you mean set to Nothing... you're probably right
 
I thought it wasn't available as it didn't pop up under the mq_* functions and neither was told as a hint to us in the assignment itself
 
so each test method that has executed should be nothingified
 
Technically. Yes, but I'm more worried about your output.
 
1:39 PM
Tea time!
 
That could actually cause errors if you implement a file output.
 
ok now you're really freaking me out.. can't wait to read your review!
 
@rolfl Rewriting half of my farmer time!
 
@Mat'sMug Things are kind of crazy here today, I'll try to get to it. I just wanted to make sure you had a head's up in case I didn't.
 
I'm actually a bit puzzled, I don't see a bug :(
first thing I'll do tonight: implement a TextWriter output
 
1:42 PM
codereview.stackexchange.com/questions/63283/… -> Someone should point that logging the password is a really bad idea
 
@RubberDuck if you can find a way around the ugly "type casting" in the Run loop, too... would be awesome. I think it's the Scripting.Dictionary that's forcing it down my throat.
@Marc-Andre hi! haven't you?
 
Well I could!
 
is he logging passwords for real??
omg
logger.info(pass1 + " is length < 11");
 
logger.info(pass1 + " = " + pass2);
 
brilliant
 
1:45 PM
Could someone tell me if this review is too harsh:
 
writting an answer
 
Not to be a pain here, but this code is a perfect example of how to grossly complicate something that is reasonably simple.

Just for starters, converting the numbers to strings and then using regular expressions is just wrong. When you're dealing with numbers, you have to deal with them *as* numbers. Changing them to strings will do nothing but add awkwardness and complication to the algorithm.

Second, it is not necessary to actually *create* the string in order to calculate it's length.

Third, your method `runProblem` is a perfect example of when *NOT* to use a list because a plain, ord
 
@Donald.McLean try without "you/your"
 
@Donald.McLean To me it does seem harsh
 
9
A: How to be a nice reviewer?

Gareth ReesBe impersonal The goal of code review is to improve the quality of the code (and to produce shared knowledge that will contribute to the quality of code written in the future), not to evaluate the worth of the programmer. A reviewer can make it less likely that someone will take the review pers...

 
1:48 PM
@Marc-Andre I thought that one of the answers already covered that, maybe it was a comment...
 
Not to be a pain here, but this code is a perfect example of how to grossly complicate something that is reasonably simple.

Just for starters, converting the numbers to strings and then using regular expressions is just wrong. Numbers should be dealt with *as* numbers. Changing them to strings will do nothing but add awkwardness and complication to the algorithm.

Second, it is not necessary to actually *create* the string in order to calculate it's length.

Third, the method `runProblem` is a perfect example of when *NOT* to use a list because a plain, ordinary loop will work just fine, a
 
Logging passwords may be a security issue. maaartinus
3
 
@Donald.McLean hmm better?
 
@TopinFrassi Well, the code is truly awful.
 
But one line is not enough it's such a bad idea...
 
1:54 PM
Maybe explaining in further details why it is a bad idea?
 
And I toned down the first line before posting.
 
@Donald.McLean Then you want to spend extra effort so that the OP does improve it :)
 
@Phrancis it's exactly what I am doing ;)
 
@Donald.McLean Yes, but I believe the OP can understand that the code is awful, without feeling destroyed by your answer
 
I also tend to be harsh, but that doesn't help anyone here
 
1:55 PM
0
Q: Div not showing properly

jaapHere: http://www.doublecentre.org/continue.html you see two collumns, the lower one seems not to show itself properly. It appears when you scroll down. can anyone help me?

 
@Marc-Andre may be.. eh eh eh
 
@CaptainObvious really?
 
@CaptainObvious Easiest close vote of the day
 
We could review non-working code so that the code is inherently better but still fails.
 
@Morwenn That is, if the OP posted his code.
 
1:57 PM
@TopinFrassi Could we still review their use of English?
3
 
@Mat'sMug I'm not sure it's an issue with your filewriter, but I know I had trouble with the fso.filestream. I'll try to keep the typecasting in mind when I look.
 
@Morwenn LOL
2
 
@Morwenn That is, if the OP wrote in english... Oh wait
 
The sarcasm runs strong on CR today!
 

« first day (506 days earlier)      last day (3497 days later) »