Hi,
I have a database with only one table as below:
userurltag(id,userID(string),Url(String),tag(String))
I want to delete users that have less than 3 urls associated with them.
How can I do that?
I couldn't find a place to feedback about this so apologies if I shouldn't have post this as a question here.
Would it be possible for the admins of the site to change the links we post in our answers to have their target as _blank. It is quite hard when it is _self as we look at those urls in correlation with what the post is about so I wouldn't want it to replace the post.
hello.
In general (or from your experience), is there difference in performance between for and while loops?
What if they are doubly/triply nested?
Is vectorization (SSE) affected by loop variant in g++ or Intel compilers?
Thank you
For some strange reason when I have nested object intializers it always gets the last '}' wrong. It is not indented at all as shown in the following example:
namespace MyNameSpace
{
internal static class MyClass
{
static MyClass()
{
var bla = new Bla { Name = "Bla" };
bla.Blub = new Blub
{
Name = "Blub",
Blap = new Blap { Name = "Blap", Visible = true },
Blob = new Blob { Name = "Blob" },
Blib = new Blib
{
Blep = new Heater { Name = "Bleb" },
Id = 1,
Blap = new Blap { Name = "Blap" }
} // <---- wrong !!!
};
}
}
}
Any idea what I can do against it ?
As I understand it, the limitation of 255 characters in a file path is a Windows limitation. What is the reasoning for this? If so, has this been resolved in Windows 7?
In our continuous integration practices, we often have deeply nested project structures and it would be extremely useful to be able to go beyond 255 characters. Right now we are somewhat forced to structure our projects in such a way as to not hit this artificial ceiling.
Today I had a coworker suggest I refactor my code to use a label statement to control flow through 2 nested for loops I had created. I've never used them before because personally I think they decrease the readability of a program. I am willing to change my mind about using them if the argument is solid enough however. What are people's opinions on label statements?
When defining nested classes, is it possible to access the "outer" class' methods? I know it's possible to access its attributes, but I can't seem to find a way to use its methods.
addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2 && //<-- Here I'd like to
} // reference a method
}); //from the class where
//addMouseListener() is defined!
Thanks
can anyone see why this wouldn't be working. Fairly new to django so any help would be much appreciated
actual url:
http://127.0.0.1:8000/2010/may/12/my-second-blog-post/
urls.py:
(r'(?P<year>d{4})/(?P<month>[a-z]{3})/(?P<day>w{1,2})/(?P<slug>[-w]+)/$', 'object_detail', dict(info_dict, slug_field='slug',template_name='blog/detail.html')),
What would be best practice to localize your ASP .Net MVC application ?
I would like to cover two situations:
one application deployment in IIS which would handle multiple languages
one language / application deployment.
In first situation should you go with somekind of view based thing like, ~/View/EN, ~/View/FI, ~/View/SWE or something different ?
What about second case, just application based config via Web.config and point these different languages to different urls ?
I have some nested datastructures, each something like:
[ ('foo', [ {'a':1, 'b':2},
{'a':3.3, 'b':7} ]),
('bar', [ {'a':4, 'd':'efg', 'e':False} ]) ]
I need to compare these structures, to see if there are any differences. Short of writing a function to explicitly walk the structure, is there an existing library or method of doing this kind of recursive comparison?
I have an arraylist (eg: h1) contain some urls.
eg: http://www.google.com,http://www.yahoo.com,http://www.xyz.com,.....
How can i put hyperlinks to each elements in that arraylist in c# ? Means by clicking on that url it should navigate to corresponding website.Can you give an example??
Also, how can i use 'Hyperlink' keyword in c# ?
Hi,
I am trying to send a date to the server as part of a get transaction, however, looking at the urls (through firebug), it appears that the var sDate is never replaced with its value.
Sorry i'm very new to JS and Jquery, so this is likely a very elementary mistake - i'm guessing it has something to do with the map that i am trying to pass to $.get?
function drawVisualization(sDate, eDate) {
alert(sDate + eDate);
$.get(
"http://localhost:8080/",
"{'start':sDate}",
function(data) { alert(data); },
"html"
);
I'm not sure why, but this condition will never evaluate True for me. I'm feeding it datetime.today() in the urls file. Am I missing something?
Template:
{% load humaize %}
{{ entry.date|naturalday }} {# Evals to "today" #}
{% ifequal entry.date|naturalday "today" %}
True
{{ entry.date|date:"fA"|lower }} {{ entry.date|naturalday|title }}
{% else %}
False
{{ entry.date|naturalday|title }}
{% endifequal %}
I am using mod_rewrite to remap the URLs in my website in the following format:
http://www.mydomain.com/health/54856
http://www.mydomain.com/economy/strategy/911025/
http://www.mydomain.com/tags/obama/new
The problem is that I am making AJAX calls to a file: http://www.mydomain.com/login.php
And I don't want to write the FULL url or even use the ../ trick because there isn't a fixed level of folders.
So, what i want is something to access the login.php from the root, whatever the domain name is:
$.ajax({
type: "POST",
url: "http://www.mydomain.com/login.php"
});
Hi,
I have a CustomGridViewControl that is on a UserControl, the UserControl is loaded outside of the Page_Init when a treeview in the page is clicked that changes the view, than on subsequent postbacks the UserControl is loaded in Page_Init.
The custom gridview is bound to a dataview that is dynamically retrieved.
Problem is that the OnDataBinding of the CustomGridView is firing before the OnLoad of the CustomGridView, which is causing me to not be able to get embedded resource urls.
Any suggestions?
Thanks!
In axis2 on Java it's possible to run operations in the browser by the way you send the url
for example
localhost:8080/axis2/services/SimpleService?wsdl
could have operations implemented by writing urls like so
localhost:8080/axis2/services/SimpleService/hello?param0=xxx
My Question is can you do the same in PHP5 SoapServer where the url is as below?
localhost/soaptest/index.php?wsdl
Thanks
I need to replace several URLs in a text file with some content dependent on the URL itself. Let's say for simplicity it's the first line of the document at the URL.
What I'm trying is this:
sed "s/^URL=\(.*\)/TITLE=$(curl -s \1 | head -n 1)/" file.txt
This doesn't work, since \1 is not set. However, the shell is getting called. Can I somehow push the sed match variables to that subprocess?
I am having the hardest time finding urls to use in Scala Designer 5 showing video streams. I am new at this program, but there is an option to run a video as a background. I have found a couple of samples to link to, but nothing great thus far. Anyone out there using this program and wanting to do the same?
Thanks.
Hi lads,
After obtaining the urls for various blogspots, tumblr and wordpress pages, I faced some problems processing the html pages. The thing is, i wish to distinguish between the content,title and date for each blog post. I might be able to get the date through regex, but there are so many custom scripts people are using now that the html classes and structure is so different.
Does anyone has a solution that may help?
I have the following serialized string from a nested sortable list:
ul[0][id]=main1&ul[0][children][0][id]=child2&ul[0][children][0][class]=&ul[1][id]=main3&ul[2][id]=main4&ul[3][id]=main5
I want to be able to record this in the database, and think I need a structure to do this. What's the best way to turn this into a structure, so I can sort it in the database, and easily render the list on the page in the future.
Thanks,B
I want to rename all nested directories named "foo" to "bar" - I've tried the following with no joy:
find */ -name 'foo' | xargs svn move {} 'bar' \;
Thanks
How can I combine multiple Resources in TastyPie? I have 3 models I'd like to combine: users, profiles and posts.
Ideally I'd like profiles nested within user. I'm not sure where to go from here.
class UserResource(ModelResource):
class Meta:
queryset = User.objects.all()
resource_name = 'user'
fields = ['username','id','date_joined']
#Improper Auth
authorization = Authorization()
class UserProfileResource(ModelResource):
class Meta:
queryset = UserProfile.objects.all()
resource_name = 'profile'
class UserPostResource(ModelResource):
user = fields.ForeignKey(UserResource,'user', full=True)
class Meta:
queryset = UserPost.objects.all()
resource_name = 'userpost'
#Improper Auth
authorization = Authorization()
I need to be able to block the urls that are stored in a text file on the hard disk using Python. If the url the user tries to visit is in the file, it redirects them to another page instead. How is this done?
I have to deploy an application named "mrs-ws-server.war" in glassfish. I did it using both :
1) Package File to be uploaded to the server
2) Local package File or Directory
at the address : http://localhost:42328/common/index.jsf
It generates the following error :
Exception while loading the app : java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
What should be the solution for the same ?