« first day (507 days earlier)      last day (3509 days later) » 

12:21 AM
Just got this from my studio guy...
> See what you can do, magic man.
 
'bout sums it up, right?
 
Pretty... much... I guess.
 
0
Q: Metalsmith plugin for stripping utf8 BOM from files

James KhouryI've been developing a metalsmith static site and I came across an issue where Visual Studio was automatically adding a BOM to the pages. I wrote the following plugin for metalsmith (it needs to be run as the first plugin). This feels a little messy. It was written mostly as a copy-paste and a ...

 
That tune I need to fix sounds pretty retro... like it was written in 1993 euro dance phase... he wants me to make it sound like today music...
He said:
> It sounds like the Casio keyboard demo.
 
sounds like it needs legendary-magic
 
12:32 AM
Can I please go back to writing PHP instead of fixing this? );
 
12:44 AM
0
Q: Finding Local Maxima

Kevin MeredithThe following function finds all local maxima. A local maxima is an element of a list such that it's greater than either of its neighbor elements. An element with 1 neighbor is not a local maximum. localMaxima :: [Integer] -> [Integer] localMaxima (x:y:z:zs) = if (y > x && y > z) then y : local...

 
12:58 AM
0
Q: 3 textboxes with multiple value combinations to one output

Link_I wouldn't mind if someone who has more experience in JavaScript to review this. I went through and tried to minimize this as much as possible, but I still feel this could be smaller and more compact. To reiterate this is not to fix my code, it works fine. I am really just looking to see if my wa...

 
1:12 AM
It's the best I've @Mat'sMug. Not sure how useful it will be.
0
A: Unit Testing - The Final Solution

RubberDuckTestEngine I don't see these being used anywhere. CurrentTest As TestMethod CurrentTestAllResults As List CurrentTestFailedOrInconclusiveResults As List These are scoped to the class when they could be scoped to the IsTestMethod function. Private Const TestMethodNamePrefix As String = "T...

 
Mug using a bit of humor on his tests...
Public Sub TestFail()
    Assert.Fail "This wasn't meant to be."
End Sub
 
1:31 AM
Hehe
3
@RubberDuck well that's an excellent review! I don't think "circular reference" is applicable though... but I see your point
And seriously... facepalm with the CurrentTestXxxxx stuff!
Also the Else block with the For Each loop is trying to find the first reason for failing the test - my List class unfortunately can't give me that out of the box ;)
TTGTB - I'm burned :/
 
1:59 AM
Yeah @Mat, I'm not certain it applies either, but it's worth checking into. It typically doesn't matter, and things eventually get destroyed anyway, but it can cause heisenbugs in some situations, other times it just eats up memory.
 
2:48 AM
I hope nobody minded me removing the tag from this question... Seemed too specific and not very useful.
 
Agreed
 
Hi Jamal!
 
HI!
 
How's the JAVA learning coming along?
 
It's going okay. My partner and I got a 98 on our first project!
4
 
2:50 AM
Damn, pretty good
 
@Phrancis Well, way to offend the mods of CR.....
 
He does know a lot more about Java than I do, but it was also his first language. I was able to help out a little.
 
Neato.
 
And it'll only get tougher...
 
I saw earlier that you got 100 for something ... same project?
10 hours ago, by Jamal
I made a 100 on my first parallel programming project! :D On the other hand, it still involved serial code...
 
2:55 AM
Yeah, but that one was individual work. It was pretty much an intro to using our local supercomputer, as well as some complexity determinations.
The next project is on MPI.
 
Good luck on that one.... gets complex very fast.
You have discovered Amdahl's law.... right?
 
There's only one on it, and it will only cover some small portion of the library.
Yes
 
OK, treat that law like... well, law, and you should be able to conceptualize solutions better... and understand your limitations, and how much overhead MPI adds.
 
Oh. My. Dog. This producer made manual echo (a.k.a. copying the track and offsetting by X value).... really.
 
Can you undo it?
 
3:01 AM
Right. I believe we can still test it on our PCs, but for performance measurements, we will have to send a job to the supercomputer. Conveniently, it also does compilation.
 
I can delete the track...
2
 
MPI is a solution that is in desperate need of rebuild.... redesign. The concept is good, but the implementation is not very friendly.
It is sort of the solution-of-last-resort
 
We will eventually do Pthreads, CUDA, and OpenMP.
 
