I use multiple components that has a border painted. Is there any easy way to add a margin to the component so that the borders aren't painted so close to eachother?
I am building a online form, with about 20 multiple choice checkboxes.
I can get the nested data with this command.
raise params.to_yaml
I need to store these data and call them again later. I want to sort out which user chose which specific checkbox, i.e. who chose checkbox no.2?
What's the best way to store these data in database?
Looking for quick, simple way in Java to change this string
" hello there "
to something that looks like this
"hello there"
where I replace all those multiple spaces with a single space, except I also want the one or more spaces at the beginning of string to be gone.
Something like this gets me partly there
String mytext = " hello there ";
mytext = mytext.replaceAll("( )+", " ");
but not quite.
hi..
i want to log messages from multiple classes. the problem is that currently i can log all messages into single file.i want to do this class A should log its messages into ALog.txt and class B should log its messages into BLog.txt
please tell me the sample config file for these settings
I use Windows 7 x64, Qt Add-in 1.1.4, Visual Studio 2008 Team Edition.
Does not work on multiple computers ... reinstalling Windows, Qt Add-in or VS2008 does not help(
The error report says that an error in msenv.dll
Please tell us how to fix it.
If possible, of course.
Thank you!
We use scrum technique to plan for short development lifecycle. It is very common that sometimes tasks gets moved or reallocated or deferred from the current sprint for multiple reasons. In that case there is a chance of resources getting freed up from the planned work. It may get difficult to allocate new tasks to them during sprint as mostly all projects are tied up at that point with planned work. What is the best way to plan resources in these situations?
I'm trying to use ModelAdmin.filter_horizontal and ModelAdmin.filter_vertical for ManyToMany field instead of select multiple box but all I get is:
My model:
class Title(models.Model):
#...
production_companies = models.ManyToManyField(Company, verbose_name="????????-?????????????")
#...
My admin:
class TitleAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ("original_name",)}
filter_horizontal = ("production_companies",)
radio_fields = {"state": admin.HORIZONTAL}
#...
The javascripts are loading OK, I really don't get what happens. Django 1.1.1 stable.
I have two tables, users and reports. Each user has no, one, or multiple reports associated with it, and the reports table has a user_id field.
I have the following query, and I need to add to each row a count of how many reports the user has:
SELECT *
FROM users
LIMIT 1, 10
Do I need to use a subquery, and if so, how can I use it efficently? The reports table has thousands and thousands of rows.
Hello,
I have a containing div that has multiple divs within which is updated every 25ms using innerHTML (for performance reasons). I have tried using event delegation to capture events but nothing I seem to do captures the click event. I think this may be due to the speed that the contents are getting updated. Any ideas would be very welcome.
Thanks
Mark
How do you detect when you slide your finger across a UIImageView? Say for example you slide your finger across it and it changes color or something. I want to be able to slide across multiple UIImageViews and have something happen...
I want to know whether one session is been created for each IP address or for each browser instance?
I opened my JSP application in three browser windows. It creates three different sessions?
Suppose I want to use a single session for multiple instance of browser, is it possible or not?
Hi All,
I need to create a cross tab using datatable in C#.
Something like this fucntionname(Array datarows,Array datacolumns)
The function should return the cross tabed table, more parameters for missing values would be great
The source datatable can have multiple columns ranging from 1 - N.
I am creating one admin page where I have multiple textboxes.when I enter the userid in one textbox I want to display user name in next textbox when admin moves to next text box.for this I can use ajax or javascript? which one will be better?how can I do it through javascript.
I have multiple websites set up in the same folder, and I want to create a batch file that will delete the cache in each of them without having to add a new line for each site. For example I am using this:
del /S /Q D:\www\site-name\cache\*
Which works, but I have to add a new line for every site in D:\www. The del command doesn't support:
del /S /Q D:\www\*\cache\*
So what is a better way to do this?
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 ?
Hi
I have a tooltip for each datagrid row. Which is fine. I also can style it with with mx:Style which is great.
However, I desire to have multiple styles ie a header and the rest of the text in the tooltip. Is this possible? Or to have htmlText for input?
I have a group of divs which I'm dynamically generating when a button is clicked with the class, "brick". This gives them dimension and starting position of top: 0. I'm trying to get them to animate to the bottom of the view using a css transition with a second class assignment which gives them a bottom position: 0;. Can't figure out the syntax for adding a second class to elements with a pre-existing class. On inspection they only show the original class of, "brick".
HTML
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="container">
<div id="button" >Click Me</div>
</div>
</body>
</html>
CSS
#container {
width: 100%;
height: 100vh;
padding: 10vmax;
}
#button {
position: fixed;
}
.brick {
position: relative;
top: 0;
height: 10vmax;
width: 20vmax;
background: white;
margin: 0;
padding: 0;
transition: all 1s;
}
.drop {
transition: all 1s;
bottom 0;
}
The offending JS:
var brickCount = function() {
var count = prompt("How many boxes you lookin' for?");
for(var i=0; i < count; i++) {
var newBrick = document.createElement("div");
newBrick.className="brick";
document.querySelector("#container")
.appendChild(newBrick);
}
};
var getBricks = function(){
document.getElementByClass("brick");
};
var changeColor = function(){
getBricks.style.backgroundColor =
'#'+Math.floor(Math.random()*16777215).toString(16);
};
var addDrop = function() {
getBricks.brick = "getBricks.brick" + " drop";
};
var multiple = function() {
brickCount();
getBricks();
changeColor();
addDrop();
};
document.getElementById("button").onclick = function() {multiple();};
Thanks!
i will have multiple applications on the app store and 1 urban airship account to send push notifications to all of these devices. what i want to know is if each apple device has the same "push token" across all applications? this is more of a database architecture thing so that I don't duplicate a push token many times if one single device uses many of my apps
if each apple device generates a unique push token for each application it has installed my architecture needs to change.
I have a table foo and a table bar, where each foo might have a bar (and a bar might belong to multiple foos).
Now I need to select all foos with a bar. My sql looks like this
SELECT * FROM foo f WHERE [...] AND ($param IS NULL OR
(SELECT ((COUNT(*))>0) FROM bar b WHERE f.bar = b.id))
with $param being replaced at runtime.
The question is: Will the subquery be executed even if param is null, or will the dbms optimize the subquery out?
Hi,
I have a generic user control which will be used twice in a page. There is a javascript asscoiated with it which also needs to be added. How can I add this to a page since the javascript will be added multiple times.
I can't see arguments for main() in package main.
How to pass arguments from command line in Go?
A complete program, possibly created by linking multiple packages,
must have one package called main, with a function
func main() { ... }
defined. The function main.main() takes no arguments and returns no value.
I am currently using:
c(module_name)
: to build my Erlang files ones by one, and I was wondering about how other people handle the build process for Erlang when they have multiple files
I found this code to force using www.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.example.com$
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301]
But i have many domain that pointed same directory. So i need a version of this code for multiple domains. It must run on any domain, is it possible ?
I am working on an app that has multiple tabs. In the first tab the user will enter values. In the other tabs it will display the results of calculations based off of those values.
Like in tab 1, the user will enter "3" and "2".
In tab 2, the program will add them and display "5".
In tab 2 how do I access the ints "3" and "2"?
Thanks