I got this error and dont know what could be the cause. Any idea?
Problem at line 2127 character 18: Bad for in variable 'sport'.
for (sport in sugested_sports)
thx alot.
What I must to learn to write php web-site grabber (parser)?
It must collect information from other websites, such as as weather forecast, wiki "on this day", some news and other useful and interesting "every day" information!
what i must to read for writing m3u player on php?
sorry for my bad english
Is it possible to set a default behaviour for custom (non-native) methods/functions in Java?
For example, I would like to change the default "Function" to do a System.out.println("message") whenever called.
So, when a custom method/function is being created:
public String testMethod()
{
//custom code
}
it should execute the newly added default behaviour (in this case the system output), before the custom code is run.
Even if this would be a bad excercise, is it possible? Maybe by extending the function class or something?
Hi,
Sorry, I'm quite new to Java.
I've stumbled across HttpGet and HttpPost which seem to be perfect for my needs, but a little long winded. I have written a rather bad wrapper class, but does anyone know of where to get a better one?
Ideally, I'd be able to do
String response = fetchContent("http://url/", postdata);
where postdata is optional.
Thanks!
I heard a lot of people saying that it is a bad practice to use IoC.Resolve(), but I never heard a good reason why (if it's all about testing than you can just mock the container, and you're done).
now the advantages of using Resolve instead of Constructor Injection is that you don't need to create
classes that have 5 parameters in the constructor, and whenever you are going to create a instance of
that class you're not gonna need to provide it with anything
I am writing a application that monitor the system's health, user should know when they need to defrag the volumes.
What I am thinking is calling the "defrag.exe /A" then analyze the output result to see whether it contains "You do not need to defragment this volume."
But it's slow and very bad, I fount that the "Analyze" is really quick on the MyDefrag.exe.
Anyone could tell me what's the best and simplest way?
I am using Groovy in a Java Swing application as part of my plan to force-feed myself dynamic languages until I like them (which is happening, partly).
My stack traces are filled with Groovy stuff like
org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor
is there a way to get Eclipse to remove all of that codehaus stuff (filter stack traces, basically)?
Edit: I can do this from the command-line with grep (well, not yet) so it's not so bad, but inside of Eclipse would be great too.
The code itself isn't complex, it's just not working properly:
Uri uri = new Uri("https://www.google.com/webmasters/tools/feeds/sites/http%3A%2F%2Fwww.mydomain.co.uk%2F");
WebRequest.Create(uri);
I get a "Bad Request" back from the server, and after much MUCH digging, discovered that the uri is being turned in to "https://www.google.com/webmasters/tools/feeds/sites/http%3A//www.mydomain.co.uk/" which is not what I asked for, and so it's having a whinge
Is there a way to stop this?
If I have a div that acts like a box, and I make it real sexy with 10% opacity. How do I counter it since everything in the div also gets the opacity. Lets say i have a box(div) with a 1px border and text, putting opacity on it will make it look bad and i only want opacity on the background.
Hello,
I want to build a web based admin tools that allow the system admin to run pre-configured commands and scripts through a web page (simple and limited webmin), what is the best approach?
I already started with Ubuntu installing LAMP and give the user www-data root's privileges !!!
as I learned (please check the link) this is a really bad move !!!, so how to build such web-based system without the security risk?
cheers
Have to use free WPF DataGrid (I thought Infragistics libraries are bad, I take it back after this) for this project of mine.
Looks like DataGrid doesnt have clean MVVM Friendly way of getting the list of selectedRows ?
I can data bind to SelectedItem="{Binding SelectedSourceFile}" but this only shows the 1st selected row. Need to be able to get all selected rows.
Any hints to do it cleanly via MVVM ?
Like the title says. I'm sending a simple cUrl cmd from Win7 to CouchDB on my Linux box, and it doesn't work. But if I run the same command in Linux, it works. I'm sending this:
curl -X POST 192.168.2.5:5984/test/testdoc -d '{"owner":{"fname":"test","lname":"ing"}}'
From windows, it keeps giving me a "error: bad request, reason:invalid UTF-8 JSON".
I can run GET commands from windows just fine, I just can't seem to POST to CouchDB.
Hi people,
I am working on a website curently. Here is the link for it.
Good News : The site is fine on FireFox, Chrome and IE 8.
Bad News: It is not fine on IE 7. Alignment problems, hyperlink colour problems, etc.
What should i do to make things normal on IE7 too.
Any amount of help would be appreciated.
Thanks
Hello i'm consfused using the Messenger class of MVVM Light.
I have a ProductsViewModel that can get initialized a number of times.
In the constructor of ProductsViewModel I have this code:
Messenger.Default.Register(this, n = MessageBox.Show(n.Test));
The problem is, if I have 2 instances of ProductsViewModel, then Messenger gets registered twice.
Is is bad to Register the Messenger in a constructor?
Hope this makes sense!
I have always been of the belief that if a method can throw an exception then it is reckless not to protect this call with a meaningful try block.
I just posted 'You should ALWAYS wrap calls that can throw in try, catch blocks.' to this question and was told that it was 'remarkably bad advice' - I'd like to understand why.
Thanks!
I'd like to know if listing a set of partner sites/blogs is useful for the pagerank growth.
Does Google see it as an incorrect act? I read somewhere that if people exchange links, google seeks it and marks as a bad technique.
If it doesn't matter, is the content of the linked site relevant?
I am looking for a system to parallelise a large suite of tests in a Ruby on Rails app (using rspec, cucumber) that works using JRuby. Cucumber is actually not too bad, but the full rSpec suite currently takes nearly 20 minutes to run.
The systems I can find (hydra, parallel-test) look like they use forking, which isn't the ideal solution for the JRuby environment.
Hi guys.
I read about function pointers in C
And everyone said that will make my program run slow.
Is it true?
I made a program to check it.
And I got the same results on both cases. (mesure the time.)
So, is it bad to use fuction pointer?
Thanks in advance.
When I try to pull down a database while at work I get the following error:
:>heroku db:pull
Auto-detected local database: sqlite://db/development.sqlite3
Bad credentials given for http://heroku:[hidden]@taps.heroku.com
Note that when I am at home I am able to run this command just fine. I wanted to know if you have any suggestions for common reasons I would get this error.
Hi,
I want to create a windows service that will create x number of threads that wake up every x number of minutes and do some work.
I think the task scheduling or parallel framework is a bad fit for this type of work as it is best suited for work that starts, completes and finishes rather than is constant.
Should I look at utilising a thread pool for this approach or does anyone have any advice for a good solution?
Thanks
Paul
Hello,
I must warn you, this code will heart your eyes, so please don't judge me, i'm trying to improve the way I handle errors
all my tests are like this :
if ($something < 27)
{
$error_IP= '<div class="error_message">something bad</div> ';
}else{
$erreur_IP='';
}
and here's the ugliest thing :
if( !isset($_POST) || ($erreur_captcha !='') || ($erreur_email !='') || ($erreur_hebergeurVide != '') || ($erreur_paysVide != '') || ($erreur_slotVide != '') || ($erreur_rconVide != '') || ($erreur_tick != '') + a lot more :d )
What do you suggest to me to optimize my errors handling ?
Thank you
I have a pretty complicated index.php now, and I would like to only run it once every hour. What is the best way to achieve this? Some ideas I've had
Put it in APC with apc_store($page, 60*60*) - I feel this isn't what APC is for and will probably be doing something bad to the other parts of my site
Save the output to a filesystem somewhere - Then apache needs write access somewhere which might be a pain
Somehow setup apache to do the caching for me - Is this possible?