I got tired to put the code in SO. The fur indentations I made is not working.For example I am posting below line with four spaces forth and the back.
print("Haihello");
I plan on using a scrollbar for, well, scrolling an image. The image is 200x500, however, the only visible area is 200x250.
So I set the max value to 250, and the min value to 0. The idea is that if I drag the scrollbar's button to the bottom, 250 pixels will have moved for the image, right?
But wait, the scrollbar's button is.... very small. And the scrollbar is actually pretty long. Is there a way to make the scrollbar's button longer?
Hi!
I gotta say that this site is really great because it helped me a lot at my job. I'm mostly the one asking the questions rather than answering it.
Now I'd like to know what's your motivation to help others of whom you only know their nicknames?
Because contrary to other communities on the Internet, this site lacks things like a message board where you can talk about all things in life or a function for private messaging. And in my opinion these two things normally help in building kind of a "social" environment.
Also stackoverflow has probably lot's of users and is therefore not that tight-knitted.
Maybe you can share some your thoughts with me.
What is the total number of software developers in the world?
And to respond to the inevitable "How do you define a software developer?" -- I'll answer two ways:
Define it as "Anyone who writes code to make a computer do something he wants done".
Define it however you like and then answer the question
References to studies or more authoritative sources of information would be greatly appreciated.
Hi,
I'm just wondering should I use std::size_t for loops and stuff instead of int?
For instance:
#include <cstdint
int main()
{
for (std::size_t i = 0; i < 10; ++i)
// std::size_t OK here? Or should I use, say, unsigned int instead?
}
In general, what is the the best practice regarding when to use std::size_t?
This is a general question of sorts, but do you think that it's important to offer text resizing tools on a website, which in essense only effect text as it seems that most browsers offer text resising or more commonly zooming?
All,
I am auditing my JEE application with JBoss Evers and the nature of my application causes the audit table to grow very fast. The historic data is queried infrequently and access time is not really an issue, apart from the data from the last week. This data IS queried frequently and access needs to be fast. Ideally, I would split the data and distribute it over two tables, with the older data in compressed format.
Unfortunately, Envers does not allow spreading data over multiple tables as far as I can tell from the docs.
Does somebody have any idea what would be the best way to achieve this (if possible while still using Envers)?
Cheers,
LeChe
I'm writing a program that needs to have unsigned types with definite sizes. I need a uint8, uint16, uint32, and uint64, and I need them defined in types.h, in a way that they will always be defined correctly regardless of platform.
My question is, how can I check the sizes of different types on each platform using preprocessor macros, so that I can define my custom types correctly in the types.h header?
What's the fastest way to count the number of keys/properties of an object? It it possible to do this without iterating over the object? i.e. without doing
var count = 0;
for (k in myobj) if (myobj.hasOwnProperty(k)) count++;
Firefox provides a magic __count__ property, but this isn't available in other implementations.
I have a java applet and the only look and feel that works properly is the native mac one. I wanted to make the fonts a bit larger and tried using the standard UIManager methods
UIManager.put("Label.font", new Font("Georgia", Font.PLAIN, 18));
This produces no change. It does not throw an exception, of course.
Does anyone know if the native mac look and feel ignores these?
I know there are specific ways to make controls different sizes on mac but these only seem to make them smaller. You cannot make the controls larger than regular.
Hi,
I am developing (using Silvelight 3) an aplication that creates some kind of timeline and places objects on it. For this purpose I need a really large Canvas (up to 2000000 pixels width) with long lines on it, but whenever I create Canvas even 40000 pixels width it behaves very strangely, randomly disappearing.
I have found a post with the description of the exactly same problem on silverlight forums and another one here on the stackoverflow. It seems that is a known problem since silverlight 2, but I can't find any good workaround. Does anybody know such workaround or can check is it still an issue in Silverlight 4?
Thanks in advance.
I have activities A and B. The A is the one with LAUNCHER intent-filter (i.e. the activity that is started when we click the app icon on home screen).
A launches B using startActivity(new Intent(A.this, B.class)).
When the user has the B activity open, and then put my application into the background, and later my application's process is killed, when the user starts my application again, B is opened instead of A.
This caused a force close in my app, because A is the activity that initializes the resources my app needs, and when B tried to access the uninitialized resources, B crashes.
Do you have any suggestions what should I do in this situation?
hi everyone.
I have some very annoying trouble with jboss.
I'm developing simple web-app using richfaces and I'm facing the problem that when I deploy and run application in browser jboss shows just following message:
This page contains the following errors:
error on line 12 at column 16: internal error
Below is a rendering of the page up to the first error.
And that's all. No stacktrace! It's so uneasy to search for a source of problem.
Could anyone help me to "turn on" stacktracing?
If I have 2 files each with this:
Hello World (x 1000)
Does that take up more space than 1 file with this:
Hello World (x 2000)
What are the drawbacks of dividing content into multiple smaller files (assuming there's reason to divide them into more files, not like this example)?
Hello,
In your experience, what is the best web programming language used to handle sorting and comparison of very large lists (ie tens of thousands of email addresses)?
I am most familiar with PHP. I think that it could get the job done, but I'm unsure of other languages and if there might be a bettor suitor.
Thanks!
Is there a way to find out how much space (on disk) a row in my database takes up?
I would love to see it for SQL Server CE, but failing that SQL Server 2008 works (I am storing about the same data in both).
The reason I ask is that I have a Image column in my SQL Server CE db (it is a varbinary[max] in the SQL 2008 db) and I need to know now many rows I can store before I max out the memory on my device.
Say we're writing a simple recursive function fib(n) that calculates the nth Fibonacci number. Now, we want the function to print that nth number. As the same function is being called repeatedly, there has to be a condition that allows only the root call to print. The question is: how to write this condition without passing any additional arguments, or using global/static variables.
So, we're dealing with something like this:
int fib(int n) {
if(n <= 0) return 0;
int fn = 1;
if(n > 2) fn = fib(n-2) + fib(n-1);
if(???) cout << fn << endl;
return fn;
}
int main() {
fib(5);
return 0;
}
I thought that the root call differs from all children by returning to a different caller, namely the main method in this example. I wanted to know whether it is possible to use this property to write the condition and how.
Update: please note that this is a contrived example that only serves to present the idea. This should be clear from the tags. I'm not looking for standard solutions. Thanks.
Is there a way to prevent the UpdateListItems() web service call in SharePoint's Lists.asmx endpoint from returning all of the fields of the newly created or updated list item? In our case an event handler attached to our custom list is adding some rather large field values which are turned to the client unnecessarily.
Is there a way to tell it to only return the ID of the newly created (or updated) list item?
For example, currently the web service returns something like this:
<Results xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<Result ID="1,Update">
<ErrorCode>0x00000000</ErrorCode>
<z:row ows_ID="4" ows_Title="Title"
ows_Modified="2003-06-19 20:31:21"
ows_Created="2003-06-18 10:15:58"
ows_Author="3;#User1_Display_Name"
ows_Editor="7;#User2_Display_Name" ows_owshiddenversion="3"
ows_Attachments="-1"
ows__ModerationStatus="0" ows_LinkTitleNoMenu="Title"
ows_LinkTitle="Title"
ows_SelectTitle="4" ows_Order="400.000000000000"
ows_GUID="{4962F024-BBA5-4A0B-9EC1-641B731ABFED}"
ows_DateColumn="2003-09-04 00:00:00"
ows_NumberColumn="791.00000000000000"
xmlns:z="#RowsetSchema" />
</Result>
...
</Results>
where as I am looking for a trimmed response only containing for example the ows_ID attribute:
<Results xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<Result ID="1,Update">
<ErrorCode>0x00000000</ErrorCode>
<z:row ows_ID="4" />
</Result>
...
</Results>
I have unsuccessfully looked for a resource that documents all of the valid attributes for both the <Batch> and <Method> tags in he updates XmlNode parameter of UpdateListItems() in the hope that I will find a way to specify the fields to return.
A solution for WSS 3.0 would be preferable over an SP 2010-only solution.
I have a ajax asp.net modalpopupextender, I wont when I desplay popup, the popup cover all the browser window.
The popup display a panel ane is inside the form not other container.
My .aspx code is:
< asp:Panel ID="OptionPanel" runat="server" CssClass="mp"
Style="display: block; width:100%; height:100%"
But don't work!!!
Any ideas????
As a result of a conversation with a colleague today, I've been searching (unsuccessfully) for a large'ish list of what technology stacks are being used popular websites and standalone applications today. We're aware of the big ones like Facebook (php/ ), Twitter (scala/cassandra), Youtube (python/?), Digg (php/cassandra), stackoverflow (.net mvc/sqlserver), but we're looking for a more complete list. It would also be interesting to hear about any stats for desktop apps also?
Can anyone help?
I want the list of all functions executed to a certain point in code, somehow like debug_backtrace() but including functions not in the exact thread that leads to where debug_backtrace() is called. e.g :
a();
function a() {
b();
c();
d();
}
function b() { }
function c() { }
function d() { print all_trace(); }
would produce :
a(), b(), c(), d()
and not
a(), d()
like debug_backtrace() would
Hi,
There are many sites providing services similar to SO. For example http://careeroverflow.com/ and http://mathoverflow.net/. Is there some kind of list of ...overflow.com's?
Is size_t only in C++ standard or C standard as well?
I cannot find a C header in the "/usr/include" tree that defines size_t.
If it is not in the C std, is GCC just doing some magic to make things work?
Thanks,
Chenz