which leads to different sorts of problems, because normally the process you are trying to solve has been designed with a certain degree of parallelism.... like that ^^^^
But, the scale changes through a cross-over point with MPI and you sort of need to rewrite.
very few problems translate from the CUDA/OpenMP type scale of parallelism to the MPI scale.
and then you nest them too (running multiple nodes on a host, or nodes with OpenMP activity, etc.).
Or, dog-forbid, running nodes with GPU's ;-)
 
O.o
 
3:07 AM
@rolfl I'm assuming all of that was in some sort of English that I've not learned yet.
2
 
We have a half-dozen 4-socket intel machines, each socket with 4 cores, and 2 K40's on each.... Not my toys directly, but I have seen the results of running combined openMP, GPU, and MPI layers.
@RubberDuck Put it this way, a K40 has close to 20000 parallel (but small) 'cores' on them, put 2 in a machine, combined with 16 real CPU's (with HT, call it 32), then throw 6 of them together, you now have...... 240,000 parallel operations all coordinated to run one operation.
 
Ohhhhhhhhhhhhhhhhhh....... Shiny
 
Hmmm, not 20,000 cores, but close to 3,000 cores, but you run about 20,000 threads on them at once to keep them busy... ;-)
 
Damn that sounds expensive.
 
money is relative..... it takes up a rack of space, at about $20K per unit and there are 6 of them.
so, call it about $100K with discounts and specials.
 
3:13 AM
1 min ago, by Phrancis
Damn that sounds expensive.
 
Not when you're IBM....
> money is relative.....
 
Now, the same space can have one of these: en.wikipedia.org/wiki/PureSystems
pricing starts from about $250K ... ;-)
 
> PureSystems can host four different operating systems (AIX, IBM i, Linux, Windows) and five hypervisors (Hyper-V, KVM, PowerVM, VMware, Xen)[2] on two different hardware architectures (Power Architecture and x86) simultaneously.
 
(although that includes some spiffy srotage - but, about 1/10 of the computational power..... or so.
 
<?php
$phrancisState = 'I\'m sick of working on this crap music';
echo $phrancisState;
?>
 
3:19 AM
@RubberDuck I try to keep somewhat quiet about how cool IBM is.... but, IBM knows so much about reliability, etc... it's unreal.
For the mainframe systems you can replace all parts of them (following various procedures), without any downtime.
 
 
I really like that about you @rofl.
But seriously, they've done some cool things, and some of it seems to be just because they could.
 
What, like atomic soccer?
(if you have not seen that, it is amazing... ;-)
 
Yeah. That ^!!! =)
I was actually looking for it just now.
 
Or the recent tennis music, or Watson, or memory, or HDDs or genetic research, or cheese cutters.
 
3:22 AM
 
Some early IBM hardware:
 
Cheese cutters...?
 
Dayton Computing == IBM...?
 
Indeed....
 
3:27 AM
(disbelief)
 
Awesome.
 
International Business Machines, abbreviated IBM and nicknamed "Big Blue", is a multinational computer technology and IT consulting corporation headquartered in Armonk, New York, United States. The company is one of the few information technology companies with a continuous history dating back to the 19th century. IBM manufactures and sells computer hardware and software (with a focus on the latter), and offers infrastructure services, hosting services, and consulting services in areas ranging from mainframe computers to nanotechnology. Ginni Rometty is the president and CEO of IBM. IBM has been...
> To reduce the cash drain, the struggling Dayton Scale Division (the food services equipment business) was sold in 1933 to Hobart Manufacturing for stock
 
That's pretty nifty. I've used a Hobart back when I was in meat cutting.
Never would have believed IBM made food service equipment.
 
They started off with all sorts of productivity machines....
which lead to time-tracking machinery.....
which lead to people clocking in and out with 'cards'....
which became be beginning of punch-cards.
and people still punch in and out of work.
 
and people still punch at work.
**FTFY**
 
3:34 AM
This machine, referenced in the history article above, is just downstairs from me at work....
 
o.O
 
Move the dial to your employee number, press the lever... clock in... ;_)
 
What happened if you had more employees than the wheel?
 
^^ Make another wheel?
 
^^^ that
That wheel contains more than 100 numbers too.... which, in the 30's, was a lot.
Remember, the world population has more than tripled since then too.
back then, 1927, population was 2BIl, now it's > 7 bil.
 
3:42 AM
"128 employees should be enough for anyone"
4
 
Yeah, now, look at it, IBM employs about 450,000 people world-wide.
 
