« first day (558 days earlier)      last day (3450 days later) » 

12:00 AM
Am I reading this right? Microsoft opensourced 4.6? I don't get it. Why??
 
@RubberDuck I don't care why.. it's just AWESOME! :D
2
 
Who cares. Added features to a free VS!!!! Wheeee!!!
Here's the right link to Community. visualstudio.com/products/visual-studio-community-vs
 
12:18 AM
@Mat'sMug wait, what? Visual Studio will include refactoring tools that Java IDEs has had for years?
 
No hating @SimonAndréForsberg. =P
 
@SimonAndréForsberg Like what?
 
@JeroenVannevel renaming, extracting methods, autocompletion, I don't know, everything!
@RubberDuck I'm not hating, I'm impressed.
 
Eh? That's always been in VS
even without resharper
 
not in the VS I used for my C# Sudoku Solver
Visual Studio Express
@JeroenVannevel then why do people get resharper?
 
12:21 AM
Yeah. The free version has sucked compared to Pro. Until now.
 
Eh, I don't know if Express supports it or not so no idea
 
and VS Pro cost money, right?
 
ReSharper does a lot more than just refarctoring
costs money, free for students
 
now it's free for everyone
Code smells, all kinds of conventions, hidden bugs, code templates, i8n, etc
 
12:23 AM
aha
 
I really like the debugger in VS, but I hate the auto-generated code.
I write everything myself from scratch (for now).
 
<please don't hate me> still, stuff that Java IDEs has been able to provide for years :) </please don't hate me>
 
@hosch250 what autogenerated code?
 
You know, when you first create a project...
 
But all that has been in VS as well. You just had to pay for it if you're not a student because the total package is so much better
 
12:25 AM
call me spoiled, but I prefer free.
 
integration with azure, lots of project templates, T4, more extensive debugger, integrated test framework, etc
 
I've worked with Eclipse some. I work with Xcode every single day. I also very, very regularly work with Visual Studio. I hands down prefer Xcode all day.
 
Supper time, have to leave now.
I'll post another question for you guys as soon as I have time.
 
@nhgrif recently I've been starting to use IntelliJ instead of Eclipse. I'm starting to like IntelliJ a lot.
 
I moved from Eclipse to Netbeans when I do Java stuff
Can't say I like Eclipse compared to the others
 
12:29 AM
Why is it that we always seem to have an IDE fight around here?
 
I'm a fanboy
I don't know about you guys
 
@SimonAndréForsberg because vi and emacs are old school?
 
@rolfl and no one wants to discuss tabs vs. spaces anymore
2
 
Everyone knows it's one tab of size 4 spaces
 
Who is everyone?
 
12:32 AM
I'm me.
 
I found NetBeans complicated and Eclipse slow and bloated.
Not to mention getting the debugger in Eclipse to work right was a bear.
I think the IDEs are why I never got into Java actually.
 
What is this:
from c1 in (from c2 in (from c3 in cs select c3) select c2) select c1
 
linq, expression syntax
You can read it the way you'd read SQL
except this is native to C#
I don't like the expression syntax, it always throws me off
no wait
this is query syntax
 
0
Q: Jasmine Unit tests for simple toggle class

spirytusUsing Javascript/jQuery I created simple toggle and started writing unit tests for it using Jasmine. Am not sure however if I should be testing for things like e.g. if "click" listener is registered when object is instantiated. Should this be done as part of unit test or rather E2E test using Web...

 
12:40 AM
expression syntax is users.Select(user => user.Children).Where(child => child.Age > 50).ToList()
 
@RubberDuck try IntelliJ then. And if you have Eclipse problems, ask me or monkey.
 
Makes me want to refactor all my tests. Tomorrow.
@SimonAndréForsberg: later
 
12:56 AM
good night @SimonAndréForsberg!
@SimonAndréForsberg guess who makes IntelliJ? the brains behind ReSharper! :)
 
oh, @Phrancis will like this:
2
> This version of Visual Studio works best with Internet Explorer 10 or higher.
 
0
Q: Trinary Tree - Java

Nixit PatelHello Everyone I have worked on the trinary tree problem insert and delete, can anyone look at it and tell me how it is. source code for that can be found at here: https://github.com/nixit28/Trinary-Tree Please let me know what is missing, or need to do in order to improve that. Thanks, Nixit...

0
Q: Karp-Rabin string matching in Java

