Does anyone know or care to speculate why implicit typing is limited to local variables?
var thingy = new Foo();
But why not...
var getFoo() {
return new Foo();
}
I really would like to integrate the Myspace ID platform on my site using PHP, instead of allowing users to sign in to my site anytime with there myspace ID I am planning on just using it 1 time on signup process to allow them to import profile data from there myspace to my network.
I have note been able to find any good example code for doing any kind of myspace integration, has anyone done this and care to share any info on the issue please?
Hi is there a free avaible translation backend with database avaible which can handle multiple users(no login needed), multiple languages (UTF-8) and provides automatic google translation?
I just need this tool to fill a database (preferable mysql) with simple tables like this:
language | label | text
english | _helloworld | Hello World!
german | _helloworld | Hallo Welt!
I don't care about export since this will have to be created anyways..
Thanks it would be a real timesaver if something with an usable UI exists already.
Hello everyone :)
I'm looking for a tool like Bitsum Technologies' excellent PECompact tool for compressing Windows executables, but which works with 64 bit binaries. Does such a tool exist?
Note: I don't care about the supposed obfuscation such a compressor provides; I'd simply like to reduce the size of my binaries.
I have a MS SQL Fulltext Function like this:
(...)
RETURNS TABLE AS RETURN
SELECT * FROM fishes
INNER JOIN CONTAINSTABLE(fishes, *, @keywords, @limit)
AS KEY_TBL ON fishes.id = KEY_TBL.[KEY]
When I use this function in LINQ, it generates a special return type which includes all fields of my "fishes" table, plus Key and Rank.
How could I rewrite above query, or change something in LINQ, to omit Key and Rank and just return my "fishes" results (and to have the fulltext search result objects be of type Fish, which is what I really care about, so I don't have to cast)?
I would like to set the visiblity of columns based upon the value selected in a paramater.
The problem is I do not want a specific paramater to do this (i.e Hide column X True/False)
My report has several diffrent "departments" who are only intrested in certain columns.
What would be the syntax for example to hide the "Sales" column when the "Customer Care" paramater is set?
What regular expression can I use (if any) to validate that a given string is a legal ssh rsa public key?
I only need to validate the actual key - I don't care about the key type the precedes it or the username comment after it.
Ideally, someone will also provide the python code to run the regex validation.
Thanks.
What language do you find incredibly useful that no one else seems to care about? I am not looking for the language with the coolest features, but the language that makes you the most productive. I realize that a productive language that no one uses is a bit of an oxymoron.
My personal choice would probably be ruby without rails, but I am sure others can come up with some better answers.
First: where are std::move and std::forward defined? I know what they do, but I can't find proof that any standard header is required to include them. In gcc44 sometimes std::move is available, and sometimes its not, so a definitive include directive would be useful.
When implementing move semantics, the source is presumably left in an undefined state. Should this state necessarily be a valid state for the object? Obviously, you need to be able to call the object's destructor, and be able to assign to it by whatever means the class exposes. But should other operations be valid? I suppose what I'm asking is, if your class guarantees certain invariants, should you strive to enforce those invariants when the user has said they don't care about them anymore?
Next: when you don't care about move semantics, are there any limitations that would cause a non-const reference to be preferred over an rvalue reference when dealing with function parameters? void function(T&); over void function(T&&); From a caller's perspective, being able to pass functions temporary values is occasionally useful, so it seems as though one should grant that option whenever it is feasible to do so. And rvalue references are themselves lvalues, so you can't inadvertently call a move-constructor instead of a copy-constructor, or something like that. I don't see a downside, but I'm sure there is one.
Which brings me to my final question. You still can not bind temporaries to non-const references. But you can bind them to non-const rvalue references. And you can then pass along that reference as a non-const reference in another function.
void function1(int& r) { r++; }
void function2(int&& r) { function1(r); }
int main() {
function1(5); //bad
function2(5); //good
}
Besides the fact that it doesn't do anything, is there anything wrong with that code? My gut says of course not, since changing rvalue references is kind of the whole point to their existence. And if the passed value is legitimately const, the compiler will catch it and yell at you. But by all appearances, this is a runaround of a mechanism that was presumably put in place for a reason, so I'd just like confirmation that I'm not doing anything foolish.
Hi guys,
I started to use the new ConcurrentDictionary from .Net4 yesterday to implement a simple caching for a threading project.
But I'm wondering what I have to take care of/be careful about when using it?
What have been your experiences using it?
Hi
How can I emded a pdf inside my app? Should i just pass the pdfs file url to a web view and let that take care of it or is there a better way/
Cheers
w://
Because: Core Data owns the life cycle, and it can turn them into a fault at any time today or tomorrow. And probably it won't care much about the retainCount. So I'm curious if retaining managed objects
1) makes any sense
2) or how bad it is, and why it is bad
In SQL, can we always write an inner join statement as a main query and subquery or vice versa if we only want to find the intersection?
For example,
select * from gifts g where g.giftID in (select giftID from sentGifts);
can do a join and show the gifts sent in the sentGifts table, but it won't be able to show the sentTime because that is inside the subquery. But if all we care is to find the intersection, without caring what is being displayed, then we can always convert one to the other?
Is there a way in Java to find the "Last Fired Time" from a Cron Expression.
E.g. If now = 25-Apr-2010 10pm, cron expression "0 15 10 ? * *" (quartz) should return me 25-Apr-2010 10:15am
I do not care if we use standard cron expressions (like Unix and Quartz) or less popular ones if they can fetch me the correct "Last Fired Time"
Hi,
I'm just wondering where in the source files of a linux kernel I would be able to find the code which takes care of copying and pasting? I'm interested in modifying it but don't know where to look to find it.
Thanks
In many places it's recommended that clustered indexes are better utilized when used to select range of rows using BETWEEN statement. When I select joining by foreign key field in such a way that this clustered index is used, I guess, that clusterization should help too because range of rows is being selected even though they all have same clustered key value and BETWEEN is not used.
Considering that I care only about that one select with join and nothing else, am I wrong with my guess ?
I'm looking for a collection that offers list semantics, but also allows array semantics. Say I have a list with the following items:
apple orange carrot pear
then my container array would:
container[0] == apple
container[1] == orangle
container[2] == carrot
Then say I delete the orange element:
container[0] == apple
container[1] == carrot
I don't particularly care if sort order is maintained, I'd just like the array values to function as accelerators to the list items, and I want to collapse gaps in the array without having to do an explicit resizing.
I have seen this image swirl effect on a visual thesaurus.
Is there any open source code for this? Or research paper explaining how they made it.
I don't care about the algorithm to match similar objects. I only am wondering about the effects.
From what i understand they are called recursive orbital diagram.
Screenshot:
google Wonder Wheel
google image swirl
I want to react when somebody shakes the iPhone. I don't particularly care how they shake it, just that it was waved vigorously about for a split second. Does anyone know how to detect this?
I m trying to invoke a URL in C#, I am just interested in invoking, and dont care about response. When i have the following, does it mean that I m invoking the URL?
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
I want to get, via ajax, a collection of data objects and parse them into JS data.
Currently I have 2 choices:
- Server returns valid javascript code and then I eval it.
- Server returns JSON object and then I eval the json object
What is the fastest of these in Firefox? (I only care about the "parsing" performance, not server or data transfer)
Let's say I have programmers and artists working on a project. The artists have some folders they care about:
/Doodles
/Images/Jpgs
And maybe the programmers have a folder like this:
/Code/View/Jpgs
What is the best process in Mercurial to keep the 2 Jpgs folders synced? I have used Vault, where you can have 2 or more files/folders linked in a repository so updating one updates another. Is there a way to do the same thing with Mercurial?
So my question is simple, and I guess it boils down to how anal you want to be about collision detection. To keep things simple, lets assume we're talking about 2D sprites defined by a bounding box. In addition, let's assume that my sprite object has a function to detect collisions like this: S.collidesWith(other); Finally the scene is moving and "walls" in the scene can move, an object may not touch a wall.
So a simple implementation might look like this (psuedo code):
moveWalls();
moveSprite();
foreach(wall as w) {
if(s.collidesWith(w)) {
gameover();
}
}
The problem with this is that if the sprite and wall move towards each other, depending on the circumstances (such as diagonal moment). They may pass though each other (unlikely but could happen).
So I may do this instead.
moveWalls();
foreach(wall as w) {
if(s.collidesWith(w)) {
gameover();
}
}
moveSprite();
foreach(wall as w) {
if(s.collidesWith(w)) {
gameover();
}
}
This takes care of the passing through each other issue, but another rare issue comes up. If they are adjacent to each other (literally the next pixel) and both the wall and the sprite are moving left, then I will get an invalid collision since the wall moves, checks for collision (hit) then the sprite is moved. Which seems unfair. In addition, to that, the redundant collision detection feels very inefficient. I could give the player movement priority alleviating the first issue but it is still checking twice.
moveSprite();
foreach(wall as w) {
if(s.collidesWith(w)) {
gameover();
}
}
moveWalls();
foreach(wall as w) {
if(s.collidesWith(w)) {
gameover();
}
}
Am I simply over thinking this issue, should this just be chalked up to "it'll happen rare enough that no one will care"? Certainly looking at old sprite based games, I often find situations where the collision detection has subtle flaws, but I figure by now we can do better :-P. What are people's thoughts?
var phoneBookTableValue = [];
phoneBookTableValue.push({ "key":"1", "value":["3396,Accounting ,CCH,,,,","1"]});
phoneBookTableValue.push({ "key":"2", "value":["3284,Acute Care ,CCH,,,,","2"]});
phoneBookTableValue.push({ "key":"3", "value":["3265,Acute'Care East ,CCH,,,,","3"]});
When running the javascript file I get the error "missing ] after element list. Can U help me? PLZ!