That's a pretty big wheel.
4
 
Talking wheels, now they have to go and do this with tracking work hours:
 
that looks like fun
or maybe I'm just a human-sized hamster
 
Take it one step further? virtusphere.com
 
3:47 AM
Does the wheel power the computer?
(surely not)
I shall go smoke an underscore a dollar sign tobacco.
 
4:13 AM
^^ that
 
4:38 AM
So I just added the description for the metalsmith tag ... for the second time. What happened to the first one? I think the tag got dropped.
 
ARGH. This music is so badly put together.
 
@Phrancis Have you tried ear plugs? Seriously though ... what do you do with music that you are subjected to this horror?
 
Get paid to fix it... :(
Never had one this bad though...
Anyways, back to it, I guess.
 
5:01 AM
If you can't even live up to General MIDI... you need to get out of the music production business...
2
Done complaining, I promise :)
 
 
1 hour later…
6:01 AM
i asked a question how to add new tags
5
Q: How to add new tags to Code Review?

Govind Singh NagarkotiI see that there are not so many tags, and the available tags are not comparing all the technologies. For example, there is no tag for play-framework, ejjaberd and of course many others as well.

where rolfl answered
that
playframework is just mvc in a specific language
 
0
Q: my sql natural search and like search

Govind Singh Nagarkotii have written two query for searching. but want to simplified them. i think some simplification is needed in this scala function is needed. def searching(term: String): List[String] = { DB.withConnection { implicit c => var list = List[String]() val pinfo = SQL("SELECT body FROM...

 
In general, language tags are good, but specific features of languages are bad, unless those features relate to broad concepts, like MVC, OOP, etc. so there are 'concept tags' that, when combined with the language, are useful...
but today i see that playframework tag is already created
 
@GovindSinghNagarkoti looks like this should be subject to purging.
accordingly I will replace all instances of with where applicable
and cleanse complete, there is no more questions tagged
nice spot @GovindSinghNagarkoti
 
6:23 AM
as an aside, what makes different from and what is anyways?
 
6:36 AM
0
Q: Builder for simple observer class. Is it too excessive?

Leonid SemyonovI mean the Builder presented in Effective Java by Joshua Bloch. OnStopScrollingObserverTask is using to detect when scrolling a ScrollView stops. Please criticize my code and tell me is it using Builder for such a simple class is too excessive ? public class OnStopScrollingObserverTask impleme...

 
Monking
 
Monking @skiwi#
 
How are you doing?
 
ermagherd single name aliases is join query of my teacher.
so I am fine, because I try to ignore him as much as possible,.
but if I weren't I'd probably go mad here.
 
Teachers get you crazy, as always
 
6:42 AM
mo,king @all
 
someone more experienced than me wanna go through the new tags section in the tools??
hey @skiwi quick streams api question...
 
sure ^
 
why is collect not playing nice after I mapped my stream?
Arrays.stream(data).map(x -> x * 180 / Math.PI).collect(Collectors.toList());
^^ throws type mismatch..
 
Huh...
That's not enough information ;)
What type is data and what are you trying it to assign to?
 
> The method collect(Supplier<R>, ObjDoubleConsumer<R>, BiConsumer<R,R>) in the type DoubleStream is not applicable for the arguments (Collector<Object,capture#1-of ?,List<Object>>)
 double[] data;
and currently trying to assign to java.util.List<Double> degreeValues
 
6:52 AM
Ah
I see it
primitive streams have no single-argument collect method
 
let me guess...
 
Arrays.stream(data).map(x -> x * 180 / Math.PI).boxed().collect(Collectors.toList());
 
ermagherd complications.
 
It's going to end up as a Double either way, so it's no harm
 
so I can't collect it back into a double[] then??
 
6:53 AM
ermagherd java's type system
 
@Vogel612 Hmm, you could do that with replacing .boxed().collect(Collectors.toList()) with toArray()
 
@skiwi cool! thanks much ;)
 
no problemo
 
7:06 AM
monking
 
Monking @Christoph
 
7:35 AM
hmmm maybe Ima put some java stuff up for review...
 
Since I woke up today I want to play quidditch
I have no idea why
 
0
Q: Implementing an open/close function in prolog

MhmdI'm going through the Adventure in prolog, tutorial. And I'm trying to implement an open/close rule for each of the doors I have. Add an open/closed status for each of the doors. Write open and close predicates that do the obvious :- dynamic here/1, location/2, have/1, turned_on/1, turned_o...

 
7:54 AM
thank you access,....
you are ruining my day with your cryptically useless error message...
 
0
Q: Panagram Solution - Best approach?

Gokul NathI want to check if the given string is a Panagram or not. This is what I've come up with as solution: import java.util.Scanner; public class Panagram { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String inputString = ""; System.o...

0
Q: controller web interface security

programmerjakeI'm designing a web interface to a controller for my school's bell. Are there any security flaws in it's code? Front End: bell-ringer.cgi: #!/bin/bash function unescape { local s="$1" while [ "a$s" != "a" ]; do if [ "a${s:0:1}" == "a%" -a "a`echo "${s:1:2}" | sed '{s/\([0-9a-...

 
SELECT COUNT(artikel_nr), prozent FROM Artikel INNER JOIN MWSTSatz ON Artikel.mwst = MWSTSatz.mwst GROUP BY Artikel.mwst;
SELECT COUNT(artikel_nr), prozent FROM Artikel INNER JOIN MWSTSatz ON Artikel.mwst = MWSTSatz.mwst GROUP BY prozent;
upper query says: "artikel_nr" is not contained in the aggregate function of your join query
and the lower one works...
 
1
Q: Generating DOM from a complex strings via arrays

SkarvenThis is a revised and expanded version of Transforming complex strings into simple arrays My function grabPerson turns strings of user information from multiple users to "business cards" on my webpage, via an array containing the information needed: Name, username and location. The raw userinfo...

 
8:22 AM
@Vogel612 Maybe it's right... As grouping groups rows together, right?
 
prozent is coming from the MWSTSatz table..
and that is joined on mwst..
so there shouldn't be an actual difference depending on what you're grouping by..
 
Then blame MS Access
 
exactly.
 
@Vogel612 By any chance can the prozent column be contained in the Artikel tables columns ?
 
@Heslacher ?? no...
well it would map perfectly via the mwst relationship,...
but it's not in the table..
not that I'd need it,.
 
8:33 AM
you could try a GROUP BY MWSTSatz.prozent
Forget it ( ' the lower works ' ). One should be able to read :-(
 
@Heslacher prozent is MWSTSatz.prozent.
 
9:06 AM
Love this explanation...
"This is probably not going to end up in a deadlock..."
 
c++: Can I specialize a template<typename ...> using type = typeT<...>?
 
Sorry @Christoph I'm of no help with C++ here...
God... There is JAVA written on the lecture slides
 
@skiwi thanks anyway!
 
9:24 AM
@Christoph also java here so sorry
 
0
Q: Bash script creating hybridiso genereates "unexpected end of file"

Markus LindbergI've created a simple bash script that creates an hybrid iso. But when I try to run it I get the output: hybridiso.sh: line 58: syntax error: unexpected end of file I've checked the script and tried to makes changes to it but I still get the same output. What's wrong with the script? #!/bin/bash...

 
the compiler answered my question pretty clearly
 
10:01 AM
0
Q: CSS Refactoring - Can we have a less "divitis" case here?

MEMI've been given a task to create elements with some special corners, and those elements should be responsive. I came up with this: This works, but I clearly notice a lot of duplication, and serious "divitis" case. I wish NOT to use any css compressor, I prefer the more readable pure and simp...

 
10:21 AM
@EliasVanOotegem Hello sir
In your link you provided you say you find most wrappers "pointless", but I can't say this wrapper is pointless, because it's purpose is to combine PDO with PDOStatement so that methods can be chained and one-lined instead of defining variables and having multiple lines of code do what this object does in one.
Just because it handles statements internally I wouldn't say there is no safe way to return the statement, here is the getStmt() function
    public function getStmt(){
		// Use tmp variable, otherwise stmt is sent by reference
		$tmp = $this->stmt;
		$this->stmt = null;
		return $tmp;
	}
then what you describe in the comments would be written like
$x = $db->prepare('<fetch from x>')->getStmt();
process($x);
$y = $db->prepare('<insert into Y>')->execute();
where $x is an instance of \PDOStatement
And apologies, I don't know how to format code in chat
 
10:39 AM
0
Q: Is there a better way to have my class return a single instance or list?

user2078938I'd like the following to happen: var person = new Person(); // Create instance of new person with Id 0 var person1 = new Person(1); // Creates instance of existing person from database var list = new Person().List(); // Creates instance of all persons from database I'm sue there's a better wa...

 
10:58 AM
@php_nub_qq could you drop me a link, so I can participate in discussion?
nvm found it...
@php_nub_qq Consider that PDO is already an abstraction around database handling.
 
@Vogel612 the discussion occurred here but is not essentially connected to the question.
 
0
Q: How should I write function to print a singly linked list in a reverse order?

user3371223I am preparing for interview and I want to write the function in the way that the interviewers will expect me to write. This is my solution: private static void printReverse(ListNode l1){ if(l1 != null){ printReverse(l1.next); System.out.print(l1.val + " "); ...

 
the problem begins with the fact that all abstractions are leaky
 
I'm not really very familiar with how things work under the hood
 
and the good thing with abstractions is: for the 99,9% of daily development, that's just fine
the problem is, when you get an error in the "Stuff under the hood"
 
11:02 AM
generally if it makes sense and presents ease I don't see why it shouldn't be used
 
and you don't know where it comes from...
 
If I have to be honest, in my 5 year experience as a programmer, if I can call myself that, I have never gotten such an error
should knock on wood I guess
 
what makes: $db->prepare("SELECT column FROM table WHERE ?")->execute({ $value });
better than:
 PDO->prepare("SELECT column FROM table WHERE ?")->setParameter($value)->execute();
??
the abstraction does not add enough abstraction to make sense, you are making too much fuss around a few utility helpers...
If I understand Elias correctly, the problem is not the builder itself, but that it's a wrapper..
 
It is essentially the same thing, I guess.
 
no it isn't.
because you're ad 1) adding complexity
and ad 2) miss the point of an abstraction
repetetive tasks on the same abstraction-layer should be moved to utility functions
and not add a thin wrapper around something already working..
--> Instead somehting like: $helper->prepareAndExecuteStatement($db, $sql, $values);
would have been better.
 
11:09 AM
But I believe that you couldn't write something like PDO->prepare(SQL)->bindParam($value)->execute();
If this was possible I wouldn't have built the wrapper at the time
 
@php_nub_qq that's because I try to stay away from php..
the problem is, your wrapper is not a good one.
 
the whole purpose of this wrapper was for this chaining to be available. If it were possible already I wouldn't be bothered by creating wrappers
 
chaining is overvalued...
if you can hide the whole mess behind a function why make the chaining??
 
because it gives more flexibility
from the wrapper I can call all functions of PDO and PDOStatement
from the helper i have to define functions for every action i want to perform
Hold on I'll test this and see what comes out because I really don't remember
 
btw. if I read the docs correctly just the execute() can't be chained into that...
 
11:16 AM
Yes, all PDOStatement functions do not return the object itself
So if there were no parameters to bind actually
$db->prepare('SELECT * FROM users')->execute()->fetchAll()
this is not possible as well because execute() returns boolean
 
@RubberDuck Thanks, Duck!
 
One year older .... hehehe
 
0
Q: Reading large file, splitting by new line

MumfI am reading a ~120 MB log file (~300 Million lines of text). ... 30/05/2014 15:07:18 0000030-0000738 Net SourceID 11000006 30/05/2014 15:07:18 0000030-0000738 Communication RouteID 108 30/05/2014 15:07:40 0000030-0000739 Communication RouteID Selected 108 ... Each line is created programatic...

 
@php_nub_qq well what's the problem with a helper then??
 
@rolfl I'll remember that "hehehe" when it's your birthday ;)
 
11:25 AM
public function prepareAndExecuteStatement($pdoContext, $sql, $values)
{
    $statement = $pdoContext->prepare($sql);
    foreach ($value in $values) //syntax questionable
    {
          $statement->bindParameter($value);
    }
    $results = $statement->execute();
    return $results->fetchAll();
}
 
@Vogel612 because that is just for, as it says, prepare and execute. What if I want to get the number of affected rows? Or the last insert ID? Or anything else.
Infact getting the insert id is quite impossible with the helper you suggest unless I create a separate function implementing the whole process of preparing and executing
 
@php_nub_qq last insert id???
$sql = "SELECT TOP 1 id FROM table ORDER BY id DESC";
if you want the number of affected rows return the executed statement instead..
 
Sir what you're saying is silly
 
tailor your helpers to your needs.
--> If you don't need stuff, there's no need to consider it
 
Well yes, that is what I'm essentially doing with my wrapper
 
11:34 AM
no it isn't
 
which is actually a helper in my eyes I don't see why you call it wrapper
 
I think there is a divergence of understanding here.
 
A helper uses stuff already given to him, a wrapper hides what he's working on.
 
is a question about code optimization and/or switching from floating point to fixed point on topic here? the function is ready and works, I "only" need to make it sensibly faster.
 
@Federico questions about improving performance are fine, as long as your code does what it should.
 
11:37 AM
...but....
 
keep in mind you may get answers on anything else, too
 
asking for us to rewrite your code in fixed point is not on topic.
 
@Vogel612 yes it does, you can check my answer to my question here: stackoverflow.com/questions/25976656/…
@rolfl not asking you to rewrite it for me, but to hint me on how to do it?
 
So, you don't want a review of the code as it is, you want advice on how to rewrite it?
 
@Vogel612 so let me get this straight. You're telling me that it is not ok to have the absolute flexibility I have now with my object, which uses PDO and PDOStatement internally to do it's work. And I would be better off by creating another object called Helper, which would do it's job by using PDO and PDOStatement given to it from outside, where I have to define every single possible action I am going to ever need?
 
11:39 AM
@rolfl you can also review it, but I do not guarantee that I will be able to follow the indications given, as the requirements are pretty strict in term of syntax.
 
@php_nub_qq the latter assumption is incorrect
@php_nub_qq additionally there is no "absolute flexibility" and you're breaking the abstraction too strongly..
from what I understand, your wrapper allows calls like: $db->execute()->prepare($sql);
 
I don't understand, what do you mean I'm breaking the abstraction?
 
and that's ... let's say suboptimal
 
@Vogel612 I see. would it be better on programmers, then?
 
Well, practically it does, but it makes no sense for anyone to be making such calls?
 
11:41 AM
@Federico - I suspect that your question is going to be on the wrong side of the off-topic line. It sounds like your requirement is that you need fixed-point processing of your problem, and your code is not doing that (yet).
 
@Federico not you ;)....
@php_nub_qq that's beside the point here
sure it's not making sense. and that's why your wrapper is problematic
you are trying to shoehorn a database and a statement into a single class
 
@Vogel612 / @php_nub_qq - your conversation has become long and cluttersome on this chat room, can I suggest you create a new room?
 
and that will break stuff.
 
I can move the conversation there is you want.
 
@rolfl nice suggestion, but I think my point is clear like this....
 
11:43 AM
@rolfl No need, I'm going to make one final statement and I have to go.
 
@rolfl I see thanks. I will ask if it is on topic on programmers.
 
no problem. i know it sounds.... marginal, but a review of your current code that does not solve it in fixed-point will not satisfy what you want.
 
@rolfl not completely, you are right.
 
I think it's not the wrapper's problem when the programmer doesn't know how to use it. Practically a gun is problematic because a person can use it for bad purposes, or related to the topic - incorrectly. When this wrapper poses no security issues and presents ease of usage to the programmer, and also cleanness and clearness of the code ( When used properly ), I would prefer sticking by it, rather than creating complex helpers with functions that are really just one big mess.
@Vogel612 thank you the conversation as I have learned a lot.
 
@php_nub_qq your decision ;) And I also learned some stuff again ..
 
12:00 PM
@php_nub_qq: sorry, I was out to lunch
 
that is normally quite helpful here
 
Greetings, Programs.
 
Greetings DataMan
 
12:15 PM
Greetings
 
0
Q: What is the best way to write this block of javascript code as a class?

JimI have a block of code that checks to see if a check box is checked or not, and assigns a value to a variable for saving to a MySQL table. There are approximately 8 of these boxes. here is the javascript: if ($("#amOld").is(":checked")) { var amOldGuide=1; } else { var amOldGuide=0; } ...

0
Q: Determining the value of a position on an array based on its nearest datapoint known value in Python

DatamanI was wondering what would be the efficient way to determine the value of a position on an array based on its nearest datapoint known value in Python? Problem description: There are datapoints in an array which are 1000 units apart and their values are known (see the figure). However, there are ...

0
Q: Best practice-creating a good PDO connection

Shyam MohanI have this code for updating time of login failure.The other parts of the code are stripped and simplified because my question is related to PDO.Here I have a db_config.php and a function to update time.I want to know is this a best practice for PDO connection and accessing variables in a func...

 
17 mins ago, by rolfl
Greetings DataMan
 
Morning!
 
Am I precognitive?
Hey TopinFrassi
 
12:46 PM
@rolfl nah, you just like to play god ;)
 
Joining Morgan Freeman and George Burns.
 
1:04 PM
Can someone enlighten me as to why addConstraintViolation() has no parameters???
or why the javadocs state that the only proposed method is deprecated and all the replacements aren't available??
btw. ignore the rubberducking..
2
 
I should use auto formatting more...
@Vogel612 Everyone needs rubber ducks
wtf...
> Controller is already defined in this compilation unit
I named my own controller Controller and attempted to import spring's Controller...
 
0
Q: Merging totals from rows with duplicate IDs

TomI have the following query which updates the quantity when there are duplicate items and users (there should only ever be 2 duplicates), then deletes the row which doesn't get updated... UPDATE cart_items t JOIN ( SELECT MinID, b.itemQuantity LatestName FROM cart_items b JOIN ( ...

 
AAAAAARGH!!!!
> NoSuchMethodException
and eclipse keeps silent...
 
1:25 PM
@Donald.McLean Jim Carrey
 
@Vogel612 Quack.
 
@RubberDuck sorry... BLAM!
3
 
0
Q: Tracking current during iteration

Stas KurilinI have a list of posts. I need to generate it each one by one. For generation each post I need to know about other posts. However, I want to make current post to be marked. I come up with next solution. def generate(posts): print(posts) #faking generation def marked_active_post(orig_posts, ...

0
Q: any ideas on how i can generalise this code

user3327637i have this code and i want to generalize it and make it efficient. Each time i generate a number of random variables and i put it in the m equation to generate m. can i get any help to simplify this code till m[20] m[0]=0 x=rnorm(1,0,1) m[1]=max(0,x[1]-0.2+m[0]) x=rnorm(2,0,1) m[2]=max(0,x[2]-0...

0
Q: New programmer writing crappy Swift code. Can't find bug

Gonzo LoopbackI am working on a project called neoCode that takes a users input URL and turns it into HTML or Machine Code. I am so close to pushing this to TestFlight for beta Testing but I have a pretty bad bug that I can't figure out. I have only been programming for 3 months so this entire process is new...

 
1:42 PM
Monking!
 
Monking @Phrancis
 
@CaptainObvious is this Swift code broken or not?
 
@Phrancis Where's @nhgrif when you need him?
 
wonderful....
do we by any chance have a professional maven user here?
 
@Vogel612 I'm an unprofessional Maven user
but might be pilled away in a few mins
 
1:48 PM
why in god's name is the compile time dependency using version 1.1.0-Final overwritten by the same dependency using version 1.0.0-GA-Final which was specified in a BOM at the other end of the world?
especially only in the runtime pool
 
That I don't know, ask @SimonAndréForsberg :)
 
Maven?
 
Tip: Don't ask @rolfl for advice! (about Maven)
 
@skiwi thanks for the edit ;)
 
You know, maven makes life so much easier, it just works.
2
 
1:50 PM
@rolfl no it doesn't...
 
People keep telling me it does...... and that it is my fault that my experience with it is..... troubled.
 
because I need to have the great happiness of importing javax.validation.validation-api1.1.0-Final.jar....
 
For an issue I am having, I found example 1 (ONE) hit via Google, dated from October 2006... great
 
@skiwi ohhhh mail-archive!
 
@Vogel612 - in case you were wondering......:
 
1:51 PM
damn that was 2006??
 
I'm trying to figure out what Axis2 version they use on the other end...
 
Jun 3 at 17:19, by rolfl
@skiwi - there have been very few things I have tried in life, and truly grown to hate. Maven is one of those though.
 
@rolfl seems we're becoming at least 2 people that are similar in that respect...
 
Can you not overwrite the used dependency somehow?
 
Sure you can.... use ant!
 
1:53 PM
but hey it might be a dumb idea to import JEE defined dependencies into a running application server providing the older version...
jboss 7 uses JSR303-BeanValidation in version 1.0
and I could use a hint on using a 1.1 feature for adding a node.
 
build + deployment are mostly fine..
documentation?? no, tests??? no....
comprehension??????? maven just adds to the confusion..
 
oh mine god, just saw one of the worst cases on zk forum. mixing mvc and mvvm, declaring the class as controller and multiple times as viemodel in one gui page :s
 
No idea what that means, but it feels dirty.
 

« first day (507 days earlier)      last day (3509 days later) »