tsleysonI wrote an implementation of the Karp-Rabin string matching algorithm in Java 7, based on the discussion in Section 32.2 of Introduction to Algorithms (CLRS). Clearly, I need more experience with numeric programming, because I spent two days wrestling with overflow issues and floating point error...

 
@Mat'sMug
 
1:17 AM
0
Q: Connecting to a MySQL database with C#

NimazSheikCan anyone help me with checking this code, it is for connecting to a database. The method getFromDatabase is to take values from the database and put it to a dataset , and the other method getFromDatabaseToCombo is to get from the database to a comboBox. I can't shake off this feeling that the l...

 
Does anybody know how to synchronize Mutex Locks in C#?
My code is crashing and says I am accessing a variable from an unsynchronized location.
 
Anyone around for a quick JavaScript question?
 
@CaptainObvious missing da codez
 
I'm trying to make a simple website footer that says "(c) Cardshifter 2014" but make it where once it is 2015 I don't have to go back and change it on every page, is there a function like SQL's GET_DATE() in JS?
Or CSS, for that matter. Or HTML, doesn't matter to me right now
 
@Phrancis IIRC there's a date() function, no?
 
1:25 AM
@Phrancis I don't know if you like W3Schools... w3schools.com/jsref/jsref_obj_date.asp
 
@hosch250 exactly what I was looking for thanks!
 
I know, I really love them because it just gives the outline and lets you go.
Some people hate them though, and want you to read 50+ pages of some Mozzilla manual to just get a list of the HTML color names.
 
I use W3Schools pretty often for simple stuff. That's also how I learned SQL.
 
I use them as a refresher. I don't know SQL yet.
 
Gotta love simple copy/paste examples too, and it's always stuff that is to-the-point for common uses. Like this. I don't need to learn JS right now, I just need this little thing.
 
1:30 AM
I can't get my C# Mutex to work :(
I think I'll ask on SO.
 
Oh, hey. Hai!
Sorry everyone. Forgot what room I was in.=P
 
lol
23 messages moved to VBA
 
0
Q: How to optimize suffix array

OneEyeQuestionI am trying to solve a Hacker Rank problem about string suffixes: For two strings A and B, we define the similarity of the strings to be the length of the longest prefix common to both strings. For example, the similarity of strings "abc" and "abd" is 2, while the similarity of strings ...

 
W3 schools is a good test of whether or not you're competent in something yet.
 
1:47 AM
0
Q: Implementing `dropJ` on JoinList Attempt #2

Kevin MeredithInitially, I implemented dropJ in this post. However, abuzittin-gillifirca found a bug in my program. So, I re-implemented it in the following way: dropJ ::(Sized b, Monoid b) => Int -> JoinList b a -> JoinList b a dropJ _ Empty = Empty dropJ i jl | i <= 0 = jl dropJ _ (Single _ _) ...

 
@nhgrif Sure. It's good for quick web stuff though.
 
@nhgrif Where'd you find that?
 
Mmm, what does that have to do with W3Schools?
Is that their code?
 
1:52 AM
The closing bracket madness has nothing to do with W3Schools.
 
I do think it would make it more compact, for sure. Also, more confusing for Ms. or Mr. Maintainer.
 
0
Q: File Output given repeated small operations

chrisb2244I want to write a file which contains values for each cell of a CFD computation. This will be an input file to the program which runs the computation. Currently, the most dubious section of my code looks like: for (int y = 0; y < ycells; y++) { double yPos = yMin + (cellToY * (y + 0.5)); ...

 
Might as well be .
 
2:23 AM
Does anyone have experience with Mutexes in C#?
I have mine working, but it is running in lockstep instead of freely like the other Producer/Consumers I wrote.
It doesn't have too, I can not run one of the threads, and it will run without needing to lockstep.
I think it is just that the other thread is waiting, so Windows forces the thread to switch.
Testing that.
Nope, there is a problem somewhere.
Oops, there isn't.
I had forgot to change something.
 
2:44 AM
Anyone with a web browser and wide-screen monitor around?
 
2:56 AM
1
Q: Slowly working word counter

pertpoertI have a problem where, given N terms, the task is to find the k most frequent terms from given N terms. My code is correct, but I have a time limit 10 seconds and my code doesn't pass. Constraint: \$0 < N < 300000\$ \$0 < term length < 25\$ N = gets.to_i if N < 300000 and N a=[] (0....

 
@Phrancis what's up?
 
Got it figured out thanks though :)
 
