Hey,
Im wondering, how can i get a SUM of a rating entity i get from the datastore (python)?
should i:
ratingsum = 0
for rating in ratings:
ratingsum + rating
print ratingsum
?
Hey all,
Simply my question is about defining the type of an instance in run time, and this type is user-defined.
Something which looks like this:
Type instance1;
In run time, the user is going to choose for example "int", then there 'll be,
int instance1;
Any suggestions?? is downCasting efficient here?
hey guys
im wondering if i can delete all my website's cookies when user click on logout
because i used this as function to delete cookie but its not functioning properly
setcookie("user",false);
is there a way to delete one domain's cookies in php ?!
hey,
tryingto run
shutdown.exe -l -t 10
only showed shutdown help manual.
I thought of unekegant but working solution of
ping -n 10 localhost
shutdown.exe -l
How wasty is is that solution?
I thought of downloading sleep.exe, but I want my bat file to work on machine with no previuse preperations.
any more ideas?
Thanks
hey i got 9 type on my web. i have to set different keywords each type. with this script;
if ($type = movie) {
$yazdir = "DVDRip, DVDScr";
}
elseif ($type = game) {
$yazdir = "Full Version, Patch";
}
i can write keywords for two type. how to repeat this correctly for other types? (echo paramether must be $yazdir)
Hey,
Lets say I have a table Y with column X.
There is one row of "X" with the string "abcdefg", and another row with "qwerty".
Can I make a SELECT query in sqlite to choose the row which contains the substring "abcd" ?
Thanks in advance.
Hey,
I've been reading the documentation, but this is appears to be impossible. Does anyone know how to search the favorites of a user, using the youtube search api?
Pretty much we'll have a user favoriting videos, and we want to be able to use the youtube search api, to search only on those videos.
/thanks
Hey,
Don't find any good answer to this simple question about helper/utils classes:
Why would i create a singleton (stateless) rather than static methods?
Why an object instance could be needed while the object has no state?
Sometimes i really don't know what to use...
Hey guys,
If I have an array structured like this:
$array[index]['first_name']
$array[index]['last_name']
Is there an easy way to implode it into something like first_name last_name,first_name last_name, etc. for all the indices?
Implode didn't seem to do what I wanted for something like this. Currently I'm just looping over the whole thing, but it's a SIGNIFICANT bottleneck.
Hey there
I'm working on a browser-game and I can't help but wonder about what's the lightest way to make the grid/board on which the game takes place.
Right now, as a mere sample, I'll show you this:
http://sotkra.com/game/
Now, as the grid gets bigger and bigger, the table and its td's create a very heavy filepage which in turn...sucks in more resources from the browser engine and computer.
So, is a table with td's the most lightweight way to craft a huge grid-like board or is there something lighter that you recommend?
Cheers
Sotkra
Hey guys, I currently present my mp3s by referencing their file location into a flash mp3 player for the users. Is is possible for users/bots to go onto your site and somehow execute an mp3 continuously and drain bandwidth? If so how can you prevent this? (I program in php). Thanks in advance for any advice.
Hey guys i have done a game in cocos2d.And now i am stuck
.i have a menu scene and a game scene.
In menu scene i have a button named "Play Game".
when i press this button game starts perfectly after game over i have a button named "Go back to main menu" that is used to take back to main menu scene now after game over when i click "PlayGame" button game does not perform any action and get freeze.
please please help me guys i will be really thankful to you.
Hey all,
I'm trying to have the following tag toggle between a "-" and the checkmark character (✓)
<a id='p_4' class='fancy_button orange bls_button' href='#'>-</a>
And here's the jquery code:
if (button.text() == '-') {
button.html('✓'); }
This works in FF3.6 and IE8, but not in WebKit (Chrome or iPhone safari).
Is there something I'm doing wrong, or does webkit just not like .html("✓")
Thanks,
Sam
hey guys
i wonder what does @ means when we use it before include or require in php ?!
such as :
@include('block.php');
maybe its a noob question , but i need to know it guys ?!
so sorry for that
Hey
I have a data layer which is returning lists of classes containing data. I want to display this data in my form in WPF. The data is just properties on the class such as Class.ID, Class.Name, Class.Description (for the sake of example)
How can i create a custom control or template an existing control so that it can be given one of these classes and display its data in a data-bound fashion.
Thanks :)
Hey guys
I'm trying to use a RegularexpressionValidator to match an IP address (with possible wildcards) for an IP filtering system.
I'm using the following Regex:
"([0-9]{1,3}\\.|\\*\\.){3}([0-9]{1,3}|\\*){1}"
Which works fine when running it in LINQPad with Regex.Matches, but doesn't seem to work when I'm using the validator.
Does anyone have a suggestion as to either a better Regex or why it would work in test but not in situ?
Cheers, Ed
Hey,
I was wondering, what was a good cross-platform utility for doing audio recording/ playback/ seeking in C++? I was thinking going the route of ALUT (OpenAL), but is there a better way? If not, do you guys know of any good tutorials/sample code for ALUT?
Hey.. my question is how to prevent someone upload a virus or some malicious code with the extension you pretend for example i have a pdf file uploader, anyone can upload a binary with pdf camouflage there are lots of programs to do that.
What is the necessity of both prefix and postfix increment operators? Is not one enough?
To the point, there exists like a similar while/do-while necessity problem, yet, there in no so much confusion (in understanding and usage) in having them, but with having both prefix and postfix (like priority of these operators, their association, usage, working).
And do anyone been through a situation where you saidd "Hey, I am going to use postfix increment. Its useful here"
hey all,
my site started dragging lately, the queries taking exceptionally longer than I would expect with properly tuned indexes. I just restarted the mysql server after 31 days uptime and every query is now substantially faster and the whole site renders 3-4 times faster.
Would there be anything that jumps out at you as to why this may have been? Improper settings on my.cnf perhaps? Any ideas as to what I can start looking at to try and pinpoint why?
thanks
Hey all,
I'm trying to make an mp3 player that passes javascript events to a flash file. I'm not very saavy in flash so this may be a simple question.. but how do you make a "movie-less" flash file? Is it possible to just embed an actionscript file? Because that is really all I need to run. Side note: What is the easiest (and fastest) way to pass params to actionscript using javascript?
Thanks,
Matt Mueller
Hey everyone,
I have an ASP.NET MVC 2 project that I'm working on and I'm wondering where I should place some of my code.
I currently have a UsersModel which consists of a bunch of static methods that operate against my data context.
These methods include such things as: UserExistsInDatabase, UserIsRegisteredForActivity, GetUserIdFromFacebookId etc etc.
Should these methods be inside a UsersModel class or would they be more suited to a user helper class outside of the models context?
Cheers for any pointers.
hey everyone
i have an access 2007 database where i have 2 tables one is exp_cash and exp_cheque each are link to exp_cat, where exp_cat contains categories list where exp_cash contains id,cat_id,exp_date,exp_amount,exp_note same thing in exp_cheque where when i came to combine them nothing in result unless i remove the cat_name from my query i used a simple query which is
SELECT DISTINCT exp_cat.cat_name, exp_cash.exp_amount, exp_cheque.exp_amount
FROM (exp_cat INNER JOIN exp_cash ON exp_cat.ID = exp_cash.exp_cat_id) INNER JOIN exp_cheque ON exp_cat.ID = exp_cheque.exp_cat_id;