Stack Overflow Weekly Newsletter
Stack Overflow Weekly Newsletter

Top new questions this week:

Varargs Java Ambiguous Call

I'm a little confused about Java's varargs methods: public static int sum(int ...a) { return 0; } public static double sum(double ...a) { return 0.0; } When I tried to invoke sum() without ...

java methods method-overloading varargs  
asked by karim 46 votes
answered by Marko Topolnik 37 votes

Are search engines going to see my dynamically created content in Bootstrap tabs?

I have a page index.php with 3 Bootstrap tabs in it, and for each tab I am generating its content after user clicks on it. For example: when page is loaded I will execute SQL query that will get ...

javascript twitter-bootstrap tabs seo search-engine  
asked by offline 42 votes
answered by methode 82 votes

Why are explicit lifetimes needed in Rust?

I'm reading the lifetimes chapter of the Rust book, and I came across this example for a named/explicit lifetime: struct Foo<'a> { x: &'a i32, } fn main() { let x; ...

pointers rust static-analysis lifetime  
asked by jco 41 votes
answered by Shepmaster 46 votes

Creating "classes" in C, on the stack vs the heap?

Whenever I see a C "class" (any struct that is meant to be used by accessing functions that take a pointer to it as the first argument) I see them implemented like this: typedef struct { int ...

c struct stack heap  
asked by Therhang 29 votes
answered by srdjan.veljkovic 38 votes

Is it safe to use the argv pointer globally?

Is it safe to use the argv pointer globally? Or is there a circumstance where it may become invalid? i.e: Is this code safe? char **largs; void function_1() { printf("Argument 1: ...

c argv  
asked by Steve Dell 26 votes
answered by TartanLlama 33 votes

K&R Exercise 1-9: output the input, replacing multiple blanks by a single blank

I've been working through some books on C trying to get my C legs (sea-legs! Get it?!). I've just finished exercise 1-9 from the K&R book, which for reference is to "write a program to copy its ...

c kernighan-and-ritchie  
asked by slaxx 26 votes
answered by shekhar suman 30 votes

Strange behavior of Enumerator.MoveNext()

Could someone explain why this code is running in infinity loop? Why MoveNext() return true always? var x = new { TempList = new List<int> { 1, 3, 6, 9 }.GetEnumerator() }; while ...

c#  
asked by Chase 26 votes
answered by Jon Skeet 35 votes

Greatest hits from previous weeks:

How can I make a redirect page using jQuery?

How can I redirect the user from one page to another using jQuery?

javascript jquery redirect  
asked by venkatachalam 3847 votes
answered by Ryan McGeary 6937 votes

Error message "Forbidden You don't have permission to access / on this server"

I have configured my Apache by myself and have tried to load phpMyAdmin on a virtual host, but I received: 403 Forbidden You don't have permission to access / on this server My httpd.conf # # ...

apache configuration httpd.conf http-status-code-403  
asked by Dmytro Zarezenko 207 votes
answered by Ahmad 260 votes

Can you answer these?

CSStickyHeaderFlowLayout Header Frame

EDIT: I have create a very small app that represents perfectly the problem. https://drive.google.com/file/d/0B6sI4Feh1HJUb3pGa2pBUmY4QW8/view?usp=sharing In the sample app, we just need to scroll ...

ios ipad uicollectionview uicollectionviewlayout  
asked by Marc-Alexandre Bérubé 6 votes

Haskell threads heap overflow despite only 22Mb total memory usage?

I am trying to parallelize a ray-tracer. This means I have a very long list of small computations. The vanilla program runs on a specific scene in 67.98 seconds and 13 MB of total memory use and 99.2% ...

haskell parallel-processing raytracing  
asked by Justin Raymond 15 votes

How to avoid ambiguous conversion chains with multiple Type Class relationships?

In my library, I have three type classes: trait Monoid[T] { val zero : T def sum(x : T, y : T) : T } trait AbelianGroup[T] extends Monoid[T] { def inverse(x : T) : T def difference(x : T, y ...

scala typeclass context-bound  
asked by Nimrand 5 votes
Subscribe to more Stack Exchange newsletters


Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on stackexchange.com.

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all stackexchange.com emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3