Glad I could help
2
 
      <br />&copy; Copyright 2014<script>new Date().getFullYear()>2014&&document.write("-"+new Date().getFullYear());</script>, Cardshifter.
 
Inline javascript?
Kinky
 
3:07 AM
@Phrancis shouldn't it be © Copyright 2014 Cardshifter?
 
Eh, just quick copy & paste. I don't know JS, just looking quick fix
@Mat'sMug that's what it renders as
 
> site design / logo © 2014 stack exchange inc
oh yeah
ok
dang I don't know how I managed to read it wrong
 
0
Q: A function which collates data from various API calls. Help on design-pattern

xanderceraHelp on the appropriate design pattern for this. Program details: A scheduled script that fetches all the data from various framework-based API's - executeSearch('webservice_name') - , then, collate the data and pass it to another framework-API - saveToReportTemplate('report_template_n...

 
3:22 AM
0
Q: Website template for Cardshifter website

PhrancisI'm putting together a template for easy formatting of content pages for putting together a website for an online trading card game. I've been using the Bootstrap library (and finding it wonderful) and since we will be using this template for basically all pages, I want to make sure it's top-no...

 
@Phrancis nice!
 
Merci!
 
1
Q: Website template for Cardshifter website

PhrancisI'm putting together a template for easy formatting of content pages for putting together a website for an online trading card game. I've been using the Bootstrap library (and finding it wonderful) and since we will be using this template for basically all pages, I want to make sure it's top-no...

2
Q: Efficient way of having synchronous and asynchronous methods in an application?

WebbyI am working on a library in which I need to make synchronous and asynchronous method in my client library. My library does below thing - Customer will use our library and they will call it by passing user_id and then we will construct a URL by using that userId and make a HTTP call to that URL ...

 
4:13 AM
1
Q: Implement `fold` on a "Rose Tree"

Kevin MeredithGiven the following algebraic data type, a Rose Tree: data Tree a = Node { rootLabel :: a, subForest :: [Tree a] } I attempted a foldTree function to fold over this list: (credit to this class's homework from 2013: treeFold :: (b -> [b] -> b) -> (a -> b) -> Tree a -> b treeFold f g ...

0
Q: Why are both error fields showing in my forms?

user2296112I have two forms on a page, both with their own message handling. I use three $_GET variables to determine which form shows the message. The problem is both forms show an error when I send empty fields from either form. below are the methods of showing the message. I've dumped $form when submit...

 
@rolfl are you around?
 
Welcome to CR! This question unfortunately appears to be off-topic because it is about reviewing code that doesn't display expected behavior, and is therefore not ready for a review... yet! Please see our help center for all the details :) — Mat's Mug 19 secs ago
 
@Mat'sMug The smiley face at the end makes all the difference :)
 
TTGTB
good night!
 
Night @Mug
 
5:17 AM
Monking all
Ah my alt gr key is broken
 
0
Q: i want to make a button with value n power 2

Nitish Dhawani want to make a button with value n power 2 and n power 3 if i am using any tag inside value it is taking it as a string. <html> <body> <button class="extra6" value="n<sup>2</sup>">n2</button> <button class...

 
@rolfl this question codereview.stackexchange.com/questions/69605/high-low-game shouldn't be reopened. The code does not produce the correct result, it does not even exit. IMO it is crap and the OP wants us to explain what the problems are.
 
6:11 AM
Uni accommodation and still having money left over is bs to sort out
 
0
Q: How can I modify ths javascript code when click radio button to disable some fields?

XIAN YU <table width="100%" border="0" cellpadding="3" cellspacing="0" bordercolor="#3366CC" bordercolordark="#FFFFFF" class="dataTable"> <tr> <td align='right' nowrap class="dataColor01"> ...

 
if your code works fine you should be posting it here : codereview.stackexchange.comAshad Shanto 21 mins ago
 
6:28 AM
@CaptainObvious I'm pretty certain this code is broken. That switch statement just looks... odd?
 
monking
 
Maybe it's just me, just the formatting makes me think ...
Hey @janos
 
hey Phrancis
 
What's the good word tonight?
 
Monking @janos
See you all in a few, need to reboot
 
6:32 AM
hey Heslacher
the good word tonight? bootstrap rocks, maybe ;-)
 
