has anyone used a uitableview to write a uitextview-like interface where I would be able to use multiple fonts?
How would I arrange the table and responder?
Is it possible to have multiple models included in a single ModelForm in django? I am trying to create a profile edit form. So I need to include some fields from the User model and the UserProfile model. Currently I am using 2 forms like this
class UserEditForm(ModelForm):
class Meta:
model = User
fields = ("first_name", "last_name")
class UserProfileForm(ModelForm):
class Meta:
model = UserProfile
fields = ("middle_name", "home_phone", "work_phone", "cell_phone")
Is there a way to consolidate these into one form or do I just need to create a form and handle the db loading and saving myself?
I'm trying to figure out if there is a way to show all datatips for a single lineseries in a Flex 3 linechart. This chart will have multiple lines and the functionality we're looking for is when a user hovers over a line, show all datatips associated with just that series. Any help would be appreciated.
showAllDataTips will not work in this case as it will display all datatips on the chart.
Thanks!
Rich
Hello
I'm trying to be able to check if a selector have a certain sets of classes.
.hasClass() can only check if the selector has one class. And the .is() selector can look for multiple classes but will return true if the selector have at least one of the classes.
But I wan't to achieve a way to check if a selector have both of the classes, and only if it has both of the classes do action.
Any pointers?
This should be really simple but I'm a javascript/jQuery rookie, so here we go:
With the following code I can select a certain element
var user = $(".ui-selected .user-name").html();
But if there are multiple elements with the above classes, only the first value gets selected. What I would like to accomplish is a variable with all the elements seperated by a , like: user1,user2,user3 ... etc.
Any help would be greatly appreciated, thanks in advance!
The problem is in being able to catch the instance of the player to control it i.e. Stop it, Play it etc. The code by default creates multiple instances of the same player and overlaps the songs. I am being unable to reference the player specifically.
Do you have an idea as to how we can do so?
Thanks,
Arun
I have a column in one of my table where I store multiple ids seperated by comma's.
Is there a way in which I can use this column's value in the "IN" clause of a query.
The column(city) has values like 6,7,8,16,21,2
I need to use as
Select * from table where e_ID in (Select city from locations where e_Id=?)
I am satisfied with Crozin's answer, but I am open to suggestions, views and options.
Feel free to share your views.
I created a custom implementation of a multi-selectable table view. Multiple rows can be selected programatically. The only part I haven't been able to figure out is how to programatically set the background view of cell to the default system cell selected color/pattern.
Does anyone know how to do this?
Thanks!
I've an image placed over the CALayer.. When there are multiple images in screen, the images in the layer overlaps each other.. But it shudn't overlap actually.
Cud anyone help me in fixing this??? Is there any block of code to prevent them from overlapping???
Tanx in advance for ur help...
I am going to build a website on a test server that will behave differently depending on which domain is used to access it (The real website will have multiple domains pointing to it).
But how will I be able to simulate the different domains on the test server?
When/where do you decide to split a large visual studio project into smaller multiple projects?
When you split the project, do you ...
-group database tables
-group similar functionality
-other..
I am planning on storing scans from a mass spectrometer in a MySQL database and
would like to know whether storing and analyzing this amount of data is remotely
feasible. I know performance varies wildly depending on the environment, but I'm
looking for the rough order of magnitude: will queries take 5 days or 5
milliseconds?
Input format
Each input file contains a single run of the spectrometer; each run is comprised
of a set of scans, and each scan has an ordered array of datapoints. There is a
bit of metadata, but the majority of the file is comprised of arrays 32- or
64-bit ints or floats.
Host system
|----------------+-------------------------------|
| OS | Windows 2008 64-bit |
| MySQL version | 5.5.24 (x86_64) |
| CPU | 2x Xeon E5420 (8 cores total) |
| RAM | 8GB |
| SSD filesystem | 500 GiB |
| HDD RAID | 12 TiB |
|----------------+-------------------------------|
There are some other services running on the server using negligible processor
time.
File statistics
|------------------+--------------|
| number of files | ~16,000 |
| total size | 1.3 TiB |
| min size | 0 bytes |
| max size | 12 GiB |
| mean | 800 MiB |
| median | 500 MiB |
| total datapoints | ~200 billion |
|------------------+--------------|
The total number of datapoints is a very rough estimate.
Proposed schema
I'm planning on doing things "right" (i.e. normalizing the data like crazy) and
so would have a runs table, a spectra table with a foreign key to runs,
and a datapoints table with a foreign key to spectra.
The 200 Billion datapoint question
I am going to be analyzing across multiple spectra and possibly even multiple
runs, resulting in queries which could touch millions of rows. Assuming I index
everything properly (which is a topic for another question) and am not trying to
shuffle hundreds of MiB across the network, is it remotely plausible for MySQL
to handle this?
UPDATE: additional info
The scan data will be coming from files in the XML-based
mzML format. The meat of this format is in the
<binaryDataArrayList> elements where the data is stored. Each scan produces =
2 <binaryDataArray> elements which, taken together, form a 2-dimensional (or
more) array of the form [[123.456, 234.567, ...], ...].
These data are write-once, so update performance and transaction safety are not
concerns.
My naïve plan for a database schema is:
runs table
| column name | type |
|-------------+-------------|
| id | PRIMARY KEY |
| start_time | TIMESTAMP |
| name | VARCHAR |
|-------------+-------------|
spectra table
| column name | type |
|----------------+-------------|
| id | PRIMARY KEY |
| name | VARCHAR |
| index | INT |
| spectrum_type | INT |
| representation | INT |
| run_id | FOREIGN KEY |
|----------------+-------------|
datapoints table
| column name | type |
|-------------+-------------|
| id | PRIMARY KEY |
| spectrum_id | FOREIGN KEY |
| mz | DOUBLE |
| num_counts | DOUBLE |
| index | INT |
|-------------+-------------|
Is this reasonable?
I have multiple email addresses linked to my gmail account.
I am signed up to some email groups that send emails out with
To: [email protected]
I can't remember which email address I used to sign up for this group. How do I find out which email address this was addressed to?
Have a requirement to select the 7th column. eg:
cat filename | awk '{print $7}'
The issue is that the data in the 4th column has multiple values with blank in between. example - The last line in the below output:
user \Adminis FL_vol Design 0 - 1 -
group 0 FL_vol Design 19324481 - 3014 -
user \MAK FL_vol Design 16875161 - 2618 -
tree 826 FL_vol Out Global Doc Mark 16875162 - 9618 - /vol/FL_vol/Out Global Doc Mark
How to lock file in Windows so that this file can be opened/read/wrote only by one process?
I found out that file can be locked with CreateFile by giving 0 to dwShareMode flag. It works but only the returned handle can be used to work with file. But I want to be able to lock the file to other processes and at the same time to create multiple handles in my process.
Please help me to solve this issue or give some tips...
Background Story
I'm working at a software firm developing a test automation framework to replace our old spaghetti tangled system.
Since our system requires a login for almost everything we do, I decided it would be best to use @BeforeMethod, @DataProvider, and @Factory to setup my tests. However, I've run into some issues.
Sample Test Case
Lets say the software system is a baseball team roster. We want to test to make sure a user can search for a team member by name.
(Note: I'm aware that BeforeMethods don't run in any given order -- assume that's been taken care of for now.)
@BeforeMethod
public void setupSelenium() {
// login with username & password
// acknowledge announcements
// navigate to search page
}
@Test(dataProvider="players")
public void testSearch(String playerName, String searchTerm) {
// search for "searchTerm"
// browse through results
// pass if we find playerName
// fail (Didn't find the player)
}
This test case assumes the following:
The user has already logged on (in a BeforeMethod, most likely)
The user has already navigated to the search page (trivial, before method)
The parameters to the test are associated with the aforementioned login
The Problems
So lets try and figure out how to handle the parameters for the test case.
Idea #1
This method allows us to associate dataproviders with usernames, and lets us use multiple users for any specific test case!
@Test(dataProvider="players")
public void testSearch(String user, String pass, String name, String search) {
// login with user/pass
// acknowledge announcements
// navigate to search page
// ...
}
...but there's lots of repetition, as we have to make EVERY function accept two extra parameters. Not to mention, we're also testing the acknowledge announcements feature, which we don't actually want to test.
Idea #2
So lets use the factory to initialize things properly!
class BaseTestCase {
public BaseTestCase(String user, String password, Object[][] data);
}
class SomeTest {
@Factory
public void ...
}
With this, we end up having to write one factory per test case... Although, it does let us have multiple users per test-case.
Conclusion
I'm about fresh out of ideas. There was another idea I had where I was loading data from an XML file, and then calling the methods from a program... but its getting silly.
Any ideas?
hi all. I have the following query which I would like to write using the criteria api of NH.
select status, count(1) from (select distinct Status, post_id from post_statistics) tbl group by status
each post_id can exist multiple times in post_statistics
e.g.
id post_id status
1 1 open
1 1 edit
1 1 open
1 2 open
so the query should return the following results:
status count
open 2
edit 1
thx in advance.
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!
If I cherry-pick from multiple branches, is there a simple way to figure out where the commit was coming from (e.g. the sha of the original commit)?
Example:
- at master branch
- cherry pick commit A from a dev branch
- A becomes D at the master branch
Before:
* B (master) Feature Y
| * C (dev) Feature Z
| * A Feature X
|/
* 3
* 2
* 1
After:
* D (master) Feature X
* B Feature Y
| * C (dev) Feature Z
| * A Feature X
|/
* 3
* 2
* 1
Is it possible to figure out that B was cherry-picked from A (aside from searching for the commit message)?
I am trying to debug multiple threads.
*** -[NSLock lock]: deadlock (<NSLock: 0xc388ab0> '(null)')
*** Break on _NSLockError() to debug.
How can I debug this?
Heres something I've been pondering for a while ...
Do you struggle with the size and the number of entries in the web.config file? Do you understand every element?
Is it time for Microsoft to relook at how an ASP.NET site is configured, perhaps by splitting the web.config file into multiple files?
To get a list of a content type's cck fields, I was hoping to use:
drupal_get_schema('content_type_mycontenttype');
but that leaves out fields with multiple values. Is there a simple call to use to get such a list?
It's been a mystery how does Cell Minute Tracker manage to fetch AT&T users data.
Maybe someone here has the long waited answer.
I'm really curious rather they got a confirmation to scrape user’s cellular report
And how they can fire up multiple requests to AT&T site without being banned?
I'm waiting for someone who could shed some light on this mystery
Thanks
link: http://www.uquery.com/apps/311637771-cell-minute-tracker-for-att
Php
I have a contact form that currently has a form field that tries to prevent spam through a calculation (3 + 1). I need that form field to have multiple calculations and at random so prevent spam.