That, it does!
I was going to use Wordpress at first, then... Simon says, check out Bootstrap. And so I did. And here we are :)
 
0
Q: C++ code that is not compiled on remote machine

viakondratiukThere is some code which compiling fine on my local machine but there are problems with it on remote. It's purpose to create linked structures in memory. I know one possible problem that I'm allocating and not deallocating memory. Are there any other problems? struct LinkedNodes{ int nodeId; ...

 
@Phrancis the site will be all static HTML pages, or will there be dynamic elements in it too?
 
All static, AFAIK @janos
 
I'll be interested to see what solution you come up with for the generating the navigation
 
6:43 AM
So will I :)
 
that is, how to avoid duplicating the (almost) same menu on all pages that need it
 
I would have imagined one could link to the code within an external HTML file within another HTML file, but it appears that's not how HTML works...
 
nope
HTML is completely static
 
I know, I'll make JavaScript pull all that menu stuff as one big string and shove it in my HTML files. Sounds like it would work, right? </sarcasm>
 
I guess it could
a tricky part could be stuff like highlighting the "current page" -- in particular, determining what the "current page" is, based on what (the current url?)
 
6:52 AM
I'm sure someone's come up with something, I just don't really know what to even Google-Fu for to find anything related
 
yeah, that's hard. That's why I don't have a ready solution for that, even though I've made a lot of websites. I've tried many things and everything comes with a big ugly caveat
 
Not sure if it's anything like that, but kind of sounds like it
 
no, I don't think that addresses the inevitable duplication in static sites at all
in dynamic sites, you can have a base template, and derive everything from it
 
Maybe not. Simon sounded like he knew some way to do it, but he was busy with more important stuff at the time
Maybe I should look into this dynamic stuff.... though I had not planned on having any dynamic content... maybe it's not worth it
 
the problem becomes apparent when you have 3 pages and they all need the same menu + current page highlighted in some way
 
6:59 AM
0
Q: jquery code for inputting text

Nitish Dhawan $(".num").on("click", function(e) { var prev = $("#txt").val(); var num = this.value; var pos = $("#txt")[0].selectionStart; var newValue = prev.substring(0, pos) + num + prev.substring(pos); $("#txt").val(newValue); // By default assigning the new value will reset ...

 
CUDA assignment is complete. This weekend I start my Swing assignment. I'm gonna need some java for this Java.
2
 
7:16 AM
@200_success oopsie you're right, deleted my comment
ttgtw
see you later
 
Have fun @janos and thx for the review
 
.NET Core is now open source
Checkout JIT compiler, garbage collector etc.
 
 
1 hour later…
8:55 AM
So, when can we get the C# guys to start using methodName instead of MethodName?
then I could switch too
 
0
Q: Trying to get better approach for simple image gallery

RodgeI have a simple gallery that hides and show images. It works fine however I am not satisfy with my approach. My javascript seemed redundant. Can you check my code and give better idea on how can I improve it. This is my html <div class="big_img_wrapper"> <img src="<?= IMAGEPATH ?>...

 
9:14 AM
Monking
@Jamal CUDA assignment for university?
 
Monking @skiwi
Monking @Pimgd
 
hey @Heslacher
 
Morning...
 
9:37 AM
@skiwi Yeah
 
@Jamal I'm jealous now
 
It's pretty nice, but quite a change from CPU-programming.
 
Yeah, I'd actually go for OpenCL, but just cannot find the spare time to play around there
Made a GUI for a program just now... Realize I forgot an important part, great
 
10:03 AM
0
Q: Getting valid URL from user input

d347hm4nI have a dialog which populates my ConnectionStringData object with the URL of the service that I'm trying to connect to. I then consume that URL with the following property: /// <summary> /// Where the Service is located. /// </summary> public string ServiceLocation { ...

-2
Q: About making a password by turbo c++

Shahla-40I wrote the code in turbo c++ to create a new user name and password but when I write wrong character in password place I cant erase it by back space what should I do?

 
@CaptainObvious What should I do?, I would have some strong words ready for that...
 
10:18 AM
@CaptainObvious So you're the one responsible for that!
Any version of this that will infer bits of information too?
uhm...
static int* asyncRequests[20]; -> declare asyncRequests as static array 20 of pointer to int
static AsyncRequest* asyncRequests[20]; -> syntax error
basically is there a cdecl that will automatically infer types?
 
3
Q: Knowing who is the user in every request (in every action and every view)

sportsFirst: I have many model classes that are mapped from/to tables using EF. Two of them are User and UserCookie, which are stored in tables Users and UserCookies. public class User { public long UserId { get; set; } public string Fullname { get; set; } public string Email { get; set; ...

Sould be closed as the OP took Pimgd's advice to post at programmers.
 
Can't VTC, already did so months ago
 
to bad
 
10:40 AM
How bad would it be to use this
int n = sizeof(arr) / sizeof(arr[0]);
becomes
int n = (&arr)[1] - arr;
 
Bad anyway.
Because, you know, C :p
 
well I have to TT_TT
 
Anyway, chances are that people will recognize the first form but not the second.
One could say that "there is a division, this is expensive" but I bet that any modern compiler will evaluate sizeof(arr) / sizeof(arr[0]) at compile time anyway.
On the other hand, I am not sure that (&arr)[1] - arr is guaranteed to be a compile time expression. And it is undefined behaviour if the size of your array is 1.
 
yeah I'm just doing the normal way
Small nitpick: the result of pointer subtraction has type ptrdiff_t. (Typically on 64-bit system, this will be a larger type than int). Even if you change int to ptrdiff_t in this code, it still has a bug if arr takes up more than half of the address space. — Matt McNabb Oct 6 at 2:37
 
Well, and the result of sizeof is size_t which is often an unsigned long.
 
10:58 AM
Someone want to write a "real" review to this crap code ?
 
0
Q: Three-machine proportionate flow shop problem with unequal machine

user3446659As part of an academic project I wrote a code about dynamic programming that solves the "Three-machine proportionate flow shop problem with unequal machine". My major problem is that the code takes a lot of time to calculate big values (bigger than 10). What is the code efficiency? How can I c...

VTC please
 
@Heslacher ... because?
 
Some missing variables, doesn't compile
 
Why not?
 
@Heslacher but then answering it seems,... unintuitive in the very least.
 
11:02 AM
I'm not seeing where it is broken, but I don't have a compiler
so I'd like to know what's broken about it
 
@Vogel612 first posted the style part, then I tried the code...
@Pimgd No definition for schedule_left(heuristics);
@Vogel612 resolved the problem with the answer ;-)
 
@Heslacher I assume he left that one out, because it's mostly... parallel to schedule_right(heuristics)
at least by name,...
 
Oh no, code duplication, better hide it so that nobody gives me a solution
 
The OP didn't post only a part of his application but the whole
 
ugh... I think I'm doing something wrong
if you have an array of struct...
static AsyncRequest asyncRequests[20] = {NULL};
Then you can check whether a struct hasn't been initialized yet by going &asyncRequests[index] == NULL, right?
But it's not a pointer...
 
11:15 AM
I don't fully understand what you're trying to do.
 
AsyncRequest* findAsyncRequestWithQueryID(uint32_t queryID){
	for (int i = 0; i < MAX_ASYNC_REQUESTS && (&asyncRequests[i])->applicationRequest != NULL; i++){
		AsyncRequest* asyncRequest = &asyncRequests[i];
		if (asyncRequest->applicationRequest->queryId == queryID){
			return asyncRequest;
		}
	}
	return NULL;
}
I'm doing this now
 
From what I can see, static AsyncRequest asyncRequests[20] = {NULL}; worls only because NULL is (void*)0.
 
basically, go through an array of struct to find one that's got a specific value
in the if I'm checking if I've already reached one that's not initialized yet
(&asyncRequests[i])->applicationRequest != NULL
I was wondering if there's a better way to do this
 
The check seems kind of wrong (I guess).
 
like asyncRequests[i] == NULL or something
 
11:17 AM
When you write SomeType array[N]; then the N elements are initialized.
 
to 0?
 
They exist, so their address can never be NULL.
 
or to whatever my debugger thinks is funny
 
If you add ` = {0}` at the end, they will be zero-initialized, otherwise they will be initialized with garbage.
 
I want them to be 0 so I can test that later
It's a fixed size array that I add items to and remove again
 
11:19 AM
If I remember well = {0} is the only "good" way to zero-initialize an array, = {NULL} only works because the void* pointer is casted back to 0.
 
But I don't want to malloc (embedded device)
so that's why I'm using a fixed size array
with the structs in it
rather than array of pointers
 
Well, then the structs in your array will always contain "something". You cannot remove elements from a fixed-size array, you can only change their value.
If I am not mistaken, the condition (&asyncRequests[i])->applicationRequest != NULL will always be true.
 
typedef struct{
	application_request* applicationRequest;
	bool* isDone;
	bool(*isDoneChecker)();
} AsyncRequest;
Surely the pointer could be NULL?
 
Soory, I don't know where I had my head.
 
That's okay, the whole thing is confusing for me too
 
11:23 AM
I managed not to notify that there was an arrow and that you were comparing the value of a member pointer -___-
Still, (&asyncRequests[i])->applicationRequest is overkill. Simply use asyncRequests[i].applicationRequest.
 
=D It said "asyncRequests[i] must be pointer or arithmetic type" so I made it pointer
then it looked wrong so I went to check with applicationRequest instead
that's how that happened
 
What. That error message seems strange.
Why do you have a member pointer to bool by the way? Couldn't you simply use a bool? :p
 
because it's a flag for the device to let me know it has halted the async function
 
Hum, ok. A good old observer.
 
/*Scans for available wifi networks. Async.
* You must return early (< 10ms) for this function call.
* Keep the reference to the isDone variable in your local storage.
* the isDone variable signals to this interface that your device is still busy.
* When the wifi scan is done, you should set isDone to true.
* When this method is called, you may free any results from a previous wifi scan.
* If an internal error or something else leads to the wifi scan not being able to complete, set isDone to true as well.
/*Probes to see if the wifi scan has been succesfully completed.
* Returns true if a wifi scan has been executed and completed succesfully.
* If the scan is still in progress, has been interrupted or otherwise halted without succesful conclusion, you should return false.
*/
bool isWifiScanDone(){
 
11:29 AM
Trying to reason about small bits of code is incredibly hard ._____.
2
 
it's for checking whether it's A) done and B) done successfully
 
0
Q: Which is the fastest way to compute N likelihoods on normal distributions?

albertoIn the context of a Gibbs sampler, I profiled my code and my major bottleneck is the following: I need to compute the likelihood of N points assuming they have been drawn from N normal distributions (with different means but same variance). Here are two ways to compute it: import numpy as np...

0
Q: Su-doku resolver program with improved functionality

EdeniaI saw programs to resolve su-doku puzzles but to be honest.. They were badly written. First of all.. readability of the program itself was horrible and the code was really long and confusing. So I decided to start from scratch, using my own style to write really good resolver. What I have for no...

0
Q: c# class level singleton value

hazimdikenliI have a root class and I'd like to add an indicator to it (property, static field, readonly field, virtual method or something like that), that should give me the same string value for every instance of that class, I would rather prefer to get that value without instantiating that class. GetObjT...

 
now that it works, all that's left is to expand all the functions so nothing is readable anymore, but the code does comply to the standard used in the company
because why would you ever have language specific formatting standards?
One will do.
 
.... /rant?
 
Yeah.
there's just something off about every { or } to be on a new line
3
 
11:45 AM
Monking
 
Morning
 
12:14 PM
0
Q: Linked Lists in Java

JeremyFor some reason the add(int) method isn't working and I don't know why. my output is: How many suitors are there? 5 null null null null [1] 5 Process completed. import java.util.Scanner; public class Princess { public Node head; private int listCount; // LinkedList constructor public Prin...

 
@CaptainObvious VTC broken
 
12:46 PM
0
Q: Is this the proper way to handle views

MathlightMy guts tells me that this isn't the proper way to handle views / templates, so that's why I'm asking you guys what could be done better. Some background: This application I'm building now is for use in an school project with people that have not that much knowledge of PHP. Therefore I'm not usi...

 
1:03 PM
@Mat'sMug Guess who makes ReSharper? The brains behind IntelliJ ;)
2
@Pimgd @Heslacher Just because there's a few methods missing and that it's not compilable for us doesn't mean that it's not working for the OP. There is no requirement that the code should work for everyone, just for the OP.
4
 
@SimonAndréForsberg The method is missing, but the method being omitted is not mentioned, yet the code is posted with imports and all. That's what bothers me.
 
@SimonAndréForsberg If the OP posts complete namespace with classes and usings it should work for everybody.
Or more clear: If posted complete like this it should at least compile.
 
I'm not 100% sure it was the right thing to do, but there's some justification for it.
 
In my opinion, it's not a good quality question, but I assume that it works for the OP, and therefore there is no reason for me to VTC as non-working code.
trying to find the appropriate meta question, but can't find it right now
 
1:20 PM
hmmm
Anybody have experience with SecurityManager defaults?
(Java) Specifically, if you're not admin, can I use System.getProperty("os.name"), or is that locked down?
I gotta load a .dll or .so based on the platform, but I can't do that if I don't know what the platform is...
 
@Pimgd try it. I'm not sure if it works or not.
@skiwi and I have some experience with SecurityManagers though.
 
@SimonAndréForsberg Otherwise, we would have comments like "VTC: it doesn't work with Java 1.2."
3
 
... I can try it on MY machine, but that doesn't solve it for any corporate locked down enviroment.
 
@Pimgd does the different environments use different SecurityManagers?
 
Well, I imagine there's some differences, right?
 
1:24 PM
well, they could run the Java application with different security manager settings, but I'm not sure why they would do that.
 
hmmh
or some other way of determining OS
 
But I think that if they run it with a SM, then it will probably be the same SM.
I think System.getProperty is your best bet.
 
haha, other than running a shell command (ls/dir) and seeing what sticks
 
@Pimgd that sounds like a bad way to solve it. Besides, you might not have permission to do that either.
 
yeah, but os.name + unix and it's many distributions...
not ideal.
 
1:28 PM
well, that is true... don't know what the different Linux distributions would say there.
How about trying to load both a .dll and a .so and see what works? :P
 
0
Q: Any issues with this bash script?

Tom HartI've created a script to create a module in our MVC framework The structure of the module is like this (for this example, the module is called test test > Test.php controllers > IndexController.php models > TestModel.php open > css > js > views >...

 
... That's... another solution.
I'd hate to run into the case where one semi-accepts it and it does work, and then it doesn't and horribly explodes everywhere.
3
hmhmhmh welp I'll just try something, I'll see how much bug reports we get =D
 
EXPLOSIONS!!!!!
Torq! 'Splosions! 'Splosions! Torq!
 
BEAR TRAPS!!!!!
3
 
Well I said explosions, but I'm referring to exceptions or segfaults or other fun that may occur due to running native code on the wrong platform
Yay, native code~
 
1:58 PM
0
Q: Creating an object oriented model in VBA using COM and ADODB from 2 depended SQL tables

vba4allThe story... A bit of background info and how is the database designed... Please notice you don't really have to rebuild the tables in SQL but I shared an SQL Fiddle just in case and screenshots1 of what the database looks like. I thought it was going to be easier to explain the story of what I...

0
Q: consecutive animations

PkwiesI'm new to Core Animations, I want to fade out two different layers one after another.I write them in a CATransaction block. I wonder if there is better approach to make such animations. [CATransaction begin]; CABasicAnimation *fadeOutLoadingBar = [CABasicAnimation animationWithKeyPath:@"op...

 
2:26 PM
0
Q: checking if the octal conversion of a number is palindrome(1) or not(-1)

agarwalpublic class octal { public static void main(String[] arg) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int i,j,k=0,l; char[][] a=new char[64][]; int[] m=new int[64]; String s; for(i=0;i<n;i++) { m[i]=sc.nextInt(); } for(i=0;i<n;i++) { s=Integer.toOctalString(m[i]); for(j=0;j<s.leng...

0
Q: Problems with PHP connecting to a MySQL database

Antero DuarteI'm working on a project where i use a raspberry pi to control and monitor a heat pump. I have a web interface and i have the following code that should send to a database a value of temperature that the room should be at. For some reason, i am getting a SQL syntax error and with another method...

 
2:42 PM
I'm afraid not. Think of us as a grammar check. You have to spell the words correctly before we'll run correctly. — Nick Udell 2 mins ago
^^ excellent quote
 
@CaptainObvious Best way to start the day!
(Monking)
 
monking!
Just got the latest MSDN Flash in my inbox: "opening up visual studio and .net to every developer, any application" - lol, I downloaded VS Community yesterday!
 
Monking @Mat'sMug
 
2:58 PM
Greetings, Programs.
 
so will it work on iOS now...?
 
Hello, @Donald.McLean.
 

« first day (558 days earlier)      last day (3450 days later) »